(1)删除调用switchIpType方法的页面相关代码

(2)Stream列表页面展示表单Block,ratelimt有定时任务没有IP时的错位问题
This commit is contained in:
wangxin
2019-04-22 11:13:26 +08:00
committed by duandongmei
parent 45a99aa7ab
commit db040c2752
8 changed files with 8 additions and 24 deletions

View File

@@ -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<String[]> 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)) {

View File

@@ -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<String[]> 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)) {

View File

@@ -11,7 +11,7 @@
</style>
</head>
<c:if test="${fn:length(tabList)==0}">
<c:if test="${fn:length(tabList)==0 and empty _cfg.schedule}">
<div id="NTC_UNIVERSAL_IPTitle${index}" onclick="switchSubCfgTabInfo('NTC_UNIVERSAL_IP',${index})"
class="col-md-1 tabInfo badge-info" name="tabTitle">
<spring:message code='NTC_UNIVERSAL_IP' />

View File

@@ -21,7 +21,6 @@ $(function(){
fileType=["mp4","flv","asf","wmv","avi","mpeg","mov","dat","m4v","m4p","m4b","webm","wav","mp3"];
}
$("#fileNoteInfo").attr("title","<spring:message code='select_file'/>: "+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");

View File

@@ -7,7 +7,6 @@
<script src="${pageContext.request.contextPath}/static/global/plugins/bootstrap-switch/js/bootstrap-switch.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(function(){
switchIpType($("select[name$='ipType']"));
areaControlInit();
$("input[name='isAreaEffective']").on('change',function(){
var val=$(this).val();
@@ -24,9 +23,6 @@ $(function(){
$("#areaIsp").addClass("hidden");
}
});
$("select[name$='ipType']").on("change",function(){
switchIpType($(this));
});
$("input[name='areaType']").on('change',function(){
var val=$(this).val();
if($(this).is(":visible")){

View File

@@ -11,7 +11,7 @@
</style>
</head>
<c:if test="${fn:length(tabList)==0}">
<c:if test="${fn:length(tabList)==0 and empty _cfg.schedule}">
<div id="NTC_UNIVERSAL_IPTitle${index}" onclick="switchSubCfgTabInfo('NTC_UNIVERSAL_IP',${index})"
class="col-md-1 tabInfo badge-info" name="tabTitle">
<spring:message code='NTC_UNIVERSAL_IP' />

View File

@@ -8,7 +8,6 @@
rel="stylesheet" />
<script type="text/javascript">
$(function() {
switchIpType($("select[name$='ipType']"));
areaControlInit();
$("select[name='cfgType']").on('change', function() {
var val = $(this).val();
@@ -48,9 +47,6 @@
$("#areaIp").addClass("hidden");
}
});
$("select[name$='ipType']").on("change", function() {
switchIpType($(this));
});
$("#ipCfgFrom").validate(
{
errorPlacement : function(error, element) {

View File

@@ -5,7 +5,6 @@
<title><spring:message code="${cfgName}"></spring:message></title>
<script type="text/javascript">
$(function(){
switchIpType($("select[name$='ipType']"));
areaControlInit();
$("[name^='ipCfg']").attr("disabled",true);
$("[name^='stringCfg']").attr("disabled",true);
@@ -168,11 +167,6 @@ $(function(){
}
});
$(".ipType").on("change",function(){
var tableName=$(this).attr("name").replace(".ipType","");
switchIpType($(".ipType"));
});
});
</script>
</head>