diff --git a/.project b/.project index fe32f5dbf..76a2595da 100644 --- a/.project +++ b/.project @@ -1,15 +1,10 @@ - gwall + ntc_mesalab - - org.eclipse.wst.jsdt.core.javascriptValidator - - - org.eclipse.jdt.core.javabuilder @@ -36,12 +31,12 @@ - org.eclipse.m2e.core.maven2Builder + com.genuitec.eclipse.springframework.springbuilder - com.genuitec.eclipse.springframework.springbuilder + org.eclipse.m2e.core.maven2Builder @@ -54,6 +49,6 @@ org.eclipse.m2e.core.maven2Nature org.eclipse.wst.common.project.facet.core.nature org.eclipse.wst.jsdt.core.jsNature - org.zeroturnaround.eclipse.jrebelNature + \ No newline at end of file diff --git a/src/main/java/com/nis/domain/configuration/AppFeatureIndex.java b/src/main/java/com/nis/domain/configuration/AppFeatureIndex.java index a1b63b558..45ef53501 100644 --- a/src/main/java/com/nis/domain/configuration/AppFeatureIndex.java +++ b/src/main/java/com/nis/domain/configuration/AppFeatureIndex.java @@ -39,6 +39,7 @@ public class AppFeatureIndex extends BaseCfg { private List ipPortList = new ArrayList(); private List strList = new ArrayList(); private List complexList = new ArrayList(); + private List numCfgList = new ArrayList(); protected Integer exprType ; protected Integer matchMethod ; protected Integer isHexbin; @@ -126,5 +127,11 @@ public class AppFeatureIndex extends BaseCfg { public void setCfgRegionCode1(String cfgRegionCode1) { this.cfgRegionCode1 = cfgRegionCode1; } + public List getNumCfgList() { + return numCfgList; + } + public void setNumCfgList(List numCfgList) { + this.numCfgList = numCfgList; + } } diff --git a/src/main/java/com/nis/util/Constants.java b/src/main/java/com/nis/util/Constants.java index 5a08537d3..89df965d8 100644 --- a/src/main/java/com/nis/util/Constants.java +++ b/src/main/java/com/nis/util/Constants.java @@ -699,6 +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_BANDWIDTH_TRANS_TWO=Configurations.getStringProperty("trafficBandwidthTransTwo","trafficBandwidthTransTwo"); + public static final String TRAFFIC_BANDWIDTH_TRANS_THREE=Configurations.getStringProperty("trafficBandwidthTransThree","trafficBandwidthTransThree"); + public static final String TRAFFIC_BANDWIDTH_TRANS_FOUR=Configurations.getStringProperty("trafficBandwidthTransFour","trafficBandwidthTransFour"); 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"); diff --git a/src/main/java/com/nis/util/excel/ExcelCsv.java b/src/main/java/com/nis/util/excel/ExcelCsv.java index 2e1747e48..fcabd9363 100644 --- a/src/main/java/com/nis/util/excel/ExcelCsv.java +++ b/src/main/java/com/nis/util/excel/ExcelCsv.java @@ -26,6 +26,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.google.common.collect.Lists; import com.nis.util.DictUtils; +import com.nis.util.Encodes; import com.nis.util.Reflections; import com.nis.util.StringUtil; @@ -381,6 +382,8 @@ public class ExcelCsv { private static void writeRow(String data, BufferedWriter csvWriter) throws Exception { // 写入文件内容 + //Html 解码 + data = Encodes.unescapeHtml(data.toString()); String [] datas=data.split(","); for (String tag : datas) { StringBuffer sb = new StringBuffer(); @@ -399,7 +402,7 @@ public class ExcelCsv { if(isDate(tag)){ tag=tag + "\t"; } - + } String rowStr = sb.append("\"").append(tag==null?"":tag).append("\",").toString(); csvWriter.write(rowStr); diff --git a/src/main/java/com/nis/web/controller/basics/PolicyGroupController.java b/src/main/java/com/nis/web/controller/basics/PolicyGroupController.java index 1dad01ccb..41c4c4300 100644 --- a/src/main/java/com/nis/web/controller/basics/PolicyGroupController.java +++ b/src/main/java/com/nis/web/controller/basics/PolicyGroupController.java @@ -34,7 +34,6 @@ public class PolicyGroupController extends BaseController { Page pageCondition = new Page(request, response,"r"); Page page = policyGroupInfoService.findPolicyGroupInfoList(pageCondition,cfg); - model.addAttribute("cfg", cfg); model.addAttribute("page", page); return "/basics/policyGroupList"; @@ -49,11 +48,12 @@ public class PolicyGroupController extends BaseController { */ //@RequiresPermissions(value={"basics:classification:add","basics:attribute:add","basics:label:add","basics:classification:edit","basics:attribute:edit","basics:label:edit","basics:classification:view","basics:attribute:view","basics:label:view"},logical=Logical.OR) @RequestMapping(value={"/policyGroupForm"}) - public String form(String ids,Model model,String doAction,RedirectAttributes redirectAttributes) { + public String form(Integer groupType,String ids,Model model,String doAction,RedirectAttributes redirectAttributes) { PolicyGroupInfo policyGroup=new PolicyGroupInfo(); if(!StringUtil.isEmpty(ids)){ policyGroup=policyGroupInfoService.getById(Integer.parseInt(ids)); } + policyGroup.setGroupType(groupType); model.addAttribute("_cfg", policyGroup); return "/basics/policyGroupForm"; } @@ -64,7 +64,7 @@ public class PolicyGroupController extends BaseController { //@RequiresPermissions(value={"basics:classification:add","basics:attribute:add","basics:label:add","basics:classification:edit","basics:attribute:edit","basics:label:edit"},logical=Logical.OR) @RequestMapping(value = "saveOrUpdate") public String saveOrUpdate(PolicyGroupInfo cfg,Model model, - RedirectAttributes redirectAttributes,String itType) { + RedirectAttributes redirectAttributes,String itType,Integer groupType) { try { policyGroupInfoService.saveOrUpdate(cfg); @@ -74,7 +74,7 @@ public class PolicyGroupController extends BaseController { addMessage(redirectAttributes,"error","save_failed"); } - return "redirect:" + adminPath + "/basics/policyGroup/policyGroupList"; + return "redirect:" + adminPath + "/basics/policyGroup/policyGroupList?groupType="+groupType; } @@ -86,7 +86,7 @@ public class PolicyGroupController extends BaseController { */ //@RequiresPermissions(value={"basics:classification:del","basics:attribute:del","basics:label:del"},logical=Logical.OR) @RequestMapping(value={"delete"}) - public String delete(RedirectAttributes redirectAttributes, String ids,int isValid) { + public String delete(RedirectAttributes redirectAttributes, Integer groupType,String ids,int isValid) { try { policyGroupInfoService.deldete(ids,isValid); addMessage(redirectAttributes,"success","delete_success"); @@ -94,7 +94,7 @@ public class PolicyGroupController extends BaseController { logger.error("删除失败",e); addMessage(redirectAttributes,"error","delete_failed"); } - return "redirect:" + adminPath + "/basics/policyGroup/policyGroupList"; + return "redirect:" + adminPath + "/basics/policyGroup/policyGroupList?groupType="+groupType; } @RequestMapping(value="ajaxServiceIdState",method=RequestMethod.POST) @ResponseBody @@ -121,7 +121,7 @@ public class PolicyGroupController extends BaseController { if(cfg.getGroupId() != null){ PolicyGroupInfo policyGroup = policyGroupInfoService.getInfoByAsnNo(cfg); - if(policyGroup != null && policyGroup.getAsnNo().equals(cfg.getAsnNo()) ){ + if(policyGroup != null &&policyGroup.getIsValid()!=0&& policyGroup.getAsnNo().equals(cfg.getAsnNo()) ){ return true; } } diff --git a/src/main/java/com/nis/web/controller/configuration/AppFeatureCfgController.java b/src/main/java/com/nis/web/controller/configuration/AppFeatureCfgController.java index 265112aac..b1e3b7154 100644 --- a/src/main/java/com/nis/web/controller/configuration/AppFeatureCfgController.java +++ b/src/main/java/com/nis/web/controller/configuration/AppFeatureCfgController.java @@ -104,6 +104,7 @@ public class AppFeatureCfgController extends BaseController { entity.setIpPortList(appMultiFeatureCfgService.getAppIpRangeCfg(entity.getCompileId(), entity.getFunctionId())); entity.setStrList(appMultiFeatureCfgService.getAppStringFeatureCfg(entity.getCompileId(), entity.getFunctionId(),null)); entity.setComplexList(appMultiFeatureCfgService.getAppComplexFeatureCfg(entity.getCompileId(), entity.getFunctionId(),null)); + entity.setNumCfgList(appMultiFeatureCfgService.getAppTcpCfg(entity.getCompileId(), entity.getFunctionId(),null)); initUpdateFormCondition(model,entity); }else{ initFormCondition(model,entity); @@ -249,6 +250,10 @@ public class AppFeatureCfgController extends BaseController { List complexList = appMultiFeatureCfgService.getAppComplexFeatureCfg(compileId,functionId,Integer.valueOf(cfgRegionCode[i])); map.put("complexList", complexList); } + if("4".equals(cfgRegionType[i])){ + List numCfgList = appMultiFeatureCfgService.getAppTcpCfg(compileId,functionId,Integer.valueOf(cfgRegionCode[i])); + map.put("numCfgList", numCfgList); + } tabList.add(map); } }else{ diff --git a/src/main/java/com/nis/web/controller/dashboard/TrafficStatisticsInfoController.java b/src/main/java/com/nis/web/controller/dashboard/TrafficStatisticsInfoController.java index 3b68d81ff..9fb9037d3 100644 --- a/src/main/java/com/nis/web/controller/dashboard/TrafficStatisticsInfoController.java +++ b/src/main/java/com/nis/web/controller/dashboard/TrafficStatisticsInfoController.java @@ -256,6 +256,34 @@ public class TrafficStatisticsInfoController extends BaseController { } return map; } + /** + * 间隔5分钟数据 + */ + @RequestMapping(value="bandwidthTransThree") + @ResponseBody + public Map bandwidthTransThree(String beginDate,String endDate){ + Map fromJsonList = new HashMap(); + Map map = new HashMap(); + //String url = Constants.DASHBOARD_URL+Constants.TRAFFIC_BANDWIDTH_TRANS_TWO; + //String url="http://192.168.11.78:8080/galaxy/service/log/v1/"+Constants.TRAFFIC_BANDWIDTH_TRANS_THREE; + //String url="http://192.168.11.78:8080/galaxy/service/log/v1/"+Constants.TRAFFIC_BANDWIDTH_TRANS_FOUR; + String url=Constants.DASHBOARD_URL+Constants.TRAFFIC_BANDWIDTH_TRANS_THREE; + //String url=Constants.DASHBOARD_URL+Constants.TRAFFIC_BANDWIDTH_TRANS_FOUR; + try { + url=urlAddDate(url,beginDate,endDate); + + String string = HttpClientUtil.get(url); + Gson gson = new GsonBuilder().create(); + fromJsonList = gson.fromJson(string, new TypeToken(){}.getType()); + logger.debug("bandwidthTransThree服务查询数据成功"); + Map result = (Map)fromJsonList.get("data"); + return result; + } catch (Exception e) { + e.printStackTrace(); + logger.error("带宽详情数据获取错误"+e); + } + return map; + } /** * 协议类型详细列表 */ diff --git a/src/main/java/com/nis/web/controller/log/ntc/HttpKeyLogController.java b/src/main/java/com/nis/web/controller/log/ntc/HttpKeyLogController.java index 783ecd011..fa6c06375 100644 --- a/src/main/java/com/nis/web/controller/log/ntc/HttpKeyLogController.java +++ b/src/main/java/com/nis/web/controller/log/ntc/HttpKeyLogController.java @@ -48,6 +48,9 @@ public class HttpKeyLogController extends BaseController { if (StringUtils.isNotBlank(log.getUrl())) { params.put("searchUrl", log.getUrl()); } + if (StringUtils.isNotBlank(log.getWebsite())) { + params.put("searchWebsite", log.getWebsite()); + } initLogSearchValue(log, params); List serviceList = DictUtils.getFunctionServiceDictList(log.getFunctionId()); @@ -102,6 +105,9 @@ public class HttpKeyLogController extends BaseController { if (StringUtils.isNotBlank(log.getUrl())) { params.put("searchUrl", log.getUrl()); } + if (StringUtils.isNotBlank(log.getWebsite())) { + params.put("searchWebsite", log.getWebsite()); + } initLogSearchValue(log, params); List serviceList = DictUtils.getFunctionServiceDictList(log.getFunctionId()); diff --git a/src/main/java/com/nis/web/controller/log/ntc/HttpLogController.java b/src/main/java/com/nis/web/controller/log/ntc/HttpLogController.java index 7afebf511..029b59b89 100644 --- a/src/main/java/com/nis/web/controller/log/ntc/HttpLogController.java +++ b/src/main/java/com/nis/web/controller/log/ntc/HttpLogController.java @@ -46,6 +46,9 @@ public class HttpLogController extends BaseController { if (StringUtils.isNotBlank(log.getUrl())) { params.put("searchUrl", log.getUrl()); } + if (StringUtils.isNotBlank(log.getWebsite())) { + params.put("searchWebsite", log.getWebsite()); + } initLogSearchValue(log, params); List serviceList = DictUtils.getFunctionServiceDictList(log.getFunctionId()); @@ -111,6 +114,12 @@ public class HttpLogController extends BaseController { Map params = new HashMap(); params.put("pageSize", page.getPageSize()); params.put("pageNo", page.getPageNo()); + if (StringUtils.isNotBlank(log.getUrl())) { + params.put("searchUrl", log.getUrl()); + } + if (StringUtils.isNotBlank(log.getWebsite())) { + params.put("searchWebsite", log.getWebsite()); + } initLogSearchValue(log, params); List serviceList = DictUtils.getFunctionServiceDictList(log.getFunctionId()); diff --git a/src/main/java/com/nis/web/dao/configuration/AppMultiFeatureCfgDao.java b/src/main/java/com/nis/web/dao/configuration/AppMultiFeatureCfgDao.java index 34dacf6a7..544cedd5f 100644 --- a/src/main/java/com/nis/web/dao/configuration/AppMultiFeatureCfgDao.java +++ b/src/main/java/com/nis/web/dao/configuration/AppMultiFeatureCfgDao.java @@ -56,6 +56,12 @@ public interface AppMultiFeatureCfgDao { //增强字符串类特征配置 public List getAppComplexFeatureCfg(@Param("compileId")Integer compileId, @Param("functionId")Integer functionId,@Param("cfgRegionCode")Integer cfgRegionCode); + //数值类特征配置 + public List getAppTcpCfg(@Param("compileId")Integer compileId, + @Param("functionId")Integer functionId,@Param("cfgRegionCode")Integer cfgRegionCode); + public int insertAppTcpCfg(AppTcpCfg entity); + public void deleteAppTcpCfg(BaseCfg entity); + public int insertAppComplexFeatureCfg(AppComplexFeatureCfg entity); public void deleteAppComplexFeatureCfg(BaseCfg entity); //IP RANGE配置 diff --git a/src/main/java/com/nis/web/dao/configuration/AppMultiFeatureCfgDao.xml b/src/main/java/com/nis/web/dao/configuration/AppMultiFeatureCfgDao.xml index e450dcd85..8c2bb17ed 100644 --- a/src/main/java/com/nis/web/dao/configuration/AppMultiFeatureCfgDao.xml +++ b/src/main/java/com/nis/web/dao/configuration/AppMultiFeatureCfgDao.xml @@ -137,6 +137,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + r.CFG_ID,r.CFG_DESC,r.ACTION,r.IS_VALID,r.IS_AUDIT, @@ -181,6 +211,13 @@ #{classify,jdbcType=VARCHAR},#{attribute,jdbcType=VARCHAR},#{lable,jdbcType=VARCHAR}, #{areaEffectiveIds,jdbcType=VARCHAR},#{functionId,jdbcType=INTEGER} + + r.CFG_ID, r.APP_CODE,r.BEHAV_CODE,r.SPEC_SERVICE_ID,r.CFG_DESC,r.ACTION,r.IS_VALID,r.IS_AUDIT, + r.CREATOR_ID,r.CREATE_TIME,r.EDITOR_ID,r.EDIT_TIME,r.AUDITOR_ID,r.AUDIT_TIME, + r.SERVICE_ID,r.REQUEST_ID,r.COMPILE_ID,r.IS_AREA_EFFECTIVE,r.CLASSIFY, + r.ATTRIBUTE,r.LABLE,r.AREA_EFFECTIVE_IDS,r.RATELIMIT,r.FUNCTION_ID,r.CFG_TYPE,r.CFG_REGION_CODE, + r.low_boundary,r.up_boundary as upBoundary,r.do_log + + + @@ -509,6 +556,24 @@ #{userRegion3,jdbcType=VARCHAR},#{userRegion4,jdbcType=VARCHAR},#{userRegion5,jdbcType=VARCHAR} ) + + + + SELECT LAST_INSERT_ID() + + insert into app_session_cfg ( + APP_CODE,BEHAV_CODE,SPEC_SERVICE_ID,CFG_DESC,ACTION,IS_VALID,IS_AUDIT, + CREATOR_ID,CREATE_TIME,EDITOR_ID,EDIT_TIME,AUDITOR_ID,AUDIT_TIME, + SERVICE_ID,REQUEST_ID,COMPILE_ID,IS_AREA_EFFECTIVE,CLASSIFY, + ATTRIBUTE,LABLE,AREA_EFFECTIVE_IDS,FUNCTION_ID,CFG_TYPE,CFG_REGION_CODE, + low_boundary,up_boundary,DO_LOG + )values ( + , + #{cfgType,jdbcType=VARCHAR},#{cfgRegionCode,jdbcType=INTEGER}, + #{lowBoundary,jdbcType=INTEGER},#{upBoundary,jdbcType=INTEGER}, + #{doLog,jdbcType=INTEGER} + ) + delete from app_ip_range_cfg where compile_id=#{compileId} and function_id=#{functionId} @@ -521,6 +586,10 @@ delete from app_complex_feature_cfg where compile_id=#{compileId} and function_id=#{functionId} + + + delete from app_session_cfg where compile_id=#{compileId} and function_id=#{functionId} + +
@@ -77,7 +89,7 @@ $(function(){
-
+ <%--
@@ -91,7 +103,7 @@ $(function(){
-
+
--%>
diff --git a/src/main/webapp/WEB-INF/views/basics/policyGroupList.jsp b/src/main/webapp/WEB-INF/views/basics/policyGroupList.jsp index 427afdd8e..5c1b28b69 100644 --- a/src/main/webapp/WEB-INF/views/basics/policyGroupList.jsp +++ b/src/main/webapp/WEB-INF/views/basics/policyGroupList.jsp @@ -8,6 +8,8 @@ //搜索框提示语初始化 if("${cfg.groupName}"){ $("#intype").val("${cfg.groupName}"); + }else if(''!="${cfg.asnNo}"){ + $("#intype").val("${cfg.asnNo}"); }else{ $("#intype").attr("placeholder"," "+$("#seltype").find("option:selected").text()); } @@ -116,14 +118,25 @@ <%-- --%> <%----%>

- + + + + + + + + + + + +

@@ -133,13 +146,14 @@ +
-
+ <%--
-
+
--%>
@@ -164,7 +178,9 @@ + +
@@ -180,8 +196,8 @@
<%-- --%> - - + + <%-- --%> @@ -245,7 +261,9 @@ - + + + @@ -269,7 +287,9 @@ + ${cfg.asnNo} + ${fns:abbr(cfg.description,20)} ${cfg.creatorName } diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appMultiFeatureCfgForm.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appMultiFeatureCfgForm.jsp index 55e371efa..6f13ddcfa 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appMultiFeatureCfgForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appMultiFeatureCfgForm.jsp @@ -50,6 +50,20 @@ $(function(){ } } }); + var maxTtl=$("[name$=upBoundary]").val(); + maxTtl = parseInt(maxTtl); + var minTtl=$("[name$=lowBoundary]").val(); + minTtl = parseInt(minTtl); + if(maxTtl > 4294967295){ + message=""; + $("div[for=upBoundary]").html(""); + flag=false; + } + if(minTtl>maxTtl){ + message=""; + $("div[for=upBoundary]").html(""); + flag=false; + } if(flag){ //将disable属性的元素删除 $(".disabled").each(function(){ @@ -202,7 +216,8 @@ var delContent = function(contentClassName, addBtnClassName) { - + + @@ -306,7 +321,7 @@ var delContent = function(contentClassName, addBtnClassName) { onClick="addContent(this,'${tabName}')" title="add"> + value="strList[${strCfgIndex}]"> <%-- --%> @@ -324,8 +339,8 @@ var delContent = function(contentClassName, addBtnClassName) {
- + @@ -334,8 +349,8 @@ var delContent = function(contentClassName, addBtnClassName) { class="row boxSolid ${tabName}${status.index} hidden disabled"> <%@include file="/WEB-INF/views/cfg/complexCfgForm.jsp"%>
- + @@ -347,7 +362,61 @@ var delContent = function(contentClassName, addBtnClassName) { <%@include file="/WEB-INF/views/cfg/complexCfgForm.jsp"%>
- + + + + + + +

+ + hidden" + onClick="addContent(this,'${tabName}')" title="add"> +

+ + <%-- --%> + + + + + + + +
+ <%@include file="/WEB-INF/views/cfg/numCfgForm.jsp"%> + + + +
+ + +
+
+
+ + + + +
+ + +
1 and status.index>0}"> hidden disabled"> + + + + <%@include file="/WEB-INF/views/cfg/numCfgForm.jsp"%> +
+
diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appSubFeatureList.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appSubFeatureList.jsp index 909db24df..f23e4ebd7 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appSubFeatureList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appSubFeatureList.jsp @@ -37,7 +37,7 @@
- + <%-- _${regionStatus.index} --%>
@@ -357,6 +357,24 @@ + + +
+
+
+
+ +
+
+
+
+ +
+
+
+
+
+
diff --git a/src/main/webapp/WEB-INF/views/cfg/ddosIpCfgForm.jsp b/src/main/webapp/WEB-INF/views/cfg/ddosIpCfgForm.jsp index af45a3927..1b102cf48 100644 --- a/src/main/webapp/WEB-INF/views/cfg/ddosIpCfgForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/ddosIpCfgForm.jsp @@ -14,6 +14,14 @@ $(function(){ $("#bpsThreadshold").attr("disabled","true"); $("#ppsThreadshold").attr("disabled","true"); } + if($("[name='protocol']").val()==0){ + var _ddosProtocol=$("#antiddosProtocol").val(); + if(_ddosProtocol=="TCP_SYN"){ + $("[name='protocol']").val(6); + }else if(_ddosProtocol=="UDP_NTP"||_ddosProtocol=="UDP_DNS"){ + $("[name='protocol']").val(17); + } + } $("#antiddosProtocol").on("change",function(){ var ddosProtocol=$("#antiddosProtocol").val(); if(ddosProtocol==null||ddosProtocol==""){ @@ -27,6 +35,11 @@ $(function(){ $("#bpsThreadshold").removeAttr("disabled"); $("#ppsThreadshold").removeAttr("disabled"); } + if(ddosProtocol=="TCP_SYN"){ + $("[name='protocol']").val(6); + }else if(ddosProtocol=="UDP_NTP"||ddosProtocol=="UDP_DNS"){ + $("[name='protocol']").val(17); + } }) $(".action").on("change", function() { diff --git a/src/main/webapp/WEB-INF/views/cfg/numCfgForm.jsp b/src/main/webapp/WEB-INF/views/cfg/numCfgForm.jsp new file mode 100644 index 000000000..f3d5a6181 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/cfg/numCfgForm.jsp @@ -0,0 +1,83 @@ +<%@ page contentType="text/html;charset=UTF-8"%> +<%@ include file="/WEB-INF/include/taglib.jsp"%> + + + + + +<%-- + --%> + + + + + + +<%-- + --%> + +
+
+ +
+
+
+ +
+
+
+ +
+ + +
+
+
+
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+ + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/cfg/proxy/spoofingIpPool/form.jsp b/src/main/webapp/WEB-INF/views/cfg/proxy/spoofingIpPool/form.jsp index 498b07d90..ab72302e6 100644 --- a/src/main/webapp/WEB-INF/views/cfg/proxy/spoofingIpPool/form.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/proxy/spoofingIpPool/form.jsp @@ -27,7 +27,7 @@ $(function(){

- +

@@ -51,6 +51,7 @@ $(function(){ + @@ -153,7 +154,7 @@ $(function(){
- <%@include file="/WEB-INF/include/form/areaInfo.jsp"%> + <%-- <%@include file="/WEB-INF/include/form/areaInfo.jsp"%> --%>
<%@include file="/WEB-INF/include/form/basicInfo.jsp" %> diff --git a/src/main/webapp/WEB-INF/views/cfg/proxy/spoofingIpPool/list.jsp b/src/main/webapp/WEB-INF/views/cfg/proxy/spoofingIpPool/list.jsp index 40871e17c..0909070b7 100644 --- a/src/main/webapp/WEB-INF/views/cfg/proxy/spoofingIpPool/list.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/proxy/spoofingIpPool/list.jsp @@ -73,7 +73,7 @@

- +

diff --git a/src/main/webapp/WEB-INF/views/dashboard/trafficBandwidthList.jsp b/src/main/webapp/WEB-INF/views/dashboard/trafficBandwidthList.jsp index 5c869c885..d2da130d6 100644 --- a/src/main/webapp/WEB-INF/views/dashboard/trafficBandwidthList.jsp +++ b/src/main/webapp/WEB-INF/views/dashboard/trafficBandwidthList.jsp @@ -91,15 +91,15 @@ $(document).ready(function(){ $("#endDate").val(endh); var unitType=$("#unitType").val(); changeBandwidth(unitType,starth,endh); - changeBandwidth2(unitType,starth,endh); + //changeBandwidth2(unitType,starth,endh); $("#unitType").on("change",function(){ changeBandwidth($("#unitType").val(),$("#beginDate").val(),$("#endDate").val()); - changeBandwidth2($("#unitType").val(),$("#beginDate").val(),$("#endDate").val()); + // changeBandwidth2($("#unitType").val(),$("#beginDate").val(),$("#endDate").val()); }); setInterval(function(){ changeBandwidth($("#unitType").val(),$("#beginDate").val(),new Date().Format("yyyy-MM-dd HH:mm:00")); - changeBandwidth2($("#unitType").val(),$("#beginDate").val(),new Date().Format("yyyy-MM-dd HH:mm:00")); + // changeBandwidth2($("#unitType").val(),$("#beginDate").val(),new Date().Format("yyyy-MM-dd HH:mm:00")); },500000);// 五分钟调用一次 //筛选功能初始化 @@ -122,12 +122,12 @@ function searchList(){ window.location.reload(); }else{ changeBandwidth($("#unitType").val(),start,end); - changeBandwidth2($("#unitType").val(),start,end); +// changeBandwidth2($("#unitType").val(),start,end); } } // 默认显示四条线 ip46,tcp,udp -function rankItemChanged(addrType,transType,beginDate,endDate){ +/* function rankItemChanged(addrType,transType,beginDate,endDate){ loading(); var result=null; $.ajax({ @@ -177,32 +177,70 @@ function rankItemChanged2(addrType,transType,beginDate,endDate){ } }); return result2; +} */ +function rankItemChanged3(beginDate,endDate){ + loading(); + var result=null; + $.ajax({ + url:"${ctx}/dashboard/traffic/bandwidthTransThree", + type:"get", + data:{"beginDate":beginDate,"endDate":endDate}, + dataType:"json", + async:false, + timeout:40000, + success:function (data){ + if(data!=null){ + console.log(4444); + result=data; + } + closeTip(); + }, + error: function(data, textStatus, errorThrown){ + closeTip(); + }, + complete:function(XMLHttpRequest,status){//超时设置 + closeTip(); + } + }); + return result; } // 根据单位切换数据 function changeBandwidth(unitType,beginDate,endDate){ - var ipv4=rankItemChanged(4,null,beginDate,endDate); + /* var ipv4=rankItemChanged(4,null,beginDate,endDate); var ipv6=rankItemChanged(6,null,beginDate,endDate); var transTcp=rankItemChanged(null,6,beginDate,endDate); - var transUdp=rankItemChanged(null,17,beginDate,endDate); - var xdata=ipv4.statTime; - if(unitType=="Gbps"){ - ipv4data=ipv4.gbps; - ipv6data=ipv6.gbps; - tcpdata=transTcp.gbps; - udpdata=transUdp.gbps; - } - if(unitType=="pps"){ - ipv4data=ipv4.pps; - ipv6data=ipv6.pps; - tcpdata=transTcp.pps; - udpdata=transUdp.pps; - - } - if(unitType=="linkNumber"){ - ipv4data=ipv4.linkNum; - ipv6data=ipv6.linkNum; - tcpdata=transTcp.linkNum; - udpdata=transUdp.linkNum; + var transUdp=rankItemChanged(null,17,beginDate,endDate); */ + var data=rankItemChanged3(beginDate,endDate); + var xdata=null; + var ipv4data=null; + var ipv6data=null; + var tcpdata=null; + var udpdata=null; + var ipv4data2=null; + var ipv6data2=null; + var tcpdata2=null; + var udpdata2=null; + if(Object.keys(data).length>0){ + xdata=data.ipv4Type1[0].statTime; + if(unitType=="Gbps"){ + ipv4data=data.ipv4Type1[0].gbps; + ipv6data=data.ipv6Type1[0].gbps; + tcpdata=data.trans6Type1[0].gbps; + udpdata=data.trans17Type1[0].gbps; + } + if(unitType=="pps"){ + ipv4data=data.ipv4Type1.pps; + ipv6data=data.ipv6Type1.pps; + tcpdata=data.trans6Type1.pps; + udpdata=data.trans17Type1.pps; + + } + if(unitType=="linkNumber"){ + ipv4data=data.ipv4Type1.linkNum; + ipv6data=data.ipv6Type1.linkNum; + tcpdata=data.trans6Type1.linkNum; + udpdata=data.trans17Type1.linkNum; + } } var series=new Array(); series.push({ @@ -219,6 +257,44 @@ function changeBandwidth(unitType,beginDate,endDate){ data: udpdata }); showBandwidthChart("chart1",unitType,xdata,series,"Astana"); + + if(Object.keys(data).length>0){ + if(unitType=="Gbps"){ + ipv4data2=data.ipv4Type2[0].gbps; + ipv6data2=data.ipv6Type2[0].gbps; + tcpdata2=data.trans6Type2[0].gbps; + udpdata2=data.trans17Type2[0].gbps; + } + if(unitType=="pps"){ + ipv4data2=data.ipv4Type2.pps; + ipv6data2=data.ipv6Type2.pps; + tcpdata2=data.trans6Type2.pps; + udpdata2=data.trans17Type2.pps; + + } + if(unitType=="linkNumber"){ + ipv4data2=data.ipv4Type2.linkNum; + ipv6data2=data.ipv6Type2.linkNum; + tcpdata2=data.trans6Type2.linkNum; + udpdata2=data.trans17Type2.linkNum; + } + } + var series=new Array(); + series.push({ + name: "IPv4", + data: ipv4data2 + },{ + name: "IPv6", + data: ipv6data2 + },{ + name: "TCP", + data: tcpdata2 + },{ + name: "UDP", + data: udpdata2 + }); + showBandwidthChart("chart2",unitType,xdata,series,"Alamty"); + } // 根据单位切换数据 function changeBandwidth2(unitType,beginDate,endDate){ diff --git a/src/main/webapp/WEB-INF/views/log/ntc/httpKeyList.jsp b/src/main/webapp/WEB-INF/views/log/ntc/httpKeyList.jsp index f80f80425..8ce7ecc26 100644 --- a/src/main/webapp/WEB-INF/views/log/ntc/httpKeyList.jsp +++ b/src/main/webapp/WEB-INF/views/log/ntc/httpKeyList.jsp @@ -241,9 +241,19 @@
+
+
+ +
+
+ + +
+
+ diff --git a/src/main/webapp/WEB-INF/views/log/ntc/httpList.jsp b/src/main/webapp/WEB-INF/views/log/ntc/httpList.jsp index fbfb1d6b2..acee93873 100644 --- a/src/main/webapp/WEB-INF/views/log/ntc/httpList.jsp +++ b/src/main/webapp/WEB-INF/views/log/ntc/httpList.jsp @@ -97,7 +97,17 @@ - + + + + + + + + + + + @@ -215,9 +225,19 @@
+
+
+ +
+
+ + +
+
+