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 9f29268e3..b5f41e91b 100644 --- a/src/main/java/com/nis/web/controller/configuration/AppCfgController.java +++ b/src/main/java/com/nis/web/controller/configuration/AppCfgController.java @@ -12,6 +12,7 @@ import java.util.Set; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import org.apache.commons.collections.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.taglibs.standard.functions.Functions; @@ -153,7 +154,7 @@ public class AppCfgController extends BaseController { 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) { + if (CollectionUtils.isNotEmpty(cfg.getIpPortList())) { String cfgType = null; for (IpPortCfg ip : cfg.getIpPortList()) { if (!ip.getCfgType().equals(cfgType)) { @@ -162,7 +163,7 @@ public class AppCfgController extends BaseController { } } } - if (cfg.getNtcSubscribeIdCfgList() != null) { + if (CollectionUtils.isNotEmpty(cfg.getNtcSubscribeIdCfgList())) { String cfgType = null; for (NtcSubscribeIdCfg ntc : cfg.getNtcSubscribeIdCfgList()) { if (!ntc.getCfgType().equals(cfgType)) { 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 a39221b38..5a0dd7b31 100644 --- a/src/main/java/com/nis/web/controller/configuration/EncryptedTunnelBehaviorController.java +++ b/src/main/java/com/nis/web/controller/configuration/EncryptedTunnelBehaviorController.java @@ -11,6 +11,7 @@ import java.util.Set; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import org.apache.commons.collections.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.BeanUtils; @@ -112,7 +113,7 @@ public class EncryptedTunnelBehaviorController extends BaseController { 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) { + if (CollectionUtils.isNotEmpty(cfg.getIpPortList())) { String cfgType = null; for (IpPortCfg ip : cfg.getIpPortList()) { if (!ip.getCfgType().equals(cfgType)) { @@ -121,7 +122,7 @@ public class EncryptedTunnelBehaviorController extends BaseController { } } } - if (cfg.getNtcSubscribeIdCfgList() != null) { + if (CollectionUtils.isNotEmpty(cfg.getNtcSubscribeIdCfgList())) { String cfgType = null; for (NtcSubscribeIdCfg ntc : cfg.getNtcSubscribeIdCfgList()) { if (!ntc.getCfgType().equals(cfgType)) { diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appPolicySubList.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appPolicySubList.jsp index 8bb5b5574..069eb0bc9 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appPolicySubList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appPolicySubList.jsp @@ -11,7 +11,7 @@ - +
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 d9004c2e3..4c8ac1811 100644 --- a/src/main/webapp/WEB-INF/views/cfg/av/fileSampleForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/av/fileSampleForm.jsp @@ -21,7 +21,6 @@ $(function(){ fileType=["mp4","flv","asf","wmv","avi","mpeg","mov","dat","m4v","m4p","m4b","webm","wav","mp3"]; } $("#fileNoteInfo").attr("title",": "+fileType); - switchIpType($("select[name$='ipType']")); areaControlInit(); $("input[name='isAreaEffective']").on('change',function(){ var val=$(this).val(); @@ -38,9 +37,6 @@ $(function(){ $("#areaIsp").addClass("hidden"); } }); - $("select[name$='ipType']").on("change",function(){ - switchIpType($(this)); - }); $("#uploadSrc,#srcFileInfo").on('click',function(){ $("#srcFile").trigger("click"); 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 509e69711..38b01b215 100644 --- a/src/main/webapp/WEB-INF/views/cfg/av/signSampleForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/av/signSampleForm.jsp @@ -7,7 +7,6 @@