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