(1)修改IP配置dns_res_strategy的pojo类型为Integer
(2)DnsIpCfgDao.xml的dns_res_strategy类型由VARCHAR 改为Integer (3)IP白名单导入配置去掉界面无用的字段 (4)配置日志总量查询超时调整为10秒
This commit is contained in:
@@ -55,7 +55,7 @@ public class InlineIp {
|
|||||||
@Expose
|
@Expose
|
||||||
private Date opTime;
|
private Date opTime;
|
||||||
@Expose
|
@Expose
|
||||||
private Long policyGroup;
|
private Integer policyGroup;
|
||||||
/**
|
/**
|
||||||
* action
|
* action
|
||||||
* @return action
|
* @return action
|
||||||
@@ -286,10 +286,10 @@ public class InlineIp {
|
|||||||
public void setId(Integer id) {
|
public void setId(Integer id) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
public Long getPolicyGroup() {
|
public Integer getPolicyGroup() {
|
||||||
return policyGroup;
|
return policyGroup;
|
||||||
}
|
}
|
||||||
public void setPolicyGroup(Long policyGroup) {
|
public void setPolicyGroup(Integer policyGroup) {
|
||||||
this.policyGroup = policyGroup;
|
this.policyGroup = policyGroup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ public class BaseIpCfg extends BaseCfg<BaseIpCfg> {
|
|||||||
protected String srcPort;
|
protected String srcPort;
|
||||||
@ExcelField(title="server_port")
|
@ExcelField(title="server_port")
|
||||||
protected String destPort;
|
protected String destPort;
|
||||||
protected Long dnsStrategyId;
|
protected Integer dnsStrategyId;
|
||||||
@ExcelField(title="ir_type",dictType="IR_TYPE")
|
@ExcelField(title="ir_type",dictType="IR_TYPE")
|
||||||
protected Integer irType;
|
protected Integer irType;
|
||||||
@ExcelField(title="group_name")
|
@ExcelField(title="group_name")
|
||||||
@@ -274,13 +274,13 @@ public class BaseIpCfg extends BaseCfg<BaseIpCfg> {
|
|||||||
* @return dnsStrategyId
|
* @return dnsStrategyId
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public Long getDnsStrategyId() {
|
public Integer getDnsStrategyId() {
|
||||||
return dnsStrategyId;
|
return dnsStrategyId;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* @param dnsStrategyId the dnsStrategyId to set
|
* @param dnsStrategyId the dnsStrategyId to set
|
||||||
*/
|
*/
|
||||||
public void setDnsStrategyId(Long dnsStrategyId) {
|
public void setDnsStrategyId(Integer dnsStrategyId) {
|
||||||
this.dnsStrategyId = dnsStrategyId;
|
this.dnsStrategyId = dnsStrategyId;
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -27,12 +27,12 @@ public class DnsIpCfg extends BaseIpCfg {
|
|||||||
*/
|
*/
|
||||||
private static final long serialVersionUID = 8149437730819674317L;
|
private static final long serialVersionUID = 8149437730819674317L;
|
||||||
private String dnsStrategyName;
|
private String dnsStrategyName;
|
||||||
private Long dnsStrategyId;
|
private Integer dnsStrategyId;
|
||||||
|
|
||||||
public Long getDnsStrategyId() {
|
public Integer getDnsStrategyId() {
|
||||||
return dnsStrategyId;
|
return dnsStrategyId;
|
||||||
}
|
}
|
||||||
public void setDnsStrategyId(Long dnsStrategyId) {
|
public void setDnsStrategyId(Integer dnsStrategyId) {
|
||||||
this.dnsStrategyId = dnsStrategyId;
|
this.dnsStrategyId = dnsStrategyId;
|
||||||
}
|
}
|
||||||
public String getDnsStrategyName() {
|
public String getDnsStrategyName() {
|
||||||
|
|||||||
@@ -0,0 +1,94 @@
|
|||||||
|
package com.nis.domain.configuration.template;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wx 将部分字段的标题改变,或者不需要的字段隐藏
|
||||||
|
* 隐藏方法,对于不需要的字段或者方法,Override该字段方法,但是@ExcelField注解不需要加上了
|
||||||
|
* @author dell
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class WhiteListIpTemplate extends IpCfgTemplate {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Integer getDirection() {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Integer getProtocol() {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Integer getIrType() {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
return super.getIrType();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Integer getDnsStrategyId() {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
return super.getDnsStrategyId();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Integer getRequestId() {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
return super.getRequestId();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getClassify() {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
return super.getClassify();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getAttribute() {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
return super.getAttribute();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getLable() {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
return super.getLable();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Integer getRatelimit() {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
return super.getRatelimit();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUserRegion1() {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
return super.getUserRegion1();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getUserRegion2() {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
return super.getUserRegion2();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getUserRegion3() {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
return super.getUserRegion3();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getUserRegion4() {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
return super.getUserRegion4();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getUserRegion5() {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
return super.getUserRegion5();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -259,7 +259,7 @@ public class CommonController extends BaseController {
|
|||||||
ip.setCreatorId(ipCfg.getCurrentUser().getId());
|
ip.setCreatorId(ipCfg.getCurrentUser().getId());
|
||||||
ip.setCreateTime(date);
|
ip.setCreateTime(date);
|
||||||
ip.setCompileId(ipCfgService.getCompileId());
|
ip.setCompileId(ipCfgService.getCompileId());
|
||||||
ip.setDnsStrategyId((long)cfg.getDnsStrategyId().intValue());
|
ip.setDnsStrategyId(cfg.getDnsStrategyId());
|
||||||
ipList.add(ip);
|
ipList.add(ip);
|
||||||
}
|
}
|
||||||
ipCfgService.saveBatch(ipList, IpCfgDao.class);
|
ipCfgService.saveBatch(ipList, IpCfgDao.class);
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ import com.nis.domain.Page;
|
|||||||
import com.nis.domain.configuration.BaseIpCfg;
|
import com.nis.domain.configuration.BaseIpCfg;
|
||||||
import com.nis.domain.configuration.HttpUrlCfg;
|
import com.nis.domain.configuration.HttpUrlCfg;
|
||||||
import com.nis.domain.configuration.IpPortCfg;
|
import com.nis.domain.configuration.IpPortCfg;
|
||||||
|
import com.nis.domain.configuration.template.WhiteListIpTemplate;
|
||||||
import com.nis.exceptions.MaatConvertException;
|
import com.nis.exceptions.MaatConvertException;
|
||||||
import com.nis.util.Constants;
|
import com.nis.util.Constants;
|
||||||
import com.nis.web.controller.configuration.CommonController;
|
import com.nis.web.controller.configuration.CommonController;
|
||||||
@@ -222,14 +223,14 @@ public class WhiteListController extends CommonController{
|
|||||||
@RequestMapping(value = "ip/import", method=RequestMethod.POST)
|
@RequestMapping(value = "ip/import", method=RequestMethod.POST)
|
||||||
public String importIp(String cfgName,RedirectAttributes redirectAttributes,
|
public String importIp(String cfgName,RedirectAttributes redirectAttributes,
|
||||||
@RequestParam("file") MultipartFile file,IpPortCfg cfg) {
|
@RequestParam("file") MultipartFile file,IpPortCfg cfg) {
|
||||||
this._importIp(cfgName,redirectAttributes, file,cfg);
|
this._importIp(cfgName,redirectAttributes, file,cfg,WhiteListIpTemplate.class);
|
||||||
return "redirect:" + adminPath +"/ntc/whitelist/ip/list?functionId="+cfg.getFunctionId();
|
return "redirect:" + adminPath +"/ntc/whitelist/ip/list?functionId="+cfg.getFunctionId();
|
||||||
}
|
}
|
||||||
//ip模板下载
|
//ip模板下载
|
||||||
@RequestMapping(value = "ip/import/template")
|
@RequestMapping(value = "ip/import/template")
|
||||||
public void importFileTemplate(HttpServletRequest request,HttpServletResponse response,
|
public void importFileTemplate(HttpServletRequest request,HttpServletResponse response,
|
||||||
RedirectAttributes redirectAttributes,Integer functionId,Integer cfgRegionCode) {
|
RedirectAttributes redirectAttributes,Integer functionId,Integer cfgRegionCode) {
|
||||||
this._importFileTemplate(request, response, redirectAttributes, functionId, cfgRegionCode);
|
this._importFileTemplate(request, response, redirectAttributes, functionId, cfgRegionCode,WhiteListIpTemplate.class);
|
||||||
}
|
}
|
||||||
//ip配置导出
|
//ip配置导出
|
||||||
@RequestMapping(value = "ip/export")
|
@RequestMapping(value = "ip/export")
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
<result column="function_id" property="functionId" jdbcType="INTEGER" />
|
<result column="function_id" property="functionId" jdbcType="INTEGER" />
|
||||||
<result column="cfg_region_code" property="cfgRegionCode" jdbcType="INTEGER" />
|
<result column="cfg_region_code" property="cfgRegionCode" jdbcType="INTEGER" />
|
||||||
<result column="cfg_type" property="cfgType" jdbcType="VARCHAR" />
|
<result column="cfg_type" property="cfgType" jdbcType="VARCHAR" />
|
||||||
<result column="dns_strategy_id" property="dnsStrategyId" jdbcType="VARCHAR" />
|
<result column="dns_strategy_id" property="dnsStrategyId" jdbcType="INTEGER" />
|
||||||
<result column="dns_strategy_name" property="dnsStrategyName" jdbcType="VARCHAR" />
|
<result column="dns_strategy_name" property="dnsStrategyName" jdbcType="VARCHAR" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
|||||||
@@ -528,7 +528,7 @@ public abstract class BaseService {
|
|||||||
return resStrategy;
|
return resStrategy;
|
||||||
}
|
}
|
||||||
//ip转换为callback用ip
|
//ip转换为callback用ip
|
||||||
public InlineIp convertCallBackIp(BaseIpCfg cfg,Long policyGroup){
|
public InlineIp convertCallBackIp(BaseIpCfg cfg,Integer policyGroup){
|
||||||
IpCfg c=ipConvert(new IpCfg(),cfg);
|
IpCfg c=ipConvert(new IpCfg(),cfg);
|
||||||
InlineIp ip=new InlineIp();
|
InlineIp ip=new InlineIp();
|
||||||
ip.setId(cfg.getCompileId());
|
ip.setId(cfg.getCompileId());
|
||||||
|
|||||||
@@ -842,7 +842,7 @@ var GetLogTotal=function(data){
|
|||||||
var timeout=$.validator.messages.timeout;
|
var timeout=$.validator.messages.timeout;
|
||||||
var request=$.ajax({
|
var request=$.ajax({
|
||||||
type:'post',
|
type:'post',
|
||||||
timeout:1000,//超时时间设置,查询接口时间过长超时
|
timeout:10000,//超时时间设置,查询接口时间过长超时
|
||||||
url:pathName+'/report/ajaxGetLogTotal',
|
url:pathName+'/report/ajaxGetLogTotal',
|
||||||
data:{"endTime":timeStamp,"action":data.action,"functionId":data.functionId,"compileId":data.compileId},
|
data:{"endTime":timeStamp,"action":data.action,"functionId":data.functionId,"compileId":data.compileId},
|
||||||
dataType:'json',
|
dataType:'json',
|
||||||
|
|||||||
Reference in New Issue
Block a user