1.地址池配置表单格式修改;2.boxSolidCSS选择器修改;3.snat策略配置异步获取有效地址池信息;4.ftp、mail配置禁用reject动作;

This commit is contained in:
zhangwq
2018-12-04 16:42:37 +08:00
parent 32120c83dc
commit f3336efea1
9 changed files with 207 additions and 174 deletions

View File

@@ -24,9 +24,7 @@ import org.springframework.stereotype.Controller;
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.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
import com.nis.domain.Page;
@@ -34,7 +32,6 @@ import com.nis.domain.SysDataDictionaryItem;
import com.nis.domain.basics.PolicyGroupInfo;
import com.nis.domain.configuration.BaseIpCfg;
import com.nis.domain.configuration.IpAddrPoolCfg;
import com.nis.domain.configuration.IpMultiplexPoolCfg;
import com.nis.domain.configuration.IpPortCfg;
import com.nis.domain.configuration.IpReusePolicyCfg;
import com.nis.domain.configuration.UserManage;
@@ -167,23 +164,9 @@ public class IpMultiplexController extends CommonController {
// 获取用户信息 地址池信息
List<UserManage> users = userManageService.findUsers();
List<IpAddrPoolCfg> addrPools = ipAddrPoolCfgService.getEffectiveAddrPool();
List<IpAddrPoolCfg> addrPoolsNew=new ArrayList<>();
for (IpAddrPoolCfg addrPool : addrPools) {
Map<String, Object> params = new HashMap<String, Object>();
params.put("addr_pool_id", addrPool.getCfgId());
String url =Constants.IP_REUSE_CALL_CGI_URL ;
Map<String, Object> resultMap=ConfigServiceUtil.getCGIInfo(url, Constants.IP_NUM_GET, params);
if(!StringUtil.isEmpty(resultMap)
&& !StringUtil.isEmpty(resultMap.get("num"))
&& Integer.parseInt(resultMap.get("num").toString()) > 0) {
addrPoolsNew.add(addrPool);
}
}
model.addAttribute("_cfg", cfg);
model.addAttribute("users", users);
model.addAttribute("addrPools", addrPoolsNew);
model.addAttribute("urlPrefix","/manipulation/ipmulitiplex");
return "/cfg/manipulation/ipmulitiplex/snatPolicyForm2";
}
@@ -250,6 +233,31 @@ public class IpMultiplexController extends CommonController {
return "redirect:" + adminPath +"/manipulation/ipmulitiplex/snatPolicyList?functionId="+functionId;
}
/**
* 异步获取地址池信息
* @param request
* @param response
* @return
*/
@ResponseBody
@RequestMapping(value = {"/ajaxGetAddrPools"})
public List<IpAddrPoolCfg> ajaxGetAddrPools(HttpServletRequest request, HttpServletResponse response){
List<IpAddrPoolCfg> addrPools = ipAddrPoolCfgService.getEffectiveAddrPool();
List<IpAddrPoolCfg> addrPoolsNew=new ArrayList<>();
for (IpAddrPoolCfg addrPool : addrPools) {
Map<String, Object> params = new HashMap<String, Object>();
params.put("addr_pool_id", addrPool.getCfgId());
String url =Constants.IP_REUSE_CALL_CGI_URL ;
Map<String, Object> resultMap=ConfigServiceUtil.getCGIInfo(url, Constants.IP_NUM_GET, params);
if(!StringUtil.isEmpty(resultMap)
&& !StringUtil.isEmpty(resultMap.get("num"))
&& Integer.parseInt(resultMap.get("num").toString()) > 0) {
addrPoolsNew.add(addrPool);
}
}
return addrPoolsNew;
}
@RequestMapping(value = {"/dnatPolicyList"})
public String dnatPolicyList(String cfgName,Model model,@ModelAttribute("cfg")IpPortCfg cfg,HttpServletRequest request,HttpServletResponse response) {
this._ipList(cfgName,model, cfg, request, response);