流量统计增加协议详情统计图与列表,列表可分页及导出
This commit is contained in:
@@ -698,6 +698,7 @@ public final class Constants {
|
||||
public static final String TRAFFIC_IPACTIVE_ONEHOUR=Configurations.getStringProperty("trafficIpActiveOneHour","trafficIpActiveOneHour");
|
||||
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");
|
||||
|
||||
/**
|
||||
* httpclient 工具超时时间设置
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
package com.nis.web.controller.dashboard;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Random;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
@@ -18,6 +21,12 @@ import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import com.beust.jcommander.internal.Maps;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.JsonDeserializationContext;
|
||||
import com.google.gson.JsonDeserializer;
|
||||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.JsonParseException;
|
||||
import com.google.gson.LongSerializationPolicy;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.nis.domain.PageLog;
|
||||
import com.nis.domain.dashboard.TrafficIpActiveStatistic;
|
||||
@@ -29,19 +38,6 @@ import com.nis.web.controller.BaseController;
|
||||
@Controller
|
||||
@RequestMapping("${adminPath}/dashboard/traffic")
|
||||
public class TrafficStatisticsInfoController extends BaseController {
|
||||
|
||||
|
||||
/**
|
||||
* 协议类型详细列表
|
||||
*/
|
||||
@RequestMapping(value="protocolTypeList")
|
||||
public String protocolTypeList(){
|
||||
|
||||
return "/dashboard/trafficProtocolTypeList";
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* rejectNum 封堵数量
|
||||
* newUniConn 新建连接数
|
||||
@@ -105,6 +101,11 @@ public class TrafficStatisticsInfoController extends BaseController {
|
||||
}
|
||||
return m;
|
||||
}
|
||||
|
||||
@RequestMapping(value="bandwidthList")
|
||||
public String bandwidthList( HttpServletRequest request, HttpServletResponse response, Model model){
|
||||
return "/dashboard/trafficBandwidthList";
|
||||
}
|
||||
/**
|
||||
* 根据ip46,协议tcp,udp查询带宽 间隔5分钟数据
|
||||
*/
|
||||
@@ -136,21 +137,58 @@ public class TrafficStatisticsInfoController extends BaseController {
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@RequestMapping(value="bandwidthList")
|
||||
public String bandwidthList( HttpServletRequest request, HttpServletResponse response, Model model){
|
||||
PageLog<TrafficIpActiveStatistic> page = new PageLog<TrafficIpActiveStatistic>(request, response);
|
||||
List list = new ArrayList();
|
||||
for (int i = 1; i < 10; i++) {
|
||||
TrafficIpActiveStatistic ip = new TrafficIpActiveStatistic();
|
||||
ip.setId(i);
|
||||
ip.setIpAddr(3+i+".1.1."+i);
|
||||
ip.setAreaId("11");
|
||||
ip.setLinkNum(1212l);
|
||||
list.add(ip);
|
||||
}
|
||||
page.setList(list);
|
||||
model.addAttribute("page", page);
|
||||
return "/dashboard/trafficBandwidthList";
|
||||
/**
|
||||
* 协议类型详细列表
|
||||
*/
|
||||
@RequestMapping(value="protocolTypeList")
|
||||
public String protocolTypeList(){
|
||||
return "/dashboard/trafficProtocolTypeList";
|
||||
}
|
||||
/**
|
||||
* 协议详情统计图跟表
|
||||
*/
|
||||
@RequestMapping(value="protocolList")
|
||||
@ResponseBody
|
||||
public List protocolList(){
|
||||
Map<String, Object> fromJsonList = new HashMap<String, Object>();
|
||||
List list = new ArrayList();
|
||||
String url = Constants.DASHBOARD_URL+Constants.TRAFFIC_PROTOCOL_LIST;
|
||||
try {
|
||||
String string = HttpClientUtil.get(url);
|
||||
Gson gson = new GsonBuilder().create();
|
||||
fromJsonList = gson.fromJson(string, new TypeToken<Map>(){}.getType());
|
||||
logger.info("协议详情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("协议详情数据获取错误"+e);
|
||||
list.add(Maps.newHashMap("error","request_service_failed"));
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,49 +1,49 @@
|
||||
#\u7ba1\u7406\u57fa\u7840\u8def\u5f84, \u9700\u540c\u6b65\u4fee\u6539\uff1aweb.xml
|
||||
#\u7BA1\u7406\u57FA\u7840\u8DEF\u5F84, \u9700\u540C\u6B65\u4FEE\u6539\uFF1Aweb.xml
|
||||
adminPath=/nis
|
||||
|
||||
#Restful\u670d\u52a1\u9ed8\u8ba4\u8def\u5f84\ufffd
|
||||
#Restful\u670D\u52A1\u9ED8\u8BA4\u8DEF\u5F84\uFFFD
|
||||
servicePath=/service
|
||||
|
||||
#\u5206\u9875\u914d\u7f6e
|
||||
#\u5206\u9875\u914D\u7F6E
|
||||
page.pageSize=20
|
||||
#\u5206\u9875\u914d\u7f6e
|
||||
#\u5206\u9875\u914D\u7F6E
|
||||
page.count=0
|
||||
|
||||
#\u7d22\u5f15\u9875\u8def\u5f84
|
||||
#\u7D22\u5F15\u9875\u8DEF\u5F84
|
||||
web.view.index=/nis/index
|
||||
|
||||
#\u7f13\u5b58\u8bbe\u7f6e
|
||||
#\u7F13\u5B58\u8BBE\u7F6E
|
||||
ehcache.configFile=cache/ehcache-local.xml
|
||||
#ehcache.configFile=cache/ehcache-rmi.xml
|
||||
|
||||
#\u4f1a\u8bdd\u8d85\u65f6\uff0c \u5355\u4f4d\uff1a\u6beb\u79d2\uff0c 20m=1200000ms, 30m=1800000ms, 60m=3600000ms
|
||||
#\u4F1A\u8BDD\u8D85\u65F6\uFF0C \u5355\u4F4D\uFF1A\u6BEB\u79D2\uFF0C 20m=1200000ms, 30m=1800000ms, 60m=3600000ms
|
||||
session.sessionTimeout=1800000
|
||||
#\u4f1a\u8bdd\u6e05\u7406\u95f4\u9694\u65f6\u95f4\uff0c \u5355\u4f4d\uff1a\u6beb\u79d2\uff0c2m=120000ms\u3002
|
||||
#\u4F1A\u8BDD\u6E05\u7406\u95F4\u9694\u65F6\u95F4\uFF0C \u5355\u4F4D\uFF1A\u6BEB\u79D2\uFF0C2m=120000ms\u3002
|
||||
session.sessionTimeoutClean=120000
|
||||
|
||||
#\u9759\u6001\u6587\u4ef6\u540e\u7f00
|
||||
#\u9759\u6001\u6587\u4EF6\u540E\u7F00
|
||||
web.staticFile=.css,.js,.png,.jpg,.gif,.jpeg,.bmp,.ico,.swf,.psd,.htc,.htm,.html,.crx,.xpi,.exe,.ipa,.apk
|
||||
|
||||
#\u7f51\u7ad9URL\u540e\u7f00
|
||||
#\u7F51\u7AD9URL\u540E\u7F00
|
||||
urlSuffix=.jsp
|
||||
|
||||
#\u89c6\u56fe\u6587\u4ef6\u5b58\u653e\u8def\u5f84
|
||||
#\u89C6\u56FE\u6587\u4EF6\u5B58\u653E\u8DEF\u5F84
|
||||
web.view.prefix=/WEB-INF/views/
|
||||
web.view.suffix=.jsp
|
||||
|
||||
#\u662f\u5426\u4e0d\u5141\u8bb8\u5237\u65b0\u4e3b\u9875\uff0c\u4e0d\u5141\u8bb8\u60c5\u51b5\u4e0b\uff0c\u5237\u65b0\u4e3b\u9875\u4f1a\u5bfc\u81f4\u91cd\u65b0\u767b\u5f55
|
||||
#\u662F\u5426\u4E0D\u5141\u8BB8\u5237\u65B0\u4E3B\u9875\uFF0C\u4E0D\u5141\u8BB8\u60C5\u51B5\u4E0B\uFF0C\u5237\u65B0\u4E3B\u9875\u4F1A\u5BFC\u81F4\u91CD\u65B0\u767B\u5F55
|
||||
notAllowRefreshIndex=false
|
||||
|
||||
#\u524d\u7aef\u57fa\u7840\u8def\u5f84
|
||||
#\u524D\u7AEF\u57FA\u7840\u8DEF\u5F84
|
||||
frontPath=/f
|
||||
|
||||
#\u662f\u5426\u8fd0\u884c\u591a\u8d26\u6237\u540c\u65f6\u767b\u5f55?
|
||||
#\u662F\u5426\u8FD0\u884C\u591A\u8D26\u6237\u540C\u65F6\u767B\u5F55?
|
||||
user.multiAccountLogin=true
|
||||
|
||||
#\u7855\u6b63\u7ec4\u4ef6\u662f\u5426\u4f7f\u7528\u7f13\u5b58
|
||||
#\u7855\u6B63\u7EC4\u4EF6\u662F\u5426\u4F7F\u7528\u7F13\u5B58
|
||||
supcan.useCache=false
|
||||
|
||||
#\u901a\u77e5\u95f4\u9694\u65f6\u95f4\u8bbe\u7f6e, \u5355\u4f4d\uff1a\u6beb\u79d2, 30s=30000ms, 60s=60000ms
|
||||
#\u901A\u77E5\u95F4\u9694\u65F6\u95F4\u8BBE\u7F6E, \u5355\u4F4D\uFF1A\u6BEB\u79D2, 30s=30000ms, 60s=60000ms
|
||||
work.notify.remind.interval=60000
|
||||
|
||||
|
||||
@@ -51,13 +51,13 @@ work.notify.remind.interval=60000
|
||||
#===== System settings ======#
|
||||
#============================#
|
||||
|
||||
#\u4ea7\u54c1\u4fe1\u606f\u8bbe\u7f6e
|
||||
#\u4EA7\u54C1\u4FE1\u606F\u8BBE\u7F6E
|
||||
productName=National Traffic Control System
|
||||
copyrightYear=2015
|
||||
version=V1.0.0
|
||||
|
||||
|
||||
#\u4e0a\u4f20\u6587\u4ef6\u7edd\u5bf9\u8def\u5f84, \u8def\u5f84\u4e2d\u4e0d\u5141\u8bb8\u5305\u542b\u201cuserfiles\u201d
|
||||
#\u4E0A\u4F20\u6587\u4EF6\u7EDD\u5BF9\u8DEF\u5F84, \u8DEF\u5F84\u4E2D\u4E0D\u5141\u8BB8\u5305\u542B\u201Cuserfiles\u201D
|
||||
userfiles.basedir=upload
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ userfiles.basedir=upload
|
||||
#===== webservice settings ======#
|
||||
#============================#
|
||||
|
||||
#ESB\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u1e69\ufffd\ufffd\u0373\u04bb\ufffd\ufffd\u05b7
|
||||
#ESB\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u1E69\uFFFD\uFFFD\u0373\u04BB\uFFFD\uFFFD\u05B7
|
||||
webservice.esb.endpoint=http://10.55.0.197:7879/TongServiceProxy_doprocess/services/WebService1/
|
||||
#webservice RID
|
||||
webservice.rid=XFBL
|
||||
@@ -88,47 +88,47 @@ webservice.data.dict.code.sid=s_2042_0660BD17-35E4-4482-AA3A-556F2C024902
|
||||
#webservice request timeout for seconds
|
||||
webservice.request.timeout=30
|
||||
|
||||
#\ufffd\ufffd\ufffd\ufffd\ufffdURL
|
||||
#\uFFFD\uFFFD\uFFFD\uFFFD\uFFFDURL
|
||||
webservice.jg.service.url=http://10.55.0.155:8080/jgService
|
||||
|
||||
#\ufffd\u00fb\ufffd\ufffd\ufffd\ufffd\ufffdURL
|
||||
#\uFFFD\u00FB\uFFFD\uFFFD\uFFFD\uFFFD\uFFFDURL
|
||||
webservice.yh.service.url=http://10.55.0.155:8080/ryService
|
||||
|
||||
#\ufffd\ufffd\ufffd\ufffd\u05b5\ufffdURL
|
||||
#\uFFFD\uFFFD\uFFFD\uFFFD\u05B5\uFFFDURL
|
||||
webservice.data.dict.service.url=http://10.55.0.155:8080/sjzdService
|
||||
|
||||
#\ufffd\ufffd\ufffd\ufffd\u05b5\ufffd\ufffd\ufffd\ufffdURL
|
||||
#\uFFFD\uFFFD\uFFFD\uFFFD\u05B5\uFFFD\uFFFD\uFFFD\uFFFDURL
|
||||
webservice.data.dict.bm.url=http://10.55.0.155:8080/sjzdbmService
|
||||
|
||||
#\ufffd\ufffd\ufffd\ufffd\ufffd\ufffdURL
|
||||
#\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFDURL
|
||||
webservice.data.code.url=http://10.55.0.155:8080/sjmbService
|
||||
|
||||
#webservice\ufffd\u04ff\ufffd\ufffd\ufffd\ufffd\u00ff\u04b3\ufffd\ufffd\ufffd\ufffd
|
||||
#webservice\uFFFD\u04FF\uFFFD\uFFFD\uFFFD\uFFFD\u00FF\u04B3\uFFFD\uFFFD\uFFFD\uFFFD
|
||||
webservice.data.pagesize = 2000
|
||||
#webservice\ufffd\ufffd\u01f0\u012c\ufffd\ufffd\u04b3
|
||||
#webservice\uFFFD\uFFFD\u01F0\u012C\uFFFD\uFFFD\u04B3
|
||||
webservice.data.currentpage = 1
|
||||
|
||||
#webservice \ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd
|
||||
#webservice \uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD
|
||||
webservice.jgmb.name=CK_T_JC_RY
|
||||
#webservice \ufffd\u00fb\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd
|
||||
#webservice \uFFFD\u00FB\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD
|
||||
webservice.yhmb.name=CK_T_YH_RY
|
||||
#webservice\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd \u022b\ufffd\ufffd
|
||||
#webservice\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD \u022B\uFFFD\uFFFD
|
||||
webservice.method.name.ql=getData
|
||||
# webservice\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd \ufffd\ufffd\ufffd\ufffd
|
||||
# webservice\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD \uFFFD\uFFFD\uFFFD\uFFFD
|
||||
webservice.method.name.zl=getDataZL
|
||||
|
||||
# redis\u914d\u7f6e\u6587\u4ef6
|
||||
#redis \u5404\u4e2a\u5206\u7247\u7684 IP\u7aef\u53e3
|
||||
# redis\u914D\u7F6E\u6587\u4EF6
|
||||
#redis \u5404\u4E2A\u5206\u7247\u7684 IP\u7AEF\u53E3
|
||||
redis.cluster.host_port=10.0.6.32:6379,10.0.6.32:6380,10.0.6.32:6381,10.0.6.33:6379,10.0.6.33:6380,10.0.6.33:6381
|
||||
|
||||
|
||||
#\u4e2d\u5fc3\u73b0\u573aredis\u5730\u5740\u548c\u7aef\u53e3
|
||||
#\u4E2D\u5FC3\u73B0\u573Aredis\u5730\u5740\u548C\u7AEF\u53E3
|
||||
#redis.cluster.host_port=10.174.196.33:6379,10.174.196.33:6380,10.174.196.33:6381,10.174.196.34:6379,10.174.196.34:6380,10.174.196.34:6381,10.174.196.35:6379,10.174.196.35:6380,10.174.196.35:6381,10.174.196.36:6379,10.174.196.36:6380,10.174.196.36:6381,10.174.196.37:6379,10.174.196.37:6380,10.174.196.37:6381,10.174.196.38:6379,10.174.196.38:6380,10.174.196.38:6381,10.174.196.39:6379,10.174.196.39:6380,10.174.196.39:6381
|
||||
|
||||
redis.cluster.connectiontimeout=5000
|
||||
redis.cluster.sotimeout=5000
|
||||
redis.cluster.maxattempts=3
|
||||
#redis\u8fde\u63a5\u6c60\u76f8\u5173\u914d\u7f6e
|
||||
#redis\u8FDE\u63A5\u6C60\u76F8\u5173\u914D\u7F6E
|
||||
|
||||
redis.pool.maxtotal=500
|
||||
|
||||
@@ -141,31 +141,31 @@ redis.pool.testonreturn=false
|
||||
redis.pool.testwhileidle=true
|
||||
redis.pool.timebetweenevictionrunsmillis=60000
|
||||
redis.pool.minevictableidletimemillis=60000
|
||||
#oracle\u6570\u636eredis\u5b58\u50a8\u65f6\u95f4(\u79d2\u4e3a\u5355\u4f4d \u9ed8\u8ba43\u5206\u949f\u5373180s)
|
||||
#oracle\u6570\u636Eredis\u5B58\u50A8\u65F6\u95F4(\u79D2\u4E3A\u5355\u4F4D \u9ED8\u8BA43\u5206\u949F\u5373180s)
|
||||
oracleExpire=180
|
||||
#hive\u6570\u636e\u4e2d\u5fc3\u6570\u636eredis\u5b58\u50a8\u65f6\u95f4(\u79d2\u4e3a\u5355\u4f4d \u9ed8\u8ba420\u5206\u949f\u53731200s)
|
||||
#hive\u6570\u636E\u4E2D\u5FC3\u6570\u636Eredis\u5B58\u50A8\u65F6\u95F4(\u79D2\u4E3A\u5355\u4F4D \u9ED8\u8BA420\u5206\u949F\u53731200s)
|
||||
hiveExpire=300
|
||||
#redis\u5f00\u5173
|
||||
#redis\u5F00\u5173
|
||||
isOpenRedis=false
|
||||
#\u662f\u5426\u5c06\u6570\u636e\u4e2d\u5fc3\u7684\u65e5\u5fd7\u52a0\u5165\u5230redis\u4e2d
|
||||
#\u662F\u5426\u5C06\u6570\u636E\u4E2D\u5FC3\u7684\u65E5\u5FD7\u52A0\u5165\u5230redis\u4E2D
|
||||
dataCenterOpenRedis=true
|
||||
#\u8de8\u57df\u95ee\u9898\u5141\u8bb8 \u7684url Access-Control-Allow-Origin *\u5141\u8bb8\u6240\u6709\uff0c\u8bbe\u7f6e\u6210\u5176\u4ed6url\u53ea\u5141\u8bb8\u8be5url.\u4e0d\u80fd\u8bbe\u7f6e\u591a\u4e2aurl
|
||||
#\u8DE8\u57DF\u95EE\u9898\u5141\u8BB8 \u7684url Access-Control-Allow-Origin *\u5141\u8BB8\u6240\u6709\uFF0C\u8BBE\u7F6E\u6210\u5176\u4ED6url\u53EA\u5141\u8BB8\u8BE5url.\u4E0D\u80FD\u8BBE\u7F6E\u591A\u4E2Aurl
|
||||
target_url=*
|
||||
#\u8de8\u57df\u95ee\u9898 3600\uff1a\u8868\u660e\u57283600\u79d2\u5185\uff0c\u4e0d\u9700\u8981\u518d\u53d1\u9001\u9884\u8bf7\u6c42\uff0c\u53ef\u4ee5\u7f13\u5b58\u8be5\u7ed3\u679c
|
||||
#\u8DE8\u57DF\u95EE\u9898 3600\uFF1A\u8868\u660E\u57283600\u79D2\u5185\uFF0C\u4E0D\u9700\u8981\u518D\u53D1\u9001\u9884\u8BF7\u6C42\uFF0C\u53EF\u4EE5\u7F13\u5B58\u8BE5\u7ED3\u679C
|
||||
ACCESS_CONTROL_MAX_AGE=3600
|
||||
##########HTTPCLIENT POOL START###################
|
||||
#\u4ece\u8fde\u63a5\u6c60\u4e2d\u83b7\u53d6\u5230\u8fde\u63a5\u7684\u6700\u957f\u65f6\u95f4
|
||||
#\u4ECE\u8FDE\u63A5\u6C60\u4E2D\u83B7\u53D6\u5230\u8FDE\u63A5\u7684\u6700\u957F\u65F6\u95F4
|
||||
http.request.connectionRequestTimeout=500
|
||||
#5000
|
||||
http.request.connectTimeout=5000
|
||||
#\u6570\u636e\u4f20\u8f93\u7684\u6700\u957f\u65f6\u95f4
|
||||
#\u6570\u636E\u4F20\u8F93\u7684\u6700\u957F\u65F6\u95F4
|
||||
http.request.socketTimeout=30000
|
||||
#\u63d0\u4ea4\u8bf7\u6c42\u524d\u6d4b\u8bd5\u8fde\u63a5\u662f\u5426\u53ef\u7528
|
||||
#\u63D0\u4EA4\u8BF7\u6C42\u524D\u6D4B\u8BD5\u8FDE\u63A5\u662F\u5426\u53EF\u7528
|
||||
http.request.staleConnectionCheckEnabled=true
|
||||
|
||||
#\u8bbe\u7f6e\u8fde\u63a5\u603b\u6570
|
||||
#\u8BBE\u7F6E\u8FDE\u63A5\u603B\u6570
|
||||
http.pool.maxTotal=200
|
||||
#\u8bbe\u7f6e\u6bcf\u4e2a\u5730\u5740\u7684\u5e76\u53d1\u6570
|
||||
#\u8BBE\u7F6E\u6BCF\u4E2A\u5730\u5740\u7684\u5E76\u53D1\u6570
|
||||
http.pool.defaultMaxPerRoute=100
|
||||
##########HTTPCLIENT POOL END###################
|
||||
search.dateformat=yyyy-MM-dd HH:mm:ss
|
||||
@@ -176,45 +176,45 @@ search.eshostandport_C=10.0.6.115:9200
|
||||
#search.eshostandport=10.174.196.135:9200
|
||||
|
||||
|
||||
#\u65e5\u5fd7\u662f\u5426\u4ecehive\u4e2d\u67e5\u8be2
|
||||
#\u65E5\u5FD7\u662F\u5426\u4ECEhive\u4E2D\u67E5\u8BE2
|
||||
selFromHive=false
|
||||
|
||||
#\u662f\u5426\u83b7\u53d6\u6570\u636e\u4e2d\u5fc3\u67e5\u8be2\u8bb0\u5f55\u7684\u603b\u6761\u6570
|
||||
#\u662F\u5426\u83B7\u53D6\u6570\u636E\u4E2D\u5FC3\u67E5\u8BE2\u8BB0\u5F55\u7684\u603B\u6761\u6570
|
||||
isGetHiveCount=false
|
||||
|
||||
#\u6bcf\u6b21\u83b7\u53d6\u6570\u636e\u4e2d\u5fc3\u591a\u5c11\u6761\u6570\u636e,\u54b1\u4eec\u5728\u5bf9\u83b7\u53d6\u7684\u6570\u636e\u8fdb\u884c\u5206\u9875\u5904\u7406
|
||||
#\u6BCF\u6B21\u83B7\u53D6\u6570\u636E\u4E2D\u5FC3\u591A\u5C11\u6761\u6570\u636E,\u54B1\u4EEC\u5728\u5BF9\u83B7\u53D6\u7684\u6570\u636E\u8FDB\u884C\u5206\u9875\u5904\u7406
|
||||
everyGetHiveDataNum=10000
|
||||
|
||||
#oracle\u6570\u636e\u5e93\u6709\u95ee\u9898\u4e0d\u4eceoracle\u67e5\u8be2\u6570\u636e,\u6240\u6709\u65e5\u5fd7\u6570\u636e\u5747\u4ece\u6570\u636e\u4e2d\u5fc3\u67e5\u8be2
|
||||
#oracle\u6570\u636E\u5E93\u6709\u95EE\u9898\u4E0D\u4ECEoracle\u67E5\u8BE2\u6570\u636E,\u6240\u6709\u65E5\u5FD7\u6570\u636E\u5747\u4ECE\u6570\u636E\u4E2D\u5FC3\u67E5\u8BE2
|
||||
onlySelFromHive=false
|
||||
|
||||
#\u662f\u5426\u67e5\u8be2\u795e\u901a\u6570\u636e\u5e93
|
||||
#\u662F\u5426\u67E5\u8BE2\u795E\u901A\u6570\u636E\u5E93
|
||||
isSelectCluster=true
|
||||
|
||||
#\u7528\u6237\u67e5\u8be2\u65e5\u5fd7\u8d85\u8fc7\u591a\u5c11\u5c0f\u65f6\u53bb\u6570\u636e\u4e2d\u5fc3\u67e5\u8be2
|
||||
#\u7528\u6237\u67E5\u8BE2\u65E5\u5FD7\u8D85\u8FC7\u591A\u5C11\u5C0F\u65F6\u53BB\u6570\u636E\u4E2D\u5FC3\u67E5\u8BE2
|
||||
dataCenterTime=48
|
||||
|
||||
#\u662f\u5426\u5f00\u542f\u57fa\u7840\u9a8c\u8bc1
|
||||
#\u662F\u5426\u5F00\u542F\u57FA\u7840\u9A8C\u8BC1
|
||||
baseValidate=true
|
||||
|
||||
#\u662f\u5426\u5f00\u542f\u4e1a\u52a1\u9a8c\u8bc1
|
||||
#\u662F\u5426\u5F00\u542F\u4E1A\u52A1\u9A8C\u8BC1
|
||||
serviceValidate=true
|
||||
|
||||
|
||||
|
||||
#\u65e5\u5fd7\u5b58\u50a8\u672c\u5730\u65f6\u95f4(\u5355\u4f4d\u5c0f\u65f6)
|
||||
#\u65E5\u5FD7\u5B58\u50A8\u672C\u5730\u65F6\u95F4(\u5355\u4F4D\u5C0F\u65F6)
|
||||
logLocalTime=48
|
||||
#\u5b9e\u65f6\u7edf\u8ba1\u9ed8\u8ba4\u67e5\u8be2\u672c\u5730\u4e00\u4e2a\u5c0f\u65f6\u7684\u6570\u636e(\u5355\u4f4d\uff1a\u5c0f\u65f6)
|
||||
#\u5B9E\u65F6\u7EDF\u8BA1\u9ED8\u8BA4\u67E5\u8BE2\u672C\u5730\u4E00\u4E2A\u5C0F\u65F6\u7684\u6570\u636E(\u5355\u4F4D\uFF1A\u5C0F\u65F6)
|
||||
reportLocalTime=1
|
||||
|
||||
#\u795e\u901a\u6570\u636e\u5e93\u6700\u65e9\u65e5\u5fd7\u65f6\u95f4(A\u7248\u6beb\u79d2)
|
||||
#\u795E\u901A\u6570\u636E\u5E93\u6700\u65E9\u65E5\u5FD7\u65F6\u95F4(A\u7248\u6BEB\u79D2)
|
||||
#2017-08-13 10:07:25
|
||||
clusterAStartTime=1503504000725
|
||||
#\u795e\u901a\u6570\u636e\u5e93\u6700\u65e9\u7ed3\u675f\u65f6\u95f4(B\u7248\u6beb\u79d2)
|
||||
#\u795E\u901A\u6570\u636E\u5E93\u6700\u65E9\u7ED3\u675F\u65F6\u95F4(B\u7248\u6BEB\u79D2)
|
||||
#2017-08-13 10:07:25
|
||||
clusterBStartTime=1503504000725
|
||||
############################################################################################################################################
|
||||
#\u8bbe\u7f6e\u914d\u7f6e\u662f\u5426\u5165\u5e93
|
||||
#\u8BBE\u7F6E\u914D\u7F6E\u662F\u5426\u5165\u5E93
|
||||
############################################################################################################################################
|
||||
isCommit=true
|
||||
############################################################################################################################################
|
||||
@@ -269,7 +269,7 @@ mmSpeakerRecognizationLog=mmSpeakerRecognizationLogs
|
||||
mmLogoDetectionLog=mmLogoDetectionLogs
|
||||
mmFaceRecognizationLog=mmFaceRecognizationLogs
|
||||
########################################
|
||||
#\u5927\u5c4f\u56fe\u8868\u5c55\u793a\u670d\u52a1\u63a5\u53e3
|
||||
#\u5927\u5C4F\u56FE\u8868\u5C55\u793A\u670D\u52A1\u63A5\u53E3
|
||||
dashboardUrl=http://192.168.10.204:9999/galaxy-service/service/log/v1/
|
||||
trafficIpActive=trafficIpActive
|
||||
trafficProtocol=trafficProtocol
|
||||
@@ -293,28 +293,28 @@ logsearch_menu_id=152
|
||||
#use elasticsearch or not#
|
||||
isUseES=false
|
||||
|
||||
#httpclient \u5de5\u5177\u8bbe\u7f6e\u8d85\u65f6\u65f6\u95f4
|
||||
#httpclient \u5DE5\u5177\u8BBE\u7F6E\u8D85\u65F6\u65F6\u95F4
|
||||
http_socket_timeout=300000
|
||||
http_connect_timeout=10000
|
||||
http_connect_request_timeout=50000
|
||||
http_connect_retry_times=3
|
||||
|
||||
|
||||
#\u6570\u636e\u4e2d\u5fc3A\u7248\u6570\u636e\u5e93\u540d\u79f0,\u7a0b\u5e8f\u4e2d\u6bcf\u6b21\u67e5\u8be2\u65f6\u4f7f\u7528\u7684\u6570\u636e\u5e93\u540d\u79f0 use dbA
|
||||
#\u6570\u636E\u4E2D\u5FC3A\u7248\u6570\u636E\u5E93\u540D\u79F0,\u7A0B\u5E8F\u4E2D\u6BCF\u6B21\u67E5\u8BE2\u65F6\u4F7F\u7528\u7684\u6570\u636E\u5E93\u540D\u79F0 use dbA
|
||||
jdbc.hive.AName=xa_dfbhit_hive
|
||||
#\u6570\u636e\u4e2d\u5fc3B\u7248\u6570\u636e\u5e93\u540d\u79f0
|
||||
#\u6570\u636E\u4E2D\u5FC3B\u7248\u6570\u636E\u5E93\u540D\u79F0
|
||||
jdbc.hive.BName=xa_z2_mesalog_hive
|
||||
|
||||
maxPageSize=100000
|
||||
#\u5bfc\u51fa\u6700\u5927\u6761\u6570
|
||||
#\u5BFC\u51FA\u6700\u5927\u6761\u6570
|
||||
maxExportSize=100000
|
||||
#\u5141\u8bb8\u914d\u7f6e\u6700\u5927\u5c42\u7ea7
|
||||
#\u5141\u8BB8\u914D\u7F6E\u6700\u5927\u5C42\u7EA7
|
||||
maxLevelNo=4
|
||||
#\u4e0a\u4e0b\u7ea7\u663e\u793a\u95f4\u9694\u6807\u8bc6\u7b26
|
||||
#\u4E0A\u4E0B\u7EA7\u663E\u793A\u95F4\u9694\u6807\u8BC6\u7B26
|
||||
childrenMark=.
|
||||
#\u4e1a\u52a1\u5b57\u5178\u5728\u8bcd\u5178\u4e2d\u7684\u6807\u8bc6
|
||||
#\u4E1A\u52A1\u5B57\u5178\u5728\u8BCD\u5178\u4E2D\u7684\u6807\u8BC6
|
||||
SERVICE_DICT_ITM_TYPE=SERVICE_DICT_ITM_TYPE
|
||||
#\u7cfb\u7edf\u5b57\u5178\u5728\u8bcd\u5178\u4e2d\u7684\u6807\u8bc6
|
||||
#\u7CFB\u7EDF\u5B57\u5178\u5728\u8BCD\u5178\u4E2D\u7684\u6807\u8BC6
|
||||
SYS_DICT_ITM_TYPE=SYS_DICT_ITM_TYPE
|
||||
area_region=NTC_IP_RANGE
|
||||
protocol_num_region=NTC_UNIVERSAL_PROTO_TYPE
|
||||
@@ -342,16 +342,16 @@ ssl_ip_region=ssl_ip
|
||||
bgp_ip_region=bgp_ip
|
||||
behav_id_region=BEHAV_ID
|
||||
rate_limit_region=Droprate
|
||||
#\u5b58\u5728\u4e0e\u8868\u8fbe\u5f0f\u7684\u5173\u952e\u5b57\u7279\u6b8a\u5206\u9694\u7b26
|
||||
#\u5B58\u5728\u4E0E\u8868\u8FBE\u5F0F\u7684\u5173\u952E\u5B57\u7279\u6B8A\u5206\u9694\u7B26
|
||||
keyword_expr=***and***
|
||||
#\u65f6\u533a
|
||||
#\u65F6\u533A
|
||||
time_zone=8
|
||||
#\u9700\u8981\u7279\u6b8a\u5904\u7406\u7684\u4e1a\u52a1\u7c7b\u578b
|
||||
#\u9700\u8981\u7279\u6B8A\u5904\u7406\u7684\u4E1A\u52A1\u7C7B\u578B
|
||||
service_pxy_domain_intercept=513
|
||||
service_ip_mulitiplex=768
|
||||
service_ip_ratelimit=1057
|
||||
service_domain_ratelimit=1058
|
||||
#\u7528\u6237\u81ea\u5b9a\u4e49\u57df
|
||||
#\u7528\u6237\u81EA\u5B9A\u4E49\u57DF
|
||||
userregion_rate_limit=Droprate
|
||||
userregion_ir_strategy=IR_STRATEGY
|
||||
userregion_ir_type=IR_TYPE
|
||||
@@ -361,25 +361,25 @@ userregion_replace_type_key=zone
|
||||
userregion_replace_req_key_value=http_req_body
|
||||
userregion_replace_res_key_value=http_res_body
|
||||
userregion_replace_regex_key=regex
|
||||
#\u7528\u6237\u81ea\u5b9a\u4e49\u57df\u5360\u4f4d\u7b26
|
||||
#\u7528\u6237\u81EA\u5B9A\u4E49\u57DF\u5360\u4F4D\u7B26
|
||||
user_region_placeholder=0
|
||||
#\u7528\u6237\u81ea\u5b9a\u4e49\u57df\u5206\u9694\u7b26
|
||||
#\u7528\u6237\u81EA\u5B9A\u4E49\u57DF\u5206\u9694\u7B26
|
||||
user_region_split=;
|
||||
#IP\u76f8\u5173\u9a8c\u8bc1\u6b63\u5219
|
||||
#IP\u76F8\u5173\u9A8C\u8BC1\u6B63\u5219
|
||||
ipv4_ip_subnet_regexp=^(0|1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|[1-9])\\.(0|1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|\\d)\\.(0|1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|\\d)\\.(0|1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|\\d)/(3[0-2]|1[6-9]|2[0-9])$
|
||||
ipv6_ip_subnet_regexp=^((::)|(([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:)|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}(:[0-9A-Fa-f]{1,4}){1,2})|(([0-9A-Fa-f]{1,4}:){4}(:[0-9A-Fa-f]{1,4}){1,3})|(([0-9A-Fa-f]{1,4}:){3}(:[0-9A-Fa-f]{1,4}){1,4})|(([0-9A-Fa-f]{1,4}:){2}(:[0-9A-Fa-f]{1,4}){1,5})|([0-9A-Fa-f]{1,4}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d|25[0-5])(\\.(\\d|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5])){3}))$
|
||||
#\u91cd\u5b9a\u5411\u4e1a\u52a1\u81ea\u5b9a\u4e49\u57df\u76f8\u5173\u53c2\u6570
|
||||
#\u91CD\u5B9A\u5411\u4E1A\u52A1\u81EA\u5B9A\u4E49\u57DF\u76F8\u5173\u53C2\u6570
|
||||
redirect_response_code_key=code
|
||||
redirect_url_key=url
|
||||
redirect_content_key=content
|
||||
redirect_response_code_startwith=30
|
||||
replace_zone_key=zone
|
||||
replace_substitute_key=substitute
|
||||
#\u6837\u4f8b\u6587\u4ef6\u4e0a\u4f20\u7684uri\u5173\u952e\u8bcd
|
||||
#\u6837\u4F8B\u6587\u4EF6\u4E0A\u4F20\u7684uri\u5173\u952E\u8BCD
|
||||
sample_upload_url_keyword=/av
|
||||
digest_upload_url_keyword=/filetransfer
|
||||
cert_upload_url_keyword=/intercept/strateagy
|
||||
@@ -388,53 +388,53 @@ cert_upload_url_keyword=/intercept/strateagy
|
||||
sample_total_file_max_size=12582912
|
||||
#audio File Types
|
||||
audio_file_type=
|
||||
#audio File Size 10M 10485760\uff08single\uff09
|
||||
#audio File Size 10M 10485760\uFF08single\uFF09
|
||||
audio_single_file_max_size=0
|
||||
#speaker File Types \u8bf4\u8bdd\u4eba\u8bc6\u522b\u6587\u4ef6\u7c7b\u578b
|
||||
#speaker File Types \u8BF4\u8BDD\u4EBA\u8BC6\u522B\u6587\u4EF6\u7C7B\u578B
|
||||
speaker_file_type=
|
||||
#audio File Size 10M 10485760\uff08single\uff09
|
||||
#audio File Size 10M 10485760\uFF08single\uFF09
|
||||
speaker_single_file_max_size=0
|
||||
#video File Types
|
||||
video_file_type=
|
||||
#video File Size 10M 10485760\uff08single\uff09
|
||||
#video File Size 10M 10485760\uFF08single\uFF09
|
||||
video_single_file_max_size=0
|
||||
#face File Types \u4eba\u8138\u8bc6\u522b
|
||||
#face File Types \u4EBA\u8138\u8BC6\u522B
|
||||
face_file_type=
|
||||
#face File Size 10M 10485760\uff08single\uff09
|
||||
#face File Size 10M 10485760\uFF08single\uFF09
|
||||
face_single_file_max_size=0
|
||||
#picture File Types
|
||||
picture_file_type=
|
||||
#picture File Size 10M 10485760\uff08single\uff09
|
||||
#picture File Size 10M 10485760\uFF08single\uFF09
|
||||
picture_single_file_max_size=10485760
|
||||
#logo File Types \u53f0\u6807\u8bc6\u522b
|
||||
#logo File Types \u53F0\u6807\u8BC6\u522B
|
||||
logo_file_type=
|
||||
#logo File Size 10M 10485760\uff08single\uff09
|
||||
#logo File Size 10M 10485760\uFF08single\uFF09
|
||||
logo_single_file_max_size=10485760
|
||||
#voip File Types
|
||||
voip_file_type=
|
||||
#voip File Size 10M 10485760\uff08single\uff09
|
||||
#voip File Size 10M 10485760\uFF08single\uFF09
|
||||
voip_single_file_max_size=0
|
||||
|
||||
#digest File Types
|
||||
digest_file_type=
|
||||
#digest File Size 10M 10485760\uff08single\uff09
|
||||
#digest File Size 10M 10485760\uFF08single\uFF09
|
||||
digest_single_file_max_size=10485760
|
||||
#digest File Size 12M 12582912\uff08total\uff09
|
||||
#digest File Size 12M 12582912\uFF08total\uFF09
|
||||
digest_total_file_max_size=12582912
|
||||
#cert File Size 12M 12582912\uff08total\uff09
|
||||
#cert File Size 12M 12582912\uFF08total\uFF09
|
||||
cert_total_file_max_size=12582912
|
||||
#public File Types
|
||||
public_file_type=
|
||||
#public File Size 10M 10485760\uff08single\uff09
|
||||
#public File Size 10M 10485760\uFF08single\uFF09
|
||||
public_single_file_max_size=10485760
|
||||
#private File Types
|
||||
private_file_type=
|
||||
#private File Size 10M 10485760\uff08single\uff09
|
||||
#private File Size 10M 10485760\uFF08single\uFF09
|
||||
private_single_file_max_size=10485760
|
||||
#YSP\u6587\u4ef6\u4fdd\u5b58\u8def\u5f84
|
||||
#YSP\u6587\u4EF6\u4FDD\u5B58\u8DEF\u5F84
|
||||
av_file_path=/home/ysp/
|
||||
#av_file_path=D\:\\ysp\\
|
||||
#YSP\u6587\u4ef6\u7279\u5f81\u7c7b\u578b
|
||||
#YSP\u6587\u4EF6\u7279\u5F81\u7C7B\u578B
|
||||
av_sample_audio_region=av_sample_audio
|
||||
av_sample_video_region=av_sample_video
|
||||
av_sample_picture_region=av_sample_picture
|
||||
@@ -443,7 +443,7 @@ mm_speaker_recognization_region=MM_SPEAKER_RECOGNIZATION
|
||||
mm_logo_detection_region=MM_LOGO_DETECTION
|
||||
mm_face_recognization_region=MM_FACE_RECOGNIZATION
|
||||
|
||||
#\u6837\u4f8b\u6587\u4ef6\u751f\u6210\u7a0b\u5e8f
|
||||
#\u6837\u4F8B\u6587\u4EF6\u751F\u6210\u7A0B\u5E8F
|
||||
audio_sample_create_proc=/home/ceiec/av_feature_gen/audio_convert_proc
|
||||
video_sample_create_proc=/home/ceiec/av_feature_gen/extract_frame_feature
|
||||
picture_sample_create_proc=/home/ceiec/av_feature_gen/picture_convert_proc
|
||||
@@ -462,7 +462,7 @@ picture_sample_proc_param_is_translation=false
|
||||
speaker_sample_proc_param_is_translation=false
|
||||
logo_sample_proc_param_is_translation=false
|
||||
face_sample_proc_param_is_translation=false
|
||||
#\u672c\u5730\u6d4b\u8bd5
|
||||
#\u672C\u5730\u6D4B\u8BD5
|
||||
#audio_sample_create_proc=java -jar D\:\\sampleTest.jar
|
||||
#video_sample_create_proc=java -jar D\:\\sampleTest.jar
|
||||
#picture_sample_create_proc=java -jar D\:\\sampleTest.jar
|
||||
@@ -481,41 +481,41 @@ face_sample_proc_param_is_translation=false
|
||||
#speaker_sample_proc_param_is_translation=true
|
||||
#logo_sample_proc_param_is_translation=true
|
||||
#face_sample_proc_param_is_translation=true
|
||||
#http\u81ea\u5b9a\u4e49\u57df\u76f8\u5173\u53c2\u6570
|
||||
#http\u81EA\u5B9A\u4E49\u57DF\u76F8\u5173\u53C2\u6570
|
||||
http_header_user_region_key=HTTP_HEADER
|
||||
http_header_dict_module=HTTP_HEADER_DISTRICT
|
||||
#dns\u81ea\u5b9a\u4e49\u57df\u53c2\u6570key
|
||||
#dns\u81EA\u5B9A\u4E49\u57DF\u53C2\u6570key
|
||||
dns_strategy_user_region_key=DNS_STRATEGY
|
||||
#p2p\u81ea\u5b9a\u4e49\u57dfkey
|
||||
#p2p\u81EA\u5B9A\u4E49\u57DFkey
|
||||
p2p_ip_type_user_region_key=P2P_IP_TYPE
|
||||
p2p_hash_type_user_region_key=P2P_HASH_TYPE
|
||||
#\u7279\u5b9a\u670d\u52a1\u7c7b\u522b
|
||||
#\u7279\u5B9A\u670D\u52A1\u7C7B\u522B
|
||||
specific_service_cfg_type_app=social_app
|
||||
specific_service_cfg_type_encrypted_tunnel_behavior=encrypted_tunnel_behavior
|
||||
specific_service_cfg_type_basic_protocol=basic_protocol
|
||||
#\u57fa\u7840\u534f\u8bae\u81ea\u5b9a\u4e49\u57df
|
||||
#\u57FA\u7840\u534F\u8BAE\u81EA\u5B9A\u4E49\u57DF
|
||||
proto_id_region=PROTO_ID
|
||||
#\u62e6\u622aIP\u81ea\u5b9a\u4e49\u57dfkey
|
||||
#\u62E6\u622AIP\u81EA\u5B9A\u4E49\u57DFkey
|
||||
keyring_id=keyring_id
|
||||
droprate=Droprate
|
||||
bandwidth=Bandwidth
|
||||
intercept_domain_intensity=DOMAIN_INTENSITY
|
||||
#IP\u9ed8\u8ba4\u503c
|
||||
#IP\u9ED8\u8BA4\u503C
|
||||
ipv4_default_ip_value=0.0.0.0
|
||||
ipv6_default_ip_value=\:\:
|
||||
ipv4_default_ip_subnet_value=0.0.0.0/16
|
||||
ipv6_default_ip_subnet_value=::/128
|
||||
ipv4_default_ip_range_value=0.0.0.0-1
|
||||
ipv6_default_ip_range_value=::-::
|
||||
#\u7aef\u53e3\u9ed8\u8ba4\u503c
|
||||
#\u7AEF\u53E3\u9ED8\u8BA4\u503C
|
||||
port_default=0
|
||||
port_mask_default=0/65535
|
||||
#MAAT CFG \u4e00\u4e9b\u9ed8\u8ba4\u503c
|
||||
#MAAT CFG \u4E00\u4E9B\u9ED8\u8BA4\u503C
|
||||
maat_cfg_dolog_default=2
|
||||
maat_cfg_dolog_doblacklist_default=1
|
||||
maat_cfg_dolog_configpercent_default=100
|
||||
maat_cfg_dolog_configoption_default=1
|
||||
#app\uff0c\u57fa\u7840\u534f\u8bae\uff0c\u7279\u5b9a\u670d\u52a1\u7684userregion\u5206\u9694\u7b26
|
||||
#app\uFF0C\u57FA\u7840\u534F\u8BAE\uFF0C\u7279\u5B9A\u670D\u52A1\u7684userregion\u5206\u9694\u7B26
|
||||
app_cfg_userregion_splitor=&
|
||||
app_id_region=APP_ID
|
||||
#application spec service code scope
|
||||
@@ -529,19 +529,19 @@ area_tag=location
|
||||
isp_tag=isp
|
||||
mmFileDigestLog=mmFileDigestLogs
|
||||
ntcStreamMediaLog=ntcStreamMediaLogs
|
||||
#\u97f3\u89c6\u9891\u6837\u4f8b\u9650\u5236\u65f6\u957f\uff0c\u5355\u4f4d\u79d2
|
||||
#\u97F3\u89C6\u9891\u6837\u4F8B\u9650\u5236\u65F6\u957F\uFF0C\u5355\u4F4D\u79D2
|
||||
av_duration_limit=120
|
||||
video_to_picture_proc=/home/ceiec/av_feature_gen/save_video_frame
|
||||
#\u8bc1\u4e66\u6587\u4ef6\u8def\u5f84
|
||||
#\u8BC1\u4E66\u6587\u4EF6\u8DEF\u5F84
|
||||
cert_file_path=/home/cert/
|
||||
#\u8bc1\u4e66\u6821\u9a8c\u5de5\u5177\u540d\u79f0
|
||||
#\u8BC1\u4E66\u6821\u9A8C\u5DE5\u5177\u540D\u79F0
|
||||
cert_validate_file=x509
|
||||
#\u8bc1\u4e66\u6821\u9a8c\u6210\u529f\u7684\u5173\u952e\u4fe1\u606f
|
||||
#\u8BC1\u4E66\u6821\u9A8C\u6210\u529F\u7684\u5173\u952E\u4FE1\u606F
|
||||
cert_validate_success_info=Successful
|
||||
#ipv4 range\u65b0\u683c\u5f0f0.0.0.1-2
|
||||
#ipv4 range\u65B0\u683C\u5F0F0.0.0.1-2
|
||||
ipv4_ip_range_regexp_new=^(0|1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|[1-9])\\.(0|1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|\\d)\\.(0|1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|\\d)\\.(0|1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|\\d)-(0|1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|\\d)$
|
||||
ipv4_ip_subnet_regexp_original=^(0|1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|[1-9])\\.(0|1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|\\d)\\.(0|1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|\\d)\\.(0|1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|\\d)/(3[0-2]|1[0-9]|2[0-9]|[0-9])$
|
||||
#\u57df\u540d\u9a8c\u8bc1\u6b63\u5219
|
||||
#\u57DF\u540D\u9A8C\u8BC1\u6B63\u5219
|
||||
domain_regexp=^(?=^.{3,255}$)[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})+$
|
||||
#IP\u590D\u7528maat json\u4E2D\u7684ip region\u5355\u6B21send \u6700\u5927\u4E2A\u6570
|
||||
maat_json_send_size=20000
|
||||
@@ -569,4 +569,5 @@ ip_reuse_call_cgi_url=http://192.168.11.137:8090/command
|
||||
ipNumGet=IpNumGet
|
||||
allIpGet=AllIpGet
|
||||
#\u6D41\u91CF\u7EDF\u8BA1\u5E26\u5BBD\u8BE6\u60C5
|
||||
trafficBandwidthTrans=trafficBandwidthTrans
|
||||
trafficBandwidthTrans=trafficBandwidthTrans
|
||||
trafficProtocolList=trafficProtocolList
|
||||
@@ -148,7 +148,7 @@
|
||||
<div class="main_center fl">
|
||||
<div class="center_text">
|
||||
<div class="main_title">
|
||||
<spring:message code="traffic_protocol_chart"/> <%-- <a href="${ctx}/dashboard/traffic/protocolTypeList"><i class="fa fa-list-ul"></i></a> --%>
|
||||
<spring:message code="traffic_protocol_chart"/> <a href="${ctx}/dashboard/traffic/protocolTypeList"><i class="fa fa-line-chart"></i></a>
|
||||
<a href="javascipt:void(0)" onclick="protocolList();return false;"><i class="fa fa-refresh"></i></a>
|
||||
</div>
|
||||
<div id="chart_1" class="" style="width:100%;height: 400px;"></div>
|
||||
@@ -556,12 +556,12 @@ function protocolList(){
|
||||
echart_1(rs);
|
||||
}
|
||||
|
||||
closeTip();
|
||||
},
|
||||
complete:function(XMLHttpRequest,status){//超时设置
|
||||
closeTip();
|
||||
}
|
||||
});
|
||||
closeTip();
|
||||
}
|
||||
//活跃IP统计
|
||||
function ipActiveList(){
|
||||
@@ -579,12 +579,12 @@ function ipActiveList(){
|
||||
echart_main(rs);
|
||||
}
|
||||
|
||||
closeTip();
|
||||
},
|
||||
complete:function(XMLHttpRequest,status){//超时设置
|
||||
closeTip();
|
||||
}
|
||||
});
|
||||
closeTip();
|
||||
}
|
||||
//活跃端口统计
|
||||
function portActiveList(){
|
||||
@@ -638,12 +638,12 @@ function portActiveList(){
|
||||
}
|
||||
}
|
||||
|
||||
closeTip();
|
||||
},
|
||||
complete:function(XMLHttpRequest,status){//超时设置
|
||||
closeTip();
|
||||
}
|
||||
});
|
||||
closeTip();
|
||||
}
|
||||
|
||||
//app应用类型统计
|
||||
@@ -662,12 +662,12 @@ function appTypeList(){
|
||||
echart_3(rs);
|
||||
}
|
||||
|
||||
closeTip();
|
||||
},
|
||||
complete:function(XMLHttpRequest,status){//超时设置
|
||||
closeTip();
|
||||
}
|
||||
});
|
||||
closeTip();
|
||||
}
|
||||
//获取终端用户-操作系统列表 左下
|
||||
function systemList(){
|
||||
@@ -732,12 +732,12 @@ function systemList(){
|
||||
echart_2(rs.reverse());
|
||||
}
|
||||
|
||||
closeTip();
|
||||
},
|
||||
complete:function(XMLHttpRequest,status){//超时设置
|
||||
closeTip();
|
||||
}
|
||||
});
|
||||
closeTip();
|
||||
}
|
||||
// 点击操作系统列表右侧显示 浏览器图
|
||||
function osClick(osType,obj){
|
||||
@@ -755,12 +755,12 @@ function osClick(osType,obj){
|
||||
success:function (rs) {
|
||||
echart_5(rs.reverse());
|
||||
|
||||
closeTip();
|
||||
},
|
||||
complete:function(XMLHttpRequest,status){//超时设置
|
||||
closeTip();
|
||||
}
|
||||
});
|
||||
closeTip();
|
||||
}
|
||||
//点击浏览器列表右侧显示 操作系统图
|
||||
function bsClick(bsType,obj){
|
||||
@@ -776,12 +776,12 @@ function bsClick(bsType,obj){
|
||||
success:function (rs) {
|
||||
echart_2(rs.reverse());
|
||||
|
||||
closeTip();
|
||||
},
|
||||
complete:function(XMLHttpRequest,status){//超时设置
|
||||
closeTip();
|
||||
}
|
||||
});
|
||||
closeTip();
|
||||
}
|
||||
|
||||
|
||||
@@ -794,7 +794,6 @@ function browserList() {
|
||||
dataType:"json",
|
||||
cache:false,async:true,timeout:10000,//超时时间设置,查询接口时间过长超时
|
||||
beforeSend: function () {
|
||||
|
||||
var msg = "OnLoading...";
|
||||
var trLen = $("#tbodyData1 tr").length;
|
||||
if(trLen<=0) {
|
||||
@@ -802,14 +801,11 @@ function browserList() {
|
||||
}else {
|
||||
$("#tbodyData1").html("")
|
||||
}
|
||||
|
||||
var tr = "<tr class='frist rowData'>";
|
||||
tr += "<td class='list_c1' colspan='3' align='center' style='color:#fff'>"+msg+"</td>";
|
||||
|
||||
$("#tbodyData1").prepend(tr);
|
||||
},
|
||||
success:function (rs) {
|
||||
|
||||
$("#tbodyData1").html("");
|
||||
rs.reverse();
|
||||
var n=rs.length;
|
||||
@@ -825,7 +821,6 @@ function browserList() {
|
||||
bs=bs.substring(0,18);
|
||||
}
|
||||
}
|
||||
|
||||
var count= itemObj.count;
|
||||
var preCount = itemObj.preCount;
|
||||
var tr = "<tr class='frist rowData select-row-tr' onclick='javascript:bsClick(\""+itemObj.bsType+"\",this);return false;'>";
|
||||
@@ -847,13 +842,12 @@ function browserList() {
|
||||
//终端图-浏览器
|
||||
echart_5(rs.reverse());
|
||||
}
|
||||
|
||||
closeTip();
|
||||
},
|
||||
complete:function(XMLHttpRequest,status){//超时设置
|
||||
closeTip();
|
||||
}
|
||||
});
|
||||
closeTip();
|
||||
}
|
||||
//获取http网站table列表
|
||||
function websiteList() {
|
||||
@@ -913,13 +907,12 @@ function websiteList() {
|
||||
//网站统计图
|
||||
echart_4(rs.reverse());
|
||||
}
|
||||
|
||||
closeTip();
|
||||
},
|
||||
complete:function(XMLHttpRequest,status){//超时设置
|
||||
closeTip();
|
||||
}
|
||||
});
|
||||
closeTip();
|
||||
}
|
||||
//点击http网站列表-显示域名图
|
||||
function webClick(websiteServiceId,obj){
|
||||
@@ -927,7 +920,6 @@ function webClick(websiteServiceId,obj){
|
||||
$("#tbodyData2 tr").removeClass("activeColor");
|
||||
loading();
|
||||
$(obj).addClass("activeColor");
|
||||
|
||||
$.ajax({
|
||||
url: '${ctx}/dashboard/webTypeChart',
|
||||
type : "get" ,
|
||||
@@ -936,13 +928,12 @@ function webClick(websiteServiceId,obj){
|
||||
cache:false,async:true,timeout:10000,//超时时间设置,查询接口时间过长超时
|
||||
success:function (rs) {
|
||||
echart_6(rs);
|
||||
|
||||
closeTip();
|
||||
},
|
||||
complete:function(XMLHttpRequest,status){//超时设置
|
||||
closeTip();
|
||||
}
|
||||
});
|
||||
closeTip();
|
||||
}
|
||||
//网站主题
|
||||
function topicAndDomainList(){
|
||||
@@ -955,18 +946,14 @@ function topicAndDomainList(){
|
||||
success:function (rs) {
|
||||
//主题域名流量统计图
|
||||
echart_topic_domain(rs);
|
||||
|
||||
closeTip();
|
||||
},
|
||||
complete:function(XMLHttpRequest,status){//超时设置
|
||||
closeTip();
|
||||
}
|
||||
});
|
||||
closeTip();
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -4,194 +4,294 @@
|
||||
<head>
|
||||
<title>协议类型</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/protocolTypeList'"><spring:message code="refresh"/></button>
|
||||
<button type="button" class="btn btn-default" onClick="javascript:window.location='${ctx}/dashboard/logChart'"><spring:message code="back"/></button>
|
||||
<button type="button" class="btn btn-default" onClick="javascript:window.location='${ctx}/dashboard/traffic/protocolTypeList'"><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="protocol_type"></spring:message>
|
||||
</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="entry" action="${ctx}/dashboard/traffic/protocolTypeList" 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}"/>
|
||||
</form:form>
|
||||
</div> --%>
|
||||
<!-- =============================== -->
|
||||
<div class="box-1 mt20">
|
||||
|
||||
<div class="clearfix">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<table id="contentTable" class="table table-hover table-active table-striped table-bordered table-condensed text-nowrap">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="tl" width="100">协议名称</th>
|
||||
<th class="tl" width="100">总量</th>
|
||||
<th class="tl" width="80">比例</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<td class="tc">TCP</td>
|
||||
<td class="tc">1</td>
|
||||
<td class="tc">
|
||||
25.0%
|
||||
</td>
|
||||
<td>
|
||||
<div class="c-progress c-progress-inline-2">
|
||||
<div class="c-progress-bar" style="width:25%"></div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="tc">HTTP</td>
|
||||
<td class="tc">1</td>
|
||||
<td class="tc">
|
||||
45.0%
|
||||
</td>
|
||||
<td>
|
||||
<div class="c-progress c-progress-inline-2">
|
||||
<div class="c-progress-bar" style="width:45%"></div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="tc">UDP</td>
|
||||
<td class="tc">1</td>
|
||||
<td class="tc">
|
||||
25.0%
|
||||
</td>
|
||||
<td>
|
||||
<div class="c-progress c-progress-inline-2">
|
||||
<div class="c-progress-bar" style="width:25%"></div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="tc">其他</td>
|
||||
<td class="tc">0</td>
|
||||
<td class="tc">
|
||||
60.0%
|
||||
</td>
|
||||
<td>
|
||||
<div class="c-progress c-progress-inline-2">
|
||||
<div class="c-progress-bar" style="width:62%"></div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
<%-- <div class="page">${page}</div> --%>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div id="chart" style="height: 430px; -moz-user-select: none; position: relative; background: transparent none repeat scroll 0% 0%;">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<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="protocol_name"/></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(){
|
||||
var chart = Highcharts.chart('chart', {
|
||||
title: {
|
||||
text: null
|
||||
},
|
||||
yAxis: {
|
||||
title: {
|
||||
text: 'bps'
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
enabled:false
|
||||
},
|
||||
xAxis:{
|
||||
type:'datetime',
|
||||
dateTimeLabelFormats:{
|
||||
day:'%Y-%m-%d %h'
|
||||
}
|
||||
},
|
||||
plotOptions: {
|
||||
series: {
|
||||
pointStart: Date.UTC(2018, 8, 16,1),
|
||||
pointInterval: 3600*1000,
|
||||
// pointIntervalUnit:'day'
|
||||
}
|
||||
},
|
||||
|
||||
series: [{
|
||||
name: 'Installation',
|
||||
data: [43934, 52503, 57177, 69658, 97031, 119931, 137133, 154175]
|
||||
}],
|
||||
|
||||
responsive: {
|
||||
rules: [{
|
||||
condition: {
|
||||
maxWidth: 500
|
||||
},
|
||||
chartOptions: {
|
||||
legend: {
|
||||
layout: 'horizontal',
|
||||
align: 'center',
|
||||
verticalAlign: 'bottom'
|
||||
}
|
||||
}
|
||||
}]
|
||||
}
|
||||
|
||||
});
|
||||
ajaxProtocolList();
|
||||
|
||||
});
|
||||
function ajaxProtocolList(){
|
||||
loading();
|
||||
$.ajax({
|
||||
url: '${ctx}/dashboard/traffic/protocolList',
|
||||
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:"protocol",
|
||||
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.protocolType+"</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.protocolType,
|
||||
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:"Protocol",
|
||||
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: "Protocol",
|
||||
colorByPoint: true,
|
||||
data: data
|
||||
}],
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<script type="text/html" id="tpl-searchEngines">
|
||||
{{each list as item}}
|
||||
<tr>
|
||||
<td>
|
||||
<div class="badge-square" style="background-color:{{item.color}}"></div>{{item.name}}</td>
|
||||
<td class="tc">{{item.value}}</td>
|
||||
<td class="tc">
|
||||
{{(item.rate*100).toFixed(1)}}%
|
||||
</td>
|
||||
<td>
|
||||
<div class="c-progress c-progress-inline-2">
|
||||
<div class="c-progress-bar" style="width:{{item.rate*100}}%"></div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
</script>
|
||||
<script>
|
||||
var chartData = {"code":200,"msg":null,"data":{"searchEngineTotalIp":4,"totalIp":63,"rate":0.0635,"list":[{"name":"TCP","value":1,"rate":0.25,"totalIp":4},{"name":"UDP","value":1,"rate":0.25,"totalIp":4},{"name":"DNS","value":1,"rate":0.25,"totalIp":4},{"name":"FTP","value":0,"rate":0,"totalIp":4},{"name":"其他","value":0,"rate":0,"totalIp":4}]}}
|
||||
</script>
|
||||
<%-- <script src="${pageContext.request.contextPath}/static/pages/scripts/contentAnalysis.js"></script> --%>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,6 +1,6 @@
|
||||
$(function(){
|
||||
// var leff =$("span[class~='le-ca-fo']").attr("data-original-title")
|
||||
getConfigSyncStatus();
|
||||
// getConfigSyncStatus();
|
||||
$("#contentTable").not(".logTb").find("tbody tr").each(function(i){
|
||||
if($(this).find("input[type='checkbox']").attr("value")==3){
|
||||
var ids = $(this).find("input").attr("id");
|
||||
|
||||
79
src/main/webapp/static/pages/css/pagination.css
Normal file
79
src/main/webapp/static/pages/css/pagination.css
Normal file
@@ -0,0 +1,79 @@
|
||||
@charset "UTF-8";
|
||||
|
||||
.wrapper{
|
||||
margin:0 auto;
|
||||
width:960px;
|
||||
height:100%;
|
||||
}
|
||||
.M-box,.M-box1,.M-box2,.M-box3{
|
||||
position: relative;
|
||||
text-align: center;
|
||||
zoom: 1;
|
||||
}
|
||||
.M-box:before,.M-box:after,.M-box1:before,.M-box1:after ,.M-box2:before,.M-box2:after ,.M-box3:before,.M-box3:after{
|
||||
content:"";
|
||||
display:table;
|
||||
}
|
||||
.M-box:after,.M-box1:after,.M-box2:after,.M-box3:after{
|
||||
clear:both;
|
||||
overflow:hidden;
|
||||
}
|
||||
.M-box span,.M-box1 span,.M-box2 span,.M-box3 span{
|
||||
float: left;
|
||||
margin:0 5px;
|
||||
width: 38px;
|
||||
height: 38px;
|
||||
line-height: 38px;
|
||||
color: #bdbdbd;
|
||||
font-size: 14px;
|
||||
}
|
||||
.M-box .active,.M-box1 .active,.M-box2 .active,.M-box3 .active{
|
||||
float: left;
|
||||
margin:0 5px;
|
||||
width: 38px;
|
||||
height: 38px;
|
||||
line-height: 38px;
|
||||
background: #3598dc;
|
||||
color: #fff;
|
||||
font-size: 14px;
|
||||
border: 1px solid #3598dc;
|
||||
}
|
||||
.M-box a,.M-box1 a,.M-box2 a,.M-box3 a{
|
||||
float: left;
|
||||
margin:0 5px;
|
||||
width: 38px;
|
||||
height: 38px;
|
||||
line-height: 38px;
|
||||
background: #fff;
|
||||
border: 1px solid #ebebeb;
|
||||
color: #08c;
|
||||
font-size: 14px;
|
||||
}
|
||||
.M-box a:hover,.M-box1 a:hover,.M-box2 a:hover,.M-box3 a:hover{
|
||||
color:#fff;
|
||||
background: #3598dc;
|
||||
}
|
||||
.M-box .next,.M-box .prev,.M-box1 .next,.M-box1 .prev{
|
||||
font-family: "Simsun";
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.now,.count{
|
||||
padding:0 5px;
|
||||
color:#f00;
|
||||
}
|
||||
|
||||
/*
|
||||
input{
|
||||
float: left;
|
||||
margin:0 5px;
|
||||
width: 38px;
|
||||
height: 38px;
|
||||
line-height: 38px;
|
||||
text-align: center;
|
||||
background: #fff;
|
||||
border: 1px solid #ebebeb;
|
||||
outline: none;
|
||||
color: #bdbdbd;
|
||||
font-size: 14px;
|
||||
}*/
|
||||
@@ -395,16 +395,6 @@
|
||||
exporting: {
|
||||
allowHTML:true,
|
||||
filename:'App',
|
||||
chartOptions: {
|
||||
plotOptions: {
|
||||
series: {
|
||||
dataLabels: {
|
||||
enabled: true,
|
||||
allowOverlap: true, // 允许数据标签重叠
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
},
|
||||
noData:{
|
||||
style: {//设置字体颜色
|
||||
|
||||
181
src/main/webapp/static/pages/scripts/jquery.pagination.js
Normal file
181
src/main/webapp/static/pages/scripts/jquery.pagination.js
Normal file
@@ -0,0 +1,181 @@
|
||||
/**
|
||||
* pagination分页插件
|
||||
* @version 1.1.2
|
||||
* @author mss
|
||||
* @url http://maxiaoxiang.com/plugin/pagination.html
|
||||
* @E-mail 251445460@qq.com
|
||||
*
|
||||
* @调用方法
|
||||
* $(selector).pagination();
|
||||
*
|
||||
* @更新日志
|
||||
* 2016-07-25:修复click重复事件
|
||||
*/
|
||||
;(function($,window,document,undefined){
|
||||
|
||||
//配置参数
|
||||
var defaults = {
|
||||
totalData:0, //数据总条数
|
||||
showData:0, //每页显示的条数
|
||||
pageCount:9, //总页数,默认为9
|
||||
current:1, //当前第几页
|
||||
prevCls:'prev', //上一页class
|
||||
nextCls:'next', //下一页class
|
||||
prevContent:'<', //上一页内容
|
||||
nextContent:'>', //下一页内容
|
||||
activeCls:'active', //当前页选中状态
|
||||
coping:false, //首页和尾页
|
||||
homePage:'', //首页节点内容
|
||||
endPage:'', //尾页节点内容
|
||||
count:3, //当前页前后分页个数
|
||||
jump:false, //跳转到指定页数
|
||||
jumpIptCls:'jump-ipt', //文本框内容
|
||||
jumpBtnCls:'jump-btn', //跳转按钮
|
||||
jumpBtn:'跳转', //跳转按钮文本
|
||||
callback:function(){} //回调
|
||||
};
|
||||
|
||||
var Pagination = function(element,options){
|
||||
//全局变量
|
||||
var opts = options,//配置
|
||||
current,//当前页
|
||||
$document = $(document),
|
||||
$obj = $(element);//容器
|
||||
|
||||
/**
|
||||
* 设置总页数
|
||||
* @param int page 页码
|
||||
* @return opts.pageCount 总页数配置
|
||||
*/
|
||||
this.setTotalPage = function(page){
|
||||
return opts.pageCount = page;
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取总页数
|
||||
* @return int p 总页数
|
||||
*/
|
||||
this.getTotalPage = function(){
|
||||
var p = opts.totalData || opts.showData ? Math.ceil(parseInt(opts.totalData) / opts.showData) : opts.pageCount;
|
||||
return p;
|
||||
};
|
||||
|
||||
//获取当前页
|
||||
this.getCurrent = function(){
|
||||
return current;
|
||||
};
|
||||
|
||||
/**
|
||||
* 填充数据
|
||||
* @param int index 页码
|
||||
*/
|
||||
this.filling = function(index){
|
||||
var html = '';
|
||||
current = index || opts.current;//当前页码
|
||||
var pageCount = this.getTotalPage();
|
||||
if(current > 1){//上一页
|
||||
html += '<a href="javascript:;" class="'+opts.prevCls+'">'+opts.prevContent+'</a>';
|
||||
}else{
|
||||
$obj.find('.'+opts.prevCls) && $obj.find('.'+opts.prevCls).remove();
|
||||
}
|
||||
if(current >= opts.count * 2 && current != 1 && pageCount != opts.count){
|
||||
var home = opts.coping && opts.homePage ? opts.homePage : '1';
|
||||
html += opts.coping ? '<a href="javascript:;" data-page="1">'+home+'</a><span>...</span>' : '';
|
||||
}
|
||||
var start = current - opts.count,
|
||||
end = current + opts.count;
|
||||
((start > 1 && current < opts.count) || current == 1) && end++;
|
||||
(current > pageCount - opts.count && current >= pageCount) && start++;
|
||||
for (;start <= end; start++) {
|
||||
if(start <= pageCount && start >= 1){
|
||||
if(start != current){
|
||||
html += '<a href="javascript:;" data-page="'+start+'">'+ start +'</a>';
|
||||
}else{
|
||||
html += '<span class="'+opts.activeCls+'">'+ start +'</span>';
|
||||
}
|
||||
}
|
||||
}
|
||||
if(current + opts.count < pageCount && current >= 1 && pageCount > opts.count){
|
||||
var end = opts.coping && opts.endPage ? opts.endPage : pageCount;
|
||||
html += opts.coping ? '<span>...</span><a href="javascript:;" data-page="'+pageCount+'">'+end+'</a>' : '';
|
||||
}
|
||||
if(current < pageCount){//下一页
|
||||
html += '<a href="javascript:;" class="'+opts.nextCls+'">'+opts.nextContent+'</a>'
|
||||
}else{
|
||||
$obj.find('.'+opts.nextCls) && $obj.find('.'+opts.nextCls).remove();
|
||||
}
|
||||
|
||||
html += opts.jump ? '<input type="text" class="'+opts.jumpIptCls+'"><a href="javascript:;" class="'+opts.jumpBtnCls+'">'+opts.jumpBtn+'</a>' : '';
|
||||
|
||||
$obj.empty().html(html);
|
||||
};
|
||||
|
||||
//绑定事件
|
||||
this.eventBind = function(){
|
||||
var self = this;
|
||||
var pageCount = this.getTotalPage();//总页数
|
||||
$obj.off().on('click','a',function(){
|
||||
if($(this).hasClass(opts.nextCls)){
|
||||
var index = parseInt($obj.find('.'+opts.activeCls).text()) + 1;
|
||||
}else if($(this).hasClass(opts.prevCls)){
|
||||
var index = parseInt($obj.find('.'+opts.activeCls).text()) - 1;
|
||||
}else if($(this).hasClass(opts.jumpBtnCls)){
|
||||
if($obj.find('.'+opts.jumpIptCls).val() !== ''){
|
||||
var index = parseInt($obj.find('.'+opts.jumpIptCls).val());
|
||||
}else{
|
||||
return;
|
||||
}
|
||||
}else{
|
||||
var index = parseInt($(this).data('page'));
|
||||
}
|
||||
self.filling(index);
|
||||
typeof opts.callback === 'function' && opts.callback(self);
|
||||
});
|
||||
//输入跳转的页码
|
||||
$obj.on('input propertychange','.'+opts.jumpIptCls,function(){
|
||||
var $this = $(this);
|
||||
var val = $this.val();
|
||||
var reg = /[^\d]/g;
|
||||
if (reg.test(val)) {
|
||||
$this.val(val.replace(reg, ''));
|
||||
}
|
||||
(parseInt(val) > pageCount) && $this.val(pageCount);
|
||||
if(parseInt(val) === 0){//最小值为1
|
||||
$this.val(1);
|
||||
}
|
||||
});
|
||||
//回车跳转指定页码
|
||||
$document.keydown(function(e){
|
||||
var self = this;
|
||||
if(e.keyCode == 13 && $obj.find('.'+opts.jumpIptCls).val()){
|
||||
var index = parseInt($obj.find('.'+opts.jumpIptCls).val());
|
||||
self.filling(index);
|
||||
typeof opts.callback === 'function' && opts.callback(self);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
//初始化
|
||||
this.init = function(){
|
||||
this.filling(opts.current);
|
||||
this.eventBind();
|
||||
};
|
||||
this.init();
|
||||
};
|
||||
|
||||
$.fn.pagination = function(parameter,callback){
|
||||
if(typeof parameter == 'function'){//重载
|
||||
callback = parameter;
|
||||
parameter = {};
|
||||
}else{
|
||||
parameter = parameter || {};
|
||||
callback = callback || function(){};
|
||||
}
|
||||
var options = $.extend({},defaults,parameter);
|
||||
return this.each(function(){
|
||||
var pagination = new Pagination(this, options);
|
||||
callback(pagination);
|
||||
});
|
||||
};
|
||||
|
||||
})(jQuery,window,document);
|
||||
Reference in New Issue
Block a user