日志查询添加配置信息
This commit is contained in:
@@ -234,6 +234,45 @@ public class IpMultiplexController extends CommonController {
|
||||
return "redirect:" + adminPath +"/manipulation/ipmulitiplex/snatPolicyList?functionId="+functionId;
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(value = {"/ajaxSnatInfo"})
|
||||
public String ajaxSnatInfo(Model model,Long cfgId,Integer index,Integer compileId) {
|
||||
IpReusePolicyCfg cfg = ipMultiplexService.getSnatCfg(cfgId, compileId);
|
||||
List<String[]> tabList = new ArrayList();
|
||||
String cfgType = null;
|
||||
if(!cfg.getCfgType().equals(cfgType)){
|
||||
tabList.add(new String[]{"1",cfg.getCfgType()});
|
||||
cfgType = cfg.getCfgType();
|
||||
}
|
||||
|
||||
List<UserManage> users = userManageService.findUsers();
|
||||
List<IpAddrPoolCfg> addrPools = ipAddrPoolCfgService.getEffectiveAddrPool();
|
||||
model.addAttribute("users", users);
|
||||
model.addAttribute("addrPools", addrPools);
|
||||
model.addAttribute("_cfg", cfg);
|
||||
model.addAttribute("index", index);
|
||||
model.addAttribute("tabList", tabList);
|
||||
return "/cfg/manipulation/ipmulitiplex/snatSubList";
|
||||
}
|
||||
|
||||
|
||||
|
||||
@RequestMapping(value = {"/ajaxDnatInfo"})
|
||||
public String ajaxDnatInfo(Model model,Long cfgId,Integer index,Integer compileId) {
|
||||
IpReuseDnatPolicyCfg cfg = ipMultiplexService.getDnatCfg(cfgId, compileId);
|
||||
List<String[]> tabList = new ArrayList();
|
||||
String cfgType = null;
|
||||
if(!cfg.getCfgType().equals(cfgType)){
|
||||
tabList.add(new String[]{"1",cfg.getCfgType()});
|
||||
cfgType = cfg.getCfgType();
|
||||
}
|
||||
model.addAttribute("_cfg", cfg);
|
||||
model.addAttribute("index", index);
|
||||
model.addAttribute("tabList", tabList);
|
||||
return "/cfg/manipulation/ipmulitiplex/dnatSubList";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 异步获取地址池信息
|
||||
* @param request
|
||||
|
||||
@@ -132,6 +132,8 @@ public class FileTransferCfgController extends BaseController{
|
||||
model.addAttribute("tabList", tabList);
|
||||
return "/cfg/fileTransfer/ftpSubList";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 做删除操作
|
||||
* @param isValid
|
||||
@@ -371,6 +373,24 @@ public class FileTransferCfgController extends BaseController{
|
||||
return "/cfg/fileTransfer/fileDigestSubList";
|
||||
}
|
||||
|
||||
@RequestMapping(value = {"ajaxFileDigestLogSubIdList"})
|
||||
public String ajaxFileDigestLogSubIdList(Model model,Long cfgId,Integer index,Integer compileId) {
|
||||
FileDigestCfg cfg = fileTransferCfgService.getFileDigestSubIdCfg(cfgId,compileId);
|
||||
List<String[]> tabList = new ArrayList();
|
||||
String cfgType = null;
|
||||
if(!cfg.getCfgType().equals(cfgType)){
|
||||
tabList.add(new String[]{"1",cfg.getCfgType()});
|
||||
cfgType = cfg.getCfgType();
|
||||
}
|
||||
model.addAttribute("_cfg", cfg);
|
||||
model.addAttribute("index", index);
|
||||
model.addAttribute("tabList", tabList);
|
||||
return "/cfg/fileTransfer/fileDigestLogSubList";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@RequestMapping(value = {"p2pList"})
|
||||
public String p2pList(Model model,@ModelAttribute("cfg")CfgIndexInfo cfg,HttpServletRequest request,HttpServletResponse response) {
|
||||
Page<CfgIndexInfo> searchPage=new Page<CfgIndexInfo>(request,response,"a");
|
||||
|
||||
@@ -40,5 +40,8 @@ public interface IpMultiplexDao extends CrudDao<IpMultiplexDao>{
|
||||
List<BaseIpCfg> findPageDnat(IpReuseDnatPolicyCfg entity);
|
||||
|
||||
List<IpReuseDnatPolicyCfg> findDnatList(@Param("cfgId")Long cfgId, @Param("isValid")Integer isValid);
|
||||
|
||||
|
||||
IpReusePolicyCfg getSnatCfg(@Param("cfgId")Long cfgId,@Param("compileId")Integer compileId);
|
||||
|
||||
IpReuseDnatPolicyCfg getDnatCfg(@Param("cfgId")Long cfgId,@Param("compileId")Integer compileId);
|
||||
}
|
||||
|
||||
@@ -711,4 +711,32 @@
|
||||
</where>
|
||||
ORDER BY a.cfg_id
|
||||
</select>
|
||||
|
||||
<select id="getSnatCfg" resultMap="policyMap">
|
||||
select
|
||||
<include refid="policyColumns"></include>
|
||||
from ip_reuse_policy_cfg r
|
||||
<where>
|
||||
<if test="cfgId !=null">
|
||||
r.CFG_ID = #{cfgId,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="compileId != null">
|
||||
AND r.COMPILE_ID=#{compileId,jdbcType=INTEGER}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="getDnatCfg" resultMap="dnatPolicyMap">
|
||||
select
|
||||
<include refid="dnatPolicyColumns"></include>
|
||||
from ip_reuse_dnat_policy a
|
||||
<where>
|
||||
<if test="cfgId !=null">
|
||||
a.CFG_ID = #{cfgId,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="compileId != null">
|
||||
AND a.COMPILE_ID=#{compileId,jdbcType=INTEGER}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -16,6 +16,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
import com.beust.jcommander.internal.Lists;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.configuration.BaseIpCfg;
|
||||
import com.nis.domain.configuration.DdosIpCfg;
|
||||
import com.nis.domain.configuration.IpReuseDnatPolicyCfg;
|
||||
import com.nis.domain.configuration.IpReusePolicyCfg;
|
||||
import com.nis.domain.maat.ToMaatResult;
|
||||
@@ -308,4 +309,11 @@ public class IpMultiplexService extends BaseService{
|
||||
}
|
||||
}
|
||||
|
||||
public IpReusePolicyCfg getSnatCfg(Long cfgId,Integer compileId) {
|
||||
return ipMultiplexDao.getSnatCfg(cfgId,compileId);
|
||||
}
|
||||
|
||||
public IpReuseDnatPolicyCfg getDnatCfg(Long cfgId,Integer compileId) {
|
||||
return ipMultiplexDao.getDnatCfg(cfgId,compileId);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user