分类性质标签、地域运营商作用域:融合自定义显示,添加排序,优化代码,
特定服务器管理:修正列表分页显示,条件查询,添加自定义显示,添加排序,新增修改页面添加表单校验, 协议ip配置:修正条件查询,添加自定义显示,添加排序,新增修改页面添加表单校验(ipV4\ipV6地址及掩码校验,端口校验)
This commit is contained in:
@@ -13,6 +13,7 @@ import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
@@ -57,13 +58,13 @@ public class SpecificServiceHostCfgController extends BaseController {
|
||||
List<String> listSrcIp = Lists.newArrayList();
|
||||
List<String> listDstIp = Lists.newArrayList();
|
||||
for(SpecificServiceHostCfg ssh:list){
|
||||
if(ssh!=null&ssh.getSpecServiceId()!=null){
|
||||
if(ssh!=null&&ssh.getSpecServiceId()!=null&&(!listSpecServiceId.contains(ssh.getSpecServiceId()))){
|
||||
listSpecServiceId.add(ssh.getSpecServiceId());
|
||||
}
|
||||
if(ssh!=null&ssh.getSrcIp()!=null){
|
||||
if(ssh!=null&&ssh.getSrcIp()!=null&&(!listSrcIp.contains(ssh.getSrcIp()))){
|
||||
listSrcIp.add(ssh.getSrcIp());
|
||||
}
|
||||
if(ssh!=null&ssh.getDstIp()!=null){
|
||||
if(ssh!=null&&ssh.getDstIp()!=null&&(!listDstIp.contains(ssh.getDstIp()))){
|
||||
listDstIp.add(ssh.getDstIp());
|
||||
}
|
||||
}
|
||||
@@ -105,7 +106,7 @@ public class SpecificServiceHostCfgController extends BaseController {
|
||||
e.printStackTrace();
|
||||
addMessage(redirectAttributes, "保存失败!");
|
||||
}
|
||||
return "redirect:"+adminPath+"/specific/specificServiceHostCfgList";
|
||||
return "redirect:"+adminPath+"/specific/specificServiceHostCfg/list";
|
||||
}
|
||||
/**
|
||||
* 删除
|
||||
@@ -126,5 +127,23 @@ public class SpecificServiceHostCfgController extends BaseController {
|
||||
|
||||
return "redirect:"+adminPath+"/specific/specificServiceHostCfg/list";
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验spec_service_id重复
|
||||
* @param newId
|
||||
* @param oldId
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequestMapping(value = "isSpecServiceIdRepeat")
|
||||
public boolean isSpecServiceIdRepeat(String newId,String oldId){
|
||||
if(oldId!=null){
|
||||
oldId.trim().equals(newId);
|
||||
return true;
|
||||
}else{
|
||||
SpecificServiceHostCfg sshc = specificServiceHostCfgService.getBySpecServiceId(Integer.valueOf(newId));
|
||||
if(sshc==null){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user