(1)IP类配置表单初始化时设置协议ID
(2)IP白名单IP/端口默认值初始化方法修改
This commit is contained in:
@@ -322,6 +322,15 @@ public class BaseController {
|
|||||||
model.addAttribute("regionList", regionList);
|
model.addAttribute("regionList", regionList);
|
||||||
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(cfg.getFunctionId());
|
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(cfg.getFunctionId());
|
||||||
model.addAttribute("serviceList", serviceList);
|
model.addAttribute("serviceList", serviceList);
|
||||||
|
//ip配置设置protocolId
|
||||||
|
if(cfg instanceof BaseIpCfg){
|
||||||
|
for(FunctionServiceDict dict:serviceList){
|
||||||
|
if(cfg.getFunctionId().intValue()==dict.getFunctionId().intValue()){
|
||||||
|
((BaseIpCfg) cfg).setProtocolId(dict.getProtocolId().intValue());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
protected void initUpdateFormCondition(Model model,BaseCfg cfg){
|
protected void initUpdateFormCondition(Model model,BaseCfg cfg){
|
||||||
//查询配置对应的地域ip
|
//查询配置对应的地域ip
|
||||||
|
|||||||
@@ -64,6 +64,7 @@ public class WhiteListController extends BaseController{
|
|||||||
IpPortCfg cfg=new IpPortCfg();
|
IpPortCfg cfg=new IpPortCfg();
|
||||||
cfg.initDefaultValueImpl();
|
cfg.initDefaultValueImpl();
|
||||||
cfg.setFunctionId(entity.getFunctionId());
|
cfg.setFunctionId(entity.getFunctionId());
|
||||||
|
cfg.setProtocolId(entity.getProtocolId());
|
||||||
model.addAttribute("_cfg", cfg);
|
model.addAttribute("_cfg", cfg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<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']"));
|
switchIpInfo($("select[name$='ipType']"),"ipType");
|
||||||
$("input[name='isAreaEffective']").on('change',function(){
|
$("input[name='isAreaEffective']").on('change',function(){
|
||||||
var val=$(this).val();
|
var val=$(this).val();
|
||||||
if(val==1){
|
if(val==1){
|
||||||
@@ -40,7 +40,13 @@ $(function(){
|
|||||||
window.history.back();
|
window.history.back();
|
||||||
});
|
});
|
||||||
$("select[name$='ipType']").on("change",function(){
|
$("select[name$='ipType']").on("change",function(){
|
||||||
switchIpType($(this));
|
switchIpInfo(this,"ipType");
|
||||||
|
});
|
||||||
|
$("select[name$='ipPattern']").on("change",function(){
|
||||||
|
switchIpInfo(this,"ipPattern");
|
||||||
|
});
|
||||||
|
$("select[name$='portPattern']").on("change",function(){
|
||||||
|
switchIpInfo(this,"portPattern");
|
||||||
});
|
});
|
||||||
$(".action").on("change",function(){
|
$(".action").on("change",function(){
|
||||||
$("#serviceId").val($(this).attr("serviceId"));
|
$("#serviceId").val($(this).attr("serviceId"));
|
||||||
|
|||||||
Reference in New Issue
Block a user