From 7ab1a381317d4f6392c6261e4328769d8f23f68b Mon Sep 17 00:00:00 2001 From: leijun Date: Wed, 28 Nov 2018 19:06:14 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E7=94=A8=E6=88=B7=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E6=A8=A1=E5=9D=97=201=E3=80=81=E8=B0=83=E6=95=B4=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E5=AD=97=E6=AE=B5=E6=9F=A5=E8=AF=A2=E5=8F=8A=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E9=A1=B5=E9=9D=A2=202=E3=80=81=E5=A2=9E=E5=8A=A0cgi?= =?UTF-8?q?=20=E6=8E=A5=E5=8F=A3=E8=AF=B7=E6=B1=82=20=E8=B0=83=E6=95=B4htt?= =?UTF-8?q?p=20url=E6=A3=80=E7=B4=A2=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../nis/util/httpclient/HttpClientUtil.java | 49 +++++ .../maintenance/UserManageController.java | 11 +- .../configuration/UserManageService.java | 128 +++++++---- .../messages/message_zh_CN.properties | 16 +- .../cfg/maintenance/userManage/addIpModal.jsp | 69 ++++++ .../views/cfg/maintenance/userManage/list.jsp | 201 ++++-------------- .../views/cfg/whitelist/domainList.jsp | 4 +- 7 files changed, 259 insertions(+), 219 deletions(-) create mode 100644 src/main/webapp/WEB-INF/views/cfg/maintenance/userManage/addIpModal.jsp diff --git a/src/main/java/com/nis/util/httpclient/HttpClientUtil.java b/src/main/java/com/nis/util/httpclient/HttpClientUtil.java index 97442a0d3..68d9565e4 100644 --- a/src/main/java/com/nis/util/httpclient/HttpClientUtil.java +++ b/src/main/java/com/nis/util/httpclient/HttpClientUtil.java @@ -373,4 +373,53 @@ public class HttpClientUtil { // // } + /** + * CGI get 获取消息 + * @param destUrl 业务地址 + * @param params 参数列表 + * @return 查询结果数据json + */ + public static String getCGI(String destUrl, Map params, HttpServletRequest req) throws IOException { + String result = null; + Response response=null; + String url = ""; + try { + URIBuilder uriBuilder = new URIBuilder(destUrl); + if(params!=null) { + for (String param : params.keySet()) { + if(!StringUtil.isBlank(param)&¶ms.get(param)!=null) { + uriBuilder.addParameter(param, params.get(param).toString()); + } + } + } + System.err.println(uriBuilder); + url=uriBuilder.toString(); + //创建连接 + WebTarget wt = ClientUtil.getWebTarger(url); + logger.info("getMsg url:"+url); + //获取响应结果 + Builder header = wt.request(MediaType.APPLICATION_JSON).header("Content-Type", MediaType.APPLICATION_JSON); + response= header.get(); + int status = response.getStatus(); + if (status == HttpStatus.SC_OK) { + result= response.readEntity(String.class); + result = galaxyMessageFormat(result); + logger.info("获取消息成功,相应内容如下: " + result); + + } else { + logger.error("获取消息失败,相应内容如下: " + result); + throw new MaatConvertException(status+""); + } + } catch (Exception e) { + e.printStackTrace(); + logger.error("获取消息失败,相应内容如下: " + result); + logger.error("获取消息失败 ", e); + throw new MaatConvertException(":"); + }finally { + if (response != null) { + response.close(); + } + } + return result; + } } diff --git a/src/main/java/com/nis/web/controller/configuration/maintenance/UserManageController.java b/src/main/java/com/nis/web/controller/configuration/maintenance/UserManageController.java index d3f0728f3..df0b54fcb 100644 --- a/src/main/java/com/nis/web/controller/configuration/maintenance/UserManageController.java +++ b/src/main/java/com/nis/web/controller/configuration/maintenance/UserManageController.java @@ -57,9 +57,9 @@ public class UserManageController extends BaseController{ @RequiresPermissions(value={"user:manage:config"}) public String delete(Integer isValid ,String ids - ,RedirectAttributes redirectAttributes){ + ,RedirectAttributes redirectAttributes,HttpServletRequest request){ try{ - userManageService.delete(isValid,ids); + userManageService.delete(isValid,ids,request); addMessage(redirectAttributes,"delete_success"); }catch(Exception e){ logger.error("Delete failed",e); @@ -151,17 +151,16 @@ public class UserManageController extends BaseController{ UserManage user=new UserManage(); IpReuseIpCfg ipReuseIpCfg=ipReuseIpCfgService.getIpByIp(ip); //根据ip调用接口获取数据 - //user=userManageService.getUserList(ip, request); + //user=userManageService.getUser(ip, request); if(ipReuseIpCfg!=null){ user.setServerIp(ipReuseIpCfg.getDestIpAddress()); - user.setRemarks(ipReuseIpCfg.getCfgDesc()); userManageList.add(user); } } return userManageList; } - @RequestMapping(value = "view") +/* @RequestMapping(value = "view") @RequiresPermissions(value={"user:manage:config"}) public String view(String serverIp,String userName,HttpServletResponse response,Model model){ UserManage user=new UserManage(); @@ -174,5 +173,5 @@ public class UserManageController extends BaseController{ } model.addAttribute("user", user); return "/cfg/maintenance/userManage/userView"; - } + }*/ } diff --git a/src/main/java/com/nis/web/service/configuration/UserManageService.java b/src/main/java/com/nis/web/service/configuration/UserManageService.java index 6da3f6346..6de5cb043 100644 --- a/src/main/java/com/nis/web/service/configuration/UserManageService.java +++ b/src/main/java/com/nis/web/service/configuration/UserManageService.java @@ -65,19 +65,29 @@ public class UserManageService extends BaseService{ entity.setCreatorId(entity.getCurrentUser().getId()); entity.setIsValid(Constants.VALID_NO); userManageDao.insert(entity); - } catch (MaatConvertException e) { - e.printStackTrace(); - logger.info("获取编译ID出错"); - throw new MaatConvertException(""); - } //cgi接口添加 /*String[] ipArray = entity.getServerIp().split(","); for(String ip :ipArray){ //循环调用接口增加 + Map params = new HashMap(); + params.put("server_ip", ip); + params.put("user_name", entity.getUserName()); + params.put("user_pwd", entity.getUserPwd()); + LogRecvData fromJson=getUrl(params,Constants.NTC_IP_REUSE_USER_CREATE,request); + //返回处理 + if (fromJson.getStatus().intValue() == 200) { + }else{ + } String url="?cmd=UserCreate&server_ip="+ip+"&user_name="+entity.getUserName()+"&user_pwd="+entity.getUserPwd(); System.out.println(url); - }*/ + }*/ + } catch (MaatConvertException e) { + e.printStackTrace(); + logger.info("获取编译ID出错"); + throw new MaatConvertException(""); + } }else{ + try { entity.setEditTime(createTime); entity.setEditorId(entity.getCurrentUser().getId()); //获取修改之前数据 @@ -87,8 +97,14 @@ public class UserManageService extends BaseService{ /*String[] ipArray = olduser.getServerIp().split(","); for(String ip :ipArray){ //循环调用接口删除 - String url="?cmd=UserDelete&server_ip="+ip+"&user_name="+olduser.getUserName(); - System.out.println(url); + Map params = new HashMap(); + params.put("server_ip", ip); + params.put("user_name", olduser.getUserName()); + LogRecvData fromJson=getUrl(params,Constants.NTC_IP_REUSE_USER_DELETE,request); + //返回处理 + if (fromJson.getStatus().intValue() == 200) { + }else{ + } }*/ if(StringUtil.isEmpty(entity.getUserName())){ entity.setUserName(olduser.getUserName()); @@ -96,59 +112,65 @@ public class UserManageService extends BaseService{ if(StringUtil.isEmpty(entity.getUserPwd())){ entity.setUserPwd(olduser.getUserPwd()); } - /*String[] newIpArray = entity.getServerIp().split(","); + /* String[] newIpArray = entity.getServerIp().split(","); for(String newIp :newIpArray){ //循环调用接口添加 - String url="?cmd=UserCreate&server_ip="+newIp+"&user_name="+entity.getUserName()+"&user_pwd="+entity.getUserPwd(); - System.out.println(url); - }*/ + Map params = new HashMap(); + params.put("server_ip", newIp); + params.put("user_name", entity.getUserName()); + params.put("user_pwd", entity.getUserPwd()); + LogRecvData fromJson=getUrl(params,Constants.NTC_IP_REUSE_USER_CREATE,request); + //返回处理 + if (fromJson.getStatus().intValue() == 200) { + }else{ + } + }*/ + }catch (Exception e) { + e.printStackTrace(); + logger.info("获取编译ID出错"); + throw new MaatConvertException(""); + } + } + } + public LogRecvData getUrl(Map params,String urlType,HttpServletRequest request){ + LogRecvData fromJson = new LogRecvData(); + try{ + String url ="URL"+ urlType ; + String recv = HttpClientUtil.getCGI(url, params, request); + logger.info("查询结果:" + recv); + if (StringUtils.isNotBlank(recv)) { + Gson gson = new GsonBuilder().create(); + fromJson = gson.fromJson(recv, new TypeToken>(){}.getType()); + } + } catch (Exception e) { + logger.error("查询失败", e); } + return fromJson; } - //根据vpn服务器ip获取用户vpn服务器ip信息 +/* //根据vpn服务器ip获取用户vpn服务器ip信息 public UserManage getUser(String serverIp,HttpServletRequest request){ UserManage user=new UserManage(); Map params = new HashMap(); params.put("server_ip", serverIp); try{ - String url ="URL"+ Constants.NTC_IP_REUSE_USER_LIST; - String recv = HttpClientUtil.getMsg(url, params, request); + String url ="URL"+ Constants.NTC_IP_REUSE_USER_LIST ; + //String recv = HttpClientUtil.getCGI(url, params, request); + String recv="{\"data\":{\"list\":[{\"userName\":\"zhangsan\",\"createOn\":\"2018-11-01 14:51:12 \",\"updatedOn\":\"2018-11-02 10:54:07 \",\"outgoingUnicastPackets\":\"537,962\",\"outgoingUnicastTotalSize\":\"278,885\",\"outgoingBroadcastPackets\":\"51,130,890\"" + + ",\"outgoingBroadcastTotalSize\":\"4781,154\",\"incomingUnicastPackets\":\"454,121\",\"incomingUnicastTotalSize\":\"45,565\",\"incomingBroadcastPackets\":\"454,4545\"" + + ",\"incomingBroadcastTotalSize\":\"4781,154\",\"numberOfLogins\":\"124\"}]}}"; + recv=HttpClientUtil.galaxyMessageFormat(recv); logger.info("查询结果:" + recv); if (StringUtils.isNotBlank(recv)) { Gson gson = new GsonBuilder().create(); LogRecvData fromJson = gson.fromJson(recv, new TypeToken>(){}.getType()); - if (fromJson.getStatus().intValue() == 200) { - - } + user=fromJson.getData().getList().get(0); } } catch (Exception e) { logger.error("查询失败", e); } return user; - } - - //根据vpn服务器ip,用户名获取用户信息 - public UserManage getUserManage(String serverIp,String userName,HttpServletRequest request){ - UserManage user=new UserManage(); - Map params = new HashMap(); - params.put("server_ip", serverIp); - params.put("user_name", userName); - try{ - String url ="URL"+ Constants.NTC_IP_REUSE_USER_GET; - String recv = HttpClientUtil.getMsg(url, params, request); - logger.info("查询结果:" + recv); - if (StringUtils.isNotBlank(recv)) { - Gson gson = new GsonBuilder().create(); - LogRecvData fromJson = gson.fromJson(recv, new TypeToken>(){}.getType()); - if (fromJson.getStatus().intValue() == 200) { - - } - } - } catch (Exception e) { - logger.error("查询失败", e); - } - return user; - } + }*/ /** * * @param isAudit @@ -156,7 +178,8 @@ public class UserManageService extends BaseService{ * @param ids compileIds */ @Transactional(readOnly=false,rollbackFor=RuntimeException.class) - public void delete(Integer isValid,String ids){ + public void delete(Integer isValid,String ids,HttpServletRequest request){ + /*try{*/ String[] idArray = ids.split(","); List userList=new ArrayList(); for(String id :idArray){ @@ -172,16 +195,27 @@ public class UserManageService extends BaseService{ userManageDao.update(entity); } //cgi接口删除旧数据 - for (int i = 0; i < userList.size(); i++) { +/* for (int i = 0; i < userList.size(); i++) { String[] ipArray = userList.get(i).getServerIp().split(","); for(String ip :ipArray){ //循环调用接口删除 - String url="?cmd=UserDelete&server_ip="+ip+"&user_name="+userList.get(i).getUserName(); - System.out.println(url); + Map params = new HashMap(); + params.put("server_ip", ip); + params.put("user_name",userList.get(i).getUserName()); + LogRecvData fromJson=getUrl(params,Constants.NTC_IP_REUSE_USER_DELETE,request); + //返回处理 + if (fromJson.getStatus().intValue() == 200) { + }else{ + } } } - } + } catch (Exception e) { + logger.error("查询失败", e); + }*/ + } + public List findUsers() { return userManageDao.findUsers(); } } + diff --git a/src/main/resources/messages/message_zh_CN.properties b/src/main/resources/messages/message_zh_CN.properties index b65141967..27e3adcc3 100644 --- a/src/main/resources/messages/message_zh_CN.properties +++ b/src/main/resources/messages/message_zh_CN.properties @@ -1319,14 +1319,14 @@ transfer_bytes=\u4F20\u8F93\u6570\u636E\u5B57\u8282 user_info=\u7528\u6237\u4FE1\u606F user_list=\u7528\u6237\u5217\u8868 equal_password=\u5BC6\u7801\u4E0D\u4E00\u81F4\uFF01 -outgoing_unicast_packets=\u8F93\u51FA\u5355\u5305 -outgoing_unicast_total_size=\u8F93\u51FA\u5355\u64AD\u603B\u5927\u5C0F -outgoing_broadcast_packets=\u8F93\u51FA\u5E7F\u64AD\u6570\u636E\u5305 -outgoing_broadcast_total_size=\u8F93\u51FA\u5E7F\u64AD\u603B\u5927\u5C0F -incoming_unicast_packets=\u8F93\u5165\u5355\u5305 -incoming_unicast_total_size=\u8F93\u5165\u5355\u64AD\u603B\u5927\u5C0F -incoming_broadcast_packets=\u8F93\u5165\u5E7F\u64AD\u6570\u636E\u5305 -incoming_broadcast_total_size=\u8F93\u5165\u5E7F\u64AD\u603B\u5927\u5C0F +outgoing_unicast_packets=\u4E0A\u4F20\u6570\u636E\u5305\u6570 +outgoing_unicast_total_size=\u4E0A\u4F20\u6570\u636E\u5305\u6570\u603B\u91CF +outgoing_broadcast_packets=\u4E0A\u4F20\u5B57\u8282\u6570 +outgoing_broadcast_total_size=\u4E0A\u4F20\u5B57\u8282\u6570\u603B\u91CF +incoming_unicast_packets=\u4E0B\u8F7D\u6570\u636E\u5305\u6570 +incoming_unicast_total_size=\u4E0B\u8F7D\u6570\u636E\u5305\u6570\u603B\u91CF +incoming_broadcast_packets=\u4E0B\u8F7D\u5B57\u8282\u6570 +incoming_broadcast_total_size=\u4E0B\u8F7D\u5B57\u8282\u6570\u603B\u91CF address_pool=\u5730\u5740\u6C60 ip_total=IP\u603B\u6570 available_ip_total=\u53EF\u7528IP\u6570 diff --git a/src/main/webapp/WEB-INF/views/cfg/maintenance/userManage/addIpModal.jsp b/src/main/webapp/WEB-INF/views/cfg/maintenance/userManage/addIpModal.jsp new file mode 100644 index 000000000..c7b484e50 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/cfg/maintenance/userManage/addIpModal.jsp @@ -0,0 +1,69 @@ +<%@ page contentType="text/html;charset=UTF-8"%> +<%@ include file="/WEB-INF/include/taglib.jsp"%> + + + - - -<%@include file="/WEB-INF/include/excel/importModal.jsp" %> -
-
- - X -
-
- - - - - - - - - - - -
-
-
- -
-
- -
-
- - X -
- - - - - - - - - - - -
    
     - - *
-
- - -
-
-
+ +<%@include file="/WEB-INF/views/cfg/maintenance/userManage/addIpModal.jsp" %> \ No newline at end of file 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 731fdf38b..eab35e74c 100644 --- a/src/main/webapp/WEB-INF/views/cfg/whitelist/domainList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/whitelist/domainList.jsp @@ -203,7 +203,7 @@
- <%--
+
@@ -263,7 +263,7 @@
-
--%> +
From 1fbc899269552b5134f1c2d29c3378db07dbd85e Mon Sep 17 00:00:00 2001 From: zhanghongqing Date: Wed, 28 Nov 2018 19:23:38 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E5=A4=9A=E5=9F=9F=E7=9A=84=E6=97=A5?= =?UTF-8?q?=E5=BF=97=E5=A2=9E=E5=8A=A0=E5=8F=AF=E6=9F=A5=E7=9C=8B=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E8=AF=A6=E6=83=85=EF=BC=8C=E9=9A=90=E8=97=8F=E6=97=A5?= =?UTF-8?q?=E5=BF=97=E4=B8=AD=E7=9A=84=E6=9F=A5=E7=9C=8B=E8=AF=A6=E6=83=85?= =?UTF-8?q?=EF=BC=8C=E6=8F=90=E4=BE=9B=E5=8F=AF=E4=BB=A5=E5=A4=8D=E5=88=B6?= =?UTF-8?q?=E6=97=A5=E5=BF=97=E8=BF=87=E9=95=BFtitle=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../configuration/AppCfgController.java | 8 +-- .../BasicProtocolController.java | 8 +-- .../EncryptedTunnelBehaviorController.java | 8 +-- .../ntc/AvContentController.java | 6 +- .../configuration/ntc/BgpCfgController.java | 8 +-- .../ntc/FileTransferCfgController.java | 22 ++++---- .../configuration/ntc/IpController.java | 8 +-- .../configuration/ntc/MailCfgController.java | 8 +-- .../configuration/ntc/WebsiteController.java | 24 ++++---- .../ntc/WhiteListController.java | 16 +++--- .../proxy/HttpRedirectPolicyController.java | 8 +-- .../proxy/InterceptController.java | 8 +-- .../nis/web/dao/configuration/AppCfgDao.java | 2 +- .../nis/web/dao/configuration/AppCfgDao.xml | 11 +++- .../web/dao/configuration/AvContentCfgDao.xml | 2 +- .../nis/web/dao/configuration/BgpCfgDao.java | 4 +- .../nis/web/dao/configuration/BgpCfgDao.xml | 12 +++- .../dao/configuration/FileTransferCfgDao.java | 6 +- .../dao/configuration/FileTransferCfgDao.xml | 24 ++++++-- .../nis/web/dao/configuration/IpCfgDao.java | 2 +- .../nis/web/dao/configuration/IpCfgDao.xml | 12 +++- .../nis/web/dao/configuration/MailCfgDao.java | 4 +- .../nis/web/dao/configuration/MailCfgDao.xml | 12 +++- .../web/dao/configuration/WebsiteCfgDao.java | 9 +-- .../web/dao/configuration/WebsiteCfgDao.xml | 12 +++- .../service/configuration/AppCfgService.java | 8 +-- .../service/configuration/BgpCfgService.java | 8 +-- .../service/configuration/DomainService.java | 8 +-- .../configuration/FileTransferCfgService.java | 28 +++++----- .../configuration/HttpRedirectCfgService.java | 8 +-- .../configuration/InterceptCfgService.java | 8 +-- .../service/configuration/IpCfgService.java | 8 +-- .../service/configuration/MailCfgService.java | 8 +-- .../configuration/WebsiteCfgService.java | 24 ++++---- .../resources/messages/message_en.properties | 3 +- .../resources/messages/message_ru.properties | 3 +- .../messages/message_zh_CN.properties | 3 +- .../views/log/manipulation/dkBehaviorList.jsp | 46 ++++++++++++++- .../webapp/WEB-INF/views/log/ntc/appList.jsp | 2 +- .../webapp/WEB-INF/views/log/ntc/bgpList.jsp | 46 ++++++++++++++- .../WEB-INF/views/log/ntc/collectVoipList.jsp | 2 +- .../webapp/WEB-INF/views/log/ntc/ddosList.jsp | 2 +- .../webapp/WEB-INF/views/log/ntc/dnsList.jsp | 45 ++++++++++++++- .../webapp/WEB-INF/views/log/ntc/ftpList.jsp | 44 ++++++++++++++- .../WEB-INF/views/log/ntc/httpKeyList.jsp | 48 +++++++++++++++- .../webapp/WEB-INF/views/log/ntc/httpList.jsp | 46 ++++++++++++++- .../webapp/WEB-INF/views/log/ntc/ipList.jsp | 46 ++++++++++++++- .../WEB-INF/views/log/ntc/ipsecList.jsp | 2 +- .../WEB-INF/views/log/ntc/l2tpLogList.jsp | 2 +- .../webapp/WEB-INF/views/log/ntc/mailList.jsp | 46 ++++++++++++++- .../WEB-INF/views/log/ntc/mmAvIpList.jsp | 2 +- .../WEB-INF/views/log/ntc/mmAvUrlList.jsp | 2 +- .../views/log/ntc/mmFileDigestList.jsp | 44 ++++++++++++++- .../WEB-INF/views/log/ntc/mmPicIpList.jsp | 2 +- .../WEB-INF/views/log/ntc/mmPicUrlList.jsp | 2 +- .../views/log/ntc/mmPornAudioSampleList.jsp | 2 +- .../views/log/ntc/mmPornVideoSampleList.jsp | 2 +- .../views/log/ntc/mmSampleAudioList.jsp | 2 +- .../views/log/ntc/mmSampleFaceList.jsp | 2 +- .../views/log/ntc/mmSampleLogoList.jsp | 2 +- .../WEB-INF/views/log/ntc/mmSamplePicList.jsp | 2 +- .../views/log/ntc/mmSampleSpeakerList.jsp | 2 +- .../views/log/ntc/mmSampleVideoList.jsp | 2 +- .../views/log/ntc/mmSampleVoipList.jsp | 2 +- .../views/log/ntc/mmVoipAccountList.jsp | 2 +- .../WEB-INF/views/log/ntc/mmVoipIpList.jsp | 45 ++++++++++++++- .../WEB-INF/views/log/ntc/ntcStreamMedia.jsp | 44 ++++++++++++++- .../WEB-INF/views/log/ntc/openVpnList.jsp | 2 +- .../webapp/WEB-INF/views/log/ntc/p2pList.jsp | 47 +++++++++++++++- .../WEB-INF/views/log/ntc/pptpLogList.jsp | 2 +- .../webapp/WEB-INF/views/log/ntc/sshList.jsp | 2 +- .../WEB-INF/views/log/ntc/sslLogList.jsp | 56 +++++++++++++++++-- .../WEB-INF/views/log/pxy/pxyHttpList.jsp | 45 ++++++++++++++- .../webapp/static/global/scripts/common.js | 6 +- .../webapp/static/pages/scripts/pageLogs.js | 2 + 75 files changed, 869 insertions(+), 192 deletions(-) diff --git a/src/main/java/com/nis/web/controller/configuration/AppCfgController.java b/src/main/java/com/nis/web/controller/configuration/AppCfgController.java index ef5701192..ee1f8a893 100644 --- a/src/main/java/com/nis/web/controller/configuration/AppCfgController.java +++ b/src/main/java/com/nis/web/controller/configuration/AppCfgController.java @@ -135,8 +135,8 @@ public class AppCfgController extends BaseController { * @return */ @RequestMapping(value = {"ajaxAppPolicyIpList"}) - public String ajaxSslSubList(Model model,Long cfgId,Integer index) { - AppPolicyCfg cfg = appCfgService.getAppPolicyCfg(cfgId); + public String ajaxSslSubList(Model model,Long cfgId,Integer index,Integer compileId) { + AppPolicyCfg cfg = appCfgService.getAppPolicyCfg(cfgId,compileId); List tabList = new ArrayList(); if(cfg.getIpPortList()!=null){ String cfgType = null; @@ -172,7 +172,7 @@ public class AppCfgController extends BaseController { @RequiresPermissions(value={"app:policy:config"}) public String policyCfgForm(Model model,String ids,AppPolicyCfg entity) { if(StringUtils.isNotBlank(ids)){ - entity = appCfgService.getAppPolicyCfg(Long.parseLong(ids)); + entity = appCfgService.getAppPolicyCfg(Long.parseLong(ids),entity.getCompileId()); initUpdateFormCondition(model,entity); }else{ initFormCondition(model,entity); @@ -227,7 +227,7 @@ public class AppCfgController extends BaseController { AppPolicyCfg entity = new AppPolicyCfg(); String[] idArray = ids.split(","); for(String id :idArray){ - entity = appCfgService.getAppPolicyCfg(Long.parseLong(id)); + entity = appCfgService.getAppPolicyCfg(Long.parseLong(id),entity.getCompileId()); entity.setIsAudit(isAudit); entity.setIsValid(isValid); entity.setAuditorId(UserUtils.getUser().getId()); diff --git a/src/main/java/com/nis/web/controller/configuration/BasicProtocolController.java b/src/main/java/com/nis/web/controller/configuration/BasicProtocolController.java index e5d7ab9ef..fb4baf22b 100644 --- a/src/main/java/com/nis/web/controller/configuration/BasicProtocolController.java +++ b/src/main/java/com/nis/web/controller/configuration/BasicProtocolController.java @@ -71,8 +71,8 @@ public class BasicProtocolController extends BaseController { * @return */ @RequestMapping(value = {"ajaxIpList"}) - public String ajaxSslSubList(Model model,Long cfgId,Integer index) { - AppPolicyCfg cfg = appCfgService.getAppPolicyCfg(cfgId); + public String ajaxSslSubList(Model model,Long cfgId,Integer index,Integer compileId) { + AppPolicyCfg cfg = appCfgService.getAppPolicyCfg(cfgId,compileId); List tabList = new ArrayList(); if(cfg.getIpPortList()!=null){ String cfgType = null; @@ -108,7 +108,7 @@ public class BasicProtocolController extends BaseController { @RequiresPermissions(value={"basicprotocol:config"}) public String policyCfgForm(Model model,String ids,AppPolicyCfg entity) { if(StringUtils.isNotBlank(ids)){ - entity = appCfgService.getAppPolicyCfg(Long.parseLong(ids)); + entity = appCfgService.getAppPolicyCfg(Long.parseLong(ids),entity.getCompileId()); initUpdateFormCondition(model,entity); }else{ initFormCondition(model,entity); @@ -166,7 +166,7 @@ public class BasicProtocolController extends BaseController { AppPolicyCfg entity = new AppPolicyCfg(); String[] idArray = ids.split(","); for(String id :idArray){ - entity = appCfgService.getAppPolicyCfg(Long.parseLong(id)); + entity = appCfgService.getAppPolicyCfg(Long.parseLong(id),entity.getCompileId()); entity.setIsAudit(isAudit); entity.setIsValid(isValid); entity.setAuditorId(UserUtils.getUser().getId()); diff --git a/src/main/java/com/nis/web/controller/configuration/EncryptedTunnelBehaviorController.java b/src/main/java/com/nis/web/controller/configuration/EncryptedTunnelBehaviorController.java index 278d1e5bd..1006493d0 100644 --- a/src/main/java/com/nis/web/controller/configuration/EncryptedTunnelBehaviorController.java +++ b/src/main/java/com/nis/web/controller/configuration/EncryptedTunnelBehaviorController.java @@ -93,8 +93,8 @@ public class EncryptedTunnelBehaviorController extends BaseController { * @return */ @RequestMapping(value = {"ajaxIpList"}) - public String ajaxSslSubList(Model model,Long cfgId,Integer index) { - AppPolicyCfg cfg = appCfgService.getAppPolicyCfg(cfgId); + public String ajaxSslSubList(Model model,Long cfgId,Integer index,Integer compileId) { + AppPolicyCfg cfg = appCfgService.getAppPolicyCfg(cfgId,compileId); List tabList = new ArrayList(); if(cfg.getIpPortList()!=null){ String cfgType = null; @@ -130,7 +130,7 @@ public class EncryptedTunnelBehaviorController extends BaseController { @RequiresPermissions(value={"encryptedtunnelbehav:config"}) public String policyCfgForm(Model model,String ids,AppPolicyCfg entity) { if(StringUtils.isNotBlank(ids)){ - entity = appCfgService.getAppPolicyCfg(Long.parseLong(ids)); + entity = appCfgService.getAppPolicyCfg(Long.parseLong(ids),entity.getCompileId()); initUpdateFormCondition(model,entity); }else{ initFormCondition(model,entity); @@ -187,7 +187,7 @@ public class EncryptedTunnelBehaviorController extends BaseController { AppPolicyCfg entity = new AppPolicyCfg(); String[] idArray = ids.split(","); for(String id :idArray){ - entity = appCfgService.getAppPolicyCfg(Long.parseLong(id)); + entity = appCfgService.getAppPolicyCfg(Long.parseLong(id),entity.getCompileId()); entity.setIsAudit(isAudit); entity.setIsValid(isValid); entity.setAuditorId(UserUtils.getUser().getId()); 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 34b59459d..a9ce878af 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 @@ -279,9 +279,10 @@ public class AvContentController extends BaseController { * @return */ @RequestMapping(value = {"/ajaxVoipIpInfo"}) - public String getVoipIpInfo(Model model,Long cfgId,Integer index) { + public String getVoipIpInfo(Model model,Long cfgId,Integer index,Integer compileId) { CfgIndexInfo cfgIndexInfo = new CfgIndexInfo(); cfgIndexInfo.setCfgId(cfgId); + cfgIndexInfo.setCompileId(compileId); CfgIndexInfo cfg = avContentCfgService.getCfgIndexInfo(cfgIndexInfo); List tabList = new ArrayList(); //获取voipIpCfg信息 @@ -663,9 +664,10 @@ public class AvContentController extends BaseController { } // 获取域配置信息 @RequestMapping(value = {"ajaxAvContUrlList"}) - public String ajaxAvContUrlList(Model model,Long cfgId,Integer index) { + public String ajaxAvContUrlList(Model model,Long cfgId,Integer index,Integer compileId) { CfgIndexInfo cfgIndexInfo = new CfgIndexInfo(); cfgIndexInfo.setCfgId(cfgId); + cfgIndexInfo.setCompileId(compileId); CfgIndexInfo cfg = avContentCfgService.getUrlCfgIndexInfo(cfgIndexInfo); List tabList = new ArrayList(); if(cfg.getIpPortList()!=null){ diff --git a/src/main/java/com/nis/web/controller/configuration/ntc/BgpCfgController.java b/src/main/java/com/nis/web/controller/configuration/ntc/BgpCfgController.java index 9d67d9fd7..bb156b0bd 100644 --- a/src/main/java/com/nis/web/controller/configuration/ntc/BgpCfgController.java +++ b/src/main/java/com/nis/web/controller/configuration/ntc/BgpCfgController.java @@ -55,7 +55,7 @@ public class BgpCfgController extends BaseController{ @RequiresPermissions(value={"other:bgp:config"}) public String bgpForm(Model model,String ids,CfgIndexInfo entity,RedirectAttributes redirectAttributes) { if(StringUtils.isNotBlank(ids)){ - entity = bgpCfgService.getBgpCfg(Long.parseLong(ids)); + entity = bgpCfgService.getBgpCfg(Long.parseLong(ids),entity.getCompileId()); initUpdateFormCondition(model,entity); }else{ initFormCondition(model,entity); @@ -74,8 +74,8 @@ public class BgpCfgController extends BaseController{ } @RequestMapping(value = {"ajaxBgpSubList"}) - public String ajaxBgpSubList(Model model,Long cfgId,Integer index) { - CfgIndexInfo cfg = bgpCfgService.getBgpCfg(cfgId); + public String ajaxBgpSubList(Model model,Long cfgId,Integer index,Integer compileId) { + CfgIndexInfo cfg = bgpCfgService.getBgpCfg(cfgId,compileId); List tabList = new ArrayList(); if(cfg.getIpPortList()!=null){ String cfgType = null; @@ -134,7 +134,7 @@ public class BgpCfgController extends BaseController{ CfgIndexInfo entity = new CfgIndexInfo(); String[] idArray = ids.split(","); for(String id :idArray){ - entity = bgpCfgService.getBgpCfg(Long.parseLong(id)); + entity = bgpCfgService.getBgpCfg(Long.parseLong(id),entity.getCompileId()); entity.setIsAudit(isAudit); entity.setIsValid(isValid); entity.setAuditorId(UserUtils.getUser().getId()); diff --git a/src/main/java/com/nis/web/controller/configuration/ntc/FileTransferCfgController.java b/src/main/java/com/nis/web/controller/configuration/ntc/FileTransferCfgController.java index 63fa76e52..6d21023c4 100644 --- a/src/main/java/com/nis/web/controller/configuration/ntc/FileTransferCfgController.java +++ b/src/main/java/com/nis/web/controller/configuration/ntc/FileTransferCfgController.java @@ -66,7 +66,7 @@ public class FileTransferCfgController extends BaseController{ @RequiresPermissions(value={"fileTransfer:ftp:config"}) public String ftpForm(Model model,String compileIds,String ids,CfgIndexInfo entity) { if(StringUtils.isNotBlank(ids)){ - entity = fileTransferCfgService.getFtpCfg(Long.parseLong(ids)); + entity = fileTransferCfgService.getFtpCfg(Long.parseLong(ids),entity.getCompileId()); initUpdateFormCondition(model,entity); }else{ initFormCondition(model,entity); @@ -95,8 +95,8 @@ public class FileTransferCfgController extends BaseController{ return "redirect:" + adminPath +"/ntc/fileTransfer/ftpList?functionId="+entity.getFunctionId(); } @RequestMapping(value = {"ajaxFtpSubList"}) - public String ajaxFtpSubList(Model model,Long cfgId,Integer index) { - CfgIndexInfo cfg = fileTransferCfgService.getFtpCfg(cfgId); + public String ajaxFtpSubList(Model model,Long cfgId,Integer index,Integer compileId) { + CfgIndexInfo cfg = fileTransferCfgService.getFtpCfg(cfgId,compileId); List tabList = new ArrayList(); if(cfg.getIpPortList()!=null){ String cfgType = null; @@ -163,7 +163,7 @@ public class FileTransferCfgController extends BaseController{ CfgIndexInfo entity = new CfgIndexInfo(); String[] idArray = ids.split(","); for(String id :idArray){ - entity = fileTransferCfgService.getFtpCfg(Long.parseLong(id)); + entity = fileTransferCfgService.getFtpCfg(Long.parseLong(id),entity.getCompileId()); entity.setIsAudit(isAudit); entity.setIsValid(isValid); entity.setAuditorId(UserUtils.getUser().getId()); @@ -203,7 +203,7 @@ public class FileTransferCfgController extends BaseController{ @RequiresPermissions(value={"fileTransfer:fileDigest:config"}) public String fileDigestForm(Model model,String ids,FileDigestCfg entity,RedirectAttributes redirectAttributes) { if(StringUtils.isNotBlank(ids)){ - entity = fileTransferCfgService.getFileDigestCfg(Long.parseLong(ids)); + entity = fileTransferCfgService.getFileDigestCfg(Long.parseLong(ids),entity.getCompileId()); initUpdateFormCondition(model,entity); }else{ initFormCondition(model,entity); @@ -302,8 +302,8 @@ public class FileTransferCfgController extends BaseController{ return "redirect:" + adminPath +"/ntc/fileTransfer/fileDigestList?functionId="+functionId; } @RequestMapping(value = {"ajaxFileDigestSubIdList"}) - public String ajaxFileDigestSubIdList(Model model,Long cfgId,Integer index) { - FileDigestCfg cfg = fileTransferCfgService.getFileDigestSubIdCfg(cfgId); + public String ajaxFileDigestSubIdList(Model model,Long cfgId,Integer index,Integer compileId) { + FileDigestCfg cfg = fileTransferCfgService.getFileDigestSubIdCfg(cfgId,compileId); List tabList = new ArrayList(); //查询SubscribeId域配置 if(cfg.getNtcSubscribeIdCfgList()!=null){ @@ -335,7 +335,7 @@ public class FileTransferCfgController extends BaseController{ public String p2pForm(Model model,String ids,CfgIndexInfo entity) { // 跳转操作页面(根据ids判断是新增 or 修改) if(StringUtils.isNotBlank(ids)){ - entity = fileTransferCfgService.getP2pCfg(Long.parseLong(ids)); + entity = fileTransferCfgService.getP2pCfg(Long.parseLong(ids),entity.getCompileId()); // 添加配置域Key,用于修改页面区分各域配置 P2pHashCfg hashCfg = new P2pHashCfg(); @@ -403,8 +403,8 @@ public class FileTransferCfgController extends BaseController{ } @RequestMapping(value = {"ajaxP2pSubList"}) - public String ajaxP2pSubList(Model model,Long cfgId,Integer index) { - CfgIndexInfo cfg = fileTransferCfgService.getP2pCfg(cfgId); + public String ajaxP2pSubList(Model model,Long cfgId,Integer index,Integer compileId) { + CfgIndexInfo cfg = fileTransferCfgService.getP2pCfg(cfgId,compileId); List tabList = new ArrayList(); if(cfg.getIpPortList()!=null){ String cfgType = null; @@ -454,7 +454,7 @@ public class FileTransferCfgController extends BaseController{ CfgIndexInfo entity = new CfgIndexInfo(); String[] idArray = ids.split(","); for(String id :idArray){ - entity = fileTransferCfgService.getP2pCfg(Long.parseLong(id)); + entity = fileTransferCfgService.getP2pCfg(Long.parseLong(id),entity.getCompileId()); entity.setIsAudit(isAudit); entity.setIsValid(isValid); entity.setAuditorId(UserUtils.getUser().getId()); 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 0da999180..3c07fccb7 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 @@ -73,7 +73,7 @@ public class IpController extends BaseController{ @RequiresPermissions(value={"iplist:config"}) public String form(Model model,String ids,CfgIndexInfo entity) { if(StringUtils.isNotBlank(ids)){ - entity = ipCfgService.getIpPortCfg(Long.parseLong(ids)); + entity = ipCfgService.getIpPortCfg(Long.parseLong(ids),entity.getCompileId()); initUpdateFormCondition(model,entity); }else{ initFormCondition(model,entity); @@ -89,8 +89,8 @@ public class IpController extends BaseController{ return "redirect:" + adminPath +"/ntc/iplist/list?functionId="+entity.getFunctionId(); } @RequestMapping(value = {"ajaxSubList"}) - public String ajaxIpPortSubList(Model model,Long cfgId,Integer index) { - CfgIndexInfo cfg = ipCfgService.getIpPortCfg(cfgId); + public String ajaxIpPortSubList(Model model,Long cfgId,Integer index,Integer compileId) { + CfgIndexInfo cfg = ipCfgService.getIpPortCfg(cfgId,compileId); /*List regionList = DictUtils.getFunctionRegionDictList(cfg.getFunctionId()); model.addAttribute("regionList", regionList);*/ List tabList = new ArrayList(); @@ -133,7 +133,7 @@ public class IpController extends BaseController{ CfgIndexInfo entity = new CfgIndexInfo(); String[] idArray = ids.split(","); for(String id :idArray){ - entity = ipCfgService.getIpPortCfg(Long.parseLong(id)); + entity = ipCfgService.getIpPortCfg(Long.parseLong(id),entity.getCompileId()); entity.setIsAudit(isAudit); entity.setIsValid(isValid); entity.setAuditorId(UserUtils.getUser().getId()); diff --git a/src/main/java/com/nis/web/controller/configuration/ntc/MailCfgController.java b/src/main/java/com/nis/web/controller/configuration/ntc/MailCfgController.java index bf699ba82..91d77c812 100644 --- a/src/main/java/com/nis/web/controller/configuration/ntc/MailCfgController.java +++ b/src/main/java/com/nis/web/controller/configuration/ntc/MailCfgController.java @@ -61,7 +61,7 @@ public class MailCfgController extends BaseController{ @RequiresPermissions(value={"mail:config"}) public String mailForm(Model model,String ids,CfgIndexInfo entity) { if(StringUtils.isNotBlank(ids)){ - entity = mailCfgService.getMailCfg(Long.parseLong(ids)); + entity = mailCfgService.getMailCfg(Long.parseLong(ids),entity.getCompileId()); initUpdateFormCondition(model,entity); }else{ initFormCondition(model,entity); @@ -112,8 +112,8 @@ public class MailCfgController extends BaseController{ return "redirect:" + adminPath +"/ntc/mail/mailList?functionId="+entity.getFunctionId(); } @RequestMapping(value = {"ajaxMailSubList"}) - public String ajaxMailSubList(Model model,Long cfgId,Integer index) { - CfgIndexInfo cfg = mailCfgService.getMailCfg(cfgId); + public String ajaxMailSubList(Model model,Long cfgId,Integer index,Integer compileId) { + CfgIndexInfo cfg = mailCfgService.getMailCfg(cfgId,compileId); List tabList = new ArrayList(); if(cfg.getIpPortList()!=null){ String cfgType = null; @@ -168,7 +168,7 @@ public class MailCfgController extends BaseController{ CfgIndexInfo entity = new CfgIndexInfo(); String[] idArray = ids.split(","); for(String id :idArray){ - entity = mailCfgService.getMailCfg(Long.parseLong(id)); + entity = mailCfgService.getMailCfg(Long.parseLong(id),entity.getCompileId()); entity.setIsAudit(isAudit); entity.setIsValid(isValid); entity.setAuditorId(UserUtils.getUser().getId()); diff --git a/src/main/java/com/nis/web/controller/configuration/ntc/WebsiteController.java b/src/main/java/com/nis/web/controller/configuration/ntc/WebsiteController.java index 8030e21fc..04065bd9e 100644 --- a/src/main/java/com/nis/web/controller/configuration/ntc/WebsiteController.java +++ b/src/main/java/com/nis/web/controller/configuration/ntc/WebsiteController.java @@ -80,7 +80,7 @@ public class WebsiteController extends BaseController{ @RequiresPermissions(value={"website:http:config"}) public String httpForm(Model model,String ids,CfgIndexInfo entity) { if(StringUtils.isNotBlank(ids)){ - entity = websiteCfgService.getHttpCfg(Long.parseLong(ids)); + entity = websiteCfgService.getHttpCfg(Long.parseLong(ids),entity.getCompileId()); //设置http各类配置的配置域类型 IpPortCfg ipCfg = new IpPortCfg(); @@ -194,8 +194,8 @@ public class WebsiteController extends BaseController{ return "redirect:" + adminPath +"/ntc/website/httpList?functionId="+entity.getFunctionId(); } @RequestMapping(value = {"ajaxHttpSubList"}) - public String ajaxHttpSubList(Model model,Long cfgId,Integer index) { - CfgIndexInfo cfg = websiteCfgService.getHttpCfg(cfgId); + public String ajaxHttpSubList(Model model,Long cfgId,Integer index,Integer compileId) { + CfgIndexInfo cfg = websiteCfgService.getHttpCfg(cfgId,compileId); model.addAttribute("_cfg", cfg); model.addAttribute("index", index); return "/cfg/website/httpSubList"; @@ -212,7 +212,7 @@ public class WebsiteController extends BaseController{ CfgIndexInfo entity = new CfgIndexInfo(); String[] idArray = ids.split(","); for(String id :idArray){ - entity = websiteCfgService.getHttpCfg(Long.parseLong(id)); + entity = websiteCfgService.getHttpCfg(Long.parseLong(id),entity.getCompileId()); entity.setIsAudit(isAudit); entity.setIsValid(isValid); entity.setAuditorId(UserUtils.getUser().getId()); @@ -243,7 +243,7 @@ public class WebsiteController extends BaseController{ @RequiresPermissions(value={"website:ssl:config"}) public String sslForm(Model model,String ids,CfgIndexInfo entity) { if(StringUtils.isNotBlank(ids)){ - entity = websiteCfgService.getSslCfg(Long.parseLong(ids)); + entity = websiteCfgService.getSslCfg(Long.parseLong(ids),entity.getCompileId()); initUpdateFormCondition(model,entity); }else{ initFormCondition(model,entity); @@ -258,8 +258,8 @@ public class WebsiteController extends BaseController{ return "redirect:" + adminPath +"/ntc/website/sslList?functionId="+entity.getFunctionId(); } @RequestMapping(value = {"ajaxSslSubList"}) - public String ajaxSslSubList(Model model,Long cfgId,Integer index) { - CfgIndexInfo cfg = websiteCfgService.getSslCfg(cfgId); + public String ajaxSslSubList(Model model,Long cfgId,Integer index,Integer compileId) { + CfgIndexInfo cfg = websiteCfgService.getSslCfg(cfgId,compileId); /*List regionList = DictUtils.getFunctionRegionDictList(cfg.getFunctionId()); model.addAttribute("regionList", regionList);*/ List tabList = new ArrayList(); @@ -307,7 +307,7 @@ public class WebsiteController extends BaseController{ CfgIndexInfo entity = new CfgIndexInfo(); String[] idArray = ids.split(","); for(String id :idArray){ - entity = websiteCfgService.getSslCfg(Long.parseLong(id)); + entity = websiteCfgService.getSslCfg(Long.parseLong(id),entity.getCompileId()); entity.setIsAudit(isAudit); entity.setIsValid(isValid); entity.setAuditorId(UserUtils.getUser().getId()); @@ -335,7 +335,7 @@ public class WebsiteController extends BaseController{ @RequiresPermissions(value={"website:dns:config"}) public String dnsForm(Model model,String ids,CfgIndexInfo entity) { if(StringUtils.isNotBlank(ids)){ - entity = websiteCfgService.getDnsCfg(Long.parseLong(ids)); + entity = websiteCfgService.getDnsCfg(Long.parseLong(ids),entity.getCompileId()); initUpdateFormCondition(model,entity); }else{ initFormCondition(model,entity); @@ -353,8 +353,8 @@ public class WebsiteController extends BaseController{ return "redirect:" + adminPath +"/ntc/website/dnsList?functionId="+entity.getFunctionId(); } @RequestMapping(value = {"ajaxDnsSubList"}) - public String ajaxDnsSubList(Model model,Long cfgId,Integer index) { - CfgIndexInfo cfg = websiteCfgService.getDnsCfg(cfgId); + public String ajaxDnsSubList(Model model,Long cfgId,Integer index,Integer compileId) { + CfgIndexInfo cfg = websiteCfgService.getDnsCfg(cfgId,compileId); List tabList = new ArrayList(); if(cfg.getIpPortList()!=null){ String cfgType = null; @@ -400,7 +400,7 @@ public class WebsiteController extends BaseController{ CfgIndexInfo entity = new CfgIndexInfo(); String[] idArray = ids.split(","); for(String id :idArray){ - entity = websiteCfgService.getDnsCfg(Long.parseLong(id)); + entity = websiteCfgService.getDnsCfg(Long.parseLong(id),entity.getCompileId()); entity.setIsAudit(isAudit); entity.setIsValid(isValid); entity.setAuditorId(UserUtils.getUser().getId()); diff --git a/src/main/java/com/nis/web/controller/configuration/ntc/WhiteListController.java b/src/main/java/com/nis/web/controller/configuration/ntc/WhiteListController.java index 4ae7ed5a5..4007e0cf0 100644 --- a/src/main/java/com/nis/web/controller/configuration/ntc/WhiteListController.java +++ b/src/main/java/com/nis/web/controller/configuration/ntc/WhiteListController.java @@ -50,8 +50,8 @@ public class WhiteListController extends CommonController{ return "/cfg/whitelist/ipList"; } @RequestMapping(value = {"ajaxIpSubList"}) - public String ajaxIpSubList(Model model,Long cfgId,Integer index) { - CfgIndexInfo cfg = ipCfgService.getIpPortCfg(cfgId); + public String ajaxIpSubList(Model model,Long cfgId,Integer index,Integer compileId) { + CfgIndexInfo cfg = ipCfgService.getIpPortCfg(cfgId,compileId); List tabList = new ArrayList(); if(cfg.getIpPortList()!=null){ String cfgType = null; @@ -81,7 +81,7 @@ public class WhiteListController extends CommonController{ public String ipForm(Model model,String ids,CfgIndexInfo entity) { if(StringUtils.isNotBlank(ids)){ - entity = this.ipCfgService.getIpPortCfg(Long.parseLong(ids)); + entity = this.ipCfgService.getIpPortCfg(Long.parseLong(ids),entity.getCompileId()); initUpdateFormCondition(model,entity); }else{ initFormCondition(model,entity); @@ -100,7 +100,7 @@ public class WhiteListController extends CommonController{ CfgIndexInfo entity = new CfgIndexInfo(); String[] idArray = ids.split(","); for(String id :idArray){ - entity = ipCfgService.getIpPortCfg(Long.parseLong(id)); + entity = ipCfgService.getIpPortCfg(Long.parseLong(id),entity.getCompileId()); entity.setIsAudit(isAudit); entity.setIsValid(isValid); entity.setAuditorId(UserUtils.getUser().getId()); @@ -157,7 +157,7 @@ public class WhiteListController extends CommonController{ @RequiresPermissions(value={"whitelist:domain:config"}) public String domainForm(Model model,String ids,CfgIndexInfo entity) { if(StringUtils.isNotBlank(ids)){ - entity = domainService.getDomainCfg(Long.parseLong(ids)); + entity = domainService.getDomainCfg(Long.parseLong(ids),entity.getCompileId()); HttpUrlCfg urlCfg = new HttpUrlCfg(); urlCfg.setCfgType(Constants.HTTP_URL_REGION); entity.setHttpUrl(urlCfg); @@ -183,8 +183,8 @@ public class WhiteListController extends CommonController{ return "redirect:" + adminPath +"/ntc/whitelist/domain/list?functionId="+entity.getFunctionId(); } @RequestMapping(value = {"domain/ajaxSubList"}) - public String ajaxDomainSubList(Model model,Long cfgId,Integer index) { - CfgIndexInfo cfg = domainService.getDomainCfg(cfgId); + public String ajaxDomainSubList(Model model,Long cfgId,Integer index,Integer compileId) { + CfgIndexInfo cfg = domainService.getDomainCfg(cfgId,compileId); List tabList = new ArrayList(); if(cfg.getHttpUrlList()!=null){ String cfgType = null; @@ -234,7 +234,7 @@ public class WhiteListController extends CommonController{ CfgIndexInfo entity = new CfgIndexInfo(); String[] idArray = ids.split(","); for(String id :idArray){ - entity = domainService.getDomainCfg(Long.parseLong(id)); + entity = domainService.getDomainCfg(Long.parseLong(id),entity.getCompileId()); entity.setIsAudit(isAudit); entity.setIsValid(isValid); entity.setAuditorId(UserUtils.getUser().getId()); diff --git a/src/main/java/com/nis/web/controller/configuration/proxy/HttpRedirectPolicyController.java b/src/main/java/com/nis/web/controller/configuration/proxy/HttpRedirectPolicyController.java index 914639112..eba86f103 100644 --- a/src/main/java/com/nis/web/controller/configuration/proxy/HttpRedirectPolicyController.java +++ b/src/main/java/com/nis/web/controller/configuration/proxy/HttpRedirectPolicyController.java @@ -70,7 +70,7 @@ public class HttpRedirectPolicyController extends BaseController{ ,logical=Logical.OR) public String form(Model model,HttpServletRequest request,HttpServletResponse response,String ids,@ModelAttribute("cfg")CfgIndexInfo entity){ if(StringUtils.isNotBlank(ids)){ - entity = httpRedirectCfgService.getHttpCfg(Long.parseLong(ids)); + entity = httpRedirectCfgService.getHttpCfg(Long.parseLong(ids),entity.getCompileId()); HttpUrlCfg urlCfg = new HttpUrlCfg(); urlCfg.setCfgType(Constants.HTTP_REDIRECT_URL_REGION); @@ -199,8 +199,8 @@ public class HttpRedirectPolicyController extends BaseController{ return "redirect:" + adminPath +"/proxy/control/httpRedirect/httpRedirectList?functionId="+cfg.getFunctionId(); } @RequestMapping(value = {"ajaxHttpSubList"}) - public String ajaxHttpSubList(Model model,Long cfgId,Integer index) { - CfgIndexInfo cfg = httpRedirectCfgService.getHttpCfg(cfgId); + public String ajaxHttpSubList(Model model,Long cfgId,Integer index,Integer compileId) { + CfgIndexInfo cfg = httpRedirectCfgService.getHttpCfg(cfgId,compileId); model.addAttribute("_cfg", cfg); model.addAttribute("index", index); return "/cfg/proxy/control/httpRedirectSubList"; @@ -227,7 +227,7 @@ public class HttpRedirectPolicyController extends BaseController{ CfgIndexInfo entity = new CfgIndexInfo(); String[] idArray = ids.split(","); for(String id :idArray){ - entity = httpRedirectCfgService.getHttpCfg(Long.parseLong(id)); + entity = httpRedirectCfgService.getHttpCfg(Long.parseLong(id),entity.getCompileId()); entity.setIsAudit(isAudit); entity.setIsValid(isValid); entity.setAuditorId(UserUtils.getUser().getId()); diff --git a/src/main/java/com/nis/web/controller/configuration/proxy/InterceptController.java b/src/main/java/com/nis/web/controller/configuration/proxy/InterceptController.java index 59daec728..8618d7501 100644 --- a/src/main/java/com/nis/web/controller/configuration/proxy/InterceptController.java +++ b/src/main/java/com/nis/web/controller/configuration/proxy/InterceptController.java @@ -63,7 +63,7 @@ public class InterceptController extends CommonController{ @RequestMapping(value = {"/interceptIpForm","interceptDomainForm","interceptIpPayloadForm"}) public String interceptIpForm(Model model,String ids,CfgIndexInfo entity) { if(StringUtils.isNotBlank(ids)){ - entity = interceptCfgService.getInterceptCfg(Long.parseLong(ids)); + entity = interceptCfgService.getInterceptCfg(Long.parseLong(ids),null); initUpdateFormCondition(model,entity); }else{ initFormCondition(model,entity); @@ -98,8 +98,8 @@ public class InterceptController extends CommonController{ } @RequestMapping(value = {"/ajaxInterceptIpSubList","/ajaxInterceptDomainSubList","/ajaxInterceptIpPayloadSubList"}) - public String ajaxInterceptIpSubList(Model model,Long cfgId,Integer index) { - CfgIndexInfo cfg = interceptCfgService.getInterceptCfg(cfgId); + public String ajaxInterceptIpSubList(Model model,Long cfgId,Integer index,Integer compileId) { + CfgIndexInfo cfg = interceptCfgService.getInterceptCfg(cfgId,compileId); List tabList = new ArrayList(); if(cfg.getIpPortList()!=null){ String cfgType = null; @@ -139,7 +139,7 @@ public class InterceptController extends CommonController{ CfgIndexInfo entity = new CfgIndexInfo(); String[] idArray = ids.split(","); for(String id :idArray){ - entity = interceptCfgService.getInterceptCfg(Long.parseLong(id)); + entity = interceptCfgService.getInterceptCfg(Long.parseLong(id),null); entity.setIsAudit(isAudit); entity.setIsValid(isValid); entity.setAuditorId(UserUtils.getUser().getId()); diff --git a/src/main/java/com/nis/web/dao/configuration/AppCfgDao.java b/src/main/java/com/nis/web/dao/configuration/AppCfgDao.java index a3c383848..2112edaf7 100644 --- a/src/main/java/com/nis/web/dao/configuration/AppCfgDao.java +++ b/src/main/java/com/nis/web/dao/configuration/AppCfgDao.java @@ -37,7 +37,7 @@ import com.nis.web.dao.MyBatisDao; public interface AppCfgDao { //app策略配置增删改查 public List findAppPolicyList(AppPolicyCfg entity) ; - public AppPolicyCfg getAppPolicyCfg(Long cfgId) ; + public AppPolicyCfg getAppPolicyCfg(@Param("cfgId")Long cfgId,@Param("compileId")Integer compileId) ; public IpPortCfg getAppPolicyIpCfg(AppPolicyCfg entity) ; public List getAppPolicyIpList(AppPolicyCfg entity); public int insertAppPolicyCfg(AppPolicyCfg entity); diff --git a/src/main/java/com/nis/web/dao/configuration/AppCfgDao.xml b/src/main/java/com/nis/web/dao/configuration/AppCfgDao.xml index e0fb19f8b..1f08d8e63 100644 --- a/src/main/java/com/nis/web/dao/configuration/AppCfgDao.xml +++ b/src/main/java/com/nis/web/dao/configuration/AppCfgDao.xml @@ -514,11 +514,18 @@ #{classify,jdbcType=VARCHAR},#{attribute,jdbcType=VARCHAR},#{lable,jdbcType=VARCHAR}, #{areaEffectiveIds,jdbcType=VARCHAR} --> - SELECT FROM app_policy_cfg r - WHERE CFG_ID = #{cfgId,jdbcType=BIGINT} + + + CFG_ID = #{cfgId,jdbcType=BIGINT} + + + AND COMPILE_ID=#{compileId,jdbcType=INTEGER} + + - SELECT - FROM cfg_index_info a where cfg_id=#{cfgId} + FROM cfg_index_info a + + + CFG_ID = #{cfgId,jdbcType=BIGINT} + + + AND COMPILE_ID=#{compileId,jdbcType=INTEGER} + + - SELECT - FROM cfg_index_info a where cfg_id=#{cfgId} + FROM cfg_index_info a + + + CFG_ID = #{cfgId,jdbcType=BIGINT} + + + AND COMPILE_ID=#{compileId,jdbcType=INTEGER} + + - SELECT - FROM file_digest_cfg a where cfg_id=#{cfgId} + FROM file_digest_cfg a + + + a.CFG_ID=#{cfgId,jdbcType=INTEGER} + + + and a.compile_Id=#{compileId,jdbcType=INTEGER} + + - SELECT - FROM cfg_index_info a where cfg_id=#{cfgId} + FROM cfg_index_info a + + + CFG_ID = #{cfgId,jdbcType=BIGINT} + + + AND COMPILE_ID=#{compileId,jdbcType=INTEGER} + + - SELECT - FROM cfg_index_info a where cfg_id=#{cfgId} + FROM cfg_index_info a + + + CFG_ID = #{cfgId,jdbcType=BIGINT} + + + AND COMPILE_ID=#{compileId,jdbcType=INTEGER} + + - SELECT - FROM cfg_index_info a where cfg_id=#{cfgId} + FROM cfg_index_info a + + + CFG_ID = #{cfgId,jdbcType=BIGINT} + + + AND COMPILE_ID=#{compileId,jdbcType=INTEGER} + + "+ + ""+ + ""; + var html=""; + html+="
"; + html = html+data; + subTab=subTab+html; + subTab+=""; + subTab+=""; + $("#"+openId).parent().parent().after(subTab); + $("div[name='tabTitle"+index+"']").get(0).click(); + } + }); + } + + }); + + $("span[id^=close]").on("click",function(){ + var closeId=$(this).attr("id"); + var openId=$(this).attr("id").replace("close","open"); + $("#"+closeId).hide(); + $("#"+openId).show(); + $("#"+closeId).parent().parent().next("tr").hide(); + }); }); @@ -200,7 +245,7 @@ - + @@ -243,6 +288,7 @@ diff --git a/src/main/webapp/WEB-INF/views/log/ntc/httpList.jsp b/src/main/webapp/WEB-INF/views/log/ntc/httpList.jsp index 869590051..91721170e 100644 --- a/src/main/webapp/WEB-INF/views/log/ntc/httpList.jsp +++ b/src/main/webapp/WEB-INF/views/log/ntc/httpList.jsp @@ -23,6 +23,49 @@ //筛选功能 filterActionInit(); + + //异步获取voip相关信息 + $("span[id^=open]").click(function(){ + var openId=$(this).attr("id"); + var closeId=$(this).attr("id").replace("open","close"); + var index=$(this).attr("id").replace("open",""); + $("#"+openId).hide(); + $("#"+closeId).show(); + var compileId=$(this).attr("compileId"); +// var cfgId=$(this).attr("cfgId"); + if($("#"+openId).parent().parent().next("tr").hasClass("child")){ + $("#"+openId).parent().parent().next("tr").show(); + }else{ + $.ajax({ + type:'post', + async:false, + url:'${ctx}/ntc/website/ajaxHttpSubList', + data:{"compileId":compileId,"index":index}, + dataType:"html", + success:function(data){ + var subTab=""+ + ""; + subTab+=""; + $("#"+openId).parent().parent().after(subTab); + $("div[name='tabTitle"+index+"']").get(0).click(); + } + }); + } + + }); + + $("span[id^=close]").on("click",function(){ + var closeId=$(this).attr("id"); + var openId=$(this).attr("id").replace("close","open"); + $("#"+closeId).hide(); + $("#"+openId).show(); + $("#"+closeId).parent().parent().next("tr").hide(); + }); }); @@ -176,7 +219,7 @@
+ ${log.cfgId }
"; + var html=""; + html+="
"; + html = html+data; + subTab=subTab+html; + subTab+="
- + @@ -225,6 +268,7 @@ diff --git a/src/main/webapp/WEB-INF/views/log/ntc/ipList.jsp b/src/main/webapp/WEB-INF/views/log/ntc/ipList.jsp index 1dad32a9b..716b67a39 100644 --- a/src/main/webapp/WEB-INF/views/log/ntc/ipList.jsp +++ b/src/main/webapp/WEB-INF/views/log/ntc/ipList.jsp @@ -22,6 +22,49 @@ }); //筛选功能 filterActionInit(); + + //异步获取voip相关信息 + $("span[id^=open]").click(function(){ + var openId=$(this).attr("id"); + var closeId=$(this).attr("id").replace("open","close"); + var index=$(this).attr("id").replace("open",""); + $("#"+openId).hide(); + $("#"+closeId).show(); + var compileId=$(this).attr("compileId"); +// var cfgId=$(this).attr("cfgId"); + if($("#"+openId).parent().parent().next("tr").hasClass("child")){ + $("#"+openId).parent().parent().next("tr").show(); + }else{ + $.ajax({ + type:'post', + async:false, + url:'${ctx}/ntc/iplist/ajaxSubList', + data:{"compileId":compileId,"index":index}, + dataType:"html", + success:function(data){ + var subTab=""+ + ""; + subTab+=""; + $("#"+openId).parent().parent().after(subTab); + $("div[name='tabTitle"+index+"']").get(0).click(); + } + }); + } + + }); + + $("span[id^=close]").on("click",function(){ + var closeId=$(this).attr("id"); + var openId=$(this).attr("id").replace("close","open"); + $("#"+closeId).hide(); + $("#"+openId).show(); + $("#"+closeId).parent().parent().next("tr").hide(); + }); }); @@ -169,7 +212,7 @@
+ ${log.cfgId }
"; + var html=""; + html+="
"; + html = html+data; + subTab=subTab+html; + subTab+="
- + @@ -205,6 +248,7 @@ diff --git a/src/main/webapp/WEB-INF/views/log/ntc/ipsecList.jsp b/src/main/webapp/WEB-INF/views/log/ntc/ipsecList.jsp index ffa051d14..35f1c54bd 100644 --- a/src/main/webapp/WEB-INF/views/log/ntc/ipsecList.jsp +++ b/src/main/webapp/WEB-INF/views/log/ntc/ipsecList.jsp @@ -156,7 +156,7 @@ $(document).ready(function(){
+ ${log.cfgId }
- + diff --git a/src/main/webapp/WEB-INF/views/log/ntc/l2tpLogList.jsp b/src/main/webapp/WEB-INF/views/log/ntc/l2tpLogList.jsp index 7f70a5e28..f9d53a999 100644 --- a/src/main/webapp/WEB-INF/views/log/ntc/l2tpLogList.jsp +++ b/src/main/webapp/WEB-INF/views/log/ntc/l2tpLogList.jsp @@ -168,7 +168,7 @@
- + diff --git a/src/main/webapp/WEB-INF/views/log/ntc/mailList.jsp b/src/main/webapp/WEB-INF/views/log/ntc/mailList.jsp index fdd185d20..fb1288442 100644 --- a/src/main/webapp/WEB-INF/views/log/ntc/mailList.jsp +++ b/src/main/webapp/WEB-INF/views/log/ntc/mailList.jsp @@ -22,6 +22,49 @@ }); //筛选功能 filterActionInit(); + + //异步获取voip相关信息 + $("span[id^=open]").click(function(){ + var openId=$(this).attr("id"); + var closeId=$(this).attr("id").replace("open","close"); + var index=$(this).attr("id").replace("open",""); + $("#"+openId).hide(); + $("#"+closeId).show(); + var compileId=$(this).attr("compileId"); +// var cfgId=$(this).attr("cfgId"); + if($("#"+openId).parent().parent().next("tr").hasClass("child")){ + $("#"+openId).parent().parent().next("tr").show(); + }else{ + $.ajax({ + type:'post', + async:false, + url:'${ctx}/ntc/mail/ajaxMailSubList', + data:{"compileId":compileId,"index":index}, + dataType:"html", + success:function(data){ + var subTab=""+ + ""; + subTab+=""; + $("#"+openId).parent().parent().after(subTab); + $("div[name='tabTitle"+index+"']").get(0).click(); + } + }); + } + + }); + + $("span[id^=close]").on("click",function(){ + var closeId=$(this).attr("id"); + var openId=$(this).attr("id").replace("close","open"); + $("#"+closeId).hide(); + $("#"+openId).show(); + $("#"+closeId).parent().parent().next("tr").hide(); + }); }); @@ -167,7 +210,7 @@
"; + var html=""; + html+="
"; + html = html+data; + subTab=subTab+html; + subTab+="
- + @@ -211,6 +254,7 @@ diff --git a/src/main/webapp/WEB-INF/views/log/ntc/mmAvIpList.jsp b/src/main/webapp/WEB-INF/views/log/ntc/mmAvIpList.jsp index 26770d74b..d7901d132 100644 --- a/src/main/webapp/WEB-INF/views/log/ntc/mmAvIpList.jsp +++ b/src/main/webapp/WEB-INF/views/log/ntc/mmAvIpList.jsp @@ -168,7 +168,7 @@ $(document).ready(function(){
+ ${log.cfgId }
- + diff --git a/src/main/webapp/WEB-INF/views/log/ntc/mmAvUrlList.jsp b/src/main/webapp/WEB-INF/views/log/ntc/mmAvUrlList.jsp index 11383fea8..2fb534be0 100644 --- a/src/main/webapp/WEB-INF/views/log/ntc/mmAvUrlList.jsp +++ b/src/main/webapp/WEB-INF/views/log/ntc/mmAvUrlList.jsp @@ -167,7 +167,7 @@ $(document).ready(function(){
- + diff --git a/src/main/webapp/WEB-INF/views/log/ntc/mmFileDigestList.jsp b/src/main/webapp/WEB-INF/views/log/ntc/mmFileDigestList.jsp index b5b97459e..1a7e59907 100644 --- a/src/main/webapp/WEB-INF/views/log/ntc/mmFileDigestList.jsp +++ b/src/main/webapp/WEB-INF/views/log/ntc/mmFileDigestList.jsp @@ -20,7 +20,48 @@ $(document).ready(function(){ .attr("value",''); $("#searchForm")[0].reset(); }); + //异步获取voip相关信息 + $("span[id^=open]").click(function(){ + var openId=$(this).attr("id"); + var closeId=$(this).attr("id").replace("open","close"); + var index=$(this).attr("id").replace("open",""); + $("#"+openId).hide(); + $("#"+closeId).show(); + var compileId=$(this).attr("compileId"); +// var cfgId=$(this).attr("cfgId"); + if($("#"+openId).parent().parent().next("tr").hasClass("child")){ + $("#"+openId).parent().parent().next("tr").show(); + }else{ + $.ajax({ + type:'post', + async:false, + url:'${ctx}/ntc/fileTransfer/ajaxFileDigestSubIdList', + data:{"compileId":compileId,"index":index}, + dataType:"html", + success:function(data){ + var subTab=""+ + ""; + subTab+=""; + $("#"+openId).parent().parent().after(subTab); + $("div[name='tabTitle"+index+"']").get(0).click(); + } + }); + } + + }); + $("span[id^=close]").on("click",function(){ + var closeId=$(this).attr("id"); + var openId=$(this).attr("id").replace("close","open"); + $("#"+closeId).hide(); + $("#"+openId).show(); + $("#"+closeId).parent().parent().next("tr").hide(); + }); }); @@ -168,7 +209,7 @@ $(document).ready(function(){
"; + var html=""; + html+="
"; + html = html+data; + subTab=subTab+html; + subTab+="
- + @@ -213,6 +254,7 @@ $(document).ready(function(){ diff --git a/src/main/webapp/WEB-INF/views/log/ntc/mmPicIpList.jsp b/src/main/webapp/WEB-INF/views/log/ntc/mmPicIpList.jsp index 45a58fb4b..3cdeb0e7a 100644 --- a/src/main/webapp/WEB-INF/views/log/ntc/mmPicIpList.jsp +++ b/src/main/webapp/WEB-INF/views/log/ntc/mmPicIpList.jsp @@ -167,7 +167,7 @@ $(document).ready(function(){
+ ${log.cfgId }
- + diff --git a/src/main/webapp/WEB-INF/views/log/ntc/mmPicUrlList.jsp b/src/main/webapp/WEB-INF/views/log/ntc/mmPicUrlList.jsp index 3c54b0dd4..5d3a93714 100644 --- a/src/main/webapp/WEB-INF/views/log/ntc/mmPicUrlList.jsp +++ b/src/main/webapp/WEB-INF/views/log/ntc/mmPicUrlList.jsp @@ -164,7 +164,7 @@ $(document).ready(function(){
- + diff --git a/src/main/webapp/WEB-INF/views/log/ntc/mmPornAudioSampleList.jsp b/src/main/webapp/WEB-INF/views/log/ntc/mmPornAudioSampleList.jsp index 936c933dd..e291e0344 100644 --- a/src/main/webapp/WEB-INF/views/log/ntc/mmPornAudioSampleList.jsp +++ b/src/main/webapp/WEB-INF/views/log/ntc/mmPornAudioSampleList.jsp @@ -167,7 +167,7 @@ $(document).ready(function(){
- + diff --git a/src/main/webapp/WEB-INF/views/log/ntc/mmPornVideoSampleList.jsp b/src/main/webapp/WEB-INF/views/log/ntc/mmPornVideoSampleList.jsp index 424e810d4..6448689c5 100644 --- a/src/main/webapp/WEB-INF/views/log/ntc/mmPornVideoSampleList.jsp +++ b/src/main/webapp/WEB-INF/views/log/ntc/mmPornVideoSampleList.jsp @@ -167,7 +167,7 @@ $(document).ready(function(){
- + diff --git a/src/main/webapp/WEB-INF/views/log/ntc/mmSampleAudioList.jsp b/src/main/webapp/WEB-INF/views/log/ntc/mmSampleAudioList.jsp index bc6c97691..d414c41b4 100644 --- a/src/main/webapp/WEB-INF/views/log/ntc/mmSampleAudioList.jsp +++ b/src/main/webapp/WEB-INF/views/log/ntc/mmSampleAudioList.jsp @@ -224,7 +224,7 @@
- + diff --git a/src/main/webapp/WEB-INF/views/log/ntc/mmSampleFaceList.jsp b/src/main/webapp/WEB-INF/views/log/ntc/mmSampleFaceList.jsp index cb74747a8..f6584639a 100644 --- a/src/main/webapp/WEB-INF/views/log/ntc/mmSampleFaceList.jsp +++ b/src/main/webapp/WEB-INF/views/log/ntc/mmSampleFaceList.jsp @@ -167,7 +167,7 @@ $(document).ready(function(){
- + diff --git a/src/main/webapp/WEB-INF/views/log/ntc/mmSampleLogoList.jsp b/src/main/webapp/WEB-INF/views/log/ntc/mmSampleLogoList.jsp index 914e47346..c8446a73c 100644 --- a/src/main/webapp/WEB-INF/views/log/ntc/mmSampleLogoList.jsp +++ b/src/main/webapp/WEB-INF/views/log/ntc/mmSampleLogoList.jsp @@ -167,7 +167,7 @@ $(document).ready(function(){
- + diff --git a/src/main/webapp/WEB-INF/views/log/ntc/mmSamplePicList.jsp b/src/main/webapp/WEB-INF/views/log/ntc/mmSamplePicList.jsp index a23f4a536..bf1aab3e6 100644 --- a/src/main/webapp/WEB-INF/views/log/ntc/mmSamplePicList.jsp +++ b/src/main/webapp/WEB-INF/views/log/ntc/mmSamplePicList.jsp @@ -166,7 +166,7 @@ $(document).ready(function(){
- + diff --git a/src/main/webapp/WEB-INF/views/log/ntc/mmSampleSpeakerList.jsp b/src/main/webapp/WEB-INF/views/log/ntc/mmSampleSpeakerList.jsp index 628476b2e..77ea2bfc8 100644 --- a/src/main/webapp/WEB-INF/views/log/ntc/mmSampleSpeakerList.jsp +++ b/src/main/webapp/WEB-INF/views/log/ntc/mmSampleSpeakerList.jsp @@ -167,7 +167,7 @@ $(document).ready(function(){
- + diff --git a/src/main/webapp/WEB-INF/views/log/ntc/mmSampleVideoList.jsp b/src/main/webapp/WEB-INF/views/log/ntc/mmSampleVideoList.jsp index 8979ac207..9abf1b4e8 100644 --- a/src/main/webapp/WEB-INF/views/log/ntc/mmSampleVideoList.jsp +++ b/src/main/webapp/WEB-INF/views/log/ntc/mmSampleVideoList.jsp @@ -167,7 +167,7 @@ $(document).ready(function(){
- + diff --git a/src/main/webapp/WEB-INF/views/log/ntc/mmSampleVoipList.jsp b/src/main/webapp/WEB-INF/views/log/ntc/mmSampleVoipList.jsp index b7629237c..44f9f59c5 100644 --- a/src/main/webapp/WEB-INF/views/log/ntc/mmSampleVoipList.jsp +++ b/src/main/webapp/WEB-INF/views/log/ntc/mmSampleVoipList.jsp @@ -167,7 +167,7 @@ $(document).ready(function(){
- + diff --git a/src/main/webapp/WEB-INF/views/log/ntc/mmVoipAccountList.jsp b/src/main/webapp/WEB-INF/views/log/ntc/mmVoipAccountList.jsp index 8fc16e78f..8a2904329 100644 --- a/src/main/webapp/WEB-INF/views/log/ntc/mmVoipAccountList.jsp +++ b/src/main/webapp/WEB-INF/views/log/ntc/mmVoipAccountList.jsp @@ -167,7 +167,7 @@ $(document).ready(function(){
- + diff --git a/src/main/webapp/WEB-INF/views/log/ntc/mmVoipIpList.jsp b/src/main/webapp/WEB-INF/views/log/ntc/mmVoipIpList.jsp index 37c4038e2..3b1330fa5 100644 --- a/src/main/webapp/WEB-INF/views/log/ntc/mmVoipIpList.jsp +++ b/src/main/webapp/WEB-INF/views/log/ntc/mmVoipIpList.jsp @@ -20,6 +20,48 @@ $(document).ready(function(){ .attr("value",''); $("#searchForm")[0].reset(); }); + //异步获取voip相关信息 + $("span[id^=open]").click(function(){ + var openId=$(this).attr("id"); + var closeId=$(this).attr("id").replace("open","close"); + var index=$(this).attr("id").replace("open",""); + $("#"+openId).hide(); + $("#"+closeId).show(); + var compileId=$(this).attr("compileId"); +// var cfgId=$(this).attr("cfgId"); + if($("#"+openId).parent().parent().next("tr").hasClass("child")){ + $("#"+openId).parent().parent().next("tr").show(); + }else{ + $.ajax({ + type:'post', + async:false, + url:'${ctx}/ntc/av/ajaxVoipIpInfo', + data:{"compileId":compileId,"index":index}, + dataType:"html", + success:function(data){ + var subTab=""+ + ""; + subTab+=""; + $("#"+openId).parent().parent().after(subTab); + $("div[name='tabTitle"+index+"']").eq(0).click(); + } + }); + } + + }); + + $("span[id^=close]").on("click",function(){ + var closeId=$(this).attr("id"); + var openId=$(this).attr("id").replace("close","open"); + $("#"+closeId).hide(); + $("#"+openId).show(); + $("#"+closeId).parent().parent().next("tr").hide(); + }); }); @@ -167,7 +209,7 @@ $(document).ready(function(){
"; + var html=""; + html+="
"; + html = html+data; + subTab=subTab+html; + subTab+="
- + @@ -220,6 +262,7 @@ $(document).ready(function(){ diff --git a/src/main/webapp/WEB-INF/views/log/ntc/ntcStreamMedia.jsp b/src/main/webapp/WEB-INF/views/log/ntc/ntcStreamMedia.jsp index 298a8bc45..20c4a0825 100644 --- a/src/main/webapp/WEB-INF/views/log/ntc/ntcStreamMedia.jsp +++ b/src/main/webapp/WEB-INF/views/log/ntc/ntcStreamMedia.jsp @@ -20,7 +20,48 @@ $(document).ready(function(){ .attr("value",''); $("#searchForm")[0].reset(); }); + //异步获取voip相关信息 + $("span[id^=open]").click(function(){ + var openId=$(this).attr("id"); + var closeId=$(this).attr("id").replace("open","close"); + var index=$(this).attr("id").replace("open",""); + $("#"+openId).hide(); + $("#"+closeId).show(); + var compileId=$(this).attr("compileId"); +// var cfgId=$(this).attr("cfgId"); + if($("#"+openId).parent().parent().next("tr").hasClass("child")){ + $("#"+openId).parent().parent().next("tr").show(); + }else{ + $.ajax({ + type:'post', + async:false, + url:'${ctx}/ntc/av/ajaxAvContUrlList', + data:{"compileId":compileId,"index":index}, + dataType:"html", + success:function(data){ + var subTab=""+ + ""; + subTab+=""; + $("#"+openId).parent().parent().after(subTab); + $("div[name='tabTitle"+index+"']").eq(0).click(); + } + }); + } + + }); + $("span[id^=close]").on("click",function(){ + var closeId=$(this).attr("id"); + var openId=$(this).attr("id").replace("close","open"); + $("#"+closeId).hide(); + $("#"+openId).show(); + $("#"+closeId).parent().parent().next("tr").hide(); + }); }); @@ -167,7 +208,7 @@ $(document).ready(function(){
+ ${log.cfgId }
"; + var html=""; + html+="
"; + html = html+data; + subTab=subTab+html; + subTab+="
- + @@ -206,6 +247,7 @@ $(document).ready(function(){ diff --git a/src/main/webapp/WEB-INF/views/log/ntc/openVpnList.jsp b/src/main/webapp/WEB-INF/views/log/ntc/openVpnList.jsp index 600edf5d8..a85f07740 100644 --- a/src/main/webapp/WEB-INF/views/log/ntc/openVpnList.jsp +++ b/src/main/webapp/WEB-INF/views/log/ntc/openVpnList.jsp @@ -169,7 +169,7 @@ $(document).ready(function(){
+ ${log.cfgId }
- + diff --git a/src/main/webapp/WEB-INF/views/log/ntc/p2pList.jsp b/src/main/webapp/WEB-INF/views/log/ntc/p2pList.jsp index 581fd224a..85b8aa578 100644 --- a/src/main/webapp/WEB-INF/views/log/ntc/p2pList.jsp +++ b/src/main/webapp/WEB-INF/views/log/ntc/p2pList.jsp @@ -22,7 +22,49 @@ $("#searchForm")[0].reset(); }); //筛选功能 - filterActionInit(); + filterActionInit(); + //异步获取voip相关信息 + $("span[id^=open]").click(function(){ + var openId=$(this).attr("id"); + var closeId=$(this).attr("id").replace("open","close"); + var index=$(this).attr("id").replace("open",""); + $("#"+openId).hide(); + $("#"+closeId).show(); + var compileId=$(this).attr("compileId"); +// var cfgId=$(this).attr("cfgId"); + if($("#"+openId).parent().parent().next("tr").hasClass("child")){ + $("#"+openId).parent().parent().next("tr").show(); + }else{ + $.ajax({ + type:'post', + async:false, + url:'${ctx}/ntc/fileTransfer/ajaxP2pSubList', + data:{"compileId":compileId,"index":index}, + dataType:"html", + success:function(data){ + var subTab=""+ + ""; + subTab+=""; + $("#"+openId).parent().parent().after(subTab); + $("div[name='tabTitle"+index+"']").get(0).click(); + } + }); + } + + }); + + $("span[id^=close]").on("click",function(){ + var closeId=$(this).attr("id"); + var openId=$(this).attr("id").replace("close","open"); + $("#"+closeId).hide(); + $("#"+openId).show(); + $("#"+closeId).parent().parent().next("tr").hide(); + }); }); @@ -168,7 +210,7 @@
"; + var html=""; + html+="
"; + html = html+data; + subTab=subTab+html; + subTab+="
- + @@ -209,6 +251,7 @@ diff --git a/src/main/webapp/WEB-INF/views/log/ntc/pptpLogList.jsp b/src/main/webapp/WEB-INF/views/log/ntc/pptpLogList.jsp index 986f64264..799e6a3eb 100644 --- a/src/main/webapp/WEB-INF/views/log/ntc/pptpLogList.jsp +++ b/src/main/webapp/WEB-INF/views/log/ntc/pptpLogList.jsp @@ -166,7 +166,7 @@
+ ${log.cfgId }
- + diff --git a/src/main/webapp/WEB-INF/views/log/ntc/sshList.jsp b/src/main/webapp/WEB-INF/views/log/ntc/sshList.jsp index 7e8522e04..66db839c8 100644 --- a/src/main/webapp/WEB-INF/views/log/ntc/sshList.jsp +++ b/src/main/webapp/WEB-INF/views/log/ntc/sshList.jsp @@ -169,7 +169,7 @@ $(document).ready(function(){
- + diff --git a/src/main/webapp/WEB-INF/views/log/ntc/sslLogList.jsp b/src/main/webapp/WEB-INF/views/log/ntc/sslLogList.jsp index d58b91e74..0d1daaded 100644 --- a/src/main/webapp/WEB-INF/views/log/ntc/sslLogList.jsp +++ b/src/main/webapp/WEB-INF/views/log/ntc/sslLogList.jsp @@ -2,7 +2,11 @@ <%@ include file="/WEB-INF/include/taglib.jsp"%> - + @@ -77,7 +124,7 @@
- @@ -86,7 +133,7 @@
- @@ -176,7 +223,7 @@
- + @@ -218,6 +265,7 @@ diff --git a/src/main/webapp/WEB-INF/views/log/pxy/pxyHttpList.jsp b/src/main/webapp/WEB-INF/views/log/pxy/pxyHttpList.jsp index bdf549229..95a43ccaf 100644 --- a/src/main/webapp/WEB-INF/views/log/pxy/pxyHttpList.jsp +++ b/src/main/webapp/WEB-INF/views/log/pxy/pxyHttpList.jsp @@ -22,6 +22,48 @@ }); //筛选功能 filterActionInit(); + //异步获取voip相关信息 + $("span[id^=open]").click(function(){ + var openId=$(this).attr("id"); + var closeId=$(this).attr("id").replace("open","close"); + var index=$(this).attr("id").replace("open",""); + $("#"+openId).hide(); + $("#"+closeId).show(); + var compileId=$(this).attr("compileId"); +// var cfgId=$(this).attr("cfgId"); + if($("#"+openId).parent().parent().next("tr").hasClass("child")){ + $("#"+openId).parent().parent().next("tr").show(); + }else{ + $.ajax({ + type:'post', + async:false, + url:'${ctx}/proxy/control/httpRedirect/ajaxHttpSubList', + data:{"compileId":compileId,"index":index}, + dataType:"html", + success:function(data){ + var subTab=""+ + ""; + subTab+=""; + $("#"+openId).parent().parent().after(subTab); + $("div[name='tabTitle"+index+"']").get(0).click(); + } + }); + } + + }); + + $("span[id^=close]").on("click",function(){ + var closeId=$(this).attr("id"); + var openId=$(this).attr("id").replace("close","open"); + $("#"+closeId).hide(); + $("#"+openId).show(); + $("#"+closeId).parent().parent().next("tr").hide(); + }); }); @@ -154,7 +196,7 @@
+ ${log.cfgId }
"; + var html=""; + html+="
"; + html = html+data; + subTab=subTab+html; + subTab+="
- + @@ -207,6 +249,7 @@ diff --git a/src/main/webapp/static/global/scripts/common.js b/src/main/webapp/static/global/scripts/common.js index bdab68fc1..173fa5943 100644 --- a/src/main/webapp/static/global/scripts/common.js +++ b/src/main/webapp/static/global/scripts/common.js @@ -110,19 +110,19 @@ $(function(){ }); }); //表格中的title鼠标点击复制完整内容 - /*$("td[title]").on("click",function(){ + $("table.logTb td[title]").on("click",function(){ //$(this).attr("data-clipboard-action","copy"); $(this).attr("data-clipboard-text",$(this).attr("title")); var clipboard = new ClipboardJS('td[title]'); clipboard.on('success', function(e) { top.$.jBox.tip("Copyied!",'copy',{opacity:0.5,persistent:false}); - console.log(e); +// console.log(e); e.clearSelection(); }); clipboard.on('error', function(e) { console.log(e); }); - });*/ + }); var tree2 = $("select[name=lableTest]").treeMultiselect({ searchable: true, hideSidePanel:true, diff --git a/src/main/webapp/static/pages/scripts/pageLogs.js b/src/main/webapp/static/pages/scripts/pageLogs.js index 6271da2f6..970aa3380 100644 --- a/src/main/webapp/static/pages/scripts/pageLogs.js +++ b/src/main/webapp/static/pages/scripts/pageLogs.js @@ -1,4 +1,6 @@ $(document).ready(function() { + // 隱藏日誌詳情 + $("table.logTb .icon-book-open").hide(); // 界面鼠标悬停事件 /* $("table.logTb").find("td").not(":has(a)").bind("mouseover", function(){ var str = $(this).html(this.innerHTML.trim()).text(); From 3983ad4658dbc53088eb20619ba9b0297b188973 Mon Sep 17 00:00:00 2001 From: zhangwei Date: Wed, 28 Nov 2018 19:58:34 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E5=A2=9E=E5=8A=A0APP=E7=AD=96=E7=95=A5?= =?UTF-8?q?=EF=BC=8CAPP=E5=A4=9A=E5=9F=9F=E7=89=B9=E5=BE=81=E7=9A=84?= =?UTF-8?q?=E6=89=B9=E9=87=8F=E4=B8=8B=E5=8F=91=E6=95=B0=E6=8D=AE=E5=A4=84?= =?UTF-8?q?=E7=90=86=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ConfigSynchronizationDao.java | 8 +- .../ConfigSynchronizationDao.xml | 199 ++++- .../ConfigSynchronizationService.java | 843 +++++++++++++++++- 3 files changed, 990 insertions(+), 60 deletions(-) diff --git a/src/main/java/com/nis/web/dao/configuration/ConfigSynchronizationDao.java b/src/main/java/com/nis/web/dao/configuration/ConfigSynchronizationDao.java index 91abb322c..e8f1301b2 100644 --- a/src/main/java/com/nis/web/dao/configuration/ConfigSynchronizationDao.java +++ b/src/main/java/com/nis/web/dao/configuration/ConfigSynchronizationDao.java @@ -11,6 +11,7 @@ import com.nis.domain.basics.AsnIpCfg; import com.nis.domain.configuration.AppByteCfg; import com.nis.domain.configuration.AppComplexKeywordCfg; import com.nis.domain.configuration.AppDomainCfg; +import com.nis.domain.configuration.AppFeatureIndex; import com.nis.domain.configuration.AppHeaderCfg; import com.nis.domain.configuration.AppHttpCfg; import com.nis.domain.configuration.AppIdCfg; @@ -73,7 +74,6 @@ public interface ConfigSynchronizationDao { public List getStrList(@Param("tableName")String tableName,@Param("compileIds")List compileIds); public List getComplexStrList(@Param("tableName")String tableName,@Param("compileIds")List compileIds); public List getFileDigestList(@Param("tableName")String tableName,@Param("compileIds")List compileIds); - public List getDdosIpCfgList(BaseCfg entity); public List getAvFileCfgList(BaseCfg entity); @@ -83,4 +83,10 @@ public interface ConfigSynchronizationDao { public List getDnsStrategyList(BaseCfg entity); public List getDnsIpCfgList(BaseCfg entity); public List getIpPortListByService(BaseCfg entity); + + public List getAppPolicyList(BaseCfg entity); + public List getAppFeatureIndexList(BaseCfg entity); + public List getStrListByService(BaseCfg entity); + public List getComplexStrListByService(BaseCfg entity); + public List getAppIpPortList(@Param("tableName")String tableName,@Param("compileIds")List compileIds); } diff --git a/src/main/java/com/nis/web/dao/configuration/ConfigSynchronizationDao.xml b/src/main/java/com/nis/web/dao/configuration/ConfigSynchronizationDao.xml index 011d2209e..d2a854923 100644 --- a/src/main/java/com/nis/web/dao/configuration/ConfigSynchronizationDao.xml +++ b/src/main/java/com/nis/web/dao/configuration/ConfigSynchronizationDao.xml @@ -2,7 +2,7 @@ - - + + + select + , ,s.name as creator_name,u.name as auditor_name + + ,a.app_code,a.spec_service_id,a.behav_code + - from ip_port_cfg a + from ${tableName} a left join sys_user s on a.creator_id=s.id left join sys_user u on a.auditor_id=u.id @@ -1163,6 +1268,62 @@ ORDER BY a.CFG_ID + +
+ ${log.cfgId }