From 520a33603725b0e7353f1b25ba6c48aa10d9c496 Mon Sep 17 00:00:00 2001 From: wangxin Date: Fri, 28 Sep 2018 10:19:50 +0800 Subject: [PATCH 01/25] =?UTF-8?q?=E6=B3=A8=E9=87=8A=E6=8E=89${=5Fcfg.behav?= =?UTF-8?q?Code}=E7=9A=84=E5=88=A4=E6=96=AD=EF=BC=8C=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=97=B6=E7=9B=B4=E6=8E=A5=E8=B0=83=E7=94=A8?= =?UTF-8?q?ajax=E6=B7=BB=E5=8A=A0=E8=A1=8C=E4=B8=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/webapp/WEB-INF/views/cfg/app/appPolicyCfgForm.jsp | 4 ++-- .../webapp/WEB-INF/views/cfg/encryptedtunnelbehav/form.jsp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appPolicyCfgForm.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appPolicyCfgForm.jsp index a6bb41603..88e4d621a 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appPolicyCfgForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appPolicyCfgForm.jsp @@ -97,9 +97,9 @@ $(function(){ }, errorContainer: "#messageBox", }); - if('${_cfg.behavCode}'){ + //if('${_cfg.behavCode}'){ ajaxBehaviour($("#specServiceIdId").val()); - } + //} $("#specServiceIdId").on("change",function(){ ajaxBehaviour($(this).val()); }); diff --git a/src/main/webapp/WEB-INF/views/cfg/encryptedtunnelbehav/form.jsp b/src/main/webapp/WEB-INF/views/cfg/encryptedtunnelbehav/form.jsp index 7c4dc8642..e79176b1c 100644 --- a/src/main/webapp/WEB-INF/views/cfg/encryptedtunnelbehav/form.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/encryptedtunnelbehav/form.jsp @@ -85,9 +85,9 @@ $(function(){ }, errorContainer: "#messageBox", }); - if('${_cfg.behavCode}'){ + //if('${_cfg.behavCode}'){ ajaxBehaviour($("#specServiceIdId").val()); - } + //} $("#specServiceIdId").on("change",function(){ ajaxBehaviour($(this).val()); }); From 1fc335f7500b8345ce4f56195eda103c64dc180c Mon Sep 17 00:00:00 2001 From: duandongmei Date: Fri, 28 Sep 2018 11:27:40 +0800 Subject: [PATCH 02/25] =?UTF-8?q?=E5=AF=BC=E5=85=A5=E7=95=8C=E9=9D=A2?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E6=9B=B4=E6=94=B9=20=E6=98=AF=E5=90=A6?= =?UTF-8?q?=E8=A1=A8=E8=BE=BE=E5=BC=8F=E5=92=8C=E6=98=AF=E5=90=A6=E5=8D=81?= =?UTF-8?q?=E5=85=AD=E8=BF=9B=E5=88=B6=E5=88=9D=E5=A7=8B=E5=8C=96=E9=A1=BA?= =?UTF-8?q?=E5=BA=8F=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WEB-INF/views/cfg/common/ipList.jsp | 3 +- .../webapp/static/global/css/components.css | 36 +++++++++++-- .../plugins/bootstrap/css/bootstrap.css | 11 ++-- .../webapp/static/global/scripts/common.js | 52 ++++++++++++++++--- 4 files changed, 86 insertions(+), 16 deletions(-) diff --git a/src/main/webapp/WEB-INF/views/cfg/common/ipList.jsp b/src/main/webapp/WEB-INF/views/cfg/common/ipList.jsp index d1af2023a..7929a3043 100644 --- a/src/main/webapp/WEB-INF/views/cfg/common/ipList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/common/ipList.jsp @@ -331,8 +331,9 @@ +
- + diff --git a/src/main/webapp/static/global/css/components.css b/src/main/webapp/static/global/css/components.css index 7c707f2ab..5d9818298 100644 --- a/src/main/webapp/static/global/css/components.css +++ b/src/main/webapp/static/global/css/components.css @@ -5243,8 +5243,11 @@ Form Layouts .portlet-form .form-section, .form .form-section { margin: 12px 0px 14px 0px; - padding-bottom: 5px; - border-bottom: 1px solid #e7ecf1; } +padding: 5px; +border: solid #e7ecf1; +border-width: 1px 1px 0 1px; +width: 100%; +background: #e7ecf1; } .form-fit .portlet-form .form-section, .form-fit .form .form-section { margin-left: 20px; @@ -5843,7 +5846,7 @@ Custom color buttons /* Form uneditable input */ .uneditable-input { padding: 6px 12px; - min-width: 206px; + width: 206px; font-size: 14px; font-weight: normal; height: 34px; @@ -5853,6 +5856,14 @@ Custom color buttons -webkit-box-shadow: none; box-shadow: none; -webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + -o-text-overflow: ellipsis; + -icab-text-overflow: ellipsis; + -khtml-text-overflow: ellipsis; + -moz-text-overflow: ellipsis; + -webkit-text-overflow: ellipsis; transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; } .form-control-static { @@ -22279,7 +22290,7 @@ Color library demo -/*锟斤拷锟斤拷锟斤拷式*/ +/*閿熸枻鎷烽敓鏂ゆ嫹閿熸枻鎷峰紡*/ .sort-column { @@ -22551,7 +22562,7 @@ transition: background-color .1s ease-in-out; /* END SHOW MORE CSS**/ -/**鐎涙劙鍘ょ純顕�锟藉銆嶉崡鈩冪壉瀵拷**/ +/**閻庢稒鍔欓崢銈囩磾椤曪拷閿熻棄顦甸妴宥夊础閳╁啰澹夌�顕嗘嫹**/ .tabInfo { border: 1px solid #c2cad8; padding: 5px; @@ -22592,4 +22603,19 @@ span[id^='close']{ background:url(../img/loading.gif) no-repeat center center; opacity:0.7; filter:progid:DXImageTransform.Microsoft.Alpha(opacity=70); +} +.border-top { + border-top: 1px solid; + padding-top:5px; +} +.border-top + .form-section{ + margin-top:-25px; + width: 100%; + background: #e7ecf1; + border:none +} +.form-section + .boxSolid { + border: 1px solid #eeeeee; + margin-top:-14px; + margin-bottom:10px } \ No newline at end of file diff --git a/src/main/webapp/static/global/plugins/bootstrap/css/bootstrap.css b/src/main/webapp/static/global/plugins/bootstrap/css/bootstrap.css index 1ee44dda8..2c36da4fa 100644 --- a/src/main/webapp/static/global/plugins/bootstrap/css/bootstrap.css +++ b/src/main/webapp/static/global/plugins/bootstrap/css/bootstrap.css @@ -176,7 +176,8 @@ optgroup { table { border-collapse: collapse; - border-spacing: 0; } + border-spacing: 0; + } td, th { @@ -1542,7 +1543,7 @@ pre { clear: both; } .col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 { - position: relative; + position: relative; min-height: 1px; /* padding-left: 15px; padding-right: 15px; */ @@ -2038,7 +2039,7 @@ th { width: 100%; max-width: 100%; margin-bottom: 10px; - margin-top: 10px; + margin-top: -1px; } .table > thead > tr > th, .table > thead > tr > td, @@ -2230,6 +2231,7 @@ table th[class*="col-"] { position: fixed; right: 14px; left: 14px; + margin-top: 20px; } @media screen and (max-width: 767px) { .table-responsive { @@ -5172,7 +5174,8 @@ button.close { .modal-body { position: relative; - padding: 15px; } + /* padding: 15px; */ + } .modal-footer { padding: 15px; diff --git a/src/main/webapp/static/global/scripts/common.js b/src/main/webapp/static/global/scripts/common.js index f2dea5e79..9c2a95215 100644 --- a/src/main/webapp/static/global/scripts/common.js +++ b/src/main/webapp/static/global/scripts/common.js @@ -9,16 +9,16 @@ $(function(){ protocol:[], direction:[] }); + $("input[name$='isCaseSenstive']").on("change",function(){ + setIsHexBin(this); + }); + setHexCaseSenstive(); $("select[name$='isHexbin']").each(function(){ setIsHexBin(this); }); $("input[name$='isHex']").on("change",function(){ setIsHexBin(this); }); - $("input[name$='isCaseSenstive']").on("change",function(){ - setIsHexBin(this); - }); - setHexCaseSenstive(); $("a[name=viewLogInfo]>i").on("click",function(){ var html = "
"; $(this).parents("tr").find("td").each(function(index,element){ @@ -360,6 +360,7 @@ $(function(){ $(".action").on("change", function() { $("#serviceId").val($(this).attr("serviceId")); $("#protocolId").val($(this).attr("protocolId")); + switchAction($(this).val()); }); // 校验搜索条件里的时间选框,不允许起始时间晚于终止时间 $("#searchForm").validate({ @@ -535,6 +536,21 @@ $(function(){ $(this).val(0); } }); + //配置修改时已经展开的域上的加号隐藏 + $(".boxSolid:visible").each(function(){ + $(this).prev("h4").find(".glyphicon-plus").addClass("hidden"); + }); + //IP域修改时默认展开,不显示show more + if($("input[name='compileId']")&&$("input[name='compileId']").val()!=0&&($(".btn-red-hollow").parents(".boxSolid").is(":visible")||$("input[name$='cfgRegionCode']").length==1)){ + $(".port").removeClass("hidden").removeClass("disabled"); + $(".destPort").removeClass("hidden").removeClass("disabled"); + $(".protocol").removeClass("hidden").removeClass("disabled"); + $(".btn-red-hollow").addClass("hidden"); + } + + $("#messageBox .close").on("click",function(){ + heightDiv(1); + }) }); window.onload=function(){ $("span[id^=open]").click(function(){ @@ -584,6 +600,21 @@ window.onload=function(){ heightDiv(); },500); + if($('.table-responsive')){ + var tableCont = document.querySelector('.table-responsive'); + if(tableCont !=null && tableCont!=''){ + function scrollHandle (e){ + var scrollTop = this.scrollTop; + $('th').css('transform','translateY(' + scrollTop + 'px)'); + $('thead tr').css('z-index','2147482468'); + $('thead tr').css('position','relative'); + $('th').css('border','1px solid rgb(255, 255, 255)'); + $('th').css('background-clip','padding-box'); + } + tableCont.addEventListener('scroll',scrollHandle); + $('#contentTable').attr("margin-top",'0px'); + } + } } var setInterceptDefaultInfo=function(cfgId){ var action=$("input[name='action']:checked").val(); @@ -1823,14 +1854,23 @@ var initCommIpVal=function(){ } } -function heightDiv(){ + +function heightDiv(type){ var hei=document.documentElement.clientHeight; - hei=hei-71; + hei=hei-91; var rowheigth=0; if($('.row')){ rowheigth=$('.row').height(); hei=hei-rowheigth; } + if(type != 1){ + if($("#messageBox")){ + var messageH=$("#messageBox").height(); + if(messageH > 0){ + hei=hei-messageH-52; + } + } + } if($('.table-responsive')){ $('.table-responsive').css({'height':hei+'px'}); } From ab50f585609200a23c94bf028b41073652407880 Mon Sep 17 00:00:00 2001 From: wangxin Date: Fri, 28 Sep 2018 11:49:53 +0800 Subject: [PATCH 03/25] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=88=A0=E9=99=A4asn?= =?UTF-8?q?=20ip=E9=AA=8C=E8=AF=81=EF=BC=8C=E5=8F=AA=E6=9C=89=E4=B8=8B?= =?UTF-8?q?=E5=8F=91=E8=BF=87=E7=9A=84asn=20ip=E9=9C=80=E8=A6=81ajax?= =?UTF-8?q?=E5=90=8E=E5=8F=B0=E5=88=A4=E6=96=AD=E3=80=82=E8=B0=83=E6=95=B4?= =?UTF-8?q?ajax=E5=88=A4=E6=96=ADsql?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/basics/AsnIpController.java | 6 +- .../com/nis/web/dao/basics/AsnIpCfgDao.java | 2 +- .../com/nis/web/dao/basics/AsnIpCfgDao.xml | 2 +- .../web/service/basics/AsnIpCfgService.java | 9 +- src/main/webapp/WEB-INF/tags/sys/delRow.tag | 567 +++++++++--------- 5 files changed, 296 insertions(+), 290 deletions(-) diff --git a/src/main/java/com/nis/web/controller/basics/AsnIpController.java b/src/main/java/com/nis/web/controller/basics/AsnIpController.java index 9c30be14e..d3d8a4dc6 100644 --- a/src/main/java/com/nis/web/controller/basics/AsnIpController.java +++ b/src/main/java/com/nis/web/controller/basics/AsnIpController.java @@ -120,9 +120,9 @@ public class AsnIpController extends BaseController{ } @RequestMapping(value="ajaxIsLast",method=RequestMethod.POST) @ResponseBody - public boolean ajaxIsLast(Model model,@RequestParam(required=true,value="serviceGroupIds")String serviceGroupIds){ - if(StringUtils.isNotBlank(serviceGroupIds)) { - return asnIpCfgService.hasLastIp(serviceGroupIds); + public boolean ajaxIsLast(Model model,@RequestParam(required=true,value="serviceGroupIds")String serviceGroupIds,@RequestParam(required=true,value="ids")String ids){ + if(StringUtils.isNotBlank(serviceGroupIds)&&StringUtils.isNotBlank(ids)) { + return asnIpCfgService.hasLastIp(serviceGroupIds,ids); } return false; } diff --git a/src/main/java/com/nis/web/dao/basics/AsnIpCfgDao.java b/src/main/java/com/nis/web/dao/basics/AsnIpCfgDao.java index 17f0787d2..9b16b1019 100644 --- a/src/main/java/com/nis/web/dao/basics/AsnIpCfgDao.java +++ b/src/main/java/com/nis/web/dao/basics/AsnIpCfgDao.java @@ -18,5 +18,5 @@ public interface AsnIpCfgDao extends CrudDao{ public List findAllList(AsnIpCfg cfg); public List findPolicyGroupInfosByType(@Param("groupId")Integer groupId); public List findOtherIps(@Param("groupId")Integer groupId,@Param("cfgId")Integer cfgId); - public List countValidIPs(@Param("ids")String ids); + public List countValidIPs(@Param("groups")String groups,@Param("ids")String ids); } diff --git a/src/main/java/com/nis/web/dao/basics/AsnIpCfgDao.xml b/src/main/java/com/nis/web/dao/basics/AsnIpCfgDao.xml index b63525dfd..94e20ea0e 100644 --- a/src/main/java/com/nis/web/dao/basics/AsnIpCfgDao.xml +++ b/src/main/java/com/nis/web/dao/basics/AsnIpCfgDao.xml @@ -387,7 +387,7 @@ select 1 from asn_ip_cfg where is_valid !=-1 and asn_ip_group in(${ids}) limit 1 \ No newline at end of file diff --git a/src/main/java/com/nis/web/service/basics/AsnIpCfgService.java b/src/main/java/com/nis/web/service/basics/AsnIpCfgService.java index b579046a5..5689593e8 100644 --- a/src/main/java/com/nis/web/service/basics/AsnIpCfgService.java +++ b/src/main/java/com/nis/web/service/basics/AsnIpCfgService.java @@ -178,14 +178,17 @@ public class AsnIpCfgService extends CrudService, AsnIpCfg> { * @param serviceGroupIds * @return */ - public boolean hasLastIp(String serviceGroupIds) { + public boolean hasLastIp(String serviceGroupIds,String ids) { // TODO Auto-generated method stub for(String groupId:serviceGroupIds.split(",")) { Long.parseLong(groupId); } - List countList=asnIpCfgDao.countValidIPs(serviceGroupIds); + List countList=asnIpCfgDao.countValidIPs(serviceGroupIds,ids); + if(countList.size()==0) { + return true; + } for(Integer count:countList) { - if(count==1) { + if(count==0) { return true; } } diff --git a/src/main/webapp/WEB-INF/tags/sys/delRow.tag b/src/main/webapp/WEB-INF/tags/sys/delRow.tag index 2fba386a5..3d3e0f246 100644 --- a/src/main/webapp/WEB-INF/tags/sys/delRow.tag +++ b/src/main/webapp/WEB-INF/tags/sys/delRow.tag @@ -1,283 +1,286 @@ -<%@ tag language="java" pageEncoding="UTF-8"%> -<%@ include file="/WEB-INF/include/taglib.jsp"%> -<%@ attribute name="id" type="java.lang.String" required="true"%> -<%@ attribute name="url" type="java.lang.String" required="true"%> -<%@ attribute name="label" type="java.lang.String" required="false"%> -<%@ attribute name="maxRow" type="java.lang.Long" required="false"%> - - - - - - - - - - - - - - - - - - - - - - - - - - -<%-- 使用方法: 1.将本tag写在查询的form之前;2.传入table的id和controller的url --%> - \ No newline at end of file From 9ce49b9e25e38f760c13843df3c246f25143c0cf Mon Sep 17 00:00:00 2001 From: zhangwenqing Date: Fri, 28 Sep 2018 12:00:13 +0800 Subject: [PATCH 04/25] =?UTF-8?q?1.=E7=94=9F=E6=95=88=E5=8C=BA=E5=9F=9F?= =?UTF-8?q?=E4=B8=8B=E5=8F=91=E6=A0=BC=E5=BC=8F=E4=BF=AE=E6=94=B9=202.?= =?UTF-8?q?=E6=97=A5=E5=BF=97=E6=80=BB=E9=87=8F=E6=97=A5=E5=BF=97=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E6=97=B6=E9=97=B4=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../nis/domain/maat/EffectiveRangeCfg.java | 50 ++++++++++ .../java/com/nis/domain/maat/MaatCfg.java | 11 ++- src/main/java/com/nis/util/Constants.java | 4 + src/main/java/com/nis/util/StringUtils.java | 14 +++ .../nis/web/controller/BaseController.java | 15 ++- .../nis/web/dao/basics/SysDictInfoDao.java | 4 +- .../com/nis/web/dao/basics/SysDictInfoDao.xml | 18 ++++ .../service/basics/SysDictInfoService.java | 96 ++++++++++++++++--- src/main/resources/nis.properties | 4 +- 9 files changed, 194 insertions(+), 22 deletions(-) create mode 100644 src/main/java/com/nis/domain/maat/EffectiveRangeCfg.java diff --git a/src/main/java/com/nis/domain/maat/EffectiveRangeCfg.java b/src/main/java/com/nis/domain/maat/EffectiveRangeCfg.java new file mode 100644 index 000000000..e5c6a6367 --- /dev/null +++ b/src/main/java/com/nis/domain/maat/EffectiveRangeCfg.java @@ -0,0 +1,50 @@ +package com.nis.domain.maat; + +import java.io.Serializable; +import java.util.List; + +import com.google.gson.annotations.Expose; +import com.google.gson.annotations.SerializedName; + +public class EffectiveRangeCfg implements Serializable{ + + /** + * + */ + private static final long serialVersionUID = -4503782443649076836L; + @Expose + @SerializedName("tag_sets") + private List> effectiveRangeList; + + public List> getEffectiveRangeList() { + return effectiveRangeList; + } + + public void setEffectiveRangeList(List> effectiveRangeList) { + this.effectiveRangeList = effectiveRangeList; + } + + public static class AreaIsp{ + @Expose + private String tag; + @Expose + private List value; + + public String getTag() { + return tag; + } + public void setTag(String tag) { + this.tag = tag; + } + public List getValue() { + return value; + } + public void setValue(List value) { + this.value = value; + } + @Override + public String toString() { + return "AreaIsp [tag=" + tag + ", value=" + value + "]"; + } + } +} diff --git a/src/main/java/com/nis/domain/maat/MaatCfg.java b/src/main/java/com/nis/domain/maat/MaatCfg.java index bc141a992..0a3074b87 100644 --- a/src/main/java/com/nis/domain/maat/MaatCfg.java +++ b/src/main/java/com/nis/domain/maat/MaatCfg.java @@ -12,13 +12,14 @@ import java.io.Serializable; import java.util.Date; import java.util.List; -import org.apache.commons.lang3.StringUtils; - import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; import com.nis.util.Constants; import com.nis.util.DateUtils; +import com.nis.util.StringUtils; import com.nis.web.service.BaseService; +import com.nis.web.service.SpringContextHolder; +import com.nis.web.service.basics.SysDictInfoService; /** * @ClassName: MaatCfg.java @@ -543,8 +544,10 @@ public class MaatCfg implements Serializable { public void setAreaEffectiveIds(String areaEffectiveIds) { if(StringUtils.isEmpty(areaEffectiveIds)){ areaEffectiveIds="0"; - }else if(areaEffectiveIds.contains(":")){ - areaEffectiveIds = areaEffectiveIds.replace(":", ""); + }else { + // 组织区域、运营商配置下发格式 + SysDictInfoService service = SpringContextHolder.getBean(SysDictInfoService.class); + areaEffectiveIds = service.setEffectiveRange(areaEffectiveIds); } this.areaEffectiveIds = areaEffectiveIds; } diff --git a/src/main/java/com/nis/util/Constants.java b/src/main/java/com/nis/util/Constants.java index d039e3d39..b4cb584ec 100644 --- a/src/main/java/com/nis/util/Constants.java +++ b/src/main/java/com/nis/util/Constants.java @@ -677,4 +677,8 @@ public final class Constants { public static final int HTTP_CONNECT_TIMEOUT= Configurations.getIntProperty("http_connect_timeout", 10000); public static final int HTTP_CONNECT_REQUEST_TIMEOUT = Configurations.getIntProperty("http_connect_request_timeout", 50000); public static final int HTTP_CONNECT_RETRY_TIMES = Configurations.getIntProperty("http_connect_retry_times", 3); + + // 区域/运营商配置下发时tag值 + public static final String AREA_TAG=Configurations.getStringProperty("area_tag","location"); + public static final String ISP_TAG=Configurations.getStringProperty("isp_tag","isp"); } diff --git a/src/main/java/com/nis/util/StringUtils.java b/src/main/java/com/nis/util/StringUtils.java index 4170452e9..e1113c80c 100644 --- a/src/main/java/com/nis/util/StringUtils.java +++ b/src/main/java/com/nis/util/StringUtils.java @@ -503,4 +503,18 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils { } return str; } + + public static String revertStr(String str,String regex){ + String[] split = str.split(regex); + String value = ""; + for (int i = split.length-1; i >= 0 ; i--) { + if( i != 0) { + value += split[i]+"/"; + }else { + value += split[i]; + } + + } + return value; + } } diff --git a/src/main/java/com/nis/web/controller/BaseController.java b/src/main/java/com/nis/web/controller/BaseController.java index 57bcda365..a837b196e 100644 --- a/src/main/java/com/nis/web/controller/BaseController.java +++ b/src/main/java/com/nis/web/controller/BaseController.java @@ -678,8 +678,19 @@ public class BaseController { }else{ // 判断是否是从配置界面过来的日志查询 if(StringUtils.isNotBlank(entry.getIsLogTotalSearch())) { + Calendar time = Calendar.getInstance(); + time.add(Calendar.MINUTE, -5); + String searchEndTime = DateUtils.formatDateTime(time.getTime()); + params.put("searchFoundEndTime",searchEndTime); + entry.setSearchFoundEndTime(searchEndTime); + + time.add(Calendar.MINUTE, -5); + String searchStartTime = DateUtils.formatDateTime(time.getTime()); + params.put("searchFoundStartTime", searchStartTime); + entry.setSearchFoundStartTime(searchStartTime); + // 判断startTime是否有值 - if(StringUtils.isNotBlank(Constants.LOG_TIME_START)) { + /*if(StringUtils.isNotBlank(Constants.LOG_TIME_START)) { String endTime = Constants.LOG_TIME_END; if(StringUtils.isBlank(endTime)) { endTime = DateUtils.getDateTime(); @@ -717,7 +728,7 @@ public class BaseController { params.put("searchFoundEndTime",searchEndTime); entry.setSearchFoundStartTime(searchStartTime); entry.setSearchFoundEndTime(searchEndTime); - } + }*/ }else { //设置默认查询当前时间及前五分钟 diff --git a/src/main/java/com/nis/web/dao/basics/SysDictInfoDao.java b/src/main/java/com/nis/web/dao/basics/SysDictInfoDao.java index fb7615c9e..dd2daa119 100644 --- a/src/main/java/com/nis/web/dao/basics/SysDictInfoDao.java +++ b/src/main/java/com/nis/web/dao/basics/SysDictInfoDao.java @@ -85,9 +85,9 @@ public interface SysDictInfoDao extends CrudDao { */ List getDistrictDict(String itemCode); + List getEffectiveArea(String itemCode); - - + SysDictInfo getDictByItemCode(String itemCode); diff --git a/src/main/java/com/nis/web/dao/basics/SysDictInfoDao.xml b/src/main/java/com/nis/web/dao/basics/SysDictInfoDao.xml index e9163d5f1..9521430ae 100644 --- a/src/main/java/com/nis/web/dao/basics/SysDictInfoDao.xml +++ b/src/main/java/com/nis/web/dao/basics/SysDictInfoDao.xml @@ -263,4 +263,22 @@ FROM sys_dict_info s WHERE s.is_valid = 1 AND item_type = 3 AND item_code like concat(#{itemCode,jdbcType=VARCHAR},'%') + + + + \ No newline at end of file diff --git a/src/main/java/com/nis/web/service/basics/SysDictInfoService.java b/src/main/java/com/nis/web/service/basics/SysDictInfoService.java index d2113e174..46bd22378 100644 --- a/src/main/java/com/nis/web/service/basics/SysDictInfoService.java +++ b/src/main/java/com/nis/web/service/basics/SysDictInfoService.java @@ -1,5 +1,6 @@ package com.nis.web.service.basics; +import java.util.ArrayList; import java.util.Date; import java.util.List; @@ -11,9 +12,13 @@ import com.google.common.collect.Lists; import com.nis.domain.Page; import com.nis.domain.SysUser; import com.nis.domain.basics.SysDictInfo; +import com.nis.domain.maat.EffectiveRangeCfg; +import com.nis.domain.maat.EffectiveRangeCfg.AreaIsp; import com.nis.util.ConfigDictUtils; import com.nis.util.Configurations; +import com.nis.util.Constants; import com.nis.util.StringUtil; +import com.nis.util.StringUtils; import com.nis.web.dao.basics.SysDictInfoDao; import com.nis.web.security.UserUtils; import com.nis.web.service.BaseService; @@ -22,7 +27,7 @@ import com.nis.web.service.BaseService; public class SysDictInfoService extends BaseService{ @Autowired - private SysDictInfoDao sysDictInfoDao; + private SysDictInfoDao sysDictInfoDao; @@ -216,17 +221,82 @@ public class SysDictInfoService extends BaseService{ public List getDistrictDict(String tableName){ return sysDictInfoDao.getDistrictDict(tableName); } - - - - - - - - - - - - + + // 组织区域、运营商配置下发格式 + public String setEffectiveRange(String areaEffectiveIds){ + EffectiveRangeCfg rangeCfg = new EffectiveRangeCfg(); + List areaIspList = new ArrayList(); + + List locaValueList = new ArrayList(); + List ispValueList = new ArrayList(); + + for (String areaEffectiveId : StringUtils.split(areaEffectiveIds, ",")) { + String area = ""; + // 区域和运营商 + if(areaEffectiveId.contains(":")) { + int index = areaEffectiveId.indexOf(":"); + String areaCode = areaEffectiveId.substring(0, index); + String ispCode = areaEffectiveId.substring(index+1); + // 查询该区域信息及其所有父节点信息 + List list = sysDictInfoDao.getEffectiveArea(areaCode); + for (SysDictInfo sysDictInfo : list) { + area += sysDictInfo.getItemValue(); + while(sysDictInfo.getParent().getSysDictId() != 0) { + sysDictInfo = sysDictInfoDao.getDictById(sysDictInfo.getParent().getSysDictId()); + area += "/"+sysDictInfo.getItemValue(); + } + } + String areaItemValue = StringUtils.revertStr(area, "/"); + if(!locaValueList.contains(areaItemValue)) { + locaValueList.add(areaItemValue); + } + + // 查询运营商信息 + SysDictInfo isp = sysDictInfoDao.getDictByItemCode(ispCode); + if(!ispValueList.contains(isp.getItemValue())) { + ispValueList.add(isp.getItemValue()); + } + }else { + // 区域或运营商 + SysDictInfo dict = sysDictInfoDao.getDictByItemCode(areaEffectiveId); + if(dict.getItemType() == 1) { + // 查询所有父节点区域信息 + area += dict.getItemValue(); + while(dict.getParent().getSysDictId() != 0) { + dict = sysDictInfoDao.getDictById(dict.getParent().getSysDictId()); + area += "/"+dict.getItemValue(); + } + String areaItemValue = StringUtils.revertStr(area, "/"); + if(!locaValueList.contains(areaItemValue)) { + locaValueList.add(areaItemValue); + } + }else { + if(!ispValueList.contains(dict.getItemValue())) { + ispValueList.add(dict.getItemValue()); + } + } + + } + + } + + if(locaValueList.size() > 0) { + AreaIsp area = new AreaIsp(); + area.setTag(Constants.AREA_TAG); + area.setValue(locaValueList); + areaIspList.add(area); + } + if(ispValueList.size() > 0) { + AreaIsp isp = new AreaIsp(); + isp.setTag(Constants.ISP_TAG); + isp.setValue(ispValueList); + areaIspList.add(isp); + } + + List> effectiveRangeList = new ArrayList(); + effectiveRangeList.add(areaIspList); + rangeCfg.setEffectiveRangeList(effectiveRangeList); + return gsonToJson(rangeCfg); + } } diff --git a/src/main/resources/nis.properties b/src/main/resources/nis.properties index 1d2fbaf05..5c40f348d 100644 --- a/src/main/resources/nis.properties +++ b/src/main/resources/nis.properties @@ -521,4 +521,6 @@ app_spec_service_code_min_val=300001 groupReuseSources=groupReuseSources log_time_range=3600000 log_time_start=2018-08-01 00:00:00 -log_time_end=2018-10-01 00:00:00 \ No newline at end of file +log_time_end=2018-10-01 00:00:00 +area_tag=location +isp_tag=isp \ No newline at end of file From d96be667cd8826022aa338559f91968f464cbd98 Mon Sep 17 00:00:00 2001 From: duandongmei Date: Fri, 28 Sep 2018 14:29:28 +0800 Subject: [PATCH 05/25] =?UTF-8?q?service=E5=92=8Cregion=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E5=AD=97=E5=85=B8id=E8=BF=87=E6=BB=A4=EF=BC=9B=20=E5=AF=BC?= =?UTF-8?q?=E5=87=BA=E4=BF=AE=E6=94=B9=E6=B3=A8=E9=87=8A=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=88=B0=E5=AF=B9=E5=BA=94cell?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/nis/util/DictUtils.java | 44 +++++++++++++++++++ .../java/com/nis/util/excel/ExportExcel.java | 2 +- 2 files changed, 45 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/nis/util/DictUtils.java b/src/main/java/com/nis/util/DictUtils.java index bdd871424..2989ede08 100644 --- a/src/main/java/com/nis/util/DictUtils.java +++ b/src/main/java/com/nis/util/DictUtils.java @@ -202,6 +202,28 @@ public class DictUtils { } return dictList; } + /** + * 功能业务字典,业务信息 + * @param dictId + * @return + */ + public static FunctionServiceDict getFunctionServiceDict(Integer dictId){ + FunctionServiceDict serviceDict=null; + List allDictList = (List)CacheUtils.get(Constants.CACHE_FUNCTION_SERVICE_DICT); + List dictList = new ArrayList(); + if(StringUtil.isEmpty(allDictList)){ + FunctionServiceDict entity = new FunctionServiceDict(); + allDictList = functionServiceDictDao.getList(entity); + CacheUtils.put(Constants.CACHE_FUNCTION_SERVICE_DICT, allDictList); + } + for(FunctionServiceDict entity:allDictList){ + if(entity.getDictId().equals(dictId)){ + serviceDict=entity; + break; + } + } + return serviceDict; + } /** * 功能业务字典,获取相应功能菜单对应的业务信息 * @param functionId @@ -238,6 +260,28 @@ public class DictUtils { } return dictList; } + /** + * 功能配置域字典,获取配置域信息 + * @param dictId + * @return + */ + public static FunctionRegionDict getFunctionRegionDict(Integer dictId){ + FunctionRegionDict regionDict=null; + List allDictList = (List)CacheUtils.get(Constants.CACHE_FUNCTION_REGION_DICT); + List dictList = new ArrayList(); + if(StringUtil.isEmpty(allDictList)){ + FunctionRegionDict entity = new FunctionRegionDict(); + allDictList = functionRegionDictDao.getList(entity); + CacheUtils.put(Constants.CACHE_FUNCTION_REGION_DICT, allDictList); + } + for(FunctionRegionDict entity:allDictList){ + if(entity.getDictId().equals(dictId)){ + regionDict=entity; + break; + } + } + return regionDict; + } /** * 功能配置域字典,获取相应功能菜单对应的配置域信息 * @param functionId diff --git a/src/main/java/com/nis/util/excel/ExportExcel.java b/src/main/java/com/nis/util/excel/ExportExcel.java index 855f123e4..4adc16375 100644 --- a/src/main/java/com/nis/util/excel/ExportExcel.java +++ b/src/main/java/com/nis/util/excel/ExportExcel.java @@ -486,7 +486,7 @@ public class ExportExcel { if (ss.length==2){ cell.setCellValue(ss[0]); Comment comment = this.sheet.createDrawingPatriarch().createCellComment( - new XSSFClientAnchor(0, 0, 0, 0, (short) 3, 3, (short) 5, 6)); + new XSSFClientAnchor(0, 0, 0, 0, (short) i, 0, (short) i+4, 3)); comment.setString(new XSSFRichTextString(ss[1])); cell.setCellComment(comment); }else{ From d018e2797e8bd4c90df34abac755ea7dd9bab2b3 Mon Sep 17 00:00:00 2001 From: leijun Date: Fri, 28 Sep 2018 14:36:51 +0800 Subject: [PATCH 06/25] =?UTF-8?q?message=20=E6=A0=B7=E5=BC=8F=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/webapp/WEB-INF/views/cfg/app/appByteCfgList.jsp | 3 ++- src/main/webapp/WEB-INF/views/cfg/app/appDomainCfgList.jsp | 3 ++- src/main/webapp/WEB-INF/views/cfg/app/appHeaderCfgList.jsp | 3 ++- src/main/webapp/WEB-INF/views/cfg/app/appHttpCfgList.jsp | 3 ++- src/main/webapp/WEB-INF/views/cfg/app/appIpCfgList.jsp | 3 ++- .../webapp/WEB-INF/views/cfg/app/appMultiFeatureCfgList.jsp | 3 ++- src/main/webapp/WEB-INF/views/cfg/app/appPolicyCfgList.jsp | 3 ++- src/main/webapp/WEB-INF/views/cfg/app/appSslCfgList.jsp | 3 ++- src/main/webapp/WEB-INF/views/cfg/app/appTcpCfgList.jsp | 3 ++- .../webapp/WEB-INF/views/cfg/app/appTopicDomainCfgList.jsp | 3 ++- src/main/webapp/WEB-INF/views/cfg/asnPolicyCfgList.jsp | 2 +- src/main/webapp/WEB-INF/views/cfg/basicprotocol/list.jsp | 3 ++- src/main/webapp/WEB-INF/views/cfg/ddosIpCfgList.jsp | 2 +- .../webapp/WEB-INF/views/cfg/encryptedtunnelbehav/list.jsp | 3 ++- src/main/webapp/WEB-INF/views/cfg/fileTransfer/ftpList.jsp | 3 ++- src/main/webapp/WEB-INF/views/cfg/fileTransfer/p2pList.jsp | 3 ++- src/main/webapp/WEB-INF/views/cfg/intercept/interceptList.jsp | 3 ++- src/main/webapp/WEB-INF/views/cfg/ipaddr/ipList.jsp | 3 ++- src/main/webapp/WEB-INF/views/cfg/mail/mailList.jsp | 3 ++- .../WEB-INF/views/cfg/maintenance/ipMultiplexPool/list.jsp | 3 ++- src/main/webapp/WEB-INF/views/cfg/other/bgpList.jsp | 3 ++- src/main/webapp/WEB-INF/views/cfg/other/xmppList.jsp | 3 ++- .../WEB-INF/views/cfg/proxy/control/httpRedirectList.jsp | 3 +-- src/main/webapp/WEB-INF/views/cfg/proxy/fileStrategy/list.jsp | 3 +-- src/main/webapp/WEB-INF/views/cfg/website/dnsList.jsp | 3 ++- src/main/webapp/WEB-INF/views/cfg/website/httpList.jsp | 3 ++- src/main/webapp/WEB-INF/views/cfg/website/sslList.jsp | 2 +- src/main/webapp/WEB-INF/views/cfg/whitelist/domainList.jsp | 3 ++- src/main/webapp/WEB-INF/views/cfg/whitelist/ipList.jsp | 2 +- .../webapp/WEB-INF/views/dashboard/trafficIpActiveList.jsp | 2 +- .../webapp/WEB-INF/views/dashboard/trafficWebTypeList.jsp | 2 +- src/main/webapp/WEB-INF/views/report/test.jsp | 3 +-- src/main/webapp/WEB-INF/views/systemService/list.jsp | 4 ++-- 33 files changed, 57 insertions(+), 37 deletions(-) diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appByteCfgList.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appByteCfgList.jsp index 9f8aa6d78..6c1067b9f 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appByteCfgList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appByteCfgList.jsp @@ -64,7 +64,7 @@
- + @@ -271,6 +271,7 @@
+
diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appDomainCfgList.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appDomainCfgList.jsp index 233a1398d..92bdfcdfe 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appDomainCfgList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appDomainCfgList.jsp @@ -64,7 +64,7 @@
- + @@ -271,6 +271,7 @@
+
diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appHeaderCfgList.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appHeaderCfgList.jsp index 8e052a7ed..8c9cc36e5 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appHeaderCfgList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appHeaderCfgList.jsp @@ -118,7 +118,7 @@
- + @@ -325,6 +325,7 @@
+
diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appHttpCfgList.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appHttpCfgList.jsp index 26b568507..caa4a46b2 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appHttpCfgList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appHttpCfgList.jsp @@ -64,7 +64,7 @@
- + @@ -272,6 +272,7 @@
+
diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appIpCfgList.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appIpCfgList.jsp index 2a80b51a8..2dc71bd31 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appIpCfgList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appIpCfgList.jsp @@ -67,7 +67,7 @@
- + @@ -276,6 +276,7 @@
+
diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appMultiFeatureCfgList.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appMultiFeatureCfgList.jsp index ac2dc0073..4527eb0b5 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appMultiFeatureCfgList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appMultiFeatureCfgList.jsp @@ -115,7 +115,7 @@
- + @@ -322,6 +322,7 @@
+
diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appPolicyCfgList.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appPolicyCfgList.jsp index 2c4e7028d..f56105a3c 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appPolicyCfgList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appPolicyCfgList.jsp @@ -109,7 +109,7 @@
- + @@ -333,6 +333,7 @@
+
diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appSslCfgList.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appSslCfgList.jsp index 1a9fe8baa..c91f0ba94 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appSslCfgList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appSslCfgList.jsp @@ -64,7 +64,7 @@
- + @@ -271,6 +271,7 @@
+
diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appTcpCfgList.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appTcpCfgList.jsp index b4ec27a7b..08496368b 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appTcpCfgList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appTcpCfgList.jsp @@ -62,7 +62,7 @@
- + @@ -269,6 +269,7 @@
+
diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appTopicDomainCfgList.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appTopicDomainCfgList.jsp index 143e231e1..84ff2a652 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appTopicDomainCfgList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appTopicDomainCfgList.jsp @@ -61,7 +61,7 @@
- + @@ -268,6 +268,7 @@
+
diff --git a/src/main/webapp/WEB-INF/views/cfg/asnPolicyCfgList.jsp b/src/main/webapp/WEB-INF/views/cfg/asnPolicyCfgList.jsp index f2865603b..afebcb4a0 100644 --- a/src/main/webapp/WEB-INF/views/cfg/asnPolicyCfgList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/asnPolicyCfgList.jsp @@ -102,7 +102,6 @@
- @@ -253,6 +252,7 @@
+
diff --git a/src/main/webapp/WEB-INF/views/cfg/basicprotocol/list.jsp b/src/main/webapp/WEB-INF/views/cfg/basicprotocol/list.jsp index 92d99e4fe..ab3ad752c 100644 --- a/src/main/webapp/WEB-INF/views/cfg/basicprotocol/list.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/basicprotocol/list.jsp @@ -112,7 +112,7 @@
- + @@ -336,6 +336,7 @@
+
diff --git a/src/main/webapp/WEB-INF/views/cfg/ddosIpCfgList.jsp b/src/main/webapp/WEB-INF/views/cfg/ddosIpCfgList.jsp index 09f658dba..c93086414 100644 --- a/src/main/webapp/WEB-INF/views/cfg/ddosIpCfgList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/ddosIpCfgList.jsp @@ -75,7 +75,6 @@
- @@ -288,6 +287,7 @@
+
diff --git a/src/main/webapp/WEB-INF/views/cfg/encryptedtunnelbehav/list.jsp b/src/main/webapp/WEB-INF/views/cfg/encryptedtunnelbehav/list.jsp index fc7eaee20..f599d0f2a 100644 --- a/src/main/webapp/WEB-INF/views/cfg/encryptedtunnelbehav/list.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/encryptedtunnelbehav/list.jsp @@ -109,7 +109,7 @@
- + @@ -333,6 +333,7 @@
+
diff --git a/src/main/webapp/WEB-INF/views/cfg/fileTransfer/ftpList.jsp b/src/main/webapp/WEB-INF/views/cfg/fileTransfer/ftpList.jsp index 9da4ab068..d2e41d5a3 100644 --- a/src/main/webapp/WEB-INF/views/cfg/fileTransfer/ftpList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/fileTransfer/ftpList.jsp @@ -106,7 +106,7 @@
- + @@ -319,6 +319,7 @@
+
diff --git a/src/main/webapp/WEB-INF/views/cfg/fileTransfer/p2pList.jsp b/src/main/webapp/WEB-INF/views/cfg/fileTransfer/p2pList.jsp index 08fd640b2..d523f84dd 100644 --- a/src/main/webapp/WEB-INF/views/cfg/fileTransfer/p2pList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/fileTransfer/p2pList.jsp @@ -102,7 +102,7 @@
- + @@ -310,6 +310,7 @@
+
diff --git a/src/main/webapp/WEB-INF/views/cfg/intercept/interceptList.jsp b/src/main/webapp/WEB-INF/views/cfg/intercept/interceptList.jsp index 256f1a0a7..2099a6a87 100644 --- a/src/main/webapp/WEB-INF/views/cfg/intercept/interceptList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/intercept/interceptList.jsp @@ -109,7 +109,7 @@
- + @@ -322,6 +322,7 @@
+
diff --git a/src/main/webapp/WEB-INF/views/cfg/ipaddr/ipList.jsp b/src/main/webapp/WEB-INF/views/cfg/ipaddr/ipList.jsp index ba03968eb..9265f5447 100644 --- a/src/main/webapp/WEB-INF/views/cfg/ipaddr/ipList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/ipaddr/ipList.jsp @@ -102,7 +102,7 @@
- + @@ -310,6 +310,7 @@
+
diff --git a/src/main/webapp/WEB-INF/views/cfg/mail/mailList.jsp b/src/main/webapp/WEB-INF/views/cfg/mail/mailList.jsp index 0efbf7427..164e1c36f 100644 --- a/src/main/webapp/WEB-INF/views/cfg/mail/mailList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/mail/mailList.jsp @@ -103,7 +103,7 @@
- + @@ -316,6 +316,7 @@
+
diff --git a/src/main/webapp/WEB-INF/views/cfg/maintenance/ipMultiplexPool/list.jsp b/src/main/webapp/WEB-INF/views/cfg/maintenance/ipMultiplexPool/list.jsp index f4e10b701..ead3cb0de 100644 --- a/src/main/webapp/WEB-INF/views/cfg/maintenance/ipMultiplexPool/list.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/maintenance/ipMultiplexPool/list.jsp @@ -57,7 +57,7 @@
- + @@ -268,6 +268,7 @@
+
diff --git a/src/main/webapp/WEB-INF/views/cfg/other/bgpList.jsp b/src/main/webapp/WEB-INF/views/cfg/other/bgpList.jsp index 2bab1a0d0..0caee3318 100644 --- a/src/main/webapp/WEB-INF/views/cfg/other/bgpList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/other/bgpList.jsp @@ -104,7 +104,7 @@
- + @@ -317,6 +317,7 @@
+
diff --git a/src/main/webapp/WEB-INF/views/cfg/other/xmppList.jsp b/src/main/webapp/WEB-INF/views/cfg/other/xmppList.jsp index f5e9a2658..e4c6300e8 100644 --- a/src/main/webapp/WEB-INF/views/cfg/other/xmppList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/other/xmppList.jsp @@ -104,7 +104,7 @@
- + @@ -317,6 +317,7 @@
+
diff --git a/src/main/webapp/WEB-INF/views/cfg/proxy/control/httpRedirectList.jsp b/src/main/webapp/WEB-INF/views/cfg/proxy/control/httpRedirectList.jsp index 2a886042f..863c19ffe 100644 --- a/src/main/webapp/WEB-INF/views/cfg/proxy/control/httpRedirectList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/proxy/control/httpRedirectList.jsp @@ -291,8 +291,6 @@
- - @@ -511,6 +509,7 @@
+
diff --git a/src/main/webapp/WEB-INF/views/cfg/proxy/fileStrategy/list.jsp b/src/main/webapp/WEB-INF/views/cfg/proxy/fileStrategy/list.jsp index ed2ead14c..9937188df 100644 --- a/src/main/webapp/WEB-INF/views/cfg/proxy/fileStrategy/list.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/proxy/fileStrategy/list.jsp @@ -67,8 +67,6 @@
- - @@ -272,6 +270,7 @@
+
diff --git a/src/main/webapp/WEB-INF/views/cfg/website/dnsList.jsp b/src/main/webapp/WEB-INF/views/cfg/website/dnsList.jsp index d236bc792..66efa84a6 100644 --- a/src/main/webapp/WEB-INF/views/cfg/website/dnsList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/website/dnsList.jsp @@ -102,7 +102,7 @@
- + @@ -315,6 +315,7 @@
+
diff --git a/src/main/webapp/WEB-INF/views/cfg/website/httpList.jsp b/src/main/webapp/WEB-INF/views/cfg/website/httpList.jsp index f4b1b7424..2bbc9d595 100644 --- a/src/main/webapp/WEB-INF/views/cfg/website/httpList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/website/httpList.jsp @@ -260,7 +260,7 @@
- + @@ -473,6 +473,7 @@
+
diff --git a/src/main/webapp/WEB-INF/views/cfg/website/sslList.jsp b/src/main/webapp/WEB-INF/views/cfg/website/sslList.jsp index b1ab33946..b62d87e5d 100644 --- a/src/main/webapp/WEB-INF/views/cfg/website/sslList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/website/sslList.jsp @@ -102,7 +102,6 @@
- @@ -315,6 +314,7 @@
+
diff --git a/src/main/webapp/WEB-INF/views/cfg/whitelist/domainList.jsp b/src/main/webapp/WEB-INF/views/cfg/whitelist/domainList.jsp index 41c560892..9c99b0c15 100644 --- a/src/main/webapp/WEB-INF/views/cfg/whitelist/domainList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/whitelist/domainList.jsp @@ -102,7 +102,7 @@
- + @@ -315,6 +315,7 @@
+
diff --git a/src/main/webapp/WEB-INF/views/cfg/whitelist/ipList.jsp b/src/main/webapp/WEB-INF/views/cfg/whitelist/ipList.jsp index 776d2c999..4db4874d5 100644 --- a/src/main/webapp/WEB-INF/views/cfg/whitelist/ipList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/whitelist/ipList.jsp @@ -102,7 +102,6 @@
- @@ -315,6 +314,7 @@
+
diff --git a/src/main/webapp/WEB-INF/views/dashboard/trafficIpActiveList.jsp b/src/main/webapp/WEB-INF/views/dashboard/trafficIpActiveList.jsp index 56e46263c..629b8eaf0 100644 --- a/src/main/webapp/WEB-INF/views/dashboard/trafficIpActiveList.jsp +++ b/src/main/webapp/WEB-INF/views/dashboard/trafficIpActiveList.jsp @@ -29,8 +29,8 @@ +
-
diff --git a/src/main/webapp/WEB-INF/views/dashboard/trafficWebTypeList.jsp b/src/main/webapp/WEB-INF/views/dashboard/trafficWebTypeList.jsp index bb37e009b..ffbfcd1f3 100644 --- a/src/main/webapp/WEB-INF/views/dashboard/trafficWebTypeList.jsp +++ b/src/main/webapp/WEB-INF/views/dashboard/trafficWebTypeList.jsp @@ -80,8 +80,8 @@ }); }); +
-
diff --git a/src/main/webapp/WEB-INF/views/report/test.jsp b/src/main/webapp/WEB-INF/views/report/test.jsp index 366b517de..42ad7092d 100644 --- a/src/main/webapp/WEB-INF/views/report/test.jsp +++ b/src/main/webapp/WEB-INF/views/report/test.jsp @@ -98,9 +98,8 @@ - +
-
From fbabc9daed7b6f71560b119d08708defed6bc6de Mon Sep 17 00:00:00 2001 From: leijun Date: Fri, 28 Sep 2018 14:55:12 +0800 Subject: [PATCH 07/25] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dapp=E5=8D=8F=E8=AE=AEac?= =?UTF-8?q?tion=E4=B8=BAdrop=20=20dolog=E9=9A=90=E8=97=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/webapp/WEB-INF/views/cfg/app/appPolicyCfgForm.jsp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appPolicyCfgForm.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appPolicyCfgForm.jsp index 88e4d621a..fa3773b2e 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appPolicyCfgForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appPolicyCfgForm.jsp @@ -210,7 +210,8 @@ var delContent = function(contentClassName, addBtnClassName) { -
+
+
@@ -229,6 +230,7 @@ var delContent = function(contentClassName, addBtnClassName) {
+
From 190d9241956595a78bd9737e14900fa84012018d Mon Sep 17 00:00:00 2001 From: duandongmei Date: Fri, 28 Sep 2018 18:36:04 +0800 Subject: [PATCH 08/25] =?UTF-8?q?group=20type=E5=8E=BB=E6=8E=89ip=20group?= =?UTF-8?q?=20type=E5=A2=9E=E5=8A=A0snat=20ip=E5=92=8Cdnat=20ip=EF=BC=9B?= =?UTF-8?q?=20ddos=20ip=20pattern=E5=8F=AA=E6=9C=89ip=E5=92=8Cipmask?= =?UTF-8?q?=EF=BC=8Cport=20pattern=E5=8F=AA=E6=9C=89port=EF=BC=8Cdirection?= =?UTF-8?q?=E5=8F=AA=E6=9C=89single;=20ip=20whitelist=20=E5=8E=BB=E6=8E=89?= =?UTF-8?q?subscribe?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/sql/20180928/update_dict_item_info.sql | 5 +++++ src/main/resources/sql/20180928/update_region_ddos.sql | 2 ++ src/main/resources/sql/20180928/update_region_info.sql | 3 +++ 3 files changed, 10 insertions(+) create mode 100644 src/main/resources/sql/20180928/update_dict_item_info.sql create mode 100644 src/main/resources/sql/20180928/update_region_ddos.sql create mode 100644 src/main/resources/sql/20180928/update_region_info.sql diff --git a/src/main/resources/sql/20180928/update_dict_item_info.sql b/src/main/resources/sql/20180928/update_dict_item_info.sql new file mode 100644 index 000000000..7bb9f8ef1 --- /dev/null +++ b/src/main/resources/sql/20180928/update_dict_item_info.sql @@ -0,0 +1,5 @@ +#delete ip resuse ip group add snat ip and dnat ip +delete from sys_data_dictionary_item where dictionary_id=83 and id =1114; +INSERT INTO sys_data_dictionary_item VALUES (2600, '2', 'SNAT IP', 'ip', 0, 1, 1, 83); +INSERT INTO sys_data_dictionary_item VALUES (2601, '3', 'DNAT IP', 'ip', 0, 1, 1, 83); + diff --git a/src/main/resources/sql/20180928/update_region_ddos.sql b/src/main/resources/sql/20180928/update_region_ddos.sql new file mode 100644 index 000000000..8ab3e2c63 --- /dev/null +++ b/src/main/resources/sql/20180928/update_region_ddos.sql @@ -0,0 +1,2 @@ +#ddos ip config info update +update function_region_dict set config_ip_pattern='1,3' ,config_port_pattern='1' ,config_direction='1' where dict_id=74 diff --git a/src/main/resources/sql/20180928/update_region_info.sql b/src/main/resources/sql/20180928/update_region_info.sql new file mode 100644 index 000000000..3476bab08 --- /dev/null +++ b/src/main/resources/sql/20180928/update_region_info.sql @@ -0,0 +1,3 @@ +#delte ip whitelist subscribe +update function_region_dict set is_valid=0 where dict_id=189; + From 75060d9a09ac693072882a12f609f2de71be19df Mon Sep 17 00:00:00 2001 From: wangxin Date: Fri, 28 Sep 2018 19:34:04 +0800 Subject: [PATCH 09/25] =?UTF-8?q?ip=E9=85=8D=E7=BD=AEform=E8=A1=A8?= =?UTF-8?q?=E5=8D=95=E8=B0=83=E6=95=B4action=E4=B8=8E=E5=8D=8F=E8=AE=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sql/20180928/extend_ip_region.sql | 16 ++++++ .../WEB-INF/views/cfg/ipaddr/ipForm.jsp | 56 ++++++++++++++++--- 2 files changed, 63 insertions(+), 9 deletions(-) create mode 100644 src/main/resources/sql/20180928/extend_ip_region.sql diff --git a/src/main/resources/sql/20180928/extend_ip_region.sql b/src/main/resources/sql/20180928/extend_ip_region.sql new file mode 100644 index 000000000..aa8809328 --- /dev/null +++ b/src/main/resources/sql/20180928/extend_ip_region.sql @@ -0,0 +1,16 @@ +UPDATE function_service_dict SET region_code=1 WHERE function_id=5 AND region_code='1,3'; +UPDATE function_service_dict SET region_code=2 WHERE function_id=5 AND region_code='2,3'; +UPDATE function_service_dict SET is_valid=0 WHERE function_id=5 AND ACTION=1; +UPDATE function_service_dict SET is_valid=0 WHERE function_id=5 AND ACTION=96; +#service_id需要定义出来之后进行替换 +INSERT INTO function_service_dict (function_id,protocol_id,ACTION,action_code,service_id,service_name,service_desc,is_valid,region_code) VALUES(5,0,64,'ratelimit',1234,'ip_ratelimit','ip地址限速',1,1); + +#根据PROTOCOL字典查出的值替换63 +SELECT id FROM sys_data_dictionary_name WHERE mark= 'PROTOCOL'; +INSERT INTO sys_data_dictionary_item (item_code,item_value,item_desc,item_sort,STATUS,TYPE,dictionary_id) VALUES(8,'IPSEC','IPSEC',0,1,1,63); +INSERT INTO sys_data_dictionary_item (item_code,item_value,item_desc,item_sort,STATUS,TYPE,dictionary_id) VALUES(15,'IPSEC','IPSEC',0,1,1,63); + +UPDATE function_region_dict SET is_valid=0 WHERE function_id=5 AND config_region_value ='NTC_SUBSCRIBE_ID'; +UPDATE function_region_dict SET config_protocol='0,6,17,1,8,15' WHERE function_id=5 AND config_region_value ='INLINE_IP_CB'; + +update function_region_dict set config_ip_type='4,6' where region_type=1 and config_ip_type like '%,46,64,10%'; \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/cfg/ipaddr/ipForm.jsp b/src/main/webapp/WEB-INF/views/cfg/ipaddr/ipForm.jsp index 60d7c3bba..9a869607f 100644 --- a/src/main/webapp/WEB-INF/views/cfg/ipaddr/ipForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/ipaddr/ipForm.jsp @@ -20,10 +20,10 @@ $(".glyphicon-plus").first().click(); $(".ipPortList").find(".glyphicon-remove").addClass("hidden") var action=$(".action:checked").val(); - if(action==32||action==96){ - $(".subscribeId").find(".glyphicon-remove").click(); + /*if(action==32){ + $(".subscribeId").find(".glyphicon-remove").click(); $(".subscribeId").prev("h4").addClass("hidden"); - } + }*/ var regionCodes=$(".action:checked").attr("regionCode").split(","); $("h4[class*='ipPortListTitle']").each(function(){ var has=false; @@ -36,6 +36,7 @@ $(this).html(""); } }); + processAction($(".ipPortList")); $(".action").on("change", function() { $("#serviceId").val($(this).attr("serviceId")); $("#protocolId").val($(this).attr("protocolId")); @@ -57,16 +58,17 @@ $(this).find(".ipPortTitle").html(i18nCode); }); var tabInfo=$(".ipPortList"); - if(tabInfo){ + processAction(tabInfo); + /* if(tabInfo){ tabInfo.find("[name$='cfgType']").val(cfgType); tabInfo.find("[name$='cfgRegionCode']").val(cfgRegionCode); //丢弃回流没有subscribeId - if($(this).val()==32||$(this).val()==96){ + if($(this).val()==32||$(this).val()==96){ $(".subscribeId").find(".glyphicon-remove").click(); $(".subscribeId").prev("h4").addClass("hidden"); }else{ $(".subscribeId").prev("h4").removeClass("hidden"); - } + } //处理ICMP if($(this).val()==32){ $.ipcommon.protocol.each(function(){ @@ -80,7 +82,7 @@ tabInfo.find("select[name$='protocol']").selectpicker("refresh"); } - } + } */ }); $("#serviceId").val($(".action:checked").attr("serviceId")); $("#protocolId").val($(".action:checked").attr("protocolId")); @@ -101,10 +103,10 @@ subscribeId=1; } //代表所有业务都隐藏了,提示必须增加一种业务数据 - if(($(".boxSolid").length-1) ==($(".boxSolid.hidden").length-subscribeId)){ + /* if(($(".boxSolid").length-1) ==($(".boxSolid.hidden").length-subscribeId)){ top.$.jBox.tip("", ""); return; - } + } */ //代表所有区域都隐藏了,提示必须增加个区域信息 if($("input[name='isAreaEffective']:checked").val()==1 && $(".container-fluid:visible").size()==0){ if($("#areaIsp").hasClass("hidden")) $("#areaIp").find(".glyphicon-plus").click(); @@ -183,6 +185,42 @@ }); */ $("." + addBtnClassName).removeClass("hidden"); } +var processAction=function(obj){ + var o=$(obj) + if(o){ + var action=$(".action:checked").val(); + /*处理协议*/ + var selectedProtocol=o.find("select[name$='protocol'] option:selected").attr("value"); + //先清空,再添加 + o.find("select[name$='protocol']").empty(); + if(action==32){ + $.ipcommon.protocol.each(function(){ + if($(this).attr("value")==0||$(this).attr("value")==6||$(this).attr("value")==17||$(this).attr("value")==1||$(this).attr("value")==8||$(this).attr("value")==15){ + o.find("select[name$='protocol']").append($(this)); + } + }) + }else if(action==16){ + $.ipcommon.protocol.each(function(){ + if($(this).attr("value")==0||$(this).attr("value")==6){ + o.find("select[name$='protocol']").append($(this)); + } + }) + }else if(action==64){ + $.ipcommon.protocol.each(function(){ + if($(this).attr("value")==0||$(this).attr("value")==6||$(this).attr("value")==17){ + o.find("select[name$='protocol']").append($(this)); + } + }) + } + o.find("select[name$='protocol']").selectpicker("refresh"); + //切换后如果没找到选项,选任意协议 + if(o.find("select[name$='protocol'] option[value='"+selectedProtocol+"']").length>0){ + o.find("select[name$='protocol']").selectpicker("val",selectedProtocol); + }else{ + o.find("select[name$='protocol']").selectpicker("val",0); + } + } +} From a38093347f258460b3219e7717ef0a44a00a0078 Mon Sep 17 00:00:00 2001 From: zhanghongqing Date: Fri, 28 Sep 2018 20:20:51 +0800 Subject: [PATCH 10/25] =?UTF-8?q?1=E3=80=81voip=E5=90=88=E5=B9=B6=EF=BC=8C?= =?UTF-8?q?2=E3=80=81subscribeId=E6=96=B0=E5=A2=9E=E6=97=B6=E6=8F=90?= =?UTF-8?q?=E4=BA=A4=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ntc/AvContentController.java | 116 +++--- .../configuration/AvContentCfgService.java | 68 ++-- .../WEB-INF/views/cfg/av/voip/voipForm.jsp | 75 +++- .../{voipAccountForm.jsp => voipForm.jsp.bak} | 97 +++-- .../WEB-INF/views/cfg/av/voip/voipList.jsp | 359 ++---------------- .../{voipAccountList.jsp => voipList.jsp.bak} | 356 ++++++++--------- .../WEB-INF/views/cfg/av/voip/voipSubList.jsp | 331 ++++++++++++++++ .../WEB-INF/views/cfg/whitelist/ipForm.jsp | 27 +- 8 files changed, 777 insertions(+), 652 deletions(-) rename src/main/webapp/WEB-INF/views/cfg/av/voip/{voipAccountForm.jsp => voipForm.jsp.bak} (80%) rename src/main/webapp/WEB-INF/views/cfg/av/voip/{voipAccountList.jsp => voipList.jsp.bak} (81%) create mode 100644 src/main/webapp/WEB-INF/views/cfg/av/voip/voipSubList.jsp diff --git a/src/main/java/com/nis/web/controller/configuration/ntc/AvContentController.java b/src/main/java/com/nis/web/controller/configuration/ntc/AvContentController.java index 24e519955..5f5a86ee5 100644 --- a/src/main/java/com/nis/web/controller/configuration/ntc/AvContentController.java +++ b/src/main/java/com/nis/web/controller/configuration/ntc/AvContentController.java @@ -3,7 +3,6 @@ package com.nis.web.controller.configuration.ntc; import java.util.ArrayList; import java.util.Date; import java.util.HashMap; -import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Properties; @@ -13,7 +12,6 @@ import javax.servlet.http.HttpServletResponse; import org.apache.commons.lang3.StringUtils; import org.apache.shiro.authz.annotation.RequiresPermissions; -import org.springframework.context.i18n.LocaleContextHolder; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.ModelAttribute; @@ -22,27 +20,22 @@ import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.servlet.mvc.support.RedirectAttributes; import com.nis.domain.Page; -import com.nis.domain.SysUser; import com.nis.domain.basics.ServiceDictInfo; import com.nis.domain.basics.SysDictInfo; import com.nis.domain.configuration.AreaBean; import com.nis.domain.configuration.AreaIpCfg; -import com.nis.domain.configuration.AvContIpCfg; import com.nis.domain.configuration.AvVoipAccountCfg; import com.nis.domain.configuration.CfgIndexInfo; -import com.nis.domain.configuration.IpPortCfg; import com.nis.domain.configuration.NtcSubscribeIdCfg; import com.nis.exceptions.MaatConvertException; import com.nis.domain.configuration.AvVoipIpCfg; import com.nis.domain.configuration.BaseIpCfg; import com.nis.domain.configuration.BaseStringCfg; -import com.nis.util.Configurations; import com.nis.util.Constants; import com.nis.util.DateUtils; import com.nis.util.StringUtil; import com.nis.util.excel.ExportExcel; import com.nis.web.controller.BaseController; -import com.nis.web.security.UserUtils; /** * 处理音视频文本业务 @@ -55,11 +48,11 @@ public class AvContentController extends BaseController { /*****************************voip业务***************/ //音视频VOIP IP配置新增界面 @RequestMapping(value = {"/voipForm"}) - @RequiresPermissions(value={"avVoipIp:config"}) + @RequiresPermissions(value={"avVoip:config"}) public String voipFrom(Model model,HttpServletRequest request ,HttpServletResponse response ,String compileIds,String ids, CfgIndexInfo cfg ,RedirectAttributes redirectAttributes){ - if(!StringUtil.isEmpty(compileIds)){ - cfg.setCompileId(Integer.parseInt(compileIds)); + if(!StringUtil.isEmpty(ids)){ + cfg.setCfgId(Long.parseLong(ids)); cfg = avContentCfgService.getCfgIndexInfo(cfg); initUpdateFormCondition(model, cfg); }else{ @@ -70,7 +63,7 @@ public class AvContentController extends BaseController { return "/cfg/av/voip/voipForm"; } //音视频VOIP Account配置新增界面 - @RequestMapping(value = {"/voipAccountForm"}) +/* @RequestMapping(value = {"/voipAccountForm"}) @RequiresPermissions(value={"avVoipAccount:config"}) public String voipAccountForm(Model model,HttpServletRequest request ,HttpServletResponse response ,String compileIds,String ids, CfgIndexInfo cfg ,RedirectAttributes redirectAttributes){ @@ -85,7 +78,7 @@ public class AvContentController extends BaseController { model.addAttribute("_cfg", cfg); return "/cfg/av/voip/voipAccountForm"; - } + }*/ //保存voip ip信息 @RequestMapping(value = {"/saveVoip"}) @@ -97,18 +90,18 @@ public class AvContentController extends BaseController { }catch(Exception e){ if(e instanceof MaatConvertException) { e.printStackTrace(); - logger.error("voip IP信息保存失败",e); + logger.error("voip 信息保存失败",e); addMessage(redirectAttributes,"request_service_failed"); }else { e.printStackTrace(); - logger.error("voip IP信息保存失败",e); + logger.error("voip 信息保存失败",e); addMessage(redirectAttributes,"save_failed"); } } return "redirect:" + adminPath +"/ntc/av/voipList?functionId="+cfg.getFunctionId(); } //保存voip Account信息 - @RequestMapping(value = {"/saveAccountVoip"}) +/* @RequestMapping(value = {"/saveAccountVoip"}) public String saveAccountVoip(Model model,HttpServletRequest request,HttpServletResponse response,String ids, CfgIndexInfo cfg ,RedirectAttributes redirectAttributes){ try{ @@ -126,12 +119,10 @@ public class AvContentController extends BaseController { } } return "redirect:" + adminPath +"/ntc/av/voipAccountList?functionId="+cfg.getFunctionId(); - } - //视频文本VOIP IP配置列表 + }*/ + //视频文本VOIP 配置列表 @RequestMapping(value = {"/voipList"}) - public String voipCfgList(Model model,HttpServletRequest request - ,HttpServletResponse response - ,@ModelAttribute("cfg")CfgIndexInfo entity + public String voipCfgList(Model model,HttpServletRequest request ,HttpServletResponse response ,@ModelAttribute("cfg")CfgIndexInfo entity ,RedirectAttributes redirectAttributes){ if(entity.getVoipIp()== null){ entity.setVoipIp(new AvVoipIpCfg()); @@ -148,7 +139,7 @@ public class AvContentController extends BaseController { return "/cfg/av/voip/voipList"; } //视频文本VOIP Account配置列表 - @RequestMapping(value = {"/voipAccountList"}) +/* @RequestMapping(value = {"/voipAccountList"}) public String voipCfgAccountList(Model model,HttpServletRequest request ,HttpServletResponse response ,@ModelAttribute("cfg")CfgIndexInfo entity ,RedirectAttributes redirectAttributes){ if(entity.getVoipAccount()== null){ @@ -161,12 +152,12 @@ public class AvContentController extends BaseController { model.addAttribute("page", page); initPageCondition(model,entity); return "/cfg/av/voip/voipAccountList"; - } + }*/ //修改VOIP IP配置状态 @RequestMapping(value = {"/updateAvVoipValid"}) - @RequiresPermissions(value={"avVoipIp:config"}) + @RequiresPermissions(value={"avVoip:config"}) public String updateVoipValid(Integer isAudit,String compileIds,Integer isValid,String ids,Integer functionId ,RedirectAttributes redirectAttributes ) { @@ -175,18 +166,18 @@ public class AvContentController extends BaseController { } catch (Exception e) { if(e instanceof MaatConvertException) { e.printStackTrace(); - logger.error("voip IP信息审核失败",e); + logger.error("voip 信息审核失败",e); addMessage(redirectAttributes,"request_service_failed"); }else { e.printStackTrace(); - logger.error("voip IP信息审核失败",e); + logger.error("voip 信息审核失败",e); addMessage(redirectAttributes,"audit_failed"); } } return "redirect:" + adminPath +"/ntc/av/voipList?functionId="+functionId; } //修改VOIP account配置状态 - @RequestMapping(value = {"/updateAvVoipAccountValid"}) +/* @RequestMapping(value = {"/updateAvVoipAccountValid"}) @RequiresPermissions(value={"avVoipAccount:config"}) public String updateVoipAccountValid(Integer isAudit,String compileIds,Integer isValid,String ids,Integer functionId ,RedirectAttributes redirectAttributes @@ -205,15 +196,13 @@ public class AvContentController extends BaseController { } } return "redirect:" + adminPath +"/ntc/av/voipAccountList?functionId="+functionId; - } + }*/ //修改VOIP IP配置审核状态 @RequestMapping(value = {"/auditAvVoip"}) - @RequiresPermissions(value={"avVoipIp:confirm"}) - public String auditVoip(Integer isAudit,Integer isValid,String ids - ,String compileIds,Integer functionId - ,RedirectAttributes redirectAttributes) { - if(!StringUtil.isEmpty(compileIds)){ - String[] idArray = compileIds.split(","); + @RequiresPermissions(value={"avVoip:confirm"}) + public String auditVoip(Integer isAudit,Integer isValid,String ids ,String compileIds,Integer functionId ,RedirectAttributes redirectAttributes) { + if(!StringUtil.isEmpty(ids)){ + String[] idArray = ids.split(","); Date auditTime=new Date(); for(String id :idArray){ try { @@ -221,7 +210,7 @@ public class AvContentController extends BaseController { } catch (MaatConvertException e) { if(e instanceof MaatConvertException) { e.printStackTrace(); - logger.info("VOIP配置下发失败:"+e.getMessage());; + logger.error("VOIP配置下发失败:"+e.getMessage());; addMessage(redirectAttributes,"request_service_failed"); }else { e.printStackTrace(); @@ -236,7 +225,7 @@ public class AvContentController extends BaseController { return "redirect:" + adminPath +"/ntc/av/voipList?functionId="+functionId; } //修改VOIP IP配置审核状态 - @RequestMapping(value = {"/auditAvVoipAccount"}) +/* @RequestMapping(value = {"/auditAvVoipAccount"}) @RequiresPermissions(value={"avVoipAccount:confirm"}) public String auditVoipAccount(Integer isAudit,Integer isValid,String ids ,String compileIds,Integer functionId @@ -262,14 +251,14 @@ public class AvContentController extends BaseController { } return "redirect:" + adminPath +"/ntc/av/voipAccountList?functionId="+functionId; - } + }*/ /** * 账号account * 根据索引表信息异步获取子表信息 * @return */ - @ResponseBody + /*@ResponseBody @RequestMapping(value = "ajaxVoipAccountInfo") public Map getVoipAccountInfo(CfgIndexInfo cfgIndexInfo) { Map voipAndAccountInfoMap=new HashMap(); @@ -282,25 +271,50 @@ public class AvContentController extends BaseController { voipAndAccountInfoMap.put("account", voipAccountCfgList); voipAndAccountInfoMap.put("subscribe", ntcSubscribeIdCfgList); return voipAndAccountInfoMap; - } + }*/ /** * 根据索引表信息异步获取子表信息 * @return */ - @ResponseBody - @RequestMapping(value = "ajaxVoipIpInfo") - public Map getVoipIpInfo(CfgIndexInfo cfgIndexInfo) { - Map voipAndAccountInfoMap=new HashMap(); + @RequestMapping(value = {"/ajaxVoipIpInfo"}) + public String getVoipIpInfo(Model model,Long cfgId,Integer index) { + CfgIndexInfo cfgIndexInfo = new CfgIndexInfo(); + cfgIndexInfo.setCfgId(cfgId); + CfgIndexInfo cfg = avContentCfgService.getCfgIndexInfo(cfgIndexInfo); + List tabList = new ArrayList(); //获取voipIpCfg信息 - List voipIpCfgList=new ArrayList(); - List ntcSubscribeIdCfgList=new ArrayList(); - - voipIpCfgList = avContentCfgService.getVoipIpCfgList(cfgIndexInfo); - ntcSubscribeIdCfgList=avContentCfgService.getSubscribeIdCfgList(cfgIndexInfo); - - voipAndAccountInfoMap.put("ip", voipIpCfgList); - voipAndAccountInfoMap.put("subscribe", ntcSubscribeIdCfgList); - return voipAndAccountInfoMap; + if(cfg.getVoipIps()!=null){ + String cfgType = null; + for(AvVoipIpCfg ip:cfg.getVoipIps()){ + if(!ip.getCfgType().equals(cfgType)){ + tabList.add(new String[]{"1",ip.getCfgType()}); + cfgType = ip.getCfgType(); + } + } + } + if(cfg.getVoipAccounts()!=null){ + String cfgType = null; + for(AvVoipAccountCfg account:cfg.getVoipAccounts()){ + if(account!=null&&!account.getCfgType().equals(cfgType)){ + tabList.add(new String[]{"2",account.getCfgType()}); + cfgType = account.getCfgType(); + } + } + } + //查询关键字 + if(cfg.getNtcSubscribeIdCfgList()!=null){ + String cfgType = null; + for(NtcSubscribeIdCfg ntc:cfg.getNtcSubscribeIdCfgList()){ + if(!ntc.getCfgType().equals(cfgType)){ + tabList.add(new String[]{"2",ntc.getCfgType()}); + cfgType = ntc.getCfgType(); + } + } + } + model.addAttribute("_cfg", cfg); + model.addAttribute("index", index); + model.addAttribute("tabList", tabList); + return "/cfg/av/voip/voipSubList"; } /*****************************voip业务***************/ diff --git a/src/main/java/com/nis/web/service/configuration/AvContentCfgService.java b/src/main/java/com/nis/web/service/configuration/AvContentCfgService.java index 5bc029af1..dbd11cde5 100644 --- a/src/main/java/com/nis/web/service/configuration/AvContentCfgService.java +++ b/src/main/java/com/nis/web/service/configuration/AvContentCfgService.java @@ -78,13 +78,13 @@ public class AvContentCfgService extends BaseService{ * @param entity * @return */ - public Page findAccountPage(Page page, CfgIndexInfo entity) { + /*public Page findAccountPage(Page page, CfgIndexInfo entity) { entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"r")); entity.setPage(page); List list=avContentCfgDao.findAccountList(entity); page.setList(list); return page; - } + }*/ /** * 根据索引表信息获取voipIpCfg信息 * @param entity @@ -116,20 +116,16 @@ public class AvContentCfgService extends BaseService{ */ public CfgIndexInfo getCfgIndexInfo(CfgIndexInfo entity) { CfgIndexInfo cfg=avContentCfgDao.getCfgIndexInfo(entity); - List ntcSubscribeList=getSubscribeIdCfgList(entity); - if(ntcSubscribeList ==null || ntcSubscribeList.size() <=0){ - ntcSubscribeList.add(new NtcSubscribeIdCfg()); - } - List voipIps=getVoipIpCfgList(entity); - if(voipIps ==null || voipIps.size() <=0){ - voipIps.add(new AvVoipIpCfg()); - } + List ntcSubscribeList=getSubscribeIdCfgList(cfg); + List voipIps=getVoipIpCfgList(cfg); + List voipAccounts=getVoipAccountCfgList(cfg); cfg.setNtcSubscribeIdCfgList(ntcSubscribeList); cfg.setVoipIps(voipIps); + cfg.setVoipAccounts(voipAccounts); return cfg; } - public CfgIndexInfo getCfgIndexInfo2(CfgIndexInfo entity) { +/* public CfgIndexInfo getCfgIndexInfo2(CfgIndexInfo entity) { CfgIndexInfo cfg=avContentCfgDao.getCfgIndexInfo(entity); List voipAccounts=new ArrayList<>(); voipAccounts=getVoipAccountCfgList(entity); @@ -145,7 +141,7 @@ public class AvContentCfgService extends BaseService{ cfg.setNtcSubscribeIdCfgList(ntcSubscribeList); return cfg; - } + }*/ @Transactional(readOnly=false,rollbackFor=RuntimeException.class) public void saveOrUpdateAvVoip(CfgIndexInfo entity){ @@ -178,6 +174,12 @@ public class AvContentCfgService extends BaseService{ } } } + if(entity.getVoipAccounts()!=null&&entity.getVoipAccounts().size()>0){ + for(AvVoipAccountCfg voipAccount : entity.getVoipAccounts()){ + entity.setVoipAccount(voipAccount); + avContentCfgDao.insertAvVoipAccountCfg(entity); + } + } //保存区域IP信息 if(entity.getAreaCfg()!=null){ for(AreaIpCfg cfg:entity.getAreaCfg()){ @@ -199,6 +201,7 @@ public class AvContentCfgService extends BaseService{ //无效子配置后,再新增子配置 avContentCfgDao.deleteAvVoipIp(entity); stringCfgDao.deleteSubscribeIdCfgByCfgIndexInfo(entity); + avContentCfgDao.deleteAvVoipAccountCfg(entity); AreaIpCfg area = new AreaIpCfg(); area.setCompileId(entity.getCompileId()); area.setFunctionId(entity.getFunctionId()); @@ -219,6 +222,12 @@ public class AvContentCfgService extends BaseService{ } } } + if(entity.getVoipAccounts()!=null&&entity.getVoipAccounts().size()>0){ + for (AvVoipAccountCfg voipAccount : entity.getVoipAccounts()) { + entity.setVoipAccount(voipAccount); + avContentCfgDao.insertAvVoipAccountCfg(entity); + } + } //保存区域IP信息 if(entity.getAreaCfg()!=null){ for(AreaIpCfg cfg:entity.getAreaCfg()){ @@ -230,7 +239,7 @@ public class AvContentCfgService extends BaseService{ } } - @Transactional(readOnly=false,rollbackFor=RuntimeException.class) + /*@Transactional(readOnly=false,rollbackFor=RuntimeException.class) public void saveOrUpdateAvVoipAccount(CfgIndexInfo entity){ //设置区域运营商信息 setAreaEffectiveIds(entity); @@ -311,7 +320,7 @@ public class AvContentCfgService extends BaseService{ } } } - } + }*/ /** @@ -333,6 +342,7 @@ public class AvContentCfgService extends BaseService{ entity.setEditTime(new Date()); avContentCfgDao.updateAvVoipIp(entity); avContentCfgDao.updateAvVoipKeywordCfgt(entity); + avContentCfgDao.updateAvVoipAccount(entity); avContentCfgDao.updateCfgIndexInfo(entity); AreaIpCfg areaIpCfg=new AreaIpCfg(); BeanUtils.copyProperties(entity, areaIpCfg); @@ -345,7 +355,7 @@ public class AvContentCfgService extends BaseService{ * @param isValid * @param ids compileIds */ - @Transactional(readOnly=false,rollbackFor=RuntimeException.class) +/* @Transactional(readOnly=false,rollbackFor=RuntimeException.class) public void updateAvVoipAccountValid(Integer isAudit,Integer isValid,String compileIds,Integer functionId){ String[] idArray = compileIds.split(","); for(String id :idArray){ @@ -363,7 +373,7 @@ public class AvContentCfgService extends BaseService{ BeanUtils.copyProperties(entity, areaIpCfg); areaIpCfgDao.updateAreaIpCfgValid(areaIpCfg); } - } + }*/ /** * * @param isAudit @@ -372,16 +382,17 @@ public class AvContentCfgService extends BaseService{ * @param functionId */ @Transactional(readOnly=false,rollbackFor=RuntimeException.class) - public void auditAvVoip(Integer isAudit,Integer isValid,Integer functionId,String compileId,Date auditTime){ + public void auditAvVoip(Integer isAudit,Integer isValid,Integer functionId,String id,Date auditTime){ CfgIndexInfo entity = new CfgIndexInfo(); List list = new ArrayList(); List voipIpList = new ArrayList(); List ntcList = new ArrayList(); + List accountList = new ArrayList(); List areaIpCfgList = new ArrayList(); CfgIndexInfo searchCfg=new CfgIndexInfo(); - searchCfg.setCompileId(Integer.parseInt(compileId)); + searchCfg.setCfgId(Long.parseLong(id)); entity = avContentCfgDao.getCfgIndexInfo(searchCfg); entity.setIsAudit(isAudit); @@ -390,6 +401,7 @@ public class AvContentCfgService extends BaseService{ entity.setAuditTime(auditTime); avContentCfgDao.updateAvVoipIp(entity); + avContentCfgDao.updateAvVoipAccount(entity); avContentCfgDao.updateAvVoipKeywordCfgt(entity); avContentCfgDao.updateCfgIndexInfo(entity); @@ -398,6 +410,7 @@ public class AvContentCfgService extends BaseService{ areaIpCfgDao.updateAreaIpCfg(areaIpCfg); voipIpList=avContentCfgDao.findVoipIpCfgList(entity); + accountList=avContentCfgDao.findVoipAccountCfgList(entity); ntcList=stringCfgDao.findSubscribeIdCfgListByCfgIndexInfo(entity); areaIpCfgList=areaIpCfgDao.getByCompileId(entity.getCompileId()); @@ -423,6 +436,11 @@ public class AvContentCfgService extends BaseService{ groupRelationList=ntcMap.get("groupList"); strRegionList=ntcMap.get("dstList"); } + if(!StringUtil.isEmpty(accountList)){ + Map accountMap = cfgConvert(strRegionList,accountList,2,entity,groupRelationList); + groupRelationList=accountMap.get("groupList"); + strRegionList=accountMap.get("dstList"); + } if(!StringUtil.isEmpty(areaIpCfgList)){ Map areaMap = cfgConvert(areaIpRegionList,areaIpCfgList,1,entity,groupRelationList); groupRelationList=areaMap.get("groupList"); @@ -452,10 +470,10 @@ public class AvContentCfgService extends BaseService{ maatBean.setOpAction(Constants.INSERT_ACTION); //调用服务接口下发配置数据 String json=gsonToJson(maatBean); - logger.info("voip IP配置下发配置参数:"+json); + logger.info("voip 配置下发配置参数:"+json); //调用服务接口下发配置 ToMaatResult result = ConfigServiceUtil.postMaatCfg(json); - logger.info("voip IP配置下发响应信息:"+result.getMsg()); + logger.info("voip 配置下发响应信息:"+result.getMsg()); }else if(isAudit==3){ maatCfg.setCompileId(entity.getCompileId()); @@ -469,15 +487,15 @@ public class AvContentCfgService extends BaseService{ maatBean.setOpAction(Constants.UPDATE_ACTION); //调用服务接口取消配置 String json=gsonToJson(maatBean); - logger.info("voip IP配置下发配置参数:"+json); + logger.info("voip 配置下发配置参数:"+json); //调用服务接口下发配置 ToMaatResult result = ConfigServiceUtil.put(json,1); - logger.info("voip IP配置取消配置响应信息:"+result.getMsg()); + logger.info("voip 配置取消配置响应信息:"+result.getMsg()); } } - /********************************voip业务*********************************/ + /********************************voip account业务*********************************/ /** * * @param isAudit @@ -485,7 +503,7 @@ public class AvContentCfgService extends BaseService{ * @param ids 编译Id * @param functionId */ - @Transactional(readOnly=false,rollbackFor=RuntimeException.class) +/* @Transactional(readOnly=false,rollbackFor=RuntimeException.class) public void auditAvVoipAccount(Integer isAudit,Integer isValid,Integer functionId,String compileId,Date auditTime){ CfgIndexInfo entity = new CfgIndexInfo(); @@ -591,7 +609,7 @@ public class AvContentCfgService extends BaseService{ } - } + }*/ /********************************voip业务*********************************/ diff --git a/src/main/webapp/WEB-INF/views/cfg/av/voip/voipForm.jsp b/src/main/webapp/WEB-INF/views/cfg/av/voip/voipForm.jsp index 991995a81..f0e433c1f 100644 --- a/src/main/webapp/WEB-INF/views/cfg/av/voip/voipForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/av/voip/voipForm.jsp @@ -37,17 +37,27 @@ } }, submitHandler : function(form) { - var flag = true; - var subscribeId=0; //存在隐藏的subscribeId,不算进域配置 - if($(".boxSolid.hidden").hasClass("subscribeId")){ - subscribeId=1; - } - //代表所有业务都隐藏了,提示必须增加一种业务数据 - if(($(".boxSolid").length - 1) == ($(".boxSolid.hidden").length - subscribeId)){ - top.$.jBox.tip("", ""); - return; + if($(".boxSolid[class~='subscribeId']").length>0){ + if($(".boxSolid.hidden[class~='subscribeId']").is(":hidden")){ + if(($(".boxSolid").length) == ($(".boxSolid.hidden").length)){ + top.$.jBox.tip("", ""); + return; + } + } + if(!$(".boxSolid.hidden[class~='subscribeId']").is(":hidden")){ + if(($(".boxSolid").length) == ($(".boxSolid.hidden").length) + 1){ + top.$.jBox.tip("", ""); + return; + } + } + //代表所有业务都隐藏了,提示必须增加一种业务数据 + }else{ + if(($(".boxSolid").length) == ($(".boxSolid.hidden").length)){ + top.$.jBox.tip("", ""); + return; + } } //代表所有区域都隐藏了,提示必须增加个区域信息 if($("input[name='isAreaEffective']:checked").val()==1 && $(".container-fluid:visible").size()==0){ @@ -134,7 +144,7 @@

- +

@@ -228,6 +238,7 @@ + @@ -260,7 +271,49 @@ + + + +

+ + +

+ + <%-- --%> + + + + + + +
+ <%@include file="/WEB-INF/views/cfg/complexCfgForm.jsp"%> +
+ + +
+
+
+ + + + +
+ + + + +
+
+ +

@@ -269,7 +322,6 @@ onClick="addContent(this,'${tabName}')" title="add">

- <%-- --%> @@ -299,6 +351,7 @@
+

<%@include file="/WEB-INF/include/form/areaInfo.jsp"%> diff --git a/src/main/webapp/WEB-INF/views/cfg/av/voip/voipAccountForm.jsp b/src/main/webapp/WEB-INF/views/cfg/av/voip/voipForm.jsp.bak similarity index 80% rename from src/main/webapp/WEB-INF/views/cfg/av/voip/voipAccountForm.jsp rename to src/main/webapp/WEB-INF/views/cfg/av/voip/voipForm.jsp.bak index c85a72805..991995a81 100644 --- a/src/main/webapp/WEB-INF/views/cfg/av/voip/voipAccountForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/av/voip/voipForm.jsp.bak @@ -14,25 +14,28 @@ .ready( function() { $(".glyphicon-plus").first().click(); + /* $("#cancel").on("click", function() { + window.history.back(); + });*/ $(".action").on("change", function() { $("#serviceId").val($(this).attr("serviceId")); $("#protocolId").val($(this).attr("protocolId")); var action=$("input[name='action']:checked").val(); switchAction(action); - }); + }); $("#serviceId").val($(".action:checked").attr("serviceId")); $("#protocolId").val($(".action:checked").attr("protocolId")); $("#cfgFrom").validate( { errorPlacement : function(error, element) { - if($(element).parents().hasClass("tagsinput")){ - $(element).parents(".col-md-6").next("div").append(error); - }else{ - $(element).parents(".form-group").find( - "div[for='" - + element.attr("name") - + "']").append(error); - } - }, + if($(element).parents().hasClass("tagsinput")){ + $(element).parents(".col-md-6").next("div").append(error); + }else{ + $(element).parents(".form-group").find( + "div[for='" + + element.attr("name") + + "']").append(error); + } + }, submitHandler : function(form) { var flag = true; @@ -131,7 +134,7 @@

- +

@@ -149,7 +152,7 @@
-
@@ -158,6 +161,8 @@ value="${_cfg.serviceId}">
+ +
@@ -169,25 +174,24 @@
+
- +
- @@ -195,8 +199,9 @@
+
- +
@@ -214,56 +219,48 @@ +
- + + - - + +

- + <%-- --%> - - - - - -
- <%@include file="/WEB-INF/views/cfg/complexCfgForm.jsp"%> -
- - -
-
-
- - - + + + +
+ <%@include file="/WEB-INF/views/cfg/ipCfgForm.jsp"%> +
+
+
- +
+
- - +

@@ -272,6 +269,7 @@ onClick="addContent(this,'${tabName}')" title="add">

+ <%-- --%> @@ -301,7 +299,6 @@
-

<%@include file="/WEB-INF/include/form/areaInfo.jsp"%> diff --git a/src/main/webapp/WEB-INF/views/cfg/av/voip/voipList.jsp b/src/main/webapp/WEB-INF/views/cfg/av/voip/voipList.jsp index 477eb2d81..2d5d4618a 100644 --- a/src/main/webapp/WEB-INF/views/cfg/av/voip/voipList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/av/voip/voipList.jsp @@ -3,9 +3,6 @@ <spring:message code="${cfgName}"></spring:message> - - - @@ -27,6 +24,8 @@ $("#intype").val("${cfg.cfgDesc}"); }else if("${cfg.voipIp.srcIpAddress}"){ $("#intype").val("${cfg.voipIp.srcIpAddress}"); + }else if("${cfg.voipAccount.cfgKeywords}"){ + $("#intype").val("${cfg.voipAccount.cfgKeywords}"); }else if("${cfg.compileId}"){ $("#intype").val("${cfg.compileId}"); }else if("${cfg.voipIp.srcPort}"){ @@ -64,10 +63,8 @@ var index=$(this).attr("id").replace("open",""); $("#"+openId).hide(); $("#"+closeId).show(); - var compileId=$(this).attr("compileId"); + //var compileId=$(this).attr("compileId"); var cfgId=$(this).attr("cfgId"); - var hasIp=false; - var hasSubscribe=false; if($("#"+openId).parent().parent().next("tr").hasClass("child")){ $("#"+openId).parent().parent().next("tr").show(); }else{ @@ -75,305 +72,22 @@ type:'post', async:false, url:'${ctx}/ntc/av/ajaxVoipIpInfo', - data:{"compileId":compileId,"cfgId":cfgId}, + data:{"cfgId":cfgId,"index":index}, + dataType:"html", success:function(data){ - var voipIpCfgTab="
"+ - ""+ - ""+ + ""+ + ""; - voipIpCfgTab+=""; - $("#"+openId).parent().parent().after(voipIpCfgTab); - if(hasSubscribe && ! hasIp){ - switchInfo("ip",index); - } - if(hasIp && ! hasSubscribe){ - switchInfo("subscribe",index); - } + html = html+data; + subTab=subTab+html; + subTab+=""; + subTab+=""; + $("#"+openId).parent().parent().after(subTab); + $("div[name='tabTitle"+index+"']").eq(0).click(); } }); } @@ -389,41 +103,13 @@ }); }); - function switchInfo(flag,index){ - //关闭ip信息 - if("ip" ==flag){ - $("#ipInfo"+index).hide(); - $("#downIp"+index).hide(); - $("#ipTitle"+index).removeClass("badge-info"); - $("#subscribeInfo"+index).show(); - $("#subscribeDown"+index).show(); - $("#subscribeUp"+index).hide(); - $("#ipUp"+index).show(); - $("#ipDown"+index).hide(); - $("#subscribeTitle"+index).addClass("badge-info"); - }else{ - //关闭subscribe信息 - $("#subscribeInfo"+index).hide(); - $("#downsubscribe"+index).hide(); - $("#subscribeTitle"+index).removeClass("badge-info"); - $("#ipInfo"+index).show(); - $("#ipDown"+index).show(); - $("#subscribeUp"+index).show(); - $("#subscribeDown"+index).hide(); - $("#ipUp"+index).hide(); - $("#ipTitle"+index).addClass("badge-info"); - } - - - } -

- +

@@ -470,6 +156,7 @@ + @@ -500,12 +187,12 @@
- + <%-- --%> - +
-
+
"+ - ""+ - ""; + var subTab="
"+ + ""+ + ""; var html=""; html+="
"; - if(data.subscribe.length >0){ - hasSubscribe=true; - html+="
"; - html+=""; - html+=""; - html+=""; - html+="
"; - } - if(data.ip.length >0){ - hasIp=true; - html+="
"; - html+=""; - html+=""; - html+=""; - html+="
"; - } - - html+="
"; - //subscribe信息 - if(data.subscribe.length > 0){ - html+="
"; - $.each(data.subscribe,function(index,item){ - html+="
"; - html+="
"; - html+="
"; - html+=""; - html+="
"; - html+="
"; - html+="
"; - - if(item.isHexbin==0){ - html+="
"; - html+="
"; - html+="
"; - html+=""; - html+=""; - html+="
"; - html+="
"; - html+="
"; - html+="
"; - html+="
"; - html+="
"; - html+=""; - html+=""; - html+="
"; - html+="
"; - html+="
"; - } - if(item.isHexbin==1){ - html+="
"; - html+="
"; - html+="
"; - html+=""; - html+=""; - html+="
"; - html+="
"; - html+="
"; - html+="
"; - html+="
"; - html+="
"; - html+=""; - html+=""; - html+="
"; - html+="
"; - html+="
"; - } - if(item.isHexbin==2){ - html+="
"; - html+="
"; - html+="
"; - html+=""; - html+=""; - html+="
"; - html+="
"; - html+="
"; - html+="
"; - html+="
"; - html+="
"; - html+=""; - html+=""; - html+="
"; - html+="
"; - html+="
"; - } - - html+="
"; - html+="
"; - html+="
"; - html+=""; - html+=""; - html+="
"; - html+="
"; - html+="
"; - html+="
"; - html+="
"; - html+="
"; - html+=""; - html+=""; - html+="
"; - html+="
"; - html+="
"; - /* if(index < (data.ip.length-1) && index != 0){ - alert("下一行"); - } - html+="";*/ - }) - html+="
"; - } - //ip信息 - if(data.ip.length >0){ - html+=""; - - } - - voipIpCfgTab=voipIpCfgTab+html; - voipIpCfgTab+="
@@ -682,7 +369,7 @@ diff --git a/src/main/webapp/WEB-INF/views/cfg/av/voip/voipAccountList.jsp b/src/main/webapp/WEB-INF/views/cfg/av/voip/voipList.jsp.bak similarity index 81% rename from src/main/webapp/WEB-INF/views/cfg/av/voip/voipAccountList.jsp rename to src/main/webapp/WEB-INF/views/cfg/av/voip/voipList.jsp.bak index 16564cdaa..bd48b17b4 100644 --- a/src/main/webapp/WEB-INF/views/cfg/av/voip/voipAccountList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/av/voip/voipList.jsp.bak @@ -25,12 +25,14 @@ //搜索框提示语初始化 if("${cfg.cfgDesc}"){ $("#intype").val("${cfg.cfgDesc}"); - }else if("${cfg.ntcSubscribeIdCfg.cfgKeywords}"){ - $("#intype").val("${cfg.ntcSubscribeIdCfg.cfgKeywords}"); + }else if("${cfg.voipIp.srcIpAddress}"){ + $("#intype").val("${cfg.voipIp.srcIpAddress}"); }else if("${cfg.compileId}"){ $("#intype").val("${cfg.compileId}"); - }else if("${cfg.voipAccount.cfgKeywords}"){ - $("#intype").val("${cfg.voipAccount.cfgKeywords}"); + }else if("${cfg.voipIp.srcPort}"){ + $("#intype").val("${cfg.voipIp.srcPort}"); + }else if("${cfg.ntcSubscribeIdCfg.cfgKeywords}"){ + $("#intype").val("${cfg.ntcSubscribeIdCfg.cfgKeywords}"); }else{ $("#intype").attr("placeholder"," "+$("#seltype").find("option:selected").text()); } @@ -64,15 +66,15 @@ $("#"+closeId).show(); var compileId=$(this).attr("compileId"); var cfgId=$(this).attr("cfgId"); + var hasIp=false; var hasSubscribe=false; - var hasAccount=false; if($("#"+openId).parent().parent().next("tr").hasClass("child")){ $("#"+openId).parent().parent().next("tr").show(); }else{ $.ajax({ type:'post', async:false, - url:'${ctx}/ntc/av/ajaxVoipAccountInfo', + url:'${ctx}/ntc/av/ajaxVoipIpInfo', data:{"compileId":compileId,"cfgId":cfgId}, success:function(data){ var voipIpCfgTab=""+ @@ -82,77 +84,38 @@ ""; voipIpCfgTab+=""; $("#"+openId).parent().parent().after(voipIpCfgTab); - if(hasSubscribe && ! hasAccount){ - switchInfo("account",index); + if(hasSubscribe && ! hasIp){ + switchInfo("ip",index); } - if(hasAccount && ! hasSubscribe){ + if(hasIp && ! hasSubscribe){ switchInfo("subscribe",index); } } @@ -375,30 +390,28 @@ }); function switchInfo(flag,index){ - - if("account" ==flag){ - //关闭account信息 - $("#accountInfo"+index).hide(); - $("#downAccount"+index).hide(); - $("#accountTitle"+index).removeClass("badge-info"); + //关闭ip信息 + if("ip" ==flag){ + $("#ipInfo"+index).hide(); + $("#downIp"+index).hide(); + $("#ipTitle"+index).removeClass("badge-info"); $("#subscribeInfo"+index).show(); $("#subscribeDown"+index).show(); - $("#accountUp"+index).show(); - $("#accountDown"+index).hide(); $("#subscribeUp"+index).hide(); + $("#ipUp"+index).show(); + $("#ipDown"+index).hide(); $("#subscribeTitle"+index).addClass("badge-info"); - }else{ - //关闭subscribe信息 + //关闭subscribe信息 $("#subscribeInfo"+index).hide(); $("#downsubscribe"+index).hide(); $("#subscribeTitle"+index).removeClass("badge-info"); - $("#accountInfo"+index).show(); - $("#accountDown"+index).show(); + $("#ipInfo"+index).show(); + $("#ipDown"+index).show(); $("#subscribeUp"+index).show(); $("#subscribeDown"+index).hide(); - $("#accountUp"+index).hide(); - $("#accountTitle"+index).addClass("badge-info"); + $("#ipUp"+index).hide(); + $("#ipTitle"+index).addClass("badge-info"); } @@ -410,23 +423,23 @@

- +

- + @@ -455,7 +468,8 @@ - + + @@ -486,21 +500,21 @@
- - - + + + <%-- --%> - +
@@ -637,8 +651,8 @@
-
+
- + ${indexCfg.compileId } ${indexCfg.cfgDesc }
"; var html=""; html+="
"; - /* 订阅关键字 */ if(data.subscribe.length >0){ hasSubscribe=true; - html+="
"; + html+="
"; html+=""; html+=""; html+=""; html+="
"; } - - if(data.account.length >0){ - hasAccount=true; - html+="
"; - html+=""; - html+=""; - html+=""; + if(data.ip.length >0){ + hasIp=true; + html+="
"; + html+=""; + html+=""; + html+=""; html+="
"; } - html+="
"; //subscribe信息 if(data.subscribe.length > 0){ - html+="
"; + html+="
"; $.each(data.subscribe,function(index,item){ - //console.log(item.cfgKeywords); html+="
"; html+="
"; html+="
"; - html+="
"; html+="
"; html+="
"; - html+="
"; - html+="
"; - html+="
"; - html+=""; - html+=""; - html+="
"; - html+="
"; - html+="
"; - html+="
"; - html+="
"; - html+="
"; - html+=""; - html+=""; - html+="
"; - html+="
"; - html+="
"; + if(item.isHexbin==0){ html+="
"; html+="
"; @@ -219,26 +182,7 @@ html+="
"; html+="
"; } - /* if(index < (data.ip.length-1) && index != 0){ - alert("下一行"); - } - html+="";*/ - }) - html+="
"; - } - //account信息 - if(data.account.length > 0){ - html+=""; } + //ip信息 + if(data.ip.length >0){ + html+=""; + + } voipIpCfgTab=voipIpCfgTab+html; voipIpCfgTab+="
diff --git a/src/main/webapp/WEB-INF/views/cfg/av/voip/voipSubList.jsp b/src/main/webapp/WEB-INF/views/cfg/av/voip/voipSubList.jsp new file mode 100644 index 000000000..56f7bcc3a --- /dev/null +++ b/src/main/webapp/WEB-INF/views/cfg/av/voip/voipSubList.jsp @@ -0,0 +1,331 @@ +<%@ 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/whitelist/ipForm.jsp b/src/main/webapp/WEB-INF/views/cfg/whitelist/ipForm.jsp index f8bfe7d8a..607927741 100644 --- a/src/main/webapp/WEB-INF/views/cfg/whitelist/ipForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/whitelist/ipForm.jsp @@ -40,15 +40,26 @@ submitHandler : function(form) { //loading('onloading...'); var flag = true; - var subscribeId=0; //存在隐藏的subscribeId,不算进域配置 - if($(".boxSolid.hidden").hasClass("subscribeId")){ - subscribeId=1; - } - //代表所有业务都隐藏了,提示必须增加一种业务数据 - if(($(".boxSolid").length-1) ==($(".boxSolid.hidden").length-subscribeId)){ - top.$.jBox.tip("", ""); - return; + if($(".boxSolid[class~='subscribeId']").length>0){ + if($(".boxSolid.hidden[class~='subscribeId']").is(":hidden")){ + if(($(".boxSolid").length) == ($(".boxSolid.hidden").length)){ + top.$.jBox.tip("", ""); + return; + } + } + if(!$(".boxSolid.hidden[class~='subscribeId']").is(":hidden")){ + if(($(".boxSolid").length) == ($(".boxSolid.hidden").length) + 1){ + top.$.jBox.tip("", ""); + return; + } + } + //代表所有业务都隐藏了,提示必须增加一种业务数据 + }else{ + if(($(".boxSolid").length) == ($(".boxSolid.hidden").length)){ + top.$.jBox.tip("", ""); + return; + } } //代表所有区域都隐藏了,提示必须增加个区域信息 if($("input[name='isAreaEffective']:checked").val()==1 && $(".container-fluid:visible").size()==0){ From 760764914374ae45711f29e28f25e184e441ebc1 Mon Sep 17 00:00:00 2001 From: wangxin Date: Sat, 29 Sep 2018 09:09:17 +0800 Subject: [PATCH 11/25] =?UTF-8?q?=E6=9B=B4=E6=94=B9ip=E5=9C=B0=E5=9D=80=20?= =?UTF-8?q?ratelimit=20service=5Fid?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/sql/20180928/extend_ip_region.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/resources/sql/20180928/extend_ip_region.sql b/src/main/resources/sql/20180928/extend_ip_region.sql index aa8809328..7e79981ff 100644 --- a/src/main/resources/sql/20180928/extend_ip_region.sql +++ b/src/main/resources/sql/20180928/extend_ip_region.sql @@ -2,8 +2,8 @@ UPDATE function_service_dict SET region_code=1 WHERE function_id=5 AND region_co UPDATE function_service_dict SET region_code=2 WHERE function_id=5 AND region_code='2,3'; UPDATE function_service_dict SET is_valid=0 WHERE function_id=5 AND ACTION=1; UPDATE function_service_dict SET is_valid=0 WHERE function_id=5 AND ACTION=96; -#service_id需要定义出来之后进行替换 -INSERT INTO function_service_dict (function_id,protocol_id,ACTION,action_code,service_id,service_name,service_desc,is_valid,region_code) VALUES(5,0,64,'ratelimit',1234,'ip_ratelimit','ip地址限速',1,1); + +INSERT INTO function_service_dict (function_id,protocol_id,ACTION,action_code,service_id,service_name,service_desc,is_valid,region_code) VALUES(5,0,64,'ratelimit',1057,'ip_ratelimit','ip地址限速',1,1); #根据PROTOCOL字典查出的值替换63 SELECT id FROM sys_data_dictionary_name WHERE mark= 'PROTOCOL'; From 04d8fb24381ddf9c5c7a56948d5e7fe230e18e7e Mon Sep 17 00:00:00 2001 From: zhanghongqing Date: Sat, 29 Sep 2018 10:31:42 +0800 Subject: [PATCH 12/25] =?UTF-8?q?voip=20ip=E5=92=8Cvoipaccount=E5=90=88?= =?UTF-8?q?=E5=B9=B6=E6=95=B0=E6=8D=AE=E5=BA=93=E4=BF=AE=E6=94=B9sql,?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=A1=B5=E9=9D=A2=E5=A2=9E=E5=8A=A0=E5=8D=8F?= =?UTF-8?q?=E8=AE=AE=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/sql/20180928/update_voip.sql | 5 +++++ src/main/webapp/WEB-INF/views/cfg/av/voip/voipForm.jsp | 1 + 2 files changed, 6 insertions(+) create mode 100644 src/main/resources/sql/20180928/update_voip.sql diff --git a/src/main/resources/sql/20180928/update_voip.sql b/src/main/resources/sql/20180928/update_voip.sql new file mode 100644 index 000000000..9b8726f81 --- /dev/null +++ b/src/main/resources/sql/20180928/update_voip.sql @@ -0,0 +1,5 @@ + #voip ip跟voip account 合二为一 +update sys_menu set href = "/ntc/av/voipList" where id = 831; +update function_service_dict set service_name='av_voip_monit' where dict_id=17 +update function_service_dict set service_name='av_voip_reject' where dict_id=16 +update function_region_dict set config_region_value='MM_SUBSCRIBE_ID',function_id=24,config_region_code=2 where dict_id=208 diff --git a/src/main/webapp/WEB-INF/views/cfg/av/voip/voipForm.jsp b/src/main/webapp/WEB-INF/views/cfg/av/voip/voipForm.jsp index f0e433c1f..dc5cff0d9 100644 --- a/src/main/webapp/WEB-INF/views/cfg/av/voip/voipForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/av/voip/voipForm.jsp @@ -146,6 +146,7 @@

+
From 7292839ea5cfd2b052c9ebefe693acbe991045bd Mon Sep 17 00:00:00 2001 From: leijun Date: Sat, 29 Sep 2018 14:56:08 +0800 Subject: [PATCH 13/25] =?UTF-8?q?=E5=8C=BA=E5=9F=9F=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E5=BC=B9=E6=A1=86=E8=B0=83=E6=95=B4=EF=BC=8C=E8=A1=A8=E5=A4=B4?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../webapp/static/global/plugins/bootstrap/css/bootstrap.css | 1 - src/main/webapp/static/global/scripts/common.js | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/webapp/static/global/plugins/bootstrap/css/bootstrap.css b/src/main/webapp/static/global/plugins/bootstrap/css/bootstrap.css index 2c36da4fa..3d5b41284 100644 --- a/src/main/webapp/static/global/plugins/bootstrap/css/bootstrap.css +++ b/src/main/webapp/static/global/plugins/bootstrap/css/bootstrap.css @@ -1543,7 +1543,6 @@ pre { clear: both; } .col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 { - position: relative; min-height: 1px; /* padding-left: 15px; padding-right: 15px; */ diff --git a/src/main/webapp/static/global/scripts/common.js b/src/main/webapp/static/global/scripts/common.js index 9c2a95215..245088acf 100644 --- a/src/main/webapp/static/global/scripts/common.js +++ b/src/main/webapp/static/global/scripts/common.js @@ -1283,7 +1283,7 @@ var viewAreaInfo=function(path,areaEffectiveIds,compileId){ var title=""; if(data.areaIsps.length > 0){ title=$.validator.messages.area;//+" "+$.validator.messages.isp; - html+="
"; + html+="
"; html+=""; html+="";/* + "";*/ @@ -1302,7 +1302,7 @@ var viewAreaInfo=function(path,areaEffectiveIds,compileId){ } if(data.areaIps.length > 0){ title=$.validator.messages.area+" ip"; - html+="
"+$.validator.messages.area+""+$.validator.messages.isp+"
"; + html+="
"; html+=""; html+="" + "" + From 0e87242c67046fd3fe10c9bf58b895f6bbf491fd Mon Sep 17 00:00:00 2001 From: leijun Date: Sat, 29 Sep 2018 20:48:12 +0800 Subject: [PATCH 14/25] =?UTF-8?q?IP=E5=A4=8D=E7=94=A8=E5=9C=B0=E5=9D=80?= =?UTF-8?q?=E6=B1=A0=E9=85=8D=E7=BD=AE=20=E6=8B=86=E5=88=86=E4=B8=BA?= =?UTF-8?q?=E4=B8=A4=E4=B8=AA=E5=AD=90=E8=8F=9C=E5=8D=95=EF=BC=9ASNAT?= =?UTF-8?q?=E5=9C=B0=E5=9D=80=E6=B1=A0=E7=AE=A1=E7=90=86=E5=92=8CDNAT?= =?UTF-8?q?=E5=9C=B0=E5=9D=80=E6=B1=A0=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../configuration/IpMultiplexPoolCfg.java | 11 +- .../IpMultiplexPoolCfgController.java | 89 +++- .../configuration/IpMultiplexPoolCfgDao.xml | 12 +- .../WEB-INF/views/cfg/mail/mailForm.jsp | 5 +- .../cfg/maintenance/ipMultiplexPool/form.jsp | 97 ++-- .../cfg/maintenance/ipMultiplexPool/list.jsp | 32 +- .../maintenance/ipMultiplexPool/snatform.jsp | 236 ++++++++++ .../maintenance/ipMultiplexPool/snatlist.jsp | 442 ++++++++++++++++++ 8 files changed, 842 insertions(+), 82 deletions(-) create mode 100644 src/main/webapp/WEB-INF/views/cfg/maintenance/ipMultiplexPool/snatform.jsp create mode 100644 src/main/webapp/WEB-INF/views/cfg/maintenance/ipMultiplexPool/snatlist.jsp diff --git a/src/main/java/com/nis/domain/configuration/IpMultiplexPoolCfg.java b/src/main/java/com/nis/domain/configuration/IpMultiplexPoolCfg.java index c9ecc9109..f8cb08dbd 100644 --- a/src/main/java/com/nis/domain/configuration/IpMultiplexPoolCfg.java +++ b/src/main/java/com/nis/domain/configuration/IpMultiplexPoolCfg.java @@ -27,7 +27,7 @@ public class IpMultiplexPoolCfg extends BaseCfg { private Integer protocol; @Expose @SerializedName("ip") - private String srcIpAddress; + private String destIpAddress; @Expose private String port; @Expose @@ -58,11 +58,12 @@ public class IpMultiplexPoolCfg extends BaseCfg { this.protocol = protocol; } - public String getSrcIpAddress() { - return srcIpAddress; + + public String getDestIpAddress() { + return destIpAddress; } - public void setSrcIpAddress(String srcIpAddress) { - this.srcIpAddress = srcIpAddress; + public void setDestIpAddress(String destIpAddress) { + this.destIpAddress = destIpAddress; } public String getPort() { return port; diff --git a/src/main/java/com/nis/web/controller/configuration/maintenance/IpMultiplexPoolCfgController.java b/src/main/java/com/nis/web/controller/configuration/maintenance/IpMultiplexPoolCfgController.java index 735e5e833..247052d35 100644 --- a/src/main/java/com/nis/web/controller/configuration/maintenance/IpMultiplexPoolCfgController.java +++ b/src/main/java/com/nis/web/controller/configuration/maintenance/IpMultiplexPoolCfgController.java @@ -47,9 +47,8 @@ public class IpMultiplexPoolCfgController extends BaseController { } //查询ip复用地址池配置的policyGroup列表 - List policyGroups=policyGroupInfoService.findPolicyGroupInfosByType(2); + List policyGroups=policyGroupInfoService.findPolicyGroupInfosByType(3); model.addAttribute("policyGroups", policyGroups); - model.addAttribute("_cfg", cfg); return "/cfg/maintenance/ipMultiplexPool/form"; } @@ -92,7 +91,6 @@ public class IpMultiplexPoolCfgController extends BaseController { }catch(Exception e){ addMessage(redirectAttributes,"delete_failed"); } - return "redirect:" + adminPath +"/maintenance/ipMultiplexPoolCfg/list?functionId="+functionId; } @@ -125,4 +123,89 @@ public class IpMultiplexPoolCfgController extends BaseController { return true; } } + + @RequestMapping(value = {"/snatlist"}) + public String snatlist(Model model,HttpServletRequest request,HttpServletResponse response,@ModelAttribute("cfg")IpMultiplexPoolCfg entity){ + //查询时left join policyGroup + Page page = ipMultiplexPoolCfgService.findPage(new Page(request, response,"r"), entity); + model.addAttribute("page", page); + initPageCondition(model,entity); + return "/cfg/maintenance/ipMultiplexPool/snatlist"; + } + + @RequestMapping(value = {"/snatform"}) + @RequiresPermissions(value={"ip:mulitiplex:pool:config"}) + public String snatfrom(Model model, + HttpServletRequest request, + HttpServletResponse response, + String ids, + @ModelAttribute("cfg")IpMultiplexPoolCfg cfg){ + if(cfg == null){ + cfg=new IpMultiplexPoolCfg(); + } + if(!StringUtil.isEmpty(ids)){ + cfg = ipMultiplexPoolCfgService.getIpMultiplexPoolCfg(Long.valueOf(ids),null); + initFormCondition(model, cfg); + }else{ + initFormCondition(model, cfg); + } + + //查询ip复用地址池配置的policyGroup列表 + List policyGroups=policyGroupInfoService.findPolicyGroupInfosByType(2); + model.addAttribute("policyGroups", policyGroups); + model.addAttribute("_cfg", cfg); + return "/cfg/maintenance/ipMultiplexPool/snatform"; + } + + @RequestMapping(value = {"/snatsaveOrUpdate"}) + @RequiresPermissions(value={"ip:mulitiplex:pool:config"}) + public String snatsaveOrUpdate(Model model,HttpServletRequest request,HttpServletResponse response,RedirectAttributes redirectAttributes, + @ModelAttribute("cfg")IpMultiplexPoolCfg cfg){ + try{ + + ipMultiplexPoolCfgService.saveOrUpdate(cfg); + + addMessage(redirectAttributes,"save_success"); + }catch(Exception e){ + e.printStackTrace(); + addMessage(redirectAttributes,"save_failed"); + } + + return "redirect:" + adminPath +"/maintenance/ipMultiplexPoolCfg/snatlist?functionId="+cfg.getFunctionId(); + } + + @RequestMapping(value = {"/snataudit"}) + @RequiresPermissions(value={"ip:mulitiplex:pool:confirm"}) + public String snataudit(Integer isAudit,Integer isValid,String ids,Integer functionId,RedirectAttributes redirectAttributes) { + if(!StringUtil.isEmpty(ids)){ + String[] idArray = ids.split(","); + Date auditTime=new Date(); + for(String id :idArray){ + try { + ipMultiplexPoolCfgService.audit(isAudit,isValid,functionId,id,auditTime); + } catch (MaatConvertException e) { + e.printStackTrace(); + logger.info("SNAT地址池管理配置下发失败:"+e.getMessage()); + addMessage(redirectAttributes, e.getMessage()); + } + } + + } + return "redirect:" + adminPath +"/maintenance/ipMultiplexPoolCfg/snatlist?functionId="+functionId; + } + @RequestMapping(value = {"/snatdelete"}) + @RequiresPermissions(value={"ip:mulitiplex:pool:config"}) + public String snatdelete(Integer isAudit,Integer isValid,String ids,Integer functionId,Model model,RedirectAttributes redirectAttributes + ,HttpServletRequest request,HttpServletResponse response){ + try{ + if(!StringUtil.isEmpty(ids)){ + ipMultiplexPoolCfgService.delete(isAudit,isValid,ids,functionId); + } + addMessage(redirectAttributes,"delete_success"); + }catch(Exception e){ + addMessage(redirectAttributes,"delete_failed"); + } + return "redirect:" + adminPath +"/maintenance/ipMultiplexPoolCfg/snatlist?functionId="+functionId; + } + } diff --git a/src/main/java/com/nis/web/dao/configuration/IpMultiplexPoolCfgDao.xml b/src/main/java/com/nis/web/dao/configuration/IpMultiplexPoolCfgDao.xml index a911869d3..3ac925b99 100644 --- a/src/main/java/com/nis/web/dao/configuration/IpMultiplexPoolCfgDao.xml +++ b/src/main/java/com/nis/web/dao/configuration/IpMultiplexPoolCfgDao.xml @@ -7,7 +7,7 @@ - + @@ -72,8 +72,8 @@ AND r.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%') - - AND r.ip like concat(concat('%',#{srcIpAddress,jdbcType=VARCHAR}),'%') + + AND r.ip like concat(concat('%',#{destIpAddress,jdbcType=VARCHAR}),'%') AND a.group_name like concat(concat('%',#{groupName,jdbcType=VARCHAR}),'%') @@ -204,7 +204,7 @@ #{functionId,jdbcType=INTEGER}, #{ipType,jdbcType=INTEGER}, #{protocol,jdbcType=INTEGER}, - #{srcIpAddress,jdbcType=VARCHAR}, + #{destIpAddress,jdbcType=VARCHAR}, #{port,jdbcType=VARCHAR}, #{direction,jdbcType=INTEGER}, #{userRegion,jdbcType=VARCHAR}, @@ -277,8 +277,8 @@ protocol = #{protocol,jdbcType=INTEGER}, - - ip = #{srcIpAddress,jdbcType=VARCHAR}, + + ip = #{destIpAddress,jdbcType=VARCHAR}, port = #{port,jdbcType=VARCHAR}, diff --git a/src/main/webapp/WEB-INF/views/cfg/mail/mailForm.jsp b/src/main/webapp/WEB-INF/views/cfg/mail/mailForm.jsp index f7642e389..078e9201a 100644 --- a/src/main/webapp/WEB-INF/views/cfg/mail/mailForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/mail/mailForm.jsp @@ -134,9 +134,10 @@
-

+ <%--

-

+ --%> +
diff --git a/src/main/webapp/WEB-INF/views/cfg/maintenance/ipMultiplexPool/form.jsp b/src/main/webapp/WEB-INF/views/cfg/maintenance/ipMultiplexPool/form.jsp index e40be5c15..b9ae7b36f 100644 --- a/src/main/webapp/WEB-INF/views/cfg/maintenance/ipMultiplexPool/form.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/maintenance/ipMultiplexPool/form.jsp @@ -5,8 +5,8 @@ <spring:message code="${cfgName}"></spring:message> + + + +
+<%--

+ +

--%> +
+
+
+
+
+ + + +
+
+
+ + + + + + + + + + + + + + +
+
+
+
+ +
+ +
+
+
+
+
+
+ +
+ +
+
+
+
+ +
+
+
+ +
+
+ +
+ +
+
+
+
+
+
+ +
+
+ +
+ +
+
+
+
+
+ +
+ + <%@include file="/WEB-INF/include/form/basicInfo.jsp" %> +
+
+
+
+
+
+ + +
+
+
+
+
+
+ + +
+
+
+
+
+ + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/cfg/maintenance/ipMultiplexPool/snatlist.jsp b/src/main/webapp/WEB-INF/views/cfg/maintenance/ipMultiplexPool/snatlist.jsp new file mode 100644 index 000000000..590a881bb --- /dev/null +++ b/src/main/webapp/WEB-INF/views/cfg/maintenance/ipMultiplexPool/snatlist.jsp @@ -0,0 +1,442 @@ +<%@ page contentType="text/html;charset=UTF-8"%> +<%@ include file="/WEB-INF/include/taglib.jsp"%> + + +<spring:message code="${cfgName}"></spring:message> + + + + +
+ + +

+ +

+ +
+
+
+
+ + + + + + + + + + +
+
+ + + + + + + <%-- --%> + +
+ +
+ +
+
+ + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+ +
+
+
+ + + +
+
+ + + + + +
+ + +
+
+ href="javascript:;"> + + +
+
+ + + +
+
+ +
+ +
+ + + + + + + + +
+ +
+ +
+ +
+ + + + + + + +
+ +
+ +
+ +
+ + + + + + + + +
+ +
+ +
+ +
+ + + + + + + +
+ +
+ +
+ +
+
+
+ + +
+
+ +
+
+ + " onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/> + +
+
+ +
+
+ + " onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/> + +
+
+ +
+
+ + " onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/> + +
+
+ +
+
+ + " onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/> + +
+
+ +
+
+ + " onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/> + +
+
+
+ + +
+ + +
+
+ +
+
"+$.validator.messages.ip_type+""+$.validator.messages.ip_pattern+"
+ + + + <%-- --%> + + + + + <%-- --%> + <%-- + --%> + <%-- + --%> + + + + + + + + + + + + + + <%-- --%> + + + + + + + + + + + <%-- --%> + <%-- + --%> + <%-- + --%> + + + + + + + + <%-- --%> + + + + + + + + + + + + +
${cfg.compileId} + + ${fns:abbr(cfg.cfgDesc,20)} + + + + ${fns:abbr(cfg.groupName,20)} + + ${fns:abbr(cfg.destIpAddress, 42)}${cfg.port } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${cfg.requestName } + + + + + + + + + + + + + + + ${fns:abbr(classify,20)} + + + + + + + + + + + + + + + + + ${fns:abbr(attribute,20)} + + + + + + + + + + + + + + + + + ${fns:abbr(lableInfo,20)} + + ${cfg.areaEffectiveIds } + + + + ${cfg.creatorName }${cfg.editorName }${cfg.auditorName }
+
${page}
+
+ + + + + + + \ No newline at end of file From 5e2efc3e5a9f1665dd6ceaaac344a331427399b6 Mon Sep 17 00:00:00 2001 From: leijun Date: Sat, 29 Sep 2018 20:50:55 +0800 Subject: [PATCH 15/25] =?UTF-8?q?IP=E5=A4=8D=E7=94=A8=E5=9C=B0=E5=9D=80?= =?UTF-8?q?=E6=B1=A0=E5=9B=BD=E9=99=85=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/messages/message_en.properties | 10 ++++++++-- src/main/resources/messages/message_zh_CN.properties | 9 +++++++-- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/main/resources/messages/message_en.properties b/src/main/resources/messages/message_en.properties index c110bc780..55db99cda 100644 --- a/src/main/resources/messages/message_en.properties +++ b/src/main/resources/messages/message_en.properties @@ -804,7 +804,7 @@ NTC_HTTP_RES_BODY=Response Body Configuration NTC_UNIVERSAL_IP=IP Configuration NTC_BGP_AS=AS Configuration NTC_DNS_REGION=Keyword Configuration -WHITE_LIST_DOMAIN=Domain White List +WHITE_LIST_DOMAIN=URL Configuration av_voip_account=VoIP Account Configuration av_cont_ip=Content IP Configuration NTC_SSL_SNI=SNI Keyword Configuration @@ -901,6 +901,7 @@ av_voip_ip_reject=Multimedia VoIP Control av_voip_ip_monit=Multimedia VoIP Monitoring website_http_reject=Website Http Control website_http_monit=Website Http Monitoring +website_http_whitelist=Website Http White List domain_white_whitelist=Global Domain Name White List av_content_ip_reject=Multimedia Content IP Control av_content_ip_monit=Multimedia Content IP Monitoring @@ -1171,4 +1172,9 @@ percentage=Percentage APP_SSL=APP SSL Feature APP_IP_RANGE=APP IP RANGE APP_DK=APP DK Feature -MM_SUBSCRIBE_ID=Subscribe ID \ No newline at end of file +MM_SUBSCRIBE_ID=Subscribe ID +mail_note=Note\uff1aIdentifiable Protocols Include SMTP\u3001POP3\u3001IMAP\u3002 +av_content_url_note=Note\uff1aIdentifiable Protocols Include RTSP\u3001TRMP\u3001MMS\u3002 +protocol_note=Note:Recognizable Protocols Include SIP,RTCP,RTP\u3002 +snat_multiplex=SNAT Address Pool +dnat_multiplex=DNAT Address Pool \ No newline at end of file diff --git a/src/main/resources/messages/message_zh_CN.properties b/src/main/resources/messages/message_zh_CN.properties index 006093d6c..5871d08fd 100644 --- a/src/main/resources/messages/message_zh_CN.properties +++ b/src/main/resources/messages/message_zh_CN.properties @@ -802,7 +802,7 @@ NTC_HTTP_RES_BODY=\u5E94\u7B54\u5185\u5BB9\u5173\u952E\u5B57\u914D\u7F6E NTC_UNIVERSAL_IP=IP\u914D\u7F6E NTC_BGP_AS=AS\u914D\u7F6E NTC_DNS_REGION=\u5173\u952E\u5B57\u914D\u7F6E -WHITE_LIST_DOMAIN=\u57DF\u540D\u767D\u540D\u5355 +WHITE_LIST_DOMAIN=URL\u914D\u7F6E av_voip_account=VoIP\u8D26\u53F7\u914D\u7F6E av_cont_ip=\u5185\u5BB9IP\u914D\u7F6E NTC_SSL_SNI=SNI\u5173\u952E\u5B57\u914D\u7F6E @@ -1168,4 +1168,9 @@ percentage=\u767E\u5206\u6BD4 APP_SSL=APP SSL\u7279\u5F81 APP_IP_RANGE=APP IP RANGE APP_DK=APP DK\u7279\u5F81 -MM_SUBSCRIBE_ID=\u8D26\u53F7 \ No newline at end of file +MM_SUBSCRIBE_ID=\u8D26\u53F7 +mail_note=\u6CE8\uFF1A\u53EF\u8BC6\u522B\u534F\u8BAE\u5305\u62ECSMTP\u3001POP3\u3001IMAP\u3002 +av_content_url_note=\u6CE8\uFF1A\u53EF\u8BC6\u522B\u534F\u8BAE\u5305\u62ECRTSP\u3001TRMP\u3001MMS\u3002 +protocol_note=\u6CE8\uFF1A\u53EF\u8BC6\u522B\u534F\u8BAE\u5305\u62ECSIP\u3001RTCP\u3001RTP\u3002 +snat_multiplex=SNAT\u5730\u5740\u6C60\u7BA1\u7406 +dnat_multiplex=DNAT\u5730\u5740\u6C60\u7BA1\u7406 \ No newline at end of file From 9db2e73d0443fac0735326522bbe480f11a01266 Mon Sep 17 00:00:00 2001 From: leijun Date: Sat, 29 Sep 2018 21:12:47 +0800 Subject: [PATCH 16/25] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=95=8C=E9=9D=A2?= =?UTF-8?q?=E5=8E=BB=E9=99=A4title?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/sql/20180929/update_avAudio.sql | 3 +++ src/main/resources/sql/20180929/update_http_url.sql | 8 ++++++++ src/main/webapp/WEB-INF/views/basics/serviceDictForm.jsp | 4 ++-- src/main/webapp/WEB-INF/views/basics/sysDictForm.jsp | 4 ++-- src/main/webapp/WEB-INF/views/basics/taskInfoForm.jsp | 4 ++-- .../WEB-INF/views/cfg/app/appBuiltinFeatureFileForm.jsp | 4 ++-- src/main/webapp/WEB-INF/views/cfg/app/appByteCfgForm.jsp | 4 ++-- .../webapp/WEB-INF/views/cfg/app/appDomainCfgForm.jsp | 4 ++-- .../webapp/WEB-INF/views/cfg/app/appHeaderCfgForm.jsp | 6 +++--- src/main/webapp/WEB-INF/views/cfg/app/appHttpCfgForm.jsp | 4 ++-- src/main/webapp/WEB-INF/views/cfg/app/appIpCfgForm.jsp | 4 ++-- .../WEB-INF/views/cfg/app/appMultiFeatureCfgForm.jsp | 4 ++-- .../webapp/WEB-INF/views/cfg/app/appPolicyCfgForm.jsp | 4 ++-- src/main/webapp/WEB-INF/views/cfg/app/appSslCfgForm.jsp | 4 ++-- src/main/webapp/WEB-INF/views/cfg/app/appTcpCfgForm.jsp | 4 ++-- .../WEB-INF/views/cfg/app/appTopicDomainCfgForm.jsp | 4 ++-- src/main/webapp/WEB-INF/views/cfg/appCfgForm.jsp | 4 ++-- src/main/webapp/WEB-INF/views/cfg/asnPolicyCfgForm.jsp | 4 ++-- .../webapp/WEB-INF/views/cfg/av/contIp/contIpForm.jsp | 4 ++-- .../webapp/WEB-INF/views/cfg/av/contUrl/contUrlForm.jsp | 7 +++---- src/main/webapp/WEB-INF/views/cfg/av/fileSampleForm.jsp | 4 ++-- src/main/webapp/WEB-INF/views/cfg/av/picIp/picIpForm.jsp | 4 ++-- .../webapp/WEB-INF/views/cfg/av/picUrl/picUrlForm.jsp | 4 ++-- src/main/webapp/WEB-INF/views/cfg/av/signSampleForm.jsp | 4 ++-- src/main/webapp/WEB-INF/views/cfg/basicprotocol/form.jsp | 4 ++-- src/main/webapp/WEB-INF/views/cfg/common/ipForm.jsp | 4 ++-- src/main/webapp/WEB-INF/views/cfg/ddosIpCfgForm.jsp | 4 ++-- src/main/webapp/WEB-INF/views/cfg/dnsIpCfgForm.jsp | 4 ++-- .../WEB-INF/views/cfg/encryptedtunnelbehav/form.jsp | 4 ++-- .../WEB-INF/views/cfg/fileTransfer/fileDigestForm.jsp | 4 ++-- .../webapp/WEB-INF/views/cfg/fileTransfer/ftpForm.jsp | 4 ++-- .../webapp/WEB-INF/views/cfg/fileTransfer/p2pForm.jsp | 4 ++-- .../webapp/WEB-INF/views/cfg/intercept/interceptForm.jsp | 4 ++-- .../webapp/WEB-INF/views/cfg/intercept/strateagy/form.jsp | 4 ++-- src/main/webapp/WEB-INF/views/cfg/ipBlockForm.jsp | 4 ++-- src/main/webapp/WEB-INF/views/cfg/ipCfgDemoForm.jsp | 4 ++-- src/main/webapp/WEB-INF/views/cfg/ipWhiteForm.jsp | 4 ++-- src/main/webapp/WEB-INF/views/cfg/ipaddr/ipForm.jsp | 4 ++-- src/main/webapp/WEB-INF/views/cfg/ipsec/ipForm.jsp | 4 ++-- .../WEB-INF/views/cfg/maintenance/dnsResStrategy/form.jsp | 4 ++-- .../WEB-INF/views/cfg/manipulation/ipmulitiplex/form.jsp | 4 ++-- src/main/webapp/WEB-INF/views/cfg/multipleCfgForm.jsp | 4 ++-- src/main/webapp/WEB-INF/views/cfg/other/bgpForm.jsp | 4 ++-- .../WEB-INF/views/cfg/proxy/control/httpRedirectForm.jsp | 4 ++-- .../views/cfg/proxy/control/httpReqReplaceForm.jsp | 4 ++-- .../views/cfg/proxy/control/httpResReplaceForm.jsp | 4 ++-- .../webapp/WEB-INF/views/cfg/proxy/fileStrategy/form.jsp | 4 ++-- src/main/webapp/WEB-INF/views/cfg/website/dnsForm.jsp | 4 ++-- src/main/webapp/WEB-INF/views/cfg/website/httpForm.jsp | 4 ++-- src/main/webapp/WEB-INF/views/cfg/website/sslForm.jsp | 4 ++-- src/main/webapp/WEB-INF/views/cfg/whitelist/ipForm.jsp | 4 ++-- 51 files changed, 111 insertions(+), 101 deletions(-) create mode 100644 src/main/resources/sql/20180929/update_avAudio.sql create mode 100644 src/main/resources/sql/20180929/update_http_url.sql diff --git a/src/main/resources/sql/20180929/update_avAudio.sql b/src/main/resources/sql/20180929/update_avAudio.sql new file mode 100644 index 000000000..9fecb6875 --- /dev/null +++ b/src/main/resources/sql/20180929/update_avAudio.sql @@ -0,0 +1,3 @@ +#音视频添加action白名单置位无效 +update function_service_dict set is_valid='0' where dict_id='130'; +update function_service_dict set is_valid='0' where dict_id='131'; \ No newline at end of file diff --git a/src/main/resources/sql/20180929/update_http_url.sql b/src/main/resources/sql/20180929/update_http_url.sql new file mode 100644 index 000000000..69ca58431 --- /dev/null +++ b/src/main/resources/sql/20180929/update_http_url.sql @@ -0,0 +1,8 @@ +INSERT INTO `function_service_dict` ( `function_id`, `protocol_id`, `action`, `action_code`, `service_id`, `service_name`, `service_desc`, `is_valid`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `region_code`) VALUES ( '6', '4', '16', 'reject', '17', 'website_http_reject', NULL, '1', NULL, NULL, NULL, NULL, '1,2,3,4,5,6'); +INSERT INTO `function_service_dict` ( `function_id`, `protocol_id`, `action`, `action_code`, `service_id`, `service_name`, `service_desc`, `is_valid`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `region_code`) VALUES ( '6', '4', '1', 'monit', '129', 'website_http_monit', NULL, '1', NULL, NULL, NULL, NULL, '1,2,3,4,5,6'); + +update function_region_dict set function_id='6' , config_service_type='http_url' where dict_id='15'; + +#ip复用地址池 +INSERT INTO `function_service_dict` ( `function_id`, `protocol_id`, `action`, `action_code`, `service_id`, `service_name`, `service_desc`, `is_valid`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `region_code`) VALUES ( '633', '0', '96', 'loop', '832', 'ip_reuse_adress_pool_loop', NULL, '1', NULL, NULL, NULL, NULL, NULL); +INSERT INTO `function_region_dict` (`config_service_type`, `config_multi_keywords`, `config_expr_type`, `config_hex`, `config_match_method`, `function_id`, `config_region_code`, `config_region_value`, `config_district`, `config_desc`, `is_valid`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `is_maat`, `region_type`, `config_ip_type`, `config_ip_pattern`, `config_port_pattern`, `config_direction`, `config_protocol`, `config_ip_port_show`, `config_region_sort`) VALUES (NULL, NULL, NULL, NULL, NULL, '633', '1', 'IR_STATIC_IP_POOL_CB', NULL, 'IP复用地址池配置', '1', NULL, NULL, NULL, NULL, '2', '2', '4,6', '1,2,3', '1,2', '0', '0', '1', '1'); diff --git a/src/main/webapp/WEB-INF/views/basics/serviceDictForm.jsp b/src/main/webapp/WEB-INF/views/basics/serviceDictForm.jsp index b3bf7c6c4..e3b32bea6 100644 --- a/src/main/webapp/WEB-INF/views/basics/serviceDictForm.jsp +++ b/src/main/webapp/WEB-INF/views/basics/serviceDictForm.jsp @@ -153,7 +153,7 @@ label.errorShow { -

+<%--

@@ -166,7 +166,7 @@ label.errorShow { -

+ --%>
diff --git a/src/main/webapp/WEB-INF/views/basics/sysDictForm.jsp b/src/main/webapp/WEB-INF/views/basics/sysDictForm.jsp index 72253b6ed..703203db5 100644 --- a/src/main/webapp/WEB-INF/views/basics/sysDictForm.jsp +++ b/src/main/webapp/WEB-INF/views/basics/sysDictForm.jsp @@ -110,7 +110,7 @@
-

+<%--

@@ -119,7 +119,7 @@ -

+ --%>
diff --git a/src/main/webapp/WEB-INF/views/basics/taskInfoForm.jsp b/src/main/webapp/WEB-INF/views/basics/taskInfoForm.jsp index fe57afe01..fc87b854c 100644 --- a/src/main/webapp/WEB-INF/views/basics/taskInfoForm.jsp +++ b/src/main/webapp/WEB-INF/views/basics/taskInfoForm.jsp @@ -9,9 +9,9 @@
-

+<%--

-

+ --%>
diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appBuiltinFeatureFileForm.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appBuiltinFeatureFileForm.jsp index beef4be9f..df3944a5b 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appBuiltinFeatureFileForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appBuiltinFeatureFileForm.jsp @@ -40,9 +40,9 @@ $(function(){
-

+<%--

-

+ --%>
diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appByteCfgForm.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appByteCfgForm.jsp index 869397931..47b656bf7 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appByteCfgForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appByteCfgForm.jsp @@ -46,9 +46,9 @@ $(function(){
-

+<%--

-

+ --%>
diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appDomainCfgForm.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appDomainCfgForm.jsp index 0160005a2..da881696a 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appDomainCfgForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appDomainCfgForm.jsp @@ -47,9 +47,9 @@ $(function(){
-

+<%--

-

+ --%>
diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appHeaderCfgForm.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appHeaderCfgForm.jsp index b30f94274..73793adcd 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appHeaderCfgForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appHeaderCfgForm.jsp @@ -61,14 +61,14 @@ $(function(){
-

- <%-- --%> +<%--

+ -

+ --%>
diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appHttpCfgForm.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appHttpCfgForm.jsp index fe0887494..26c1a8352 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appHttpCfgForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appHttpCfgForm.jsp @@ -61,9 +61,9 @@ $(function(){
-

+<%--

-

+ --%>
diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appIpCfgForm.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appIpCfgForm.jsp index bad41a0ec..05acea677 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appIpCfgForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appIpCfgForm.jsp @@ -28,9 +28,9 @@ $(function(){
-

+<%--

-

+ --%>
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 21a31a93c..b5899a909 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appMultiFeatureCfgForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appMultiFeatureCfgForm.jsp @@ -98,9 +98,9 @@ var delContent = function(contentClassName, addBtnClassName) { -

+<%--

-

+ --%>
diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appPolicyCfgForm.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appPolicyCfgForm.jsp index fa3773b2e..e727d3c10 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appPolicyCfgForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appPolicyCfgForm.jsp @@ -167,9 +167,9 @@ var delContent = function(contentClassName, addBtnClassName) {
-

+<%--

-

+ --%>
diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appSslCfgForm.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appSslCfgForm.jsp index 9d783717f..afcae4c79 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appSslCfgForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appSslCfgForm.jsp @@ -61,9 +61,9 @@ $(function(){
-

+<%--

-

+ --%>
diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appTcpCfgForm.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appTcpCfgForm.jsp index f70f619ea..726222400 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appTcpCfgForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appTcpCfgForm.jsp @@ -55,9 +55,9 @@ $(function(){
-

+<%--

-

+ --%>
diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appTopicDomainCfgForm.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appTopicDomainCfgForm.jsp index efaa37535..0229183c1 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appTopicDomainCfgForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appTopicDomainCfgForm.jsp @@ -144,9 +144,9 @@ $(function(){
-

+<%--

-

+ --%>
diff --git a/src/main/webapp/WEB-INF/views/cfg/appCfgForm.jsp b/src/main/webapp/WEB-INF/views/cfg/appCfgForm.jsp index c415a7073..df4bd98ec 100644 --- a/src/main/webapp/WEB-INF/views/cfg/appCfgForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/appCfgForm.jsp @@ -71,9 +71,9 @@ $(function(){
-

+<%--

-

+ --%>
diff --git a/src/main/webapp/WEB-INF/views/cfg/asnPolicyCfgForm.jsp b/src/main/webapp/WEB-INF/views/cfg/asnPolicyCfgForm.jsp index 7eb70b40e..4384f3640 100644 --- a/src/main/webapp/WEB-INF/views/cfg/asnPolicyCfgForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/asnPolicyCfgForm.jsp @@ -28,9 +28,9 @@ $(function(){
-

+<%--

-

+ --%>
diff --git a/src/main/webapp/WEB-INF/views/cfg/av/contIp/contIpForm.jsp b/src/main/webapp/WEB-INF/views/cfg/av/contIp/contIpForm.jsp index 53b652168..3111d220d 100644 --- a/src/main/webapp/WEB-INF/views/cfg/av/contIp/contIpForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/av/contIp/contIpForm.jsp @@ -64,9 +64,9 @@ var delContent = function(contentClassName, addBtnClassName) {
-

+<%--

-

+ --%>
diff --git a/src/main/webapp/WEB-INF/views/cfg/av/contUrl/contUrlForm.jsp b/src/main/webapp/WEB-INF/views/cfg/av/contUrl/contUrlForm.jsp index 97b95f3c0..d0ee77f83 100644 --- a/src/main/webapp/WEB-INF/views/cfg/av/contUrl/contUrlForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/av/contUrl/contUrlForm.jsp @@ -96,11 +96,10 @@ var delContent = function(contentClassName, addBtnClassName) {
-

+<%--

-

- - + --%> +
diff --git a/src/main/webapp/WEB-INF/views/cfg/av/fileSampleForm.jsp b/src/main/webapp/WEB-INF/views/cfg/av/fileSampleForm.jsp index 296bbb996..ce8e3aa11 100644 --- a/src/main/webapp/WEB-INF/views/cfg/av/fileSampleForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/av/fileSampleForm.jsp @@ -100,13 +100,13 @@ function hiddenlevel(){
-

+<%--

-

+ --%>
diff --git a/src/main/webapp/WEB-INF/views/cfg/av/picIp/picIpForm.jsp b/src/main/webapp/WEB-INF/views/cfg/av/picIp/picIpForm.jsp index 9650982dc..b74f1512c 100644 --- a/src/main/webapp/WEB-INF/views/cfg/av/picIp/picIpForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/av/picIp/picIpForm.jsp @@ -65,9 +65,9 @@ var delContent = function(contentClassName, addBtnClassName) {
-

+<%--

-

+ --%>
diff --git a/src/main/webapp/WEB-INF/views/cfg/av/picUrl/picUrlForm.jsp b/src/main/webapp/WEB-INF/views/cfg/av/picUrl/picUrlForm.jsp index 14884a22f..a3aa6ea9a 100644 --- a/src/main/webapp/WEB-INF/views/cfg/av/picUrl/picUrlForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/av/picUrl/picUrlForm.jsp @@ -88,9 +88,9 @@ var delContent = function(contentClassName, addBtnClassName) {
-

+ <%--

-

+ --%>
diff --git a/src/main/webapp/WEB-INF/views/cfg/av/signSampleForm.jsp b/src/main/webapp/WEB-INF/views/cfg/av/signSampleForm.jsp index 47d8110d9..a1e13513d 100644 --- a/src/main/webapp/WEB-INF/views/cfg/av/signSampleForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/av/signSampleForm.jsp @@ -75,13 +75,13 @@ function hiddenlevel(){
-

+<%--

-

+ --%>
diff --git a/src/main/webapp/WEB-INF/views/cfg/basicprotocol/form.jsp b/src/main/webapp/WEB-INF/views/cfg/basicprotocol/form.jsp index a309e3b42..397d8ab0c 100644 --- a/src/main/webapp/WEB-INF/views/cfg/basicprotocol/form.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/basicprotocol/form.jsp @@ -131,9 +131,9 @@ var delContent = function(contentClassName, addBtnClassName) {
-

+<%--

-

+ --%>
diff --git a/src/main/webapp/WEB-INF/views/cfg/common/ipForm.jsp b/src/main/webapp/WEB-INF/views/cfg/common/ipForm.jsp index 75d8e2d33..76dc50ae7 100644 --- a/src/main/webapp/WEB-INF/views/cfg/common/ipForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/common/ipForm.jsp @@ -280,9 +280,9 @@ $(function(){
-

+<%--

-

+ --%>
diff --git a/src/main/webapp/WEB-INF/views/cfg/ddosIpCfgForm.jsp b/src/main/webapp/WEB-INF/views/cfg/ddosIpCfgForm.jsp index f79fcfe8b..079fdf248 100644 --- a/src/main/webapp/WEB-INF/views/cfg/ddosIpCfgForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/ddosIpCfgForm.jsp @@ -32,9 +32,9 @@ $(function(){
-

+ <%--

-

+ --%>
diff --git a/src/main/webapp/WEB-INF/views/cfg/dnsIpCfgForm.jsp b/src/main/webapp/WEB-INF/views/cfg/dnsIpCfgForm.jsp index 22a32567c..e61bcf5eb 100644 --- a/src/main/webapp/WEB-INF/views/cfg/dnsIpCfgForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/dnsIpCfgForm.jsp @@ -32,9 +32,9 @@ $(function(){
-

+<%--

-

+ --%>
diff --git a/src/main/webapp/WEB-INF/views/cfg/encryptedtunnelbehav/form.jsp b/src/main/webapp/WEB-INF/views/cfg/encryptedtunnelbehav/form.jsp index e79176b1c..54cfa394d 100644 --- a/src/main/webapp/WEB-INF/views/cfg/encryptedtunnelbehav/form.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/encryptedtunnelbehav/form.jsp @@ -155,9 +155,9 @@ var delContent = function(contentClassName, addBtnClassName) {
-

+<%--

-

+ --%>
diff --git a/src/main/webapp/WEB-INF/views/cfg/fileTransfer/fileDigestForm.jsp b/src/main/webapp/WEB-INF/views/cfg/fileTransfer/fileDigestForm.jsp index 0868ec894..dad4ecf31 100644 --- a/src/main/webapp/WEB-INF/views/cfg/fileTransfer/fileDigestForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/fileTransfer/fileDigestForm.jsp @@ -99,9 +99,9 @@
-

+<%--

-

+ --%>
diff --git a/src/main/webapp/WEB-INF/views/cfg/fileTransfer/ftpForm.jsp b/src/main/webapp/WEB-INF/views/cfg/fileTransfer/ftpForm.jsp index 87f763929..e3cf1fbcc 100644 --- a/src/main/webapp/WEB-INF/views/cfg/fileTransfer/ftpForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/fileTransfer/ftpForm.jsp @@ -128,9 +128,9 @@
-

+ <%--

-

+ --%>
diff --git a/src/main/webapp/WEB-INF/views/cfg/fileTransfer/p2pForm.jsp b/src/main/webapp/WEB-INF/views/cfg/fileTransfer/p2pForm.jsp index 954b93242..264fcfb0e 100644 --- a/src/main/webapp/WEB-INF/views/cfg/fileTransfer/p2pForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/fileTransfer/p2pForm.jsp @@ -122,9 +122,9 @@
-

+<%--

-

+ --%>
diff --git a/src/main/webapp/WEB-INF/views/cfg/intercept/interceptForm.jsp b/src/main/webapp/WEB-INF/views/cfg/intercept/interceptForm.jsp index 6a9d20eec..a2714d49d 100644 --- a/src/main/webapp/WEB-INF/views/cfg/intercept/interceptForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/intercept/interceptForm.jsp @@ -136,7 +136,7 @@
-

+<%--

@@ -146,7 +146,7 @@ -

+ --%>
diff --git a/src/main/webapp/WEB-INF/views/cfg/intercept/strateagy/form.jsp b/src/main/webapp/WEB-INF/views/cfg/intercept/strateagy/form.jsp index f4de1daa8..ef853382a 100644 --- a/src/main/webapp/WEB-INF/views/cfg/intercept/strateagy/form.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/intercept/strateagy/form.jsp @@ -79,9 +79,9 @@ var switchKeyringType=function(){
-

+<%--

-

+ --%>
diff --git a/src/main/webapp/WEB-INF/views/cfg/ipBlockForm.jsp b/src/main/webapp/WEB-INF/views/cfg/ipBlockForm.jsp index 70dff97ae..fdcc734e6 100644 --- a/src/main/webapp/WEB-INF/views/cfg/ipBlockForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/ipBlockForm.jsp @@ -9,9 +9,9 @@
-

+
diff --git a/src/main/webapp/WEB-INF/views/cfg/ipCfgDemoForm.jsp b/src/main/webapp/WEB-INF/views/cfg/ipCfgDemoForm.jsp index a78ef53c0..b2696dd26 100644 --- a/src/main/webapp/WEB-INF/views/cfg/ipCfgDemoForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/ipCfgDemoForm.jsp @@ -69,9 +69,9 @@
-

+ <%--

-

+

--%>
diff --git a/src/main/webapp/WEB-INF/views/cfg/ipWhiteForm.jsp b/src/main/webapp/WEB-INF/views/cfg/ipWhiteForm.jsp index 786501b32..83f1d4f81 100644 --- a/src/main/webapp/WEB-INF/views/cfg/ipWhiteForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/ipWhiteForm.jsp @@ -9,9 +9,9 @@
-

+
diff --git a/src/main/webapp/WEB-INF/views/cfg/ipaddr/ipForm.jsp b/src/main/webapp/WEB-INF/views/cfg/ipaddr/ipForm.jsp index 9a869607f..770c72b9e 100644 --- a/src/main/webapp/WEB-INF/views/cfg/ipaddr/ipForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/ipaddr/ipForm.jsp @@ -227,9 +227,9 @@ var processAction=function(obj){
-

+<%--

-

+

--%>
diff --git a/src/main/webapp/WEB-INF/views/cfg/ipsec/ipForm.jsp b/src/main/webapp/WEB-INF/views/cfg/ipsec/ipForm.jsp index 4dfdea7c2..e80887e0a 100644 --- a/src/main/webapp/WEB-INF/views/cfg/ipsec/ipForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/ipsec/ipForm.jsp @@ -62,9 +62,9 @@ $(function(){
-

+<%--

-

+ --%>
diff --git a/src/main/webapp/WEB-INF/views/cfg/maintenance/dnsResStrategy/form.jsp b/src/main/webapp/WEB-INF/views/cfg/maintenance/dnsResStrategy/form.jsp index 6037bd584..bd5fe9d0d 100644 --- a/src/main/webapp/WEB-INF/views/cfg/maintenance/dnsResStrategy/form.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/maintenance/dnsResStrategy/form.jsp @@ -72,9 +72,9 @@ $(function(){
-

+<%--

-

+ --%>
diff --git a/src/main/webapp/WEB-INF/views/cfg/manipulation/ipmulitiplex/form.jsp b/src/main/webapp/WEB-INF/views/cfg/manipulation/ipmulitiplex/form.jsp index bce08e4bc..04cd86dac 100644 --- a/src/main/webapp/WEB-INF/views/cfg/manipulation/ipmulitiplex/form.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/manipulation/ipmulitiplex/form.jsp @@ -30,9 +30,9 @@ $(function(){
-

+<%--

-

+ --%>
diff --git a/src/main/webapp/WEB-INF/views/cfg/multipleCfgForm.jsp b/src/main/webapp/WEB-INF/views/cfg/multipleCfgForm.jsp index 81e66f99c..ce5621e6b 100644 --- a/src/main/webapp/WEB-INF/views/cfg/multipleCfgForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/multipleCfgForm.jsp @@ -180,9 +180,9 @@ $(function(){
-

+ <%--

-

+ --%>
diff --git a/src/main/webapp/WEB-INF/views/cfg/other/bgpForm.jsp b/src/main/webapp/WEB-INF/views/cfg/other/bgpForm.jsp index 025dbf91b..4d8710c33 100644 --- a/src/main/webapp/WEB-INF/views/cfg/other/bgpForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/other/bgpForm.jsp @@ -116,9 +116,9 @@
-

+<%--

-

+ --%>
diff --git a/src/main/webapp/WEB-INF/views/cfg/proxy/control/httpRedirectForm.jsp b/src/main/webapp/WEB-INF/views/cfg/proxy/control/httpRedirectForm.jsp index 85f6082cf..78e1ded4b 100644 --- a/src/main/webapp/WEB-INF/views/cfg/proxy/control/httpRedirectForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/proxy/control/httpRedirectForm.jsp @@ -123,13 +123,13 @@
-

+ <%--

-

+ --%>
diff --git a/src/main/webapp/WEB-INF/views/cfg/proxy/control/httpReqReplaceForm.jsp b/src/main/webapp/WEB-INF/views/cfg/proxy/control/httpReqReplaceForm.jsp index 937fcf997..cce735bd0 100644 --- a/src/main/webapp/WEB-INF/views/cfg/proxy/control/httpReqReplaceForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/proxy/control/httpReqReplaceForm.jsp @@ -48,9 +48,9 @@ $(function(){
-

+<%--

-

+ --%>
diff --git a/src/main/webapp/WEB-INF/views/cfg/proxy/control/httpResReplaceForm.jsp b/src/main/webapp/WEB-INF/views/cfg/proxy/control/httpResReplaceForm.jsp index 16967272e..8e537d822 100644 --- a/src/main/webapp/WEB-INF/views/cfg/proxy/control/httpResReplaceForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/proxy/control/httpResReplaceForm.jsp @@ -48,9 +48,9 @@ $(function(){
-

+<%--

-

+ --%>
diff --git a/src/main/webapp/WEB-INF/views/cfg/proxy/fileStrategy/form.jsp b/src/main/webapp/WEB-INF/views/cfg/proxy/fileStrategy/form.jsp index dd6292cd4..e04ff401a 100644 --- a/src/main/webapp/WEB-INF/views/cfg/proxy/fileStrategy/form.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/proxy/fileStrategy/form.jsp @@ -37,9 +37,9 @@
-

+<%--

-

+ --%>
diff --git a/src/main/webapp/WEB-INF/views/cfg/website/dnsForm.jsp b/src/main/webapp/WEB-INF/views/cfg/website/dnsForm.jsp index 6b44b4425..99fb9d573 100644 --- a/src/main/webapp/WEB-INF/views/cfg/website/dnsForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/website/dnsForm.jsp @@ -126,9 +126,9 @@
-

+ <%--

-

+ --%>
diff --git a/src/main/webapp/WEB-INF/views/cfg/website/httpForm.jsp b/src/main/webapp/WEB-INF/views/cfg/website/httpForm.jsp index 840e0528d..7432216c4 100644 --- a/src/main/webapp/WEB-INF/views/cfg/website/httpForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/website/httpForm.jsp @@ -169,9 +169,9 @@
-

+<%--

-

+ --%>
diff --git a/src/main/webapp/WEB-INF/views/cfg/website/sslForm.jsp b/src/main/webapp/WEB-INF/views/cfg/website/sslForm.jsp index 54ec45d69..5bf49b0d3 100644 --- a/src/main/webapp/WEB-INF/views/cfg/website/sslForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/website/sslForm.jsp @@ -132,9 +132,9 @@
-

+<%--

-

+ --%>
diff --git a/src/main/webapp/WEB-INF/views/cfg/whitelist/ipForm.jsp b/src/main/webapp/WEB-INF/views/cfg/whitelist/ipForm.jsp index 607927741..43d2a8c69 100644 --- a/src/main/webapp/WEB-INF/views/cfg/whitelist/ipForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/whitelist/ipForm.jsp @@ -145,9 +145,9 @@
-

+<%--

-

+ --%>
From 02257001b46002216ab53b77e15d664720812ca2 Mon Sep 17 00:00:00 2001 From: leijun Date: Sat, 29 Sep 2018 21:14:18 +0800 Subject: [PATCH 17/25] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=95=8C=E9=9D=A2?= =?UTF-8?q?=E5=8E=BB=E9=99=A4title?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/webapp/WEB-INF/views/basics/policyGroupForm.jsp | 4 ++-- src/main/webapp/WEB-INF/views/cfg/av/voip/voipForm.jsp | 4 ++-- src/main/webapp/WEB-INF/views/cfg/common/domainForm.jsp | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/webapp/WEB-INF/views/basics/policyGroupForm.jsp b/src/main/webapp/WEB-INF/views/basics/policyGroupForm.jsp index 947c17348..306e5376e 100644 --- a/src/main/webapp/WEB-INF/views/basics/policyGroupForm.jsp +++ b/src/main/webapp/WEB-INF/views/basics/policyGroupForm.jsp @@ -37,9 +37,9 @@ $(function(){
-

+<%--

-

+ --%>
diff --git a/src/main/webapp/WEB-INF/views/cfg/av/voip/voipForm.jsp b/src/main/webapp/WEB-INF/views/cfg/av/voip/voipForm.jsp index dc5cff0d9..a8e6863fc 100644 --- a/src/main/webapp/WEB-INF/views/cfg/av/voip/voipForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/av/voip/voipForm.jsp @@ -143,9 +143,9 @@
-

+<%--

-

+ --%>
diff --git a/src/main/webapp/WEB-INF/views/cfg/common/domainForm.jsp b/src/main/webapp/WEB-INF/views/cfg/common/domainForm.jsp index e7152f5f0..e796239b9 100644 --- a/src/main/webapp/WEB-INF/views/cfg/common/domainForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/common/domainForm.jsp @@ -56,9 +56,9 @@
-

+<%--

-

+ --%>
From a29c6367b37029f6f96520229f83623c9ce6d69b Mon Sep 17 00:00:00 2001 From: zhangwenqing Date: Sat, 29 Sep 2018 21:41:03 +0800 Subject: [PATCH 18/25] =?UTF-8?q?=E7=94=9F=E6=95=88=E5=8C=BA=E5=9F=9F?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E4=B8=8B=E5=8F=91=E6=A0=BC=E5=BC=8F=E4=BF=AE?= =?UTF-8?q?=E6=94=B9.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/basics/SysDictInfoService.java | 101 +++++++++++------- 1 file changed, 62 insertions(+), 39 deletions(-) diff --git a/src/main/java/com/nis/web/service/basics/SysDictInfoService.java b/src/main/java/com/nis/web/service/basics/SysDictInfoService.java index 46bd22378..74737892e 100644 --- a/src/main/java/com/nis/web/service/basics/SysDictInfoService.java +++ b/src/main/java/com/nis/web/service/basics/SysDictInfoService.java @@ -225,78 +225,101 @@ public class SysDictInfoService extends BaseService{ // 组织区域、运营商配置下发格式 public String setEffectiveRange(String areaEffectiveIds){ EffectiveRangeCfg rangeCfg = new EffectiveRangeCfg(); - List areaIspList = new ArrayList(); + List> effectiveRangeList = new ArrayList(); List locaValueList = new ArrayList(); List ispValueList = new ArrayList(); for (String areaEffectiveId : StringUtils.split(areaEffectiveIds, ",")) { - String area = ""; + List areaIspList = new ArrayList(); + + AreaIsp area = new AreaIsp(); + area.setTag(Constants.AREA_TAG); + AreaIsp isp = new AreaIsp(); + isp.setTag(Constants.ISP_TAG); + String areaStr = ""; // 区域和运营商 if(areaEffectiveId.contains(":")) { + int index = areaEffectiveId.indexOf(":"); String areaCode = areaEffectiveId.substring(0, index); String ispCode = areaEffectiveId.substring(index+1); // 查询该区域信息及其所有父节点信息 List list = sysDictInfoDao.getEffectiveArea(areaCode); for (SysDictInfo sysDictInfo : list) { - area += sysDictInfo.getItemValue(); + areaStr += sysDictInfo.getItemValue(); while(sysDictInfo.getParent().getSysDictId() != 0) { sysDictInfo = sysDictInfoDao.getDictById(sysDictInfo.getParent().getSysDictId()); - area += "/"+sysDictInfo.getItemValue(); + areaStr += "/"+sysDictInfo.getItemValue(); } } - String areaItemValue = StringUtils.revertStr(area, "/"); + String areaItemValue = StringUtils.revertStr(areaStr, "/"); if(!locaValueList.contains(areaItemValue)) { + + locaValueList = new ArrayList(); + ispValueList = new ArrayList(); + locaValueList.add(areaItemValue); + + }else { + // 区域相同就只加运营商信息 + SysDictInfo ispStr = sysDictInfoDao.getDictByItemCode(ispCode); + if(!ispValueList.contains(ispStr.getItemValue())) { + ispValueList.add(ispStr.getItemValue()); + if(ispValueList.size() < 2) { + + isp.setValue(ispValueList); + areaIspList.add(isp); + effectiveRangeList.add(areaIspList); + } + } + continue; } // 查询运营商信息 - SysDictInfo isp = sysDictInfoDao.getDictByItemCode(ispCode); - if(!ispValueList.contains(isp.getItemValue())) { - ispValueList.add(isp.getItemValue()); + SysDictInfo ispStr = sysDictInfoDao.getDictByItemCode(ispCode); + if(!ispValueList.contains(ispStr.getItemValue())) { + ispValueList.add(ispStr.getItemValue()); } + + area.setValue(locaValueList); + isp.setValue(ispValueList); + + areaIspList.add(area); + areaIspList.add(isp); + effectiveRangeList.add(areaIspList); }else { - // 区域或运营商 + // 区域 SysDictInfo dict = sysDictInfoDao.getDictByItemCode(areaEffectiveId); - if(dict.getItemType() == 1) { - // 查询所有父节点区域信息 - area += dict.getItemValue(); - while(dict.getParent().getSysDictId() != 0) { - dict = sysDictInfoDao.getDictById(dict.getParent().getSysDictId()); - area += "/"+dict.getItemValue(); - } - String areaItemValue = StringUtils.revertStr(area, "/"); - if(!locaValueList.contains(areaItemValue)) { - locaValueList.add(areaItemValue); - } - }else { - if(!ispValueList.contains(dict.getItemValue())) { - ispValueList.add(dict.getItemValue()); - } + + // 查询所有父节点区域信息 + areaStr += dict.getItemValue(); + while(dict.getParent().getSysDictId() != 0) { + dict = sysDictInfoDao.getDictById(dict.getParent().getSysDictId()); + areaStr += "/"+dict.getItemValue(); + } + String areaItemValue = StringUtils.revertStr(areaStr, "/"); + if(!locaValueList.contains(areaItemValue)) { + locaValueList = new ArrayList(); + locaValueList.add(areaItemValue); + area.setValue(locaValueList); + areaIspList.add(area); + effectiveRangeList.add(areaIspList); } } } - if(locaValueList.size() > 0) { - AreaIsp area = new AreaIsp(); - area.setTag(Constants.AREA_TAG); - area.setValue(locaValueList); - areaIspList.add(area); - } - if(ispValueList.size() > 0) { - AreaIsp isp = new AreaIsp(); - isp.setTag(Constants.ISP_TAG); - isp.setValue(ispValueList); - areaIspList.add(isp); - } - - List> effectiveRangeList = new ArrayList(); - effectiveRangeList.add(areaIspList); rangeCfg.setEffectiveRangeList(effectiveRangeList); return gsonToJson(rangeCfg); } + public static void main(String[] args) { + SysDictInfoService service = new SysDictInfoService(); + String json = service.setEffectiveRange("7182:4,7182:5"); + + System.err.println(json); + } + } From 61b56958c63ee1d7ac32b3037981f61a65077ea6 Mon Sep 17 00:00:00 2001 From: wangxin Date: Sat, 29 Sep 2018 21:46:17 +0800 Subject: [PATCH 19/25] =?UTF-8?q?(1)ip=E5=9C=B0=E5=9D=80=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E6=95=B4=E4=B8=AAasn=E5=8A=9F=E8=83=BD=20(2)ip=E5=9F=9F?= =?UTF-8?q?=E5=A4=84=E7=90=86=E6=8F=90=E5=88=B0=E5=8D=95=E7=8B=AC=E7=9A=84?= =?UTF-8?q?js=20ipRegion.js=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../configuration/ntc/IpController.java | 25 +- .../web/dao/configuration/AsnPolicyCfgDao.xml | 12 + .../service/configuration/IpCfgService.java | 169 ++++- .../sql/20180928/extend_ip_region.sql | 17 +- src/main/webapp/WEB-INF/include/header.jsp | 4 +- .../WEB-INF/views/cfg/ipaddr/ipForm.jsp | 664 ++++++++++++------ .../WEB-INF/views/cfg/ipaddr/ipList.jsp | 4 +- .../WEB-INF/views/cfg/ipaddr/ipSubList.jsp | 14 + .../webapp/static/global/scripts/common.js | 190 ----- .../webapp/static/global/scripts/ipRegion.js | 371 ++++++++++ 10 files changed, 1044 insertions(+), 426 deletions(-) create mode 100644 src/main/webapp/static/global/scripts/ipRegion.js diff --git a/src/main/java/com/nis/web/controller/configuration/ntc/IpController.java b/src/main/java/com/nis/web/controller/configuration/ntc/IpController.java index 3af0f780f..af6f04cae 100644 --- a/src/main/java/com/nis/web/controller/configuration/ntc/IpController.java +++ b/src/main/java/com/nis/web/controller/configuration/ntc/IpController.java @@ -20,12 +20,14 @@ import org.springframework.web.servlet.mvc.support.RedirectAttributes; import com.nis.domain.Page; import com.nis.domain.SysDataDictionaryItem; +import com.nis.domain.basics.PolicyGroupInfo; import com.nis.domain.configuration.CfgIndexInfo; import com.nis.domain.configuration.IpPortCfg; import com.nis.domain.configuration.NtcSubscribeIdCfg; import com.nis.domain.configuration.template.IpAddrTemplate; import com.nis.domain.configuration.template.IpsecTemplate; import com.nis.domain.configuration.template.TunnelIpTemplate; +import com.nis.domain.specific.ConfigGroupInfo; import com.nis.exceptions.MaatConvertException; import com.nis.util.DictUtils; import com.nis.web.controller.configuration.CommonController; @@ -57,6 +59,8 @@ public class IpController extends CommonController{ }else{ initFormCondition(model,entity); } + List policyGroups=asnPolicyCfgService.getConfigGroupInfoList(4); + model.addAttribute("policyGroups", policyGroups); model.addAttribute("_cfg", entity); return "/cfg/ipaddr/ipForm"; } @@ -89,6 +93,9 @@ public class IpController extends CommonController{ } } } + if(StringUtils.isNotBlank(cfg.getUserRegion4())) { + tabList.add(new String[]{"3","ASN"}); + } model.addAttribute("_cfg", cfg); model.addAttribute("index", index); model.addAttribute("tabList", tabList); @@ -114,11 +121,21 @@ public class IpController extends CommonController{ entity.setAuditTime(new Date()); entity.setFunctionId(functionId); try { - ipCfgService.auditIpCfg(entity,isAudit); - } catch (MaatConvertException e) { + if(StringUtils.isNoneBlank(entity.getUserRegion4())) { + ipCfgService.auditAsnCfg(entity, isAudit); + }else { + ipCfgService.auditIpCfg(entity,isAudit); + } + + } catch (Exception e) { e.printStackTrace(); - logger.info("ssl配置下发失败:"+e.getMessage()); - addMessage(redirectAttributes, e.getMessage()); + logger.info("ip配置下发失败:"+e.getMessage()); + if(e instanceof MaatConvertException) { + addMessage(redirectAttributes, e.getMessage()); + }else { + addMessage(redirectAttributes, "audit_failed"); + } + } } return "redirect:" + adminPath +"/ntc/iplist/list?functionId="+functionId; diff --git a/src/main/java/com/nis/web/dao/configuration/AsnPolicyCfgDao.xml b/src/main/java/com/nis/web/dao/configuration/AsnPolicyCfgDao.xml index 9c0b7cb1e..acd98dc6b 100644 --- a/src/main/java/com/nis/web/dao/configuration/AsnPolicyCfgDao.xml +++ b/src/main/java/com/nis/web/dao/configuration/AsnPolicyCfgDao.xml @@ -109,6 +109,18 @@ AND r.user_region1=#{userRegion1,jdbcType=VARCHAR} + + AND r.user_region2=#{userRegion2,jdbcType=VARCHAR} + + + AND r.user_region3=#{userRegion3,jdbcType=VARCHAR} + + + AND r.user_region4=#{userRegion4,jdbcType=VARCHAR} + + + AND r.user_region5=#{userRegion5,jdbcType=VARCHAR} + AND r.function_id=#{functionId,jdbcType=INTEGER} diff --git a/src/main/java/com/nis/web/service/configuration/IpCfgService.java b/src/main/java/com/nis/web/service/configuration/IpCfgService.java index ce6b5a896..74dc68a9d 100644 --- a/src/main/java/com/nis/web/service/configuration/IpCfgService.java +++ b/src/main/java/com/nis/web/service/configuration/IpCfgService.java @@ -15,6 +15,7 @@ import org.springframework.transaction.annotation.Transactional; import com.nis.domain.FunctionRegionDict; import com.nis.domain.Page; +import com.nis.domain.basics.AsnIpCfg; import com.nis.domain.callback.InlineIp; import com.nis.domain.configuration.AreaIpCfg; import com.nis.domain.configuration.BaseIpCfg; @@ -29,15 +30,18 @@ import com.nis.domain.maat.MaatCfg.NumBoundaryCfg; import com.nis.domain.maat.MaatCfg.StringCfg; import com.nis.domain.maat.ToMaatBean; import com.nis.domain.maat.ToMaatResult; +import com.nis.domain.specific.ConfigGroupInfo; import com.nis.exceptions.MaatConvertException; import com.nis.util.ConfigServiceUtil; import com.nis.util.Configurations; import com.nis.util.Constants; import com.nis.util.DictUtils; import com.nis.util.StringUtil; +import com.nis.web.dao.basics.AsnIpCfgDao; import com.nis.web.dao.configuration.AreaIpCfgDao; import com.nis.web.dao.configuration.IpCfgDao; import com.nis.web.dao.configuration.StringCfgDao; +import com.nis.web.dao.specific.SpecificServiceCfgDao; import com.nis.web.security.UserUtils; import com.nis.web.service.CrudService; @@ -54,6 +58,10 @@ public class IpCfgService extends CrudService { protected StringCfgDao stringCfgDao; @Autowired protected AreaIpCfgDao areaIpCfgDao; + @Autowired + protected SpecificServiceCfgDao specificServiceCfgDao; + @Autowired + protected AsnIpCfgDao asnIpCfgDao; /** * * addIpCfg(新增IP类配置) @@ -344,18 +352,29 @@ public class IpCfgService extends CrudService { }else if(Constants.SERVICE_IP_RATELIMIT==cfg.getServiceId().intValue()){ maatCfg.setUserRegion(Constants.USERREGION_RATE_LIMIT+"="+cfg.getRatelimit()); } - if(!StringUtil.isEmpty(cfg.getUserRegion1())){ - String userRegion = ""; - if(cfg.getUserRegion1().startsWith(Constants.REDIRECT_RESPONSE_CODE_STARTWITH)){ - userRegion = Constants.REDIRECT_RESPONSE_CODE_KEY+"="+cfg.getUserRegion1()+ - Constants.USER_REGION_SPLIT+ - Constants.REDIRECT_URL_KEY+"="+cfg.getUserRegion2(); - }else{ - userRegion = Constants.REDIRECT_RESPONSE_CODE_KEY+"="+cfg.getUserRegion1()+ - Constants.USER_REGION_SPLIT+ - Constants.REDIRECT_CONTENT_KEY+"="+cfg.getUserRegion2(); + //限速需要发Droprate=0.001 ,暂不支持Bandwidth=200kbps + if(cfg.getAction().equals(Constants.RATELIMIT_ACTION)){ + if(cfg.getUserRegion1().equals("0")){//丢包率 + cfg.setUserRegion2(StringUtil.isEmpty(cfg.getUserRegion2()) ? "":cfg.getUserRegion2()); + maatCfg.setUserRegion(Constants.INTERCEPT_IP_RATELIMIT_DROPRATE_USER_REGION_KEY+"="+cfg.getUserRegion2()); + }else if(cfg.getUserRegion1().equals("1")){//带宽 + cfg.setUserRegion3(StringUtil.isEmpty(cfg.getUserRegion3()) ? "":cfg.getUserRegion3()); + maatCfg.setUserRegion(Constants.INTERCEPT_IP_RATELIMIT_BANDWITH_USER_REGION_KEY+"="+cfg.getUserRegion3()); + } + }else { + if(!StringUtil.isEmpty(cfg.getUserRegion1())){ + String userRegion = ""; + if(cfg.getUserRegion1().startsWith(Constants.REDIRECT_RESPONSE_CODE_STARTWITH)){ + userRegion = Constants.REDIRECT_RESPONSE_CODE_KEY+"="+cfg.getUserRegion1()+ + Constants.USER_REGION_SPLIT+ + Constants.REDIRECT_URL_KEY+"="+cfg.getUserRegion2(); + }else{ + userRegion = Constants.REDIRECT_RESPONSE_CODE_KEY+"="+cfg.getUserRegion1()+ + Constants.USER_REGION_SPLIT+ + Constants.REDIRECT_CONTENT_KEY+"="+cfg.getUserRegion2(); + } + maatCfg.setUserRegion(userRegion); } - maatCfg.setUserRegion(userRegion); } configCompileList.add(maatCfg); maatBean.setOpAction(Constants.INSERT_ACTION); @@ -656,6 +675,130 @@ public class IpCfgService extends CrudService { } } } + /** + * + * @param isAudit + * @param isValid + * @param ids cfgId + * @param functionId + */ + @Transactional(readOnly=false,rollbackFor=RuntimeException.class) + public void auditAsnCfg(CfgIndexInfo entity,Integer isAudit){ + entity.setTableName(CfgIndexInfo.getTablename()); + entity.setIsAudit(isAudit); + ipCfgDao.auditCfg(entity); + ToMaatBean maatBean = new ToMaatBean(); + MaatCfg maatCfg = new MaatCfg(); + List configCompileList = new ArrayList<>(); + List groupRelationList = new ArrayList<>(); + List ipRegionList = new ArrayList<>(); + List strRegionList = new ArrayList<>(); + List numRegionList = new ArrayList<>(); + List digestRegionList = new ArrayList<>(); + List areaIpRegionList = new ArrayList<>(); + if(isAudit==Constants.AUDIT_YES) { + ConfigGroupInfo group=specificServiceCfgDao.getConfigGroupInfoByGroupId(Integer.parseInt(entity.getUserRegion4())); + if(group.getIsIssued()==1) {//复用,值下编译跟分组 + maatCfg.initDefaultValue(); + BeanUtils.copyProperties(entity, maatCfg); + maatCfg.setAction(entity.getAction()); + maatCfg.setAuditTime(entity.getAuditTime()); + maatCfg.setIpRegionList(ipRegionList); + maatCfg.setStrRegionList(strRegionList); + maatCfg.setNumRegionList(numRegionList); + maatCfg.setDigestRegionList(digestRegionList); + maatCfg.setGroupRelationList(groupRelationList); + maatCfg.setAreaIpRegionList(areaIpRegionList); + maatCfg.setIsValid(entity.getIsValid()); + //group + GroupCfg groupCfg=new GroupCfg(); + groupCfg.setCompileId(entity.getCompileId()); + groupCfg.setGroupId(Integer.parseInt(entity.getUserRegion4())); + groupCfg.setIsValid(Constants.VALID_YES); + groupCfg.setAuditTime(entity.getAuditTime()); + groupRelationList.add(groupCfg); + maatCfg.setGroupNum(groupRelationList.size()); + configCompileList.add(maatCfg); + maatBean.setConfigCompileList(configCompileList); + maatBean.setAuditTime(entity.getAuditTime()); + maatBean.setCreatorName(entity.getCurrentUser().getName()); + maatBean.setVersion(Constants.MAAT_VERSION); + maatBean.setOpAction(Constants.INSERT_ACTION); + //调用服务接口下发配置数据 + String json=gsonToJson(maatBean); + logger.info("ipaddr asn组复用配置下发配置参数:"+json); + //调用服务接口下发配置 + ToMaatResult result = ConfigServiceUtil.postMaatCfg(json); + logger.info("ipaddr asn组复用配置下发响应信息:"+result.getMsg()); + }else {//首次下发 + maatCfg.initDefaultValue(); + BeanUtils.copyProperties(entity, maatCfg); + maatCfg.setAction(entity.getAction()); + maatCfg.setAuditTime(entity.getAuditTime()); + maatCfg.setStrRegionList(strRegionList); + maatCfg.setNumRegionList(numRegionList); + maatCfg.setDigestRegionList(digestRegionList); + maatCfg.setGroupRelationList(groupRelationList); + maatCfg.setAreaIpRegionList(areaIpRegionList); + maatCfg.setIsValid(entity.getIsValid()); + //group + GroupCfg groupCfg=new GroupCfg(); + groupCfg.setCompileId(entity.getCompileId()); + groupCfg.setGroupId(Integer.parseInt(entity.getUserRegion4())); + groupCfg.setIsValid(Constants.VALID_YES); + groupCfg.setAuditTime(entity.getAuditTime()); + groupRelationList.add(groupCfg); + maatCfg.setGroupNum(groupRelationList.size()); + //region + //查询asn group id下所有的 ip + AsnIpCfg asnIpCfg=new AsnIpCfg(); + asnIpCfg.setAsnIpGroup(Integer.parseInt(entity.getUserRegion4())); + List allAsnIpCfgs=asnIpCfgDao.findAllList(asnIpCfg); + ipRegionList.addAll(groupReuseCfgAddRemoveConvert(allAsnIpCfgs,Constants.VALID_YES,null)); + maatCfg.setIpRegionList(ipRegionList); + configCompileList.add(maatCfg); + maatBean.setConfigCompileList(configCompileList); + maatBean.setAuditTime(entity.getAuditTime()); + maatBean.setCreatorName(entity.getCurrentUser().getName()); + maatBean.setVersion(Constants.MAAT_VERSION); + maatBean.setOpAction(Constants.INSERT_ACTION); + + //调用服务接口下发配置数据 + String json=gsonToJson(maatBean); + logger.info("ipaddr asn配置下发配置参数:"+json); + //调用服务接口下发配置 + ToMaatResult result = ConfigServiceUtil.postMaatCfg(json); + logger.info("ipaddr asn配置下发响应信息:"+result.getMsg()); + ConfigGroupInfo info=new ConfigGroupInfo(); + info.setIsIssued(1); + info.setGroupId(Integer.parseInt(entity.getUserRegion4())); + specificServiceCfgDao.updateConfigGroupInfobyGroupId(info); + AsnIpCfg cfg=new AsnIpCfg(); + cfg.setIsValid(Constants.VALID_YES); + cfg.setAsnIpGroup(Integer.parseInt(entity.getUserRegion4())); + asnIpCfgDao.updateIssued(cfg); + } + }else if(isAudit==Constants.AUDIT_NOT_YES) {//取消审核通过 + maatCfg.setCompileId(entity.getCompileId()); + maatCfg.setServiceId(entity.getServiceId()); + maatCfg.setIsValid(0);//无效 + configCompileList.add(maatCfg); + maatBean.setConfigCompileList(configCompileList); + maatBean.setAuditTime(entity.getAuditTime()); + maatBean.setCreatorName(entity.getCurrentUser().getName()); + maatBean.setVersion(Constants.MAAT_VERSION); + maatBean.setOpAction(Constants.UPDATE_ACTION); + //调用服务接口取消配置 + String json=gsonToJson(maatBean); + logger.info("ipaddr asn取消下发配置参数:"+json); + //调用服务接口下发配置 + ToMaatResult result = ConfigServiceUtil.put(json,1); + logger.info("ipaddr asn取消配置响应信息:"+result.getMsg()); + }else { + throw new RuntimeException("unknown isAudit value "+isAudit); + } + + } @Transactional(readOnly=false,rollbackFor=RuntimeException.class) public void deleteIp(String ids,String compileIds,int functionId){ if(StringUtils.isNotBlank(compileIds)){ @@ -723,6 +866,10 @@ public class IpCfgService extends CrudService { List subscribeIdList = stringCfgDao.findSubscribeIdCfgListByCfgIndexInfo(entity); entity.setIpPortList(ipPortList); entity.setNtcSubscribeIdCfgList(subscribeIdList); + if(StringUtils.isNotBlank(entity.getUserRegion4())) { + ConfigGroupInfo info=specificServiceCfgDao.getConfigGroupInfoByGroupId(Integer.parseInt(entity.getUserRegion4().trim())); + entity.setAsnIpGroupName(info.getGroupName()); + } return entity; } public BaseIpCfg getIpCfgById(String tableName,long id){ diff --git a/src/main/resources/sql/20180928/extend_ip_region.sql b/src/main/resources/sql/20180928/extend_ip_region.sql index 7e79981ff..06a5de457 100644 --- a/src/main/resources/sql/20180928/extend_ip_region.sql +++ b/src/main/resources/sql/20180928/extend_ip_region.sql @@ -1,6 +1,6 @@ UPDATE function_service_dict SET region_code=1 WHERE function_id=5 AND region_code='1,3'; UPDATE function_service_dict SET region_code=2 WHERE function_id=5 AND region_code='2,3'; -UPDATE function_service_dict SET is_valid=0 WHERE function_id=5 AND ACTION=1; +UPDATE function_service_dict SET is_valid=1 WHERE function_id=5 AND ACTION=1; UPDATE function_service_dict SET is_valid=0 WHERE function_id=5 AND ACTION=96; INSERT INTO function_service_dict (function_id,protocol_id,ACTION,action_code,service_id,service_name,service_desc,is_valid,region_code) VALUES(5,0,64,'ratelimit',1057,'ip_ratelimit','ip地址限速',1,1); @@ -12,5 +12,18 @@ INSERT INTO sys_data_dictionary_item (item_code,item_value,item_desc,item_sort,S UPDATE function_region_dict SET is_valid=0 WHERE function_id=5 AND config_region_value ='NTC_SUBSCRIBE_ID'; UPDATE function_region_dict SET config_protocol='0,6,17,1,8,15' WHERE function_id=5 AND config_region_value ='INLINE_IP_CB'; +UPDATE function_region_dict SET config_protocol='0,6,17,1,8,15' WHERE function_id=5 AND config_region_value ='INLINE_IP_CB'; +update function_region_dict set config_ip_type='4,6' where region_type=1 and config_ip_type like '%,46,64,10%'; +UPDATE function_service_dict SET region_code=4 WHERE function_id=5 AND action_code='ratelimit'; +INSERT INTO function_region_dict (function_id,config_region_code,config_region_value,config_desc,is_valid,is_maat,region_type,config_ip_type,config_ip_pattern,config_port_pattern,config_direction,config_protocol,config_ip_port_show,config_region_sort)VALUES(5,4,'LIMIT_IP','IP限流',1,1,1,'4,6','1,2,3','1,2','0,1','0,6,17','1,2',4); -update function_region_dict set config_ip_type='4,6' where region_type=1 and config_ip_type like '%,46,64,10%'; \ No newline at end of file + + +#asn region +INSERT INTO function_region_dict (config_service_type,function_id,config_region_code,config_region_value,config_desc,is_valid,is_maat,region_type,config_region_sort) +VALUES ('asn',5,5,'NTC_ASN_IP','asn',1,1,1,5); +# asn service +INSERT INTO function_service_dict (function_id,protocol_id,ACTION,action_code,service_id,service_name,service_desc,is_valid,region_code) +VALUES (5,0,16,'reject',37,'ans_reject','ANS_REJECT',1,5); +INSERT INTO function_service_dict (function_id,protocol_id,ACTION,action_code,service_id,service_name,service_desc,is_valid,region_code) +VALUES (5,0,1,'monit',149,'ans_monit','ANS_MONIT',1,5); \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/include/header.jsp b/src/main/webapp/WEB-INF/include/header.jsp index 0032e71d5..a07ee36ec 100644 --- a/src/main/webapp/WEB-INF/include/header.jsp +++ b/src/main/webapp/WEB-INF/include/header.jsp @@ -95,7 +95,7 @@ - + @@ -103,4 +103,4 @@ - \ No newline at end of file + diff --git a/src/main/webapp/WEB-INF/views/cfg/ipaddr/ipForm.jsp b/src/main/webapp/WEB-INF/views/cfg/ipaddr/ipForm.jsp index 770c72b9e..9561367e0 100644 --- a/src/main/webapp/WEB-INF/views/cfg/ipaddr/ipForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/ipaddr/ipForm.jsp @@ -17,26 +17,64 @@ $("#cancel").on("click", function() { window.history.back(); });*/ - $(".glyphicon-plus").first().click(); - $(".ipPortList").find(".glyphicon-remove").addClass("hidden") - var action=$(".action:checked").val(); - /*if(action==32){ - $(".subscribeId").find(".glyphicon-remove").click(); - $(".subscribeId").prev("h4").addClass("hidden"); - }*/ - var regionCodes=$(".action:checked").attr("regionCode").split(","); - $("h4[class*='ipPortListTitle']").each(function(){ - var has=false; - for(var ind in regionCodes){ - if($(this).hasClass("ipPortListTitle"+regionCodes[ind])){ - has=true; - } - } - if(!has){ - $(this).html(""); + var asnRegionCode,configType; + $("input[id^='cfgRegionCode']").each(function(){ + var regionCode=$(this).val(); + if("asn"==$(this).attr("servicetype")){ + asnRegionCode=$(this).val(); } }); - processAction($(".ipPortList")); + $(".configType a").on("click",function(){ + if($(this).attr("id")=="ipCfgTab"){ + configType="ip"; + $(".glyphicon-plus").first().click(); + $(".ipPortList").find(".glyphicon-remove").addClass("hidden") + hideAction(1,asnRegionCode); + }else{ + configType="asn"; + hideAction(0,asnRegionCode); + } + var region = ($(this).attr("for")); + if(region=="ipaddr"){ + $(".asn").addClass("hidden").addClass("disabled"); + $(".ipaddr").removeClass("hidden").removeClass("disabled"); + }else{ + $(".ipaddr").addClass("hidden").addClass("disabled"); + $(".asn").removeClass("hidden").removeClass("disabled"); + } + }); + //切换tab + if("${_cfg.cfgId}"==''){ + configType='ip'; + $("#ipCfgTab").click(); + }else if("${_cfg.userRegion4}"==""){ + configType='ip'; + $("#ipCfgTab").click(); + }else{ + configType='asn'; + $("#ansCfgTab").click(); + } + if(configType!='asn'){ + $(".glyphicon-plus").first().click(); + $(".ipPortList").find(".glyphicon-remove").addClass("hidden") + /*if(action==32){ + $(".subscribeId").find(".glyphicon-remove").click(); + $(".subscribeId").prev("h4").addClass("hidden"); + }*/ + var regionCodes=$(".action:checked").attr("regionCode").split(","); + $("h4[class*='ipPortListTitle']").each(function(){ + var has=false; + for(var ind in regionCodes){ + if($(this).hasClass("ipPortListTitle"+regionCodes[ind])){ + has=true; + } + } + if(!has){ + $(this).addClass("hidden"); + } + }); + processAction(configType,$(".ipPortList")); + } $(".action").on("change", function() { $("#serviceId").val($(this).attr("serviceId")); $("#protocolId").val($(this).attr("protocolId")); @@ -57,8 +95,24 @@ $("h4[class*='ipPortListTitle']").each(function(){ $(this).find(".ipPortTitle").html(i18nCode); }); + $("input[id^='cfgRegionCode']").each(function(){ + if($(this).attr("id")!=("cfgRegionCode"+cfgRegionCode)){ + $(this).removeAttr("name"); + $("#cfgType"+$(this).val()).removeAttr("name"); + }else{ + $(this).attr("name",'cfgRegionCode'); + $("#cfgType"+$(this).val()).attr("name",'cfgType'); + } + }); var tabInfo=$(".ipPortList"); - processAction(tabInfo); + if(tabInfo){ + tabInfo.find("[name$='cfgType']").val(cfgType); + tabInfo.find("[name$='cfgRegionCode']").val(cfgRegionCode); + } + if(configType!='asn'){ + changeIPVal(tabInfo); + } + processAction(configType,tabInfo); /* if(tabInfo){ tabInfo.find("[name$='cfgType']").val(cfgType); tabInfo.find("[name$='cfgRegionCode']").val(cfgRegionCode); @@ -86,6 +140,9 @@ }); $("#serviceId").val($(".action:checked").attr("serviceId")); $("#protocolId").val($(".action:checked").attr("protocolId")); + $(".ratelimitAction").find("input[name='userRegion1']").on("change",function(){ + switchRateLimitType(); + }) $("#cfgFrom").validate( { errorPlacement : function(error, element) { @@ -145,11 +202,15 @@ flag=flag1; } if(flag){ + if(configType!='asn'){ + $("input[name='userRegion4']").attr("disabled",true); + } + $("input[name$='userRegion1']").attr("disabled",false); + $("input[name$='exprType']").attr("disabled",false); //将disable属性的元素删除 $(".disabled").each(function(){ $(this).remove(); }); - $("input[name$='exprType']").attr("disabled",false); loading('onloading...'); form.submit(); }else{ @@ -185,41 +246,126 @@ }); */ $("." + addBtnClassName).removeClass("hidden"); } -var processAction=function(obj){ - var o=$(obj) - if(o){ - var action=$(".action:checked").val(); - /*处理协议*/ - var selectedProtocol=o.find("select[name$='protocol'] option:selected").attr("value"); - //先清空,再添加 - o.find("select[name$='protocol']").empty(); - if(action==32){ - $.ipcommon.protocol.each(function(){ - if($(this).attr("value")==0||$(this).attr("value")==6||$(this).attr("value")==17||$(this).attr("value")==1||$(this).attr("value")==8||$(this).attr("value")==15){ - o.find("select[name$='protocol']").append($(this)); - } - }) - }else if(action==16){ - $.ipcommon.protocol.each(function(){ - if($(this).attr("value")==0||$(this).attr("value")==6){ - o.find("select[name$='protocol']").append($(this)); - } - }) - }else if(action==64){ - $.ipcommon.protocol.each(function(){ - if($(this).attr("value")==0||$(this).attr("value")==6||$(this).attr("value")==17){ - o.find("select[name$='protocol']").append($(this)); - } - }) + +var hideAction=function(isHide,regionCode){ + var action=$(".action:checked").val(); + var serviceId=$(".action:checked").attr("serviceId"); + $(".action").each(function(){ + var regionCodeArr=$(this).attr("regionCode").split(','); + var has=false; + for(var code in regionCodeArr){ + if(regionCode==regionCodeArr[code]){ + has=true; + break; + } } - o.find("select[name$='protocol']").selectpicker("refresh"); - //切换后如果没找到选项,选任意协议 - if(o.find("select[name$='protocol'] option[value='"+selectedProtocol+"']").length>0){ - o.find("select[name$='protocol']").selectpicker("val",selectedProtocol); + if(has){ + if(isHide==1){ + $(this).attr("disabled","disabled"); + $(this).parent(".radio-inline").addClass("hidden"); + }else{ + $(this).removeAttr("disabled"); + $(this).parent(".radio-inline").removeClass("hidden"); + } }else{ - o.find("select[name$='protocol']").selectpicker("val",0); + if(isHide==1){ + $(this).removeAttr("disabled"); + $(this).parent(".radio-inline").removeClass("hidden"); + }else{ + $(this).attr("disabled","disabled"); + $(this).parent(".radio-inline").addClass("hidden"); + } + } + }); + if($("[class*='action'][value='"+action+"']:visible").length>0){ + $("[class*='action'][value='"+action+"']:visible").click(); + }else{ + $(".action:visible").get(0).click(); + } + var reginosNew=$(".action:checked").attr("regioncode").split(","); + $("input[id^='cfgRegionCode']").each(function(){ + var has=false; + for(var code in reginosNew){ + if($(this).val()==reginosNew[code]){ + has=true; + break; + } + } + if(has){ + $(this).attr("name","cfgRegionCode"); + $("#cfgType"+$(this).val()).attr("name","cfgType"); + }else{ + $(this).removeAttr("name"); + $("#cfgType"+$(this).val()).removeAttr("name"); + } + }); +} +var processAction=function(configType,obj){ + var action=$(".action:checked").val(); + if(configType!='asn'){ + var o=$(obj) + if(o){ + /*处理协议*/ + var selectedProtocol=o.find("select[name$='protocol'] option:selected").attr("value"); + if(action==32){ + //先清空,再添加 + /* o.find("select[name$='protocol']").empty(); + $.ipcommon.protocol.each(function(){ + if($(this).attr("value")==0||$(this).attr("value")==6||$(this).attr("value")==17||$(this).attr("value")==1||$(this).attr("value")==8||$(this).attr("value")==15){ + o.find("select[name$='protocol']").append($(this)); + } + }) */ + $(".ratelimitAction").addClass("hidden"); + $(".ratelimitAction").find("input[name^='userRegion'],select[name^='userRegion']").attr("disabled",true); + }else if(action==16){ + //先清空,再添加 + o.find("select[name$='protocol']").empty(); + $.ipcommon.protocol.each(function(){ + if($(this).attr("value")==0||$(this).attr("value")==6){ + o.find("select[name$='protocol']").append($(this)); + } + }) + $(".ratelimitAction").addClass("hidden"); + $(".ratelimitAction").find("input[name^='userRegion'],select[name^='userRegion']").attr("disabled",true); + }else if(action==64){ + //先清空,再添加 + /* o.find("select[name$='protocol']").empty(); + $.ipcommon.protocol.each(function(){ + if($(this).attr("value")==0||$(this).attr("value")==6||$(this).attr("value")==17){ + o.find("select[name$='protocol']").append($(this)); + } + }) */ + $(".ratelimitAction").removeClass("hidden"); + var rateLimitType=$("input[name='userRegion1']:checked").val(); + if(rateLimitType == 0){//丢包率 + $(".bandwith").find("input[name='userRegion3']").attr("disabled",true); + $(".droprate").find("input[name='userRegion2']").removeAttr("disabled"); + } + if(rateLimitType == 1){//带宽 + $(".bandwith").find("input[name='userRegion3']").removeAttr("disabled"); + $(".droprate").find("input[name='userRegion2']").attr("disabled",true); + } + }else if(action==1){ + //先清空,再添加 + o.find("select[name$='protocol']").empty(); + $.ipcommon.protocol.each(function(){ + if($(this).attr("value")==0||$(this).attr("value")==6||$(this).attr("value")==17){ + o.find("select[name$='protocol']").append($(this)); + } + }) + $(".ratelimitAction").addClass("hidden"); + $(".ratelimitAction").find("input[name^='userRegion'],select[name^='userRegion']").attr("disabled",true); + } + o.find("select[name$='protocol']").selectpicker("refresh"); + //切换后如果没找到选项,选任意协议 + if(o.find("select[name$='protocol'] option[value='"+selectedProtocol+"']").length>0){ + o.find("select[name$='protocol']").selectpicker("val",selectedProtocol); + }else{ + o.find("select[name$='protocol']").selectpicker("val",0); + } } } + } @@ -227,7 +373,7 @@ var processAction=function(obj){
-<%--

+ <%--

--%>
@@ -270,178 +416,264 @@ var processAction=function(obj){ value="${region.configRegionCode}">
-
-
-
- -
- -
-
-
-
-
- -
- - - -
-
-
-
-
- -
-
-
- - - - - - - - - - - - -
-
-
- - - - - - - - - -

- - -

- - <%-- --%> - - - - -
- <%@include file="/WEB-INF/views/cfg/ipCfgForm.jsp"%> -
- -
-
-
- - - - -
-
- -
- - -

- - -

- - - - <%-- --%> - - - - - - -
- <%@include file="/WEB-INF/views/cfg/complexCfgForm.jsp"%> +
+
+
+
+ + +
+
+
+
+ +
+ +
+
- - - - - - - - - +
+
+ +
+ + + +
+
+
+
+
+ +
+
+
+ + + + + + + + + + + + +
+
+
+ + + + + + + + +
+ + +

+ + +

+ + <%-- --%> + + + + +
+ <%@include file="/WEB-INF/views/cfg/ipCfgForm.jsp"%> +
+ +
+
+
+ + + + +
+
-
- - - - - - - - - - - - -
-
- <%@include file="/WEB-INF/include/form/areaInfo.jsp"%> -
- <%@include file="/WEB-INF/include/form/basicInfo.jsp"%> -
-
-
-
-
- - + + + +
+ +

+ + +

+ + + + <%-- --%> + + + + + + +
+ <%@include file="/WEB-INF/views/cfg/complexCfgForm.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/ipaddr/ipList.jsp b/src/main/webapp/WEB-INF/views/cfg/ipaddr/ipList.jsp index 9265f5447..c2c6b6c17 100644 --- a/src/main/webapp/WEB-INF/views/cfg/ipaddr/ipList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/ipaddr/ipList.jsp @@ -143,7 +143,7 @@ - + @@ -319,6 +319,7 @@ + @@ -352,6 +353,7 @@ + ${indexCfg.userRegion2 } diff --git a/src/main/webapp/WEB-INF/views/cfg/ipaddr/ipSubList.jsp b/src/main/webapp/WEB-INF/views/cfg/ipaddr/ipSubList.jsp index 453374b01..213350055 100644 --- a/src/main/webapp/WEB-INF/views/cfg/ipaddr/ipSubList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/ipaddr/ipSubList.jsp @@ -218,5 +218,19 @@ + +
+
+
+
+ + +
+
+
+
+
\ No newline at end of file diff --git a/src/main/webapp/static/global/scripts/common.js b/src/main/webapp/static/global/scripts/common.js index 245088acf..c6683a9d8 100644 --- a/src/main/webapp/static/global/scripts/common.js +++ b/src/main/webapp/static/global/scripts/common.js @@ -1,14 +1,4 @@ $(function(){ - $.ipcommon=function(){ - return {}; - } - $.extend($.ipcommon, { - ipType:[], - ipPattern:[], - portPattern:[], - protocol:[], - direction:[] - }); $("input[name$='isCaseSenstive']").on("change",function(){ setIsHexBin(this); }); @@ -425,7 +415,6 @@ $(function(){ window.history.back(); return false; }); - initCommIpVal(); //去掉首尾空格 $("input,textarea").on("blur",function(){ var val=$(this).val(); @@ -1675,185 +1664,6 @@ var setHexCaseSenstive=function(){ }); } -/** - * ip默认选项处理 - */ -var initCommIpVal=function(){ - var action,regionCode,serviceType,ipPortShow,ipType, - ipPattern,portPattern,direction,protocol,regionType; - if($("input[name$='action']:checked").length>0){ - regionCode=$("input[name$='action']:checked").attr("regionCode"); - action=$("input[name$='action']:checked").val(); - }else{ - regionCode=$("input[name$='action']").attr("regionCode"); - action=$("input[name$='action']").val(); - } - if(regionCode){ - if(regionCode.indexOf(",")==-1){ - $("#cfgRegionCode"+regionCode).attr("name","cfgRegionCode"); - $("#cfgType"+regionCode).attr("name","cfgType"); - }else{ - var _region=''; - var regionArr=regionCode.split(','); - $("input[name$='cfgRegionCode'][regionType='1']").each(function(){ - for(var re in regionArr){ - if($(this).val()==regionArr[re]){ - _region=regionArr[re]; - break; - } - } - }); - if(_region!=''){ - regionCode=_region; - } - } - } - if(regionCode){//IP域大于1个,根据action获取ip属性 - ipPortShow=$("input[name$='cfgRegionCode'][value='"+regionCode+"']").attr("ipPortShow"), - ipType=$("input[name$='cfgRegionCode'][value='"+regionCode+"']").attr("ipType"), - ipPattern=$("input[name$='cfgRegionCode'][value='"+regionCode+"']").attr("ipPattern"), - portPattern=$("input[name$='cfgRegionCode'][value='"+regionCode+"']").attr("portPattern"), - direction=$("input[name$='cfgRegionCode'][value='"+regionCode+"']").attr("direction"), - protocol=$("input[name$='cfgRegionCode'][value='"+regionCode+"']").attr("protocol"), - regionType=$("input[name$='cfgRegionCode'][value='"+regionCode+"']").attr("regionType"); - }else{//IP域只有一个,获取regionType为1的 - ipPortShow=$("input[name$='cfgRegionCode'][regionType='1']").attr("ipPortShow"), - ipType=$("input[name$='cfgRegionCode'][regionType='1']").attr("ipType"), - ipPattern=$("input[name$='cfgRegionCode'][regionType='1']").attr("ipPattern"), - portPattern=$("input[name$='cfgRegionCode'][regionType='1']").attr("portPattern"), - direction=$("input[name$='cfgRegionCode'][regionType='1']").attr("direction"), - protocol=$("input[name$='cfgRegionCode'][regionType='1']").attr("protocol"), - regionType=$("input[name$='cfgRegionCode'][regionType='1']").attr("regionType"); - } - //ip,端口处理 - if(ipPortShow){ - if(ipPortShow.indexOf('1')>-1){//展示源IP,端口 - $("input[name$='srcIpAddress']").parents(".form-group").removeClass("hidden"); - $("input[name$='srcPort']").parents(".form-group").removeClass("hidden"); - }else{ - $("input[name$='srcIpAddress']").parents(".form-group").addClass("hidden"); - $("input[name$='srcPort']").parents(".form-group").addClass("hidden"); - } - if(ipPortShow.indexOf('2')>-1){//展示目的IP,端口 - $("input[name$='destIpAddress']").parents(".form-group").removeClass("hidden"); - $("input[name$='destPort']").parents(".form-group").removeClass("hidden"); - }else{ - $("input[name$='destIpAddress']").parents(".form-group").addClass("hidden"); - $("input[name$='destPort']").parents(".form-group").addClass("hidden"); - } - } - //ip类型处理 - if(ipType){ - var arr=ipType.split(','); - $.ipcommon.ipType=$("select[name$='ipType'] option"); - $("select[name$='ipType'] option").each(function(){ - var has=false; - for(var type in arr){ - if($(this).val()==arr[type]){ - has=true; - if($(this).attr("disabled")){ - $(this).removeAttr("disabled") - } - break; - } - } - if(!has){ - $(this).remove(); - } - }); - }else{ - $.ipcommon.ipType=[]; - } - //ip格式处理 - if(ipPattern){ - arr=ipPattern.split(','); - $.ipcommon.ipPattern=$("select[name$='ipPattern'] option"); - $("select[name$='ipPattern'] option").each(function(){ - var has=false; - for(var type in arr){ - if($(this).val()==arr[type]){ - has=true; - if($(this).attr("disabled")){ - $(this).removeAttr("disabled") - } - break; - } - } - if(!has){ - $(this).remove(); - } - }); - }else{ - $.ipcommon.ipPattern=[]; - } - //端口格式处理 - if(portPattern){ - arr=portPattern.split(','); - $.ipcommon.portPattern=$("select[name$='portPattern'] option"); - $("select[name$='portPattern'] option").each(function(){ - var has=false; - for(var type in arr){ - if($(this).val()==arr[type]){ - has=true; - if($(this).attr("disabled")){ - $(this).removeAttr("disabled") - } - break; - } - } - if(!has){ - $(this).remove(); - } - }); - }else{ - $.ipcommon.portPattern=[]; - } - //方向处理 - if(direction){ - arr=direction.split(','); - $.ipcommon.direction=$("select[name$='direction'] option"); - $("select[name$='direction'] option").each(function(){ - var has=false; - for(var type in arr){ - if($(this).val()==arr[type]){ - has=true; - if($(this).attr("disabled")){ - $(this).removeAttr("disabled") - } - break; - } - } - if(!has){ - $(this).remove(); - } - }); - }else{ - $.ipcommon.direction=[]; - } - //协议处理 - if(protocol){ - arr=protocol.split(','); - $.ipcommon.protocol=$("select[name$='protocol'] option"); - $("select[name$='protocol'] option").each(function(){ - var has=false; - for(var type in arr){ - if($(this).val()==arr[type]){ - has=true; - if($(this).attr("disabled")){ - $(this).removeAttr("disabled") - } - break; - } - } - if(!has){ - $(this).remove(); - } - }); - }else{ - $.ipcommon.protocol=[]; - } -} - function heightDiv(type){ var hei=document.documentElement.clientHeight; diff --git a/src/main/webapp/static/global/scripts/ipRegion.js b/src/main/webapp/static/global/scripts/ipRegion.js new file mode 100644 index 000000000..5098d0c47 --- /dev/null +++ b/src/main/webapp/static/global/scripts/ipRegion.js @@ -0,0 +1,371 @@ +/** + * 处理IP域值 + */ +;(function($){ + $.extend({ + ipcommon:function(){ + return {}; + } + }); + $.extend($.ipcommon, { + ipType:[], + ipPattern:[], + portPattern:[], + protocol:[], + direction:[] + }); +})(jQuery); +$(function(){ + initCommIpVal(); +}); +window.$.ipcommon=$.ipcommon; +/** + * ip默认选项处理 + */ +var initCommIpVal=function(){ + var action,regionCode,serviceType,ipPortShow,ipType, + ipPattern,portPattern,direction,protocol,regionType; + if($("input[name$='action']:checked").length>0){ + regionCode=$("input[name$='action']:checked").attr("regionCode"); + action=$("input[name$='action']:checked").val(); + }else{ + regionCode=$("input[name$='action']").attr("regionCode"); + action=$("input[name$='action']").val(); + } + if(regionCode){ + if(regionCode.indexOf(",")==-1){ + $("#cfgRegionCode"+regionCode).attr("name","cfgRegionCode"); + $("#cfgType"+regionCode).attr("name","cfgType"); + }else{ + var _region=''; + var regionArr=regionCode.split(','); + $("input[name$='cfgRegionCode'][regionType='1']").each(function(){ + for(var re in regionArr){ + if($(this).val()==regionArr[re]){ + _region=regionArr[re]; + break; + } + } + }); + if(_region!=''){ + regionCode=_region; + } + } + } + if(regionCode){//IP域大于1个,根据action获取ip属性 + ipPortShow=$("input[name$='cfgRegionCode'][value='"+regionCode+"']").attr("ipPortShow"), + ipType=$("input[name$='cfgRegionCode'][value='"+regionCode+"']").attr("ipType"), + ipPattern=$("input[name$='cfgRegionCode'][value='"+regionCode+"']").attr("ipPattern"), + portPattern=$("input[name$='cfgRegionCode'][value='"+regionCode+"']").attr("portPattern"), + direction=$("input[name$='cfgRegionCode'][value='"+regionCode+"']").attr("direction"), + protocol=$("input[name$='cfgRegionCode'][value='"+regionCode+"']").attr("protocol"), + regionType=$("input[name$='cfgRegionCode'][value='"+regionCode+"']").attr("regionType"); + }else{//IP域只有一个,获取regionType为1的 + ipPortShow=$("input[name$='cfgRegionCode'][regionType='1']").attr("ipPortShow"), + ipType=$("input[name$='cfgRegionCode'][regionType='1']").attr("ipType"), + ipPattern=$("input[name$='cfgRegionCode'][regionType='1']").attr("ipPattern"), + portPattern=$("input[name$='cfgRegionCode'][regionType='1']").attr("portPattern"), + direction=$("input[name$='cfgRegionCode'][regionType='1']").attr("direction"), + protocol=$("input[name$='cfgRegionCode'][regionType='1']").attr("protocol"), + regionType=$("input[name$='cfgRegionCode'][regionType='1']").attr("regionType"); + } + //ip,端口处理 + if(ipPortShow){ + if(ipPortShow.indexOf('1')>-1){//展示源IP,端口 + $("input[name$='srcIpAddress']").parents(".form-group").removeClass("hidden"); + $("input[name$='srcPort']").parents(".form-group").removeClass("hidden"); + }else{ + $("input[name$='srcIpAddress']").parents(".form-group").addClass("hidden"); + $("input[name$='srcPort']").parents(".form-group").addClass("hidden"); + } + if(ipPortShow.indexOf('2')>-1){//展示目的IP,端口 + $("input[name$='destIpAddress']").parents(".form-group").removeClass("hidden"); + $("input[name$='destPort']").parents(".form-group").removeClass("hidden"); + }else{ + $("input[name$='destIpAddress']").parents(".form-group").addClass("hidden"); + $("input[name$='destPort']").parents(".form-group").addClass("hidden"); + } + } + //ip类型处理 + $.ipcommon.ipType=$("select[name$='ipType'] option"); + if(ipType){ + var arr=ipType.split(','); + $("select[name$='ipType'] option").each(function(){ + var has=false; + for(var type in arr){ + if($(this).val()==arr[type]){ + has=true; + if($(this).attr("disabled")){ + $(this).removeAttr("disabled") + } + break; + } + } + if(!has){ + $(this).remove(); + } + }); + } + //ip格式处理 + $.ipcommon.ipPattern=$("select[name$='ipPattern'] option"); + if(ipPattern){ + arr=ipPattern.split(','); + $("select[name$='ipPattern'] option").each(function(){ + var has=false; + for(var type in arr){ + if($(this).val()==arr[type]){ + has=true; + if($(this).attr("disabled")){ + $(this).removeAttr("disabled") + } + break; + } + } + if(!has){ + $(this).remove(); + } + }); + } + //端口格式处理 + $.ipcommon.portPattern=$("select[name$='portPattern'] option"); + if(portPattern){ + arr=portPattern.split(','); + $("select[name$='portPattern'] option").each(function(){ + var has=false; + for(var type in arr){ + if($(this).val()==arr[type]){ + has=true; + if($(this).attr("disabled")){ + $(this).removeAttr("disabled") + } + break; + } + } + if(!has){ + $(this).remove(); + } + }); + } + //方向处理 + $.ipcommon.direction=$("select[name$='direction'] option"); + if(direction){ + arr=direction.split(','); + $("select[name$='direction'] option").each(function(){ + var has=false; + for(var type in arr){ + if($(this).val()==arr[type]){ + has=true; + if($(this).attr("disabled")){ + $(this).removeAttr("disabled") + } + break; + } + } + if(!has){ + $(this).remove(); + } + }); + } + //协议处理 + $.ipcommon.protocol=$("select[name$='protocol'] option"); + if(protocol){ + arr=protocol.split(','); + $("select[name$='protocol'] option").each(function(){ + var has=false; + for(var type in arr){ + if($(this).val()==arr[type]){ + has=true; + if($(this).attr("disabled")){ + $(this).removeAttr("disabled") + } + break; + } + } + if(!has){ + $(this).remove(); + } + }); + } +} +/** + * ip切换默认值处理 + */ +var changeIPVal=function(obj){ + var action,regionCode,serviceType,ipPortShow,ipType, + ipPattern,portPattern,direction,protocol,regionType,o; + o=$(obj); + if($("input[name$='action']:checked").length>0){ + regionCode=$("input[name$='action']:checked").attr("regionCode"); + action=$("input[name$='action']:checked").val(); + }else{ + regionCode=$("input[name$='action']").attr("regionCode"); + action=$("input[name$='action']").val(); + } + if(regionCode){ + if(regionCode.indexOf(",")==-1){ + $("#cfgRegionCode"+regionCode).attr("name","cfgRegionCode"); + $("#cfgType"+regionCode).attr("name","cfgType"); + }else{ + var _region=''; + var regionArr=regionCode.split(','); + $("input[name$='cfgRegionCode'][regionType='1']").each(function(){ + for(var re in regionArr){ + if($(this).val()==regionArr[re]){ + _region=regionArr[re]; + break; + } + } + }); + if(_region!=''){ + regionCode=_region; + } + } + } + if(regionCode){//IP域大于1个,根据action获取ip属性 + ipPortShow=$("input[name$='cfgRegionCode'][value='"+regionCode+"']").attr("ipPortShow"), + ipType=$("input[name$='cfgRegionCode'][value='"+regionCode+"']").attr("ipType"), + ipPattern=$("input[name$='cfgRegionCode'][value='"+regionCode+"']").attr("ipPattern"), + portPattern=$("input[name$='cfgRegionCode'][value='"+regionCode+"']").attr("portPattern"), + direction=$("input[name$='cfgRegionCode'][value='"+regionCode+"']").attr("direction"), + protocol=$("input[name$='cfgRegionCode'][value='"+regionCode+"']").attr("protocol"), + regionType=$("input[name$='cfgRegionCode'][value='"+regionCode+"']").attr("regionType"); + }else{//IP域只有一个,获取regionType为1的 + ipPortShow=$("input[name$='cfgRegionCode'][regionType='1']").attr("ipPortShow"), + ipType=$("input[name$='cfgRegionCode'][regionType='1']").attr("ipType"), + ipPattern=$("input[name$='cfgRegionCode'][regionType='1']").attr("ipPattern"), + portPattern=$("input[name$='cfgRegionCode'][regionType='1']").attr("portPattern"), + direction=$("input[name$='cfgRegionCode'][regionType='1']").attr("direction"), + protocol=$("input[name$='cfgRegionCode'][regionType='1']").attr("protocol"), + regionType=$("input[name$='cfgRegionCode'][regionType='1']").attr("regionType"); + } + if(o){ + //ip,端口处理 + if(ipPortShow){ + if(ipPortShow.indexOf('1')>-1){//展示源IP,端口 + o.find("input[name$='srcIpAddress']").parents(".form-group").removeClass("hidden"); + o.find("input[name$='srcPort']").parents(".form-group").removeClass("hidden"); + }else{ + o.find("input[name$='srcIpAddress']").parents(".form-group").addClass("hidden"); + o.find("input[name$='srcPort']").parents(".form-group").addClass("hidden"); + } + if(ipPortShow.indexOf('2')>-1){//展示目的IP,端口 + o.find("input[name$='destIpAddress']").parents(".form-group").removeClass("hidden"); + o.find("input[name$='destPort']").parents(".form-group").removeClass("hidden"); + }else{ + o.find("input[name$='destIpAddress']").parents(".form-group").addClass("hidden"); + o.find("input[name$='destPort']").parents(".form-group").addClass("hidden"); + } + } + //ip类型处理 + if(ipType){ + var arr=ipType.split(','); + var ipTypeVal=o.find("select[name$='ipType'] option:selected").attr("value"); + o.find("select[name$='ipType']").empty(); + $.ipcommon.ipType.each(function(){ + var has=false; + for(var type in arr){ + if($(this).val()==arr[type]){ + has=true; + o.find("select[name$='ipType']").append($(this)); + break; + } + } + }); + o.find("select[name$='ipType']").selectpicker("refresh"); + if(o.find("select[name$='ipType'] option[value='"+ipTypeVal+"']").length>0){ + o.find("select[name$='ipType']").selectpicker("val",ipTypeVal); + }else{ + o.find("select[name$='ipType']").selectpicker("val",4); + } + + } + //ip格式处理 + if(ipPattern){ + arr=ipPattern.split(','); + var ipPatternVal=o.find("select[name$='ipPattern'] option:selected").attr("value"); + o.find("select[name$='ipPattern']").empty(); + $.ipcommon.ipPattern.each(function(){ + var has=false; + for(var type in arr){ + if($(this).val()==arr[type]){ + has=true; + o.find("select[name$='ipPattern']").append($(this)); + break; + } + } + }); + o.find("select[name$='ipPattern']").selectpicker("refresh"); + if(o.find("select[name$='ipPattern'] option[value='"+ipPatternVal+"']").length>0){ + o.find("select[name$='ipPattern']").selectpicker("val",ipPatternVal); + }else{ + o.find("select[name$='ipPattern']").selectpicker("val",1); + } + } + //端口格式处理 + if(portPattern){ + arr=portPattern.split(','); + var portPatternVal=o.find("select[name$='portPattern'] option:selected").attr("value"); + o.find("select[name$='portPattern']").empty(); + $.ipcommon.portPattern.each(function(){ + var has=false; + for(var type in arr){ + if($(this).val()==arr[type]){ + has=true; + o.find("select[name$='portPattern']").append($(this)); + break; + } + } + }); + o.find("select[name$='portPattern']").selectpicker("refresh"); + if(o.find("select[name$='portPattern'] option[value='"+portPatternVal+"']").length>0){ + o.find("select[name$='portPattern']").selectpicker("val",portPatternVal); + }else{ + o.find("select[name$='portPattern']").selectpicker("val",1); + } + } + //方向处理 + if(direction){ + arr=direction.split(','); + var directionVal=o.find("select[name$='direction'] option:selected").attr("value"); + o.find("select[name$='direction']").empty(); + $.ipcommon.direction.each(function(){ + var has=false; + for(var type in arr){ + if($(this).val()==arr[type]){ + has=true; + o.find("select[name$='direction']").append($(this)); + break; + } + } + }); + o.find("select[name$='direction']").selectpicker("refresh"); + if(o.find("select[name$='direction'] option[value='"+directionVal+"']").length>0){ + o.find("select[name$='direction']").selectpicker("val",directionVal); + }else{ + o.find("select[name$='direction']").selectpicker("val",0); + } + } + //协议处理 + if(protocol){ + arr=protocol.split(','); + var protocolVal=o.find("select[name$='protocol'] option:selected").attr("value"); + o.find("select[name$='protocol']").empty(); + $.ipcommon.protocol.each(function(){ + var has=false; + for(var type in arr){ + if($(this).val()==arr[type]){ + has=true; + o.find("select[name$='protocol']").append($(this)); + break; + } + } + }); + o.find("select[name$='protocol']").selectpicker("refresh"); + if(o.find("select[name$='protocol'] option[value='"+protocolVal+"']").length>0){ + o.find("select[name$='protocol']").selectpicker("val",protocolVal); + }else{ + o.find("select[name$='protocol']").selectpicker("val",0); + } + } + } +} \ No newline at end of file From 16f3b0e15a162edecaa09b65eced8d3ba8ad6610 Mon Sep 17 00:00:00 2001 From: duandongmei Date: Sun, 30 Sep 2018 09:56:20 +0800 Subject: [PATCH 20/25] =?UTF-8?q?ishexbinbug=E6=9B=B4=E6=94=B9=20ip?= =?UTF-8?q?=E8=A1=A8=E5=8D=95=E6=8B=86=E6=88=90ip=20domain=E5=92=8Cpayload?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/cfg/intercept/interceptForm.jsp | 15 +- .../webapp/static/global/scripts/common.js | 200 +----------------- 2 files changed, 19 insertions(+), 196 deletions(-) diff --git a/src/main/webapp/WEB-INF/views/cfg/intercept/interceptForm.jsp b/src/main/webapp/WEB-INF/views/cfg/intercept/interceptForm.jsp index 6a9d20eec..ba0e4e494 100644 --- a/src/main/webapp/WEB-INF/views/cfg/intercept/interceptForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/intercept/interceptForm.jsp @@ -132,11 +132,20 @@ - + + + + + + + + + +
-

+ <%--

@@ -146,7 +155,7 @@ -

+ --%>
diff --git a/src/main/webapp/static/global/scripts/common.js b/src/main/webapp/static/global/scripts/common.js index 9c2a95215..4786ccfbf 100644 --- a/src/main/webapp/static/global/scripts/common.js +++ b/src/main/webapp/static/global/scripts/common.js @@ -1,14 +1,4 @@ $(function(){ - $.ipcommon=function(){ - return {}; - } - $.extend($.ipcommon, { - ipType:[], - ipPattern:[], - portPattern:[], - protocol:[], - direction:[] - }); $("input[name$='isCaseSenstive']").on("change",function(){ setIsHexBin(this); }); @@ -425,7 +415,6 @@ $(function(){ window.history.back(); return false; }); - initCommIpVal(); //去掉首尾空格 $("input,textarea").on("blur",function(){ var val=$(this).val(); @@ -752,7 +741,11 @@ var setIsHexBin=function(obj){ $("input[name='"+profix+"isCaseSenstive'][value=1]").prop("checked",false); $("input[name='"+profix+"isCaseSenstive'][value=1]").parent().addClass("hidden"); }else{ - $("input[name='"+profix+"isCaseSenstive'][value=1]").parent().removeClass("hidden"); + var configHex=$("input[name='"+profix+"configHex']").val(); + configHex=","+configHex+","; + if(configHex.indexOf(",2,") > -1){ + $("input[name='"+profix+"isCaseSenstive'][value=1]").parent().removeClass("hidden"); + } } var isCaseSenstive=$("input[name='"+profix+"isCaseSenstive']:checked").val(); //设置isHexbin下拉框的值 @@ -1283,7 +1276,7 @@ var viewAreaInfo=function(path,areaEffectiveIds,compileId){ var title=""; if(data.areaIsps.length > 0){ title=$.validator.messages.area;//+" "+$.validator.messages.isp; - html+=""; + html+="
"; html+=""; html+="";/* + "";*/ @@ -1302,7 +1295,7 @@ var viewAreaInfo=function(path,areaEffectiveIds,compileId){ } if(data.areaIps.length > 0){ title=$.validator.messages.area+" ip"; - html+="
"+$.validator.messages.area+""+$.validator.messages.isp+"
"; + html+="
"; html+=""; html+="" + "" + @@ -1675,185 +1668,6 @@ var setHexCaseSenstive=function(){ }); } -/** - * ip默认选项处理 - */ -var initCommIpVal=function(){ - var action,regionCode,serviceType,ipPortShow,ipType, - ipPattern,portPattern,direction,protocol,regionType; - if($("input[name$='action']:checked").length>0){ - regionCode=$("input[name$='action']:checked").attr("regionCode"); - action=$("input[name$='action']:checked").val(); - }else{ - regionCode=$("input[name$='action']").attr("regionCode"); - action=$("input[name$='action']").val(); - } - if(regionCode){ - if(regionCode.indexOf(",")==-1){ - $("#cfgRegionCode"+regionCode).attr("name","cfgRegionCode"); - $("#cfgType"+regionCode).attr("name","cfgType"); - }else{ - var _region=''; - var regionArr=regionCode.split(','); - $("input[name$='cfgRegionCode'][regionType='1']").each(function(){ - for(var re in regionArr){ - if($(this).val()==regionArr[re]){ - _region=regionArr[re]; - break; - } - } - }); - if(_region!=''){ - regionCode=_region; - } - } - } - if(regionCode){//IP域大于1个,根据action获取ip属性 - ipPortShow=$("input[name$='cfgRegionCode'][value='"+regionCode+"']").attr("ipPortShow"), - ipType=$("input[name$='cfgRegionCode'][value='"+regionCode+"']").attr("ipType"), - ipPattern=$("input[name$='cfgRegionCode'][value='"+regionCode+"']").attr("ipPattern"), - portPattern=$("input[name$='cfgRegionCode'][value='"+regionCode+"']").attr("portPattern"), - direction=$("input[name$='cfgRegionCode'][value='"+regionCode+"']").attr("direction"), - protocol=$("input[name$='cfgRegionCode'][value='"+regionCode+"']").attr("protocol"), - regionType=$("input[name$='cfgRegionCode'][value='"+regionCode+"']").attr("regionType"); - }else{//IP域只有一个,获取regionType为1的 - ipPortShow=$("input[name$='cfgRegionCode'][regionType='1']").attr("ipPortShow"), - ipType=$("input[name$='cfgRegionCode'][regionType='1']").attr("ipType"), - ipPattern=$("input[name$='cfgRegionCode'][regionType='1']").attr("ipPattern"), - portPattern=$("input[name$='cfgRegionCode'][regionType='1']").attr("portPattern"), - direction=$("input[name$='cfgRegionCode'][regionType='1']").attr("direction"), - protocol=$("input[name$='cfgRegionCode'][regionType='1']").attr("protocol"), - regionType=$("input[name$='cfgRegionCode'][regionType='1']").attr("regionType"); - } - //ip,端口处理 - if(ipPortShow){ - if(ipPortShow.indexOf('1')>-1){//展示源IP,端口 - $("input[name$='srcIpAddress']").parents(".form-group").removeClass("hidden"); - $("input[name$='srcPort']").parents(".form-group").removeClass("hidden"); - }else{ - $("input[name$='srcIpAddress']").parents(".form-group").addClass("hidden"); - $("input[name$='srcPort']").parents(".form-group").addClass("hidden"); - } - if(ipPortShow.indexOf('2')>-1){//展示目的IP,端口 - $("input[name$='destIpAddress']").parents(".form-group").removeClass("hidden"); - $("input[name$='destPort']").parents(".form-group").removeClass("hidden"); - }else{ - $("input[name$='destIpAddress']").parents(".form-group").addClass("hidden"); - $("input[name$='destPort']").parents(".form-group").addClass("hidden"); - } - } - //ip类型处理 - if(ipType){ - var arr=ipType.split(','); - $.ipcommon.ipType=$("select[name$='ipType'] option"); - $("select[name$='ipType'] option").each(function(){ - var has=false; - for(var type in arr){ - if($(this).val()==arr[type]){ - has=true; - if($(this).attr("disabled")){ - $(this).removeAttr("disabled") - } - break; - } - } - if(!has){ - $(this).remove(); - } - }); - }else{ - $.ipcommon.ipType=[]; - } - //ip格式处理 - if(ipPattern){ - arr=ipPattern.split(','); - $.ipcommon.ipPattern=$("select[name$='ipPattern'] option"); - $("select[name$='ipPattern'] option").each(function(){ - var has=false; - for(var type in arr){ - if($(this).val()==arr[type]){ - has=true; - if($(this).attr("disabled")){ - $(this).removeAttr("disabled") - } - break; - } - } - if(!has){ - $(this).remove(); - } - }); - }else{ - $.ipcommon.ipPattern=[]; - } - //端口格式处理 - if(portPattern){ - arr=portPattern.split(','); - $.ipcommon.portPattern=$("select[name$='portPattern'] option"); - $("select[name$='portPattern'] option").each(function(){ - var has=false; - for(var type in arr){ - if($(this).val()==arr[type]){ - has=true; - if($(this).attr("disabled")){ - $(this).removeAttr("disabled") - } - break; - } - } - if(!has){ - $(this).remove(); - } - }); - }else{ - $.ipcommon.portPattern=[]; - } - //方向处理 - if(direction){ - arr=direction.split(','); - $.ipcommon.direction=$("select[name$='direction'] option"); - $("select[name$='direction'] option").each(function(){ - var has=false; - for(var type in arr){ - if($(this).val()==arr[type]){ - has=true; - if($(this).attr("disabled")){ - $(this).removeAttr("disabled") - } - break; - } - } - if(!has){ - $(this).remove(); - } - }); - }else{ - $.ipcommon.direction=[]; - } - //协议处理 - if(protocol){ - arr=protocol.split(','); - $.ipcommon.protocol=$("select[name$='protocol'] option"); - $("select[name$='protocol'] option").each(function(){ - var has=false; - for(var type in arr){ - if($(this).val()==arr[type]){ - has=true; - if($(this).attr("disabled")){ - $(this).removeAttr("disabled") - } - break; - } - } - if(!has){ - $(this).remove(); - } - }); - }else{ - $.ipcommon.protocol=[]; - } -} - function heightDiv(type){ var hei=document.documentElement.clientHeight; From e69191219ac50f774ff6ba20b70438cbc534dead Mon Sep 17 00:00:00 2001 From: duandongmei Date: Sun, 30 Sep 2018 10:16:01 +0800 Subject: [PATCH 21/25] =?UTF-8?q?IpPayload=E6=A0=87=E9=A2=98=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/webapp/WEB-INF/views/cfg/intercept/interceptList.jsp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/WEB-INF/views/cfg/intercept/interceptList.jsp b/src/main/webapp/WEB-INF/views/cfg/intercept/interceptList.jsp index c46a73b53..59091ccef 100644 --- a/src/main/webapp/WEB-INF/views/cfg/intercept/interceptList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/intercept/interceptList.jsp @@ -103,7 +103,7 @@

- +

From 025182e551ede879348848ffcd6eb12f5743ea69 Mon Sep 17 00:00:00 2001 From: wangxin Date: Sun, 30 Sep 2018 10:54:30 +0800 Subject: [PATCH 22/25] =?UTF-8?q?(1)=E5=AE=9E=E6=97=B6=E6=8A=A5=E8=A1=A8?= =?UTF-8?q?=E5=8A=A8=E4=BD=9C=E6=9B=BF=E6=8D=A2=E4=B8=BAserviceId=20(2)?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=97=A5=E5=BF=97=E6=80=BB=E9=87=8F=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1=E6=9F=A5=E8=AF=A2=E6=9D=A1=E4=BB=B6action=E6=9B=BF?= =?UTF-8?q?=E6=8D=A2=E4=B8=BAserviceId=20(3)=E9=85=8D=E7=BD=AE=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E6=97=A5=E5=BF=97=E6=80=BB=E9=87=8F=E5=88=97=E5=8A=A0?= =?UTF-8?q?=E5=85=A5serviceId=20(4)=E9=85=8D=E7=BD=AE=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E6=80=BB=E9=87=8F=E8=B7=B3=E8=BD=AC=E5=88=B0=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E5=88=97=E8=A1=A8action=E6=9B=BF=E6=8D=A2=E4=B8=BAserviceId=20?= =?UTF-8?q?(5)=E9=85=8D=E7=BD=AE=E6=97=A5=E5=BF=97=E7=9B=B8=E5=85=B3js?= =?UTF-8?q?=E6=8F=90=E5=8F=96=E5=88=B0pzLog=E3=80=82js=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/nis/domain/log/SearchReport.java | 7 + .../configuration/LogSearchController.java | 4 +- .../report/NtcDestIpReportController.java | 8 +- .../report/NtcEntranceReportController.java | 9 +- .../report/NtcLwhhReportController.java | 10 +- .../report/NtcPzReportController.java | 45 ++++--- .../NtcSrcipDomesticReportController.java | 9 +- .../report/NtcTagReportController.java | 9 +- .../report/NtcXzReportController.java | 9 +- src/main/webapp/WEB-INF/include/header.jsp | 1 + .../WEB-INF/views/cfg/app/appByteCfgList.jsp | 2 +- .../views/cfg/app/appDomainCfgList.jsp | 2 +- .../views/cfg/app/appHeaderCfgList.jsp | 2 +- .../WEB-INF/views/cfg/app/appHttpCfgList.jsp | 2 +- .../WEB-INF/views/cfg/app/appIpCfgList.jsp | 2 +- .../views/cfg/app/appMultiFeatureCfgList.jsp | 2 +- .../views/cfg/app/appPolicyCfgList.jsp | 2 +- .../WEB-INF/views/cfg/app/appSslCfgList.jsp | 2 +- .../WEB-INF/views/cfg/app/appTcpCfgList.jsp | 2 +- .../views/cfg/app/appTopicDomainCfgList.jsp | 2 +- .../WEB-INF/views/cfg/asnPolicyCfgList.jsp | 2 +- .../views/cfg/av/contIp/contIpList.jsp | 2 +- .../views/cfg/av/contUrl/contUrlList.jsp | 2 +- .../WEB-INF/views/cfg/av/fileSampleList.jsp | 2 +- .../WEB-INF/views/cfg/av/picIp/picIpList.jsp | 2 +- .../views/cfg/av/picUrl/picUrlList.jsp | 2 +- .../WEB-INF/views/cfg/av/signSampleList.jsp | 2 +- .../WEB-INF/views/cfg/av/voip/voipList.jsp | 2 +- .../WEB-INF/views/cfg/basicprotocol/list.jsp | 2 +- .../WEB-INF/views/cfg/common/ipList.jsp | 2 +- .../WEB-INF/views/cfg/ddosIpCfgList.jsp | 2 +- .../webapp/WEB-INF/views/cfg/dnsIpCfgList.jsp | 2 +- .../views/cfg/encryptedtunnelbehav/list.jsp | 2 +- .../views/cfg/fileTransfer/fileDigestList.jsp | 2 +- .../views/cfg/fileTransfer/ftpList.jsp | 2 +- .../views/cfg/fileTransfer/p2pList.jsp | 2 +- .../WEB-INF/views/cfg/ipaddr/ipList.jsp | 4 +- .../WEB-INF/views/cfg/mail/mailList.jsp | 2 +- .../WEB-INF/views/cfg/other/bgpList.jsp | 2 +- .../WEB-INF/views/cfg/other/xmppList.jsp | 2 +- .../cfg/proxy/control/httpRedirectList.jsp | 2 +- .../cfg/proxy/control/httpReqReplaceList.jsp | 2 +- .../cfg/proxy/control/httpResReplaceList.jsp | 2 +- .../WEB-INF/views/cfg/website/dnsList.jsp | 2 +- .../WEB-INF/views/cfg/website/httpList.jsp | 2 +- .../WEB-INF/views/cfg/website/sslList.jsp | 2 +- .../views/cfg/whitelist/domainList.jsp | 2 +- .../WEB-INF/views/cfg/whitelist/ipList.jsp | 2 +- src/main/webapp/WEB-INF/views/report/list.jsp | 49 +++---- .../webapp/static/global/scripts/common.js | 116 ----------------- .../webapp/static/global/scripts/pzLog.js | 121 ++++++++++++++++++ 51 files changed, 235 insertions(+), 240 deletions(-) create mode 100644 src/main/webapp/static/global/scripts/pzLog.js diff --git a/src/main/java/com/nis/domain/log/SearchReport.java b/src/main/java/com/nis/domain/log/SearchReport.java index de1798739..d1b378da7 100644 --- a/src/main/java/com/nis/domain/log/SearchReport.java +++ b/src/main/java/com/nis/domain/log/SearchReport.java @@ -31,6 +31,7 @@ public class SearchReport extends BaseEntity{ private Integer functionId; private String cfgName; private Integer action; + private Integer serviceId; private String services;//service日志总量统计使用 private Integer reportType;//小时报,日报,月报 //标签,性质,来文函号,境内源Ip,各国目的IP,运营商局点 @@ -52,6 +53,12 @@ public class SearchReport extends BaseEntity{ private String reportTime; + public Integer getServiceId() { + return serviceId; + } + public void setServiceId(Integer serviceId) { + this.serviceId = serviceId; + } public String getServices() { return services; } diff --git a/src/main/java/com/nis/web/controller/configuration/LogSearchController.java b/src/main/java/com/nis/web/controller/configuration/LogSearchController.java index 4bd69897c..2c8257044 100644 --- a/src/main/java/com/nis/web/controller/configuration/LogSearchController.java +++ b/src/main/java/com/nis/web/controller/configuration/LogSearchController.java @@ -24,9 +24,9 @@ public class LogSearchController extends BaseController{ */ // 获取相应日志检索菜单URL String logUrl = menuService.getLogUrl(entity.getFunctionId()); - Integer serviceId = menuService.getServiceId(entity.getFunctionId(),entity.getAction()); +// Integer serviceId = menuService.getServiceId(entity.getFunctionId(),entity.getAction()); - attr.addAttribute("service", serviceId); + attr.addAttribute("service", entity.getService().intValue()); attr.addAttribute("cfgId", entity.getCfgId()); attr.addAttribute("functionId", entity.getFunctionId()); attr.addAttribute("date", entity.getDate()); diff --git a/src/main/java/com/nis/web/controller/report/NtcDestIpReportController.java b/src/main/java/com/nis/web/controller/report/NtcDestIpReportController.java index 28f53cc41..b8d762aa1 100644 --- a/src/main/java/com/nis/web/controller/report/NtcDestIpReportController.java +++ b/src/main/java/com/nis/web/controller/report/NtcDestIpReportController.java @@ -35,12 +35,8 @@ public class NtcDestIpReportController extends BaseController { List serviceList = DictUtils.getFunctionServiceDictList(bean.getFunctionId()); - if(bean.getAction()!=null){ - for(FunctionServiceDict service:serviceList){ - if(service.getAction().intValue()==bean.getAction().intValue()){ - bean.setSearchService(service.getServiceId().toString()); - } - } + if(bean.getServiceId()!=null){ + bean.setServices(bean.getServiceId().toString()); }else{ StringBuffer serviceId=new StringBuffer(); for(int i=0;i serviceList = DictUtils.getFunctionServiceDictList(bean.getFunctionId()); - if(bean.getAction()!=null){ - for(FunctionServiceDict service:serviceList){ - if(service.getAction().intValue()==bean.getAction().intValue()){ - bean.setSearchService(service.getServiceId().toString()); - } - } + if(bean.getServiceId()!=null){ + bean.setServices(bean.getServiceId().toString()); }else{ StringBuffer serviceId=new StringBuffer(); for(int i=0;i serviceList = DictUtils.getFunctionServiceDictList(bean.getFunctionId()); List requestInfos=requestInfoService.getAllRequestInfo(); model.addAttribute("requestInfos", requestInfos); - if(bean.getAction()!=null){ - for(FunctionServiceDict service:serviceList){ - if(service.getAction().intValue()==bean.getAction().intValue()){ - bean.setSearchService(service.getServiceId().toString()); - } - } + if(bean.getServiceId()!=null){ + bean.setServices(bean.getServiceId().toString()); }else{ StringBuffer serviceId=new StringBuffer(); for(int i=0;i> ajaxGetLogTotal(Model model,Long endTime,String actions,Integer functionId,String compileIds){ + public List> ajaxGetLogTotal(Model model,Long endTime,String actions,String serviceIds,Integer functionId,String compileIds){ List> dataList=new ArrayList<>(); SimpleDateFormat sdf=new SimpleDateFormat(Constants.SEARCH_DATEFORMAT); Date endDate=null; @@ -95,22 +95,25 @@ public class NtcPzReportController extends BaseController{ logger.info("log search end time:"+sdf.format(endDate)); logger.info("log search start time:"+sdf.format(startDate)); } - - String serviceIdsStr=""; - StringBuffer serviceIds=new StringBuffer(); - List serviceList=DictUtils.getFunctionServiceDictList(functionId.intValue()); - for(String action:actions.split(",")) { - for(FunctionServiceDict service:serviceList){ - if(service.getAction().intValue()==Integer.parseInt(action)){ - serviceIds.append(service.getServiceId().intValue()); - serviceIds.append(","); - } - } - } - if(serviceIds.toString().endsWith(",")) { - serviceIdsStr=serviceIds.toString().substring(0,serviceIds.toString().lastIndexOf(",")); - } - String json=ConfigServiceUtil.getReport(Constants.BUSINESSTYPE_CONFIG, compileIds, serviceIdsStr, startDate==null?null:sdf.format(startDate), endDate==null?null:sdf.format(endDate)); +// String serviceIdsStr=""; +// if(StringUtils.isBlank(serviceIds)) { +// StringBuffer _serviceIds=new StringBuffer(); +// List serviceList=DictUtils.getFunctionServiceDictList(functionId.intValue()); +// for(String action:actions.split(",")) { +// for(FunctionServiceDict service:serviceList){ +// if(service.getAction().intValue()==Integer.parseInt(action)){ +// _serviceIds.append(service.getServiceId().intValue()); +// _serviceIds.append(","); +// } +// } +// } +// if(_serviceIds.toString().endsWith(",")) { +// serviceIdsStr=_serviceIds.toString().substring(0,_serviceIds.toString().lastIndexOf(",")); +// } +// }else { +// serviceIdsStr=serviceIds; +// } + String json=ConfigServiceUtil.getReport(Constants.BUSINESSTYPE_CONFIG, compileIds, serviceIds, startDate==null?null:sdf.format(startDate), endDate==null?null:sdf.format(endDate)); List list=getList(json); String[] idArr=compileIds.split(","); if(list!=null&&(list.size()>0)){ @@ -136,12 +139,8 @@ public class NtcPzReportController extends BaseController{ List serviceList = DictUtils.getFunctionServiceDictList(bean.getFunctionId()); List labels=serviceDictInfoService.findAllLableDict(); model.addAttribute("labels", labels); - if(bean.getAction()!=null){ - for(FunctionServiceDict service:serviceList){ - if(service.getAction().intValue()==bean.getAction().intValue()){ - bean.setSearchService(service.getServiceId().toString()); - } - } + if(bean.getServiceId()!=null){ + bean.setSearchService(bean.getServiceId().toString()); }else{ StringBuffer serviceId=new StringBuffer(); for(int i=0;i serviceList = DictUtils.getFunctionServiceDictList(bean.getFunctionId()); - if(bean.getAction()!=null){ - for(FunctionServiceDict service:serviceList){ - if(service.getAction().intValue()==bean.getAction().intValue()){ - bean.setSearchService(service.getServiceId().toString()); - } - } + if(bean.getServiceId()!=null){ + bean.setServices(bean.getServiceId().toString()); }else{ StringBuffer serviceId=new StringBuffer(); for(int i=0;i serviceList = DictUtils.getFunctionServiceDictList(bean.getFunctionId()); List labels=serviceDictInfoService.findAllLableDict(); model.addAttribute("labels", labels); - if(bean.getAction()!=null){ - for(FunctionServiceDict service:serviceList){ - if(service.getAction().intValue()==bean.getAction().intValue()){ - bean.setSearchService(service.getServiceId().toString()); - } - } + if(bean.getServiceId()!=null){ + bean.setServices(bean.getServiceId().toString()); }else{ StringBuffer serviceId=new StringBuffer(); for(int i=0;i serviceList = DictUtils.getFunctionServiceDictList(bean.getFunctionId()); List xzs=serviceDictInfoService.findAllXzDict(); model.addAttribute("xzs", xzs); - if(bean.getAction()!=null){ - for(FunctionServiceDict service:serviceList){ - if(service.getAction().intValue()==bean.getAction().intValue()){ - bean.setSearchService(service.getServiceId().toString()); - } - } + if(bean.getServiceId()!=null){ + bean.setServices(bean.getServiceId().toString()); }else{ StringBuffer serviceId=new StringBuffer(); for(int i=0;i + diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appByteCfgList.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appByteCfgList.jsp index 6c1067b9f..d6a8a72f2 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appByteCfgList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appByteCfgList.jsp @@ -420,7 +420,7 @@ - <%--
--%> + <%-- --%> diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appDomainCfgList.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appDomainCfgList.jsp index 92bdfcdfe..7f4ee59c5 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appDomainCfgList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appDomainCfgList.jsp @@ -420,7 +420,7 @@ - <%-- --%> + <%-- --%> diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appHeaderCfgList.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appHeaderCfgList.jsp index 8c9cc36e5..21a22bb89 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appHeaderCfgList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appHeaderCfgList.jsp @@ -482,7 +482,7 @@ - <%-- --%> + <%-- --%> diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appHttpCfgList.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appHttpCfgList.jsp index caa4a46b2..4c0fefdcd 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appHttpCfgList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appHttpCfgList.jsp @@ -428,7 +428,7 @@ - <%-- --%> + <%-- --%> diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appIpCfgList.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appIpCfgList.jsp index 2dc71bd31..eb54c4bcc 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appIpCfgList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appIpCfgList.jsp @@ -418,7 +418,7 @@ - <%-- --%> + <%-- --%> diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appMultiFeatureCfgList.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appMultiFeatureCfgList.jsp index 4527eb0b5..33730fb09 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appMultiFeatureCfgList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appMultiFeatureCfgList.jsp @@ -365,7 +365,7 @@ - <%-- --%> + <%-- --%> diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appPolicyCfgList.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appPolicyCfgList.jsp index f56105a3c..95015edbd 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appPolicyCfgList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appPolicyCfgList.jsp @@ -468,7 +468,7 @@ - + diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appSslCfgList.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appSslCfgList.jsp index c91f0ba94..99950ac67 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appSslCfgList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appSslCfgList.jsp @@ -427,7 +427,7 @@ - <%-- --%> + <%-- --%> diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appTcpCfgList.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appTcpCfgList.jsp index 08496368b..3614570a3 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appTcpCfgList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appTcpCfgList.jsp @@ -326,7 +326,7 @@ -<%-- +<%-- --%> diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appTopicDomainCfgList.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appTopicDomainCfgList.jsp index 84ff2a652..b34036351 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appTopicDomainCfgList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appTopicDomainCfgList.jsp @@ -437,7 +437,7 @@ - <%-- --%> + <%-- --%> diff --git a/src/main/webapp/WEB-INF/views/cfg/asnPolicyCfgList.jsp b/src/main/webapp/WEB-INF/views/cfg/asnPolicyCfgList.jsp index afebcb4a0..20b1d7d98 100644 --- a/src/main/webapp/WEB-INF/views/cfg/asnPolicyCfgList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/asnPolicyCfgList.jsp @@ -383,7 +383,7 @@ - <%-- --%> + <%-- --%> diff --git a/src/main/webapp/WEB-INF/views/cfg/av/contIp/contIpList.jsp b/src/main/webapp/WEB-INF/views/cfg/av/contIp/contIpList.jsp index b5b76a6df..d74bf884b 100644 --- a/src/main/webapp/WEB-INF/views/cfg/av/contIp/contIpList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/av/contIp/contIpList.jsp @@ -499,7 +499,7 @@ - + diff --git a/src/main/webapp/WEB-INF/views/cfg/av/contUrl/contUrlList.jsp b/src/main/webapp/WEB-INF/views/cfg/av/contUrl/contUrlList.jsp index 615fea62e..240391749 100644 --- a/src/main/webapp/WEB-INF/views/cfg/av/contUrl/contUrlList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/av/contUrl/contUrlList.jsp @@ -416,7 +416,7 @@ - + - + diff --git a/src/main/webapp/WEB-INF/views/cfg/av/picIp/picIpList.jsp b/src/main/webapp/WEB-INF/views/cfg/av/picIp/picIpList.jsp index cbcbc4f17..0849b8f16 100644 --- a/src/main/webapp/WEB-INF/views/cfg/av/picIp/picIpList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/av/picIp/picIpList.jsp @@ -500,7 +500,7 @@ - + diff --git a/src/main/webapp/WEB-INF/views/cfg/av/picUrl/picUrlList.jsp b/src/main/webapp/WEB-INF/views/cfg/av/picUrl/picUrlList.jsp index aae8fd482..a29ecaf7d 100644 --- a/src/main/webapp/WEB-INF/views/cfg/av/picUrl/picUrlList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/av/picUrl/picUrlList.jsp @@ -418,7 +418,7 @@ - + - + diff --git a/src/main/webapp/WEB-INF/views/cfg/av/voip/voipList.jsp b/src/main/webapp/WEB-INF/views/cfg/av/voip/voipList.jsp index 2d5d4618a..e4892b63f 100644 --- a/src/main/webapp/WEB-INF/views/cfg/av/voip/voipList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/av/voip/voipList.jsp @@ -466,7 +466,7 @@ - + diff --git a/src/main/webapp/WEB-INF/views/cfg/basicprotocol/list.jsp b/src/main/webapp/WEB-INF/views/cfg/basicprotocol/list.jsp index ab3ad752c..9761bbfa0 100644 --- a/src/main/webapp/WEB-INF/views/cfg/basicprotocol/list.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/basicprotocol/list.jsp @@ -471,7 +471,7 @@ - + diff --git a/src/main/webapp/WEB-INF/views/cfg/common/ipList.jsp b/src/main/webapp/WEB-INF/views/cfg/common/ipList.jsp index 7929a3043..a72fbd684 100644 --- a/src/main/webapp/WEB-INF/views/cfg/common/ipList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/common/ipList.jsp @@ -492,7 +492,7 @@ - <%-- --%> + <%-- --%> diff --git a/src/main/webapp/WEB-INF/views/cfg/ddosIpCfgList.jsp b/src/main/webapp/WEB-INF/views/cfg/ddosIpCfgList.jsp index c93086414..4f16c5328 100644 --- a/src/main/webapp/WEB-INF/views/cfg/ddosIpCfgList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/ddosIpCfgList.jsp @@ -445,7 +445,7 @@ - + diff --git a/src/main/webapp/WEB-INF/views/cfg/dnsIpCfgList.jsp b/src/main/webapp/WEB-INF/views/cfg/dnsIpCfgList.jsp index 25c067939..d9cf24db1 100644 --- a/src/main/webapp/WEB-INF/views/cfg/dnsIpCfgList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/dnsIpCfgList.jsp @@ -421,7 +421,7 @@ - <%-- --%> + <%-- --%> diff --git a/src/main/webapp/WEB-INF/views/cfg/encryptedtunnelbehav/list.jsp b/src/main/webapp/WEB-INF/views/cfg/encryptedtunnelbehav/list.jsp index f599d0f2a..def7c346f 100644 --- a/src/main/webapp/WEB-INF/views/cfg/encryptedtunnelbehav/list.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/encryptedtunnelbehav/list.jsp @@ -468,7 +468,7 @@ - + diff --git a/src/main/webapp/WEB-INF/views/cfg/fileTransfer/fileDigestList.jsp b/src/main/webapp/WEB-INF/views/cfg/fileTransfer/fileDigestList.jsp index f7ffadb40..acbab3409 100644 --- a/src/main/webapp/WEB-INF/views/cfg/fileTransfer/fileDigestList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/fileTransfer/fileDigestList.jsp @@ -461,7 +461,7 @@ - <%-- --%> + <%-- --%> diff --git a/src/main/webapp/WEB-INF/views/cfg/fileTransfer/ftpList.jsp b/src/main/webapp/WEB-INF/views/cfg/fileTransfer/ftpList.jsp index d2e41d5a3..fc6f81c82 100644 --- a/src/main/webapp/WEB-INF/views/cfg/fileTransfer/ftpList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/fileTransfer/ftpList.jsp @@ -448,7 +448,7 @@ - + diff --git a/src/main/webapp/WEB-INF/views/cfg/fileTransfer/p2pList.jsp b/src/main/webapp/WEB-INF/views/cfg/fileTransfer/p2pList.jsp index d523f84dd..1f61043eb 100644 --- a/src/main/webapp/WEB-INF/views/cfg/fileTransfer/p2pList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/fileTransfer/p2pList.jsp @@ -439,7 +439,7 @@ - + diff --git a/src/main/webapp/WEB-INF/views/cfg/ipaddr/ipList.jsp b/src/main/webapp/WEB-INF/views/cfg/ipaddr/ipList.jsp index c2c6b6c17..f53633168 100644 --- a/src/main/webapp/WEB-INF/views/cfg/ipaddr/ipList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/ipaddr/ipList.jsp @@ -143,7 +143,7 @@ - + @@ -441,7 +441,7 @@ - + diff --git a/src/main/webapp/WEB-INF/views/cfg/mail/mailList.jsp b/src/main/webapp/WEB-INF/views/cfg/mail/mailList.jsp index 164e1c36f..006661914 100644 --- a/src/main/webapp/WEB-INF/views/cfg/mail/mailList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/mail/mailList.jsp @@ -445,7 +445,7 @@ - + diff --git a/src/main/webapp/WEB-INF/views/cfg/other/bgpList.jsp b/src/main/webapp/WEB-INF/views/cfg/other/bgpList.jsp index 0caee3318..3347ac1fa 100644 --- a/src/main/webapp/WEB-INF/views/cfg/other/bgpList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/other/bgpList.jsp @@ -446,7 +446,7 @@ - + diff --git a/src/main/webapp/WEB-INF/views/cfg/other/xmppList.jsp b/src/main/webapp/WEB-INF/views/cfg/other/xmppList.jsp index e4c6300e8..58d9c6efe 100644 --- a/src/main/webapp/WEB-INF/views/cfg/other/xmppList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/other/xmppList.jsp @@ -446,7 +446,7 @@ - + diff --git a/src/main/webapp/WEB-INF/views/cfg/proxy/control/httpRedirectList.jsp b/src/main/webapp/WEB-INF/views/cfg/proxy/control/httpRedirectList.jsp index 863c19ffe..d48a7b55a 100644 --- a/src/main/webapp/WEB-INF/views/cfg/proxy/control/httpRedirectList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/proxy/control/httpRedirectList.jsp @@ -712,7 +712,7 @@ - + diff --git a/src/main/webapp/WEB-INF/views/cfg/proxy/control/httpReqReplaceList.jsp b/src/main/webapp/WEB-INF/views/cfg/proxy/control/httpReqReplaceList.jsp index c9c2c3a06..93ab7df0d 100644 --- a/src/main/webapp/WEB-INF/views/cfg/proxy/control/httpReqReplaceList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/proxy/control/httpReqReplaceList.jsp @@ -343,7 +343,7 @@ - + - + - + diff --git a/src/main/webapp/WEB-INF/views/cfg/website/httpList.jsp b/src/main/webapp/WEB-INF/views/cfg/website/httpList.jsp index 2bbc9d595..eb482ae6c 100644 --- a/src/main/webapp/WEB-INF/views/cfg/website/httpList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/website/httpList.jsp @@ -602,7 +602,7 @@ - + diff --git a/src/main/webapp/WEB-INF/views/cfg/website/sslList.jsp b/src/main/webapp/WEB-INF/views/cfg/website/sslList.jsp index b62d87e5d..17cc4ddda 100644 --- a/src/main/webapp/WEB-INF/views/cfg/website/sslList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/website/sslList.jsp @@ -443,7 +443,7 @@ - + diff --git a/src/main/webapp/WEB-INF/views/cfg/whitelist/domainList.jsp b/src/main/webapp/WEB-INF/views/cfg/whitelist/domainList.jsp index 9c99b0c15..d08ac0455 100644 --- a/src/main/webapp/WEB-INF/views/cfg/whitelist/domainList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/whitelist/domainList.jsp @@ -444,7 +444,7 @@ - <%-- --%> + <%-- --%> diff --git a/src/main/webapp/WEB-INF/views/cfg/whitelist/ipList.jsp b/src/main/webapp/WEB-INF/views/cfg/whitelist/ipList.jsp index 4db4874d5..945d8e078 100644 --- a/src/main/webapp/WEB-INF/views/cfg/whitelist/ipList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/whitelist/ipList.jsp @@ -443,7 +443,7 @@ - <%-- --%> + <%-- --%> diff --git a/src/main/webapp/WEB-INF/views/report/list.jsp b/src/main/webapp/WEB-INF/views/report/list.jsp index a5349244c..73d1755c7 100644 --- a/src/main/webapp/WEB-INF/views/report/list.jsp +++ b/src/main/webapp/WEB-INF/views/report/list.jsp @@ -92,8 +92,8 @@ $(document).ready(function() { }); function getXlsxFileName() { var cfgName = $("[name=cfgName2]").val() + "_"; - if ("${bean.action}") { - var action = $("[name=action]").find('[value=' + "${bean.action}" + ']').text() + "_"; + if ("${bean.serviceId}") { + var action = $("[name=serviceId]").find('[value=' + "${bean.serviceId}" + ']').text() + "_"; } else { var action = ""; } @@ -142,9 +142,16 @@ var reportDate=0; var ajaxServiceLogTotal=function(){ var services=[]; var objs=[]; + var serviceIndex=0; $(".service").each(function(){ + if(serviceIndex%2==0){ + $(this).addClass("btn-primary"); + }else{ + $(this).addClass("btn-default"); + } objs.push($(this)); services.push($(this).data("service")); + serviceIndex++; }); var timeout=$.validator.messages.timeout; var failed=$.validator.messages.failed; @@ -195,7 +202,7 @@ var ajaxReport=function(url,target){ cache:false, url:'${ctx}'+url,// /report/ajaxNtcTagReport data:{ - "action":$('[name="action"]').val(), + "serviceId":$('[name="serviceId"]').val(), "reportType":$('[name="reportType"]').val(), "reportTime":$('[name="reportTime"]').val(), "functionId":$('[name="functionId"]').val() @@ -355,15 +362,13 @@ function customColumnClick(){
--%> + <%-- --%> diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appDomainCfgList.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appDomainCfgList.jsp index 92bdfcdfe..134752304 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appDomainCfgList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appDomainCfgList.jsp @@ -57,7 +57,7 @@

- +

@@ -420,7 +420,7 @@ - <%--
--%> + <%-- --%> diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appHeaderCfgList.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appHeaderCfgList.jsp index 8c9cc36e5..90cde6cb1 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appHeaderCfgList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appHeaderCfgList.jsp @@ -110,8 +110,7 @@

- <%-- --%> - +

@@ -482,7 +481,7 @@ - <%--
--%> + <%-- --%> diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appHttpCfgList.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appHttpCfgList.jsp index caa4a46b2..784c90e69 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appHttpCfgList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appHttpCfgList.jsp @@ -57,7 +57,7 @@

- +

@@ -428,7 +428,7 @@ - <%--
--%> + <%-- --%> diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appIpCfgList.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appIpCfgList.jsp index 2dc71bd31..685129e76 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appIpCfgList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appIpCfgList.jsp @@ -60,7 +60,7 @@

- +

@@ -418,7 +418,7 @@ - <%--
--%> + <%-- --%> diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appMultiFeatureCfgList.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appMultiFeatureCfgList.jsp index 4527eb0b5..70565a8e9 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appMultiFeatureCfgList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appMultiFeatureCfgList.jsp @@ -108,7 +108,7 @@

- +

@@ -365,7 +365,7 @@ - <%--
--%> + <%-- --%> diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appPolicyCfgList.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appPolicyCfgList.jsp index f56105a3c..457e473fe 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appPolicyCfgList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appPolicyCfgList.jsp @@ -102,7 +102,7 @@

- +

@@ -468,7 +468,7 @@ -
+ diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appSslCfgList.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appSslCfgList.jsp index c91f0ba94..269d4222b 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appSslCfgList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appSslCfgList.jsp @@ -57,7 +57,7 @@

- +

@@ -427,7 +427,7 @@ - <%--
--%> + <%-- --%> diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appTcpCfgList.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appTcpCfgList.jsp index 08496368b..eca71de5d 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appTcpCfgList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appTcpCfgList.jsp @@ -55,7 +55,7 @@

- +

@@ -326,7 +326,7 @@ -<%--
+<%-- --%> diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appTopicDomainCfgList.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appTopicDomainCfgList.jsp index 84ff2a652..c8c8e5084 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appTopicDomainCfgList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appTopicDomainCfgList.jsp @@ -54,7 +54,7 @@

- +

@@ -437,7 +437,7 @@ - <%--
--%> + <%-- --%> diff --git a/src/main/webapp/WEB-INF/views/cfg/av/contIp/contIpList.jsp b/src/main/webapp/WEB-INF/views/cfg/av/contIp/contIpList.jsp index b5b76a6df..ea58abaea 100644 --- a/src/main/webapp/WEB-INF/views/cfg/av/contIp/contIpList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/av/contIp/contIpList.jsp @@ -112,7 +112,7 @@

- +

@@ -499,7 +499,7 @@ -
+ diff --git a/src/main/webapp/WEB-INF/views/cfg/av/contUrl/contUrlList.jsp b/src/main/webapp/WEB-INF/views/cfg/av/contUrl/contUrlList.jsp index 615fea62e..ec6d86d06 100644 --- a/src/main/webapp/WEB-INF/views/cfg/av/contUrl/contUrlList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/av/contUrl/contUrlList.jsp @@ -110,7 +110,7 @@

- +

@@ -416,7 +416,7 @@ -
+ - + diff --git a/src/main/webapp/WEB-INF/views/cfg/av/picIp/picIpList.jsp b/src/main/webapp/WEB-INF/views/cfg/av/picIp/picIpList.jsp index cbcbc4f17..fef1e37fc 100644 --- a/src/main/webapp/WEB-INF/views/cfg/av/picIp/picIpList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/av/picIp/picIpList.jsp @@ -112,7 +112,7 @@

- +

@@ -500,7 +500,7 @@ -
+ diff --git a/src/main/webapp/WEB-INF/views/cfg/av/picUrl/picUrlList.jsp b/src/main/webapp/WEB-INF/views/cfg/av/picUrl/picUrlList.jsp index aae8fd482..4a15b2b1d 100644 --- a/src/main/webapp/WEB-INF/views/cfg/av/picUrl/picUrlList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/av/picUrl/picUrlList.jsp @@ -111,7 +111,7 @@

- +

@@ -418,7 +418,7 @@ -
+ - + diff --git a/src/main/webapp/WEB-INF/views/cfg/av/voip/voipList.jsp b/src/main/webapp/WEB-INF/views/cfg/av/voip/voipList.jsp index 2d5d4618a..d6c28f047 100644 --- a/src/main/webapp/WEB-INF/views/cfg/av/voip/voipList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/av/voip/voipList.jsp @@ -118,7 +118,7 @@

- +

@@ -466,7 +466,7 @@ -
+ diff --git a/src/main/webapp/WEB-INF/views/cfg/basicprotocol/list.jsp b/src/main/webapp/WEB-INF/views/cfg/basicprotocol/list.jsp index ab3ad752c..b641f38d6 100644 --- a/src/main/webapp/WEB-INF/views/cfg/basicprotocol/list.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/basicprotocol/list.jsp @@ -105,7 +105,7 @@

- +

@@ -471,7 +471,7 @@ -
+ diff --git a/src/main/webapp/WEB-INF/views/cfg/common/ipList.jsp b/src/main/webapp/WEB-INF/views/cfg/common/ipList.jsp index 7929a3043..33dfb3ea1 100644 --- a/src/main/webapp/WEB-INF/views/cfg/common/ipList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/common/ipList.jsp @@ -117,7 +117,7 @@

- +

@@ -492,7 +492,7 @@ - <%--
--%> + <%-- --%> diff --git a/src/main/webapp/WEB-INF/views/cfg/encryptedtunnelbehav/list.jsp b/src/main/webapp/WEB-INF/views/cfg/encryptedtunnelbehav/list.jsp index f599d0f2a..b6d1f1cb8 100644 --- a/src/main/webapp/WEB-INF/views/cfg/encryptedtunnelbehav/list.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/encryptedtunnelbehav/list.jsp @@ -102,7 +102,7 @@

- +

@@ -468,7 +468,7 @@ -
+ From 47f39dfc9906dddf344fbeee834469d62b118041 Mon Sep 17 00:00:00 2001 From: duandongmei Date: Sun, 30 Sep 2018 11:36:09 +0800 Subject: [PATCH 25/25] =?UTF-8?q?=E4=B8=9A=E5=8A=A1=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E6=A0=87=E9=A2=98=E4=B8=8E=E8=8F=9C=E5=8D=95=E5=90=8D=E7=A7=B0?= =?UTF-8?q?=E4=BF=9D=E6=8C=81=E4=B8=80=E8=87=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/nis/domain/configuration/BaseCfg.java | 39 ++++++++++ .../cfg/app/appBuiltinFeatureFileForm.jsp | 6 +- .../cfg/app/appBuiltinFeatureFileList.jsp | 2 +- .../WEB-INF/views/cfg/app/appByteCfgForm.jsp | 6 +- .../views/cfg/app/appDomainCfgForm.jsp | 6 +- .../views/cfg/app/appHeaderCfgForm.jsp | 11 +-- .../WEB-INF/views/cfg/app/appHttpCfgForm.jsp | 6 +- .../WEB-INF/views/cfg/app/appIpCfgForm.jsp | 6 +- .../views/cfg/app/appMultiFeatureCfgForm.jsp | 6 +- .../views/cfg/app/appPolicyCfgForm.jsp | 6 +- .../WEB-INF/views/cfg/app/appSslCfgForm.jsp | 6 +- .../WEB-INF/views/cfg/app/appTcpCfgForm.jsp | 6 +- .../views/cfg/app/appTopicDomainCfgForm.jsp | 6 +- .../views/cfg/av/contIp/contIpForm.jsp | 6 +- .../views/cfg/av/contUrl/contUrlForm.jsp | 6 +- .../WEB-INF/views/cfg/av/fileSampleForm.jsp | 10 +-- .../WEB-INF/views/cfg/av/picIp/picIpForm.jsp | 6 +- .../views/cfg/av/picUrl/picUrlForm.jsp | 6 +- .../WEB-INF/views/cfg/av/signSampleForm.jsp | 10 +-- .../WEB-INF/views/cfg/av/switchSignSample.jsp | 6 +- .../views/cfg/av/voip/voipForm.jsp.bak | 22 +++--- .../views/cfg/av/voip/voipList.jsp.bak | 74 +++++++++---------- .../WEB-INF/views/cfg/basicprotocol/form.jsp | 6 +- .../WEB-INF/views/cfg/common/domainForm.jsp | 6 +- .../WEB-INF/views/cfg/common/domainList.jsp | 4 +- .../WEB-INF/views/cfg/common/ipForm.jsp | 6 +- .../views/cfg/encryptedtunnelbehav/form.jsp | 6 +- .../views/cfg/intercept/interceptForm.jsp | 14 +--- .../views/cfg/intercept/interceptList.jsp | 2 +- 29 files changed, 158 insertions(+), 144 deletions(-) diff --git a/src/main/java/com/nis/domain/configuration/BaseCfg.java b/src/main/java/com/nis/domain/configuration/BaseCfg.java index 8eae2e6f8..d8e679dfe 100644 --- a/src/main/java/com/nis/domain/configuration/BaseCfg.java +++ b/src/main/java/com/nis/domain/configuration/BaseCfg.java @@ -15,8 +15,12 @@ import com.fasterxml.jackson.annotation.JsonFormat; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; import com.nis.domain.BaseEntity; +import com.nis.domain.SysMenu; import com.nis.util.Constants; +import com.nis.util.StringUtil; +import com.nis.util.StringUtils; import com.nis.util.excel.ExcelField; +import com.nis.web.security.UserUtils; /** * @ClassName: BaseConfig.java @@ -196,6 +200,14 @@ public class BaseCfg extends BaseEntity implements Cloneable{ * 菜单ID */ protected Integer functionId; + /** + * 菜单权限 + */ + protected String permission; + /** + * 菜单权限 + */ + protected String menuNameCode; /** * do_log属性在界面(do_log:0不需要1记录所有日志2只记录结构化日志。默认是2) @@ -250,6 +262,33 @@ public class BaseCfg extends BaseEntity implements Cloneable{ */ public void setFunctionId(Integer functionId) { this.functionId = functionId; + if(!StringUtil.isEmpty(functionId) && StringUtil.isEmpty(this.menuNameCode)){ + List list = UserUtils.getMenuList(); + if(!StringUtil.isEmpty(list)) { + for (SysMenu menu :list) { + if (!StringUtil.isEmpty(menu.getCode()) && !StringUtil.isEmpty(menu.getFunctionId()) &&menu.getFunctionId().equals(functionId)) { + this.setMenuNameCode(menu.getCode()); + + } + + } + } + } + + } + + public String getMenuNameCode() { + return menuNameCode; + } + public void setMenuNameCode(String menuNameCode) { + this.menuNameCode = menuNameCode; + } + + public String getPermission() { + return permission; + } + public void setPermission(String permission) { + this.permission = permission; } /** * cfgId diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appBuiltinFeatureFileForm.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appBuiltinFeatureFileForm.jsp index df3944a5b..ac6105980 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appBuiltinFeatureFileForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appBuiltinFeatureFileForm.jsp @@ -40,9 +40,9 @@ $(function(){
-<%--

- -

--%> +

+ +

diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appBuiltinFeatureFileList.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appBuiltinFeatureFileList.jsp index d206e45af..f0d6d4215 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appBuiltinFeatureFileList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appBuiltinFeatureFileList.jsp @@ -46,7 +46,7 @@

- +

diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appByteCfgForm.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appByteCfgForm.jsp index 47b656bf7..73fe1e8f7 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appByteCfgForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appByteCfgForm.jsp @@ -46,9 +46,9 @@ $(function(){
-<%--

- -

--%> +

+ +

diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appDomainCfgForm.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appDomainCfgForm.jsp index da881696a..76be9cc4c 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appDomainCfgForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appDomainCfgForm.jsp @@ -47,9 +47,9 @@ $(function(){
-<%--

- -

--%> +

+ +

diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appHeaderCfgForm.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appHeaderCfgForm.jsp index 73793adcd..68f83f8bf 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appHeaderCfgForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appHeaderCfgForm.jsp @@ -61,14 +61,9 @@ $(function(){
-<%--

- - - - - - -

--%> +

+ +

diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appHttpCfgForm.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appHttpCfgForm.jsp index 26c1a8352..a00ef0c6d 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appHttpCfgForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appHttpCfgForm.jsp @@ -61,9 +61,9 @@ $(function(){
-<%--

- -

--%> +

+ +

diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appIpCfgForm.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appIpCfgForm.jsp index 05acea677..d7c552f34 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appIpCfgForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appIpCfgForm.jsp @@ -28,9 +28,9 @@ $(function(){
-<%--

- -

--%> +

+ +

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 b5899a909..c612de0b6 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appMultiFeatureCfgForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appMultiFeatureCfgForm.jsp @@ -98,9 +98,9 @@ var delContent = function(contentClassName, addBtnClassName) { -<%--

- -

--%> +

+ +

diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appPolicyCfgForm.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appPolicyCfgForm.jsp index e727d3c10..1ee80e58d 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appPolicyCfgForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appPolicyCfgForm.jsp @@ -167,9 +167,9 @@ var delContent = function(contentClassName, addBtnClassName) {
-<%--

- -

--%> +

+ +

diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appSslCfgForm.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appSslCfgForm.jsp index afcae4c79..b472b80b8 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appSslCfgForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appSslCfgForm.jsp @@ -61,9 +61,9 @@ $(function(){
-<%--

- -

--%> +

+ +

diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appTcpCfgForm.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appTcpCfgForm.jsp index 726222400..11c353bc7 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appTcpCfgForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appTcpCfgForm.jsp @@ -55,9 +55,9 @@ $(function(){
-<%--

- -

--%> +

+ +

diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appTopicDomainCfgForm.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appTopicDomainCfgForm.jsp index 0229183c1..7d971563b 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appTopicDomainCfgForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appTopicDomainCfgForm.jsp @@ -144,9 +144,9 @@ $(function(){
-<%--

- -

--%> +

+ +

diff --git a/src/main/webapp/WEB-INF/views/cfg/av/contIp/contIpForm.jsp b/src/main/webapp/WEB-INF/views/cfg/av/contIp/contIpForm.jsp index 3111d220d..ac8152714 100644 --- a/src/main/webapp/WEB-INF/views/cfg/av/contIp/contIpForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/av/contIp/contIpForm.jsp @@ -64,9 +64,9 @@ var delContent = function(contentClassName, addBtnClassName) {
-<%--

- -

--%> +

+ +

diff --git a/src/main/webapp/WEB-INF/views/cfg/av/contUrl/contUrlForm.jsp b/src/main/webapp/WEB-INF/views/cfg/av/contUrl/contUrlForm.jsp index d0ee77f83..9439ea63f 100644 --- a/src/main/webapp/WEB-INF/views/cfg/av/contUrl/contUrlForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/av/contUrl/contUrlForm.jsp @@ -96,9 +96,9 @@ var delContent = function(contentClassName, addBtnClassName) {
-<%--

- -

--%> +

+ +

diff --git a/src/main/webapp/WEB-INF/views/cfg/av/fileSampleForm.jsp b/src/main/webapp/WEB-INF/views/cfg/av/fileSampleForm.jsp index ce8e3aa11..c48181289 100644 --- a/src/main/webapp/WEB-INF/views/cfg/av/fileSampleForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/av/fileSampleForm.jsp @@ -100,13 +100,9 @@ function hiddenlevel(){
-<%--

- - - - - -

--%> +

+ +

diff --git a/src/main/webapp/WEB-INF/views/cfg/av/picIp/picIpForm.jsp b/src/main/webapp/WEB-INF/views/cfg/av/picIp/picIpForm.jsp index b74f1512c..440085c7e 100644 --- a/src/main/webapp/WEB-INF/views/cfg/av/picIp/picIpForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/av/picIp/picIpForm.jsp @@ -65,9 +65,9 @@ var delContent = function(contentClassName, addBtnClassName) {
-<%--

- -

--%> +

+ +

diff --git a/src/main/webapp/WEB-INF/views/cfg/av/picUrl/picUrlForm.jsp b/src/main/webapp/WEB-INF/views/cfg/av/picUrl/picUrlForm.jsp index a3aa6ea9a..ffabccdfe 100644 --- a/src/main/webapp/WEB-INF/views/cfg/av/picUrl/picUrlForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/av/picUrl/picUrlForm.jsp @@ -88,9 +88,9 @@ var delContent = function(contentClassName, addBtnClassName) {
- <%--

- -

--%> +

+ +

diff --git a/src/main/webapp/WEB-INF/views/cfg/av/signSampleForm.jsp b/src/main/webapp/WEB-INF/views/cfg/av/signSampleForm.jsp index a1e13513d..509e69711 100644 --- a/src/main/webapp/WEB-INF/views/cfg/av/signSampleForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/av/signSampleForm.jsp @@ -75,13 +75,9 @@ function hiddenlevel(){
-<%--

- - - - - -

--%> +

+ +

diff --git a/src/main/webapp/WEB-INF/views/cfg/av/switchSignSample.jsp b/src/main/webapp/WEB-INF/views/cfg/av/switchSignSample.jsp index 09d49cdff..c52fcfb8d 100644 --- a/src/main/webapp/WEB-INF/views/cfg/av/switchSignSample.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/av/switchSignSample.jsp @@ -63,11 +63,7 @@ $(function(){

- - <%-- - - - --%> +

diff --git a/src/main/webapp/WEB-INF/views/cfg/av/voip/voipForm.jsp.bak b/src/main/webapp/WEB-INF/views/cfg/av/voip/voipForm.jsp.bak index 991995a81..98ade2dae 100644 --- a/src/main/webapp/WEB-INF/views/cfg/av/voip/voipForm.jsp.bak +++ b/src/main/webapp/WEB-INF/views/cfg/av/voip/voipForm.jsp.bak @@ -40,16 +40,16 @@ var flag = true; var subscribeId=0; - //存在隐藏的subscribeId,不算进域配置 + //瀛樺湪闅愯棌鐨剆ubscribeId锛屼笉绠楄繘鍩熼厤缃� if($(".boxSolid.hidden").hasClass("subscribeId")){ subscribeId=1; } - //代表所有业务都隐藏了,提示必须增加一种业务数据 + //浠h〃鎵�鏈変笟鍔¢兘闅愯棌浜嗭紝鎻愮ず蹇呴』澧炲姞涓�绉嶄笟鍔℃暟鎹� if(($(".boxSolid").length - 1) == ($(".boxSolid.hidden").length - subscribeId)){ top.$.jBox.tip("", ""); return; } - //代表所有区域都隐藏了,提示必须增加个区域信息 + //浠h〃鎵�鏈夊尯鍩熼兘闅愯棌浜嗭紝鎻愮ず蹇呴』澧炲姞涓尯鍩熶俊鎭� if($("input[name='isAreaEffective']:checked").val()==1 && $(".container-fluid:visible").size()==0){ if($("#areaIsp").hasClass("hidden")) $("#areaIp").find(".glyphicon-plus").click(); if($("#areaIp").hasClass("hidden")) $("#areaIsp").find(".glyphicon-plus").click(); @@ -65,10 +65,10 @@ flag = false; } }) - //keywords非空校验完成校验二进制字符串 + //keywords闈炵┖鏍¢獙瀹屾垚鏍¢獙浜岃繘鍒跺瓧绗︿覆 $(".boxSolid:visible").find("select[name$='isHexbin']").each(function(){ var isHexbin=$(this).val(); - if(isHexbin == 1){ //十六进制 + if(isHexbin == 1){ //鍗佸叚杩涘埗 var keywords=$("input[name$='"+$(this).attr("name").replace("isHexbin","cfgKeywords")+"']").val(); keywords=keywords.replace("***and***","") if(keywords != ''){ @@ -87,7 +87,7 @@ flag=flag1; } if(flag){ - //将disable属性的元素删除 + //灏哾isable灞炴�х殑鍏冪礌鍒犻櫎 $(".disabled").each(function(){ $(this).remove(); }); @@ -101,14 +101,14 @@ }, errorContainer : "#messageBox", }); - //业务内容增加 + //涓氬姟鍐呭澧炲姞 /* $("span[title='add']").on("click", function() { $(".ipPort0").removeClass("hidden"); }); */ }); - //业务窗口打开 + //涓氬姟绐楀彛鎵撳紑 var addContent = function(obj, contentClassName) { var showDiv = $(obj).parent().parent().next(); $(showDiv).removeClass("hidden").removeClass( @@ -119,7 +119,7 @@ $(obj).addClass("hidden"); } - //业务窗口关闭 + //涓氬姟绐楀彛鍏抽棴 var delContent = function(contentClassName, addBtnClassName) { $("." + contentClassName).addClass("hidden").addClass("disabled"); /* $("."+contentClassName).find("input,select").each(function(){ @@ -134,7 +134,7 @@

- +

@@ -174,7 +174,7 @@
- +
diff --git a/src/main/webapp/WEB-INF/views/cfg/av/voip/voipList.jsp.bak b/src/main/webapp/WEB-INF/views/cfg/av/voip/voipList.jsp.bak index bd48b17b4..22d7bbb97 100644 --- a/src/main/webapp/WEB-INF/views/cfg/av/voip/voipList.jsp.bak +++ b/src/main/webapp/WEB-INF/views/cfg/av/voip/voipList.jsp.bak @@ -22,7 +22,7 @@
"+$.validator.messages.ip_type+""+$.validator.messages.ip_pattern+"
${cfg.creatorName } ${cfg.editorName }
${cfg.creatorName } ${cfg.editorName }
${cfg.creatorName } ${cfg.editorName }
${cfg.creatorName } ${cfg.editorName }
${cfg.creatorName } ${cfg.editorName }
${cfg.creatorName } ${cfg.editorName }
${cfg.creatorName } ${cfg.editorName }
${cfg.creatorName } ${cfg.editorName }
${cfg.creatorName } ${cfg.editorName }
${cfg.creatorName } ${cfg.editorName }
${indexCfg.creatorName } ${indexCfg.editorName }
${cfg.creatorName } ${cfg.editorName }
diff --git a/src/main/webapp/WEB-INF/views/cfg/av/fileSampleList.jsp b/src/main/webapp/WEB-INF/views/cfg/av/fileSampleList.jsp index 4a64476e5..ff164c673 100644 --- a/src/main/webapp/WEB-INF/views/cfg/av/fileSampleList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/av/fileSampleList.jsp @@ -404,7 +404,7 @@
${cfg.creatorName } ${cfg.editorName }
${cfg.creatorName } ${cfg.editorName }
diff --git a/src/main/webapp/WEB-INF/views/cfg/av/signSampleList.jsp b/src/main/webapp/WEB-INF/views/cfg/av/signSampleList.jsp index b249af92a..29c632d69 100644 --- a/src/main/webapp/WEB-INF/views/cfg/av/signSampleList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/av/signSampleList.jsp @@ -415,7 +415,7 @@
${cfg.creatorName } ${cfg.editorName }
${indexCfg.creatorName } ${indexCfg.editorName }
${cfg.creatorName } ${cfg.editorName }
${cfg.creatorName } ${cfg.editorName }
${cfg.creatorName } ${cfg.editorName }
${cfg.creatorName } ${cfg.editorName }
${cfg.creatorName } ${cfg.editorName }
${indexCfg.creatorName } ${indexCfg.editorName }
${indexCfg.creatorName } ${indexCfg.editorName }
${indexCfg.creatorName } ${indexCfg.editorName }
${indexCfg.creatorName } ${indexCfg.editorName }
${indexCfg.creatorName } ${indexCfg.editorName }
${indexCfg.creatorName } ${indexCfg.editorName }
${indexCfg.creatorName } ${indexCfg.editorName }
${indexCfg.creatorName }
diff --git a/src/main/webapp/WEB-INF/views/cfg/proxy/control/httpResReplaceList.jsp b/src/main/webapp/WEB-INF/views/cfg/proxy/control/httpResReplaceList.jsp index 52a1e9644..c2476973a 100644 --- a/src/main/webapp/WEB-INF/views/cfg/proxy/control/httpResReplaceList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/proxy/control/httpResReplaceList.jsp @@ -346,7 +346,7 @@
diff --git a/src/main/webapp/WEB-INF/views/cfg/website/dnsList.jsp b/src/main/webapp/WEB-INF/views/cfg/website/dnsList.jsp index 66efa84a6..58539f27b 100644 --- a/src/main/webapp/WEB-INF/views/cfg/website/dnsList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/website/dnsList.jsp @@ -450,7 +450,7 @@
${indexCfg.creatorName } ${indexCfg.editorName }
${indexCfg.creatorName } ${indexCfg.editorName }
${indexCfg.creatorName } ${indexCfg.editorName }
${indexCfg.creatorName } ${indexCfg.editorName }
${indexCfg.creatorName } ${indexCfg.editorName }
${cfg.creatorName } ${cfg.editorName }
${cfg.creatorName } ${cfg.editorName }
${cfg.creatorName } ${cfg.editorName }
${cfg.creatorName } ${cfg.editorName }
${cfg.creatorName } ${cfg.editorName }
${cfg.creatorName } ${cfg.editorName }
${cfg.creatorName } ${cfg.editorName }
${cfg.creatorName } ${cfg.editorName }
${cfg.creatorName } ${cfg.editorName }
${cfg.creatorName } ${cfg.editorName }
${cfg.creatorName } ${cfg.editorName }
diff --git a/src/main/webapp/WEB-INF/views/cfg/av/fileSampleList.jsp b/src/main/webapp/WEB-INF/views/cfg/av/fileSampleList.jsp index 4a64476e5..1b0cc6419 100644 --- a/src/main/webapp/WEB-INF/views/cfg/av/fileSampleList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/av/fileSampleList.jsp @@ -61,7 +61,7 @@

- +

@@ -404,7 +404,7 @@
${cfg.creatorName } ${cfg.editorName }
${cfg.creatorName } ${cfg.editorName }
diff --git a/src/main/webapp/WEB-INF/views/cfg/av/signSampleList.jsp b/src/main/webapp/WEB-INF/views/cfg/av/signSampleList.jsp index b249af92a..cbd09113d 100644 --- a/src/main/webapp/WEB-INF/views/cfg/av/signSampleList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/av/signSampleList.jsp @@ -67,7 +67,7 @@

- +

@@ -415,7 +415,7 @@
${cfg.creatorName } ${cfg.editorName }
${indexCfg.creatorName } ${indexCfg.editorName }
${cfg.creatorName } ${cfg.editorName }
${cfg.creatorName } ${cfg.editorName }
${cfg.creatorName } ${cfg.editorName }