策略分组功能
dns响应策略功能 dns欺骗ip列表功能
This commit is contained in:
202
src/main/java/com/nis/domain/callback/NtcDnsResStrategy.java
Normal file
202
src/main/java/com/nis/domain/callback/NtcDnsResStrategy.java
Normal file
@@ -0,0 +1,202 @@
|
||||
package com.nis.domain.callback;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.google.gson.annotations.Expose;
|
||||
public class NtcDnsResStrategy {
|
||||
@Expose
|
||||
private Long id; //compileId
|
||||
@Expose
|
||||
private Integer cfgId; //compileId
|
||||
@Expose
|
||||
private Long reqStrateId;
|
||||
@Expose
|
||||
private String strateName;
|
||||
@Expose
|
||||
private Integer action;
|
||||
@Expose
|
||||
private Integer service;
|
||||
@Expose
|
||||
private Integer isValid;
|
||||
@Expose
|
||||
private Date opTime;
|
||||
@Expose
|
||||
private Integer resGroup1Id;
|
||||
@Expose
|
||||
private Integer resGroup1Num;
|
||||
@Expose
|
||||
private Integer resGroup2Id;
|
||||
@Expose
|
||||
private Integer resGroup2Num;
|
||||
@Expose
|
||||
private Integer resGroup3Id;
|
||||
@Expose
|
||||
private Integer resGroup3Num;
|
||||
@Expose
|
||||
private Integer resGroup4Id;
|
||||
@Expose
|
||||
private Integer resGroup4Num;
|
||||
@Expose
|
||||
private Integer resGroup5Id;
|
||||
@Expose
|
||||
private Integer resGroup5Num;
|
||||
@Expose
|
||||
private Integer minTtl;
|
||||
@Expose
|
||||
private Integer maxTtl;
|
||||
|
||||
|
||||
/**
|
||||
* action
|
||||
* @return action
|
||||
*/
|
||||
|
||||
public Integer getAction() {
|
||||
return action;
|
||||
}
|
||||
/**
|
||||
* @param action the action to set
|
||||
*/
|
||||
public void setAction(Integer action) {
|
||||
this.action = action;
|
||||
}
|
||||
/**
|
||||
* isValid
|
||||
* @return isValid
|
||||
*/
|
||||
|
||||
public Integer getIsValid() {
|
||||
return isValid;
|
||||
}
|
||||
/**
|
||||
* @param isValid the isValid to set
|
||||
*/
|
||||
public void setIsValid(Integer isValid) {
|
||||
this.isValid = isValid;
|
||||
}
|
||||
/**
|
||||
* opTime
|
||||
* @return opTime
|
||||
*/
|
||||
|
||||
public Date getOpTime() {
|
||||
return opTime;
|
||||
}
|
||||
/**
|
||||
* @param opTime the opTime to set
|
||||
*/
|
||||
public void setOpTime(Date opTime) {
|
||||
this.opTime = opTime;
|
||||
}
|
||||
public Long getReqStrateId() {
|
||||
return reqStrateId;
|
||||
}
|
||||
public void setReqStrateId(Long reqStrateId) {
|
||||
this.reqStrateId = reqStrateId;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
public String getStrateName() {
|
||||
return strateName;
|
||||
}
|
||||
public void setStrateName(String strateName) {
|
||||
this.strateName = strateName;
|
||||
}
|
||||
/**
|
||||
* service
|
||||
* @return service
|
||||
*/
|
||||
|
||||
public Integer getService() {
|
||||
return service;
|
||||
}
|
||||
/**
|
||||
* @param service the service to set
|
||||
*/
|
||||
public void setService(Integer service) {
|
||||
this.service = service;
|
||||
}
|
||||
public Integer getResGroup1Id() {
|
||||
return resGroup1Id;
|
||||
}
|
||||
public void setResGroup1Id(Integer resGroup1Id) {
|
||||
this.resGroup1Id = resGroup1Id;
|
||||
}
|
||||
public Integer getResGroup1Num() {
|
||||
return resGroup1Num;
|
||||
}
|
||||
public void setResGroup1Num(Integer resGroup1Num) {
|
||||
this.resGroup1Num = resGroup1Num;
|
||||
}
|
||||
public Integer getResGroup2Id() {
|
||||
return resGroup2Id;
|
||||
}
|
||||
public void setResGroup2Id(Integer resGroup2Id) {
|
||||
this.resGroup2Id = resGroup2Id;
|
||||
}
|
||||
public Integer getResGroup2Num() {
|
||||
return resGroup2Num;
|
||||
}
|
||||
public void setResGroup2Num(Integer resGroup2Num) {
|
||||
this.resGroup2Num = resGroup2Num;
|
||||
}
|
||||
public Integer getResGroup3Id() {
|
||||
return resGroup3Id;
|
||||
}
|
||||
public void setResGroup3Id(Integer resGroup3Id) {
|
||||
this.resGroup3Id = resGroup3Id;
|
||||
}
|
||||
public Integer getResGroup3Num() {
|
||||
return resGroup3Num;
|
||||
}
|
||||
public void setResGroup3Num(Integer resGroup3Num) {
|
||||
this.resGroup3Num = resGroup3Num;
|
||||
}
|
||||
public Integer getResGroup4Id() {
|
||||
return resGroup4Id;
|
||||
}
|
||||
public void setResGroup4Id(Integer resGroup4Id) {
|
||||
this.resGroup4Id = resGroup4Id;
|
||||
}
|
||||
public Integer getResGroup4Num() {
|
||||
return resGroup4Num;
|
||||
}
|
||||
public void setResGroup4Num(Integer resGroup4Num) {
|
||||
this.resGroup4Num = resGroup4Num;
|
||||
}
|
||||
public Integer getResGroup5Id() {
|
||||
return resGroup5Id;
|
||||
}
|
||||
public void setResGroup5Id(Integer resGroup5Id) {
|
||||
this.resGroup5Id = resGroup5Id;
|
||||
}
|
||||
public Integer getResGroup5Num() {
|
||||
return resGroup5Num;
|
||||
}
|
||||
public void setResGroup5Num(Integer resGroup5Num) {
|
||||
this.resGroup5Num = resGroup5Num;
|
||||
}
|
||||
public Integer getMinTtl() {
|
||||
return minTtl;
|
||||
}
|
||||
public void setMinTtl(Integer minTtl) {
|
||||
this.minTtl = minTtl;
|
||||
}
|
||||
public Integer getMaxTtl() {
|
||||
return maxTtl;
|
||||
}
|
||||
public void setMaxTtl(Integer maxTtl) {
|
||||
this.maxTtl = maxTtl;
|
||||
}
|
||||
public Integer getCfgId() {
|
||||
return cfgId;
|
||||
}
|
||||
public void setCfgId(Integer cfgId) {
|
||||
this.cfgId = cfgId;
|
||||
}
|
||||
}
|
||||
@@ -20,348 +20,26 @@ import com.nis.domain.SysUser;
|
||||
* @date 2018年2月5日 下午2:57:17
|
||||
* @version V1.0
|
||||
*/
|
||||
public class DnsIpCfg extends BaseEntity<DnsIpCfg> {
|
||||
public class DnsIpCfg extends BaseIpCfg {
|
||||
|
||||
private static final long serialVersionUID = -4476190616323264876L;
|
||||
/**
|
||||
* 配置ID
|
||||
*
|
||||
*/
|
||||
@Expose
|
||||
private Long cfgId;
|
||||
/**
|
||||
* 配置描述
|
||||
*/
|
||||
private String cfgDesc;
|
||||
/**
|
||||
* ip类型
|
||||
*/
|
||||
@Expose
|
||||
private Integer ipType;
|
||||
/**
|
||||
* 源IP地址
|
||||
*/
|
||||
@Expose
|
||||
private String srcIp;
|
||||
/**
|
||||
* 源地址掩码
|
||||
*/
|
||||
@Expose
|
||||
private String srcIpMask ;
|
||||
/**
|
||||
* 源端口
|
||||
*/
|
||||
@Expose
|
||||
private String srcPort ;
|
||||
/**
|
||||
* 源端口掩码
|
||||
*/
|
||||
@Expose
|
||||
private String srcPortMask ;
|
||||
/**
|
||||
* 目的IP地址
|
||||
*/
|
||||
@Expose
|
||||
private String dstIp ;
|
||||
/**
|
||||
* 目的地址掩码
|
||||
*/
|
||||
@Expose
|
||||
private String dstIpMask ;
|
||||
/**
|
||||
* 目的端口
|
||||
*/
|
||||
@Expose
|
||||
private String dstPort ;
|
||||
/**
|
||||
* 目的端口掩码
|
||||
*/
|
||||
@Expose
|
||||
private String dstPortMask ;
|
||||
/**
|
||||
* 方向
|
||||
*/
|
||||
@Expose
|
||||
private Integer direction ;
|
||||
/**
|
||||
* 方向
|
||||
*/
|
||||
@Expose
|
||||
private Integer protocol ;
|
||||
/**
|
||||
* 有效标识
|
||||
*/
|
||||
private Integer isValid;
|
||||
/**
|
||||
* 是否审核
|
||||
*/
|
||||
private Integer isAudit;
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private SysUser creator;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
/**
|
||||
* 最后修改人
|
||||
*/
|
||||
private SysUser editor;
|
||||
/**
|
||||
* 最后修改时间
|
||||
*/
|
||||
private Date editTime;
|
||||
/**
|
||||
* 审核人
|
||||
*/
|
||||
private SysUser auditor;
|
||||
/**
|
||||
* 审核时间
|
||||
*/
|
||||
private Date auditTime;
|
||||
/**
|
||||
* 来函
|
||||
*/
|
||||
private RequestInfo request;
|
||||
/**
|
||||
* 欺骗id
|
||||
*/
|
||||
private Integer fakeId;
|
||||
/**
|
||||
* 分类
|
||||
*/
|
||||
private String classify;
|
||||
/**
|
||||
* 性质
|
||||
*/
|
||||
private String attribute;
|
||||
/**
|
||||
* 标签
|
||||
*/
|
||||
private String lable;
|
||||
private static final long serialVersionUID = 8149437730819674317L;
|
||||
private String dnsStrategyName;
|
||||
private Long dnsStrategyId;
|
||||
|
||||
private String cfgIds;
|
||||
private String fakeIds;
|
||||
|
||||
public String getCfgIds() {
|
||||
return cfgIds;
|
||||
public Long getDnsStrategyId() {
|
||||
return dnsStrategyId;
|
||||
}
|
||||
public void setCfgIds(String cfgIds) {
|
||||
this.cfgIds = cfgIds;
|
||||
public void setDnsStrategyId(Long dnsStrategyId) {
|
||||
this.dnsStrategyId = dnsStrategyId;
|
||||
}
|
||||
public Long getCfgId() {
|
||||
return cfgId;
|
||||
public String getDnsStrategyName() {
|
||||
return dnsStrategyName;
|
||||
}
|
||||
public void setCfgId(Long cfgId) {
|
||||
this.cfgId = cfgId;
|
||||
}
|
||||
public String getCfgDesc() {
|
||||
return cfgDesc;
|
||||
}
|
||||
public void setCfgDesc(String cfgDesc) {
|
||||
this.cfgDesc = cfgDesc;
|
||||
}
|
||||
public Integer getIpType() {
|
||||
return ipType;
|
||||
}
|
||||
public void setIpType(Integer ipType) {
|
||||
this.ipType = ipType;
|
||||
}
|
||||
public String getSrcIp() {
|
||||
return srcIp;
|
||||
}
|
||||
public void setSrcIp(String srcIp) {
|
||||
this.srcIp = srcIp;
|
||||
}
|
||||
public String getSrcIpMask() {
|
||||
return srcIpMask;
|
||||
}
|
||||
public void setSrcIpMask(String srcIpMask) {
|
||||
this.srcIpMask = srcIpMask;
|
||||
}
|
||||
public String getSrcPort() {
|
||||
return srcPort;
|
||||
}
|
||||
public void setSrcPort(String srcPort) {
|
||||
this.srcPort = srcPort;
|
||||
}
|
||||
public String getSrcPortMask() {
|
||||
return srcPortMask;
|
||||
}
|
||||
public void setSrcPortMask(String srcPortMask) {
|
||||
this.srcPortMask = srcPortMask;
|
||||
}
|
||||
public String getDstIp() {
|
||||
return dstIp;
|
||||
}
|
||||
public void setDstIp(String dstIp) {
|
||||
this.dstIp = dstIp;
|
||||
}
|
||||
public String getDstIpMask() {
|
||||
return dstIpMask;
|
||||
}
|
||||
public void setDstIpMask(String dstIpMask) {
|
||||
this.dstIpMask = dstIpMask;
|
||||
}
|
||||
public String getDstPort() {
|
||||
return dstPort;
|
||||
}
|
||||
public void setDstPort(String dstPort) {
|
||||
this.dstPort = dstPort;
|
||||
}
|
||||
public String getDstPortMask() {
|
||||
return dstPortMask;
|
||||
}
|
||||
public void setDstPortMask(String dstPortMask) {
|
||||
this.dstPortMask = dstPortMask;
|
||||
}
|
||||
public Integer getDirection() {
|
||||
return direction;
|
||||
}
|
||||
public void setDirection(Integer direction) {
|
||||
this.direction = direction;
|
||||
}
|
||||
public Integer getProtocol() {
|
||||
return protocol;
|
||||
}
|
||||
public void setProtocol(Integer protocol) {
|
||||
this.protocol = protocol;
|
||||
}
|
||||
public Integer getIsValid() {
|
||||
return isValid;
|
||||
}
|
||||
public void setIsValid(Integer isValid) {
|
||||
this.isValid = isValid;
|
||||
}
|
||||
public Integer getIsAudit() {
|
||||
return isAudit;
|
||||
}
|
||||
public void setIsAudit(Integer isAudit) {
|
||||
this.isAudit = isAudit;
|
||||
}
|
||||
public SysUser getCreator() {
|
||||
return creator;
|
||||
}
|
||||
public void setCreator(SysUser creator) {
|
||||
this.creator = creator;
|
||||
}
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
public SysUser getEditor() {
|
||||
return editor;
|
||||
}
|
||||
public void setEditor(SysUser editor) {
|
||||
this.editor = editor;
|
||||
}
|
||||
public Date getEditTime() {
|
||||
return editTime;
|
||||
}
|
||||
public void setEditTime(Date editTime) {
|
||||
this.editTime = editTime;
|
||||
}
|
||||
public SysUser getAuditor() {
|
||||
return auditor;
|
||||
}
|
||||
public void setAuditor(SysUser auditor) {
|
||||
this.auditor = auditor;
|
||||
}
|
||||
public Date getAuditTime() {
|
||||
return auditTime;
|
||||
}
|
||||
public void setAuditTime(Date auditTime) {
|
||||
this.auditTime = auditTime;
|
||||
}
|
||||
public RequestInfo getRequest() {
|
||||
return request;
|
||||
}
|
||||
public void setRequest(RequestInfo request) {
|
||||
this.request = request;
|
||||
}
|
||||
public Integer getFakeId() {
|
||||
return fakeId;
|
||||
}
|
||||
public void setFakeId(Integer fakeId) {
|
||||
this.fakeId = fakeId;
|
||||
}
|
||||
public String getClassify() {
|
||||
return classify;
|
||||
}
|
||||
public void setClassify(String classify) {
|
||||
this.classify = classify;
|
||||
}
|
||||
public String getAttribute() {
|
||||
return attribute;
|
||||
}
|
||||
public void setAttribute(String attribute) {
|
||||
this.attribute = attribute;
|
||||
}
|
||||
public String getLable() {
|
||||
return lable;
|
||||
}
|
||||
public void setLable(String lable) {
|
||||
this.lable = lable;
|
||||
}
|
||||
|
||||
private Date searchCreateTimeStart;
|
||||
private Date searchCreateTimeEnd;
|
||||
private Date searchEditTimeStart;
|
||||
private Date searchEditTimeEnd;
|
||||
private Date searchAuditTimeStart;
|
||||
private Date searchAuditTimeEnd;
|
||||
|
||||
public Date getSearchCreateTimeStart() {
|
||||
return searchCreateTimeStart;
|
||||
}
|
||||
public void setSearchCreateTimeStart(Date searchCreateTimeStart) {
|
||||
this.searchCreateTimeStart = searchCreateTimeStart;
|
||||
}
|
||||
public Date getSearchCreateTimeEnd() {
|
||||
return searchCreateTimeEnd;
|
||||
}
|
||||
public void setSearchCreateTimeEnd(Date searchCreateTimeEnd) {
|
||||
this.searchCreateTimeEnd = searchCreateTimeEnd;
|
||||
}
|
||||
public Date getSearchEditTimeStart() {
|
||||
return searchEditTimeStart;
|
||||
}
|
||||
public void setSearchEditTimeStart(Date searchEditTimeStart) {
|
||||
this.searchEditTimeStart = searchEditTimeStart;
|
||||
}
|
||||
public Date getSearchEditTimeEnd() {
|
||||
return searchEditTimeEnd;
|
||||
}
|
||||
public void setSearchEditTimeEnd(Date searchEditTimeEnd) {
|
||||
this.searchEditTimeEnd = searchEditTimeEnd;
|
||||
}
|
||||
public Date getSearchAuditTimeStart() {
|
||||
return searchAuditTimeStart;
|
||||
}
|
||||
public void setSearchAuditTimeStart(Date searchAuditTimeStart) {
|
||||
this.searchAuditTimeStart = searchAuditTimeStart;
|
||||
}
|
||||
public Date getSearchAuditTimeEnd() {
|
||||
return searchAuditTimeEnd;
|
||||
}
|
||||
public void setSearchAuditTimeEnd(Date searchAuditTimeEnd) {
|
||||
this.searchAuditTimeEnd = searchAuditTimeEnd;
|
||||
}
|
||||
/**
|
||||
* fakeIds
|
||||
* @return fakeIds
|
||||
*/
|
||||
|
||||
public String getFakeIds() {
|
||||
return fakeIds;
|
||||
}
|
||||
/**
|
||||
* @param fakeIds the fakeIds to set
|
||||
*/
|
||||
public void setFakeIds(String fakeIds) {
|
||||
this.fakeIds = fakeIds;
|
||||
public void setDnsStrategyName(String dnsStrategyName) {
|
||||
this.dnsStrategyName = dnsStrategyName;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
118
src/main/java/com/nis/domain/configuration/DnsResStrategy.java
Normal file
118
src/main/java/com/nis/domain/configuration/DnsResStrategy.java
Normal file
@@ -0,0 +1,118 @@
|
||||
package com.nis.domain.configuration;
|
||||
|
||||
/**
|
||||
* dns响应策略配置
|
||||
* @author dell
|
||||
*
|
||||
*/
|
||||
public class DnsResStrategy extends BaseCfg<DnsResStrategy> {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -2720862431960415564L;
|
||||
private Integer resGroup1Id;
|
||||
private Integer resGroup1Num;
|
||||
private Integer resGroup2Id;
|
||||
private Integer resGroup2Num;
|
||||
private Integer resGroup3Id;
|
||||
private Integer resGroup3Num;
|
||||
private Integer resGroup4Id;
|
||||
private Integer resGroup4Num;
|
||||
private Integer resGroup5Id;
|
||||
private Integer resGroup5Num;
|
||||
private Integer minTtl;
|
||||
private Integer maxTtl;
|
||||
private String group1Name;
|
||||
@Override
|
||||
public void initDefaultValue() {
|
||||
this.resGroup1Num=0;
|
||||
this.resGroup1Num=0;
|
||||
this.resGroup2Id=0;
|
||||
this.resGroup2Num=0;
|
||||
this.resGroup3Id=0;
|
||||
this.resGroup3Num=0;
|
||||
this.resGroup4Id=0;
|
||||
this.resGroup4Num=0;
|
||||
this.resGroup5Id=0;
|
||||
this.resGroup5Num=0;
|
||||
}
|
||||
public Integer getResGroup1Id() {
|
||||
return resGroup1Id;
|
||||
}
|
||||
public void setResGroup1Id(Integer resGroup1Id) {
|
||||
this.resGroup1Id = resGroup1Id;
|
||||
}
|
||||
public Integer getResGroup1Num() {
|
||||
return resGroup1Num;
|
||||
}
|
||||
public void setResGroup1Num(Integer resGroup1Num) {
|
||||
this.resGroup1Num = resGroup1Num;
|
||||
}
|
||||
public Integer getResGroup2Id() {
|
||||
return resGroup2Id;
|
||||
}
|
||||
public void setResGroup2Id(Integer resGroup2Id) {
|
||||
this.resGroup2Id = resGroup2Id;
|
||||
}
|
||||
public Integer getResGroup2Num() {
|
||||
return resGroup2Num;
|
||||
}
|
||||
public void setResGroup2Num(Integer resGroup2Num) {
|
||||
this.resGroup2Num = resGroup2Num;
|
||||
}
|
||||
public Integer getResGroup3Id() {
|
||||
return resGroup3Id;
|
||||
}
|
||||
public void setResGroup3Id(Integer resGroup3Id) {
|
||||
this.resGroup3Id = resGroup3Id;
|
||||
}
|
||||
public Integer getResGroup3Num() {
|
||||
return resGroup3Num;
|
||||
}
|
||||
public void setResGroup3Num(Integer resGroup3Num) {
|
||||
this.resGroup3Num = resGroup3Num;
|
||||
}
|
||||
public Integer getResGroup4Id() {
|
||||
return resGroup4Id;
|
||||
}
|
||||
public void setResGroup4Id(Integer resGroup4Id) {
|
||||
this.resGroup4Id = resGroup4Id;
|
||||
}
|
||||
public Integer getResGroup4Num() {
|
||||
return resGroup4Num;
|
||||
}
|
||||
public void setResGroup4Num(Integer resGroup4Num) {
|
||||
this.resGroup4Num = resGroup4Num;
|
||||
}
|
||||
public Integer getResGroup5Id() {
|
||||
return resGroup5Id;
|
||||
}
|
||||
public void setResGroup5Id(Integer resGroup5Id) {
|
||||
this.resGroup5Id = resGroup5Id;
|
||||
}
|
||||
public Integer getResGroup5Num() {
|
||||
return resGroup5Num;
|
||||
}
|
||||
public void setResGroup5Num(Integer resGroup5Num) {
|
||||
this.resGroup5Num = resGroup5Num;
|
||||
}
|
||||
public Integer getMinTtl() {
|
||||
return minTtl;
|
||||
}
|
||||
public void setMinTtl(Integer minTtl) {
|
||||
this.minTtl = minTtl;
|
||||
}
|
||||
public Integer getMaxTtl() {
|
||||
return maxTtl;
|
||||
}
|
||||
public void setMaxTtl(Integer maxTtl) {
|
||||
this.maxTtl = maxTtl;
|
||||
}
|
||||
public String getGroup1Name() {
|
||||
return group1Name;
|
||||
}
|
||||
public void setGroup1Name(String group1Name) {
|
||||
this.group1Name = group1Name;
|
||||
}
|
||||
}
|
||||
@@ -61,6 +61,7 @@ import com.nis.web.service.configuration.AvContentCfgService;
|
||||
import com.nis.web.service.configuration.BgpCfgService;
|
||||
import com.nis.web.service.configuration.ComplexStringCfgService;
|
||||
import com.nis.web.service.configuration.DnsIpCfgService;
|
||||
import com.nis.web.service.configuration.DnsResStrategyService;
|
||||
import com.nis.web.service.configuration.FileTransferCfgService;
|
||||
import com.nis.web.service.configuration.IpCfgService;
|
||||
import com.nis.web.service.configuration.MailCfgService;
|
||||
@@ -153,6 +154,8 @@ public class BaseController {
|
||||
protected XmppCfgService xmppCfgService;
|
||||
@Autowired
|
||||
protected PolicyGroupInfoService policyGroupInfoService;
|
||||
@Autowired
|
||||
protected DnsResStrategyService dnsResStrategyService;
|
||||
/**
|
||||
* 管理基础路径
|
||||
*/
|
||||
|
||||
@@ -16,101 +16,85 @@ import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.basics.ServiceDictInfo;
|
||||
import com.nis.domain.configuration.BaseIpCfg;
|
||||
import com.nis.domain.configuration.DnsIpCfg;
|
||||
import com.nis.domain.configuration.DnsResStrategy;
|
||||
import com.nis.domain.configuration.DnsIpCfg;
|
||||
import com.nis.domain.configuration.RequestInfo;
|
||||
import com.nis.exceptions.MaatConvertException;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.web.controller.BaseController;
|
||||
import com.nis.web.security.UserUtils;
|
||||
import com.nis.web.service.configuration.DnsIpCfgService;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("${adminPath}/cfg/dnsIp")
|
||||
public class DnsIpCfgController extends BaseController {
|
||||
|
||||
@ModelAttribute
|
||||
public DnsIpCfg get(Long cfgId) {
|
||||
if (!StringUtil.isEmpty(cfgId)){
|
||||
return dnsIpCfgService.get(cfgId);
|
||||
}else{
|
||||
return new DnsIpCfg();
|
||||
}
|
||||
}
|
||||
|
||||
@RequiresPermissions("cfg:ip:view")
|
||||
@RequestMapping("list")
|
||||
public String list(Model model, HttpServletRequest request, HttpServletResponse response, DnsIpCfg dnsIpCfg) {
|
||||
Page<DnsIpCfg> page = dnsIpCfgService.findPage(new Page<DnsIpCfg>(request, response, 30), dnsIpCfg);
|
||||
@RequestMapping(value = {"/list"})
|
||||
public String list(Model model,HttpServletRequest request,HttpServletResponse response,@ModelAttribute("cfg")DnsIpCfg entity){
|
||||
Page<DnsIpCfg> page = dnsIpCfgService.findPage(new Page<DnsIpCfg>(request, response,"r"), entity);
|
||||
model.addAttribute("page", page);
|
||||
|
||||
addRequestAndServiceDictToModel(model);
|
||||
initPageCondition(model);
|
||||
return "/cfg/dnsIpCfgList";
|
||||
}
|
||||
|
||||
@RequiresPermissions("cfg:ip:edit")
|
||||
@RequestMapping("form")
|
||||
public String form(Model model, DnsIpCfg dnsIpCfg) {
|
||||
addRequestAndServiceDictToModel(model);
|
||||
@RequestMapping(value = {"/form"})
|
||||
@RequiresPermissions(value={"dns:fake:ip:config"})
|
||||
public String form(Model model,HttpServletRequest request,HttpServletResponse response,String ids,@ModelAttribute("cfg")DnsIpCfg cfg){
|
||||
if(!StringUtil.isEmpty(ids)){
|
||||
cfg = dnsIpCfgService.getDnsIpCfg(Long.parseLong(ids));
|
||||
initUpdateFormCondition(model, cfg);
|
||||
}else{
|
||||
initFormCondition(model,cfg);
|
||||
}
|
||||
//获取所有响应策略信息
|
||||
List<DnsResStrategy> resStrategys=dnsResStrategyService.findDnsResStrategys(null, -1);
|
||||
model.addAttribute("dnsResStrategys", resStrategys);
|
||||
model.addAttribute("_cfg", cfg);
|
||||
return "/cfg/dnsIpCfgForm";
|
||||
}
|
||||
|
||||
@RequiresPermissions("cfg:ip:edit")
|
||||
@RequestMapping("save")
|
||||
public String save(Model model, DnsIpCfg dnsIpCfg, RedirectAttributes redirectAttributes) {
|
||||
Date now = new Date();
|
||||
|
||||
if (dnsIpCfg.getCfgId() == null) {//新增
|
||||
dnsIpCfg.setFakeId(0);
|
||||
dnsIpCfg.setIsValid(1);
|
||||
dnsIpCfg.setCreateTime(now);
|
||||
dnsIpCfg.setCreator(UserUtils.getUser());
|
||||
dnsIpCfg.setIsAudit(1);
|
||||
} else {//修改
|
||||
dnsIpCfg.setEditor(UserUtils.getUser());
|
||||
dnsIpCfg.setEditTime(now);
|
||||
}
|
||||
|
||||
try {
|
||||
dnsIpCfgService.save(dnsIpCfg);
|
||||
addMessage(redirectAttributes, "save_success");
|
||||
} catch (Exception e) {
|
||||
@RequestMapping(value = {"/saveOrUpdate"})
|
||||
@RequiresPermissions(value={"dns:fake:ip:config"})
|
||||
public String saveOrUpdate(Model model,HttpServletRequest request,HttpServletResponse response,
|
||||
@ModelAttribute("cfg")DnsIpCfg cfg){
|
||||
try{
|
||||
dnsIpCfgService.saveOrUpdate(cfg);
|
||||
addMessage(model,"save_success");
|
||||
}catch(Exception e){
|
||||
logger.error("信息保存失败",e);
|
||||
e.printStackTrace();
|
||||
addMessage(redirectAttributes, "save_failed");
|
||||
addMessage(model,"save_failed");
|
||||
}
|
||||
|
||||
return "redirect:" + adminPath + "/cfg/dnsIp/list";
|
||||
return "redirect:" + adminPath +"/cfg/dnsIp/list?functionId="+cfg.getFunctionId();
|
||||
}
|
||||
|
||||
@RequiresPermissions("cfg:ip:edit")
|
||||
@RequestMapping("delete")
|
||||
public String delete(Model model, HttpServletRequest request,
|
||||
HttpServletResponse response, DnsIpCfg dnsIpCfg) {
|
||||
String fakeIds = dnsIpCfg.getFakeIds();
|
||||
if (!StringUtils.isEmpty(fakeIds)) {
|
||||
try {
|
||||
dnsIpCfgService.delete(fakeIds);
|
||||
addMessage(model, "delete_success");
|
||||
} catch (Exception e) {
|
||||
logger.error("删除失败", e);
|
||||
addMessage(model, "delete_failed");
|
||||
@RequestMapping(value = {"/delete"})
|
||||
@RequiresPermissions(value={"dns:fake:ip:config"})
|
||||
public String delete(Integer isAudit,Integer isValid,String ids,Integer functionId){
|
||||
dnsIpCfgService.delete(isAudit,isValid,ids,functionId);
|
||||
return "redirect:" + adminPath +"/cfg/dnsIp/list?functionId="+functionId;
|
||||
}
|
||||
@RequestMapping(value = {"/audit"})
|
||||
@RequiresPermissions(value={"dns:fake:ip:audit"})
|
||||
public String audit(Integer isAudit,Integer isValid,String ids,Integer functionId, RedirectAttributes redirectAttributes) {
|
||||
if(!StringUtil.isEmpty(ids)){
|
||||
String[] idArray = ids.split(",");
|
||||
Date auditTime=new Date();
|
||||
for(String id :idArray){
|
||||
try {
|
||||
dnsIpCfgService.audit(isAudit,isValid,functionId,id,auditTime);
|
||||
} catch (MaatConvertException e) {
|
||||
e.printStackTrace();
|
||||
logger.info("dns fake ip配置下发失败:"+e.getMessage());
|
||||
addMessage(redirectAttributes, e.getMessage());
|
||||
}
|
||||
|
||||
}
|
||||
} else {
|
||||
addMessage(model, "delete_failed");
|
||||
|
||||
}
|
||||
|
||||
Page<DnsIpCfg> page = dnsIpCfgService.findPage(new Page<DnsIpCfg>(request, response, 30), dnsIpCfg);
|
||||
model.addAttribute("page", page);
|
||||
|
||||
addRequestAndServiceDictToModel(model);
|
||||
return "/cfg/dnsIpCfgList";
|
||||
return "redirect:" + adminPath +"/cfg/dnsIp/list?functionId="+functionId;
|
||||
}
|
||||
|
||||
private void addRequestAndServiceDictToModel(Model model) {
|
||||
List<RequestInfo> requestInfos = requestInfoService.getAllRequestInfo();
|
||||
model.addAttribute("requestInfos", requestInfos);
|
||||
List<ServiceDictInfo> fls = serviceDictInfoService.findAllFlDict();
|
||||
model.addAttribute("fls", fls);
|
||||
List<ServiceDictInfo> xzs = serviceDictInfoService.findAllXzDict();
|
||||
model.addAttribute("xzs", xzs);
|
||||
List<ServiceDictInfo> lables = serviceDictInfoService.findAllLableDict();
|
||||
model.addAttribute("lables", lables);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,158 @@
|
||||
package com.nis.web.controller.configuration.ntc;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.context.i18n.LocaleContextHolder;
|
||||
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.ResponseBody;
|
||||
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.SysUser;
|
||||
import com.nis.domain.basics.PolicyGroupInfo;
|
||||
import com.nis.domain.basics.ServiceDictInfo;
|
||||
import com.nis.domain.basics.SysDictInfo;
|
||||
import com.nis.domain.configuration.AreaBean;
|
||||
import com.nis.domain.configuration.AreaIpCfg;
|
||||
import com.nis.domain.configuration.AvContIpCfg;
|
||||
import com.nis.domain.configuration.AvVoipAccountCfg;
|
||||
import com.nis.domain.configuration.CfgIndexInfo;
|
||||
import com.nis.domain.configuration.DnsResStrategy;
|
||||
import com.nis.exceptions.MaatConvertException;
|
||||
import com.nis.domain.configuration.AvVoipIpCfg;
|
||||
import com.nis.domain.configuration.BaseIpCfg;
|
||||
import com.nis.domain.configuration.BaseStringCfg;
|
||||
import com.nis.util.Configurations;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.DateUtils;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.util.excel.ExportExcel;
|
||||
import com.nis.web.controller.BaseController;
|
||||
import com.nis.web.security.UserUtils;
|
||||
|
||||
/**
|
||||
* dns响应策略
|
||||
* @author ddm
|
||||
*
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("${adminPath}/maintenance/dnsResStrategy")
|
||||
public class DnsResStrategyController extends BaseController {
|
||||
|
||||
@RequestMapping(value = {"/form"})
|
||||
@RequiresPermissions(value={"dns:res:strategy:config"})
|
||||
public String from(Model model,
|
||||
HttpServletRequest request,
|
||||
HttpServletResponse response,
|
||||
String ids,
|
||||
@ModelAttribute("cfg")DnsResStrategy cfg){
|
||||
if(cfg == null){
|
||||
cfg=new DnsResStrategy();
|
||||
}
|
||||
if(!StringUtil.isEmpty(ids)){
|
||||
cfg = dnsResStrategyService.getDnsResStrategy(Long.valueOf(ids),-1);
|
||||
initFormCondition(model, cfg);
|
||||
model.addAttribute("isAdd", false);
|
||||
}else{
|
||||
//不存在响应策略为0的配置,则新策略时,cfgId默认为0
|
||||
DnsResStrategy dns0=dnsResStrategyService.getDnsResStrategy(0l,null);
|
||||
if(dns0 == null){
|
||||
cfg.setCfgId(0l);
|
||||
}
|
||||
initFormCondition(model, cfg);
|
||||
model.addAttribute("isAdd", true);
|
||||
}
|
||||
|
||||
//查询policyGroup列表,供响应策略选择
|
||||
List<PolicyGroupInfo> policyGroups=policyGroupInfoService.findPolicyGroupInfos();
|
||||
model.addAttribute("policyGroups", policyGroups);
|
||||
|
||||
model.addAttribute("_cfg", cfg);
|
||||
return "/cfg/maintenance/dnsResStrategy/form";
|
||||
}
|
||||
|
||||
@RequestMapping(value = {"/saveOrUpdate"})
|
||||
@RequiresPermissions(value={"dns:res:strategy:config"})
|
||||
public String saveOrUpdate(Model model,HttpServletRequest request,HttpServletResponse response,
|
||||
@ModelAttribute("cfg")DnsResStrategy cfg){
|
||||
try{
|
||||
|
||||
dnsResStrategyService.saveOrUpdate(cfg);
|
||||
|
||||
addMessage(model,"save_success");
|
||||
}catch(Exception e){
|
||||
e.printStackTrace();
|
||||
addMessage(model,"save_failed");
|
||||
}
|
||||
|
||||
return "redirect:" + adminPath +"/maintenance/dnsResStrategy/list?functionId="+cfg.getFunctionId();
|
||||
}
|
||||
|
||||
@RequestMapping(value = {"/list"})
|
||||
public String list(Model model,HttpServletRequest request,HttpServletResponse response,@ModelAttribute("cfg")DnsResStrategy entity){
|
||||
//查询时left join policyGroup
|
||||
Page<DnsResStrategy> page = dnsResStrategyService.findPage(new Page<DnsResStrategy>(request, response,"r"), entity);
|
||||
model.addAttribute("page", page);
|
||||
initPageCondition(model);
|
||||
return "/cfg/maintenance/dnsResStrategy/list";
|
||||
}
|
||||
|
||||
@RequestMapping(value = {"/delete"})
|
||||
@RequiresPermissions(value={"dns:res:strategy:config"})
|
||||
public String delete(Integer isAudit,Integer isValid,String ids,Integer functionId,Model model,HttpServletRequest request,HttpServletResponse response){
|
||||
try{
|
||||
if(!StringUtil.isEmpty(ids)){
|
||||
dnsResStrategyService.delete(isAudit,isValid,ids,functionId);
|
||||
}
|
||||
addMessage(model,"delete_success");
|
||||
}catch(Exception e){
|
||||
addMessage(model,"delete_failed");
|
||||
}
|
||||
|
||||
return "redirect:" + adminPath +"/maintenance/dnsResStrategy/list?functionId="+functionId;
|
||||
}
|
||||
|
||||
@RequestMapping(value = {"/audit"})
|
||||
//@RequiresPermissions(value={"dns:res:strategy:audit"})
|
||||
public String audit(Integer isAudit,Integer isValid,String ids,Integer functionId,RedirectAttributes redirectAttributes) {
|
||||
if(!StringUtil.isEmpty(ids)){
|
||||
String[] idArray = ids.split(",");
|
||||
Date auditTime=new Date();
|
||||
for(String id :idArray){
|
||||
try {
|
||||
dnsResStrategyService.audit(isAudit,isValid,functionId,id,auditTime);
|
||||
} catch (MaatConvertException e) {
|
||||
e.printStackTrace();
|
||||
logger.info("VOIP配置下发失败:"+e.getMessage());
|
||||
addMessage(redirectAttributes, e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
return "redirect:" + adminPath +"/maintenance/dnsResStrategy/list?functionId="+functionId;
|
||||
}
|
||||
@ResponseBody
|
||||
@RequestMapping(value = "/validCfgId")
|
||||
public boolean validCfgId(Long cfgId) {
|
||||
DnsResStrategy dns=dnsResStrategyService.getDnsResStrategy(cfgId,null);
|
||||
if(dns == null ){
|
||||
return false;
|
||||
}else{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -10,6 +10,7 @@ import com.nis.web.dao.MyBatisDao;
|
||||
@MyBatisDao
|
||||
public interface PolicyGroupInfoDao extends CrudDao<PolicyGroupInfo> {
|
||||
List<PolicyGroupInfo> findPolicyGroupInfoList(PolicyGroupInfo policyGroupInfo);
|
||||
List<PolicyGroupInfo> findPolicyGroupInfos();
|
||||
PolicyGroupInfo getById(int id);
|
||||
|
||||
}
|
||||
@@ -59,6 +59,13 @@
|
||||
</choose>
|
||||
|
||||
</select>
|
||||
<!-- 查出所有 有效数据-->
|
||||
<select id="findPolicyGroupInfos" resultMap="PolicyGroupInfoMap">
|
||||
SELECT
|
||||
<include refid="PolicyGroupInfoColumns"/>
|
||||
FROM policy_group_info r
|
||||
where r.is_valid=1
|
||||
</select>
|
||||
<insert id="insert" parameterType="com.nis.domain.basics.PolicyGroupInfo" >
|
||||
insert into policy_group_info(
|
||||
IS_VALID,
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.nis.web.dao.configuration;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import com.nis.domain.configuration.DnsIpCfg;
|
||||
@@ -8,5 +10,6 @@ import com.nis.web.dao.MyBatisDao;
|
||||
|
||||
@MyBatisDao
|
||||
public interface DnsIpCfgDao extends CrudDao<DnsIpCfg> {
|
||||
public int deleteByFakeId(@Param("fakeId") String fakeIds);
|
||||
List<DnsIpCfg> findPage(DnsIpCfg dnsIpCfg);
|
||||
DnsIpCfg getDnsIpCfg(Long cfgId);
|
||||
}
|
||||
|
||||
@@ -2,151 +2,346 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.nis.web.dao.configuration.DnsIpCfgDao">
|
||||
<resultMap id="dnsIpCfgMap" type="com.nis.domain.configuration.DnsIpCfg">
|
||||
<id column="cfg_id" property="cfgId"/>
|
||||
<result column="cfg_desc" property="cfgDesc"/>
|
||||
<result column="ip_type" property="ipType"/>
|
||||
<result column="src_ip" property="srcIp"/>
|
||||
<result column="src_ip_mask" property="srcIpMask"/>
|
||||
<result column="src_port" property="srcPort"/>
|
||||
<result column="src_port_mask" property="srcPortMask"/>
|
||||
<result column="dst_ip" property="dstIp"/>
|
||||
<result column="dst_ip_mask" property="dstIpMask"/>
|
||||
<result column="dst_port" property="dstPort"/>
|
||||
<result column="dst_port_mask" property="dstPortMask"/>
|
||||
<result column="direction" property="direction"/>
|
||||
<result column="protocol" property="protocol"/>
|
||||
<result column="is_valid" property="isValid"/>
|
||||
<result column="is_audit" property="isAudit"/>
|
||||
<result column="creator_id" property="creator.id"/>
|
||||
<result column="create_time" property="createTime"/>
|
||||
<result column="editor_id" property="editor.id"/>
|
||||
<result column="edit_time" property="editTime"/>
|
||||
<result column="auditor_id" property="auditor.id"/>
|
||||
<result column="audit_time" property="auditTime"/>
|
||||
<result column="request_id" property="request.id"/>
|
||||
<result column="fake_id" property="fakeId"/>
|
||||
<result column="classify" property="classify"/>
|
||||
<result column="attribute" property="attribute"/>
|
||||
<result column="label" property="label"/>
|
||||
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
||||
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
||||
<result column="ip_type" property="ipType" jdbcType="INTEGER" />
|
||||
<result column="ip_pattern" property="ipPattern" jdbcType="INTEGER" />
|
||||
<result column="dest_ip_address" property="destIpAddress" jdbcType="VARCHAR" />
|
||||
<result column="src_ip_address" property="srcIpAddress" jdbcType="VARCHAR" />
|
||||
<result column="dest_port" property="destPort" jdbcType="VARCHAR" />
|
||||
<result column="src_port" property="srcPort" jdbcType="VARCHAR" />
|
||||
<result column="port_pattern" property="portPattern" jdbcType="INTEGER" />
|
||||
<result column="direction" property="direction" jdbcType="INTEGER" />
|
||||
<result column="protocol" property="protocol" jdbcType="INTEGER" />
|
||||
<result column="protocol_id" property="protocolId" jdbcType="INTEGER" />
|
||||
<result column="action" property="action" jdbcType="INTEGER" />
|
||||
<result column="is_valid" property="isValid" jdbcType="INTEGER" />
|
||||
<result column="is_audit" property="isAudit" jdbcType="INTEGER" />
|
||||
<result column="creator_id" property="creatorId" jdbcType="INTEGER" />
|
||||
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
|
||||
<result column="editor_id" property="editorId" jdbcType="INTEGER" />
|
||||
<result column="edit_time" property="editTime" jdbcType="TIMESTAMP" />
|
||||
<result column="auditor_id" property="auditorId" jdbcType="INTEGER" />
|
||||
<result column="audit_time" property="auditTime" jdbcType="TIMESTAMP" />
|
||||
<result column="service_id" property="serviceId" jdbcType="INTEGER" />
|
||||
<result column="request_id" property="requestId" jdbcType="INTEGER" />
|
||||
<result column="compile_id" property="compileId" jdbcType="INTEGER" />
|
||||
<result column="is_area_effective" property="isAreaEffective" jdbcType="INTEGER" />
|
||||
<result column="classify" property="classify" jdbcType="VARCHAR" />
|
||||
<result column="attribute" property="attribute" jdbcType="VARCHAR" />
|
||||
<result column="lable" property="lable" jdbcType="VARCHAR" />
|
||||
<result column="area_effective_ids" property="areaEffectiveIds" jdbcType="VARCHAR" />
|
||||
<result column="function_id" property="functionId" jdbcType="INTEGER" />
|
||||
<result column="cfg_region_code" property="cfgRegionCode" jdbcType="INTEGER" />
|
||||
<result column="cfg_type" property="cfgType" jdbcType="VARCHAR" />
|
||||
<result column="dns_strategy_id" property="dnsStrategyId" jdbcType="VARCHAR" />
|
||||
<result column="dns_strategy_name" property="dnsStrategyName" jdbcType="VARCHAR" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="columns">
|
||||
dic.CFG_ID, dic.CFG_DESC, dic.IP_TYPE, dic.SRC_IP, dic.SRC_IP_MASK, dic.SRC_PORT,
|
||||
dic.SRC_PORT_MASK, dic.DST_IP, dic.DST_IP_MASK, dic.DST_PORT, dic.DST_PORT_MASK,
|
||||
dic.DIRECTION, dic.PROTOCOL, dic.IS_VALID, dic.IS_AUDIT, dic.CREATOR_ID,
|
||||
dic.CREATE_TIME, dic.EDITOR_ID, dic.EDIT_TIME, dic.AUDITOR_ID, dic.AUDIT_TIME,
|
||||
dic.REQUEST_ID, dic.FAKE_ID, dic.CLASSIFY, dic.ATTRIBUTE, dic.LABLE
|
||||
r.cfg_id,r.cfg_desc,r.ip_type,r.src_ip_address,r.ip_pattern,r.port_pattern,r.src_port
|
||||
,r.protocol,r.protocol_id,r.direction,r.cfg_type,r.action,r.dest_port,r.dest_ip_address
|
||||
,r.is_valid,r.is_audit,r.creator_id,r.create_time,r.editor_id
|
||||
,r.edit_time,r.auditor_id,r.audit_time,r.service_id,r.request_id,
|
||||
r.compile_id,r.is_area_effective,r.classify,r.attribute,r.lable
|
||||
,r.area_effective_ids,r.function_id,r.cfg_region_code,r.dns_strategy_id
|
||||
</sql>
|
||||
|
||||
<select id="findList" resultMap="dnsIpCfgMap">
|
||||
<select id="findPage" resultMap="dnsIpCfgMap">
|
||||
select
|
||||
<include refid="columns"></include>,
|
||||
c.name as "creator.name",
|
||||
e.name as "editor.name",
|
||||
a.name as "auditor.name",
|
||||
ri.request_title as "request.requestTitle"
|
||||
from dns_ip_cfg dic
|
||||
left join sys_user c on dic.creator_id=c.id
|
||||
left join sys_user e on dic.creator_id=e.id
|
||||
left join sys_user a on dic.creator_id=a.id
|
||||
left join request_info ri on dic.request_id=ri.id
|
||||
where dic.is_valid=1
|
||||
<if test="searchCreateTimeStart != null">
|
||||
and dic.create_time >= #{searchCreateTimeStart}
|
||||
</if>
|
||||
<if test="searchCreateTimeEnd != null">
|
||||
and dic.create_time <= #{searchCreateTimeEnd}
|
||||
</if>
|
||||
<!-- <if test="searchEditTimeStart != null">
|
||||
and dic.create_time >= #{searchEditTimeStart}
|
||||
</if>
|
||||
<if test="searchEditTimeEnd != null">
|
||||
and dic.create_time <= #{searchEditTimeEnd}
|
||||
</if>
|
||||
<if test="searchAuditTimeStart != null">
|
||||
and dic.create_time >= #{searchAuditTimeStart}
|
||||
</if>
|
||||
<if test="searchAuditTimeEnd != null">
|
||||
and dic.create_time <= #{searchAuditTimeEnd}
|
||||
</if>
|
||||
<if test="isAudit != null">
|
||||
and dic.is_audit = #{isAudit}
|
||||
</if> -->
|
||||
<if test="request != null and request.id != null">
|
||||
and dic.request_id = #{request.id}
|
||||
</if>
|
||||
<if test="classify != null and classify != ''">
|
||||
and concat(",", dic.classify, ",") like concat("%,", #{classify}, ",%")
|
||||
</if>
|
||||
<if test="attribute != null and attribute != ''">
|
||||
and concat(",", dic.attribute, ",") like concat("%,", #{attribute}, ",%")
|
||||
</if>
|
||||
<if test="lable != null and lable != ''">
|
||||
and concat(",", dic.lable, ",") like concat("%,", #{lable}, ",%")
|
||||
</if>
|
||||
<if test="cfgDesc != null and cfgDesc != ''">
|
||||
and dic.cfg_desc like concat("%", #{cfgDesc}, "%")
|
||||
</if>
|
||||
<include refid="columns"></include>
|
||||
<trim prefix="," prefixOverrides=",">
|
||||
,s.name as creator_name,e.name as editor_name,u.name as auditor_name
|
||||
,ri.request_title as requestName,dns.cfg_Desc as dns_strategy_name
|
||||
</trim>
|
||||
from dns_ip_cfg r
|
||||
left join dns_res_strategy dns on dns.cfg_Id=r.dns_strategy_id
|
||||
left join sys_user s on r.creator_id=s.id
|
||||
left join sys_user e on r.editor_id=e.id
|
||||
left join sys_user u on r.auditor_id=u.id
|
||||
left join request_info ri on r.request_id=ri.id
|
||||
<where>
|
||||
<if test="cfgId != null">
|
||||
AND r.CFG_ID=#{cfgId,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="cfgDesc != null and cfgDesc != ''">
|
||||
AND r.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="dnsStrategyName != null and dnsStrategyName != ''">
|
||||
AND dns.cfg_desc like concat(concat('%',#{dnsStrategyName,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="cfgRegionCode != null">
|
||||
AND r.CFG_REGION_CODE=#{cfgRegionCode,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="cfgType != null and cfgType != ''">
|
||||
AND r.CFG_TYPE like concat(concat('%',#{CFG_TYPE,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="ipType != null">
|
||||
AND r.IP_TYPE=#{ipType,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="ipPattern != null">
|
||||
AND r.IP_PATTERN=#{ipPattern,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="srcIpAddress != null and srcIpAddress != ''">
|
||||
AND r.SRC_IP_ADDRESS=#{srcIpAddress,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="destIpAddress != null and destIpAddress != ''">
|
||||
AND r.DEST_IP_ADDRESS=#{destIpAddress,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="portPattern != null">
|
||||
AND r.PORT_PATTERN=#{portPattern,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="srcPort != null and srcPort !=''">
|
||||
AND r.SRC_PORT=#{srcPort,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="destPort != null and destPort !=''">
|
||||
AND r.DEST_PORT=#{destPort,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="direction != null">
|
||||
AND r.DIRECTION=#{direction,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="protocol != null">
|
||||
AND r.PROTOCOL=#{protocol,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="protocolId != null">
|
||||
AND r.PROTOCOL_ID=#{protocolId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="action != null">
|
||||
AND r.ACTION=#{action,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isValid != null">
|
||||
AND r.IS_VALID=#{isValid,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isValid == null">
|
||||
AND r.IS_VALID != -1
|
||||
</if>
|
||||
<if test="isAudit != null">
|
||||
AND r.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="creatorName != null and creatorName !=''">
|
||||
AND CREATOR_NAME like concat(concat('%',#{creatorName,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="createTime != null and createTime !=''">
|
||||
AND r.CREATE_TIME=#{createTime,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="editorName != null and editorName !=''">
|
||||
AND EDITOR_NAME like concat(concat('%',#{editorName,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="editTime != null and editTime !='' ">
|
||||
AND r.EDIT_TIME=#{editTime,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="auditorName != null and auditorName !=''">
|
||||
AND AUDITOR_NAME like concat(concat('%',#{auditorName,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="auditTime != null and auditTime !=''">
|
||||
AND r.AUDIT_TIME=#{auditTime,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="serviceId != null">
|
||||
AND r.SERVICE_ID=#{serviceId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="requestId != null">
|
||||
AND r.REQUEST_ID=#{requestId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="compileId != null">
|
||||
AND r.COMPILE_ID=#{compileId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isAreaEffective != null">
|
||||
AND r.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="classify != null and classify !=''">
|
||||
AND r.classify like concat(concat('%',#{classify,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="attribute != null and attribute !=''">
|
||||
AND r.attribute like concat(concat('%',#{attribute,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="lable != null and lable !=''">
|
||||
AND r.lable like concat(concat('%',#{lable,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="areaEffectiveIds != null and areaEffectiveIds !=''">
|
||||
AND r.AREA_EFFECTIVE_IDS like concat(concat('%',#{areaEffectiveIds,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="functionId != null">
|
||||
AND r.FUNCTION_ID=#{functionId,jdbcType=INTEGER}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="get" resultMap="dnsIpCfgMap">
|
||||
<select id="getDnsIpCfg" resultMap="dnsIpCfgMap">
|
||||
select
|
||||
<include refid="columns"></include>,
|
||||
c.name as "creator.name",
|
||||
e.name as "editor.name",
|
||||
a.name as "auditor.name",
|
||||
ri.request_title as "request.requestTitle"
|
||||
from dns_ip_cfg dic
|
||||
left join sys_user c on dic.creator_id=c.id
|
||||
left join sys_user e on dic.creator_id=e.id
|
||||
left join sys_user a on dic.creator_id=a.id
|
||||
left join request_info ri on dic.request_id=ri.id
|
||||
where dic.cfg_id=#{id}
|
||||
where dic.cfg_id=#{cfgId}
|
||||
</select>
|
||||
|
||||
<insert id="insert">
|
||||
insert into dns_ip_cfg (
|
||||
cfg_desc, ip_type, src_ip, src_ip_mask, src_port,
|
||||
src_port_mask, dst_ip, dst_ip_mask, dst_port, dst_port_mask,
|
||||
direction, protocol, is_valid, is_audit, creator_id,
|
||||
create_time, request_id, fake_id, classify, attribute, lable
|
||||
) values (
|
||||
#{cfgDesc}, #{ipType}, #{srcIp}, #{srcIpMask}, #{srcPort}, #{srcPortMask},
|
||||
#{dstIp}, #{dstIpMask}, #{dstPort}, #{dstPortMask}, #{direction}, #{protocol},
|
||||
#{isValid}, #{isAudit}, #{creator.id}, #{createTime}, #{request.id}, #{fakeId},
|
||||
#{classify}, #{attribute}, #{lable}
|
||||
)
|
||||
<selectKey keyProperty="cfgId" resultType="java.lang.Long">
|
||||
select LAST_INSERT_ID() as cfg_id
|
||||
</selectKey>
|
||||
</insert>
|
||||
<insert id="insert" parameterType="com.nis.domain.configuration.DnsIpCfg" >
|
||||
insert into dns_ip_cfg (
|
||||
CFG_DESC,
|
||||
ACTION,
|
||||
IS_VALID,
|
||||
IS_AUDIT,
|
||||
CREATOR_ID,
|
||||
CREATE_TIME,
|
||||
EDITOR_ID,
|
||||
EDIT_TIME,
|
||||
AUDITOR_ID,
|
||||
AUDIT_TIME,
|
||||
SERVICE_ID,
|
||||
REQUEST_ID,
|
||||
COMPILE_ID,
|
||||
IS_AREA_EFFECTIVE,
|
||||
CLASSIFY,
|
||||
ATTRIBUTE,
|
||||
LABLE,
|
||||
AREA_EFFECTIVE_IDS,
|
||||
function_id,
|
||||
ip_type,
|
||||
src_ip_address,
|
||||
ip_pattern,
|
||||
port_pattern,
|
||||
src_port,
|
||||
protocol,
|
||||
protocol_id,
|
||||
direction,
|
||||
dest_port,
|
||||
dest_ip_address,
|
||||
cfg_type,
|
||||
cfg_region_code,
|
||||
dns_strategy_id
|
||||
)values (
|
||||
#{cfgDesc,jdbcType=VARCHAR},
|
||||
#{action,jdbcType=INTEGER},
|
||||
0,
|
||||
0,
|
||||
#{creatorId,jdbcType=INTEGER},
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
#{editorId,jdbcType=INTEGER},
|
||||
#{editTime,jdbcType=TIMESTAMP},
|
||||
#{auditorId,jdbcType=INTEGER},
|
||||
#{auditTime,jdbcType=TIMESTAMP},
|
||||
#{serviceId,jdbcType=INTEGER},
|
||||
#{requestId,jdbcType=INTEGER},
|
||||
#{compileId,jdbcType=INTEGER},
|
||||
#{isAreaEffective,jdbcType=INTEGER},
|
||||
#{classify,jdbcType=VARCHAR},
|
||||
#{attribute,jdbcType=VARCHAR},
|
||||
#{lable,jdbcType=VARCHAR},
|
||||
#{areaEffectiveIds,jdbcType=VARCHAR},
|
||||
#{functionId,jdbcType=INTEGER},
|
||||
#{ipType,jdbcType=INTEGER},
|
||||
#{srcIpAddress,jdbcType=VARCHAR},
|
||||
#{ipPattern,jdbcType=INTEGER},
|
||||
#{portPattern,jdbcType=INTEGER},
|
||||
#{srcPort,jdbcType=VARCHAR},
|
||||
#{protocol,jdbcType=INTEGER},
|
||||
#{protocolId,jdbcType=INTEGER},
|
||||
#{direction,jdbcType=INTEGER},
|
||||
#{destPort,jdbcType=VARCHAR},
|
||||
#{destIpAddress,jdbcType=VARCHAR},
|
||||
#{cfgType,jdbcType=VARCHAR},
|
||||
#{cfgRegionCode,jdbcType=INTEGER},
|
||||
#{dnsStrategyId,jdbcType=INTEGER}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="update">
|
||||
update
|
||||
dns_ip_cfg
|
||||
set
|
||||
cfg_desc=#{cfgDesc}, ip_type=#{ipType}, src_ip=#{srcIp}, src_ip_mask=#{srcIpMask},
|
||||
src_port=#{srcPort}, src_port_mask=#{srcPortMask}, dst_ip=#{dstIp},
|
||||
dst_ip_mask=#{dstIpMask}, dst_port=#{dstPort}, dst_port_mask=#{dstPortMask},
|
||||
direction=#{direction}, protocol=#{protocol}, request_id=#{request.id},
|
||||
fake_id=#{fakeId}, classify=#{classify}, attribute=#{attribute}, lable=#{lable},
|
||||
editor_id=#{editor.id}, edit_time=#{editTime}
|
||||
where cfg_id=#{cfgId}
|
||||
</update>
|
||||
|
||||
<update id="delete">
|
||||
update
|
||||
dns_ip_cfg
|
||||
set
|
||||
is_valid=0
|
||||
where cfg_id=#{cfgId}
|
||||
</update>
|
||||
<update id="deleteByFakeId">
|
||||
update
|
||||
dns_ip_cfg
|
||||
set
|
||||
is_valid=0
|
||||
where fake_id =#{fakeId}
|
||||
</update>
|
||||
<update id="update" parameterType="com.nis.domain.configuration.DnsIpCfg" >
|
||||
update dns_ip_cfg
|
||||
<set >
|
||||
<trim suffixOverrides=",">
|
||||
<if test="cfgDesc != null and cfgDesc != ''" >
|
||||
cfg_desc = #{cfgDesc,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="action != null" >
|
||||
action = #{action,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isValid != null" >
|
||||
is_valid = #{isValid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isAudit != null" >
|
||||
is_audit = #{isAudit,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="editorId != null" >
|
||||
editor_id = #{editorId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="editTime != null and editTime != ''" >
|
||||
edit_time = #{editTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="auditorId != null" >
|
||||
AUDITOR_ID = #{auditorId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="auditTime != null and auditTime != ''" >
|
||||
AUDIT_TIME = #{auditTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="compileId != null" >
|
||||
COMPILE_ID = #{compileId,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="requestId != null" >
|
||||
request_id = #{requestId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isAreaEffective != null" >
|
||||
is_area_effective = #{isAreaEffective,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="classify != null and classify != ''" >
|
||||
classify = #{classify,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="attribute != null and attribute != ''" >
|
||||
attribute = #{attribute,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="lable != null and lable != ''" >
|
||||
lable = #{lable,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="areaEffectiveIds != null" >
|
||||
area_effective_ids = #{areaEffectiveIds,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="functionId != null" >
|
||||
function_id = #{functionId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="serviceId != null" >
|
||||
service_id = #{serviceId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="ipType != null" >
|
||||
ip_type = #{ipType,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="srcIpAddress != null and srcIpAddress != ''" >
|
||||
src_ip_address = #{srcIpAddress,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="ipPattern != null" >
|
||||
ip_pattern = #{ipPattern,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="portPattern != null" >
|
||||
port_pattern = #{portPattern,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="srcPort != null and srcPort != ''" >
|
||||
src_port = #{srcPort,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="protocol != null" >
|
||||
protocol = #{protocol,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="protocolId != null" >
|
||||
protocol_id = #{protocolId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="direction != null" >
|
||||
direction = #{direction,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="destPort != null and destPort != ''" >
|
||||
dest_port = #{destPort,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="destIpAddress != null and destIpAddress != ''" >
|
||||
dest_ip_address = #{destIpAddress,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="cfgType != null and cfgType != ''" >
|
||||
cfg_type = #{cfgType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="cfgRegionCode != null " >
|
||||
cfg_region_code = #{cfgRegionCode,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="dnsStrategyId != null " >
|
||||
dns_strategy_id = #{dnsStrategyId,jdbcType=INTEGER},
|
||||
</if>
|
||||
</trim>
|
||||
</set>
|
||||
<where>
|
||||
and cfg_id = #{cfgId,jdbcType=INTEGER}
|
||||
</where>
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.nis.web.dao.configuration;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import com.nis.domain.configuration.DnsResStrategy;
|
||||
import com.nis.web.dao.CrudDao;
|
||||
import com.nis.web.dao.MyBatisDao;
|
||||
|
||||
@MyBatisDao
|
||||
public interface DnsResStrategyDao extends CrudDao<DnsResStrategy> {
|
||||
List<DnsResStrategy> findPage(DnsResStrategy dnsResStrategy);
|
||||
List<DnsResStrategy> findList(@Param("cfgId")Long cfgId,@Param("isValid")Integer isValid);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,333 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.nis.web.dao.configuration.DnsResStrategyDao" >
|
||||
|
||||
<resultMap id="DnsResStrategyMap" type="com.nis.domain.configuration.DnsResStrategy" >
|
||||
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
||||
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
||||
<result column="res_group_1_id" property="resGroup1Id" jdbcType="INTEGER" />
|
||||
<result column="res_group_1_num" property="resGroup1Num" jdbcType="INTEGER" />
|
||||
<result column="res_group_2_id" property="resGroup2Id" jdbcType="INTEGER" />
|
||||
<result column="res_group_2_num" property="resGroup2Num" jdbcType="INTEGER" />
|
||||
<result column="res_group_3_id" property="resGroup3Id" jdbcType="INTEGER" />
|
||||
<result column="res_group_3_num" property="resGroup3Num" jdbcType="INTEGER" />
|
||||
<result column="res_group_4_id" property="resGroup4Id" jdbcType="INTEGER" />
|
||||
<result column="res_group_4_num" property="resGroup4Num" jdbcType="INTEGER" />
|
||||
<result column="res_group_5_id" property="resGroup5Id" jdbcType="INTEGER" />
|
||||
<result column="res_group_5_num" property="resGroup5Num" jdbcType="INTEGER" />
|
||||
<result column="min_ttl" property="minTtl" jdbcType="INTEGER" />
|
||||
<result column="max_ttl" property="maxTtl" jdbcType="INTEGER" />
|
||||
<result column="action" property="action" jdbcType="INTEGER" />
|
||||
<result column="is_valid" property="isValid" jdbcType="INTEGER" />
|
||||
<result column="is_audit" property="isAudit" jdbcType="INTEGER" />
|
||||
<result column="creator_id" property="creatorId" jdbcType="INTEGER" />
|
||||
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
|
||||
<result column="editor_id" property="editorId" jdbcType="INTEGER" />
|
||||
<result column="edit_time" property="editTime" jdbcType="TIMESTAMP" />
|
||||
<result column="auditor_id" property="auditorId" jdbcType="INTEGER" />
|
||||
<result column="audit_time" property="auditTime" jdbcType="TIMESTAMP" />
|
||||
<result column="service_id" property="serviceId" jdbcType="INTEGER" />
|
||||
<result column="request_id" property="requestId" jdbcType="INTEGER" />
|
||||
<result column="is_area_effective" property="isAreaEffective" jdbcType="INTEGER" />
|
||||
<result column="classify" property="classify" jdbcType="VARCHAR" />
|
||||
<result column="attribute" property="attribute" jdbcType="VARCHAR" />
|
||||
<result column="lable" property="lable" jdbcType="VARCHAR" />
|
||||
<result column="area_effective_ids" property="areaEffectiveIds" jdbcType="VARCHAR" />
|
||||
<result column="function_id" property="functionId" jdbcType="INTEGER" />
|
||||
<result column="cfg_region_code" property="cfgRegionCode" jdbcType="INTEGER" />
|
||||
<result column="cfg_type" property="cfgType" jdbcType="VARCHAR" />
|
||||
<result column="group_1_name" property="group1Name" jdbcType="VARCHAR" />
|
||||
<result column="compile_id" property="compileId" jdbcType="INTEGER" />
|
||||
</resultMap>
|
||||
<sql id="DnsResStrategyColumns">
|
||||
r.cfg_id,r.cfg_desc,r.res_group_1_id,
|
||||
r.res_group_1_num,r.res_group_2_id,r.res_group_2_num,r.res_group_3_id
|
||||
,r.res_group_3_num,r.res_group_4_id,r.res_group_4_num
|
||||
,r.res_group_5_id,r.res_group_5_num,r.min_ttl
|
||||
,r.max_ttl,r.cfg_type,r.action
|
||||
,r.is_valid,r.is_audit,r.creator_id,r.create_time,r.editor_id
|
||||
,r.edit_time,r.auditor_id,r.audit_time,r.service_id,r.request_id
|
||||
,r.is_area_effective,r.classify,r.attribute,r.lable
|
||||
,r.area_effective_ids,r.function_id,r.cfg_region_code,r.compile_id
|
||||
</sql>
|
||||
|
||||
<!-- 查出所有 有效数据-->
|
||||
<select id="findPage" resultMap="DnsResStrategyMap">
|
||||
SELECT
|
||||
<include refid="DnsResStrategyColumns"/>
|
||||
<trim prefix="," prefixOverrides=",">
|
||||
, a.group_name group_1_name,s.name as creator_name,e.name as editor_name,u.name as auditor_name
|
||||
,ri.request_title as requestName
|
||||
</trim>
|
||||
FROM dns_res_strategy r
|
||||
left join policy_group_info a on r.res_group_1_id=a.group_Id
|
||||
left join sys_user s on r.creator_id=s.id
|
||||
left join sys_user e on r.editor_id=e.id
|
||||
left join sys_user u on r.auditor_id=u.id
|
||||
left join request_info ri on r.request_id=ri.id
|
||||
<trim prefix="WHERE" prefixOverrides="AND |OR ">
|
||||
<if test="page !=null and page.where != null and page.where != ''">
|
||||
AND ${page.where}
|
||||
</if>
|
||||
<if test="cfgId != null">
|
||||
AND r.CFG_ID=#{cfgId,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="compileId != null">
|
||||
AND r.compile_id=#{compileId,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="cfgDesc != null and cfgDesc != ''">
|
||||
AND r.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="group1Name != null and group1Name != ''">
|
||||
AND a.group_name like concat(concat('%',#{group1Name,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="action != null">
|
||||
AND r.ACTION=#{action,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isValid != null">
|
||||
AND r.IS_VALID=#{isValid,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isValid == null">
|
||||
AND r.IS_VALID != -1
|
||||
</if>
|
||||
<if test="isAudit != null">
|
||||
AND r.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="creatorName != null and creatorName != ''">
|
||||
AND CREATOR_NAME like concat(concat('%',#{creatorName,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="editorName != null and editorName != ''">
|
||||
AND r.EDITOR_NAME like concat(concat('%',#{editorName,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="auditorName != null and auditorName != ''">
|
||||
AND AUDITOR_NAME like concat(concat('%',#{auditorName,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="serviceId != null">
|
||||
AND r.SERVICE_ID=#{serviceId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="requestId != null">
|
||||
AND r.REQUEST_ID=#{requestId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isAreaEffective != null">
|
||||
AND r.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="classify != null and classify != ''">
|
||||
AND r.classify like concat(concat('%',#{classify,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="attribute != null and attribute != ''">
|
||||
AND r.attribute like concat(concat('%',#{attribute,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="lable != null and lable != ''">
|
||||
AND r.lable like concat(concat('%',#{lable,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="functionId != null">
|
||||
AND r.function_id=#{functionId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<!-- 数据范围过滤 -->
|
||||
${sqlMap.dsf}
|
||||
</trim>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY r.CFG_ID desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
<!-- 查出所有 有效数据-->
|
||||
<select id="findList" resultMap="DnsResStrategyMap">
|
||||
SELECT
|
||||
<include refid="DnsResStrategyColumns"/>
|
||||
FROM dns_res_strategy r
|
||||
<where>
|
||||
<if test="isValid == -1">
|
||||
AND r.is_valid !=-1
|
||||
</if>
|
||||
<if test="isValid == 1">
|
||||
AND r.is_valid ==1
|
||||
</if>
|
||||
<if test="isValid == 0">
|
||||
AND r.is_valid ==0
|
||||
</if>
|
||||
<if test="cfgId != null">
|
||||
AND r.CFG_ID=#{cfgId,jdbcType=BIGINT}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<insert id="insert" parameterType="com.nis.domain.configuration.DnsResStrategy" >
|
||||
insert into dns_res_strategy (
|
||||
CFG_ID,
|
||||
CFG_DESC,
|
||||
ACTION,
|
||||
IS_VALID,
|
||||
IS_AUDIT,
|
||||
CREATOR_ID,
|
||||
CREATE_TIME,
|
||||
EDITOR_ID,
|
||||
EDIT_TIME,
|
||||
AUDITOR_ID,
|
||||
AUDIT_TIME,
|
||||
SERVICE_ID,
|
||||
REQUEST_ID,
|
||||
IS_AREA_EFFECTIVE,
|
||||
CLASSIFY,
|
||||
ATTRIBUTE,
|
||||
LABLE,
|
||||
AREA_EFFECTIVE_IDS,
|
||||
function_id,
|
||||
res_group_1_id,
|
||||
res_group_1_num,
|
||||
res_group_2_id,
|
||||
res_group_2_num,
|
||||
res_group_3_id,
|
||||
res_group_3_num,
|
||||
res_group_4_id,
|
||||
res_group_4_num,
|
||||
res_group_5_id,
|
||||
res_group_5_num,
|
||||
min_ttl,
|
||||
max_ttl,
|
||||
cfg_type,
|
||||
compile_Id,
|
||||
cfg_region_code
|
||||
)values (
|
||||
#{cfgId,jdbcType=VARCHAR},
|
||||
#{cfgDesc,jdbcType=VARCHAR},
|
||||
#{action,jdbcType=INTEGER},
|
||||
0,
|
||||
0,
|
||||
#{creatorId,jdbcType=INTEGER},
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
#{editorId,jdbcType=INTEGER},
|
||||
#{editTime,jdbcType=TIMESTAMP},
|
||||
#{auditorId,jdbcType=INTEGER},
|
||||
#{auditTime,jdbcType=TIMESTAMP},
|
||||
#{serviceId,jdbcType=INTEGER},
|
||||
#{requestId,jdbcType=INTEGER},
|
||||
#{isAreaEffective,jdbcType=INTEGER},
|
||||
#{classify,jdbcType=VARCHAR},
|
||||
#{attribute,jdbcType=VARCHAR},
|
||||
#{lable,jdbcType=VARCHAR},
|
||||
#{areaEffectiveIds,jdbcType=VARCHAR},
|
||||
#{functionId,jdbcType=INTEGER},
|
||||
#{resGroup1Id,jdbcType=INTEGER},
|
||||
#{resGroup1Num,jdbcType=INTEGER},
|
||||
#{resGroup2Id,jdbcType=INTEGER},
|
||||
#{resGroup2Num,jdbcType=INTEGER},
|
||||
#{resGroup3Id,jdbcType=INTEGER},
|
||||
#{resGroup3Num,jdbcType=INTEGER},
|
||||
#{resGroup4Id,jdbcType=INTEGER},
|
||||
#{resGroup4Num,jdbcType=INTEGER},
|
||||
#{resGroup5Id,jdbcType=INTEGER},
|
||||
#{resGroup5Num,jdbcType=INTEGER},
|
||||
#{minTtl,jdbcType=INTEGER},
|
||||
#{maxTtl,jdbcType=INTEGER},
|
||||
#{cfgType,jdbcType=VARCHAR},
|
||||
#{compileId,jdbcType=INTEGER},
|
||||
#{cfgRegionCode,jdbcType=INTEGER}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="update" parameterType="com.nis.domain.configuration.DnsResStrategy" >
|
||||
update dns_res_strategy
|
||||
<set >
|
||||
<trim suffixOverrides=",">
|
||||
<if test="cfgDesc != null and cfgDesc != ''" >
|
||||
cfg_desc = #{cfgDesc,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="compileId != null " >
|
||||
compile_Id = #{compileId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="action != null" >
|
||||
action = #{action,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isValid != null" >
|
||||
is_valid = #{isValid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isAudit != null" >
|
||||
is_audit = #{isAudit,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="editorId != null" >
|
||||
editor_id = #{editorId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="editTime != null and editTime != ''" >
|
||||
edit_time = #{editTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="auditorId != null" >
|
||||
AUDITOR_ID = #{auditorId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="auditTime != null and auditTime != ''" >
|
||||
AUDIT_TIME = #{auditTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="requestId != null" >
|
||||
request_id = #{requestId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isAreaEffective != null" >
|
||||
is_area_effective = #{isAreaEffective,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="classify != null and classify != ''" >
|
||||
classify = #{classify,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="attribute != null and attribute != ''" >
|
||||
attribute = #{attribute,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="lable != null and lable != ''" >
|
||||
lable = #{lable,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="areaEffectiveIds != null" >
|
||||
area_effective_ids = #{areaEffectiveIds,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="functionId != null" >
|
||||
function_id = #{functionId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="serviceId != null" >
|
||||
service_id = #{serviceId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="resGroup1Id != null" >
|
||||
res_group_1_id = #{resGroup1Id,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="resGroup1Num != null" >
|
||||
res_group_1_num = #{resGroup1Num,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="resGroup2Id != null" >
|
||||
res_group_2_id = #{resGroup2Id,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="resGroup2Num != null" >
|
||||
res_group_2_num = #{resGroup2Num,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="resGroup3Id != null" >
|
||||
res_group_3_id = #{resGroup3Id,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="resGroup3Num != null" >
|
||||
res_group_3_num = #{resGroup3Num,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="resGroup4Id != null" >
|
||||
res_group_4_id = #{resGroup4Id,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="resGroup4Num != null" >
|
||||
res_group_4_num = #{resGroup4Num,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="resGroup5Id != null" >
|
||||
res_group_5_id = #{resGroup5Id,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="resGroup5Num != null" >
|
||||
res_group_5_num = #{resGroup5Num,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="minTtl != null" >
|
||||
min_ttl = #{minTtl,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="maxTtl != null" >
|
||||
max_ttl = #{maxTtl,jdbcType=INTEGER},
|
||||
</if>
|
||||
</trim>
|
||||
</set>
|
||||
<where>
|
||||
and cfg_id = #{cfgId,jdbcType=INTEGER}
|
||||
<if test="functionId != null" >
|
||||
and function_id = #{functionId,jdbcType=INTEGER}
|
||||
</if>
|
||||
</where>
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
@@ -40,6 +40,10 @@ public class PolicyGroupInfoService extends BaseService{
|
||||
page.setList(list);
|
||||
return page;
|
||||
}
|
||||
public List<PolicyGroupInfo> findPolicyGroupInfos() {
|
||||
List<PolicyGroupInfo> list=policyGroupInfoDao.findPolicyGroupInfos();
|
||||
return list;
|
||||
}
|
||||
|
||||
public PolicyGroupInfo getById(int id) {
|
||||
PolicyGroupInfo policyGroupInfo=policyGroupInfoDao.getById(id);
|
||||
|
||||
@@ -1,109 +1,184 @@
|
||||
package com.nis.web.service.configuration;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.callback.NtcDnsResStrategy;
|
||||
import com.nis.domain.configuration.AreaBean;
|
||||
import com.nis.domain.configuration.AreaIpCfg;
|
||||
import com.nis.domain.configuration.AvVoipAccountCfg;
|
||||
import com.nis.domain.configuration.AvVoipIpCfg;
|
||||
import com.nis.domain.configuration.DnsIpCfg;
|
||||
import com.nis.domain.maat.DnsIpRecvData;
|
||||
import com.nis.domain.maat.FromMaatBean;
|
||||
import com.nis.domain.maat.MaatDnsIpCfg;
|
||||
import com.nis.domain.maat.ToMaatDnsIpBean;
|
||||
import com.nis.main.ConvertTool;
|
||||
import com.nis.util.Collections3;
|
||||
import com.nis.domain.configuration.BaseStringCfg;
|
||||
import com.nis.domain.configuration.CfgIndexInfo;
|
||||
import com.nis.domain.configuration.DnsIpCfg;
|
||||
import com.nis.domain.maat.MaatCfg;
|
||||
import com.nis.domain.maat.ToMaatBean;
|
||||
import com.nis.domain.maat.ToMaatResult;
|
||||
import com.nis.domain.maat.MaatCfg.DigestCfg;
|
||||
import com.nis.domain.maat.MaatCfg.GroupCfg;
|
||||
import com.nis.domain.maat.MaatCfg.IpCfg;
|
||||
import com.nis.domain.maat.MaatCfg.NumBoundaryCfg;
|
||||
import com.nis.domain.maat.MaatCfg.StringCfg;
|
||||
import com.nis.exceptions.MaatConvertException;
|
||||
import com.nis.util.ConfigServiceUtil;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.util.StringUtils;
|
||||
import com.nis.web.dao.configuration.DnsIpCfgDao;
|
||||
import com.nis.web.service.CrudService;
|
||||
import com.nis.web.test.DnsIpTest;
|
||||
import com.nis.web.security.UserUtils;
|
||||
import com.nis.web.service.BaseService;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 音视频文本
|
||||
* @author dell
|
||||
*
|
||||
*/
|
||||
@Service
|
||||
public class DnsIpCfgService extends CrudService<DnsIpCfgDao, DnsIpCfg>{
|
||||
public class DnsIpCfgService extends BaseService{
|
||||
@Autowired
|
||||
private DnsIpCfgDao dnsIpCfgDao;
|
||||
@Override
|
||||
protected DnsIpCfgDao dnsIpCfgDao;
|
||||
|
||||
|
||||
public Page<DnsIpCfg> findPage(Page page, DnsIpCfg entity) {
|
||||
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"r"));
|
||||
entity.setPage(page);
|
||||
List<DnsIpCfg> list=dnsIpCfgDao.findPage(entity);
|
||||
page.setList(list);
|
||||
return page;
|
||||
}
|
||||
|
||||
public DnsIpCfg getDnsIpCfg(Long cfgId) {
|
||||
return dnsIpCfgDao.getDnsIpCfg(cfgId);
|
||||
}
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public void save(DnsIpCfg dnsIpCfg) {
|
||||
dao.insert(dnsIpCfg);
|
||||
|
||||
Gson gson = new GsonBuilder().excludeFieldsWithoutExposeAnnotation().create();
|
||||
|
||||
//组织要发送的json
|
||||
List<ToMaatDnsIpBean> toMaatData = new ArrayList<ToMaatDnsIpBean>();
|
||||
ToMaatDnsIpBean toMaatBean = new ToMaatDnsIpBean();
|
||||
List<MaatDnsIpCfg> ipCfgList = new ArrayList<MaatDnsIpCfg>();
|
||||
MaatDnsIpCfg ipCfg = new MaatDnsIpCfg();
|
||||
List<DnsIpCfg> d1 = new ArrayList<DnsIpCfg>();
|
||||
d1.add(dnsIpCfg);
|
||||
ipCfg.setIpCfg(d1);
|
||||
ipCfgList.add(ipCfg);
|
||||
toMaatBean.setServiceCfg(ipCfgList);
|
||||
toMaatBean.setAttribute(dnsIpCfg.getAttribute());
|
||||
toMaatBean.setClassify(dnsIpCfg.getClassify());
|
||||
toMaatBean.setLable(dnsIpCfg.getLable());
|
||||
toMaatBean.setIsValid(1);
|
||||
toMaatBean.setRequestId(dnsIpCfg.getRequest().getId());
|
||||
|
||||
toMaatData.add(toMaatBean);
|
||||
|
||||
String sendJson = gson.toJson(toMaatData);
|
||||
|
||||
logger.info("准备下发配置:" + sendJson);
|
||||
//下发配置、接收结果
|
||||
String recvJson = "";
|
||||
try {
|
||||
//recvJson = new ConvertTool().saveDNSIPConfig(sendJson);
|
||||
recvJson = DnsIpTest.examine(sendJson);
|
||||
logger.info("收到结果:" + recvJson);
|
||||
} catch (Throwable e) {
|
||||
logger.error("欺骗ip配置新增下发失败,cfgId=" + dnsIpCfg.getCfgId(), e);
|
||||
throw new RuntimeException("欺骗ip配置新增下发失败:通讯异常");
|
||||
}
|
||||
|
||||
if (StringUtils.isBlank(recvJson)) {
|
||||
logger.error("新增欺骗ip配置失败:收到空的返回结果,cfgId:" + dnsIpCfg.getCfgId());
|
||||
throw new RuntimeException("新增欺骗ip配置失败:收到空的返回结果");
|
||||
}
|
||||
logger.info("结果接收成功");
|
||||
|
||||
FromMaatBean fromMaatBean = gson.fromJson(recvJson, FromMaatBean.class);
|
||||
List<DnsIpRecvData> data = fromMaatBean.getData();
|
||||
if (!Collections3.isEmpty(data)) {
|
||||
DnsIpRecvData dnsIpRecvData = data.get(0);
|
||||
if (dnsIpRecvData.getFakeId() != null && dnsIpRecvData.getCfgId() != null
|
||||
&& dnsIpRecvData.getCfgId().longValue() == dnsIpCfg.getCfgId().longValue()) {
|
||||
dnsIpCfg.setFakeId(dnsIpRecvData.getFakeId());
|
||||
dao.update(dnsIpCfg);
|
||||
public void saveOrUpdate(DnsIpCfg entity){
|
||||
Date createTime=new Date();
|
||||
//设置区域运营商信息
|
||||
setAreaEffectiveIds(entity);
|
||||
//新增
|
||||
if(entity.getCfgId()==null){
|
||||
entity.setCreatorId(UserUtils.getUser().getId());
|
||||
entity.setCreateTime(createTime);
|
||||
entity.setIsValid(0);
|
||||
entity.setIsAudit(0);
|
||||
//调用服务接口获取compileId
|
||||
List<Integer> compileIds = new ArrayList<Integer>();
|
||||
try {
|
||||
compileIds = ConfigServiceUtil.getId(1,1);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.info("获取编译ID出错");
|
||||
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>:"+e.getMessage());
|
||||
}
|
||||
} else {
|
||||
logger.error("新增欺骗ip配置失败:收到空的返回结果,cfgId:" + dnsIpCfg.getCfgId());
|
||||
throw new RuntimeException("新增欺骗ip配置失败:收到空的返回结果");
|
||||
if(compileIds != null && compileIds.size() >0 && compileIds.get(0) != 0){
|
||||
entity.setCompileId(compileIds.get(0));
|
||||
dnsIpCfgDao.insert(entity);
|
||||
}else{
|
||||
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>");
|
||||
}
|
||||
|
||||
//修改
|
||||
}else{
|
||||
Date editTime=new Date();
|
||||
entity.setIsValid(0);
|
||||
entity.setIsAudit(0);
|
||||
entity.setEditorId(UserUtils.getUser().getId());
|
||||
entity.setEditTime(editTime);
|
||||
dnsIpCfgDao.update(entity);
|
||||
}
|
||||
}
|
||||
|
||||
public void delete(String fakeIds) {
|
||||
if(fakeIds.endsWith(","))fakeIds=fakeIds.substring(0,fakeIds.lastIndexOf(","));
|
||||
String[] fakeIdsArr = fakeIds.split(",");
|
||||
for (String fakeId : fakeIdsArr) {
|
||||
dnsIpCfgDao.deleteByFakeId(fakeId);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param isAudit
|
||||
* @param isValid
|
||||
* @param ids compileIds
|
||||
*/
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public void delete(Integer isAudit,Integer isValid,String ids,Integer functionId){
|
||||
DnsIpCfg entity = new DnsIpCfg();
|
||||
String[] idArray = ids.split(",");
|
||||
for(String id :idArray){
|
||||
entity.setCfgId(Long.valueOf(id));
|
||||
entity.setFunctionId(functionId);
|
||||
entity.setIsAudit(isAudit);
|
||||
entity.setIsValid(isValid);
|
||||
entity.setEditorId(UserUtils.getUser().getId());
|
||||
entity.setEditTime(new Date());
|
||||
dnsIpCfgDao.update(entity);
|
||||
}
|
||||
//给配置转换层发送、接收结果
|
||||
String sendJson = "{\"fakeId\":[" + fakeIds + "]}";
|
||||
logger.info("准备下发配置:" + sendJson);
|
||||
Boolean recv = true;
|
||||
try {
|
||||
recv = new ConvertTool().invalidDNSIPConfig(sendJson);
|
||||
} catch (Throwable e) {
|
||||
logger.error("欺骗ip配置删除失败:通讯异常,fakeIds:" + fakeIds, e);
|
||||
throw new RuntimeException("欺骗ip配置删除失败:通讯失败");
|
||||
}
|
||||
if (!recv) {
|
||||
logger.error("欺骗ip配置删除失败,收到结果 " + recv + " ,fakeIds:" + fakeIds);
|
||||
throw new RuntimeException("欺骗ip配置删除失败");
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param isAudit
|
||||
* @param isValid
|
||||
* @param ids cfgId
|
||||
* @param functionId
|
||||
*/
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public void audit(Integer isAudit,Integer isValid,Integer functionId,String id,Date auditTime){
|
||||
DnsIpCfg entity = new DnsIpCfg();
|
||||
|
||||
List<DnsIpCfg> list = new ArrayList();
|
||||
|
||||
entity.setCfgId(Long.valueOf(id));
|
||||
entity.setIsAudit(isAudit);
|
||||
entity.setIsValid(isValid);
|
||||
entity.setAuditorId(UserUtils.getUser().getId());
|
||||
entity.setAuditTime(auditTime);
|
||||
|
||||
dnsIpCfgDao.update(entity);
|
||||
|
||||
entity=dnsIpCfgDao.getDnsIpCfg(Long.valueOf(id));
|
||||
|
||||
String json="";
|
||||
if(entity.getIsAudit()==1){
|
||||
List<NtcDnsResStrategy> resStrategyList=new ArrayList<NtcDnsResStrategy>();
|
||||
//NtcDnsResStrategy resStrategy=convertCallBackIp(entity);
|
||||
//resStrategyList.add(resStrategy);
|
||||
//调用服务接口下发配置数据
|
||||
json=gsonToJson(resStrategyList);
|
||||
logger.info("DNS响应策略配置下发配置参数:"+json);
|
||||
//调用服务接口下发配置
|
||||
try {
|
||||
ToMaatResult result = ConfigServiceUtil.postCallbackCfg(json);
|
||||
if(result!=null){
|
||||
logger.info("DNS响应策略配置下发响应信息:"+result.getMsg());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("DNS响应策略配置配置下发失败",e);
|
||||
throw e;
|
||||
}
|
||||
}else if(entity.getIsAudit()==3){
|
||||
List<NtcDnsResStrategy> resStrategyList=new ArrayList<>();
|
||||
//NtcDnsResStrategy ntcDnsResStrategy=convertCallBackDnsResStrategy(cfg);
|
||||
//resStrategyList.add(ntcDnsResStrategy);
|
||||
//调用服务接口取消配置
|
||||
json=gsonToJson(resStrategyList);
|
||||
logger.info("DNS响应策略配置配置参数:"+json);
|
||||
//调用服务接口取消配置
|
||||
try {
|
||||
ToMaatResult result = ConfigServiceUtil.put(json, 2);
|
||||
logger.info("DNS响应策略配置响应信息:"+result.getMsg());
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.info("DNS响应策略配置配置失败");
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,188 @@
|
||||
package com.nis.web.service.configuration;
|
||||
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.callback.InlineIp;
|
||||
import com.nis.domain.callback.NtcDnsResStrategy;
|
||||
import com.nis.domain.configuration.DnsResStrategy;
|
||||
import com.nis.domain.maat.MaatCfg;
|
||||
import com.nis.domain.maat.ToMaatBean;
|
||||
import com.nis.domain.maat.ToMaatResult;
|
||||
import com.nis.domain.maat.MaatCfg.DigestCfg;
|
||||
import com.nis.domain.maat.MaatCfg.GroupCfg;
|
||||
import com.nis.domain.maat.MaatCfg.IpCfg;
|
||||
import com.nis.domain.maat.MaatCfg.NumBoundaryCfg;
|
||||
import com.nis.domain.maat.MaatCfg.StringCfg;
|
||||
import com.nis.exceptions.MaatConvertException;
|
||||
import com.nis.util.ConfigServiceUtil;
|
||||
import com.nis.web.dao.configuration.DnsResStrategyDao;
|
||||
import com.nis.web.security.UserUtils;
|
||||
import com.nis.web.service.BaseService;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 音视频文本
|
||||
* @author dell
|
||||
*
|
||||
*/
|
||||
@Service
|
||||
public class DnsResStrategyService extends BaseService{
|
||||
@Autowired
|
||||
protected DnsResStrategyDao dnsResStrategyDao;
|
||||
|
||||
|
||||
/**
|
||||
* 查询分页数据
|
||||
* @param page 分页对象
|
||||
* @param entity
|
||||
* @return
|
||||
*/
|
||||
public Page<DnsResStrategy> findPage(Page<DnsResStrategy> page, DnsResStrategy entity) {
|
||||
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"r"));
|
||||
entity.setPage(page);
|
||||
List<DnsResStrategy> list=dnsResStrategyDao.findPage(entity);
|
||||
page.setList(list);
|
||||
return page;
|
||||
}
|
||||
public List<DnsResStrategy> findDnsResStrategys(Long cfgId,Integer isValid) {
|
||||
List<DnsResStrategy> list=dnsResStrategyDao.findList(cfgId,isValid);
|
||||
return list;
|
||||
}
|
||||
|
||||
public DnsResStrategy getDnsResStrategy(Long id,Integer isValid) {
|
||||
List<DnsResStrategy> list=dnsResStrategyDao.findList(id,isValid);
|
||||
DnsResStrategy dnsResStrategy=null;
|
||||
if(list != null && list.size()>0){
|
||||
dnsResStrategy=list.get(0);
|
||||
}
|
||||
return dnsResStrategy;
|
||||
}
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public void saveOrUpdate(DnsResStrategy entity){
|
||||
Date createTime=new Date();
|
||||
setAreaEffectiveIds(entity);
|
||||
List<DnsResStrategy> list=dnsResStrategyDao.findList(entity.getCfgId(),null);
|
||||
//新增
|
||||
if(list==null || list.size()==0){
|
||||
entity.initDefaultValue();
|
||||
entity.setCreatorId(UserUtils.getUser().getId());
|
||||
entity.setCreateTime(createTime);
|
||||
entity.setIsValid(0);
|
||||
entity.setIsAudit(0);
|
||||
//调用服务接口获取compileId
|
||||
List<Integer> compileIds = new ArrayList<Integer>();
|
||||
try {
|
||||
compileIds = ConfigServiceUtil.getId(1,1);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.info("获取编译ID出错");
|
||||
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>:"+e.getMessage());
|
||||
}
|
||||
if(compileIds != null && compileIds.size() >0 && compileIds.get(0) != 0){
|
||||
entity.setCompileId(compileIds.get(0));
|
||||
}
|
||||
dnsResStrategyDao.insert(entity);
|
||||
//修改
|
||||
}else{
|
||||
Date editTime=new Date();
|
||||
entity.setIsValid(0);
|
||||
entity.setIsAudit(0);
|
||||
entity.setEditorId(UserUtils.getUser().getId());
|
||||
entity.setEditTime(editTime);
|
||||
|
||||
dnsResStrategyDao.update(entity);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param isAudit
|
||||
* @param isValid
|
||||
* @param ids compileIds
|
||||
*/
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public void delete(Integer isAudit,Integer isValid,String ids,Integer functionId){
|
||||
DnsResStrategy entity = new DnsResStrategy();
|
||||
String[] idArray = ids.split(",");
|
||||
for(String id :idArray){
|
||||
entity.setCfgId(Long.valueOf(id));
|
||||
entity.setFunctionId(functionId);
|
||||
entity.setIsAudit(isAudit);
|
||||
entity.setIsValid(isValid);
|
||||
entity.setEditorId(UserUtils.getUser().getId());
|
||||
entity.setEditTime(new Date());
|
||||
dnsResStrategyDao.update(entity);
|
||||
}
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param isAudit
|
||||
* @param isValid
|
||||
* @param ids cfgId
|
||||
* @param functionId
|
||||
*/
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public void audit(Integer isAudit,Integer isValid,Integer functionId,String id,Date auditTime){
|
||||
DnsResStrategy cfg=new DnsResStrategy();
|
||||
List<DnsResStrategy> beans=new ArrayList<>();
|
||||
beans.add(cfg);
|
||||
cfg.setCfgId(Long.valueOf(id));
|
||||
cfg.setIsValid(isValid);
|
||||
cfg.setIsAudit(isAudit);
|
||||
cfg.setEditTime(auditTime);
|
||||
cfg.setEditorId(UserUtils.getUser().getId());
|
||||
cfg.setAuditorId(UserUtils.getUser().getId());
|
||||
cfg.setAuditTime(auditTime);
|
||||
dnsResStrategyDao.update(cfg);
|
||||
cfg=getDnsResStrategy(cfg.getCfgId(), null);
|
||||
String json="";
|
||||
if(cfg.getIsAudit()==1){
|
||||
List<NtcDnsResStrategy> resStrategyList=new ArrayList<NtcDnsResStrategy>();
|
||||
NtcDnsResStrategy resStrategy=convertCallBackDnsResStrategy(cfg);
|
||||
resStrategyList.add(resStrategy);
|
||||
//调用服务接口下发配置数据
|
||||
json=gsonToJson(resStrategyList);
|
||||
logger.info("DNS响应策略配置下发配置参数:"+json);
|
||||
//调用服务接口下发配置
|
||||
try {
|
||||
ToMaatResult result = ConfigServiceUtil.postCallbackCfg(json);
|
||||
if(result!=null){
|
||||
logger.info("DNS响应策略配置下发响应信息:"+result.getMsg());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("DNS响应策略配置配置下发失败",e);
|
||||
throw e;
|
||||
}
|
||||
}else if(cfg.getIsAudit()==3){
|
||||
List<NtcDnsResStrategy> resStrategyList=new ArrayList<>();
|
||||
NtcDnsResStrategy ntcDnsResStrategy=convertCallBackDnsResStrategy(cfg);
|
||||
resStrategyList.add(ntcDnsResStrategy);
|
||||
//调用服务接口取消配置
|
||||
json=gsonToJson(resStrategyList);
|
||||
logger.info("DNS响应策略配置配置参数:"+json);
|
||||
//调用服务接口取消配置
|
||||
try {
|
||||
ToMaatResult result = ConfigServiceUtil.put(json, 2);
|
||||
logger.info("DNS响应策略配置响应信息:"+result.getMsg());
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.info("DNS响应策略配置配置失败");
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,36 +3,18 @@
|
||||
<html>
|
||||
<head>
|
||||
<title><spring:message code="${cfgName}"></spring:message></title>
|
||||
<link href="${pageContext.request.contextPath}/static/global/plugins/bootstrap-select/css/bootstrap-select.min.css" rel="stylesheet"/>
|
||||
<script src="${pageContext.request.contextPath}/static/global/plugins/bootstrap-select/js/bootstrap-select.min.js"></script>
|
||||
<c:choose>
|
||||
<c:when test="${cookie.Language.value eq 'zh_CN'}">
|
||||
<script src="${pageContext.request.contextPath}/static/global/plugins/bootstrap-select/js/i18n/defaults-zh_CN.min.js"></script>
|
||||
</c:when>
|
||||
<c:when test="${cookie.Language.value eq 'en'}">
|
||||
<script src="${pageContext.request.contextPath}/static/global/plugins/bootstrap-select/js/i18n/defaults-en_US.min.js"></script>
|
||||
</c:when>
|
||||
<c:when test="${cookie.Language.value eq 'ru_RU'}">
|
||||
<script src="${pageContext.request.contextPath}/static/global/plugins/bootstrap-select/js/i18n/defaults-ru_RU.min.js"></script>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<script src="${pageContext.request.contextPath}/static/global/plugins/bootstrap-select/js/i18n/defaults-en_US.min.js"></script>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
switchIpType($("select[name='ipType']"));
|
||||
$("#submitBtn").on("click",function(){
|
||||
$("#inputFrom").attr("action","${ctx}/cfg/dnsIp/save");
|
||||
$("#inputFrom").submit();
|
||||
});
|
||||
$("#cancel").on("click",function(){
|
||||
window.history.back();
|
||||
});
|
||||
$("select[name='ipType']").on("change",function(){
|
||||
switchIpType($(this));
|
||||
});
|
||||
$("#inputFrom").validate({
|
||||
$(".action").on("change", function() {
|
||||
$("#serviceId").val($(this).attr("serviceId"));
|
||||
$("#protocolId").val($(this).attr("protocolId"));
|
||||
});
|
||||
$("#serviceId").val($(".action:checked").attr("serviceId"));
|
||||
$("#protocolId").val($(".action:checked").attr("protocolId"));
|
||||
$("#cfgFrom").validate({
|
||||
errorPlacement: function(error,element){
|
||||
$(element).parents(".form-group").find("div[for='"+element.attr("name")+"']").append(error);
|
||||
},
|
||||
@@ -49,9 +31,9 @@ $(function(){
|
||||
|
||||
<div class="page-content">
|
||||
|
||||
<h3 class="page-title">
|
||||
<spring:message code="ip_spoofing_configuration"></spring:message>
|
||||
</h3>
|
||||
<%-- <h3 class="page-title">
|
||||
<spring:message code="${add}"></spring:message>
|
||||
</h3> --%>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
@@ -59,256 +41,82 @@ $(function(){
|
||||
<div class="portlet-title">
|
||||
<div class="caption">
|
||||
<i class="fa fa-gift"></i>
|
||||
<c:if test="${empty dnsIpCfg.cfgId}"><spring:message code="add"></spring:message></c:if>
|
||||
<c:if test="${not empty dnsIpCfg.cfgId}"><spring:message code="edit"></spring:message></c:if>
|
||||
<c:if test="${empty _cfg.cfgId}"><spring:message code="add"></spring:message></c:if>
|
||||
<c:if test="${not empty _cfg.cfgId}"><spring:message code="edit"></spring:message></c:if>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body form">
|
||||
<!-- BEGIN FORM-->
|
||||
<form id="inputFrom" method="post" class="form-horizontal">
|
||||
<input name="cfgId" value="${dnsIpCfg.cfgId }" type="hidden"/>
|
||||
<div class="form-body">
|
||||
<div class="row">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><spring:message code="config_describe"/></label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control" type="text" id="cfgDesc" name="cfgDesc" value="${dnsIpCfg.cfgDesc}">
|
||||
</div>
|
||||
<div for="cfgDesc"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="ip_type"/></label>
|
||||
<div class="col-md-6">
|
||||
<select name="ipType" class="selectpicker show-tick form-control required">
|
||||
<option value="4" <c:if test="${dnsIpCfg.ipType==4}">selected</c:if> >V4</option>
|
||||
<option value="6" <c:if test="${dnsIpCfg.ipType==6}">selected</c:if>>V6</option>
|
||||
</select>
|
||||
</div>
|
||||
<div for="ipType"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="client_ip"/></label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control required ipCheck" type="text" name="srcIp" value="${dnsIpCfg.srcIp}">
|
||||
</div>
|
||||
<div for="srcIp"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="client_address_mask"/></label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control required ipMask" type="text" name="srcIpMask" value="${dnsIpCfg.srcIpMask}">
|
||||
</div>
|
||||
<div for="srcIpMask"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="client_port"/></label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control required" type="text" name="srcPort" value="${dnsIpCfg.srcPort}" range="[0,65535]">
|
||||
</div>
|
||||
<div for="srcPort"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="client_port_mask"/></label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control required" type="text" name="srcPortMask" value="${dnsIpCfg.srcPortMask}" range="[0,65535]">
|
||||
</div>
|
||||
<div for="srcPortMask"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="server_ip"/></label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control required ipCheck" type="text" name="dstIp" value="${dnsIpCfg.dstIp}">
|
||||
</div>
|
||||
<div for="dstIp"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="server_address_mask"/></label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control required ipMask" type="text" name="dstIpMask" value="${dnsIpCfg.dstIpMask}">
|
||||
</div>
|
||||
<div for="dstIpMask"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="server_port"/></label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control required" type="text" name="dstPort" value="${dnsIpCfg.dstPort}" range="[0,65535]">
|
||||
</div>
|
||||
<div for="dstPort"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="server_port_mask"/></label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control required" type="text" name="dstPortMask" value="${dnsIpCfg.dstPortMask}" range="[0,65535]">
|
||||
</div>
|
||||
<div for="dstPortMask"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="direction"/></label>
|
||||
<div class="col-md-6">
|
||||
<select name="direction" class="selectpicker show-tick form-control required" title=<spring:message code="select"/>>
|
||||
<option value="0" <c:if test="${dnsIpCfg.direction==0}">selected</c:if>><spring:message code="twoway"/></option>
|
||||
<option value="1" <c:if test="${dnsIpCfg.direction==1}">selected</c:if>><spring:message code="oneway"/></option>
|
||||
</select>
|
||||
</div>
|
||||
<div for="direction"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="protocol"/></label>
|
||||
<div class="col-md-6">
|
||||
<select name="protocol" class="selectpicker show-tick form-control required" title=<spring:message code="select"/>>
|
||||
<option value="6" <c:if test="${dnsIpCfg.protocol==6}">selected</c:if>>TCP</option>
|
||||
<option value="17" <c:if test="${dnsIpCfg.protocol==17}">selected</c:if>>UDP</option>
|
||||
<option value="0" <c:if test="${dnsIpCfg.protocol==0}">selected</c:if>><spring:message code="arbitrary"/></option>
|
||||
</select>
|
||||
</div>
|
||||
<div for="protocol"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="letter"/></label>
|
||||
<div class="col-md-6">
|
||||
<select name="request.id" title=<spring:message code="select"/> data-live-search="true" data-live-search-placeholder="search" class="selectpicker form-control required">
|
||||
<c:forEach items="${requestInfos}" var="requestInfo">
|
||||
<option value="${requestInfo.id}"
|
||||
<c:if test="${requestInfo.isValid==0 or requestInfo.isAudit==3}">disabled="disabled"</c:if>
|
||||
<c:if test="${requestInfo.id==dnsIpCfg.request.id}">selected</c:if>>${requestInfo.requestTitle}</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
<div for="request.id"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><spring:message code="type"/></label>
|
||||
<div class="col-md-6">
|
||||
<select name="classify" multiple class="selectpicker form-control" title=<spring:message code="select"/>>
|
||||
|
||||
<c:forEach items="${fls}" var="fl">
|
||||
<c:choose>
|
||||
<c:when test="${dnsIpCfg.classify==null or dnsIpCfg.classify==''}">
|
||||
<option value="${fl.serviceDictId}">${fl.itemValue}</option>
|
||||
</c:when>
|
||||
<c:when test="${fn:contains(dnsIpCfg.classify,',')}">
|
||||
<option value="${fl.serviceDictId}"
|
||||
<c:forEach items="${fn:split(dnsIpCfg.classify,',')}" var="_classify">
|
||||
<c:if test="${fl.isValid==0}">disabled="disabled"</c:if>
|
||||
<c:if test="${fn:trim(fl.serviceDictId) eq _classify}">selected</c:if>
|
||||
</c:forEach>
|
||||
>${fl.itemValue}</option>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<option value="${fl.serviceDictId}"
|
||||
<c:if test="${fl.isValid==0}">disabled="disabled"</c:if>
|
||||
<c:if test="${fn:trim(fl.serviceDictId) eq _classify}">selected</c:if>
|
||||
>${fl.itemValue}</option>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--/span-->
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><spring:message code="attribute"/></label>
|
||||
<div class="col-md-6">
|
||||
<select name="attribute" multiple class="selectpicker form-control" title=<spring:message code="select"/>>
|
||||
<c:forEach items="${xzs}" var="xz">
|
||||
<c:choose>
|
||||
<c:when test="${dnsIpCfg.attribute==null or dnsIpCfg.attribute==''}">
|
||||
<option value="${xz.serviceDictId}">${xz.itemValue}</option>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<c:forEach items="${fn:split(dnsIpCfg.attribute,',')}" var="_attribute">
|
||||
<option value="${xz.serviceDictId}"
|
||||
<c:if test="${xz.isValid==0}">disabled="disabled"</c:if>
|
||||
<c:if test="${fn:trim(xz.serviceDictId) eq _attribute}">selected</c:if>
|
||||
>${xz.itemValue}</option>
|
||||
</c:forEach>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><spring:message code="label"/></label>
|
||||
<div class="col-md-6">
|
||||
<select name="lable" multiple class="selectpicker form-control" title=<spring:message code="select"/>>
|
||||
<c:forEach items="${lables}" var="lable">
|
||||
<c:choose>
|
||||
<c:when test="${dnsIpCfg.lable==null or dnsIpCfg.lable==''}">
|
||||
<option value="${lable.serviceDictId}">${lable.itemValue}</option>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<c:forEach items="${fn:split(dnsIpCfg.lable,',')}" var="_lable">
|
||||
<option value="${lable.serviceDictId}"
|
||||
<c:if test="${lable.isValid==0}">disabled="disabled"</c:if>
|
||||
<c:if test="${fn:trim(lable.serviceDictId) eq _lable}">selected</c:if>
|
||||
>${lable.itemValue}</option>
|
||||
</c:forEach>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<form id="cfgFrom" action="${ctx}/cfg/dnsIp/saveOrUpdate" method="post" class="form-horizontal">
|
||||
<input type="hidden" name="cfgId" value="${_cfg.cfgId}">
|
||||
<input type="hidden" name="compileId" value="${_cfg.compileId}">
|
||||
<input type="hidden" name="functionId" value="${_cfg.functionId}">
|
||||
<input type="hidden" id="serviceId" name="serviceId" value="${_cfg.serviceId}">
|
||||
<input type="hidden" id="protocolId" name="protocolId" value="${_cfg.protocolId}">
|
||||
<!-- 配置域类型 -->
|
||||
<c:forEach items="${regionList}" var="region">
|
||||
<c:if test="${_cfg.functionId eq region.functionId}">
|
||||
<input type="hidden" name="cfgType" value="${region.configRegionValue}">
|
||||
<input type="hidden" name="cfgRegionCode" value="${region.configRegionCode}">
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
<div class="form-body">
|
||||
<!-- desc and action -->
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><spring:message code="config_describe"/></label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control" type="text" name="cfgDesc" value="${_cfg.cfgDesc}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><spring:message code="policy_name"/></label>
|
||||
<div class="col-md-6">
|
||||
<select name="dnsStrategyId" class="selectpicker show-tick form-control">
|
||||
<option value="0"><spring:message code="select"/></option>
|
||||
<c:forEach items="${dnsStrategys }" var="dnsStrategy">
|
||||
<option value="${dnsStrategy.cfgId}" <c:if test="${_cfg.dnsStrategyId==dnsStrategy.cfgId }">selected</c:if>><spring:message code="${dnsStrategy.cfgDesc}"/></option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 hidden">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><spring:message code="action"/></label>
|
||||
<div class="col-md-6">
|
||||
<c:forEach items="${serviceList}" var="service"
|
||||
varStatus="satus">
|
||||
<label class="radio-inline"> <c:if
|
||||
test="${_cfg.functionId eq service.functionId}">
|
||||
<input type="radio" name="action"
|
||||
serviceId="${service.serviceId }"
|
||||
protocolId="${service.protocolId }"
|
||||
value="${service.action }" class="required action"
|
||||
<c:if test="${_cfg.action==service.action || (_cfg.action==null && satus.index==0)}">checked</c:if>>
|
||||
<spring:message code="${service.actionCode }" />
|
||||
</c:if>
|
||||
</label>
|
||||
</c:forEach>
|
||||
</div>
|
||||
<div for="action"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- desc and action -->
|
||||
<%@include file="/WEB-INF/include/form/ipInfo.jsp" %>
|
||||
<%@include file="/WEB-INF/include/form/basicInfo.jsp" %>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="row">
|
||||
<div class="col-md-offset-3 col-md-8">
|
||||
<shiro:hasPermission name="cfg:dnsip:edit">
|
||||
<input id="submitBtn" type="submit" class="btn btn-circle blue" value=<spring:message code="submit"></spring:message>>
|
||||
</shiro:hasPermission>
|
||||
<button id="cancel" type="button" class="btn btn-circle grey-salsa btn-outline" onclick="history.go(-1)"><spring:message code="cancel"></spring:message></button>
|
||||
<button id="save" type="submit" class="btn green"><spring:message code="submit"/></button>
|
||||
<button id="cancel" type="button" class="btn default"><spring:message code="cancel"/></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,95 +3,67 @@
|
||||
<html>
|
||||
<head>
|
||||
<title><spring:message code="${cfgName}"></spring:message></title>
|
||||
<link href="${pageContext.request.contextPath}/static/global/plugins/bootstrap-select/css/bootstrap-select.min.css" rel="stylesheet"/>
|
||||
<script src="${pageContext.request.contextPath}/static/global/plugins/bootstrap-select/js/bootstrap-select.min.js"></script>
|
||||
<c:choose>
|
||||
<c:when test="${cookie.Language.value eq 'zh_CN'}">
|
||||
<script src="${pageContext.request.contextPath}/static/global/plugins/bootstrap-select/js/i18n/defaults-zh_CN.min.js"></script>
|
||||
</c:when>
|
||||
<c:when test="${cookie.Language.value eq 'en'}">
|
||||
<script src="${pageContext.request.contextPath}/static/global/plugins/bootstrap-select/js/i18n/defaults-en_US.min.js"></script>
|
||||
</c:when>
|
||||
<c:when test="${cookie.Language.value eq 'ru_RU'}">
|
||||
<script src="${pageContext.request.contextPath}/static/global/plugins/bootstrap-select/js/i18n/defaults-ru_RU.min.js"></script>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<script src="${pageContext.request.contextPath}/static/global/plugins/bootstrap-select/js/i18n/defaults-en_US.min.js"></script>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
//筛选功能初始化
|
||||
$(document).ready(function() {
|
||||
//搜索框提示语初始化
|
||||
if("${cfg.cfgDesc}"){
|
||||
$("#intype").val("${cfg.cfgDesc}");
|
||||
}else if("${cfg.srcIpAddress}"){
|
||||
$("#intype").val("${cfg.srcIpAddress}");
|
||||
}else if("${cfg.srcPort}"){
|
||||
$("#intype").val("${cfg.srcPort}");
|
||||
} else{
|
||||
$("#intype").attr("placeholder","<spring:message code='input'/> "+$("#seltype").find("option:selected").text());
|
||||
}
|
||||
$("#seltype").change(function(){
|
||||
$("#intype").attr("placeholder","<spring:message code='input'/> "+$(this).find("option:selected").text());
|
||||
});
|
||||
//筛选功能初始化
|
||||
filterActionInit();
|
||||
|
||||
$("#isAudit").change(function(){
|
||||
page();
|
||||
});
|
||||
//reset
|
||||
$(".resetBtn").on("click",function(){
|
||||
$("#resetBtn").on("click",function(){
|
||||
$("select.selectpicker").each(function(){
|
||||
$(this).selectpicker('val',$(this).find('option:first').val());
|
||||
$(this).find("option").attr("selected",false);
|
||||
$(this).find("option:first").attr("selected",true);
|
||||
});
|
||||
$(".Wdate").attr("value",'');
|
||||
$("#description").attr("value",'');
|
||||
$("#searchForm")[0].reset();
|
||||
});
|
||||
|
||||
$("#checkAll").click(function() {
|
||||
var checkFlag = $(this).prop("checked");
|
||||
$(".child-checks").prop("checked", checkFlag);
|
||||
});
|
||||
});
|
||||
//查询
|
||||
function page(n,s){
|
||||
$("#pageNo").val(n);
|
||||
$("#pageSize").val(s);
|
||||
$("#searchForm").attr("action", "${ctx}/cfg/dnsIp/list");
|
||||
$("#searchForm").submit();
|
||||
return false;
|
||||
}
|
||||
|
||||
function edit() {
|
||||
var checkboxes = $(".child-checks:checked");
|
||||
if (checkboxes.length == 0) {
|
||||
alertx("<spring:message code='one_more'/>");
|
||||
} else if (checkboxes.length > 1) {
|
||||
alertx("<spring:message code='check_one'/>");
|
||||
} else {
|
||||
window.location.href = "${ctx}/cfg/dnsIp/form?cfgId=" + checkboxes.attr("id");
|
||||
}
|
||||
}
|
||||
|
||||
function delCfg() {
|
||||
var checkboxes = $(".child-checks:checked");
|
||||
if (checkboxes.length == 0) {
|
||||
alertx("<spring:message code='one_more'/>");
|
||||
} else {
|
||||
var ids = "";
|
||||
checkboxes.each(function(){
|
||||
ids = ids + $(this).attr("id") + ",";
|
||||
});
|
||||
console.log(ids);
|
||||
if (confirm("<spring:message code='confirm_message'/>")) {
|
||||
$("#fakeIds").val(ids);
|
||||
$("#searchForm").attr("action","${ctx}/cfg/dnsIp/delete");
|
||||
$("#searchForm").submit();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
var edit=function(url){
|
||||
var cked = $('tbody tr td input.i-checks:checkbox:checked');
|
||||
if(cked.val()==1){
|
||||
top.$.jBox.tip("<spring:message code='has_approved'/>", "<spring:message code='info'/>");
|
||||
return;
|
||||
}
|
||||
if(cked.length==1){
|
||||
window.location = url+"&compileId="+cked.attr("id");
|
||||
}else{
|
||||
top.$.jBox.tip("<spring:message code='check_one'/>", "<spring:message code='info'/>");
|
||||
return;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="page-content">
|
||||
<div class="theme-panel hidden-xs hidden-sm">
|
||||
<shiro:hasPermission name="cfg:dnsip:edit">
|
||||
<button type="button" class="btn btn-primary" onClick="javascript:window.location='${ctx}/cfg/dnsIp/form'">
|
||||
<i class="fa fa-plus"></i>
|
||||
<spring:message code="add"></spring:message></button>
|
||||
</shiro:hasPermission>
|
||||
|
||||
<shiro:hasPermission name="dns:fake:ip:config">
|
||||
<button type="button" class="btn btn-primary"
|
||||
onClick="javascript:window.location='${ctx}/cfg/dnsIp/form?functionId=${cfg.functionId}'">
|
||||
<i class="fa fa-plus"></i>
|
||||
<spring:message code="add"></spring:message></button>
|
||||
</shiro:hasPermission>
|
||||
</div>
|
||||
|
||||
<h3 class="page-title">
|
||||
<spring:message code="ip_spoofing_configuration"></spring:message>
|
||||
<small><spring:message code="date_list"/></small>
|
||||
</h3>
|
||||
<h5 class="page-header"></h5>
|
||||
@@ -100,73 +72,87 @@
|
||||
<div class="portlet">
|
||||
<div class="portlet-body">
|
||||
<div class="row" >
|
||||
<sys:message content="${message}"/>
|
||||
<form:form id="searchForm" modelAttribute="dnsIpCfg" method="post" class="form-search">
|
||||
<form:form id="searchForm" modelAttribute="cfg" action="${ctx}/cfg/dnsIp/list?functionId=${cfg.functionId}" method="post" class="form-search">
|
||||
<input id="functionId" name="functionId" type="hidden" value="${cfg.functionId}"/>
|
||||
<input id="audit" name="audit" type="hidden" value="${audit}"/>
|
||||
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
|
||||
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
|
||||
<input id="isFilterAction" name="isFilterAction" type="hidden" value="${dnsIpCfg.isFilterAction }"/>
|
||||
<input id="cfgIds" name="cfgIds" type="hidden"/>
|
||||
<input id="fakeIds" name="fakeIds" type="hidden"/>
|
||||
<sys:tableSort id="orderBy" name="orderBy" value="${page.orderBy}"
|
||||
callback="page();" />
|
||||
<!-- 筛选按钮展开状态-->
|
||||
<input id="isFilterAction" name="isFilterAction" type="hidden" value="${cfg.isFilterAction }"/>
|
||||
<!-- 搜索内容与操作按钮栏 -->
|
||||
<div class="col-md-12">
|
||||
<div class="pull-left">
|
||||
<%-- <form:select path="isAudit" class="selectpicker select2 input-small">
|
||||
<form:option value=""><spring:message code="all"></spring:message><spring:message code="state"></spring:message></form:option>
|
||||
<c:set var="state"><spring:message code='state'/></c:set>
|
||||
<form:select path="isAudit" class="selectpicker select2 input-small">
|
||||
<form:option value=""><spring:message code="all_states"/></form:option>
|
||||
<form:option value="0"><spring:message code="created"></spring:message></form:option>
|
||||
<form:option value="1"><spring:message code="approved"></spring:message></form:option>
|
||||
<form:option value="2"><spring:message code="unapproved"></spring:message></form:option>
|
||||
<form:option value="3"><spring:message code="cancel_approved"></spring:message></form:option>
|
||||
</form:select> --%>
|
||||
<input name="cfgDesc" class="form-control input-medium" placeholder="<spring:message code="config_describe"/>" value="${dnsIpCfg.cfgDesc }"/>
|
||||
</div>
|
||||
|
||||
<div class="pull-left">
|
||||
<button type="button" class="btn blue" onClick="page()"> <i class="fa fa-search"></i> <spring:message code="search"/> </button>
|
||||
<button type="button" class="btn btn-default resetBtn" > <i class="fa fa-refresh"></i> <spring:message code="reset"/> </button>
|
||||
<button type="button" class="btn btn-default" id="filter-btn"> <spring:message code="filter"/> <i class="fa fa-angle-double-down"></i></button>
|
||||
<%-- <form:option value="3"><spring:message code="cancel_approved"></spring:message></form:option> --%>
|
||||
</form:select>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="pull-right">
|
||||
<%-- <button type="button" class="btn btn-default" onclick="edit()">
|
||||
<i class="fa fa-edit"></i> <spring:message code="edit"/>
|
||||
</button> --%>
|
||||
<shiro:hasPermission name="cfg:dnsip:edit">
|
||||
<button class="btn btn-default" onclick="delCfg()" data-toggle="tooltip" data-placement="top">
|
||||
<i class="fa fa-trash"> <spring:message code="delete"/></i>
|
||||
</button>
|
||||
</shiro:hasPermission>
|
||||
<%-- <div class="btn-group">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
<i class="fa fa-wrench"></i> <spring:message code="examine"></spring:message>
|
||||
<i class="fa fa-angle-down"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu pull-right">
|
||||
<li><a href="javascript:void(0)" onclick="pass()">通过</a></li>
|
||||
<li><a href="javascript:void(0)" onclick="noPass()">不通过</a></li>
|
||||
<li><a href="javascript:void(0)" onclick="cancelPass()">取消通过</a></li>
|
||||
</ul>
|
||||
</div> --%>
|
||||
|
||||
<a class="btn btn-icon-only btn-default setfields tooltips"
|
||||
data-container="body" data-placement="top" data-original-title="<spring:message code='custom_columns'/>" href="javascript:;">
|
||||
<i class="icon-wrench"></i>
|
||||
</a>
|
||||
<div class="pull-left">
|
||||
|
||||
<div class="input-group">
|
||||
<div class="input-group-btn">
|
||||
|
||||
<form:select path="seltype" class="selectpicker select2 input-small" >
|
||||
<form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
|
||||
<form:option value="srcIpAddress"><spring:message code="client_ip"></spring:message></form:option>
|
||||
<form:option value="srcPort"><spring:message code="client_port"></spring:message></form:option>
|
||||
</form:select>
|
||||
|
||||
</div>
|
||||
|
||||
<input id="intype" class="form-control input-medium" type="text" value="">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
<button type="button" class="btn blue" onClick="return page()"> <i class="fa fa-search"></i> <spring:message code="search"/> </button>
|
||||
<button type="button" class="btn btn-default" id="resetBtn"> <i class="fa fa-refresh"></i> <spring:message code="reset"/> </button>
|
||||
<button type="button" class="btn btn-default" id="filter-btn"> <spring:message code="filter"/> <i class="fa fa-angle-double-down"></i></button>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<shiro:hasPermission name="dns:fake:ip:config">
|
||||
<sys:delRow url="${ctx}/cfg/dnsIp/form" id="contentTable" label="update"></sys:delRow>
|
||||
<sys:delRow url="${ctx}/cfg/dnsIp/delete?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
|
||||
</shiro:hasPermission>
|
||||
<shiro:hasPermission name="dns:fake:ip:audit">
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
<i class="fa fa-wrench"></i> <spring:message code="examine"></spring:message>
|
||||
<i class="fa fa-angle-down"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu pull-right">
|
||||
<li><sys:delRow url="${ctx}/cfg/dnsIp/audit?isAudit=1&isValid=1&functionId=${cfg.functionId }" id="contentTable" label="approved"></sys:delRow></li>
|
||||
<li><sys:delRow url="${ctx}/cfg/dnsIp/audit?isAudit=2&isValid=0&functionId=${cfg.functionId }" id="contentTable" label="unapproved"></sys:delRow></li>
|
||||
<li><sys:delRow url="${ctx}/cfg/dnsIp/audit?isAudit=3&isValid=0&functionId=${cfg.functionId }" id="contentTable" label="cancelPass"></sys:delRow></li>
|
||||
</ul>
|
||||
</div>
|
||||
</shiro:hasPermission>
|
||||
<a class="btn btn-icon-only btn-default setfields tooltips"
|
||||
data-container="body" data-placement="top" data-original-title=<spring:message code="custom_columns"/> href="javascript:;">
|
||||
<i class="icon-wrench"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 搜索内容与操作按钮栏 -->
|
||||
<!-- /搜索内容与操作按钮栏 -->
|
||||
|
||||
<!-- 筛选搜索内容栏默认隐藏-->
|
||||
<div class="col-md-12 filter-action-select-panle hide" >
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-2">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label"><spring:message code='request_number'/>:</label>
|
||||
|
||||
<div class="col-md-3">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label"><spring:message code='request_number'/></label>
|
||||
<c:set var="select"><spring:message code='select'/></c:set>
|
||||
<form:select path="request.id" class="selectpicker form-control" title="${select}" data-live-search="true" data-live-search-placeholder="search">
|
||||
<form:select path="requestId" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<c:forEach items="${requestInfos}" var="requestInfo" >
|
||||
<form:option value="${requestInfo.id}"><spring:message code="${requestInfo.requestTitle}"></spring:message></form:option>
|
||||
</c:forEach>
|
||||
@@ -174,13 +160,13 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
|
||||
<div class="col-md-3">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label"><spring:message code='type'/>:</label>
|
||||
<c:set var="select"><spring:message code='select'/></c:set>
|
||||
<form:select path="classify" class="selectpicker form-control" title="${select}" data-live-search="true" data-live-search-placeholder="search">
|
||||
<label class="control-label"><spring:message code='type'/></label>
|
||||
<form:select path="classify" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<c:forEach items="${fls}" var="fl" >
|
||||
<form:option value="${fl.serviceDictId}"><spring:message code="${fl.itemValue}"></spring:message></form:option>
|
||||
</c:forEach>
|
||||
@@ -188,13 +174,14 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
|
||||
<div class="col-md-3">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label"><spring:message code='attribute'/>:</label>
|
||||
<label class="control-label"><spring:message code='attribute'/></label>
|
||||
<c:set var="select"><spring:message code='select'/></c:set>
|
||||
<form:select path="attribute" class="selectpicker form-control" title="${select}" data-live-search="true" data-live-search-placeholder="search">
|
||||
<form:select path="attribute" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<c:forEach items="${xzs}" var="xz" >
|
||||
<form:option value="${xz.serviceDictId}"><spring:message code="${xz.itemValue}"></spring:message></form:option>
|
||||
</c:forEach>
|
||||
@@ -202,13 +189,13 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
|
||||
<div class="col-md-3">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label"><spring:message code='label'/>:</label>
|
||||
<c:set var="select"><spring:message code='select'/></c:set>
|
||||
<form:select path="lable" class="selectpicker form-control" title="${select }" data-live-search="true" data-live-search-placeholder="search">
|
||||
<label class="control-label"><spring:message code='label'/></label>
|
||||
<form:select path="lable" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<c:forEach items="${lables}" var="lable" >
|
||||
<form:option value="${lable.serviceDictId}"><spring:message code="${lable.itemValue}"></spring:message></form:option>
|
||||
</c:forEach>
|
||||
@@ -216,138 +203,238 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label><spring:message code="config_time"/>:</label>
|
||||
<input name="searchCreateTimeStart" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value='${dnsIpCfg.searchCreateTimeStart}' pattern='yyyy-MM-dd HH:mm:ss'/>" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label> </label>
|
||||
<input name="searchCreateTimeEnd" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${dnsIpCfg.searchCreateTimeEnd}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label><spring:message code="config_time"/>:</label>
|
||||
<input name="search_create_time_start" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value='${cfg.search_create_time_start}' pattern='yyyy-MM-dd HH:mm:ss'/>" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label> </label>
|
||||
<input name="search_create_time_end" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_create_time_end}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label><spring:message code="edit_time"/>:</label>
|
||||
<input name="search_edit_time_start" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_edit_time_start}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label> </label>
|
||||
<input name="search_edit_time_end" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_edit_time_end}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label><spring:message code="audit_time"/>:</label>
|
||||
<input name="search_audit_time_start" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_audit_time_start}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label> </label>
|
||||
<input name="search_audit_time_end" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_audit_time_end}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- /筛选搜索内容栏 结束-->
|
||||
</form:form>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered table-condensed text-nowrap">
|
||||
<table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap">
|
||||
<thead>
|
||||
<tr>
|
||||
<shiro:hasPermission name="cfg:dnsip:edit">
|
||||
<th><input type="checkbox" class="i-checks" id="checkAll"></th>
|
||||
</shiro:hasPermission>
|
||||
<%-- <th><spring:message code="seq"/></th> --%>
|
||||
<th><spring:message code="config_describe"/></th>
|
||||
<th>ip<spring:message code="type"/></th>
|
||||
<th><spring:message code="policy_name"/></th>
|
||||
<th><spring:message code="ip_type"/></th>
|
||||
<th><spring:message code="client_ip"/></th>
|
||||
<th><spring:message code="client_address_mask"/></th>
|
||||
<th><spring:message code="client_port"/></th>
|
||||
<th><spring:message code="client_port_mask"/></th>
|
||||
<th><spring:message code="server_ip"/></th>
|
||||
<th><spring:message code="server_address_mask"/></th>
|
||||
<th><spring:message code="server_port"/></th>
|
||||
<th><spring:message code="server_port_mask"/></th>
|
||||
<th><spring:message code="ip_pattern"/></th>
|
||||
<th><spring:message code="port_pattern"/></th>
|
||||
<th><spring:message code="direction"/></th>
|
||||
<th><spring:message code="protocol"/></th>
|
||||
<%-- <th><spring:message code="is_audit"/></th>
|
||||
<th><spring:message code="auditor"/></th>
|
||||
<th><spring:message code="audit_time"/></th> --%>
|
||||
<th><spring:message code="block_type"/></th>
|
||||
<th><spring:message code="whether_area_block"/></th>
|
||||
<th><spring:message code="letter"/></th>
|
||||
<th><spring:message code="type"/></th>
|
||||
<th><spring:message code="attribute"/></th>
|
||||
<th><spring:message code="label"/></th>
|
||||
<th><spring:message code="valid_identifier"/></th>
|
||||
<th><spring:message code="is_audit"/></th>
|
||||
<th><spring:message code="creator"/></th>
|
||||
<th><spring:message code="config_time"/></th>
|
||||
<%-- <th><spring:message code="editor"/></th>
|
||||
<th><spring:message code="edit_time"/></th> --%>
|
||||
<th class="sort-column r.create_time"><spring:message code="config_time"/></th>
|
||||
<th><spring:message code="editor"/></th>
|
||||
<th class="sort-column r.edit_time"><spring:message code="edit_time"/></th>
|
||||
<th><spring:message code="auditor"/></th>
|
||||
<th class="sort-column r.audit_time"><spring:message code="audit_time"/></th>
|
||||
<%-- <th><spring:message code="operation"></spring:message></th> --%>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:forEach items="${page.list }" var="dnsIpCfg" varStatus="status" step="1">
|
||||
<shiro:hasPermission name="cfg:dnsip:edit">
|
||||
<td><input type="checkbox" class="i-checks child-checks" id="${dnsIpCfg.fakeId}" value="${dnsIpCfg.isAudit}"></td>
|
||||
</shiro:hasPermission>
|
||||
<td>${dnsIpCfg.cfgDesc }</td>
|
||||
<td>V${dnsIpCfg.ipType }</td>
|
||||
<td>${dnsIpCfg.srcIp }</td>
|
||||
<td>${dnsIpCfg.srcIpMask }</td>
|
||||
<td>${dnsIpCfg.srcPort }</td>
|
||||
<td>${dnsIpCfg.srcPortMask }</td>
|
||||
<td>${dnsIpCfg.dstIp }</td>
|
||||
<td>${dnsIpCfg.dstIpMask }</td>
|
||||
<td>${dnsIpCfg.dstPort }</td>
|
||||
<td>${dnsIpCfg.dstPortMask }</td>
|
||||
<c:forEach items="${page.list }" var="cfg" varStatus="status" step="1">
|
||||
<tr>
|
||||
<td><input type="checkbox" class="i-checks" id="${cfg.cfgId}" compileId="${cfg.compileId}" value="${cfg.isAudit}"></td>
|
||||
<td>${cfg.cfgDesc }</td>
|
||||
<td>${cfg.dnsStrategyName }</td>
|
||||
<td>
|
||||
<c:if test="${dnsIpCfg.direction==0}"><spring:message code="twoway"/></c:if>
|
||||
<c:if test="${dnsIpCfg.direction==1}"><spring:message code="oneway"/></c:if>
|
||||
<c:forEach items="${fns:getDictList('IP_TYPE')}" var="ipTypeC">
|
||||
<c:if test="${cfg.ipType==ipTypeC.itemCode}"><spring:message code="${ipTypeC.itemValue }"/></c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td>${cfg.srcIpAddress }</td>
|
||||
<td>${cfg.srcPort }</td>
|
||||
<td>${cfg.destIpAddress }</td>
|
||||
<td>${cfg.destPort }</td>
|
||||
<td>
|
||||
<c:forEach items="${fns:getDictList('IP_PATTERN')}" var="ipPatternC">
|
||||
<c:if test="${cfg.ipPattern==ipPatternC.itemCode}"><spring:message code="${ipPatternC.itemValue }"/></c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td>
|
||||
<c:if test="${dnsIpCfg.protocol==6}"><spring:message code="TCP"/></c:if>
|
||||
<c:if test="${dnsIpCfg.protocol==17}"><spring:message code="UDP"/></c:if>
|
||||
<c:if test="${dnsIpCfg.protocol==0}"><spring:message code="arbitrary"/></c:if>
|
||||
<c:forEach items="${fns:getDictList('PORT_PATTERN')}" var="portPatternC">
|
||||
<c:if test="${cfg.portPattern eq portPatternC.itemCode}"><spring:message code="${portPatternC.itemValue }"/></c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<%-- <td>
|
||||
<td>
|
||||
<c:forEach items="${fns:getDictList('DIRECTION')}" var="directionC">
|
||||
<c:if test="${cfg.direction eq directionC.itemCode}"><spring:message code="${directionC.itemValue }"/></c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td>
|
||||
<c:forEach items="${fns:getDictList('PROTOCOL')}" var="protocolC">
|
||||
<c:if test="${cfg.protocol eq protocolC.itemCode}"><spring:message code="${protocolC.itemValue }"/></c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td>
|
||||
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict">
|
||||
<c:if test="${dict.itemCode eq cfg.action }">
|
||||
<spring:message code="${dict.itemValue }"/>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td>
|
||||
<c:if test="${cfg.isAreaEffective==0}"><spring:message code="no"/></c:if>
|
||||
<c:if test="${cfg.isAreaEffective==1}">
|
||||
<a href="javascript:viewAreaInfo('${ctx}','${cfg.areaEffectiveIds }','${cfg.compileId }')" >
|
||||
<spring:message code="yes"/>
|
||||
</a>
|
||||
</c:if>
|
||||
</td>
|
||||
<td>${cfg.requestName }</td>
|
||||
<td >
|
||||
<c:set var="classify"></c:set>
|
||||
<c:forEach items="${fn:split(cfg.classify,',')}" var="classifyId" varStatus="status">
|
||||
<c:forEach items="${fls}" var="fl">
|
||||
<c:if test="${classifyId eq fn:trim(fl.serviceDictId)}">
|
||||
<c:if test="${status.index+1 eq 1}">
|
||||
<c:set var="classify" value="${fl.itemValue}"></c:set>
|
||||
</c:if>
|
||||
<c:if test="${status.index+1 ne 1}">
|
||||
<c:set var="classify" value="${classify},${fl.itemValue}"></c:set>
|
||||
</c:if>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
<a href="javascript:;" data-original-title="${classify}"
|
||||
class="tooltips" data-flag="false" data-html="true" data-placement="top">
|
||||
${fns:abbr(classify,20)}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<c:set var="attribute"></c:set>
|
||||
<c:forEach items="${fn:split(cfg.attribute,',')}" var="attributeId" varStatus="status">
|
||||
<c:forEach items="${xzs}" var="xz">
|
||||
<c:if test="${attributeId eq fn:trim(xz.serviceDictId)}">
|
||||
<c:if test="${status.index+1 eq 1}">
|
||||
<c:set var="attribute" value="${xz.itemValue}"></c:set>
|
||||
</c:if>
|
||||
<c:if test="${status.index+1 ne 1}">
|
||||
<c:set var="attribute" value="${attribute},${xz.itemValue}"></c:set>
|
||||
</c:if>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
<a href="javascript:;" data-original-title="${attribute}"
|
||||
class="tooltips" data-flag="false" data-html="true" data-placement="top">
|
||||
${fns:abbr(attribute,20)}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<c:set var="lableInfo"></c:set>
|
||||
<c:forEach items="${fn:split(cfg.lable,',')}" var="lableId" varStatus="status">
|
||||
<c:forEach items="${lables}" var="lable">
|
||||
<c:if test="${lableId eq fn:trim(lable.serviceDictId)}">
|
||||
<c:if test="${status.index+1 eq 1}">
|
||||
<c:set var="lableInfo" value="${lable.itemValue}"></c:set>
|
||||
</c:if>
|
||||
<c:if test="${status.index+1 ne 1}">
|
||||
<c:set var="lableInfo" value="${lableInfo},${lable.itemValue}"></c:set>
|
||||
</c:if>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
<a href="javascript:;" data-original-title="${lableInfo}"
|
||||
class="tooltips" data-flag="false" data-html="true" data-placement="top">
|
||||
${fns:abbr(lableInfo,20)}
|
||||
</a>
|
||||
</td>
|
||||
<%-- <td>${cfg.areaEffectiveIds }</td> --%>
|
||||
<td>
|
||||
<c:if test="${cfg.isValid==0}"><spring:message code="no"/></c:if>
|
||||
<c:if test="${cfg.isValid==1}"><spring:message code="yes"/></c:if>
|
||||
<c:if test="${cfg.isValid==-1}"><spring:message code="deleted"/></c:if>
|
||||
</td>
|
||||
<td>
|
||||
<c:choose>
|
||||
<c:when test="${dnsIpCfg.isAudit eq '0'}"><span class="label label-danger"><spring:message code="created"></spring:message></span></c:when>
|
||||
<c:when test="${dnsIpCfg.isAudit eq '1'}"><span class="label label-success"><spring:message code="approved"></spring:message></span></c:when>
|
||||
<c:when test="${dnsIpCfg.isAudit eq '2'}"><span class="label label-warning"><spring:message code="unapproved"></spring:message></span></c:when>
|
||||
<c:when test="${dnsIpCfg.isAudit eq '3'}"><span class="label label-warning"><spring:message code="cancel_approved"></spring:message></span></c:when>
|
||||
<c:when test="${cfg.isAudit eq '0'}"><span class="label label-danger"><spring:message code="created"></spring:message></span></c:when>
|
||||
<c:when test="${cfg.isAudit eq '1'}"><span class="label label-success"><spring:message code="approved"></spring:message></span></c:when>
|
||||
<c:when test="${cfg.isAudit eq '2'}"><span class="label label-warning"><spring:message code="unapproved"></spring:message></span></c:when>
|
||||
<c:when test="${cfg.isAudit eq '3'}"><span class="label label-warning"><spring:message code="cancel_approved"></spring:message></span></c:when>
|
||||
</c:choose>
|
||||
</td>
|
||||
<td>${dnsIpCfg.auditor.name }</td>
|
||||
<td><fmt:formatDate value="${dnsIpCfg.auditTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td> --%>
|
||||
<td>${dnsIpCfg.request.requestTitle }</td>
|
||||
<td>
|
||||
<c:forEach items="${fn:split(dnsIpCfg.classify,',')}" var="classifyId" varStatus="status">
|
||||
<c:forEach items="${fls}" var="fl">
|
||||
<c:if test="${fn:trim(fl.serviceDictId) eq classify}">
|
||||
${fl.itemValue}
|
||||
<c:if test="${status.index+1 ne fn:length(fn:split(dnsIpCfg.classify,','))}">,</c:if>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td>
|
||||
<c:forEach items="${fn:split(dnsIpCfg.attribute,',')}" var="attributeId" varStatus="status">
|
||||
<c:forEach items="${xzs}" var="xz">
|
||||
<c:if test="${fn:trim(xz.serviceDictId) eq attributeId}">
|
||||
${xz.itemValue}
|
||||
<c:if test="${status.index+1 ne fn:length(fn:split(dnsIpCfg.attribute,','))}">,</c:if>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td>
|
||||
<c:forEach items="${fn:split(dnsIpCfg.lable,',')}" var="lableId" varStatus="status">
|
||||
<c:forEach items="${lables}" var="lable">
|
||||
<c:if test="${fn:trim(lable.serviceDictId) eq lableId}">
|
||||
${lable.itemValue}
|
||||
<c:if test="${status.index+1 ne fn:length(fn:split(dnsIpCfg.lable,','))}">,</c:if>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td>${dnsIpCfg.creator.name }</td>
|
||||
<td><fmt:formatDate value="${dnsIpCfg.createTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<%-- <td>${dnsIpCfg.editor.name }</td>
|
||||
<td><fmt:formatDate value="${dnsIpCfg.editTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td> --%>
|
||||
<td>${cfg.creatorName }</td>
|
||||
<td><fmt:formatDate value="${cfg.createTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<td>${cfg.editorName }</td>
|
||||
<td><fmt:formatDate value="${cfg.editTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<td>${cfg.auditorName }</td>
|
||||
<td><fmt:formatDate value="${cfg.auditTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="page" style="margin-top:40px">${page}</div>
|
||||
<div class="page">${page}</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,179 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<title><spring:message code="${cfgName}"></spring:message></title>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
$("#cancel").on("click",function(){
|
||||
window.history.back();
|
||||
});
|
||||
$(".action").on("change", function() {
|
||||
$("#serviceId").val($(this).attr("serviceId"));
|
||||
});
|
||||
$("#serviceId").val($(".action:checked").attr("serviceId"));
|
||||
$("#cfgFrom").validate({
|
||||
errorPlacement: function(error,element){
|
||||
if($(element).parents().hasClass("tagsinput")){
|
||||
$(element).parents(".col-md-6").next("div").append(error);
|
||||
}else{
|
||||
$(element).parents(".form-group").find("div[for='"+element.attr("name")+"']").append(error);
|
||||
}
|
||||
},
|
||||
submitHandler: function(form){
|
||||
var flag = true;
|
||||
var cfgId=$("#cfgId").val();
|
||||
if($("#isAdd").val() == true){
|
||||
$.ajax({
|
||||
type:'post',
|
||||
async:false,
|
||||
url:'${ctx}/maintenance/dnsResStrategy/validCfgId',
|
||||
data:{"cfgId":cfgId},
|
||||
success:function(data){
|
||||
if(data){//存在cfgId
|
||||
flag=false;
|
||||
}else{
|
||||
flag=true;
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
if(flag){
|
||||
form.submit();
|
||||
}
|
||||
},
|
||||
errorContainer: "#messageBox",
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="page-content">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet box blue">
|
||||
<div class="portlet-title">
|
||||
<div class="caption">
|
||||
<i class="fa fa-gift"></i>
|
||||
<c:if test="${isAdd eq true}"><spring:message code="add"></spring:message></c:if>
|
||||
<c:if test="${isAdd eq false}"><spring:message code="edit"></spring:message></c:if>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body form">
|
||||
<!-- BEGIN FORM-->
|
||||
<form id="cfgFrom" action="${ctx}/maintenance/dnsResStrategy/saveOrUpdate" method="post" class="form-horizontal">
|
||||
<input type="hidden" name="functionId" value="${_cfg.functionId}">
|
||||
<input type="hidden" id="serviceId" name="serviceId" value="${_cfg.serviceId}">
|
||||
<input type="hidden" id="compileId" name="compileId" value="${_cfg.compileId}">
|
||||
<input type="hidden" id="isAreaEffective" name="isAreaEffective" value="0">
|
||||
<input type="hidden" id="isAdd" name="isAdd" value="${isAdd}">
|
||||
<!-- 配置域类型 -->
|
||||
<c:forEach items="${regionList}" var="region">
|
||||
<c:if test="${_cfg.functionId eq region.functionId}">
|
||||
<input type="hidden" name="cfgType" value="${region.configRegionValue}">
|
||||
<input type="hidden" name="cfgRegionCode" value="${region.configRegionCode}">
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
<div class="form-body">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="policy_number"/></label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control required" <c:if test="${!isAdd}" >readonly="true"</c:if> type="text" id="cfgId" name="cfgId" value="${_cfg.cfgId}">
|
||||
</div>
|
||||
<div for="cfgId"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="policy_name"/></label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control required" type="text" name="cfgDesc" value="${_cfg.cfgDesc}">
|
||||
</div>
|
||||
<div for="cfgDesc"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 hidden">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><spring:message code="action"/></label>
|
||||
<div class="col-md-6">
|
||||
<c:forEach items="${serviceList}" var="service"
|
||||
varStatus="satus">
|
||||
<label class="radio-inline"> <c:if
|
||||
test="${_cfg.functionId eq service.functionId}">
|
||||
<input type="radio" name="action"
|
||||
serviceId="${service.serviceId }"
|
||||
value="${service.action }" class="required action"
|
||||
<c:if test="${_cfg.action==service.action || (_cfg.action==null && satus.index==0)}">checked</c:if>>
|
||||
<spring:message code="${service.actionCode }" />
|
||||
</c:if>
|
||||
</label>
|
||||
</c:forEach>
|
||||
</div>
|
||||
<div for="action"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="min_ttl"/></label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control required number" placeholder="<spring:message code="ttlUnit" />" type="text" name="minTtl" value="${_cfg.minTtl}">
|
||||
</div>
|
||||
<div for="minTtl"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="max_ttl"/></label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control required number" placeholder="<spring:message code="ttlUnit" />" type="text" name="maxTtl" value="${_cfg.maxTtl}">
|
||||
</div>
|
||||
<div for="maxTtl"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><spring:message code="group_name"/></label>
|
||||
<div class="col-md-6">
|
||||
<select name="resGroup1Id" class="selectpicker show-tick form-control">
|
||||
<option value="0"><spring:message code="select"/></option>
|
||||
<c:forEach items="${policyGroups }" var="policyGroup">
|
||||
<option value="${policyGroup.groupId}" <c:if test="${_cfg.resGroup1Id==policyGroup.groupId }">selected</c:if>><spring:message code="${policyGroup.groupName}"/></option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<%@include file="/WEB-INF/include/form/basicInfo.jsp" %>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="row">
|
||||
<div class="col-md-offset-3 col-md-8">
|
||||
<button id="save" type="submit" class="btn green"><spring:message code="submit"/></button>
|
||||
<button id="cancel" type="button" class="btn default"><spring:message code="cancel"/></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6"> </div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<!-- END FORM-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,406 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<title><spring:message code="${cfgName}"></spring:message></title>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
//搜索框提示语初始化
|
||||
if("${cfg.cfgDesc}"){
|
||||
$("#intype").val("${cfg.cfgDesc}");
|
||||
}else if("${cfg.group1Name}"){
|
||||
$("#intype").val("${cfg.group1Name}");
|
||||
}else{
|
||||
$("#intype").attr("placeholder","<spring:message code='input'/> "+$("#seltype").find("option:selected").text());
|
||||
}
|
||||
$("#seltype").change(function(){
|
||||
$("#intype").attr("placeholder","<spring:message code='input'/> "+$(this).find("option:selected").text());
|
||||
});
|
||||
//筛选功能初始化
|
||||
filterActionInit();
|
||||
$("#isAudit").change(function(){
|
||||
page();
|
||||
});
|
||||
//reset
|
||||
$("#resetBtn").on("click",function(){
|
||||
$("select.selectpicker").each(function(){
|
||||
$(this).selectpicker('val',$(this).find('option:first').val());
|
||||
$(this).find("option").attr("selected",false);
|
||||
$(this).find("option:first").attr("selected",true);
|
||||
});
|
||||
$(".Wdate").attr("value",'');
|
||||
$("#description").attr("value",'');
|
||||
$("#searchForm")[0].reset();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="page-content">
|
||||
<div class="theme-panel hidden-xs hidden-sm">
|
||||
|
||||
<shiro:hasPermission name="dns:res:strategy:config">
|
||||
<button type="button" class="btn btn-primary"
|
||||
onClick="javascript:window.location='${ctx}/maintenance/dnsResStrategy/form?functionId=${cfg.functionId}'">
|
||||
<i class="fa fa-plus"></i>
|
||||
<spring:message code="add"></spring:message></button>
|
||||
</shiro:hasPermission>
|
||||
</div>
|
||||
|
||||
<h3 class="page-title">
|
||||
<small><spring:message code="date_list"/></small>
|
||||
</h3>
|
||||
<h5 class="page-header"></h5>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet">
|
||||
<div class="portlet-body">
|
||||
<div class="row" >
|
||||
<form:form id="searchForm" modelAttribute="cfg" action="${ctx}/maintenance/dnsResStrategy/list?functionId=${cfg.functionId}" method="post" class="form-search">
|
||||
<input id="functionId" name="functionId" type="hidden" value="${cfg.functionId}"/>
|
||||
<input id="audit" name="audit" type="hidden" value="${audit}"/>
|
||||
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
|
||||
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
|
||||
<sys:tableSort id="orderBy" name="orderBy" value="${page.orderBy}"
|
||||
callback="page();" />
|
||||
<!-- 筛选按钮展开状态-->
|
||||
<input id="isFilterAction" name="isFilterAction" type="hidden" value="${cfg.isFilterAction }"/>
|
||||
<!-- 搜索内容与操作按钮栏 -->
|
||||
<div class="col-md-12">
|
||||
<div class="pull-left">
|
||||
<c:set var="state"><spring:message code='state'/></c:set>
|
||||
<form:select path="isAudit" class="selectpicker select2 input-small">
|
||||
<form:option value=""><spring:message code="all_states"/></form:option>
|
||||
<form:option value="0"><spring:message code="created"></spring:message></form:option>
|
||||
<form:option value="1"><spring:message code="approved"></spring:message></form:option>
|
||||
<form:option value="2"><spring:message code="unapproved"></spring:message></form:option>
|
||||
<%-- <form:option value="3"><spring:message code="cancel_approved"></spring:message></form:option> --%>
|
||||
</form:select>
|
||||
</div>
|
||||
|
||||
<div class="pull-left">
|
||||
|
||||
<div class="input-group">
|
||||
<div class="input-group-btn">
|
||||
|
||||
<form:select path="seltype" class="selectpicker select2 input-small" >
|
||||
<form:option value="cfgDesc"><spring:message code="policy_name"></spring:message></form:option>
|
||||
<form:option value="group1Name"><spring:message code="group_name"></spring:message></form:option>
|
||||
</form:select>
|
||||
|
||||
</div>
|
||||
|
||||
<input id="intype" class="form-control input-medium" type="text" value="">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
<button type="button" class="btn blue" onClick="return page()"> <i class="fa fa-search"></i> <spring:message code="search"/> </button>
|
||||
<button type="button" class="btn btn-default" id="resetBtn"> <i class="fa fa-refresh"></i> <spring:message code="reset"/> </button>
|
||||
<button type="button" class="btn btn-default" id="filter-btn"> <spring:message code="filter"/> <i class="fa fa-angle-double-down"></i></button>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<shiro:hasPermission name="dns:res:strategy:config">
|
||||
<sys:delRow url="${ctx}/maintenance/dnsResStrategy/form" id="contentTable" label="update"></sys:delRow>
|
||||
<sys:delRow url="${ctx}/maintenance/dnsResStrategy/delete?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
|
||||
</shiro:hasPermission>
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
<i class="fa fa-wrench"></i> <spring:message code="examine"></spring:message>
|
||||
<i class="fa fa-angle-down"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu pull-right">
|
||||
<li><sys:delRow url="${ctx}/maintenance/dnsResStrategy/audit?isAudit=1&isValid=1&functionId=${cfg.functionId }" id="contentTable" label="approved"></sys:delRow></li>
|
||||
<li><sys:delRow url="${ctx}/maintenance/dnsResStrategy/audit?isAudit=2&isValid=0&functionId=${cfg.functionId }" id="contentTable" label="unapproved"></sys:delRow></li>
|
||||
<li><sys:delRow url="${ctx}/maintenance/dnsResStrategy/audit?isAudit=3&isValid=0&functionId=${cfg.functionId }" id="contentTable" label="cancelPass"></sys:delRow></li>
|
||||
</ul>
|
||||
</div>
|
||||
<a class="btn btn-icon-only btn-default setfields tooltips"
|
||||
data-container="body" data-placement="top" data-original-title=<spring:message code="custom_columns"/> href="javascript:;">
|
||||
<i class="icon-wrench"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /搜索内容与操作按钮栏 -->
|
||||
|
||||
<!-- 筛选搜索内容栏默认隐藏-->
|
||||
<div class="col-md-12 filter-action-select-panle hide" >
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-3">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label"><spring:message code='request_number'/></label>
|
||||
<c:set var="select"><spring:message code='select'/></c:set>
|
||||
<form:select path="requestId" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<c:forEach items="${requestInfos}" var="requestInfo" >
|
||||
<form:option value="${requestInfo.id}"><spring:message code="${requestInfo.requestTitle}"></spring:message></form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label"><spring:message code='type'/></label>
|
||||
<form:select path="classify" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<c:forEach items="${fls}" var="fl" >
|
||||
<form:option value="${fl.serviceDictId}"><spring:message code="${fl.itemValue}"></spring:message></form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label"><spring:message code='attribute'/></label>
|
||||
<c:set var="select"><spring:message code='select'/></c:set>
|
||||
<form:select path="attribute" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<c:forEach items="${xzs}" var="xz" >
|
||||
<form:option value="${xz.serviceDictId}"><spring:message code="${xz.itemValue}"></spring:message></form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label"><spring:message code='label'/></label>
|
||||
<form:select path="lable" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<c:forEach items="${lables}" var="lable" >
|
||||
<form:option value="${lable.serviceDictId}"><spring:message code="${lable.itemValue}"></spring:message></form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label><spring:message code="config_time"/>:</label>
|
||||
<input name="search_create_time_start" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value='${cfg.search_create_time_start}' pattern='yyyy-MM-dd HH:mm:ss'/>" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label> </label>
|
||||
<input name="search_create_time_end" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_create_time_end}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label><spring:message code="edit_time"/>:</label>
|
||||
<input name="search_edit_time_start" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_edit_time_start}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label> </label>
|
||||
<input name="search_edit_time_end" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_edit_time_end}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label><spring:message code="audit_time"/>:</label>
|
||||
<input name="search_audit_time_start" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_audit_time_start}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label> </label>
|
||||
<input name="search_audit_time_end" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_audit_time_end}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<!-- /筛选搜索内容栏 结束-->
|
||||
</form:form>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><input type="checkbox" class="i-checks" id="checkAll"></th>
|
||||
<%-- <th><spring:message code="seq"/></th> --%>
|
||||
<th><spring:message code="policy_number"/></th>
|
||||
<th><spring:message code="policy_name"/></th>
|
||||
<th><spring:message code="group_name"/></th>
|
||||
<th><spring:message code="min_ttl"/></th>
|
||||
<th><spring:message code="max_ttl"/></th>
|
||||
<th><spring:message code="block_type"/></th>
|
||||
<th><spring:message code="is_audit"/></th>
|
||||
<th><spring:message code="whether_area_block"/></th>
|
||||
<th><spring:message code="letter"/></th>
|
||||
<th><spring:message code="type"/></th>
|
||||
<th><spring:message code="attribute"/></th>
|
||||
<th><spring:message code="label"/></th>
|
||||
<th><spring:message code="valid_identifier"/></th>
|
||||
<th><spring:message code="creator"/></th>
|
||||
<th class="sort-column r.create_time"><spring:message code="config_time"/></th>
|
||||
<th><spring:message code="editor"/></th>
|
||||
<th class="sort-column r.edit_time"><spring:message code="edit_time"/></th>
|
||||
<th><spring:message code="auditor"/></th>
|
||||
<th class="sort-column r.audit_time"><spring:message code="audit_time"/></th>
|
||||
<%-- <th><spring:message code="operation"></spring:message></th> --%>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:forEach items="${page.list }" var="cfg" varStatus="status" step="1">
|
||||
<tr>
|
||||
<td><input type="checkbox" class="i-checks" id="${cfg.cfgId}" value="${cfg.isAudit}"></td>
|
||||
<td>${cfg.cfgId }</td>
|
||||
<td>
|
||||
<a href="javascript:;" data-original-title="${cfg.cfgDesc}"
|
||||
class="tooltips" data-flag="false" data-html="true" data-placement="top">
|
||||
${fns:abbr(cfg.cfgDesc,20)}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="javascript:;" data-original-title="${cfg.group1Name}"
|
||||
class="tooltips" data-flag="false" data-html="true" data-placement="top">
|
||||
${fns:abbr(cfg.group1Name,20)}
|
||||
</a>
|
||||
</td>
|
||||
<td>${cfg.minTtl }</td>
|
||||
<td>${cfg.maxTtl }</td>
|
||||
<td>
|
||||
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict">
|
||||
<c:if test="${dict.itemCode eq cfg.action }">
|
||||
<spring:message code="${dict.itemValue }"/>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td>
|
||||
<c:choose>
|
||||
<c:when test="${cfg.isAudit eq '0'}"><span class="label label-danger"><spring:message code="created"></spring:message></span></c:when>
|
||||
<c:when test="${cfg.isAudit eq '1'}"><span class="label label-success"><spring:message code="approved"></spring:message></span></c:when>
|
||||
<c:when test="${cfg.isAudit eq '2'}"><span class="label label-warning"><spring:message code="unapproved"></spring:message></span></c:when>
|
||||
<c:when test="${cfg.isAudit eq '3'}"><span class="label label-warning"><spring:message code="cancel_approved"></spring:message></span></c:when>
|
||||
</c:choose>
|
||||
</td>
|
||||
<td>
|
||||
<c:if test="${cfg.isAreaEffective==0}"><spring:message code="no"/></c:if>
|
||||
<c:if test="${cfg.isAreaEffective==1}">
|
||||
<a href="javascript:viewAreaInfo('${ctx}','${cfg.areaEffectiveIds }','${cfg.compileId }')" >
|
||||
<spring:message code="yes"/>
|
||||
</a>
|
||||
</c:if>
|
||||
</td>
|
||||
<td>${cfg.requestName }</td>
|
||||
<td >
|
||||
<c:set var="classify"></c:set>
|
||||
<c:forEach items="${fn:split(cfg.classify,',')}" var="classifyId" varStatus="status">
|
||||
<c:forEach items="${fls}" var="fl">
|
||||
<c:if test="${classifyId eq fn:trim(fl.serviceDictId)}">
|
||||
<c:if test="${status.index+1 eq 1}">
|
||||
<c:set var="classify" value="${fl.itemValue}"></c:set>
|
||||
</c:if>
|
||||
<c:if test="${status.index+1 ne 1}">
|
||||
<c:set var="classify" value="${classify},${fl.itemValue}"></c:set>
|
||||
</c:if>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
<a href="javascript:;" data-original-title="${classify}"
|
||||
class="tooltips" data-flag="false" data-html="true" data-placement="top">
|
||||
${fns:abbr(classify,20)}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<c:set var="attribute"></c:set>
|
||||
<c:forEach items="${fn:split(cfg.attribute,',')}" var="attributeId" varStatus="status">
|
||||
<c:forEach items="${xzs}" var="xz">
|
||||
<c:if test="${attributeId eq fn:trim(xz.serviceDictId)}">
|
||||
<c:if test="${status.index+1 eq 1}">
|
||||
<c:set var="attribute" value="${xz.itemValue}"></c:set>
|
||||
</c:if>
|
||||
<c:if test="${status.index+1 ne 1}">
|
||||
<c:set var="attribute" value="${attribute},${xz.itemValue}"></c:set>
|
||||
</c:if>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
<a href="javascript:;" data-original-title="${attribute}"
|
||||
class="tooltips" data-flag="false" data-html="true" data-placement="top">
|
||||
${fns:abbr(attribute,20)}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<c:set var="lableInfo"></c:set>
|
||||
<c:forEach items="${fn:split(cfg.lable,',')}" var="lableId" varStatus="status">
|
||||
<c:forEach items="${lables}" var="lable">
|
||||
<c:if test="${lableId eq fn:trim(lable.serviceDictId)}">
|
||||
<c:if test="${status.index+1 eq 1}">
|
||||
<c:set var="lableInfo" value="${lable.itemValue}"></c:set>
|
||||
</c:if>
|
||||
<c:if test="${status.index+1 ne 1}">
|
||||
<c:set var="lableInfo" value="${lableInfo},${lable.itemValue}"></c:set>
|
||||
</c:if>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
<a href="javascript:;" data-original-title="${lableInfo}"
|
||||
class="tooltips" data-flag="false" data-html="true" data-placement="top">
|
||||
${fns:abbr(lableInfo,20)}
|
||||
</a>
|
||||
</td>
|
||||
<%-- <td>${cfg.areaEffectiveIds }</td> --%>
|
||||
<td>
|
||||
<c:if test="${cfg.isValid==0}"><spring:message code="no"/></c:if>
|
||||
<c:if test="${cfg.isValid==1}"><spring:message code="yes"/></c:if>
|
||||
<c:if test="${cfg.isValid==-1}"><spring:message code="deleted"/></c:if>
|
||||
</td>
|
||||
|
||||
<td>${cfg.creatorName }</td>
|
||||
<td><fmt:formatDate value="${cfg.createTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<td>${cfg.editorName }</td>
|
||||
<td><fmt:formatDate value="${cfg.editTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<td>${cfg.auditorName }</td>
|
||||
<td><fmt:formatDate value="${cfg.auditTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="page">${page}</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user