From 601c4d686ff0700ce35e906fa00387f602f034de Mon Sep 17 00:00:00 2001 From: zhangwei Date: Tue, 12 Jun 2018 10:10:41 +0800 Subject: [PATCH] =?UTF-8?q?http=E9=85=8D=E7=BD=AE=E8=A1=A8=E5=8D=95?= =?UTF-8?q?=E7=95=8C=E9=9D=A2=E5=8F=82=E6=95=B0=E5=A4=84=E7=90=86=E4=BC=98?= =?UTF-8?q?=E5=8C=96=EF=BC=8C=E5=8F=82=E6=95=B0=E6=96=87=E4=BB=B6=E4=B8=8E?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=BA=93=E5=AD=97=E5=85=B8=E9=85=8D=E5=90=88?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhangwei --- .../configuration/ntc/WebsiteController.java | 8 ++++ src/main/resources/nis.properties | 8 ++-- .../WEB-INF/views/cfg/website/httpForm.jsp | 37 ++++++++++++++----- 3 files changed, 40 insertions(+), 13 deletions(-) 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 874e3f412..afbf124cb 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 @@ -92,6 +92,14 @@ public class WebsiteController extends BaseController{ resBodyCfg.setCfgType(Constants.HTTP_RES_BODY_REGION); entity.setHttpResBody(resBodyCfg); + int httpReqCfgNum = entity.getIpPortList().size()+ + entity.getHttpUrlList().size()+ + entity.getHttpReqBodyList().size()+ + entity.getHttpReqHdrList().size(); + int httpResCfgNum = entity.getHttpResHdrList().size()+ + entity.getHttpResBodyList().size(); + model.addAttribute("httpReqCfgNum", httpReqCfgNum); + model.addAttribute("httpResCfgNum", httpResCfgNum); if(entity.getIpPortList().size()==0){ entity.getIpPortList().add(ipCfg); } diff --git a/src/main/resources/nis.properties b/src/main/resources/nis.properties index 544e643bb..9bcfe7722 100644 --- a/src/main/resources/nis.properties +++ b/src/main/resources/nis.properties @@ -265,12 +265,12 @@ SERVICE_DICT_ITM_TYPE=SERVICE_DICT_ITM_TYPE SYS_DICT_ITM_TYPE=SYS_DICT_ITM_TYPE area_region=NTC_IP_RANGE protocol_num_region=NTC_UNIVERSAL_PROTO_TYPE -http_ip_region=http_ip -http_req_hdr_region=http_req_hdr +http_ip_region=NTC_UNIVERSAL_IP +http_req_hdr_region=NTC_HTTP_REQ_HDR http_req_body_region=NTC_HTTP_REQ_BODY -http_res_hdr_region=http_res_hdr +http_res_hdr_region=NTC_HTTP_RES_HDR http_res_body_region=NTC_HTTP_RES_BODY -http_url_region=http_url +http_url_region=NTC_HTTP_URL voip_ip=av_voip_ip voip_account=av_voip_account ssl_sni_region=ssl_sni 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 29922dc9b..1b5fe82b4 100644 --- a/src/main/webapp/WEB-INF/views/cfg/website/httpForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/website/httpForm.jsp @@ -22,9 +22,26 @@ }); $("#serviceId").val($(".action:checked").attr("serviceId")); $("#protocolId").val($(".action:checked").attr("protocolId")); - $(".httpResCfg").addClass("hidden").addClass("disabled"); - $(".httpReqCfg").removeClass("hidden").removeClass( - "disabled"); + if($("#cfgId").val()!=""){ + if($("#httpReqCfgNum").val()>0){ + $("a[for='httpReqCfg']").parent().addClass("active"); + $("a[for='httpResCfg']").parent().removeClass("active"); + $(".httpResCfg").addClass("hidden").addClass("disabled"); + $(".httpReqCfg").removeClass("hidden").removeClass( + "disabled"); + } + if($("#httpResCfgNum").val()>0){ + $("a[for='httpResCfg']").parent().addClass("active"); + $("a[for='httpReqCfg']").parent().removeClass("active"); + $(".httpReqCfg").addClass("hidden").addClass("disabled"); + $(".httpResCfg").removeClass("hidden").removeClass( + "disabled"); + } + }else{ + $(".httpResCfg").addClass("hidden").addClass("disabled"); + $(".httpReqCfg").removeClass("hidden").removeClass( + "disabled"); + } $("li").on("click", function() { var region = ($(this).find("a").attr("for")); if(region=="httpReqCfg"){ @@ -144,11 +161,13 @@
- + + +
@@ -233,7 +252,7 @@ - +
@@ -256,7 +275,7 @@
- +
@@ -278,7 +297,7 @@
- +
@@ -301,7 +320,7 @@ - +
@@ -323,7 +342,7 @@
- +