(1)删除调用switchIpType方法的页面相关代码
(2)Stream列表页面展示表单Block,ratelimt有定时任务没有IP时的错位问题
This commit is contained in:
@@ -12,6 +12,7 @@ import java.util.Set;
|
|||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
import org.apache.taglibs.standard.functions.Functions;
|
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) {
|
public String ajaxSslSubList(Model model, Long cfgId, Integer index, Integer compileId) {
|
||||||
AppPolicyCfg cfg = appCfgService.getAppPolicyCfg(cfgId, compileId);
|
AppPolicyCfg cfg = appCfgService.getAppPolicyCfg(cfgId, compileId);
|
||||||
List<String[]> tabList = new ArrayList();
|
List<String[]> tabList = new ArrayList();
|
||||||
if (cfg.getIpPortList() != null) {
|
if (CollectionUtils.isNotEmpty(cfg.getIpPortList())) {
|
||||||
String cfgType = null;
|
String cfgType = null;
|
||||||
for (IpPortCfg ip : cfg.getIpPortList()) {
|
for (IpPortCfg ip : cfg.getIpPortList()) {
|
||||||
if (!ip.getCfgType().equals(cfgType)) {
|
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;
|
String cfgType = null;
|
||||||
for (NtcSubscribeIdCfg ntc : cfg.getNtcSubscribeIdCfgList()) {
|
for (NtcSubscribeIdCfg ntc : cfg.getNtcSubscribeIdCfgList()) {
|
||||||
if (!ntc.getCfgType().equals(cfgType)) {
|
if (!ntc.getCfgType().equals(cfgType)) {
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import java.util.Set;
|
|||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
import org.springframework.beans.BeanUtils;
|
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) {
|
public String ajaxSslSubList(Model model, Long cfgId, Integer index, Integer compileId) {
|
||||||
AppPolicyCfg cfg = appCfgService.getAppPolicyCfg(cfgId, compileId);
|
AppPolicyCfg cfg = appCfgService.getAppPolicyCfg(cfgId, compileId);
|
||||||
List<String[]> tabList = new ArrayList();
|
List<String[]> tabList = new ArrayList();
|
||||||
if (cfg.getIpPortList() != null) {
|
if (CollectionUtils.isNotEmpty(cfg.getIpPortList())) {
|
||||||
String cfgType = null;
|
String cfgType = null;
|
||||||
for (IpPortCfg ip : cfg.getIpPortList()) {
|
for (IpPortCfg ip : cfg.getIpPortList()) {
|
||||||
if (!ip.getCfgType().equals(cfgType)) {
|
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;
|
String cfgType = null;
|
||||||
for (NtcSubscribeIdCfg ntc : cfg.getNtcSubscribeIdCfgList()) {
|
for (NtcSubscribeIdCfg ntc : cfg.getNtcSubscribeIdCfgList()) {
|
||||||
if (!ntc.getCfgType().equals(cfgType)) {
|
if (!ntc.getCfgType().equals(cfgType)) {
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
</style>
|
</style>
|
||||||
</head>
|
</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})"
|
<div id="NTC_UNIVERSAL_IPTitle${index}" onclick="switchSubCfgTabInfo('NTC_UNIVERSAL_IP',${index})"
|
||||||
class="col-md-1 tabInfo badge-info" name="tabTitle">
|
class="col-md-1 tabInfo badge-info" name="tabTitle">
|
||||||
<spring:message code='NTC_UNIVERSAL_IP' />
|
<spring:message code='NTC_UNIVERSAL_IP' />
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ $(function(){
|
|||||||
fileType=["mp4","flv","asf","wmv","avi","mpeg","mov","dat","m4v","m4p","m4b","webm","wav","mp3"];
|
fileType=["mp4","flv","asf","wmv","avi","mpeg","mov","dat","m4v","m4p","m4b","webm","wav","mp3"];
|
||||||
}
|
}
|
||||||
$("#fileNoteInfo").attr("title","<spring:message code='select_file'/>: "+fileType);
|
$("#fileNoteInfo").attr("title","<spring:message code='select_file'/>: "+fileType);
|
||||||
switchIpType($("select[name$='ipType']"));
|
|
||||||
areaControlInit();
|
areaControlInit();
|
||||||
$("input[name='isAreaEffective']").on('change',function(){
|
$("input[name='isAreaEffective']").on('change',function(){
|
||||||
var val=$(this).val();
|
var val=$(this).val();
|
||||||
@@ -38,9 +37,6 @@ $(function(){
|
|||||||
$("#areaIsp").addClass("hidden");
|
$("#areaIsp").addClass("hidden");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$("select[name$='ipType']").on("change",function(){
|
|
||||||
switchIpType($(this));
|
|
||||||
});
|
|
||||||
$("#uploadSrc,#srcFileInfo").on('click',function(){
|
$("#uploadSrc,#srcFileInfo").on('click',function(){
|
||||||
$("#srcFile").trigger("click");
|
$("#srcFile").trigger("click");
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,6 @@
|
|||||||
<script src="${pageContext.request.contextPath}/static/global/plugins/bootstrap-switch/js/bootstrap-switch.min.js" type="text/javascript"></script>
|
<script src="${pageContext.request.contextPath}/static/global/plugins/bootstrap-switch/js/bootstrap-switch.min.js" type="text/javascript"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(function(){
|
$(function(){
|
||||||
switchIpType($("select[name$='ipType']"));
|
|
||||||
areaControlInit();
|
areaControlInit();
|
||||||
$("input[name='isAreaEffective']").on('change',function(){
|
$("input[name='isAreaEffective']").on('change',function(){
|
||||||
var val=$(this).val();
|
var val=$(this).val();
|
||||||
@@ -24,9 +23,6 @@ $(function(){
|
|||||||
$("#areaIsp").addClass("hidden");
|
$("#areaIsp").addClass("hidden");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$("select[name$='ipType']").on("change",function(){
|
|
||||||
switchIpType($(this));
|
|
||||||
});
|
|
||||||
$("input[name='areaType']").on('change',function(){
|
$("input[name='areaType']").on('change',function(){
|
||||||
var val=$(this).val();
|
var val=$(this).val();
|
||||||
if($(this).is(":visible")){
|
if($(this).is(":visible")){
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
</style>
|
</style>
|
||||||
</head>
|
</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})"
|
<div id="NTC_UNIVERSAL_IPTitle${index}" onclick="switchSubCfgTabInfo('NTC_UNIVERSAL_IP',${index})"
|
||||||
class="col-md-1 tabInfo badge-info" name="tabTitle">
|
class="col-md-1 tabInfo badge-info" name="tabTitle">
|
||||||
<spring:message code='NTC_UNIVERSAL_IP' />
|
<spring:message code='NTC_UNIVERSAL_IP' />
|
||||||
|
|||||||
@@ -8,7 +8,6 @@
|
|||||||
rel="stylesheet" />
|
rel="stylesheet" />
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(function() {
|
$(function() {
|
||||||
switchIpType($("select[name$='ipType']"));
|
|
||||||
areaControlInit();
|
areaControlInit();
|
||||||
$("select[name='cfgType']").on('change', function() {
|
$("select[name='cfgType']").on('change', function() {
|
||||||
var val = $(this).val();
|
var val = $(this).val();
|
||||||
@@ -48,9 +47,6 @@
|
|||||||
$("#areaIp").addClass("hidden");
|
$("#areaIp").addClass("hidden");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$("select[name$='ipType']").on("change", function() {
|
|
||||||
switchIpType($(this));
|
|
||||||
});
|
|
||||||
$("#ipCfgFrom").validate(
|
$("#ipCfgFrom").validate(
|
||||||
{
|
{
|
||||||
errorPlacement : function(error, element) {
|
errorPlacement : function(error, element) {
|
||||||
|
|||||||
@@ -5,7 +5,6 @@
|
|||||||
<title><spring:message code="${cfgName}"></spring:message></title>
|
<title><spring:message code="${cfgName}"></spring:message></title>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(function(){
|
$(function(){
|
||||||
switchIpType($("select[name$='ipType']"));
|
|
||||||
areaControlInit();
|
areaControlInit();
|
||||||
$("[name^='ipCfg']").attr("disabled",true);
|
$("[name^='ipCfg']").attr("disabled",true);
|
||||||
$("[name^='stringCfg']").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>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
|||||||
Reference in New Issue
Block a user