Merge branch 'develop' of http://192.168.10.125/k18_web/NFS.git into develop
This commit is contained in:
@@ -18,6 +18,11 @@ public class IpReusePolicyCfg extends BaseCfg<IpReusePolicyCfg>{
|
||||
private String userName;
|
||||
private String addrPoolName; // 仅用于列表条件检索
|
||||
|
||||
private Integer ipType;
|
||||
private Integer ipPattern;
|
||||
private String srcIpAddress;
|
||||
private String destIpAddress;
|
||||
|
||||
public Integer getUserId() {
|
||||
return userId;
|
||||
}
|
||||
@@ -60,5 +65,29 @@ public class IpReusePolicyCfg extends BaseCfg<IpReusePolicyCfg>{
|
||||
public void setAddrPoolName(String addrPoolName) {
|
||||
this.addrPoolName = addrPoolName;
|
||||
}
|
||||
public Integer getIpType() {
|
||||
return ipType;
|
||||
}
|
||||
public void setIpType(Integer ipType) {
|
||||
this.ipType = ipType;
|
||||
}
|
||||
public String getSrcIpAddress() {
|
||||
return srcIpAddress;
|
||||
}
|
||||
public void setSrcIpAddress(String srcIpAddress) {
|
||||
this.srcIpAddress = srcIpAddress;
|
||||
}
|
||||
public Integer getIpPattern() {
|
||||
return ipPattern;
|
||||
}
|
||||
public void setIpPattern(Integer ipPattern) {
|
||||
this.ipPattern = ipPattern;
|
||||
}
|
||||
public String getDestIpAddress() {
|
||||
return destIpAddress;
|
||||
}
|
||||
public void setDestIpAddress(String destIpAddress) {
|
||||
this.destIpAddress = destIpAddress;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
81
src/main/java/com/nis/domain/log/IrDnatLog.java
Normal file
81
src/main/java/com/nis/domain/log/IrDnatLog.java
Normal file
@@ -0,0 +1,81 @@
|
||||
package com.nis.domain.log;
|
||||
|
||||
public class IrDnatLog extends BaseLogEntity<IrDnatLog> {
|
||||
|
||||
private static final long serialVersionUID = 5860838446015457328L;
|
||||
|
||||
protected String userId;// 用户名
|
||||
protected String natIp;// 复用的ip地址
|
||||
protected String creatTime;// 链接建立时间
|
||||
protected String closeTime;// 链接结束时间
|
||||
protected String c2sPktNum;// c2s包数
|
||||
protected String s2cPktNum;// s2c包数
|
||||
protected String c2sByteNum;// c2s字节数
|
||||
protected String s2cByteNum;// s2c字节数
|
||||
|
||||
|
||||
|
||||
public String getUserId() {
|
||||
return userId;
|
||||
}
|
||||
public void setUserId(String userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
public String getNatIp() {
|
||||
return natIp;
|
||||
}
|
||||
public void setNatIp(String natIp) {
|
||||
this.natIp = natIp;
|
||||
}
|
||||
public String getCreatTime() {
|
||||
return creatTime;
|
||||
}
|
||||
public void setCreatTime(String creatTime) {
|
||||
this.creatTime = creatTime;
|
||||
}
|
||||
public String getCloseTime() {
|
||||
return closeTime;
|
||||
}
|
||||
public void setCloseTime(String closeTime) {
|
||||
this.closeTime = closeTime;
|
||||
}
|
||||
public String getC2sPktNum() {
|
||||
return c2sPktNum;
|
||||
}
|
||||
public void setC2sPktNum(String c2sPktNum) {
|
||||
this.c2sPktNum = c2sPktNum;
|
||||
}
|
||||
public String getS2cPktNum() {
|
||||
return s2cPktNum;
|
||||
}
|
||||
public void setS2cPktNum(String s2cPktNum) {
|
||||
this.s2cPktNum = s2cPktNum;
|
||||
}
|
||||
public String getC2sByteNum() {
|
||||
return c2sByteNum;
|
||||
}
|
||||
public void setC2sByteNum(String c2sByteNum) {
|
||||
this.c2sByteNum = c2sByteNum;
|
||||
}
|
||||
public String getS2cByteNum() {
|
||||
return s2cByteNum;
|
||||
}
|
||||
public void setS2cByteNum(String s2cByteNum) {
|
||||
this.s2cByteNum = s2cByteNum;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
73
src/main/java/com/nis/domain/log/IrSnatLog.java
Normal file
73
src/main/java/com/nis/domain/log/IrSnatLog.java
Normal file
@@ -0,0 +1,73 @@
|
||||
package com.nis.domain.log;
|
||||
|
||||
public class IrSnatLog extends BaseLogEntity<IrSnatLog> {
|
||||
|
||||
private static final long serialVersionUID = 5860838446015457328L;
|
||||
|
||||
protected String natIp;// 复用的ip地址
|
||||
protected String creatTime;// 链接建立时间
|
||||
protected String closeTime;// 链接结束时间
|
||||
protected String c2sPktNum;// c2s包数
|
||||
protected String s2cPktNum;// s2c包数
|
||||
protected String c2sByteNum;// c2s字节数
|
||||
protected String s2cByteNum;// s2c字节数
|
||||
|
||||
|
||||
public String getNatIp() {
|
||||
return natIp;
|
||||
}
|
||||
public void setNatIp(String natIp) {
|
||||
this.natIp = natIp;
|
||||
}
|
||||
public String getCreatTime() {
|
||||
return creatTime;
|
||||
}
|
||||
public void setCreatTime(String creatTime) {
|
||||
this.creatTime = creatTime;
|
||||
}
|
||||
public String getCloseTime() {
|
||||
return closeTime;
|
||||
}
|
||||
public void setCloseTime(String closeTime) {
|
||||
this.closeTime = closeTime;
|
||||
}
|
||||
public String getC2sPktNum() {
|
||||
return c2sPktNum;
|
||||
}
|
||||
public void setC2sPktNum(String c2sPktNum) {
|
||||
this.c2sPktNum = c2sPktNum;
|
||||
}
|
||||
public String getS2cPktNum() {
|
||||
return s2cPktNum;
|
||||
}
|
||||
public void setS2cPktNum(String s2cPktNum) {
|
||||
this.s2cPktNum = s2cPktNum;
|
||||
}
|
||||
public String getC2sByteNum() {
|
||||
return c2sByteNum;
|
||||
}
|
||||
public void setC2sByteNum(String c2sByteNum) {
|
||||
this.c2sByteNum = c2sByteNum;
|
||||
}
|
||||
public String getS2cByteNum() {
|
||||
return s2cByteNum;
|
||||
}
|
||||
public void setS2cByteNum(String s2cByteNum) {
|
||||
this.s2cByteNum = s2cByteNum;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -699,7 +699,8 @@ public final class Constants {
|
||||
public static final String NTC_RADIUS_REPORT=Configurations.getStringProperty("ntcRadiusReport","ntcRadiusReport");
|
||||
public static final String TRAFFIC_BANDWIDTH_TRANS=Configurations.getStringProperty("trafficBandwidthTrans","trafficBandwidthTrans");
|
||||
public static final String TRAFFIC_PROTOCOL_LIST=Configurations.getStringProperty("trafficProtocolList","trafficProtocolList");
|
||||
|
||||
public static final String TRAFFIC_APP_LIST=Configurations.getStringProperty("trafficAppList","trafficAppList");
|
||||
public static final String NTC_ACTION_ENTRANCE_REPORT=Configurations.getStringProperty("ntcActionEntranceReport","ntcActionEntranceReport");
|
||||
/**
|
||||
* httpclient 工具超时时间设置
|
||||
*/
|
||||
@@ -757,4 +758,7 @@ public final class Constants {
|
||||
public static final String IP_REUSE_CALL_CGI_URL = Configurations.getStringProperty("ip_reuse_call_cgi_url","");
|
||||
public static final String ALL_IP_GET = Configurations.getStringProperty("allIpGet","AllIpGet");
|
||||
public static final String IP_NUM_GET = Configurations.getStringProperty("ipNumGet","IpNumGet");
|
||||
//日志查询接口URL
|
||||
public static final String IR_SNAT_LOG = Configurations.getStringProperty("irSnatLog","");
|
||||
public static final String IR_DNAT_LOG = Configurations.getStringProperty("irDnatLog","");
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.basics.IpReuseIpCfg;
|
||||
import com.nis.domain.configuration.BaseIpCfg;
|
||||
import com.nis.domain.configuration.IpAddrPoolCfg;
|
||||
import com.nis.exceptions.MaatConvertException;
|
||||
@@ -175,5 +176,12 @@ public class IpAddrPoolController extends BaseController{
|
||||
resultMap=ConfigServiceUtil.getCGIInfo(url, cmd, params);
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
@ResponseBody
|
||||
@RequestMapping(value = {"/getAllIpInfo"})
|
||||
public List<IpReuseIpCfg> getAllIpInfo(Integer addrPoolId,HttpServletRequest request,HttpServletResponse response){
|
||||
List<IpReuseIpCfg> ipList = ipReuseIpCfgService.getPolicyIpInfo(addrPoolId);
|
||||
return ipList;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -106,6 +106,37 @@ public class TrafficStatisticsInfoController extends BaseController {
|
||||
public String bandwidthList( HttpServletRequest request, HttpServletResponse response, Model model){
|
||||
return "/dashboard/trafficBandwidthList";
|
||||
}
|
||||
/**
|
||||
* 流量统计滚动动作查看详情页面
|
||||
*/
|
||||
@RequestMapping(value={"trafficBlockList","trafficMonitorList"})
|
||||
public String serviceBlockList(@RequestParam("searchAction")String searchAction,HttpServletRequest request, HttpServletResponse response, Model model){
|
||||
model.addAttribute("searchAction", searchAction);
|
||||
return "/dashboard/trafficActionTransList";
|
||||
}
|
||||
/**
|
||||
* 根据动作查询entrance趋势 间隔5分钟数据
|
||||
*/
|
||||
@RequestMapping(value="actionEntranceTrans")
|
||||
@ResponseBody
|
||||
public List actionTrans(@RequestParam("searchAction")String searchAction){
|
||||
Map<String, Object> fromJsonList = new HashMap<String, Object>();
|
||||
List resultList = new ArrayList();
|
||||
String url = Constants.DASHBOARD_URL+Constants.NTC_ACTION_ENTRANCE_REPORT;
|
||||
url=url+"?searchAction="+searchAction;
|
||||
try {
|
||||
String string = HttpClientUtil.get(url);
|
||||
Gson gson = new GsonBuilder().create();
|
||||
fromJsonList = gson.fromJson(string, new TypeToken<Map>(){}.getType());
|
||||
logger.info(searchAction+"动作间隔5分钟数据"+fromJsonList);
|
||||
resultList = (ArrayList) fromJsonList.get("data");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.error(searchAction+"动作详情数据获取错误"+e);
|
||||
resultList.add(Maps.newHashMap("error","request_service_failed"));
|
||||
}
|
||||
return resultList;
|
||||
}
|
||||
/**
|
||||
* 根据ip46,协议tcp,udp查询带宽 间隔5分钟数据
|
||||
*/
|
||||
@@ -190,5 +221,57 @@ public class TrafficStatisticsInfoController extends BaseController {
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* App类型详细列表
|
||||
*/
|
||||
@RequestMapping(value="appTypeList")
|
||||
public String appTypeList(){
|
||||
return "/dashboard/trafficAppTypeList";
|
||||
}
|
||||
/**
|
||||
* 协议详情统计图跟表
|
||||
*/
|
||||
@RequestMapping(value="appList")
|
||||
@ResponseBody
|
||||
public List appList(){
|
||||
Map<String, Object> fromJsonList = new HashMap<String, Object>();
|
||||
List list = new ArrayList();
|
||||
String url = Constants.DASHBOARD_URL+Constants.TRAFFIC_APP_LIST;
|
||||
try {
|
||||
String string = HttpClientUtil.get(url);
|
||||
Gson gson = new GsonBuilder().create();
|
||||
fromJsonList = gson.fromJson(string, new TypeToken<Map>(){}.getType());
|
||||
logger.info("app详情5分钟数据"+fromJsonList);
|
||||
list = (ArrayList) fromJsonList.get("data");
|
||||
Long totalLink=0l;
|
||||
Long totalPackets=0l;
|
||||
Double totalGByte=0d;
|
||||
DecimalFormat lf = new DecimalFormat("0");
|
||||
DecimalFormat df = new DecimalFormat("0.00000000");
|
||||
if(!StringUtil.isEmpty(list)){
|
||||
for (Object object : list) {
|
||||
Map m=(Map) object;
|
||||
totalGByte+=Double.parseDouble(m.get("GByte").toString());
|
||||
// String linkNum = df.format(m.get("linkNum"));
|
||||
m.put("GByte", df.format(m.get("GByte")));
|
||||
m.put("packets", lf.format(m.get("packets")));
|
||||
m.put("linkNum", lf.format(m.get("linkNum")));
|
||||
totalLink+=Long.parseLong( m.get("linkNum").toString());
|
||||
totalPackets+=Long.parseLong(m.get("packets").toString());
|
||||
}
|
||||
for (Object object : list) {
|
||||
Map m=(Map) object;
|
||||
m.put("totalLink", totalLink);
|
||||
m.put("totalPackets", totalPackets);
|
||||
m.put("totalGByte", totalGByte);
|
||||
}
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.error("app详情数据获取错误"+e);
|
||||
list.add(Maps.newHashMap("error","request_service_failed"));
|
||||
}
|
||||
return list;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
package com.nis.web.controller.log.ntc;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.nis.domain.FunctionServiceDict;
|
||||
import com.nis.domain.PageLog;
|
||||
import com.nis.domain.log.IrDnatLog;
|
||||
import com.nis.domain.maat.LogRecvData;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.DictUtils;
|
||||
import com.nis.util.httpclient.HttpClientUtil;
|
||||
import com.nis.web.controller.BaseController;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("${adminPath}/log/ntc/irDnatLogs")
|
||||
public class IrDnatLogController extends BaseController {
|
||||
|
||||
@RequestMapping(value = {"list", ""})
|
||||
public String list(@ModelAttribute("log") IrDnatLog log, Model model, HttpServletRequest request, HttpServletResponse response) {
|
||||
try {
|
||||
PageLog<IrDnatLog> page = new PageLog<IrDnatLog>(request, response);
|
||||
Map<String, Object> params = new HashMap<String, Object>();
|
||||
params.put("pageSize", page.getPageSize());
|
||||
params.put("pageNo", page.getPageNo());
|
||||
initLogSearchValue(log, params);
|
||||
|
||||
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(log.getFunctionId());
|
||||
model.addAttribute("serviceList", serviceList);
|
||||
|
||||
String url = Constants.LOG_BASE_URL + Constants.IR_DNAT_LOG;
|
||||
String recv = HttpClientUtil.getMsg(url, params, request);
|
||||
|
||||
|
||||
logger.info("查询结果:" + recv);
|
||||
if (StringUtils.isNotBlank(recv)) {
|
||||
Gson gson = new GsonBuilder().create();
|
||||
LogRecvData<IrDnatLog> fromJson = gson.fromJson(recv, new TypeToken<LogRecvData<IrDnatLog>>(){}.getType());
|
||||
if (fromJson.getStatus().intValue() == 200) {
|
||||
page.setCount(fromJson.getData().getCount());page.setList(fromJson.getData().getList());
|
||||
List<IrDnatLog> list = page.getList();
|
||||
for (IrDnatLog l : list) {
|
||||
l.setFunctionId(log.getFunctionId());
|
||||
setLogAction(l,serviceList);
|
||||
}
|
||||
model.addAttribute("page", page);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("查询失败", e);
|
||||
addMessageLog(model, e.getMessage());
|
||||
}
|
||||
|
||||
return "/log/ntc/irDnatLogList";
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
package com.nis.web.controller.log.ntc;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.nis.domain.FunctionServiceDict;
|
||||
import com.nis.domain.PageLog;
|
||||
import com.nis.domain.log.IrSnatLog;
|
||||
import com.nis.domain.maat.LogRecvData;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.DictUtils;
|
||||
import com.nis.util.httpclient.HttpClientUtil;
|
||||
import com.nis.web.controller.BaseController;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("${adminPath}/log/ntc/irSnatLogs")
|
||||
public class IrSnatLogController extends BaseController {
|
||||
|
||||
@RequestMapping(value = {"list", ""})
|
||||
public String list(@ModelAttribute("log") IrSnatLog log, Model model, HttpServletRequest request, HttpServletResponse response) {
|
||||
try {
|
||||
PageLog<IrSnatLog> page = new PageLog<IrSnatLog>(request, response);
|
||||
Map<String, Object> params = new HashMap<String, Object>();
|
||||
params.put("pageSize", page.getPageSize());
|
||||
params.put("pageNo", page.getPageNo());
|
||||
initLogSearchValue(log, params);
|
||||
|
||||
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(log.getFunctionId());
|
||||
model.addAttribute("serviceList", serviceList);
|
||||
|
||||
String url = Constants.LOG_BASE_URL + Constants.IR_SNAT_LOG;
|
||||
String recv = HttpClientUtil.getMsg(url, params, request);
|
||||
|
||||
|
||||
logger.info("查询结果:" + recv);
|
||||
if (StringUtils.isNotBlank(recv)) {
|
||||
Gson gson = new GsonBuilder().create();
|
||||
LogRecvData<IrSnatLog> fromJson = gson.fromJson(recv, new TypeToken<LogRecvData<IrSnatLog>>(){}.getType());
|
||||
if (fromJson.getStatus().intValue() == 200) {
|
||||
page.setCount(fromJson.getData().getCount());page.setList(fromJson.getData().getList());
|
||||
List<IrSnatLog> list = page.getList();
|
||||
for (IrSnatLog l : list) {
|
||||
l.setFunctionId(log.getFunctionId());
|
||||
setLogAction(l,serviceList);
|
||||
}
|
||||
model.addAttribute("page", page);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("查询失败", e);
|
||||
addMessageLog(model, e.getMessage());
|
||||
}
|
||||
|
||||
return "/log/ntc/irSnatLogList";
|
||||
}
|
||||
|
||||
}
|
||||
@@ -14,4 +14,5 @@ public interface IpReuseIpCfgDao extends CrudDao<IpReuseIpCfg> {
|
||||
List<IpReuseIpCfg> findPage(IpReuseIpCfg userIpCfg);
|
||||
IpReuseIpCfg getUserIpCfg(Long cfgId);
|
||||
IpReuseIpCfg getIpByIp(String destIpAddress);
|
||||
List<IpReuseIpCfg> getPolicyIpInfo(@Param("addrPoolId")Integer addrPoolId);
|
||||
}
|
||||
|
||||
@@ -182,6 +182,15 @@
|
||||
where r.is_valid !=-1 and r.cfg_id=#{cfgId}
|
||||
</select>
|
||||
|
||||
<select id="getPolicyIpInfo" resultMap="reuserIpCfgMap">
|
||||
SELECT
|
||||
<include refid="columns"></include>
|
||||
FROM
|
||||
ip_reuse_ip_cfg r
|
||||
WHERE
|
||||
r.is_valid !=-1 AND r.user_region1 = #{addrPoolId}
|
||||
</select>
|
||||
|
||||
<insert id="insert" parameterType="com.nis.domain.basics.IpReuseIpCfg" >
|
||||
insert into ip_reuse_ip_cfg (
|
||||
CFG_DESC,
|
||||
|
||||
@@ -25,4 +25,6 @@ public interface IpMultiplexDao extends CrudDao<IpMultiplexDao>{
|
||||
// 校验地址池是否被引用
|
||||
List<IpReusePolicyCfg> checkAddrPoolIsUsed(@Param("addrPoolId")String addrPoolId);
|
||||
|
||||
void updatePolicyAuditStatus(IpReusePolicyCfg cfg);
|
||||
|
||||
}
|
||||
|
||||
@@ -8,7 +8,10 @@
|
||||
<result column="addr_pool_id" property="addrPoolId" jdbcType="INTEGER"/>
|
||||
<result column="user_name" property="userName" jdbcType="VARCHAR"/>
|
||||
<result column="user_type" property="userType" jdbcType="VARCHAR"/>
|
||||
|
||||
<result column="ip_type" property="ipType" jdbcType="INTEGER" />
|
||||
<result column="ip_pattern" property="ipPattern" jdbcType="INTEGER" />
|
||||
<result column="src_ip_address" property="srcIpAddress" jdbcType="VARCHAR" />
|
||||
|
||||
<result column="do_log" property="doLog" jdbcType="INTEGER" />
|
||||
<result column="is_valid" property="isValid" jdbcType="INTEGER" />
|
||||
<result column="is_audit" property="isAudit" jdbcType="INTEGER" />
|
||||
@@ -38,7 +41,7 @@
|
||||
</resultMap>
|
||||
|
||||
<sql id="policyColumns">
|
||||
r.CFG_ID,r.CFG_DESC,r.ADDR_POOL_ID,r.USER_NAME,r.USER_TYPE,
|
||||
r.CFG_ID,r.CFG_DESC,r.ADDR_POOL_ID,r.USER_NAME,r.USER_TYPE,r.IP_TYPE,r.IP_PATTERN,r.SRC_IP_ADDRESS,
|
||||
r.ACTION,r.DO_LOG,r.IS_VALID,r.IS_AUDIT,r.CFG_REGION_CODE,r.CFG_TYPE,r.FUNCTION_ID,
|
||||
r.SERVICE_ID,r.COMPILE_ID,r.REQUEST_ID,r.CLASSIFY,r.ATTRIBUTE,r.LABLE,
|
||||
r.CREATOR_ID,r.CREATE_TIME,r.EDITOR_ID,r.EDIT_TIME,r.AUDITOR_ID,r.AUDIT_TIME,
|
||||
@@ -75,13 +78,15 @@
|
||||
<if test="compileId != null">
|
||||
AND r.compile_id=#{compileId,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="userName != null and userName != ''">
|
||||
AND r.user_id in (SELECT u.id FROM user_manage u
|
||||
<where>
|
||||
u.user_name LIKE concat(concat('%',#{userName,jdbcType=VARCHAR}),'%')
|
||||
</where>
|
||||
)
|
||||
<if test="srcIpAddress != null and srcIpAddress != ''">
|
||||
AND r.src_ip_address=#{srcIpAddress,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="userType != null and userType != ''">
|
||||
AND r.user_type=#{userType,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="userName != null and userName != ''">
|
||||
AND r.user_name LIKE concat(concat('%',#{userName,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="addrPoolName != null and addrPoolName != ''">
|
||||
AND r.addr_pool_id in (SELECT i.cfg_id FROM ip_reuse_addr_pool i
|
||||
<where>
|
||||
@@ -173,6 +178,9 @@
|
||||
addr_pool_id,
|
||||
user_name,
|
||||
user_type,
|
||||
ip_type,
|
||||
ip_pattern,
|
||||
src_ip_address,
|
||||
action,
|
||||
do_log,
|
||||
is_valid,
|
||||
@@ -204,6 +212,9 @@
|
||||
#{addrPoolId,jdbcType=INTEGER},
|
||||
#{userName,jdbcType=VARCHAR},
|
||||
#{userType,jdbcType=VARCHAR},
|
||||
#{ipType,jdbcType=INTEGER},
|
||||
#{ipPattern,jdbcType=INTEGER},
|
||||
#{srcIpAddress,jdbcType=VARCHAR},
|
||||
#{action,jdbcType=INTEGER},
|
||||
#{doLog,jdbcType=INTEGER},
|
||||
0,
|
||||
@@ -246,7 +257,7 @@
|
||||
update ip_reuse_policy_cfg
|
||||
<set>
|
||||
<trim suffixOverrides=",">
|
||||
<if test="userName != null and userName != ''" >
|
||||
<if test="userName != null" >
|
||||
user_name = #{userName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="userType != null and userType != ''" >
|
||||
@@ -258,6 +269,15 @@
|
||||
<if test="addrPoolId != null" >
|
||||
addr_pool_id = #{addrPoolId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<!-- <if test="ipType != null" > -->
|
||||
ip_type = #{ipType,jdbcType=INTEGER},
|
||||
<!-- </if>
|
||||
<if test="ipPattern != null"> -->
|
||||
ip_pattern=#{ipPattern,jdbcType=INTEGER},
|
||||
<!-- </if> -->
|
||||
<if test="srcIpAddress != null">
|
||||
src_ip_address=#{srcIpAddress,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="translateParam != null and translateParam != ''" >
|
||||
translate_param = #{translateParam,jdbcType=VARCHAR},
|
||||
</if>
|
||||
@@ -312,6 +332,28 @@
|
||||
|
||||
</update>
|
||||
|
||||
<update id="updatePolicyAuditStatus" parameterType="com.nis.domain.configuration.IpReusePolicyCfg">
|
||||
update ip_reuse_policy_cfg
|
||||
<set>
|
||||
<trim suffixOverrides=",">
|
||||
<if test="isValid != null" >
|
||||
is_valid = #{isValid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isAudit != null" >
|
||||
is_audit = #{isAudit,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="auditorId != null" >
|
||||
auditor_id = #{auditorId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="auditTime != null and createTime != ''" >
|
||||
audit_time = #{auditTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</trim>
|
||||
</set>
|
||||
WHERE cfg_id = #{cfgId,jdbcType=BIGINT}
|
||||
|
||||
</update>
|
||||
|
||||
<select id="checkAddrPoolIsUsed" resultMap="policyMap">
|
||||
SELECT
|
||||
<include refid="policyColumns"/>
|
||||
|
||||
@@ -102,4 +102,13 @@ public class IpReuseIpCfgService extends BaseService{
|
||||
ipReuseIpCfgDao.update(entity);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 策略管理:获取所有IP信息
|
||||
* @param addrPoolId
|
||||
* @return
|
||||
*/
|
||||
public List<IpReuseIpCfg> getPolicyIpInfo(Integer addrPoolId) {
|
||||
return ipReuseIpCfgDao.getPolicyIpInfo(addrPoolId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,10 +56,12 @@ public class IpMultiplexService extends BaseService{
|
||||
entity.setIsAudit(0);
|
||||
setAreaEffectiveIds(entity);
|
||||
|
||||
// 获取用户/账号类型
|
||||
if(StringUtils.isNotBlank(entity.getUserName())){
|
||||
String userType = ipMultiplexDao.getUserType(entity.getUserName());
|
||||
entity.setUserType(userType);
|
||||
if("VPN".equals(entity.getUserType())){
|
||||
entity.setIpType(null);
|
||||
entity.setIpPattern(null);
|
||||
entity.setSrcIpAddress("");
|
||||
}else{
|
||||
entity.setUserName("");
|
||||
}
|
||||
|
||||
// 更新策略信息
|
||||
@@ -120,8 +122,7 @@ public class IpMultiplexService extends BaseService{
|
||||
cfg.setIsAudit(isAudit);
|
||||
cfg.setAuditorId(UserUtils.getUser().getId());
|
||||
cfg.setAuditTime(auditTime);
|
||||
cfg.setDoLog(null);
|
||||
ipMultiplexDao.updatePolicyCfg(cfg);
|
||||
ipMultiplexDao.updatePolicyAuditStatus(cfg);
|
||||
|
||||
SysDictInfoService sysDictInfoService = SpringContextHolder.getBean(SysDictInfoService.class);
|
||||
// 获取配置信息
|
||||
@@ -133,7 +134,7 @@ public class IpMultiplexService extends BaseService{
|
||||
params.put("configId", cfg.getCompileId());
|
||||
params.put("addrPoolId", cfg.getAddrPoolId());
|
||||
params.put("userType", cfg.getUserType());
|
||||
params.put("userId", keywordsEscape(cfg.getUserName()));
|
||||
params.put("userId", keywordsEscape(StringUtils.isNotBlank(cfg.getUserName())?cfg.getUserName():cfg.getSrcIpAddress()));
|
||||
params.put("doLog", cfg.getDoLog());
|
||||
params.put("action", cfg.getAction());
|
||||
params.put("service", cfg.getServiceId());
|
||||
@@ -164,7 +165,7 @@ public class IpMultiplexService extends BaseService{
|
||||
params.put("configId", cfg.getCompileId());
|
||||
params.put("addrPoolId", cfg.getAddrPoolId());
|
||||
params.put("userType", cfg.getUserType());
|
||||
params.put("userId", keywordsEscape(cfg.getUserName()));
|
||||
params.put("userId", keywordsEscape(StringUtils.isNotBlank(cfg.getUserName())?cfg.getUserName():cfg.getSrcIpAddress()));
|
||||
params.put("doLog", cfg.getDoLog());
|
||||
params.put("action", cfg.getAction());
|
||||
params.put("service", cfg.getServiceId());
|
||||
|
||||
@@ -1339,4 +1339,13 @@ config_sync=Configuration Synchronization
|
||||
info_failed=Information Acquisition Failure
|
||||
address_pool_ip_configuration=Address Pool IP Configuration
|
||||
cgi_failed=CGI Server
|
||||
ip_check=Please enter a correct IP address
|
||||
ip_check=Please enter a correct IP address
|
||||
user_type=User Type
|
||||
policy_vpn_user=VPN access user name
|
||||
policy_sipv4_user=Three tier access to IP(IPv4)
|
||||
policy_sipv6_user=Three tier access to IP(IPv6)
|
||||
creat_time=Creat Time
|
||||
close_time=Close Time
|
||||
nat_ip=Multiplexed IP Address
|
||||
traffic=Traffic
|
||||
ip_info=IP Info
|
||||
@@ -1337,4 +1337,13 @@ config_sync=\u914D\u7F6E\u540C\u6B65
|
||||
info_failed=\u4FE1\u606F\u83B7\u53D6\u5931\u8D25
|
||||
address_pool_ip_configuration=\u5730\u5740\u6C60 IP\u914D\u7F6E
|
||||
cgi_failed=CGI\u670D\u52A1
|
||||
ip_check=\u8BF7\u586B\u5199\u6B63\u786E\u7684IP\u5730\u5740
|
||||
ip_check=\u8BF7\u586B\u5199\u6B63\u786E\u7684IP\u5730\u5740
|
||||
user_type=\u7528\u6237\u7C7B\u578B
|
||||
policy_vpn_user=VPN\u63A5\u5165\u7528\u6237\u540D
|
||||
policy_sipv4_user=\u4E09\u5C42\u63A5\u5165\u6E90IP(IPv4)
|
||||
policy_sipv6_user=\u4E09\u5C42\u63A5\u5165\u6E90IP(IPv6)
|
||||
creat_time=\u94FE\u63A5\u5EFA\u7ACB\u65F6\u95F4
|
||||
close_time=\u94FE\u63A5\u7ED3\u675F\u65F6\u95F4
|
||||
nat_ip=\u590D\u7528\u7684IP\u5730\u5740
|
||||
traffic=Traffic
|
||||
ip_info=IP\u5730\u5740\u4FE1\u606F
|
||||
@@ -570,4 +570,10 @@ ipNumGet=IpNumGet
|
||||
allIpGet=AllIpGet
|
||||
#\u6D41\u91CF\u7EDF\u8BA1\u5E26\u5BBD\u8BE6\u60C5
|
||||
trafficBandwidthTrans=trafficBandwidthTrans
|
||||
trafficProtocolList=trafficProtocolList
|
||||
trafficProtocolList=trafficProtocolList
|
||||
irSnatLog=irSnatLogs
|
||||
irDnatLog=irDnatLogs
|
||||
trafficBandwidthTrans=trafficBandwidthTrans
|
||||
trafficProtocolList=trafficProtocolList
|
||||
trafficAppList=trafficAppList
|
||||
ntcActionEntranceReport=ntcActionEntranceReport
|
||||
@@ -0,0 +1,5 @@
|
||||
UPDATE function_region_dict SET config_ip_pattern = '1,3' WHERE dict_id = 68 AND function_id = 300;
|
||||
|
||||
ALTER TABLE ip_reuse_policy_cfg ADD ip_type INT(11) DEFAULT NULL COMMENT 'IPV4=4,IPV6=6';
|
||||
ALTER TABLE ip_reuse_policy_cfg ADD ip_pattern INT(11) DEFAULT NULL;
|
||||
ALTER TABLE ip_reuse_policy_cfg ADD src_ip_address VARCHAR(128) DEFAULT NULL;
|
||||
@@ -84,7 +84,7 @@
|
||||
success:function(data,status){
|
||||
var dataArr = data.candidate_ip;
|
||||
var html = ""
|
||||
html = "<div style='width:98%; overflow: auto; height: 300px; margin-left: 1%; margin-right: 1%;'><br>"
|
||||
html = "<div style='width:98%; overflow: auto; height: 300px; margin-left: 1%; margin-right: 1%;'>"
|
||||
html+="<table class='table table-bordered table-condensed text-nowrap' style='width: 100%;'>";
|
||||
html+="<tbody>";
|
||||
if(dataArr.length == 0){
|
||||
@@ -111,6 +111,35 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function getAllIpInfo(obj){
|
||||
var addrPoolId = $(obj).attr("addrPoolId");
|
||||
$.ajax({
|
||||
data:{"addrPoolId":addrPoolId},
|
||||
url:"${ctx}/maintenance/ipMultiplexPoolCfg/getAllIpInfo",
|
||||
async:true,
|
||||
success:function(data,status){
|
||||
var html = ""
|
||||
html = "<div style='width:98%; overflow: auto; height: 300px; margin-left: 1%; margin-right: 1%;'>"
|
||||
html+="<table class='table table-bordered table-condensed text-nowrap' style='width: 100%;'>";
|
||||
html+="<tbody>";
|
||||
if(data.length == 0){
|
||||
html+="<tr>";
|
||||
html+="<td>("+"<spring:message code="no_data"/>"+")</td>";
|
||||
html+="</tr>";
|
||||
}
|
||||
for(i=0;i<data.length;i++){
|
||||
html+="<tr>";
|
||||
html+="<td>"+data[i].srcIpAddress+"</td>";
|
||||
html+="</tr>";
|
||||
}
|
||||
html+="</tbody>";
|
||||
html+="</table>";
|
||||
html+="</div>";
|
||||
top.$.jBox(html,{width: $(document).width()*0.4,height: 380,title:"<spring:message code="ip_info"/>", buttons:{"<spring:message code="close"/>":true}});
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
@@ -365,11 +394,11 @@
|
||||
<th class="sort-column r.is_valid"><spring:message code="valid_identifier"/></th>
|
||||
<th><spring:message code="is_audit"/></th>
|
||||
<%-- <th><spring:message code="whether_area_block"/></th> --%>
|
||||
<th><spring:message code="operation"/></th>
|
||||
<th><spring:message code="letter"/></th>
|
||||
<th><spring:message code="classification"/></th>
|
||||
<th><spring:message code="attribute"/></th>
|
||||
<th><spring:message code="label"/></th>
|
||||
<%-- <th><spring:message code="operation"/></th> --%>
|
||||
<th><spring:message code="creator"/></th>
|
||||
<th class="sort-column r.create_time"><spring:message code="config_time"/></th>
|
||||
<th><spring:message code="editor"/></th>
|
||||
@@ -420,6 +449,11 @@
|
||||
</a>
|
||||
</c:if>
|
||||
</td> --%>
|
||||
<td>
|
||||
<!-- <a href="#">新增IP</a>
|
||||
<a href="#">删除IP</a> -->
|
||||
<a href="javascript:;" onclick="getAllIpInfo(this)" addrPoolId="${cfg.cfgId }"><spring:message code="show_detail"/></a>
|
||||
</td>
|
||||
<td>${cfg.requestName }</td>
|
||||
<td>
|
||||
<c:set var="classify"></c:set>
|
||||
@@ -478,11 +512,6 @@
|
||||
${fns:abbr(lableInfo,20)}
|
||||
</a>
|
||||
</td>
|
||||
<%-- <td>
|
||||
<!-- <a href="#">新增IP</a>
|
||||
<a href="#">删除IP</a> -->
|
||||
<a href="javascript:;" onclick="getInfo(this)" addrPoolId="${cfg.cfgId }"><spring:message code="show_detail"/></a>
|
||||
</td> --%>
|
||||
<td>${cfg.creatorName }</td>
|
||||
<td><fmt:formatDate value="${cfg.createTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<td>${cfg.editorName }</td>
|
||||
|
||||
@@ -41,7 +41,45 @@ $(function(){
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$("select[name$='ipType']").selectpicker();
|
||||
switchUserType($("select[name$='userType']"));
|
||||
$("select[name$='userType']").on("change",function(){
|
||||
switchUserType(this);
|
||||
});
|
||||
$("select[name$='ipType']").on("change",function(){
|
||||
switchIpInfo(this);
|
||||
});
|
||||
$("select[name$='ipPattern']").on("change",function(){
|
||||
switchIpInfo(this);
|
||||
});
|
||||
});
|
||||
|
||||
var switchUserType = function(obj){
|
||||
var type = $(obj).val();
|
||||
if(type == ''){
|
||||
$(".user").parents(".col-md-6").addClass("hidden");
|
||||
$(".clientIp").parents(".col-md-6").addClass("hidden");
|
||||
$(".ipPattern").parents(".col-md-6").addClass("hidden");
|
||||
}else if(type == 'VPN'){
|
||||
$(".user").parents(".col-md-6").removeClass("hidden");
|
||||
$(".clientIp").parents(".col-md-6").addClass("hidden");
|
||||
$(".ipPattern").parents(".col-md-6").addClass("hidden");
|
||||
}else if(type == 'SIPv4'){
|
||||
$(".user").parents(".col-md-6").addClass("hidden");
|
||||
$(".clientIp").parents(".col-md-6").removeClass("hidden");
|
||||
$(".ipPattern").parents(".col-md-6").removeClass("hidden");
|
||||
$("select[name$='ipType']").selectpicker("val","4");
|
||||
}else{
|
||||
$(".user").parents(".col-md-6").addClass("hidden");
|
||||
$(".clientIp").parents(".col-md-6").removeClass("hidden");
|
||||
$(".ipPattern").parents(".col-md-6").removeClass("hidden");
|
||||
$("select[name$='ipType']").selectpicker("val","6");
|
||||
}
|
||||
$("select[name$='ipType']").trigger("change");
|
||||
$("select[name$='ipType']").selectpicker("refresh");
|
||||
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
@@ -131,19 +169,16 @@ $(function(){
|
||||
<!-- dolog end-->
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="user"/></label>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="address_pool"/></label>
|
||||
<div class="col-md-6">
|
||||
<select name="userName" class="selectpicker show-tick form-control required" data-live-search="true" data-live-search-placeholder="search">
|
||||
<select id="addrPoolSel" name="addrPoolId" class="selectpicker show-tick form-control required" data-live-search="true" data-live-search-placeholder="search">
|
||||
<option value="" ><spring:message code="select"/></option>
|
||||
<c:forEach items="${users }" var="user">
|
||||
<option value="${user.userName}" <c:if test="${_cfg.userName eq user.userName }">selected</c:if>><spring:message code="${user.userName}"/></option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</select>
|
||||
</div>
|
||||
<div for="userName"></div>
|
||||
<div for="addrPoolId"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<c:if test="${fn:length(serviceList)>1}">
|
||||
<div class="col-md-6">
|
||||
@@ -174,18 +209,90 @@ $(function(){
|
||||
</div>
|
||||
</c:if>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="address_pool"/></label>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="user_type"/></label>
|
||||
<div class="col-md-6">
|
||||
<select id="addrPoolSel" name="addrPoolId" class="selectpicker show-tick form-control required" data-live-search="true" data-live-search-placeholder="search">
|
||||
<option value="" ><spring:message code="select"/></option>
|
||||
</select>
|
||||
<select name="userType" class="selectpicker show-tick form-control required">
|
||||
<option value=""><spring:message code="select"/></option>
|
||||
<option value="VPN" <c:if test="${_cfg.userType eq 'VPN' }">selected</c:if>><spring:message code="policy_vpn_user"/></option>
|
||||
<option value="SIPv4" <c:if test="${_cfg.userType eq 'SIPv4' }">selected</c:if>><spring:message code="policy_sipv4_user"/></option>
|
||||
<option value="SIPv6" <c:if test="${_cfg.userType eq 'SIPv6' }">selected</c:if>><spring:message code="policy_sipv6_user"/></option>
|
||||
</select>
|
||||
</div>
|
||||
<div for="addrPoolId"></div>
|
||||
<div for="userType"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 hidden">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="user"/></label>
|
||||
<div class="col-md-6">
|
||||
<select name="userName" class="selectpicker show-tick form-control required user" data-live-search="true" data-live-search-placeholder="search">
|
||||
<option value="" ><spring:message code="select"/></option>
|
||||
<c:forEach items="${users}" var="user">
|
||||
<option value="${user.userName}" <c:if test="${_cfg.userName eq user.userName }">selected</c:if>><spring:message code="${user.userName}"/></option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
<div for="userName"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 hidden">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="ip_pattern"/></label>
|
||||
<div class="col-md-6">
|
||||
<select name="ipPattern" class="selectpicker show-tick form-control required ipPattern">
|
||||
<c:forEach items="${fns:getDictList('IP_PATTERN')}" var="ipPatternC">
|
||||
<option value="${ipPatternC.itemCode}" <c:if test="${ipPatternC.itemCode == _cfg.ipPattern }">selected</c:if>>
|
||||
<spring:message code="${ipPatternC.itemValue}"/>
|
||||
</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
<div for="ipPattern"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6 hidden">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="ip_type"/></label>
|
||||
<div class="col-md-6">
|
||||
<select name="ipType" class="selectpicker show-tick form-control required">
|
||||
<c:forEach items="${fns:getDictList('IP_TYPE')}" var="ipTypeC">
|
||||
<option value="${ipTypeC.itemCode}" <c:if test="${ipTypeC.itemCode==4 }">selected</c:if> >
|
||||
<spring:message code="${ipTypeC.itemValue}"/>
|
||||
</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
<div for="ipType"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 hidden">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="ip"/></label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control required ipCheck clientIp" type="text" name="srcIpAddress" value="${_cfg.srcIpAddress }">
|
||||
</div>
|
||||
<div for="srcIpAddress"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row dest">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="server_ip"/></label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control required ipCheck" type="text" name="destIpAddress" >
|
||||
</div>
|
||||
<div for="destIpAddress"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row ipmulitiplex">
|
||||
@@ -204,6 +311,7 @@ $(function(){
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<%-- <br><%@include file="/WEB-INF/include/form/areaInfo.jsp"%> --%>
|
||||
<br>
|
||||
<%@include file="/WEB-INF/include/form/basicInfo.jsp" %>
|
||||
|
||||
@@ -13,15 +13,40 @@
|
||||
$("#intype").val("${cfg.addrPoolName}");
|
||||
}else if("${cfg.userName}"){
|
||||
$("#intype").val("${cfg.userName}");
|
||||
}else if("${cfg.srcIpAddress}"){
|
||||
$("#intype").val("${cfg.srcIpAddress}");
|
||||
}else if("${cfg.compileId}"){
|
||||
$("#intype").val("${cfg.compileId}");
|
||||
}else{
|
||||
$("#intype").attr("placeholder","<spring:message code='input'/> "+$("#seltype").find("option:selected").text());
|
||||
}
|
||||
|
||||
// 处理用户类型检索条件
|
||||
if($("#seltype").val() == "userType"){
|
||||
$("#intype").hide();// 隐藏输入框
|
||||
$("#isValid").selectpicker("hide");
|
||||
}else{
|
||||
$("#userType").selectpicker("hide");
|
||||
}
|
||||
$("#seltype").change(function(){
|
||||
if($(this).val() == "userType"){
|
||||
$("#intype").hide();// 隐藏输入框
|
||||
$("#intype").val("");// 清空input条件
|
||||
$("#userType").find("option").removeAttr("selected",false);
|
||||
$("#userType").selectpicker("refresh");
|
||||
$("#userType").selectpicker("show");
|
||||
$("#isValid").selectpicker("hide");
|
||||
}else if($(this).val() == "isValid"){
|
||||
$("#userType").find("option:first").attr("selected",true);
|
||||
$("#userType").selectpicker("hide");
|
||||
}else{
|
||||
$("#userType").find("option:first").attr("selected",true);
|
||||
$("#userType").selectpicker("hide");// 隐藏下拉框
|
||||
}
|
||||
$("#intype").attr("placeholder","<spring:message code='input'/> "+$(this).find("option:selected").text());
|
||||
});
|
||||
//筛选功能初始化
|
||||
|
||||
//筛选功能初始化
|
||||
filterActionInit();
|
||||
$("#isAudit").change(function(){
|
||||
page();
|
||||
@@ -97,8 +122,10 @@
|
||||
|
||||
<form:select path="seltype" class="selectpicker select2 input-small" >
|
||||
<form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
|
||||
<form:option value="userName"><spring:message code="user"></spring:message></form:option>
|
||||
<form:option value="compileId"><spring:message code="cfg_id"></spring:message></form:option>
|
||||
<form:option value="srcIpAddress"><spring:message code="ip"></spring:message></form:option>
|
||||
<form:option value="userName"><spring:message code="user"></spring:message></form:option>
|
||||
<form:option value="userType"><spring:message code="user_type"></spring:message></form:option>
|
||||
<form:option value="addrPoolName"><spring:message code="address_pool"></spring:message></form:option>
|
||||
<form:option value="isValid"><spring:message code="valid_identifier"></spring:message></form:option>
|
||||
</form:select>
|
||||
@@ -112,6 +139,12 @@
|
||||
<form:option value="1"><spring:message code="yes"/></form:option>
|
||||
<form:option value="0"><spring:message code="no"/></form:option>
|
||||
</form:select>
|
||||
<form:select path="userType" class="selectpicker select2 input-small" >
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<form:option value="VPN"><spring:message code="policy_vpn_user"/></form:option>
|
||||
<form:option value="SIPv4"><spring:message code="policy_sipv4_user"/></form:option>
|
||||
<form:option value="SIPv6"><spring:message code="policy_sipv6_user"/></form:option>
|
||||
</form:select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -281,7 +314,9 @@
|
||||
<th class="sort-column r.cfg_id" style="display: none"><spring:message code="cfg_id"/></th>
|
||||
<th class="sort-column r.cfg_desc cfgDesc"><spring:message code="config_describe"/></th>
|
||||
<th><spring:message code="address_pool"/></th>
|
||||
<th><spring:message code="user_type"/></th>
|
||||
<th><spring:message code="user"/></th>
|
||||
<th><spring:message code="ip"/></th>
|
||||
|
||||
<%-- <th class="sort-column a.action"><spring:message code="block_type"/></th> --%>
|
||||
<th class="sort-column r.is_valid"><spring:message code="valid_identifier"/></th>
|
||||
@@ -315,6 +350,17 @@
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td>
|
||||
<c:if test="${indexCfg.userType eq 'VPN' }">
|
||||
<spring:message code="policy_vpn_user"/>
|
||||
</c:if>
|
||||
<c:if test="${indexCfg.userType eq 'SIPv4' }">
|
||||
<spring:message code="policy_sipv4_user"/>
|
||||
</c:if>
|
||||
<c:if test="${indexCfg.userType eq 'SIPv6' }">
|
||||
<spring:message code="policy_sipv6_user"/>
|
||||
</c:if>
|
||||
</td>
|
||||
<td>
|
||||
<c:forEach items="${users }" var="user">
|
||||
<c:if test="${indexCfg.userName eq user.userName }">
|
||||
@@ -322,6 +368,7 @@
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td>${indexCfg.srcIpAddress }</td>
|
||||
|
||||
<%-- <td>
|
||||
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict">
|
||||
|
||||
@@ -37,8 +37,8 @@
|
||||
</div>
|
||||
<div class="fl_fc">
|
||||
<p>
|
||||
<label data-original-title="<spring:message code="bandwith"/>" class="tooltips" data-flag="false" data-html="true" data-placement="top">
|
||||
<!-- 网络带宽 --><spring:message code="bandwith"/>
|
||||
<label data-original-title="<spring:message code="traffic"/>" class="tooltips" data-flag="false" data-html="true" data-placement="top">
|
||||
<!-- 网络带宽 --><spring:message code="traffic"/>
|
||||
</label>
|
||||
</p>
|
||||
<a href="${ctx}/dashboard/traffic/bandwidthList"><p class="csNum">In <span class="c2sNum">0</span> | Out <span class="s2cNum">0</span> </p>
|
||||
@@ -47,7 +47,7 @@
|
||||
</div>
|
||||
<div class="fr_fc">
|
||||
<div class="fl_visual">
|
||||
<i class="fa fa-ban"></i>
|
||||
<a href="${ctx}/dashboard/traffic/trafficBlockList?searchAction=block"><i class="fa fa-ban"></i></a>
|
||||
</div>
|
||||
<div class="fl_fc">
|
||||
<p style="margin-left: 0px;width:100%">
|
||||
@@ -56,7 +56,7 @@
|
||||
<!-- 阻断链接数 --><spring:message code="action_reject"/>
|
||||
</label>
|
||||
</p>
|
||||
<p class="numberRun1">0</p>
|
||||
<a href="${ctx}/dashboard/traffic/trafficBlockList?searchAction=block"><p class="numberRun1">0</p></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -65,15 +65,13 @@
|
||||
<div class="text_2">
|
||||
<div class="fr_fc">
|
||||
<div class="fl_visual">
|
||||
<i class="fa fa-eye"> </i>
|
||||
<a href="${ctx}/dashboard/traffic/trafficBlockList?searchAction=monitor"><i class="fa fa-eye"> </i></a>
|
||||
</div>
|
||||
<!-- <i class="fa fa-bar-chart"></i> -->
|
||||
<div class="fl_fc">
|
||||
<!-- <a href="javacript:;"> -->
|
||||
<p data-original-title="<spring:message code="action_monit"/>"
|
||||
class="tooltips" data-flag="false" data-html="true" data-placement="top">
|
||||
<!-- 监测链接数 --><spring:message code="action_monit"/></p>
|
||||
<p class="numberRun2">0</p>
|
||||
<a href="${ctx}/dashboard/traffic/trafficBlockList?searchAction=monitor"><p class="numberRun2">0</p></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="fr_fc">
|
||||
@@ -232,7 +230,7 @@
|
||||
<div class="main_left1 fl">
|
||||
<div class="left_1">
|
||||
<div class="main_title1">
|
||||
<spring:message code="traffic_app_chart"/> <!-- <a href="#"><i class="fa fa-list-ul"></i></a> -->
|
||||
<spring:message code="traffic_app_chart"/> <a href="${ctx}/dashboard/traffic/appTypeList"><i class="fa fa-line-chart"></i></a>
|
||||
<a href="javascipt:void(0)" onclick="appTypeList();return false;"><i class="fa fa-refresh"></i></a>
|
||||
</div>
|
||||
<!--app应用图 --><div id="chart_3" class="" style="width:100%;height: 420px;"></div>
|
||||
|
||||
@@ -0,0 +1,110 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<title>
|
||||
<spring:message code="traffic_ip_active"></spring:message>
|
||||
</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="page-content">
|
||||
<div class="theme-panel hidden-xs hidden-sm">
|
||||
<button type="button" class="btn btn-default" onClick="javascript:window.location.reload()"><i class="fa fa-refresh"></i></button>
|
||||
<button type="button" class="btn btn-default" onClick="javascript:window.location='${ctx}/dashboard/logChart'"><i class="fa fa-history"></i></button>
|
||||
</div>
|
||||
<h3 class="page-title">
|
||||
<spring:message code="${searchAction}"></spring:message>
|
||||
</h3>
|
||||
|
||||
<div id="chart" style="width:97%;height:550px;"></div>
|
||||
|
||||
<input id="searchAction" name="searchAction" type="hidden" value="${searchAction}"/>
|
||||
|
||||
</div>
|
||||
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/highcharts.js"></script>
|
||||
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/exporting.js"></script>
|
||||
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/series-label.js"></script>
|
||||
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/offline-exporting.js"></script>
|
||||
<%-- <script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/themes/grid.js"></script> --%>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
actionTransAjax($("#searchAction").val());
|
||||
});
|
||||
// 局点信息
|
||||
function showActionTransChart(rs){
|
||||
var data=new Array();
|
||||
var xData=new Array();
|
||||
xData=rs[0].statTime;
|
||||
var series=new Array();
|
||||
$(rs).each(function(i, d) {
|
||||
var entrance="";
|
||||
if(d!=null&&d.entranceId==1){
|
||||
entrance="Astana";
|
||||
}
|
||||
if(d!=null&&d.entranceId==2){
|
||||
entrance="Alamty";
|
||||
}
|
||||
series.push({
|
||||
name: entrance,
|
||||
data: d.count
|
||||
});
|
||||
})
|
||||
var chart = Highcharts.chart('chart', {
|
||||
exporting: {
|
||||
filename:'Action-Trans',
|
||||
scale:1,
|
||||
sourceWidth: 1280,
|
||||
sourceHeight: 500,
|
||||
},
|
||||
title: {
|
||||
text: null
|
||||
},
|
||||
xAxis: {
|
||||
type:'category',
|
||||
categories: xData,
|
||||
title: {
|
||||
text: 'time',
|
||||
align:'high',
|
||||
},
|
||||
},
|
||||
yAxis: {
|
||||
title: {
|
||||
text: null
|
||||
}
|
||||
},
|
||||
credits:{//是否有highcharts水印
|
||||
enabled:false
|
||||
},
|
||||
// legend: {
|
||||
// layout: 'vertical',
|
||||
// align: 'right',
|
||||
// verticalAlign: 'middle'
|
||||
// },
|
||||
series: series,
|
||||
});
|
||||
}
|
||||
// 动作一小时,间隔五分钟统计数据
|
||||
function actionTransAjax(searchAction){
|
||||
loading();
|
||||
$.ajax({
|
||||
url: "${ctx}/dashboard/traffic/actionEntranceTrans?searchAction="+searchAction,
|
||||
type : "get" ,
|
||||
dataType:"json",
|
||||
cache:false,
|
||||
async:true,
|
||||
success:function (rs) {
|
||||
showActionTransChart(rs);
|
||||
closeTip();
|
||||
},
|
||||
error: function(data, textStatus, errorThrown){
|
||||
closeTip();
|
||||
},
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
297
src/main/webapp/WEB-INF/views/dashboard/trafficAppTypeList.jsp
Normal file
297
src/main/webapp/WEB-INF/views/dashboard/trafficAppTypeList.jsp
Normal file
@@ -0,0 +1,297 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<title>app类型</title>
|
||||
<link rel="stylesheet" href="${pageContext.request.contextPath}/static/pages/css/dashboard.css">
|
||||
<link rel="stylesheet" href="${pageContext.request.contextPath}/static/pages/css/pagination.css">
|
||||
|
||||
<script src="${pageContext.request.contextPath}/static/pages/scripts/jquery.pagination.js"></script>
|
||||
<script src="${ctxStatic }/global/plugins/tableExport-3.3.13/xlsx.core.js"></script>
|
||||
<script src="${ctxStatic }/global/plugins/tableExport-3.3.13/FileSaver.js"></script>
|
||||
<script src="${ctxStatic }/global/plugins/tableExport-3.3.13/tableexport.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page-content">
|
||||
<div class="theme-panel hidden-xs hidden-sm">
|
||||
<button type="button" class="btn btn-default" onClick="javascript:window.location='${ctx}/dashboard/traffic/appTypeList'"><i class="fa fa-refresh"></i></button>
|
||||
<button type="button" class="btn btn-default" onClick="javascript:window.location='${ctx}/dashboard/logChart'"><i class="fa fa-history"></i></button>
|
||||
</div>
|
||||
<h3 class="page-title">
|
||||
<spring:message code="App"></spring:message>
|
||||
</h3>
|
||||
<h5 class="page-header"></h5>
|
||||
<div class="row">
|
||||
<div id="chart" style="width:98%;height: 510px; -moz-user-select: none; position: relative;"></div>
|
||||
</div>
|
||||
<div class="row pull-right">
|
||||
<button type="button" class="btn btn-default" id="export-btn"><i class="fa fa-download"> <spring:message code="export"/></i></button>
|
||||
</div>
|
||||
<br>
|
||||
<br>
|
||||
<div class="row">
|
||||
<table id="contentTable" class="table table-active table-striped table-bordered table-condensed text-nowrap">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="tl"><spring:message code="app"/></th>
|
||||
<th class="tl"><spring:message code="link_num"/></th>
|
||||
<th class="tl"><spring:message code="percentage"/> (<spring:message code="link_num"/>)</th>
|
||||
<th class="tl"><spring:message code="packets"/></th>
|
||||
<th class="tl"><spring:message code="percentage"/> (<spring:message code="packets"/>)</th>
|
||||
<th class="tl"><spring:message code="Gbyte"/></th>
|
||||
<th class="tl"><spring:message code="percentage"/> (<spring:message code="Gbyte"/>)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="tableData"></tbody>
|
||||
</table>
|
||||
<div id="page"><div class="M-box" style="float: right"></div></div>
|
||||
<div class="none-data"><i class="fa fa-warning font-red-flamingo"></i> <spring:message code="noneData"/></div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/highcharts.js"></script>
|
||||
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/exporting.js"></script>
|
||||
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/series-label.js"></script>
|
||||
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/offline-exporting.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
ajaxProtocolList();
|
||||
|
||||
});
|
||||
function ajaxProtocolList(){
|
||||
loading();
|
||||
$.ajax({
|
||||
url: '${ctx}/dashboard/traffic/appList',
|
||||
type: 'get',
|
||||
dataType: "json",
|
||||
async:false,
|
||||
timeout:10000,
|
||||
success:function (data){
|
||||
if(data!=null&&data.length>0&&data[0].error!=null){
|
||||
top.$.jBox.tip("<spring:message code='request_service_failed'/>", "<spring:message code='info'/>");
|
||||
return;
|
||||
}
|
||||
fileData =data;
|
||||
getPageData(1,10);//初始化第一页的数据
|
||||
pageJuan(10);//初始化分页
|
||||
protocolTypeChart(data);// 初始化图
|
||||
closeTip();
|
||||
},
|
||||
error: function(data, textStatus, errorThrown){
|
||||
closeTip();
|
||||
},
|
||||
complete:function(XMLHttpRequest,status){//超时设置
|
||||
closeTip();
|
||||
}
|
||||
});
|
||||
}
|
||||
// 导出列表
|
||||
$("#export-btn").click(function(){
|
||||
getPageData(1,999999);// 设置导出页条数
|
||||
var te = $("#contentTable").tableExport({
|
||||
headings:true,
|
||||
footers:true,
|
||||
formats:["xlsx"],
|
||||
fileName:"App",
|
||||
bootstrap:false
|
||||
});
|
||||
$("#myexport").click();
|
||||
$("caption").remove();
|
||||
getPageData(1,10);
|
||||
});
|
||||
/**
|
||||
* 获取本页数据
|
||||
* @param currentPage 当前页数 【初次查数据,默认第1页】
|
||||
*/
|
||||
var fileData;
|
||||
function getPageData(currentPage,pageNumber){
|
||||
if (typeof (fileData) != "undefined" && fileData != null) {
|
||||
//计算每页数据起始和终止数据编号
|
||||
// var pageNumber = 10;
|
||||
var maxLength = currentPage * pageNumber - 1;
|
||||
var minLength = currentPage * pageNumber - pageNumber;
|
||||
var pageData = [];
|
||||
for (var i = minLength; i < fileData.length; i++) {
|
||||
if (maxLength < i) {
|
||||
break;
|
||||
} else {
|
||||
pageData.push(fileData[i]);
|
||||
}
|
||||
}
|
||||
htmlData(pageData);
|
||||
}else{
|
||||
//把空数据传到页面中去
|
||||
htmlData(fileData);
|
||||
}
|
||||
}
|
||||
// 处理接口数据
|
||||
function htmlData(fileDataS){
|
||||
$("#tableData").html("");
|
||||
if(fileDataS == null){
|
||||
$(".none-data").show();
|
||||
$('.M-box').hide();
|
||||
}else{
|
||||
$('.none-data').hide();
|
||||
$('.M-box').show();
|
||||
$.each(fileDataS,function (index,data){
|
||||
if(data!=null){
|
||||
var totalLink = data.totalLink;
|
||||
var totalPackets= data.totalPackets;
|
||||
var totalGByte= data.totalGByte;
|
||||
var linkper =0;
|
||||
var packper=0;
|
||||
var gbytper=0;
|
||||
if(totalLink!=null&&totalLink!=0 ){
|
||||
linkper=((data.linkNum/totalLink)*100).toFixed(2);
|
||||
}
|
||||
if(totalPackets!=null&&totalPackets!=0 ){
|
||||
packper=((data.packets/totalPackets)*100).toFixed(2);
|
||||
}
|
||||
if(totalGByte!=null&&totalGByte!=0 ){
|
||||
gbytper=((data.GByte/totalGByte)*100).toFixed(2);
|
||||
}
|
||||
var html = "<tr>";
|
||||
html+= "<td class='tc'>"+data.appName+"</td>";
|
||||
html+= "<td class='tc'>"+data.linkNum+"</td>";
|
||||
html+= "<td class='tc'>"+linkper+"%"+"</td>";
|
||||
html+= "<td class='tc'>"+data.packets+"</td>";
|
||||
html+= "<td class='tc'>"+packper+"%"+"</td>";
|
||||
html+= "<td class='tc'>"+data.GByte+"</td>";
|
||||
html+= "<td class='tc'>"+gbytper+"%"+"</td>";
|
||||
html+="</tr>"
|
||||
}
|
||||
$("#tableData").append(html);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页控件处理
|
||||
*/
|
||||
function pageJuan(showData) {
|
||||
if (typeof (fileData) != "undefined" && fileData != null) {
|
||||
var totalData = fileData.length;
|
||||
// var showData = 10;
|
||||
if(showData > totalData){
|
||||
showData = totalData;
|
||||
}
|
||||
$('.M-box').pagination({
|
||||
totalData: totalData,
|
||||
showData: showData,
|
||||
coping: true,
|
||||
callback: function (index) {
|
||||
//改变显示开始和结束数据编号
|
||||
getPageData(index.getCurrent(),showData);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
// 比例协议统计图
|
||||
function protocolTypeChart(rs){
|
||||
//终端用户 分操作系统与浏览器
|
||||
var data=new Array();
|
||||
$(rs).each(function(i, d) {
|
||||
data.push({
|
||||
name: d.appName,
|
||||
y: parseInt(d.GByte),
|
||||
});
|
||||
});
|
||||
// 创建图例
|
||||
var chart = Highcharts.chart('chart',{
|
||||
chart: {
|
||||
plotBackgroundColor:null,
|
||||
plotBorderWidth:null,
|
||||
plotShadow:false,
|
||||
type: 'pie'
|
||||
},
|
||||
navigation: {
|
||||
buttonOptions: {
|
||||
x:-25,
|
||||
}
|
||||
},
|
||||
exporting: {
|
||||
allowHTML:true,
|
||||
filename:"App",
|
||||
scale:1,
|
||||
sourceWidth: 1280,
|
||||
sourceHeight: 500,
|
||||
},
|
||||
noData:{
|
||||
style: {//设置字体颜色
|
||||
color: '#000',
|
||||
},
|
||||
},
|
||||
// legend:{// 底部平鋪图例
|
||||
// width:1280,
|
||||
// x:40,
|
||||
// itemWidth:100,
|
||||
// itemDistance:2,
|
||||
// itemHoverStyle:{
|
||||
// color:'#61D2F7',
|
||||
// },
|
||||
// },
|
||||
legend: {
|
||||
// layout: 'vertical',
|
||||
align: 'right',
|
||||
verticalAlign: 'middle',
|
||||
width:380,
|
||||
itemWidth:100,
|
||||
itemDistance:2,
|
||||
itemHoverStyle:{
|
||||
color:'#61D2F7',
|
||||
},
|
||||
},
|
||||
// colors:['#f36f8a', '#44A9A8', '#ffff43','#25f3e6','#964CEC','#32B0ED','#2b6ed7','#7278DD','#2DA9D8','#C66FE6'],
|
||||
title: {
|
||||
text: null,
|
||||
},
|
||||
plotOptions: {
|
||||
series: {
|
||||
dataLabels: {
|
||||
enabled: true,
|
||||
softConnector: true, // 是否使用曲线
|
||||
formatter: function () {
|
||||
// 通过函数判断是否显示数据标签,为了防止数据标签过于密集
|
||||
return this.percentage > 1 ? '<b>' + this.point.name + ' :</b> ' +this.percentage.toFixed(1)+' %' : null;
|
||||
},
|
||||
style: {
|
||||
color: (Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black'
|
||||
}
|
||||
},
|
||||
},
|
||||
pie:{
|
||||
allowPointSelect: true,
|
||||
showInLegend: true,
|
||||
point: {
|
||||
events: {
|
||||
mouseOver: function(e) {
|
||||
this.slice();
|
||||
},
|
||||
// 鼠标移出时,收回突出显示
|
||||
mouseOut: function() {
|
||||
this.slice();
|
||||
},
|
||||
// 默认是点击突出,这里屏蔽掉
|
||||
click: function() {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
},
|
||||
credits:{//是否有highcharts水印
|
||||
enabled:false
|
||||
},
|
||||
tooltip: {
|
||||
headerFormat: '{series.name}<br>',
|
||||
pointFormat: '{point.name}: <b>{point.percentage:.1f}%</b>'
|
||||
},
|
||||
series: [{
|
||||
name: "App",
|
||||
colorByPoint: true,
|
||||
data: data
|
||||
}],
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -17,7 +17,7 @@
|
||||
<button type="button" class="btn btn-default" onClick="javascript:window.location='${ctx}/dashboard/logChart'"><i class="fa fa-history"></i></button>
|
||||
</div>
|
||||
<h3 class="page-title">
|
||||
<spring:message code="bandwith"></spring:message>
|
||||
<spring:message code="traffic"></spring:message>
|
||||
</h3>
|
||||
<h5 class="page-header"></h5>
|
||||
|
||||
@@ -115,7 +115,6 @@ function rankItemChanged(addrType,transType){
|
||||
},
|
||||
error: function(data, textStatus, errorThrown){
|
||||
closeTip();
|
||||
// warning_prompt("获取实时列表数据失败!",1500);
|
||||
},
|
||||
complete:function(XMLHttpRequest,status){//超时设置
|
||||
closeTip();
|
||||
|
||||
355
src/main/webapp/WEB-INF/views/log/ntc/irDnatLogList.jsp
Normal file
355
src/main/webapp/WEB-INF/views/log/ntc/irDnatLogList.jsp
Normal file
@@ -0,0 +1,355 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<title>
|
||||
IP<spring:message code="log"></spring:message>
|
||||
</title>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
//reset
|
||||
$("#resetBtn").on("click",function(){
|
||||
$("select.selectpicker").each(function(){
|
||||
$(this).selectpicker('val',$(this).find('option:first').val());
|
||||
$(this).find("option").attr("selected",false);
|
||||
$(this).find("option:first").attr("selected",true);
|
||||
});
|
||||
$(".Wdate").attr("value",'');
|
||||
$(':input','#searchForm')
|
||||
.not(':button,:submit,:reset,:hidden')
|
||||
.attr("value",'');
|
||||
$("#searchForm")[0].reset();
|
||||
});
|
||||
//筛选功能
|
||||
filterActionInit();
|
||||
|
||||
//异步获取voip相关信息
|
||||
$("span[id^=open]").click(function(){
|
||||
var openId=$(this).attr("id");
|
||||
var closeId=$(this).attr("id").replace("open","close");
|
||||
var index=$(this).attr("id").replace("open","");
|
||||
$("#"+openId).hide();
|
||||
$("#"+closeId).show();
|
||||
var compileId=$(this).attr("compileId");
|
||||
// var cfgId=$(this).attr("cfgId");
|
||||
if($("#"+openId).parent().parent().next("tr").hasClass("child")){
|
||||
$("#"+openId).parent().parent().next("tr").show();
|
||||
}else{
|
||||
$.ajax({
|
||||
type:'post',
|
||||
async:false,
|
||||
url:'${ctx}/ntc/iplist/ajaxSubList',
|
||||
data:{"compileId":compileId,"index":index},
|
||||
dataType:"html",
|
||||
success:function(data){
|
||||
var subTab="<tr class='child'>"+
|
||||
"<td colspan='"+($(".table tr").eq(0).children("th").length-1)+"'>";
|
||||
var html="";
|
||||
html+="<div class='row'>";
|
||||
html = html+data;
|
||||
subTab=subTab+html;
|
||||
subTab+="</td>";
|
||||
subTab+="</tr>";
|
||||
$("#"+openId).parent().parent().after(subTab);
|
||||
$("div[name='tabTitle"+index+"']").get(0).click();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
$("span[id^=close]").on("click",function(){
|
||||
var closeId=$(this).attr("id");
|
||||
var openId=$(this).attr("id").replace("close","open");
|
||||
$("#"+closeId).hide();
|
||||
$("#"+openId).show();
|
||||
$("#"+closeId).parent().parent().next("tr").hide();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="page-content">
|
||||
<div class="theme-panel hidden-xs hidden-sm">
|
||||
</div>
|
||||
<h3 class="page-title">
|
||||
<spring:message code="dnat_multiplex"/>
|
||||
</h3>
|
||||
<h5 class="page-header"></h5>
|
||||
<div class="col-md-12">
|
||||
<div class="portlet">
|
||||
<div class="portlet-body">
|
||||
<div class="row" >
|
||||
<form:form id="searchForm" modelAttribute="log" action="${ctx}/log/ntc/irDnatLogs/list" method="post" class="form-search">
|
||||
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
|
||||
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
|
||||
<input id="functionId" name="functionId" type="hidden" value="${log.functionId}"/>
|
||||
<input id="isLogTotalSearch" name="isLogTotalSearch" type="hidden" value="${log.isLogTotalSearch}"/>
|
||||
<!-- 筛选按钮展开状态-->
|
||||
<input id="isFilterAction" name="isFilterAction" type="hidden" value="${log.isFilterAction }"/>
|
||||
<sys:tableSort id="orderBy" name="orderBy" value="${page.orderBy}" callback="page();" />
|
||||
<!-- 搜索内容与操作按钮栏 -->
|
||||
<div class="col-md-12">
|
||||
<div class="pull-left">
|
||||
<form:select path="service" class="selectpicker select2 input-small">
|
||||
<form:option value=""><spring:message code="action"/></form:option>
|
||||
<c:forEach items="${serviceList}" var="service"
|
||||
varStatus="satus">
|
||||
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict">
|
||||
<c:if test="${(dict.itemCode eq service.action) && (service.action ne 128) && (service.action ne 32) && (service.action ne 96) && (service.serviceId ne 37)&& (service.serviceId ne 149) }">
|
||||
<form:option value="${service.serviceId}"><spring:message code="${dict.itemValue}"/></form:option>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
<div class="input-group">
|
||||
<div class="input-group-btn">
|
||||
<span class="selectpicker form-control" ><spring:message code="begin_date"/></span>
|
||||
</div>
|
||||
<input name="searchFoundStartTime" type="text" readonly="readonly" maxlength="20" class="form-control Wdate input-medium"
|
||||
value="${log.searchFoundStartTime}" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
<div class="input-group">
|
||||
<div class="input-group-btn">
|
||||
<span class="selectpicker form-control" ><spring:message code="end_date"/></span>
|
||||
</div>
|
||||
<input name="searchFoundEndTime" type="text" readonly="readonly" maxlength="20" class="form-control Wdate input-medium"
|
||||
value="${log.searchFoundEndTime}" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
<button type="button" class="btn blue" onClick="return page()"> <i class="fa fa-search"></i> <spring:message code="search"/> </button>
|
||||
<button type="button" class="btn btn-default" id="resetBtn"> <i class="fa fa-refresh"></i> <spring:message code="reset"/> </button>
|
||||
<button type="button" class="btn btn-default" id="filter-btn"> <spring:message code="filter"/><i class="fa fa-angle-double-down"></i></button>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<a class="btn btn-icon-only btn-default setfields tooltips"
|
||||
data-container="body" data-placement="top" data-original-title=<spring:message code="custom_columns"/> href="javascript:;">
|
||||
<i class="icon-wrench"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 搜索内容与操作按钮栏 -->
|
||||
|
||||
<!-- 筛选搜索内容栏默认隐藏-->
|
||||
<div class="col-md-12 filter-action-select-panle hide" >
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label class="control-label"><spring:message code='transport_layer_protocol'/>:</label>
|
||||
<form:select path="transProto" class="selectpicker form-control">
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<c:forEach items="${fns:getDictList('LOG_PROTOCOL')}" var="protocol" >
|
||||
<form:option value="${protocol.itemCode}"><spring:message code="${protocol.itemValue}"></spring:message></form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label class="control-label"><spring:message code="direction"/>:</label>
|
||||
<form:select path="direction" class="selectpicker form-control">
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<c:forEach items="${fns:getDictList('LOG_DIRECTION')}" var="direction" >
|
||||
<form:option value="${direction.itemCode}"><spring:message code="${direction.itemValue}"></spring:message></form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label><spring:message code="entrance"/>:</label>
|
||||
<form:select path="entranceId" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<c:forEach items="${fns:getDictList('ENTRANCE')}" var="entrance" >
|
||||
<form:option value="${entrance.itemCode}"><spring:message code="${entrance.itemValue}"></spring:message></form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label><spring:message code="clj_ip"></spring:message>:</label>
|
||||
<input name="capIp" type="text" class="form-control" value="${log.capIp }"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label><spring:message code="clientip"></spring:message>:</label>
|
||||
<input name="sIp" type="text" class="form-control" value="${log.sIp }"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label><spring:message code="serverip"></spring:message>:</label>
|
||||
<input name="dIp" type="text" class="form-control" value="${log.dIp }"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<label><spring:message code="cfg_id"></spring:message>:</label>
|
||||
<input name="cfgId" type="text" class="form-control logCfgId number" value="${log.cfgId }"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /筛选搜索内容栏 结束-->
|
||||
</form:form>
|
||||
</div>
|
||||
<sys:message content="${message}"/>
|
||||
<div class="table-responsive">
|
||||
|
||||
<table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap logTb">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><spring:message code="log"/></th>
|
||||
<th class="sort-column cfg_id " isVisible="false" ><spring:message code="cfg_id"/></th>
|
||||
<th class="sort-column service" isVisible="false"><spring:message code="action"/></th>
|
||||
<th class="sort-column found_time"><spring:message code="found_time"/></th>
|
||||
<th class="sort-column recv_time" isVisible="false"><spring:message code="recv_time"/></th>
|
||||
<th class="sort-column entrance_id" isVisible="false"><spring:message code="entrance_id"/></th>
|
||||
|
||||
<th class="sort-column user_id"><spring:message code="user"/></th>
|
||||
<th class="sort-column nat_ip"><spring:message code="nat_ip"/></th>
|
||||
<th class="sort-column creat_time"><spring:message code="creat_time"/></th>
|
||||
<th class="sort-column close_time"><spring:message code='close_time'/></th>
|
||||
<th class="sort-column c2s_pkt_num"><spring:message code="c2s_pkt_num"/></th>
|
||||
<th class="sort-column s2c_pkt_num"><spring:message code="s2c_pkt_num"/></th>
|
||||
<th class="sort-column c2s_byte_num"><spring:message code="c2s_byte_num"/></th>
|
||||
<th class="sort-column s2c_byte_num"><spring:message code="s2c_byte_num"/></th>
|
||||
|
||||
|
||||
<th class="sort-column cap_ip" isVisible="false"><spring:message code="clj_ip"/></th>
|
||||
<th class="sort-column trans_proto"><spring:message code="protocol_type"/></th>
|
||||
<th class="sort-column addr_type"><spring:message code='addr_type'/></th>
|
||||
<th class="sort-column d_ip"><spring:message code="server_ip"/></th>
|
||||
<th class="sort-column s_ip"><spring:message code="client_ip"/></th>
|
||||
<th class="sort-column d_port"><spring:message code="server_port"/></th>
|
||||
<th class="sort-column s_port"><spring:message code="client_port"/></th>
|
||||
<th class="sort-column device_id" isVisible="false"><spring:message code="deviceid"/></th>
|
||||
<th class="sort-column link_id" isVisible="false"><spring:message code="link_id"/></th>
|
||||
<th class="sort-column encap_type"><spring:message code="encap_type"/></th>
|
||||
<th class="sort-column direction"><spring:message code="direction"/></th>
|
||||
<th class="sort-column inner_smac"><spring:message code="inner_smac"/></th>
|
||||
<th class="sort-column inner_dmac"><spring:message code="inner_dmac"/></th>
|
||||
<th class="sort-column stream_dir"><spring:message code="stream_type"/></th>
|
||||
|
||||
<th class="sort-column addr_list"><spring:message code="nest_addr_list"/></th>
|
||||
<th class="sort-column server_locate"><spring:message code='server_locate'/></th>
|
||||
<th class="sort-column client_locate"><spring:message code='client_locate'/></th>
|
||||
<th class="sort-column s_asn" isVisible="false"><spring:message code='s_asn'/></th>
|
||||
<th class="sort-column d_asn" isVisible="false"><spring:message code='d_asn'/></th>
|
||||
<th class="sort-column s_subscribe_id" isVisible="false"><spring:message code='s_subscribe_id'/></th>
|
||||
<th class="sort-column d_subscribe_id" isVisible="false"><spring:message code='d_subscribe_id'/></th>
|
||||
<th class="sort-column user_region" isVisible="false"><spring:message code='user_region'/></th>
|
||||
<th class="sort-column scene_file"><spring:message code='scene_file'/></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:forEach var="log" items="${page.list }" varStatus="status">
|
||||
<tr>
|
||||
<td>
|
||||
<%-- <span id="open${status.index}" class="log-open-cfg" compileId="${log.cfgId }"> ▷ </span><span style="display: none" id="close${status.index}" > ▼ </span> --%>
|
||||
<a href="javascript:void(0)" name="viewLogInfo"><i class="icon-book-open"></i></a>
|
||||
</td>
|
||||
<td>${log.cfgId }</td>
|
||||
<td>
|
||||
<c:forEach items="${fns:getDictList('SERVICE_ACTION')}" var="dict">
|
||||
<c:if test="${dict.itemCode eq log.action}">
|
||||
<spring:message code="${dict.itemValue}"/>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td>${log.foundTime }</td>
|
||||
<td>${log.recvTime }</td>
|
||||
<td>
|
||||
<c:forEach items="${fns:getDictList('ENTRANCE')}" var="dic">
|
||||
<c:if test="${dic.itemCode eq log.entranceId}">
|
||||
<spring:message code="${dic.itemValue}"/>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
|
||||
<td>${log.natIp }</td>
|
||||
<td>${log.creatTime }</td>
|
||||
<td>${log.closeTime }</td>
|
||||
<td>${log.c2sPktNum }</td>
|
||||
<td>${log.s2cPktNum }</td>
|
||||
<td>${log.c2sByteNum }</td>
|
||||
<td>${log.s2cByteNum }</td>
|
||||
|
||||
<td title="${log.capIp }">${fns:abbr(log.capIp, 42)}</td>
|
||||
<td>
|
||||
<c:forEach items="${fns:getDictList('LOG_PROTOCOL')}" var="dic">
|
||||
<c:if test="${dic.itemCode eq log.transProto}">
|
||||
<spring:message code="${dic.itemValue}"/>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td>
|
||||
<c:forEach items="${fns:getDictList('IP_TYPE')}" var="dic">
|
||||
<c:if test="${log.addrType==dic.itemCode}"><spring:message code="${dic.itemValue }"/></c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td title="${log.dIp }">${fns:abbr(log.dIp, 42)}</td>
|
||||
<td title="${log.sIp }">${fns:abbr(log.sIp, 42)}</td>
|
||||
<td>${log.dPort }</td>
|
||||
<td>${log.sPort }</td>
|
||||
<td>
|
||||
<c:forEach items="${fns:getDictList('DEVICE')}" var="device">
|
||||
<c:if test="${device.itemCode eq log.deviceId}"><spring:message code="${device.itemValue}"/></c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td>
|
||||
<c:forEach items="${fns:getDictList('LINK')}" var="link">
|
||||
<c:if test="${link.itemCode eq log.linkId}"><spring:message code="${link.itemValue}"/></c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td>
|
||||
<c:forEach items="${fns:getDictList('ENCAP_TYPE')}" var="encapType">
|
||||
<c:if test="${encapType.itemCode eq log.encapType}"><spring:message code="${encapType.itemValue}"/></c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td>
|
||||
<c:forEach items="${fns:getDictList('LOG_DIRECTION')}" var="direction">
|
||||
<c:if test="${direction.itemCode eq log.direction}"><spring:message code="${direction.itemValue}"/></c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td>${log.innerSmac }</td>
|
||||
<td>${log.innerDmac }</td>
|
||||
<td>
|
||||
<c:forEach items="${fns:getDictList('LOG_STREAM_TYPE')}" var="streamType">
|
||||
<c:if test="${streamType.itemCode eq log.streamDir}">${streamType.itemValue}</c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td>${log.addrList }</td>
|
||||
<td>${log.serverLocate}</td>
|
||||
<td>${log.clientLocate}</td>
|
||||
<td>${log.sAsn}</td>
|
||||
<td>${log.dAsn}</td>
|
||||
<td>${log.sSubscribeId}</td>
|
||||
<td>${log.dSubscribeId}</td>
|
||||
<td>${log.userRegion}</td>
|
||||
<td>${log.sceneFile}</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="page">${page}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
354
src/main/webapp/WEB-INF/views/log/ntc/irSnatLogList.jsp
Normal file
354
src/main/webapp/WEB-INF/views/log/ntc/irSnatLogList.jsp
Normal file
@@ -0,0 +1,354 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<title>
|
||||
IP<spring:message code="log"></spring:message>
|
||||
</title>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
//reset
|
||||
$("#resetBtn").on("click",function(){
|
||||
$("select.selectpicker").each(function(){
|
||||
$(this).selectpicker('val',$(this).find('option:first').val());
|
||||
$(this).find("option").attr("selected",false);
|
||||
$(this).find("option:first").attr("selected",true);
|
||||
});
|
||||
$(".Wdate").attr("value",'');
|
||||
$(':input','#searchForm')
|
||||
.not(':button,:submit,:reset,:hidden')
|
||||
.attr("value",'');
|
||||
$("#searchForm")[0].reset();
|
||||
});
|
||||
//筛选功能
|
||||
filterActionInit();
|
||||
|
||||
//异步获取voip相关信息
|
||||
$("span[id^=open]").click(function(){
|
||||
var openId=$(this).attr("id");
|
||||
var closeId=$(this).attr("id").replace("open","close");
|
||||
var index=$(this).attr("id").replace("open","");
|
||||
$("#"+openId).hide();
|
||||
$("#"+closeId).show();
|
||||
var compileId=$(this).attr("compileId");
|
||||
// var cfgId=$(this).attr("cfgId");
|
||||
if($("#"+openId).parent().parent().next("tr").hasClass("child")){
|
||||
$("#"+openId).parent().parent().next("tr").show();
|
||||
}else{
|
||||
$.ajax({
|
||||
type:'post',
|
||||
async:false,
|
||||
url:'${ctx}/ntc/iplist/ajaxSubList',
|
||||
data:{"compileId":compileId,"index":index},
|
||||
dataType:"html",
|
||||
success:function(data){
|
||||
var subTab="<tr class='child'>"+
|
||||
"<td colspan='"+($(".table tr").eq(0).children("th").length-1)+"'>";
|
||||
var html="";
|
||||
html+="<div class='row'>";
|
||||
html = html+data;
|
||||
subTab=subTab+html;
|
||||
subTab+="</td>";
|
||||
subTab+="</tr>";
|
||||
$("#"+openId).parent().parent().after(subTab);
|
||||
$("div[name='tabTitle"+index+"']").get(0).click();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
$("span[id^=close]").on("click",function(){
|
||||
var closeId=$(this).attr("id");
|
||||
var openId=$(this).attr("id").replace("close","open");
|
||||
$("#"+closeId).hide();
|
||||
$("#"+openId).show();
|
||||
$("#"+closeId).parent().parent().next("tr").hide();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="page-content">
|
||||
<div class="theme-panel hidden-xs hidden-sm">
|
||||
</div>
|
||||
<h3 class="page-title">
|
||||
<spring:message code="snat_multiplex"/>
|
||||
</h3>
|
||||
<h5 class="page-header"></h5>
|
||||
<div class="col-md-12">
|
||||
<div class="portlet">
|
||||
<div class="portlet-body">
|
||||
<div class="row" >
|
||||
<form:form id="searchForm" modelAttribute="log" action="${ctx}/log/ntc/irSnatLogs/list" method="post" class="form-search">
|
||||
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
|
||||
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
|
||||
<input id="functionId" name="functionId" type="hidden" value="${log.functionId}"/>
|
||||
<input id="isLogTotalSearch" name="isLogTotalSearch" type="hidden" value="${log.isLogTotalSearch}"/>
|
||||
<!-- 筛选按钮展开状态-->
|
||||
<input id="isFilterAction" name="isFilterAction" type="hidden" value="${log.isFilterAction }"/>
|
||||
<sys:tableSort id="orderBy" name="orderBy" value="${page.orderBy}" callback="page();" />
|
||||
<!-- 搜索内容与操作按钮栏 -->
|
||||
<div class="col-md-12">
|
||||
<div class="pull-left">
|
||||
<form:select path="service" class="selectpicker select2 input-small">
|
||||
<form:option value=""><spring:message code="action"/></form:option>
|
||||
<c:forEach items="${serviceList}" var="service"
|
||||
varStatus="satus">
|
||||
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict">
|
||||
<c:if test="${(dict.itemCode eq service.action) && (service.action ne 128) && (service.action ne 32) && (service.action ne 96) && (service.serviceId ne 37)&& (service.serviceId ne 149) }">
|
||||
<form:option value="${service.serviceId}"><spring:message code="${dict.itemValue}"/></form:option>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
<div class="input-group">
|
||||
<div class="input-group-btn">
|
||||
<span class="selectpicker form-control" ><spring:message code="begin_date"/></span>
|
||||
</div>
|
||||
<input name="searchFoundStartTime" type="text" readonly="readonly" maxlength="20" class="form-control Wdate input-medium"
|
||||
value="${log.searchFoundStartTime}" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
<div class="input-group">
|
||||
<div class="input-group-btn">
|
||||
<span class="selectpicker form-control" ><spring:message code="end_date"/></span>
|
||||
</div>
|
||||
<input name="searchFoundEndTime" type="text" readonly="readonly" maxlength="20" class="form-control Wdate input-medium"
|
||||
value="${log.searchFoundEndTime}" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
<button type="button" class="btn blue" onClick="return page()"> <i class="fa fa-search"></i> <spring:message code="search"/> </button>
|
||||
<button type="button" class="btn btn-default" id="resetBtn"> <i class="fa fa-refresh"></i> <spring:message code="reset"/> </button>
|
||||
<button type="button" class="btn btn-default" id="filter-btn"> <spring:message code="filter"/><i class="fa fa-angle-double-down"></i></button>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<a class="btn btn-icon-only btn-default setfields tooltips"
|
||||
data-container="body" data-placement="top" data-original-title=<spring:message code="custom_columns"/> href="javascript:;">
|
||||
<i class="icon-wrench"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 搜索内容与操作按钮栏 -->
|
||||
|
||||
<!-- 筛选搜索内容栏默认隐藏-->
|
||||
<div class="col-md-12 filter-action-select-panle hide" >
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label class="control-label"><spring:message code='transport_layer_protocol'/>:</label>
|
||||
<form:select path="transProto" class="selectpicker form-control">
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<c:forEach items="${fns:getDictList('LOG_PROTOCOL')}" var="protocol" >
|
||||
<form:option value="${protocol.itemCode}"><spring:message code="${protocol.itemValue}"></spring:message></form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label class="control-label"><spring:message code="direction"/>:</label>
|
||||
<form:select path="direction" class="selectpicker form-control">
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<c:forEach items="${fns:getDictList('LOG_DIRECTION')}" var="direction" >
|
||||
<form:option value="${direction.itemCode}"><spring:message code="${direction.itemValue}"></spring:message></form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label><spring:message code="entrance"/>:</label>
|
||||
<form:select path="entranceId" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<c:forEach items="${fns:getDictList('ENTRANCE')}" var="entrance" >
|
||||
<form:option value="${entrance.itemCode}"><spring:message code="${entrance.itemValue}"></spring:message></form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label><spring:message code="clj_ip"></spring:message>:</label>
|
||||
<input name="capIp" type="text" class="form-control" value="${log.capIp }"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label><spring:message code="clientip"></spring:message>:</label>
|
||||
<input name="sIp" type="text" class="form-control" value="${log.sIp }"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label><spring:message code="serverip"></spring:message>:</label>
|
||||
<input name="dIp" type="text" class="form-control" value="${log.dIp }"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<label><spring:message code="cfg_id"></spring:message>:</label>
|
||||
<input name="cfgId" type="text" class="form-control logCfgId number" value="${log.cfgId }"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /筛选搜索内容栏 结束-->
|
||||
</form:form>
|
||||
</div>
|
||||
<sys:message content="${message}"/>
|
||||
<div class="table-responsive">
|
||||
|
||||
<table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap logTb">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><spring:message code="log"/></th>
|
||||
<th class="sort-column cfg_id " isVisible="false" ><spring:message code="cfg_id"/></th>
|
||||
<th class="sort-column service" isVisible="false"><spring:message code="action"/></th>
|
||||
<th class="sort-column found_time"><spring:message code="found_time"/></th>
|
||||
<th class="sort-column recv_time" isVisible="false"><spring:message code="recv_time"/></th>
|
||||
<th class="sort-column entrance_id" isVisible="false"><spring:message code="entrance_id"/></th>
|
||||
|
||||
<th class="sort-column nat_ip"><spring:message code="nat_ip"/></th>
|
||||
<th class="sort-column creat_time"><spring:message code="creat_time"/></th>
|
||||
<th class="sort-column close_time"><spring:message code='close_time'/></th>
|
||||
<th class="sort-column c2s_pkt_num"><spring:message code="c2s_pkt_num"/></th>
|
||||
<th class="sort-column s2c_pkt_num"><spring:message code="s2c_pkt_num"/></th>
|
||||
<th class="sort-column c2s_byte_num"><spring:message code="c2s_byte_num"/></th>
|
||||
<th class="sort-column s2c_byte_num"><spring:message code="s2c_byte_num"/></th>
|
||||
|
||||
|
||||
<th class="sort-column cap_ip" isVisible="false"><spring:message code="clj_ip"/></th>
|
||||
<th class="sort-column trans_proto"><spring:message code="protocol_type"/></th>
|
||||
<th class="sort-column addr_type"><spring:message code='addr_type'/></th>
|
||||
<th class="sort-column d_ip"><spring:message code="server_ip"/></th>
|
||||
<th class="sort-column s_ip"><spring:message code="client_ip"/></th>
|
||||
<th class="sort-column d_port"><spring:message code="server_port"/></th>
|
||||
<th class="sort-column s_port"><spring:message code="client_port"/></th>
|
||||
<th class="sort-column device_id" isVisible="false"><spring:message code="deviceid"/></th>
|
||||
<th class="sort-column link_id" isVisible="false"><spring:message code="link_id"/></th>
|
||||
<th class="sort-column encap_type"><spring:message code="encap_type"/></th>
|
||||
<th class="sort-column direction"><spring:message code="direction"/></th>
|
||||
<th class="sort-column inner_smac"><spring:message code="inner_smac"/></th>
|
||||
<th class="sort-column inner_dmac"><spring:message code="inner_dmac"/></th>
|
||||
<th class="sort-column stream_dir"><spring:message code="stream_type"/></th>
|
||||
|
||||
<th class="sort-column addr_list"><spring:message code="nest_addr_list"/></th>
|
||||
<th class="sort-column server_locate"><spring:message code='server_locate'/></th>
|
||||
<th class="sort-column client_locate"><spring:message code='client_locate'/></th>
|
||||
<th class="sort-column s_asn" isVisible="false"><spring:message code='s_asn'/></th>
|
||||
<th class="sort-column d_asn" isVisible="false"><spring:message code='d_asn'/></th>
|
||||
<th class="sort-column s_subscribe_id" isVisible="false"><spring:message code='s_subscribe_id'/></th>
|
||||
<th class="sort-column d_subscribe_id" isVisible="false"><spring:message code='d_subscribe_id'/></th>
|
||||
<th class="sort-column user_region" isVisible="false"><spring:message code='user_region'/></th>
|
||||
<th class="sort-column scene_file"><spring:message code='scene_file'/></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:forEach var="log" items="${page.list }" varStatus="status">
|
||||
<tr>
|
||||
<td>
|
||||
<%-- <span id="open${status.index}" class="log-open-cfg" compileId="${log.cfgId }"> ▷ </span><span style="display: none" id="close${status.index}" > ▼ </span> --%>
|
||||
<a href="javascript:void(0)" name="viewLogInfo"><i class="icon-book-open"></i></a>
|
||||
</td>
|
||||
<td>${log.cfgId }</td>
|
||||
<td>
|
||||
<c:forEach items="${fns:getDictList('SERVICE_ACTION')}" var="dict">
|
||||
<c:if test="${dict.itemCode eq log.action}">
|
||||
<spring:message code="${dict.itemValue}"/>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td>${log.foundTime }</td>
|
||||
<td>${log.recvTime }</td>
|
||||
<td>
|
||||
<c:forEach items="${fns:getDictList('ENTRANCE')}" var="dic">
|
||||
<c:if test="${dic.itemCode eq log.entranceId}">
|
||||
<spring:message code="${dic.itemValue}"/>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
|
||||
<td>${log.natIp }</td>
|
||||
<td>${log.creatTime }</td>
|
||||
<td>${log.closeTime }</td>
|
||||
<td>${log.c2sPktNum }</td>
|
||||
<td>${log.s2cPktNum }</td>
|
||||
<td>${log.c2sByteNum }</td>
|
||||
<td>${log.s2cByteNum }</td>
|
||||
|
||||
<td title="${log.capIp }">${fns:abbr(log.capIp, 42)}</td>
|
||||
<td>
|
||||
<c:forEach items="${fns:getDictList('LOG_PROTOCOL')}" var="dic">
|
||||
<c:if test="${dic.itemCode eq log.transProto}">
|
||||
<spring:message code="${dic.itemValue}"/>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td>
|
||||
<c:forEach items="${fns:getDictList('IP_TYPE')}" var="dic">
|
||||
<c:if test="${log.addrType==dic.itemCode}"><spring:message code="${dic.itemValue }"/></c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td title="${log.dIp }">${fns:abbr(log.dIp, 42)}</td>
|
||||
<td title="${log.sIp }">${fns:abbr(log.sIp, 42)}</td>
|
||||
<td>${log.dPort }</td>
|
||||
<td>${log.sPort }</td>
|
||||
<td>
|
||||
<c:forEach items="${fns:getDictList('DEVICE')}" var="device">
|
||||
<c:if test="${device.itemCode eq log.deviceId}"><spring:message code="${device.itemValue}"/></c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td>
|
||||
<c:forEach items="${fns:getDictList('LINK')}" var="link">
|
||||
<c:if test="${link.itemCode eq log.linkId}"><spring:message code="${link.itemValue}"/></c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td>
|
||||
<c:forEach items="${fns:getDictList('ENCAP_TYPE')}" var="encapType">
|
||||
<c:if test="${encapType.itemCode eq log.encapType}"><spring:message code="${encapType.itemValue}"/></c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td>
|
||||
<c:forEach items="${fns:getDictList('LOG_DIRECTION')}" var="direction">
|
||||
<c:if test="${direction.itemCode eq log.direction}"><spring:message code="${direction.itemValue}"/></c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td>${log.innerSmac }</td>
|
||||
<td>${log.innerDmac }</td>
|
||||
<td>
|
||||
<c:forEach items="${fns:getDictList('LOG_STREAM_TYPE')}" var="streamType">
|
||||
<c:if test="${streamType.itemCode eq log.streamDir}">${streamType.itemValue}</c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td>${log.addrList }</td>
|
||||
<td>${log.serverLocate}</td>
|
||||
<td>${log.clientLocate}</td>
|
||||
<td>${log.sAsn}</td>
|
||||
<td>${log.dAsn}</td>
|
||||
<td>${log.sSubscribeId}</td>
|
||||
<td>${log.dSubscribeId}</td>
|
||||
<td>${log.userRegion}</td>
|
||||
<td>${log.sceneFile}</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="page">${page}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -290,7 +290,7 @@ function customColumnClick(){
|
||||
} */
|
||||
for (var i = 1; i < rows.length; i++) {
|
||||
for (var j = s; j <rows[i].cells.length ; j++) {
|
||||
if(list[j]!=null){
|
||||
if(list[j-s]!=null){
|
||||
list[j-s]=parseInt(rows[i].cells[j].innerHTML)+parseInt(list[j-s]);
|
||||
}else{
|
||||
list[j-s]=parseInt(rows[i].cells[j].innerHTML);
|
||||
|
||||
@@ -127,7 +127,7 @@ p{
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
margin: -3px;
|
||||
margin: -2px;
|
||||
margin-left: -20px;
|
||||
}
|
||||
.data_content .data_info>div.info_1 p:nth-child(2){
|
||||
@@ -186,6 +186,14 @@ p{
|
||||
margin-top: 1px;
|
||||
margin-left: 0px;
|
||||
}
|
||||
.data_content .data_info>div.info_1 .fl_fc .numberRun1{
|
||||
width:100%;
|
||||
font-weight: 600;
|
||||
font-size: 16px;
|
||||
color:#288dce;
|
||||
margin-top: 33px;
|
||||
margin-left: 0px;
|
||||
}
|
||||
.data_content .data_info>div.info_1 .fl_fc .numberRun4-unit{
|
||||
font-weight: 500;
|
||||
font-size: 16px;
|
||||
|
||||
@@ -4,13 +4,17 @@
|
||||
function echart_1(rs) {
|
||||
var data=new Array();
|
||||
var drillData=new Array();
|
||||
var unit="bytes";
|
||||
$(rs).each(function(i, d) {
|
||||
var inoctetsNum=d.count;
|
||||
unit=changeUnit(inoctetsNum);
|
||||
inoctetsNum=changeNum(inoctetsNum);
|
||||
var pktNum=new Array();
|
||||
var byteLen=new Array();
|
||||
//协议图-操作系统
|
||||
data.push({
|
||||
name: d.protoType,
|
||||
y: parseInt(d.count),
|
||||
y: parseFloat(inoctetsNum),
|
||||
// drilldown: d.protoType,
|
||||
});
|
||||
|
||||
@@ -69,12 +73,14 @@
|
||||
title: {
|
||||
text: null
|
||||
},
|
||||
tool: {
|
||||
/*tool: {
|
||||
enabled: true,
|
||||
headerFormat: '<span style="font-size:10px">{point.key}: <b>{point.percentage:.1f}%</span><br>',
|
||||
pointFormat: '{series.name}: {point.y}<b>',
|
||||
shared: true,
|
||||
useHTML: true
|
||||
// headerFormat: '<span style="font-size:10px">{point.key}- <b>{point.percentage:.1f}%</span>'+unit,
|
||||
pointFormat: '{series.name} {point.y}<b>'+unit,
|
||||
},*/
|
||||
tooltip: {
|
||||
headerFormat: '{series.name}<br>',
|
||||
pointFormat: '{point.name} <br>{point.y}</b> '+unit
|
||||
},
|
||||
credits:{//是否有highcharts水印
|
||||
enabled:false
|
||||
@@ -152,7 +158,7 @@
|
||||
series: [{
|
||||
type: 'pie',
|
||||
innerSize: '70%',//圆环的大小
|
||||
name: 'bytes',
|
||||
name: ' ',
|
||||
data: data
|
||||
}],
|
||||
// drilldown:{
|
||||
@@ -188,21 +194,25 @@
|
||||
var data=new Array();
|
||||
var xData=new Array();
|
||||
var drillData=new Array();
|
||||
var unit="bytes";
|
||||
$(rs).each(function(i, d) {
|
||||
var pktNum=new Array();
|
||||
var byteLen=new Array();
|
||||
var inoctetsNum=d.linkNum;
|
||||
unit=changeUnit(inoctetsNum);
|
||||
inoctetsNum=changeNum(inoctetsNum);
|
||||
/*var pktNum=new Array();
|
||||
var byteLen=new Array();*/
|
||||
xData.push(d.ipAddr);
|
||||
//活跃IP图
|
||||
data.push({
|
||||
name: d.ipAddr,
|
||||
y: parseInt(d.linkNum),
|
||||
y: parseFloat(inoctetsNum),
|
||||
// drilldown: d.ipAddr,
|
||||
});
|
||||
pktNum[0]="pktNum";
|
||||
/*pktNum[0]="pktNum";
|
||||
pktNum[1]=parseInt(d.pktNum);
|
||||
byteLen[0]="byteLen";
|
||||
byteLen[1]=parseInt(d.byteLen);
|
||||
drillData.push({
|
||||
byteLen[1]=parseInt(d.byteLen);*/
|
||||
/*drillData.push({
|
||||
name: d.ipAddr,
|
||||
id: d.ipAddr,
|
||||
type:'pie',
|
||||
@@ -211,7 +221,7 @@
|
||||
pointFormat: '{series.name}: {point.y}<b> ({point.percentage:.1f}%)'
|
||||
},
|
||||
data: [pktNum,byteLen],
|
||||
});
|
||||
});*/
|
||||
});
|
||||
var chart = Highcharts.chart('chart_main', {
|
||||
chart: {
|
||||
@@ -285,7 +295,7 @@
|
||||
yAxis: {
|
||||
min: 0,
|
||||
title: {
|
||||
text: 'bytes',
|
||||
text: unit,
|
||||
align:'high',
|
||||
style: {//设置字体颜色
|
||||
color: '#fff',
|
||||
@@ -304,9 +314,9 @@
|
||||
|
||||
},
|
||||
tooltip: {
|
||||
// valueSuffix: ' 单位'
|
||||
},
|
||||
|
||||
headerFormat: '{series.name}<br>',
|
||||
pointFormat: '{point.name} <br>{point.y}</b> '+unit
|
||||
},
|
||||
plotOptions: {
|
||||
bar: {
|
||||
dataLabels: {
|
||||
@@ -327,7 +337,7 @@
|
||||
enabled:false
|
||||
},
|
||||
series: [{
|
||||
name: 'bytes',
|
||||
name: ' ',
|
||||
colorByPoint: true,
|
||||
data: data
|
||||
}],
|
||||
@@ -350,23 +360,59 @@
|
||||
// }
|
||||
});
|
||||
}
|
||||
|
||||
function changeNum(inoctetsNum){
|
||||
// 变化单位
|
||||
var inoctetsNumK=inoctetsNum/1024;
|
||||
var inoctetsNumM=inoctetsNumK/1024;
|
||||
var inoctetsNumG=inoctetsNumM/1024;
|
||||
if(inoctetsNumK>1){
|
||||
inoctetsNum=inoctetsNumK;
|
||||
};
|
||||
if(inoctetsNumM>1){
|
||||
inoctetsNum=inoctetsNumM;
|
||||
};
|
||||
if(inoctetsNumG>1){
|
||||
inoctetsNum=inoctetsNumG;
|
||||
};
|
||||
inoctetsNum=inoctetsNum.toFixed(1)
|
||||
return inoctetsNum;
|
||||
}
|
||||
function changeUnit(inoctetsNum){
|
||||
// 变化单位
|
||||
var unit="bytes";
|
||||
var inoctetsNumK=inoctetsNum/1024;
|
||||
var inoctetsNumM=inoctetsNumK/1024;
|
||||
var inoctetsNumG=inoctetsNumM/1024;
|
||||
if(inoctetsNumK>1){
|
||||
unit="KB";
|
||||
};
|
||||
if(inoctetsNumM>1){
|
||||
unit="MB";
|
||||
};
|
||||
if(inoctetsNumG>1){
|
||||
unit="GB";
|
||||
};
|
||||
return unit
|
||||
}
|
||||
//app应用类型统计 echart_3
|
||||
function echart_3(rs) {
|
||||
var data=new Array();
|
||||
var xData=new Array();
|
||||
var drillData=new Array();
|
||||
var unit="bytes";
|
||||
$(rs).each(function(i, d) {
|
||||
var inoctetsNum=d.count;
|
||||
unit=changeUnit(inoctetsNum);
|
||||
inoctetsNum=changeNum(inoctetsNum);
|
||||
var pktNum=new Array();
|
||||
var byteLen=new Array();
|
||||
xData.push(d.appType);
|
||||
//活跃IP图
|
||||
data.push({
|
||||
name: d.appType,
|
||||
y: parseInt(d.count),
|
||||
y: parseFloat(inoctetsNum),
|
||||
// drilldown: d.appType,
|
||||
});
|
||||
pktNum[0]="pktNum";
|
||||
/* pktNum[0]="pktNum";
|
||||
pktNum[1]=parseInt(d.pktNum);
|
||||
byteLen[0]="byteLen";
|
||||
byteLen[1]=parseInt(d.byteLen);
|
||||
@@ -374,7 +420,7 @@
|
||||
name: d.appType,
|
||||
id: d.appType,
|
||||
data: [pktNum,byteLen],
|
||||
});
|
||||
});*/
|
||||
});
|
||||
var chart = Highcharts.chart('chart_3',{
|
||||
chart: {
|
||||
@@ -437,7 +483,7 @@
|
||||
yAxis: {
|
||||
min: 0,
|
||||
title: {
|
||||
text: 'bytes',
|
||||
text: unit,
|
||||
align:'high',
|
||||
style: {//设置字体颜色
|
||||
color: '#fff',
|
||||
@@ -457,7 +503,7 @@
|
||||
tooltip: {
|
||||
enabled: true,
|
||||
headerFormat: '<span style="font-size:10px"><b>{point.key}</span><br>',
|
||||
pointFormat: '{series.name}: {point.y}<b>',
|
||||
pointFormat: '{point.y:.1f} <b> '+unit,
|
||||
shared: true,
|
||||
useHTML: true
|
||||
},
|
||||
@@ -479,7 +525,7 @@
|
||||
},
|
||||
|
||||
series: [{
|
||||
name: 'bytes',
|
||||
name: '',
|
||||
colorByPoint: true,
|
||||
data: data
|
||||
}],
|
||||
@@ -502,20 +548,24 @@
|
||||
}*/
|
||||
});
|
||||
}
|
||||
//终端用户 分操作系统与浏览器
|
||||
//终端用户 分操作系统
|
||||
function echart_2(rs){
|
||||
var data=new Array();
|
||||
var drillData=new Array();
|
||||
var unit="bytes";
|
||||
$(rs).each(function(i, d) {
|
||||
var pktNum=new Array();
|
||||
var byteLen=new Array();
|
||||
var inoctetsNum=d.count;
|
||||
unit=changeUnit(inoctetsNum);
|
||||
inoctetsNum=changeNum(inoctetsNum);
|
||||
// var pktNum=new Array();
|
||||
// var byteLen=new Array();
|
||||
data.push({
|
||||
name: d.osType,
|
||||
y: parseInt(d.count),
|
||||
y: parseFloat(inoctetsNum),
|
||||
// drilldown: d.osType,
|
||||
});
|
||||
|
||||
pktNum[0]="pktNum";
|
||||
/* pktNum[0]="pktNum";
|
||||
pktNum[1]=parseInt(d.pktNum);
|
||||
byteLen[0]="byteLen";
|
||||
byteLen[1]=parseInt(d.byteLen);
|
||||
@@ -525,7 +575,7 @@ function echart_2(rs){
|
||||
id: d.osType,
|
||||
type:'pie',
|
||||
data: [pktNum,byteLen],
|
||||
});
|
||||
});*/
|
||||
|
||||
});
|
||||
// 创建图例
|
||||
@@ -616,12 +666,12 @@ function echart_2(rs){
|
||||
tooltip: {
|
||||
enabled: true,
|
||||
headerFormat: '<span style="font-size:10px">{point.key}: <b>{point.percentage:.1f}%</span><br>',
|
||||
pointFormat: '{series.name}: {point.y}<b>',
|
||||
pointFormat: '{point.y} <b> '+unit,
|
||||
shared: true,
|
||||
useHTML: true
|
||||
},
|
||||
series: [{
|
||||
name: 'bytes',
|
||||
name: ' ',
|
||||
colorByPoint: true,
|
||||
data: data
|
||||
}],
|
||||
@@ -648,17 +698,21 @@ function echart_2(rs){
|
||||
function echart_5(rs){
|
||||
var data=new Array();
|
||||
var drillData=new Array();
|
||||
var unit="bytes";
|
||||
$(rs).each(function(i, d) {
|
||||
var pktNum=new Array();
|
||||
var byteLen=new Array();
|
||||
var inoctetsNum=d.count;
|
||||
unit=changeUnit(inoctetsNum);
|
||||
inoctetsNum=changeNum(inoctetsNum);
|
||||
// var pktNum=new Array();
|
||||
// var byteLen=new Array();
|
||||
//协议图-操作系统
|
||||
data.push({
|
||||
name: d.bsType,
|
||||
y: parseInt(d.count),
|
||||
y: parseFloat(inoctetsNum),
|
||||
// drilldown: d.bsType,
|
||||
});
|
||||
|
||||
pktNum[0]="pktNum";
|
||||
/* pktNum[0]="pktNum";
|
||||
pktNum[1]=parseInt(d.pktNum);
|
||||
byteLen[0]="byteLen";
|
||||
byteLen[1]=parseInt(d.byteLen);
|
||||
@@ -668,7 +722,7 @@ function echart_5(rs){
|
||||
id: d.bsType,
|
||||
type:'pie',
|
||||
data: [pktNum,byteLen],
|
||||
});
|
||||
});*/
|
||||
|
||||
});
|
||||
// 创建图例
|
||||
@@ -760,12 +814,12 @@ function echart_5(rs){
|
||||
tooltip: {
|
||||
enabled: true,
|
||||
headerFormat: '<span style="font-size:10px">{point.key}: <b>{point.percentage:.1f}%</span><br>',
|
||||
pointFormat: '{series.name}: {point.y}<b>',
|
||||
pointFormat: '{point.y} <b> '+unit,
|
||||
shared: true,
|
||||
useHTML: true
|
||||
},
|
||||
series: [{
|
||||
name: 'bytes',
|
||||
name: ' ',
|
||||
colorByPoint: true,
|
||||
data: data
|
||||
}],
|
||||
@@ -792,17 +846,21 @@ function echart_5(rs){
|
||||
//网站流量分析
|
||||
function echart_4(rs){
|
||||
var data=new Array();
|
||||
var drillData=new Array();
|
||||
// var drillData=new Array();
|
||||
var unit="bytes";
|
||||
$(rs).each(function(i, d) {
|
||||
var pktNum=new Array();
|
||||
var byteLen=new Array();
|
||||
var inoctetsNum=d.count;
|
||||
unit=changeUnit(inoctetsNum);
|
||||
inoctetsNum=changeNum(inoctetsNum);
|
||||
// var pktNum=new Array();
|
||||
// var byteLen=new Array();
|
||||
data.push({
|
||||
name: d.websiteService,
|
||||
y: parseInt(d.count),
|
||||
y: parseFloat(inoctetsNum),
|
||||
// drilldown: d.websiteService,
|
||||
});
|
||||
|
||||
pktNum[0]="pktNum";
|
||||
/* pktNum[0]="pktNum";
|
||||
pktNum[1]=parseInt(d.pktNum);
|
||||
byteLen[0]="byteLen";
|
||||
byteLen[1]=parseInt(d.byteLen);
|
||||
@@ -812,7 +870,7 @@ function echart_4(rs){
|
||||
id: d.websiteService,
|
||||
type:'pie',
|
||||
data: [pktNum,byteLen],
|
||||
});
|
||||
});*/
|
||||
|
||||
});
|
||||
// 创建图例
|
||||
@@ -895,15 +953,15 @@ function echart_4(rs){
|
||||
fontFamily:'Microsoft YaHei',
|
||||
}
|
||||
},
|
||||
tooltip: {
|
||||
tooltip: {
|
||||
enabled: true,
|
||||
headerFormat: '<span style="font-size:10px">{point.key}: <b>{point.percentage:.1f}%</span><br>',
|
||||
pointFormat: '{series.name}: {point.y}<b>',
|
||||
pointFormat: '{point.y} <b> '+unit,
|
||||
shared: true,
|
||||
useHTML: true
|
||||
},
|
||||
series: [{
|
||||
name: 'bytes',
|
||||
name: ' ',
|
||||
colorByPoint: true,
|
||||
data: data,
|
||||
}],
|
||||
@@ -929,18 +987,22 @@ function echart_4(rs){
|
||||
//网站流量分析-点击列表显示网站分类
|
||||
function echart_6(rs){
|
||||
var data=new Array();
|
||||
var drillData=new Array();
|
||||
// var drillData=new Array();
|
||||
var unit="bytes";
|
||||
$(rs).each(function(i, d) {
|
||||
var pktNum=new Array();
|
||||
var byteLen=new Array();
|
||||
var inoctetsNum=d.count;
|
||||
unit=changeUnit(inoctetsNum);
|
||||
inoctetsNum=changeNum(inoctetsNum);
|
||||
// var pktNum=new Array();
|
||||
// var byteLen=new Array();
|
||||
//协议图-操作系统
|
||||
data.push({
|
||||
name: d.domain,
|
||||
y: parseInt(d.count),
|
||||
y: parseFloat(inoctetsNum),
|
||||
// drilldown: d.domain,
|
||||
});
|
||||
|
||||
pktNum[0]="pktNum";
|
||||
/* pktNum[0]="pktNum";
|
||||
pktNum[1]=parseInt(d.pktNum);
|
||||
byteLen[0]="byteLen";
|
||||
byteLen[1]=parseInt(d.byteLen);
|
||||
@@ -950,7 +1012,7 @@ function echart_6(rs){
|
||||
id: d.domain,
|
||||
type:'pie',
|
||||
data: [pktNum,byteLen],
|
||||
});
|
||||
});*/
|
||||
|
||||
});
|
||||
// 创建图例
|
||||
@@ -1033,15 +1095,15 @@ function echart_6(rs){
|
||||
fontFamily:'Microsoft YaHei',
|
||||
}
|
||||
},
|
||||
tooltip: {
|
||||
tooltip: {
|
||||
enabled: true,
|
||||
headerFormat: '<span style="font-size:10px">{point.key}: <b>{point.percentage:.1f}%</span><br>',
|
||||
pointFormat: '{series.name}: {point.y}<b>',
|
||||
pointFormat: '{point.y} <b> '+unit,
|
||||
shared: true,
|
||||
useHTML: true
|
||||
},
|
||||
series: [{
|
||||
name: 'bytes',
|
||||
name: ' ',
|
||||
colorByPoint: true,
|
||||
data: data,
|
||||
}],
|
||||
@@ -1070,21 +1132,27 @@ function echart_topic_domain(rs){
|
||||
'parent': '',
|
||||
'name': 'TOPIC'
|
||||
}];
|
||||
|
||||
var unit="bytes";
|
||||
$(rs).each(function(i,d){
|
||||
var inoctetsNum=d.count;
|
||||
unit=changeUnit(inoctetsNum);
|
||||
inoctetsNum=changeNum(inoctetsNum);
|
||||
data.push({
|
||||
'id': '1.'+d.topicId,
|
||||
'parent': '0.0',
|
||||
'name': d.topic,
|
||||
'value':d.count
|
||||
'value':parseFloat(inoctetsNum)
|
||||
});
|
||||
/****主题中的子域名*******/
|
||||
$(d.domainData).each(function(j,t){
|
||||
var domainNum=d.count;
|
||||
unit=changeUnit(domainNum);
|
||||
domainNum=changeNum(domainNum);
|
||||
data.push({
|
||||
'id': '2.'+t.webId,
|
||||
'parent': '1.'+d.topicId,
|
||||
'name': t.domain,
|
||||
'value':t.count
|
||||
'value':parseFloat(domainNum)
|
||||
});
|
||||
})
|
||||
|
||||
@@ -1186,7 +1254,7 @@ function echart_topic_domain(rs){
|
||||
}],
|
||||
tooltip: {
|
||||
headerFormat: "",
|
||||
pointFormat: '<b>{point.name}</b>: <b>{point.value}</b>'
|
||||
pointFormat: '<b>{point.name}</b> : <b>{point.value}<b> ' +unit
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user