Merge branch 'develop' of https://git.mesalab.cn/K18_NTCS_WEB/NTC.git
into develop Conflicts: src/main/java/com/nis/domain/configuration/CfgIndexInfo.java src/main/resources/nis.properties src/main/webapp/WEB-INF/tags/sys/delRow.tag asn相关功能更改: IP ADDR:增加asn域 1、新增IP ADDR可选asn,如果asn未下发过(is_used=0),下发时asn的group需要标记为commonGroup(groupId为asn组织的groupId,regionId为asn的regionId)。 2、如果所选的asn组(asn组织的groupId)已经下发过(is_used=1),则下发maat时,asn域不需要下发。 3、策略取消时,如果有需要保留的公共组(commongRroupIds),需要将公共组的组号下发。 ASN GROUP: 1、新增asn,如果此asn的组织groupId已下发过(is_used=1),且此组织的groupId已被策略标记过全选(is_audit_all=1),则需要调用公共组域新增的接口,将新增的asn关键字下发。 2、修改asn,如果此asn的组织groupId已下发过(is_used=1),则需要调用公共组域修改的接口,修改已经下发的asn关键字域。 3、删除asn,如果此asn的组织groupId已下发过(is_used=1),则需要调用公共组域删除的接口,删除已经下发的asn关键字域。 ASN IP CFG: 1、新增asn ip,所选asn no的组首次下发(is_valid=0),需要将asn no的groupId标记为公共组;如果asn no非首次下发(is_valid=1),直接调用公共组新增域的接口。 2、修改 生效状态asn ip修改,调用公共组修改域接口直接修改 3、失效 直接调用公共组删除域接口,失效asn ip域
This commit is contained in:
@@ -30,8 +30,16 @@ public class AsnGroupInfo extends BaseCfg<AsnGroupInfo> implements Serializable{
|
||||
@ExcelField(title="ASN",sort=305)
|
||||
private Long asnId;
|
||||
|
||||
private Integer isUsed;
|
||||
private Integer regionId;
|
||||
|
||||
|
||||
|
||||
public Integer getIsUsed() {
|
||||
return isUsed;
|
||||
}
|
||||
public void setIsUsed(Integer isUsed) {
|
||||
this.isUsed = isUsed;
|
||||
}
|
||||
public Long getIssuedIPs() {
|
||||
return issuedIPs;
|
||||
}
|
||||
@@ -127,6 +135,14 @@ public class AsnGroupInfo extends BaseCfg<AsnGroupInfo> implements Serializable{
|
||||
public void setAsnId(Long asnId) {
|
||||
this.asnId = asnId;
|
||||
}
|
||||
|
||||
|
||||
public Integer getRegionId() {
|
||||
return regionId;
|
||||
}
|
||||
public void setRegionId(Integer regionId) {
|
||||
this.regionId = regionId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
|
||||
@@ -17,13 +17,13 @@ public class AsnIpCfg extends BaseCfg<AsnIpCfg> {
|
||||
@Expose
|
||||
private String ratelimit;
|
||||
@Expose
|
||||
@ExcelField(title="ip_type",dictType="IP_TYPE",sort=3)
|
||||
@ExcelField(title="ip_type",dictType="IP_TYPE",sort=6)
|
||||
@SerializedName("ipType")
|
||||
private Integer ipType;
|
||||
@ExcelField(title="ip_pattern",dictType="IP_PATTERN",sort=6)
|
||||
@ExcelField(title="ip_pattern",dictType="IP_PATTERN",sort=8)
|
||||
private Integer ipPattern;
|
||||
private String srcIpAddress;
|
||||
@ExcelField(title="server_ip",sort=5)
|
||||
@ExcelField(title="ip",sort=7)
|
||||
private String destIpAddress;
|
||||
private Integer portPattern;
|
||||
private String srcPort;
|
||||
@@ -45,11 +45,11 @@ public class AsnIpCfg extends BaseCfg<AsnIpCfg> {
|
||||
private Integer protocol ;
|
||||
private Integer protocolId;
|
||||
|
||||
@ExcelField(title="organization",sort=91)
|
||||
@ExcelField(title="organization",sort=2)
|
||||
private String organization;
|
||||
@ExcelField(title="country",sort=92)
|
||||
@ExcelField(title="country",sort=3)
|
||||
private String country;
|
||||
@ExcelField(title="detail",sort=93)
|
||||
@ExcelField(title="detail",sort=3)
|
||||
private String detail;
|
||||
private String userregion1;
|
||||
|
||||
|
||||
@@ -55,6 +55,11 @@ public class AppComplexFeatureCfg extends BaseCfg<AppComplexFeatureCfg> {
|
||||
private String icmpCode;
|
||||
private String icmpIdentifier;
|
||||
private String headerType;
|
||||
//以下参数为APP payload payload的特殊属性(偏移量表达式时处理)
|
||||
private Integer payloadOffset;
|
||||
private Integer payloadSize;//下发综合服务接口时,为单独的域配置
|
||||
private String payloadPacketDirection;//下发综合服务接口时,为单独的域配置
|
||||
|
||||
|
||||
public String getCfgRegionCode1() {
|
||||
return cfgRegionCode1;
|
||||
@@ -299,5 +304,28 @@ public class AppComplexFeatureCfg extends BaseCfg<AppComplexFeatureCfg> {
|
||||
this.headerType = headerType;
|
||||
}
|
||||
|
||||
public Integer getPayloadOffset() {
|
||||
return payloadOffset;
|
||||
}
|
||||
|
||||
public void setPayloadOffset(Integer payloadOffset) {
|
||||
this.payloadOffset = payloadOffset;
|
||||
}
|
||||
|
||||
public Integer getPayloadSize() {
|
||||
return payloadSize;
|
||||
}
|
||||
|
||||
public void setPayloadSize(Integer payloadSize) {
|
||||
this.payloadSize = payloadSize;
|
||||
}
|
||||
|
||||
public String getPayloadPacketDirection() {
|
||||
return payloadPacketDirection;
|
||||
}
|
||||
|
||||
public void setPayloadPacketDirection(String payloadPacketDirection) {
|
||||
this.payloadPacketDirection = payloadPacketDirection;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -46,6 +46,12 @@ public class AppFeatureIndex extends BaseCfg<AppFeatureIndex> {
|
||||
private String cfgRegionType;
|
||||
private String cfgRegionValue;
|
||||
private String cfgRegionCode1;
|
||||
private Integer isDrop;//
|
||||
private Integer isLoop;
|
||||
private Integer dropTime;//drop持续时间,默认180s,0-1800s
|
||||
private Integer loopTime;//loop持续时间,默认180s,0-1800s
|
||||
private Integer isRelation;
|
||||
private Integer relationTime;//关联持续时间,默认10s,0-180s
|
||||
public static String getTablename() {
|
||||
return tableName;
|
||||
}
|
||||
@@ -133,5 +139,59 @@ public class AppFeatureIndex extends BaseCfg<AppFeatureIndex> {
|
||||
public void setNumCfgList(List<AppTcpCfg> numCfgList) {
|
||||
this.numCfgList = numCfgList;
|
||||
}
|
||||
public Integer getExprType() {
|
||||
return exprType;
|
||||
}
|
||||
public void setExprType(Integer exprType) {
|
||||
this.exprType = exprType;
|
||||
}
|
||||
public Integer getMatchMethod() {
|
||||
return matchMethod;
|
||||
}
|
||||
public void setMatchMethod(Integer matchMethod) {
|
||||
this.matchMethod = matchMethod;
|
||||
}
|
||||
public Integer getIsHexbin() {
|
||||
return isHexbin;
|
||||
}
|
||||
public void setIsHexbin(Integer isHexbin) {
|
||||
this.isHexbin = isHexbin;
|
||||
}
|
||||
public Integer getIsDrop() {
|
||||
return isDrop;
|
||||
}
|
||||
public void setIsDrop(Integer isDrop) {
|
||||
this.isDrop = isDrop;
|
||||
}
|
||||
public Integer getIsLoop() {
|
||||
return isLoop;
|
||||
}
|
||||
public void setIsLoop(Integer isLoop) {
|
||||
this.isLoop = isLoop;
|
||||
}
|
||||
public Integer getDropTime() {
|
||||
return dropTime;
|
||||
}
|
||||
public void setDropTime(Integer dropTime) {
|
||||
this.dropTime = dropTime;
|
||||
}
|
||||
public Integer getLoopTime() {
|
||||
return loopTime;
|
||||
}
|
||||
public void setLoopTime(Integer loopTime) {
|
||||
this.loopTime = loopTime;
|
||||
}
|
||||
public Integer getIsRelation() {
|
||||
return isRelation;
|
||||
}
|
||||
public void setIsRelation(Integer isRelation) {
|
||||
this.isRelation = isRelation;
|
||||
}
|
||||
public Integer getRelationTime() {
|
||||
return relationTime;
|
||||
}
|
||||
public void setRelationTime(Integer relationTime) {
|
||||
this.relationTime = relationTime;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -53,6 +53,7 @@ public class AppPolicyCfg extends BaseCfg<AppPolicyCfg> {
|
||||
private String userRegion5;
|
||||
private String configType;
|
||||
|
||||
|
||||
@ExcelField(title="encrypted_tunnel_behavior",sort=5)
|
||||
private String behaviorName;
|
||||
@ExcelField(title="social_app",sort=5)
|
||||
@@ -108,6 +109,9 @@ public class AppPolicyCfg extends BaseCfg<AppPolicyCfg> {
|
||||
@SerializedName("isHexbin")
|
||||
private Integer isHexbin;
|
||||
|
||||
@ExcelField(title="log_total",sort=31)
|
||||
private Long totalLogs;
|
||||
|
||||
private List<IpPortCfg> ipPortList;
|
||||
private IpPortCfg ipPort;
|
||||
private NtcSubscribeIdCfg ntcSubscribeIdCfg;
|
||||
@@ -278,5 +282,13 @@ public class AppPolicyCfg extends BaseCfg<AppPolicyCfg> {
|
||||
public void setIndexTable(String indexTable) {
|
||||
this.indexTable = indexTable;
|
||||
}
|
||||
|
||||
public Long getTotalLogs() {
|
||||
return totalLogs;
|
||||
}
|
||||
|
||||
public void setTotalLogs(Long totalLogs) {
|
||||
this.totalLogs = totalLogs;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -28,13 +28,23 @@ public class AvFileSampleCfg extends BaseCfg<AvFileSampleCfg> {
|
||||
@ExcelField(title="harm_level",sort=21)
|
||||
private Integer level;
|
||||
@Expose
|
||||
@ExcelField(title="cfg_id",sort=0)
|
||||
@SerializedName("cfgId")
|
||||
private Integer compileId;
|
||||
private String srcPath;
|
||||
private String samplePath;
|
||||
private Integer isSampleCreated;
|
||||
private String resultPath;
|
||||
|
||||
@ExcelField(title="log_total",sort=40)
|
||||
private Long totalLogs;
|
||||
|
||||
|
||||
public Long getTotalLogs() {
|
||||
return totalLogs;
|
||||
}
|
||||
public void setTotalLogs(Long totalLogs) {
|
||||
this.totalLogs = totalLogs;
|
||||
}
|
||||
public String getSrcPath() {
|
||||
return srcPath;
|
||||
}
|
||||
|
||||
@@ -75,10 +75,18 @@ public class BaseIpCfg extends BaseCfg<BaseIpCfg> {
|
||||
protected String organization; //仅用于copy属性使用
|
||||
protected String country; //仅用于copy属性使用
|
||||
protected String detail; //仅用于copy属性使用
|
||||
@ExcelField(title="log_total",sort=31)
|
||||
private Long totalLogs;
|
||||
|
||||
public String getOrganization() {
|
||||
return organization;
|
||||
}
|
||||
public Long getTotalLogs() {
|
||||
return totalLogs;
|
||||
}
|
||||
public void setTotalLogs(Long totalLogs) {
|
||||
this.totalLogs = totalLogs;
|
||||
}
|
||||
public void setOrganization(String organization) {
|
||||
this.organization = organization;
|
||||
}
|
||||
|
||||
@@ -92,7 +92,8 @@ public class CfgIndexInfo extends BaseCfg<CfgIndexInfo> {
|
||||
private Integer isAudit;
|
||||
@ExcelField(title="do_log",dictType="DO_LOG",sort=27)
|
||||
private Integer doLog = Constants.MAAT_CFG_DOLOG_DEFAULT;
|
||||
|
||||
|
||||
|
||||
/*private CachePolicyUserRegion cachePolicyUserRegion;//缓存策略用户自定义域参数
|
||||
|
||||
public static class CachePolicyUserRegion{
|
||||
@@ -101,6 +102,7 @@ public class CfgIndexInfo extends BaseCfg<CfgIndexInfo> {
|
||||
|
||||
}
|
||||
}*/
|
||||
|
||||
public Integer getIsValid() {
|
||||
return isValid;
|
||||
}
|
||||
|
||||
@@ -29,7 +29,23 @@ public class DdosIpCfg extends BaseIpCfg {
|
||||
private Long bpsThreadshold;// 即DDoS攻击保护动作触发阈值,每秒Bit数和每秒包数
|
||||
@ExcelField(title="pps_threadshold",sort=43)
|
||||
private Long ppsThreadshold;
|
||||
|
||||
@ExcelField(title="log_total",sort=32)
|
||||
private Long totalLogs;
|
||||
@ExcelField(title="is_audit",dictType="AUDIT_STATUS",sort=20)
|
||||
private Integer isAudit;
|
||||
|
||||
public Integer getIsAudit() {
|
||||
return isAudit;
|
||||
}
|
||||
public void setIsAudit(Integer isAudit) {
|
||||
this.isAudit = isAudit;
|
||||
}
|
||||
public Long getTotalLogs() {
|
||||
return totalLogs;
|
||||
}
|
||||
public void setTotalLogs(Long totalLogs) {
|
||||
this.totalLogs = totalLogs;
|
||||
}
|
||||
public String getAntiddosProtocol() {
|
||||
return antiddosProtocol;
|
||||
}
|
||||
|
||||
@@ -37,6 +37,8 @@ public class FileDigestCfg extends BaseCfg<FileDigestCfg> {
|
||||
private Integer cfdsLevel;
|
||||
@ExcelField(title="file_url",sort=6)
|
||||
private String fileUrl;
|
||||
@ExcelField(title="log_total",sort=40)
|
||||
private Long totalLogs;
|
||||
|
||||
private NtcSubscribeIdCfg ntcSubscribeIdCfg;
|
||||
private List<NtcSubscribeIdCfg> ntcSubscribeIdCfgList;
|
||||
@@ -89,5 +91,10 @@ public class FileDigestCfg extends BaseCfg<FileDigestCfg> {
|
||||
public void setIndexTable(String indexTable) {
|
||||
this.indexTable = indexTable;
|
||||
}
|
||||
|
||||
public Long getTotalLogs() {
|
||||
return totalLogs;
|
||||
}
|
||||
public void setTotalLogs(Long totalLogs) {
|
||||
this.totalLogs = totalLogs;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,6 +40,7 @@ public class IpReusePolicyCfg extends BaseCfg<IpReusePolicyCfg>{
|
||||
private String srcIpAddress;
|
||||
private String destIpAddress;
|
||||
@Expose
|
||||
@ExcelField(title="cfg_id",sort=0)
|
||||
@SerializedName("configId")
|
||||
private Integer compileId;
|
||||
@Expose
|
||||
@@ -47,7 +48,15 @@ public class IpReusePolicyCfg extends BaseCfg<IpReusePolicyCfg>{
|
||||
private String areaEffectiveIds ;
|
||||
@Expose
|
||||
private Integer doLog = Constants.MAAT_CFG_DOLOG_DEFAULT;
|
||||
@ExcelField(title="log_total",sort=31)
|
||||
private Long totalLogs;
|
||||
|
||||
public Long getTotalLogs() {
|
||||
return totalLogs;
|
||||
}
|
||||
public void setTotalLogs(Long totalLogs) {
|
||||
this.totalLogs = totalLogs;
|
||||
}
|
||||
public void setDoLog(Integer doLog) {
|
||||
this.doLog = doLog;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
package com.nis.domain.configuration.template;
|
||||
|
||||
import com.nis.util.excel.ExcelField;
|
||||
|
||||
/**
|
||||
* @Description: excel导入增强字符串类配置
|
||||
*/
|
||||
public class ComplexStringAllNotDoLogTemplate extends BasicTemplate{
|
||||
private String cfgDesc;
|
||||
|
||||
private String district;
|
||||
private String cfgKeywords;
|
||||
private Integer matchMethod ;
|
||||
private Integer isHex;
|
||||
private Integer isCaseInsenstive;
|
||||
|
||||
@ExcelField(title="config_describe",align=2,sort=1)
|
||||
public String getCfgDesc() {
|
||||
return cfgDesc;
|
||||
}
|
||||
public void setCfgDesc(String cfgDesc) {
|
||||
this.cfgDesc = cfgDesc;
|
||||
}
|
||||
@ExcelField(title="district",sort=11)
|
||||
public String getDistrict() {
|
||||
return district;
|
||||
}
|
||||
public void setDistrict(String district) {
|
||||
this.district = district;
|
||||
}
|
||||
@ExcelField(title="key_word",sort=12)
|
||||
public String getCfgKeywords() {
|
||||
return cfgKeywords;
|
||||
}
|
||||
public void setCfgKeywords(String cfgKeywords) {
|
||||
this.cfgKeywords = cfgKeywords;
|
||||
}
|
||||
@ExcelField(title="match_method",dictType="MATCH_METHOD",sort=14)
|
||||
public Integer getMatchMethod() {
|
||||
return matchMethod;
|
||||
}
|
||||
public void setMatchMethod(Integer matchMethod) {
|
||||
this.matchMethod = matchMethod;
|
||||
}
|
||||
@ExcelField(title="is_hex",dictType="IS_HEX",sort=15)
|
||||
public Integer getIsHex() {
|
||||
return isHex;
|
||||
}
|
||||
public void setIsHex(Integer isHex) {
|
||||
this.isHex = isHex;
|
||||
}
|
||||
@ExcelField(title="is_case_insenstive",dictType="CASE_INSENSTIVE",sort=16)
|
||||
public Integer getIsCaseInsenstive() {
|
||||
return isCaseInsenstive;
|
||||
}
|
||||
public void setIsCaseInsenstive(Integer isCaseInsenstive) {
|
||||
this.isCaseInsenstive = isCaseInsenstive;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -21,6 +21,7 @@ public class ComplexStringAllTemplate extends BasicTemplate{
|
||||
private Integer matchMethod ;
|
||||
private Integer isHex;
|
||||
private Integer isCaseInsenstive;
|
||||
private Integer doLog;
|
||||
|
||||
@ExcelField(title="config_describe",align=2,sort=1)
|
||||
public String getCfgDesc() {
|
||||
@@ -64,4 +65,12 @@ public class ComplexStringAllTemplate extends BasicTemplate{
|
||||
public void setIsCaseInsenstive(Integer isCaseInsenstive) {
|
||||
this.isCaseInsenstive = isCaseInsenstive;
|
||||
}
|
||||
|
||||
@ExcelField(title="do_log",dictType="DO_LOG",align=2,sort=2)
|
||||
public Integer getDoLog() {
|
||||
return doLog;
|
||||
}
|
||||
public void setDoLog(Integer doLog) {
|
||||
this.doLog = doLog;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,21 +6,21 @@ public class DdosIpTemplate extends IpAllTemplate {
|
||||
private String antiddosProtocol;
|
||||
private Long bpsThreadshold;
|
||||
private Long ppsThreadshold;
|
||||
@ExcelField(title="antiddos_protocol",align=2,sort=2)
|
||||
@ExcelField(title="antiddos_protocol",align=2,sort=3)
|
||||
public String getAntiddosProtocol() {
|
||||
return antiddosProtocol;
|
||||
}
|
||||
public void setAntiddosProtocol(String antiddosProtocol) {
|
||||
this.antiddosProtocol = antiddosProtocol;
|
||||
}
|
||||
@ExcelField(title="bps_threadshold",align=2,sort=3)
|
||||
@ExcelField(title="bps_threadshold",align=2,sort=4)
|
||||
public Long getBpsThreadshold() {
|
||||
return bpsThreadshold;
|
||||
}
|
||||
public void setBpsThreadshold(Long bpsThreadshold) {
|
||||
this.bpsThreadshold = bpsThreadshold;
|
||||
}
|
||||
@ExcelField(title="pps_threadshold",align=2,sort=4)
|
||||
@ExcelField(title="pps_threadshold",align=2,sort=5)
|
||||
public Long getPpsThreadshold() {
|
||||
return ppsThreadshold;
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ import com.nis.util.excel.ExcelField;
|
||||
public class DnsComplexStringTemplate extends ComplexStringAllTemplate {
|
||||
private Long dnsStrategyId;
|
||||
|
||||
@ExcelField(title="policy_name",align=2,sort=2)
|
||||
@ExcelField(title="policy_name",align=2,sort=3)
|
||||
public Long getDnsStrategyId() {
|
||||
return dnsStrategyId;
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ public class DnsIpTemplate extends IpAllTemplate {
|
||||
|
||||
private Integer dnsStrategyId;
|
||||
|
||||
@ExcelField(title="policy_name",align=2,sort=2)
|
||||
@ExcelField(title="policy_name",align=2,sort=3)
|
||||
public Integer getDnsStrategyId() {
|
||||
return dnsStrategyId;
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import com.nis.util.excel.ExcelField;
|
||||
* @author dell
|
||||
*
|
||||
*/
|
||||
public class DomainInterceptMonitTemplate extends StringAllTemplate{
|
||||
public class DomainInterceptMonitTemplate extends StringAllNotDoLogTemplate{
|
||||
|
||||
private String userRegion5;
|
||||
private String cfgKeywords;
|
||||
|
||||
@@ -7,7 +7,7 @@ import com.nis.util.excel.ExcelField;
|
||||
* @author dell
|
||||
*
|
||||
*/
|
||||
public class DomainInterceptRateLimitTemplate extends StringAllTemplate{
|
||||
public class DomainInterceptRateLimitTemplate extends StringAllNotDoLogTemplate{
|
||||
|
||||
private String userRegion2;
|
||||
private String cfgKeywords;
|
||||
|
||||
@@ -2,7 +2,7 @@ package com.nis.domain.configuration.template;
|
||||
|
||||
import com.nis.util.excel.ExcelField;
|
||||
|
||||
public class DomainInterceptTemplate extends StringAllTemplate{
|
||||
public class DomainInterceptTemplate extends StringAllNotDoLogTemplate{
|
||||
private String cfgKeywords;
|
||||
|
||||
@ExcelField(title="domain_name",sort=11)
|
||||
|
||||
@@ -12,7 +12,7 @@ public class HttpsRedirectComplexTemplate extends ComplexStringAllTemplate{
|
||||
private String userRegion1;// 重定向应答码
|
||||
private String userRegion2;// 重定向URL
|
||||
|
||||
@ExcelField(title="redirect_response_code",dictType="REDIRECT_RESPONSE_CODE",align=2,sort=2)
|
||||
@ExcelField(title="redirect_response_code",dictType="REDIRECT_RESPONSE_CODE",align=2,sort=3)
|
||||
public String getUserRegion1() {
|
||||
return userRegion1;
|
||||
}
|
||||
@@ -21,7 +21,7 @@ public class HttpsRedirectComplexTemplate extends ComplexStringAllTemplate{
|
||||
this.userRegion1 = userRegion1;
|
||||
}
|
||||
|
||||
@ExcelField(title="redirect_url",align=2,sort=3)
|
||||
@ExcelField(title="redirect_url",align=2,sort=4)
|
||||
public String getUserRegion2() {
|
||||
return userRegion2;
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ public class HttpsRedirectIpTemplate extends IpAllTemplate{
|
||||
private String userRegion1;// 重定向应答码
|
||||
private String userRegion2;// 重定向URL
|
||||
|
||||
@ExcelField(title="redirect_response_code",dictType="REDIRECT_RESPONSE_CODE",align=2,sort=2)
|
||||
@ExcelField(title="redirect_response_code",dictType="REDIRECT_RESPONSE_CODE",align=2,sort=3)
|
||||
public String getUserRegion1() {
|
||||
return userRegion1;
|
||||
}
|
||||
@@ -21,7 +21,7 @@ public class HttpsRedirectIpTemplate extends IpAllTemplate{
|
||||
this.userRegion1 = userRegion1;
|
||||
}
|
||||
|
||||
@ExcelField(title="redirect_url",align=2,sort=3)
|
||||
@ExcelField(title="redirect_url",align=2,sort=4)
|
||||
public String getUserRegion2() {
|
||||
return userRegion2;
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ public class HttpsRedirectTemplate extends StringAllTemplate{
|
||||
private String userRegion1;// 重定向应答码
|
||||
private String userRegion2;// 重定向URL
|
||||
|
||||
@ExcelField(title="redirect_response_code",dictType="REDIRECT_RESPONSE_CODE",align=2,sort=2)
|
||||
@ExcelField(title="redirect_response_code",dictType="REDIRECT_RESPONSE_CODE",align=2,sort=3)
|
||||
public String getUserRegion1() {
|
||||
return userRegion1;
|
||||
}
|
||||
@@ -21,7 +21,7 @@ public class HttpsRedirectTemplate extends StringAllTemplate{
|
||||
this.userRegion1 = userRegion1;
|
||||
}
|
||||
|
||||
@ExcelField(title="redirect_url",align=2,sort=3)
|
||||
@ExcelField(title="redirect_url",align=2,sort=4)
|
||||
public String getUserRegion2() {
|
||||
return userRegion2;
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ public class HttpsRejectComplexTemplate extends ComplexStringAllTemplate{
|
||||
private String userRegion1;// 应答码
|
||||
private String userRegion2;// 响应内容
|
||||
|
||||
@ExcelField(title="response_code",dictType="RESPONSE_CODE",align=2,sort=2)
|
||||
@ExcelField(title="response_code",dictType="RESPONSE_CODE",align=2,sort=3)
|
||||
public String getUserRegion1() {
|
||||
return userRegion1;
|
||||
}
|
||||
@@ -21,7 +21,7 @@ public class HttpsRejectComplexTemplate extends ComplexStringAllTemplate{
|
||||
this.userRegion1 = userRegion1;
|
||||
}
|
||||
|
||||
@ExcelField(title="response_content",align=2,sort=3)
|
||||
@ExcelField(title="response_content",align=2,sort=4)
|
||||
public String getUserRegion2() {
|
||||
return userRegion2;
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ public class HttpsRejectIpTemplate extends IpAllTemplate{
|
||||
private String userRegion1;// 应答码
|
||||
private String userRegion2;// 响应内容
|
||||
|
||||
@ExcelField(title="response_code",dictType="RESPONSE_CODE",align=2,sort=2)
|
||||
@ExcelField(title="response_code",dictType="RESPONSE_CODE",align=2,sort=3)
|
||||
public String getUserRegion1() {
|
||||
return userRegion1;
|
||||
}
|
||||
@@ -21,7 +21,7 @@ public class HttpsRejectIpTemplate extends IpAllTemplate{
|
||||
this.userRegion1 = userRegion1;
|
||||
}
|
||||
|
||||
@ExcelField(title="response_content",align=2,sort=3)
|
||||
@ExcelField(title="response_content",align=2,sort=4)
|
||||
public String getUserRegion2() {
|
||||
return userRegion2;
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ public class HttpsRejectTemplate extends StringAllTemplate{
|
||||
private String userRegion1;// 应答码
|
||||
private String userRegion2;// 响应内容
|
||||
|
||||
@ExcelField(title="response_code",dictType="RESPONSE_CODE",align=2,sort=2)
|
||||
@ExcelField(title="response_code",dictType="RESPONSE_CODE",align=2,sort=3)
|
||||
public String getUserRegion1() {
|
||||
return userRegion1;
|
||||
}
|
||||
@@ -21,7 +21,7 @@ public class HttpsRejectTemplate extends StringAllTemplate{
|
||||
this.userRegion1 = userRegion1;
|
||||
}
|
||||
|
||||
@ExcelField(title="response_content",align=2,sort=3)
|
||||
@ExcelField(title="response_content",align=2,sort=4)
|
||||
public String getUserRegion2() {
|
||||
return userRegion2;
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ public class HttpsReplaceComplexTemplate extends ComplexStringAllTemplate{
|
||||
private String userRegion2;// 发现内容
|
||||
private String userRegion3;// 替换内容
|
||||
|
||||
@ExcelField(title="replace_zone",dictType="CONTROL_REPLACE_ZONE",align=2,sort=2)
|
||||
@ExcelField(title="replace_zone",dictType="CONTROL_REPLACE_ZONE",align=2,sort=3)
|
||||
public String getUserRegion1() {
|
||||
return userRegion1;
|
||||
}
|
||||
@@ -22,7 +22,7 @@ public class HttpsReplaceComplexTemplate extends ComplexStringAllTemplate{
|
||||
this.userRegion1 = userRegion1;
|
||||
}
|
||||
|
||||
@ExcelField(title="replaced_content",align=2,sort=3)
|
||||
@ExcelField(title="replaced_content",align=2,sort=4)
|
||||
public String getUserRegion2() {
|
||||
return userRegion2;
|
||||
}
|
||||
@@ -31,7 +31,7 @@ public class HttpsReplaceComplexTemplate extends ComplexStringAllTemplate{
|
||||
this.userRegion2 = userRegion2;
|
||||
}
|
||||
|
||||
@ExcelField(title="replace_content",align=2,sort=4)
|
||||
@ExcelField(title="replace_content",align=2,sort=5)
|
||||
public String getUserRegion3() {
|
||||
return userRegion3;
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ public class HttpsReplaceIpTemplate extends IpAllTemplate{
|
||||
private String userRegion2;// 发现内容
|
||||
private String userRegion3;// 替换内容
|
||||
|
||||
@ExcelField(title="replace_zone",dictType="CONTROL_REPLACE_ZONE",align=2,sort=2)
|
||||
@ExcelField(title="replace_zone",dictType="CONTROL_REPLACE_ZONE",align=2,sort=3)
|
||||
public String getUserRegion1() {
|
||||
return userRegion1;
|
||||
}
|
||||
@@ -22,7 +22,7 @@ public class HttpsReplaceIpTemplate extends IpAllTemplate{
|
||||
this.userRegion1 = userRegion1;
|
||||
}
|
||||
|
||||
@ExcelField(title="replaced_content",align=2,sort=3)
|
||||
@ExcelField(title="replaced_content",align=2,sort=4)
|
||||
public String getUserRegion2() {
|
||||
return userRegion2;
|
||||
}
|
||||
@@ -31,7 +31,7 @@ public class HttpsReplaceIpTemplate extends IpAllTemplate{
|
||||
this.userRegion2 = userRegion2;
|
||||
}
|
||||
|
||||
@ExcelField(title="replace_content",align=2,sort=4)
|
||||
@ExcelField(title="replace_content",align=2,sort=5)
|
||||
public String getUserRegion3() {
|
||||
return userRegion3;
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ public class HttpsReplaceTemplate extends StringAllTemplate{
|
||||
private String userRegion2;// 发现内容
|
||||
private String userRegion3;// 替换内容
|
||||
|
||||
@ExcelField(title="replace_zone",dictType="CONTROL_REPLACE_ZONE",align=2,sort=2)
|
||||
@ExcelField(title="replace_zone",dictType="CONTROL_REPLACE_ZONE",align=2,sort=3)
|
||||
public String getUserRegion1() {
|
||||
return userRegion1;
|
||||
}
|
||||
@@ -22,7 +22,7 @@ public class HttpsReplaceTemplate extends StringAllTemplate{
|
||||
this.userRegion1 = userRegion1;
|
||||
}
|
||||
|
||||
@ExcelField(title="replaced_content",align=2,sort=3)
|
||||
@ExcelField(title="replaced_content",align=2,sort=4)
|
||||
public String getUserRegion2() {
|
||||
return userRegion2;
|
||||
}
|
||||
@@ -31,7 +31,7 @@ public class HttpsReplaceTemplate extends StringAllTemplate{
|
||||
this.userRegion2 = userRegion2;
|
||||
}
|
||||
|
||||
@ExcelField(title="replace_content",align=2,sort=4)
|
||||
@ExcelField(title="replace_content",align=2,sort=5)
|
||||
public String getUserRegion3() {
|
||||
return userRegion3;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,78 @@
|
||||
package com.nis.domain.configuration.template;
|
||||
|
||||
import com.nis.util.excel.ExcelField;
|
||||
|
||||
/**
|
||||
* @Description: excel导入IP类配置
|
||||
*/
|
||||
public class IpAllNotDoLogTemplate extends BasicTemplate{
|
||||
|
||||
/**
|
||||
* @Fields serialVersionUID:TODO(用一句话描述这个变量表示什么)
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
|
||||
|
||||
|
||||
private String cfgDesc;
|
||||
private String srcIpAddress;
|
||||
private String destIpAddress;
|
||||
private String srcPort;
|
||||
private String destPort;
|
||||
private Integer protocol;
|
||||
private Integer direction;
|
||||
|
||||
@ExcelField(title="config_describe",align=2,sort=1)
|
||||
public String getCfgDesc() {
|
||||
return cfgDesc;
|
||||
}
|
||||
public void setCfgDesc(String cfgDesc) {
|
||||
this.cfgDesc = cfgDesc;
|
||||
}
|
||||
@ExcelField(title="client_ip",align=2,sort=11)
|
||||
public String getSrcIpAddress() {
|
||||
return srcIpAddress;
|
||||
}
|
||||
public void setSrcIpAddress(String srcIpAddress) {
|
||||
this.srcIpAddress = srcIpAddress;
|
||||
}
|
||||
@ExcelField(title="server_ip",align=2,sort=12)
|
||||
public String getDestIpAddress() {
|
||||
return destIpAddress;
|
||||
}
|
||||
public void setDestIpAddress(String destIpAddress) {
|
||||
this.destIpAddress = destIpAddress;
|
||||
}
|
||||
|
||||
@ExcelField(title="client_port",align=2,sort=13)
|
||||
public String getSrcPort() {
|
||||
return srcPort;
|
||||
}
|
||||
public void setSrcPort(String srcPort) {
|
||||
this.srcPort = srcPort;
|
||||
}
|
||||
@ExcelField(title="server_port",align=2,sort=14)
|
||||
public String getDestPort() {
|
||||
return destPort;
|
||||
}
|
||||
public void setDestPort(String destPort) {
|
||||
this.destPort = destPort;
|
||||
}
|
||||
|
||||
@ExcelField(title="protocol",align=2,sort=15)
|
||||
public Integer getProtocol() {
|
||||
return protocol;
|
||||
}
|
||||
public void setProtocol(Integer protocol) {
|
||||
this.protocol = protocol;
|
||||
}
|
||||
@ExcelField(title="direction",align=2,sort=16)
|
||||
public Integer getDirection() {
|
||||
return direction;
|
||||
}
|
||||
public void setDirection(Integer direction) {
|
||||
this.direction = direction;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -31,6 +31,7 @@ public class IpAllTemplate extends BasicTemplate{
|
||||
private String destPort;
|
||||
private Integer protocol;
|
||||
private Integer direction;
|
||||
private Integer doLog;
|
||||
|
||||
@ExcelField(title="config_describe",align=2,sort=1)
|
||||
public String getCfgDesc() {
|
||||
@@ -84,4 +85,11 @@ public class IpAllTemplate extends BasicTemplate{
|
||||
this.direction = direction;
|
||||
}
|
||||
|
||||
@ExcelField(title="do_log",dictType="DO_LOG",align=2,sort=2)
|
||||
public Integer getDoLog() {
|
||||
return doLog;
|
||||
}
|
||||
public void setDoLog(Integer doLog) {
|
||||
this.doLog = doLog;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,21 +12,21 @@ public class IpPayloadTemplate extends IpAllTemplate {
|
||||
private String userRegion2;
|
||||
private String userRegion3;
|
||||
|
||||
@ExcelField(title="replace_zone",dictType="INTERCEPT_REPLACE_ZONE",align=2,sort=2)
|
||||
@ExcelField(title="replace_zone",dictType="INTERCEPT_REPLACE_ZONE",align=2,sort=3)
|
||||
public String getUserRegion1() {
|
||||
return userRegion1;
|
||||
}
|
||||
public void setUserRegion1(String userRegion1) {
|
||||
this.userRegion1 = userRegion1;
|
||||
}
|
||||
@ExcelField(title="replaced_content",align=2,sort=3)
|
||||
@ExcelField(title="replaced_content",align=2,sort=4)
|
||||
public String getUserRegion2() {
|
||||
return userRegion2;
|
||||
}
|
||||
public void setUserRegion2(String userRegion2) {
|
||||
this.userRegion2 = userRegion2;
|
||||
}
|
||||
@ExcelField(title="replace_content",align=2,sort=4)
|
||||
@ExcelField(title="replace_content",align=2,sort=5)
|
||||
public String getUserRegion3() {
|
||||
return userRegion3;
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ import com.nis.util.excel.ExcelField;
|
||||
* EXCEL IP导入限速模板
|
||||
*
|
||||
*/
|
||||
public class IpRateLimitTemplate extends IpAllTemplate {
|
||||
public class IpRateLimitTemplate extends IpAllNotDoLogTemplate {
|
||||
public static String userRegion1="0";
|
||||
private String userRegion2;
|
||||
@ExcelField(title="ratelimit",dictType="RATE_LIMIT",align=2,sort=2)
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.nis.domain.configuration.template;
|
||||
|
||||
import com.nis.util.excel.ExcelField;
|
||||
|
||||
/**
|
||||
* EXCEL IpSpoofing 导入模板
|
||||
* @author dell
|
||||
*
|
||||
*/
|
||||
public class IpSpoofingTemplate extends IpAllTemplate{
|
||||
|
||||
private String userRegion1;
|
||||
private String userRegion2;
|
||||
|
||||
@ExcelField(title="spoofing",dictType="SPOOFING_IP_TYPE",align=2,sort=3)
|
||||
public String getUserRegion1() {
|
||||
return userRegion1;
|
||||
}
|
||||
public void setUserRegion1(String userRegion1) {
|
||||
this.userRegion1 = userRegion1;
|
||||
}
|
||||
|
||||
@ExcelField(title="With",align=2,sort=4)
|
||||
public String getUserRegion2() {
|
||||
return userRegion2;
|
||||
}
|
||||
public void setUserRegion2(String userRegion2) {
|
||||
this.userRegion2 = userRegion2;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -30,6 +30,7 @@ public class IpWhitelistTemplate extends BasicTemplate{
|
||||
private String destPort;
|
||||
private Integer protocol;
|
||||
private Integer direction;
|
||||
private Integer doLog;
|
||||
|
||||
@ExcelField(title="config_describe",align=2,sort=1)
|
||||
public String getCfgDesc() {
|
||||
@@ -84,4 +85,12 @@ public class IpWhitelistTemplate extends BasicTemplate{
|
||||
this.direction = direction;
|
||||
}
|
||||
|
||||
@ExcelField(title="do_log",dictType="DO_LOG",align=2,sort=2)
|
||||
public Integer getDoLog() {
|
||||
return doLog;
|
||||
}
|
||||
public void setDoLog(Integer doLog) {
|
||||
this.doLog = doLog;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
package com.nis.domain.configuration.template;
|
||||
|
||||
import com.nis.util.excel.ExcelField;
|
||||
|
||||
/**
|
||||
* @Description: excel导入字符串类配置
|
||||
*/
|
||||
public class StringAllNotDoLogTemplate extends BasicTemplate{
|
||||
private String cfgDesc;
|
||||
|
||||
private String cfgKeywords;
|
||||
private Integer matchMethod ;
|
||||
private Integer isHex;
|
||||
private Integer isCaseInsenstive;
|
||||
|
||||
@ExcelField(title="config_describe",align=2,sort=1)
|
||||
public String getCfgDesc() {
|
||||
return cfgDesc;
|
||||
}
|
||||
public void setCfgDesc(String cfgDesc) {
|
||||
this.cfgDesc = cfgDesc;
|
||||
}
|
||||
@ExcelField(title="key_word",sort=11)
|
||||
public String getCfgKeywords() {
|
||||
return cfgKeywords;
|
||||
}
|
||||
public void setCfgKeywords(String cfgKeywords) {
|
||||
this.cfgKeywords = cfgKeywords;
|
||||
}
|
||||
@ExcelField(title="match_method",dictType="MATCH_METHOD",sort=13)
|
||||
public Integer getMatchMethod() {
|
||||
return matchMethod;
|
||||
}
|
||||
public void setMatchMethod(Integer matchMethod) {
|
||||
this.matchMethod = matchMethod;
|
||||
}
|
||||
@ExcelField(title="is_hex",dictType="IS_HEX",sort=14)
|
||||
public Integer getIsHex() {
|
||||
return isHex;
|
||||
}
|
||||
public void setIsHex(Integer isHex) {
|
||||
this.isHex = isHex;
|
||||
}
|
||||
@ExcelField(title="is_case_insenstive",dictType="CASE_INSENSTIVE",sort=15)
|
||||
public Integer getIsCaseInsenstive() {
|
||||
return isCaseInsenstive;
|
||||
}
|
||||
public void setIsCaseInsenstive(Integer isCaseInsenstive) {
|
||||
this.isCaseInsenstive = isCaseInsenstive;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -20,6 +20,7 @@ public class StringAllTemplate extends BasicTemplate{
|
||||
private Integer matchMethod ;
|
||||
private Integer isHex;
|
||||
private Integer isCaseInsenstive;
|
||||
private Integer doLog;
|
||||
|
||||
@ExcelField(title="config_describe",align=2,sort=1)
|
||||
public String getCfgDesc() {
|
||||
@@ -56,4 +57,12 @@ public class StringAllTemplate extends BasicTemplate{
|
||||
public void setIsCaseInsenstive(Integer isCaseInsenstive) {
|
||||
this.isCaseInsenstive = isCaseInsenstive;
|
||||
}
|
||||
|
||||
@ExcelField(title="do_log",dictType="DO_LOG",align=2,sort=2)
|
||||
public Integer getDoLog() {
|
||||
return doLog;
|
||||
}
|
||||
public void setDoLog(Integer doLog) {
|
||||
this.doLog = doLog;
|
||||
}
|
||||
}
|
||||
|
||||
131
src/main/java/com/nis/domain/log/NtcSslRecordLog.java
Normal file
131
src/main/java/com/nis/domain/log/NtcSslRecordLog.java
Normal file
@@ -0,0 +1,131 @@
|
||||
package com.nis.domain.log;
|
||||
|
||||
import com.nis.util.excel.ExcelField;
|
||||
|
||||
public class NtcSslRecordLog extends BaseLogEntity<NtcSslRecordLog> {
|
||||
|
||||
private static final long serialVersionUID = 533266057780162781L;
|
||||
|
||||
// @ExcelField(title = "log_id", sort = 8)
|
||||
private String logId;
|
||||
|
||||
@ExcelField(title = "version", sort = 8)
|
||||
private String version;// 版本号
|
||||
|
||||
@ExcelField(title = "SNI", sort = 9)
|
||||
private String sni;// SNI
|
||||
|
||||
@ExcelField(title = "SAN", sort = 10)
|
||||
private String san;// SAN
|
||||
|
||||
@ExcelField(title = "CN", sort = 11)
|
||||
private String cn;// CN
|
||||
|
||||
// @ExcelField(title = "individual_cert_file", sort = 12)
|
||||
private String individualCertFile;
|
||||
|
||||
// @ExcelField(title = "middle_cert_file", sort = 13)
|
||||
private String middleCertFile;
|
||||
|
||||
// @ExcelField(title = "root_cert_file", sort = 14)
|
||||
private String rootCertFile;
|
||||
|
||||
// @ExcelField(title = "chain_cert_file", sort = 15)
|
||||
private String chainCertFile;
|
||||
|
||||
public String getLogId() {
|
||||
return logId;
|
||||
}
|
||||
|
||||
public void setLogId(String logId) {
|
||||
this.logId = logId;
|
||||
}
|
||||
|
||||
public String getVersion() {
|
||||
return version;
|
||||
}
|
||||
|
||||
public void setVersion(String version) {
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public String getSni() {
|
||||
return sni;
|
||||
}
|
||||
|
||||
public void setSni(String sni) {
|
||||
this.sni = sni;
|
||||
}
|
||||
|
||||
public String getSan() {
|
||||
return san;
|
||||
}
|
||||
|
||||
public void setSan(String san) {
|
||||
this.san = san;
|
||||
}
|
||||
|
||||
public String getCn() {
|
||||
return cn;
|
||||
}
|
||||
|
||||
public void setCn(String cn) {
|
||||
this.cn = cn;
|
||||
}
|
||||
|
||||
public String getIndividualCertFile() {
|
||||
return individualCertFile;
|
||||
}
|
||||
|
||||
public void setIndividualCertFile(String individualCertFile) {
|
||||
this.individualCertFile = individualCertFile;
|
||||
}
|
||||
|
||||
public String getMiddleCertFile() {
|
||||
return middleCertFile;
|
||||
}
|
||||
|
||||
public void setMiddleCertFile(String middleCertFile) {
|
||||
this.middleCertFile = middleCertFile;
|
||||
}
|
||||
|
||||
public String getRootCertFile() {
|
||||
return rootCertFile;
|
||||
}
|
||||
|
||||
public void setRootCertFile(String rootCertFile) {
|
||||
this.rootCertFile = rootCertFile;
|
||||
}
|
||||
|
||||
public String getChainCertFile() {
|
||||
return chainCertFile;
|
||||
}
|
||||
|
||||
public void setChainCertFile(String chainCertFile) {
|
||||
this.chainCertFile = chainCertFile;
|
||||
}
|
||||
|
||||
public static long getSerialversionuid() {
|
||||
return serialVersionUID;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "NtcSslRecordLog [logId=" + logId + ", version=" + version + ", sni=" + sni + ", san=" + san + ", cn="
|
||||
+ cn + ", individualCertFile=" + individualCertFile + ", middleCertFile=" + middleCertFile
|
||||
+ ", rootCertFile=" + rootCertFile + ", chainCertFile=" + chainCertFile + ", cfgId=" + cfgId
|
||||
+ ", foundTime=" + foundTime + ", recvTime=" + recvTime + ", transProto=" + transProto + ", addrType="
|
||||
+ addrType + ", dIp=" + dIp + ", sIp=" + sIp + ", dPort=" + dPort + ", sPort=" + sPort + ", service="
|
||||
+ service + ", entranceId=" + entranceId + ", deviceId=" + deviceId + ", direction=" + direction
|
||||
+ ", streamDir=" + streamDir + ", capIp=" + capIp + ", addrList=" + addrList + ", serverLocate="
|
||||
+ serverLocate + ", clientLocate=" + clientLocate + ", sAsn=" + sAsn + ", dAsn=" + dAsn
|
||||
+ ", sSubscribeId=" + sSubscribeId + ", dSubscribeId=" + dSubscribeId + ", sceneFile=" + sceneFile
|
||||
+ ", functionId=" + functionId + ", action=" + action + ", date=" + date + ", seltype=" + seltype
|
||||
+ ", searchFoundStartTime=" + searchFoundStartTime + ", searchFoundEndTime=" + searchFoundEndTime
|
||||
+ ", isLogTotalSearch=" + isLogTotalSearch + ", orderBy=" + orderBy + ", encapType=" + encapType
|
||||
+ ", linkId=" + linkId + ", innerSmac=" + innerSmac + ", innerDmac=" + innerDmac + ", id=" + id
|
||||
+ ", currentUser=" + currentUser + ", page=" + page + ", pageLog=" + pageLog + ", sqlMap=" + sqlMap
|
||||
+ ", isNewRecord=" + isNewRecord + ", isFilterAction=" + isFilterAction + "]";
|
||||
}
|
||||
|
||||
}
|
||||
@@ -44,7 +44,7 @@ public class GroupReuseAddBean implements Serializable{
|
||||
@Expose
|
||||
private Integer opAction;
|
||||
@Expose
|
||||
@SerializedName("groupReuseList")
|
||||
@SerializedName("commonGroupList")
|
||||
private List<GroupReuseCfg> groupReuseCfgList;
|
||||
|
||||
public String getVersion() {
|
||||
|
||||
@@ -14,7 +14,7 @@ import com.nis.domain.maat.MaatCfg.StringCfg;
|
||||
*
|
||||
*/
|
||||
public class GroupReuseCfg implements Serializable {
|
||||
@Expose
|
||||
/*@Expose
|
||||
@SerializedName("service")
|
||||
private Integer serviceId;
|
||||
public Integer getServiceId() {
|
||||
@@ -23,7 +23,7 @@ public class GroupReuseCfg implements Serializable {
|
||||
public void setServiceId(Integer serviceId) {
|
||||
this.serviceId = serviceId;
|
||||
}
|
||||
/**
|
||||
*/ /**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1830956100866313836L;
|
||||
|
||||
@@ -95,6 +95,8 @@ public class MaatCfg implements Serializable {
|
||||
@Expose
|
||||
@SerializedName("ipClientRangeList")
|
||||
private List<IpCfg> areaIpRegionList;
|
||||
@Expose
|
||||
private List<GroupCfg> keepGroupList;
|
||||
|
||||
public static class GroupCfg{
|
||||
@Expose
|
||||
@@ -104,6 +106,8 @@ public class MaatCfg implements Serializable {
|
||||
@Expose
|
||||
private Integer isValid;
|
||||
@Expose
|
||||
private Integer isCommonGroup;
|
||||
@Expose
|
||||
@SerializedName("opTime")
|
||||
private Date auditTime;
|
||||
public Integer getGroupId() {
|
||||
@@ -130,7 +134,12 @@ public class MaatCfg implements Serializable {
|
||||
public void setAuditTime(Date auditTime) {
|
||||
this.auditTime = auditTime;
|
||||
}
|
||||
|
||||
public Integer getIsCommonGroup() {
|
||||
return isCommonGroup;
|
||||
}
|
||||
public void setIsCommonGroup(Integer isCommonGroup) {
|
||||
this.isCommonGroup = isCommonGroup;
|
||||
}
|
||||
}
|
||||
public static class StringCfg{
|
||||
@Expose
|
||||
@@ -679,6 +688,13 @@ public class MaatCfg implements Serializable {
|
||||
public void setRequestId(Integer requestId) {
|
||||
this.requestId = requestId;
|
||||
}
|
||||
|
||||
public List<GroupCfg> getKeepGroupList() {
|
||||
return keepGroupList;
|
||||
}
|
||||
public void setKeepGroupList(List<GroupCfg> keepGroupList) {
|
||||
this.keepGroupList = keepGroupList;
|
||||
}
|
||||
public void initDefaultValue() {
|
||||
this.doLog=Constants.MAAT_CFG_DOLOG_DEFAULT;
|
||||
// this.doBlackList=Constants.MAAT_CFG_DOLOG_DOBLACKLIST_DEFAULT;
|
||||
|
||||
@@ -23,6 +23,21 @@ public class ConfigGroupInfo implements Serializable{
|
||||
@ExcelField(title="cfg_id",sort=301)
|
||||
private Integer compileId;
|
||||
private Long asnId;
|
||||
private Integer isAuditAll; //是否有策略选择了此公共组下发所有;
|
||||
private Integer isUsed; //是否有策略选择了此公共组;
|
||||
|
||||
public Integer getIsUsed() {
|
||||
return isUsed;
|
||||
}
|
||||
public void setIsUsed(Integer isUsed) {
|
||||
this.isUsed = isUsed;
|
||||
}
|
||||
public Integer getIsAuditAll() {
|
||||
return isAuditAll;
|
||||
}
|
||||
public void setIsAuditAll(Integer isAuditAll) {
|
||||
this.isAuditAll = isAuditAll;
|
||||
}
|
||||
|
||||
public Long getAsnId() {
|
||||
return asnId;
|
||||
|
||||
@@ -130,9 +130,7 @@ public class ExcelCsv {
|
||||
Map<String, List<String>> commentMap=new HashMap<String, List<String>>();
|
||||
for (String title : titleList) {
|
||||
String noExportField=noExportMap.get(title);
|
||||
if(noExportField.contains("do_log")){
|
||||
noExportField=",do_blacklist,"+noExportField;
|
||||
}
|
||||
noExportField=",do_blacklist,"+noExportField;
|
||||
List<Object[]> annotationList = Lists.newArrayList();
|
||||
List<Field> list=new ArrayList<Field>();
|
||||
// Get annotation field
|
||||
|
||||
@@ -143,6 +143,16 @@ public class ExportExcel {
|
||||
String defaultValue="";
|
||||
int index=0;
|
||||
String[] titleInfo=new String[3];
|
||||
|
||||
// Rule Name
|
||||
if("config_describe".equals(headerStr)) {
|
||||
commentStr=commentStr+msgProp.getProperty("rule_desc_tip")+":\n";
|
||||
index++;
|
||||
//1、非空
|
||||
commentStr=commentStr+"▶"+msgProp.getProperty("required")+"\n";
|
||||
index++;
|
||||
}
|
||||
|
||||
//p2p_hash_type
|
||||
if("p2p_hash_type".equals(headerStr)){
|
||||
commentStr="";
|
||||
@@ -403,13 +413,17 @@ public class ExportExcel {
|
||||
if("bps_threadshold".equals(headerStr)){
|
||||
commentStr=commentStr+msgProp.getProperty("rule_desc_tip")+":\n";
|
||||
index++;
|
||||
commentStr=commentStr+msgProp.getProperty("input_integer")+"\n";
|
||||
commentStr=commentStr+"▶"+msgProp.getProperty("input_integer")+"\n";
|
||||
index++;
|
||||
commentStr=commentStr+"▶"+msgProp.getProperty("min_value")+"1000000\n";
|
||||
index++;
|
||||
}
|
||||
if("pps_threadshold".equals(headerStr)){
|
||||
commentStr=commentStr+msgProp.getProperty("rule_desc_tip")+":\n";
|
||||
index++;
|
||||
commentStr=commentStr+msgProp.getProperty("input_integer")+"\n";
|
||||
commentStr=commentStr+"▶"+msgProp.getProperty("input_integer")+"\n";
|
||||
index++;
|
||||
commentStr=commentStr+"▶"+msgProp.getProperty("min_value")+"1000\n";
|
||||
index++;
|
||||
}
|
||||
if("group".equals(headerStr)) {
|
||||
@@ -490,6 +504,70 @@ public class ExportExcel {
|
||||
index++;
|
||||
}
|
||||
|
||||
// doLog
|
||||
if("do_log".equals(headerStr)) {
|
||||
commentStr="";
|
||||
List<SysDataDictionaryItem> dict=DictUtils.getDictList("DO_LOG");
|
||||
if(dict !=null && dict.size()>0){
|
||||
if(StringUtil.isEmpty(service.getConfigDoLog())){
|
||||
headerStr="";
|
||||
commentStr="";
|
||||
}else{
|
||||
String configDoLog = service.getConfigDoLog();
|
||||
String doLogOption = configDoLog.substring(configDoLog.indexOf(";"), configDoLog.lastIndexOf(";"));
|
||||
for (SysDataDictionaryItem sysDataDictionaryItem : dict) {
|
||||
String itemCode = sysDataDictionaryItem.getItemCode();
|
||||
if(doLogOption.contains(itemCode)) {
|
||||
commentStr=commentStr+itemCode+"("+msgProp.getProperty(sysDataDictionaryItem.getItemValue(),sysDataDictionaryItem.getItemValue())+")\n";
|
||||
index++;
|
||||
}
|
||||
}
|
||||
defaultValue = configDoLog.substring(configDoLog.lastIndexOf(";")+1);
|
||||
}
|
||||
}
|
||||
commentStr=msgProp.getProperty("select")+":\n"+commentStr;
|
||||
index++;
|
||||
commentStr=commentStr+"\n"+msgProp.getProperty("rule_desc_tip")+":\n";
|
||||
index++;
|
||||
if(!StringUtil.isEmpty(defaultValue)){
|
||||
//1、默认值说明
|
||||
commentStr=commentStr+"▶"+msgProp.getProperty("default_value")+":"+defaultValue+"\n";
|
||||
index++;
|
||||
index++;
|
||||
}
|
||||
}
|
||||
|
||||
/** Ip Spoofing **/
|
||||
if("spoofing".equals(headerStr) && (region.getFunctionId().equals(214))){
|
||||
commentStr="";
|
||||
List<SysDataDictionaryItem> dict=DictUtils.getDictList("SPOOFING_IP_TYPE");
|
||||
if(dict !=null && dict.size()>0){
|
||||
for (SysDataDictionaryItem sysDataDictionaryItem : dict) {
|
||||
commentStr=commentStr+sysDataDictionaryItem.getItemCode()+"("+msgProp.getProperty(sysDataDictionaryItem.getItemValue(),sysDataDictionaryItem.getItemValue())+")\n";
|
||||
index++;
|
||||
}
|
||||
defaultValue=dict.get(0).getItemCode();
|
||||
}
|
||||
commentStr=msgProp.getProperty("select")+":\n"+commentStr;
|
||||
index++;
|
||||
index++;
|
||||
commentStr=commentStr+"\n"+msgProp.getProperty("rule_desc_tip")+":\n";
|
||||
index++;
|
||||
if(!StringUtil.isEmpty(defaultValue)){
|
||||
//1、默认值说明
|
||||
commentStr=commentStr+"▶"+msgProp.getProperty("default_value")+":"+defaultValue+"\n";
|
||||
index++;
|
||||
index++;
|
||||
}
|
||||
}
|
||||
if(("With".equals(headerStr)) && (region.getFunctionId().equals(214))){
|
||||
commentStr=commentStr+msgProp.getProperty("rule_desc_tip")+":\n";
|
||||
index++;
|
||||
//1、非空
|
||||
commentStr=commentStr+"▶"+msgProp.getProperty("required")+"\n";
|
||||
index++;
|
||||
}
|
||||
|
||||
if(region.getRegionType().equals(1)){//IP配置
|
||||
//ip配置需要导入的信息:srcIp srcPort destIp destPort Protocol Direction
|
||||
//确定需要导入的srcIp srcPort destIp destPort信息
|
||||
@@ -1035,6 +1113,7 @@ public class ExportExcel {
|
||||
if(StringUtil.isEmpty(defaultValue)){
|
||||
defaultValue="0";
|
||||
}
|
||||
defaultValue = region.getFunctionId().equals(301)?"1":defaultValue;
|
||||
}
|
||||
/*}*/
|
||||
/*if(StringUtil.isEmpty(commentStr)){
|
||||
@@ -1260,7 +1339,11 @@ public class ExportExcel {
|
||||
commentStr=commentStr+msgProp.getProperty("rule_desc_tip")+":\n";
|
||||
index++;
|
||||
//2、默认值说明
|
||||
commentStr=commentStr+"▶"+msgProp.getProperty("default_value")+":0\n";
|
||||
if(region.getDictId().equals(159)) { // P2P文件标识配置
|
||||
commentStr=commentStr+"▶"+msgProp.getProperty("default_value")+":1\n";
|
||||
}else {
|
||||
commentStr=commentStr+"▶"+msgProp.getProperty("default_value")+":0\n";
|
||||
}
|
||||
index++;
|
||||
}
|
||||
}
|
||||
@@ -1290,10 +1373,19 @@ public class ExportExcel {
|
||||
}
|
||||
}else{
|
||||
for (SysDataDictionaryItem sysDataDictionaryItem : isCaseSenstive) {
|
||||
if(sysDataDictionaryItem.getItemCode().equals("1")){
|
||||
commentStr=commentStr+sysDataDictionaryItem.getItemCode()+"("+msgProp.getProperty(sysDataDictionaryItem.getItemValue())+")"+"\n";
|
||||
list.add(sysDataDictionaryItem.getItemCode());
|
||||
index++;
|
||||
if(region.getDictId().equals(159)) { // P2P文件标识配置
|
||||
if(sysDataDictionaryItem.getItemCode().equals("0")){
|
||||
commentStr=commentStr+sysDataDictionaryItem.getItemCode()+"("+msgProp.getProperty(sysDataDictionaryItem.getItemValue())+")"+"\n";
|
||||
list.add(sysDataDictionaryItem.getItemCode());
|
||||
index++;
|
||||
}
|
||||
}else {
|
||||
if(sysDataDictionaryItem.getItemCode().equals("1")){
|
||||
commentStr=commentStr+sysDataDictionaryItem.getItemCode()+"("+msgProp.getProperty(sysDataDictionaryItem.getItemValue())+")"+"\n";
|
||||
list.add(sysDataDictionaryItem.getItemCode());
|
||||
index++;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2161,8 +2253,8 @@ public class ExportExcel {
|
||||
}
|
||||
}
|
||||
// If is dict, get dict label
|
||||
String valStr=val==null?"":val.toString();
|
||||
if (StringUtils.isNotBlank(ef.dictType())){
|
||||
String valStr=val==null?"":val.toString();
|
||||
if("type".equals(ef.dictType()) || "attribute".equals(ef.dictType())
|
||||
|| "label".equals(ef.dictType())){
|
||||
// Get basic info
|
||||
@@ -2175,6 +2267,16 @@ public class ExportExcel {
|
||||
}
|
||||
|
||||
}
|
||||
if(ef.title().equals("whether_area_block")&&!StringUtil.isEmpty(val)){
|
||||
Integer whetherAreaBlock=Integer.parseInt(valStr);
|
||||
if(whetherAreaBlock.equals(0)){
|
||||
val = msgProp.getProperty("all","all");
|
||||
}else if(whetherAreaBlock.equals(1)){
|
||||
val = msgProp.getProperty("selective","selective");
|
||||
}else{
|
||||
val ="";
|
||||
}
|
||||
}
|
||||
if(ef.title().equals("is_hex") && !StringUtil.isEmpty(val)){
|
||||
Integer isHex=Integer.parseInt(val.toString());
|
||||
if(isHex.equals(0) || isHex.equals(2)){
|
||||
@@ -2350,9 +2452,7 @@ public class ExportExcel {
|
||||
Map<String, List<String>> commentMap=new HashMap<String, List<String>>();
|
||||
for (String title : titleList) {
|
||||
String noExportField=noExportMap.get(title);
|
||||
if(noExportField.contains("do_log")){
|
||||
noExportField=",do_blacklist,"+noExportField;
|
||||
}
|
||||
noExportField=",do_blacklist,"+noExportField;
|
||||
List<Object[]> annotationList = Lists.newArrayList();
|
||||
List<Field> list=new ArrayList<Field>();
|
||||
// Get annotation field
|
||||
|
||||
@@ -19,6 +19,7 @@ import com.beust.jcommander.internal.Sets;
|
||||
import com.nis.domain.FunctionRegionDict;
|
||||
import com.nis.domain.FunctionServiceDict;
|
||||
import com.nis.domain.SysDataDictionaryItem;
|
||||
import com.nis.domain.configuration.BaseStringCfg;
|
||||
import com.nis.domain.configuration.ComplexkeywordCfg;
|
||||
import com.nis.domain.configuration.DnsResStrategy;
|
||||
import com.nis.util.Constants;
|
||||
@@ -101,7 +102,10 @@ public class CheckComplexStringFormatThread implements Callable<String>{
|
||||
if(baseStringCfg.getCfgKeywords().length() < 4 || baseStringCfg.getCfgKeywords().length() > 1024){
|
||||
errInfo.append(prop.getProperty("key_word")+prop.getProperty("length_error")+" "+String.format(prop.getProperty("min_length")+":4,"+prop.getProperty("max_length")+":1024") + ";");
|
||||
}
|
||||
|
||||
|
||||
// doLog属性检验
|
||||
this.validDoLog(baseStringCfg,errInfo);
|
||||
|
||||
if (regionDict.getRegionType().equals(3)) {
|
||||
if (regionDict.getFunctionId().equals(7)) {
|
||||
Long dnsStrategyId = baseStringCfg.getDnsStrategyId();
|
||||
@@ -438,4 +442,28 @@ public class CheckComplexStringFormatThread implements Callable<String>{
|
||||
logger.warn("validate complexString data finish,cost:"+(end-start));
|
||||
return stringList;
|
||||
}
|
||||
|
||||
/**
|
||||
* doLog属性校验
|
||||
* @param baseStringCfg
|
||||
* @param errInfo
|
||||
*/
|
||||
public void validDoLog(ComplexkeywordCfg baseStringCfg, StringBuffer errInfo) {
|
||||
|
||||
String configDoLog = serviceDict.getConfigDoLog();
|
||||
if(StringUtils.isNotBlank(configDoLog)) {
|
||||
String defaultValue = configDoLog.substring(configDoLog.lastIndexOf(";")+1);
|
||||
String doLogOption = configDoLog.substring(configDoLog.indexOf(";")+1, configDoLog.lastIndexOf(";"));
|
||||
if(baseStringCfg.getDoLog() == null) {
|
||||
baseStringCfg.setDoLog(Integer.parseInt(defaultValue));
|
||||
}
|
||||
Integer doLog = baseStringCfg.getDoLog();
|
||||
if(!doLogOption.contains(doLog+"")) {
|
||||
errInfo.append(
|
||||
String.format(prop.getProperty("is_incorrect"), prop.getProperty("do_log"))
|
||||
+ ";");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -123,6 +123,14 @@ public class CheckIpFormatThread implements Callable<String>{
|
||||
// doLog属性检验
|
||||
this.validDoLog(baseIpCfg,errInfo);
|
||||
|
||||
if(regionDict.getFunctionId().equals(200)) {
|
||||
if(!serviceDict.getAction().equals(1)) {
|
||||
baseIpCfg.setDoLog(0);
|
||||
}
|
||||
}
|
||||
// doLog属性检验
|
||||
this.validDoLog(baseIpCfg,errInfo);
|
||||
|
||||
// 特殊字段验证
|
||||
// packet ip ratelimit
|
||||
if (serviceDict!=null&&serviceDict.getFunctionId().intValue() == 5 && serviceDict.getAction().intValue() == 64) {
|
||||
|
||||
@@ -20,6 +20,7 @@ import com.nis.domain.FunctionRegionDict;
|
||||
import com.nis.domain.FunctionServiceDict;
|
||||
import com.nis.domain.SysDataDictionaryItem;
|
||||
import com.nis.domain.configuration.BaseStringCfg;
|
||||
import com.nis.domain.configuration.IpPortCfg;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.DictUtils;
|
||||
|
||||
@@ -97,6 +98,14 @@ public class CheckStringFormatThread implements Callable<String>{
|
||||
errInfo.append(prop.getProperty("config_describe")+prop.getProperty("length_error")+" "+String.format(prop.getProperty("max_length")+":128") + ";");
|
||||
}
|
||||
|
||||
if(regionDict.getFunctionId().equals(200)) {
|
||||
if(!serviceDict.getAction().equals(1)) {
|
||||
baseStringCfg.setDoLog(0);
|
||||
}
|
||||
}
|
||||
// doLog属性检验
|
||||
this.validDoLog(baseStringCfg,errInfo);
|
||||
|
||||
if (regionDict.getRegionType().equals(2)) {
|
||||
if (regionDict.getFunctionId().equals(510) && "p2p_hash".equals(regionDict.getConfigServiceType())) {
|
||||
String userRegion1 = baseStringCfg.getUserRegion1();
|
||||
@@ -491,4 +500,28 @@ public class CheckStringFormatThread implements Callable<String>{
|
||||
logger.warn("validate stringCfg data finish,cost:"+(end-start));
|
||||
return stringList;
|
||||
}
|
||||
|
||||
/**
|
||||
* doLog属性校验
|
||||
* @param baseStringCfg
|
||||
* @param errInfo
|
||||
*/
|
||||
public void validDoLog(BaseStringCfg baseStringCfg, StringBuffer errInfo) {
|
||||
|
||||
String configDoLog = serviceDict.getConfigDoLog();
|
||||
if(StringUtils.isNotBlank(configDoLog)) {
|
||||
String defaultValue = configDoLog.substring(configDoLog.lastIndexOf(";")+1);
|
||||
String doLogOption = configDoLog.substring(configDoLog.indexOf(";")+1, configDoLog.lastIndexOf(";"));
|
||||
if(baseStringCfg.getDoLog() == null) {
|
||||
baseStringCfg.setDoLog(Integer.parseInt(defaultValue));
|
||||
}
|
||||
Integer doLog = baseStringCfg.getDoLog();
|
||||
if(!doLogOption.contains(doLog+"")) {
|
||||
errInfo.append(
|
||||
String.format(prop.getProperty("is_incorrect"), prop.getProperty("do_log"))
|
||||
+ ";");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ public class DeleteAsnIpTread implements Callable<Throwable> {
|
||||
while(!asnNos.isEmpty()) {
|
||||
asnNos.drainTo(asnNoList,5);
|
||||
for(Long asnNo:asnNoList) {
|
||||
AsnGroupInfo configGroupInfo=AsnCacheUtils.get(asnNo);
|
||||
AsnGroupInfo configGroupInfo=null;//AsnCacheUtils.get(asnNo);
|
||||
if(configGroupInfo==null) {
|
||||
configGroupInfo=new AsnGroupInfo();
|
||||
configGroupInfo.setAsnId(asnNo);
|
||||
@@ -85,7 +85,7 @@ public class DeleteAsnIpTread implements Callable<Throwable> {
|
||||
}
|
||||
sb.deleteCharAt(sb.toString().lastIndexOf(","));
|
||||
asnIpCfgDao.delete(sb.toString());
|
||||
new AsnIpCfgService().asnIPRegionSendToMaat(listPage, Constants.VALID_NO);
|
||||
new AsnIpCfgService().asnIPRegionSendToMaat(listPage, Constants.VALID_NO,1);
|
||||
transactionManager.commit(status);
|
||||
listPage.clear();
|
||||
} catch (Throwable e) {
|
||||
|
||||
@@ -112,7 +112,7 @@ public class SaveAsnIpThread implements Callable<Throwable>{
|
||||
_cfg.setAsnIpGroup(asnNoMaps.get(1).get(Long.parseLong(_cfg.getUserRegion1())));
|
||||
}else {
|
||||
// ConfigGroupInfo info=asnIpCfgService.getConfigGroupInfoByAsnNo(Long.parseLong(_cfg.getUserRegion1()));
|
||||
AsnGroupInfo info=AsnCacheUtils.get(Long.parseLong(_cfg.getUserRegion1()));
|
||||
AsnGroupInfo info=null;//AsnCacheUtils.get(Long.parseLong(_cfg.getUserRegion1()));
|
||||
if(info==null) {
|
||||
info=new AsnGroupInfo();
|
||||
info.setAsnId(Long.parseLong(_cfg.getUserRegion1()));
|
||||
@@ -166,7 +166,7 @@ public class SaveAsnIpThread implements Callable<Throwable>{
|
||||
this.save(cfgs);
|
||||
// splitAndSend(toAddRegionAsnIpCfgs,Constants.VALID_YES);
|
||||
if(toAddRegionAsnIpCfgs.size()>0) {
|
||||
new AsnIpCfgService().asnIPRegionSendToMaat(toAddRegionAsnIpCfgs,Constants.VALID_YES);
|
||||
new AsnIpCfgService().asnIPRegionSendToMaat(toAddRegionAsnIpCfgs,Constants.VALID_YES,1);
|
||||
}
|
||||
cfgs.clear();
|
||||
toAddRegionAsnIpCfgs.clear();
|
||||
|
||||
@@ -66,6 +66,33 @@ public class ClientUtil {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param connTimeOut 连接超时时间
|
||||
* @param readTimeOut 读取超时时间
|
||||
*/
|
||||
public static void initClient(Integer connTimeOut,Integer readTimeOut){
|
||||
try{
|
||||
if(client==null){
|
||||
PoolingHttpClientConnectionManager pcm = new PoolingHttpClientConnectionManager();
|
||||
pcm.setDefaultSocketConfig( SocketConfig.custom(). setSoTimeout(Constants.POOLCM_SOCKET_TIMEOUT). build());
|
||||
pcm.setMaxTotal(Constants.HTTP_MAX_CONNECTION); pcm.setDefaultMaxPerRoute(Constants.DEFAULT_MAX_PERROUTE);
|
||||
|
||||
ClientConfig clientConfig = new ClientConfig();
|
||||
clientConfig.property(ClientProperties.CONNECT_TIMEOUT, connTimeOut);//连接超时时间
|
||||
clientConfig.property(ClientProperties.READ_TIMEOUT, readTimeOut);//读取超时时间
|
||||
clientConfig.property(ApacheClientProperties.CONNECTION_MANAGER, pcm);
|
||||
clientConfig.register(ClientRequestHeaderFilter.class);//请求过滤器,自动添加header信息
|
||||
clientConfig.register(JacksonFeature.class);//json支持
|
||||
clientConfig.register(MultiPartFeature.class);//文件上传支持
|
||||
client = ClientBuilder.newClient(clientConfig);
|
||||
logger.info("客户端初始化成功");
|
||||
}
|
||||
|
||||
}catch (Exception e) {
|
||||
logger.error("初始化客户端失败,请检查证书是否正确!",e);
|
||||
System.exit(1);//程序退出
|
||||
}
|
||||
}
|
||||
/**
|
||||
*path 以https://或http:// 开始不做处理,否则在path前加上 Constants.BASE_URL + Constants.VERSION
|
||||
* @param path
|
||||
|
||||
@@ -73,6 +73,7 @@ import com.nis.domain.configuration.DnsResStrategy;
|
||||
import com.nis.domain.configuration.FileDigestCfg;
|
||||
import com.nis.domain.configuration.IpPortCfg;
|
||||
import com.nis.domain.configuration.PxyObjKeyring;
|
||||
import com.nis.domain.configuration.PxyObjSpoofingIpPool;
|
||||
import com.nis.domain.configuration.PxyObjTrustedCaCert;
|
||||
import com.nis.domain.configuration.PxyObjTrustedCaCrl;
|
||||
import com.nis.domain.configuration.RequestInfo;
|
||||
@@ -80,6 +81,7 @@ import com.nis.domain.configuration.StringCfgTemplate;
|
||||
import com.nis.domain.configuration.template.AppDomainTemplate;
|
||||
import com.nis.domain.configuration.template.AppPayloadTemplate;
|
||||
import com.nis.domain.configuration.template.AsnIpTemplate;
|
||||
import com.nis.domain.configuration.template.ComplexStringAllNotDoLogTemplate;
|
||||
import com.nis.domain.configuration.template.ComplexStringAllTemplate;
|
||||
import com.nis.domain.configuration.template.DdosIpTemplate;
|
||||
import com.nis.domain.configuration.template.DnsComplexStringTemplate;
|
||||
@@ -98,12 +100,16 @@ import com.nis.domain.configuration.template.HttpsRejectTemplate;
|
||||
import com.nis.domain.configuration.template.HttpsReplaceComplexTemplate;
|
||||
import com.nis.domain.configuration.template.HttpsReplaceIpTemplate;
|
||||
import com.nis.domain.configuration.template.HttpsReplaceTemplate;
|
||||
import com.nis.domain.configuration.template.IpAllNotDoLogTemplate;
|
||||
import com.nis.domain.configuration.template.IpAllTemplate;
|
||||
import com.nis.domain.configuration.template.IpCfgTemplate;
|
||||
import com.nis.domain.configuration.template.IpPayloadTemplate;
|
||||
import com.nis.domain.configuration.template.IpRateLimitTemplate;
|
||||
import com.nis.domain.configuration.template.IpSpoofingTemplate;
|
||||
import com.nis.domain.configuration.template.IpWhitelistTemplate;
|
||||
import com.nis.domain.configuration.template.P2pHashStringTemplate;
|
||||
import com.nis.domain.configuration.template.P2pIpTemplate;
|
||||
import com.nis.domain.configuration.template.StringAllNotDoLogTemplate;
|
||||
import com.nis.domain.configuration.template.StringAllTemplate;
|
||||
import com.nis.domain.configuration.template.TopicWebsiteTemplate;
|
||||
import com.nis.domain.log.BaseLogEntity;
|
||||
@@ -114,7 +120,9 @@ 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.domain.report.NtcPzReport;
|
||||
import com.nis.domain.maat.ToMaatBean;
|
||||
import com.nis.domain.maat.ToMaatResult;
|
||||
import com.nis.domain.specific.ConfigGroupInfo;
|
||||
import com.nis.domain.specific.SpecificServiceCfg;
|
||||
import com.nis.exceptions.MaatConvertException;
|
||||
@@ -137,6 +145,7 @@ import com.nis.util.excel.thread.CheckDnsResStrategyFormatThread;
|
||||
import com.nis.util.excel.thread.CheckIpFormatThread;
|
||||
import com.nis.util.excel.thread.CheckStringFormatThread;
|
||||
import com.nis.util.excel.thread.CheckTopicWebsiteFormatThread;
|
||||
import com.nis.web.dao.configuration.PxyObjSpoofingIpPoolDao;
|
||||
import com.nis.web.security.UserUtils;
|
||||
import com.nis.web.service.ArchiveServcie;
|
||||
import com.nis.web.service.AreaService;
|
||||
@@ -146,6 +155,7 @@ import com.nis.web.service.LogService;
|
||||
import com.nis.web.service.MenuService;
|
||||
import com.nis.web.service.OfficeService;
|
||||
import com.nis.web.service.RoleService;
|
||||
import com.nis.web.service.SpringContextHolder;
|
||||
import com.nis.web.service.SystemService;
|
||||
import com.nis.web.service.UserService;
|
||||
import com.nis.web.service.basics.AsnGroupInfoService;
|
||||
@@ -193,6 +203,9 @@ import com.nis.web.service.specific.SpecificServiceHostCfgService;
|
||||
import com.nis.web.service.systemService.ServiceConfigInfoService;
|
||||
|
||||
import jersey.repackaged.com.google.common.collect.Maps;
|
||||
import net.sf.json.JSONArray;
|
||||
import net.sf.json.JSONObject;
|
||||
import net.sf.json.JsonConfig;
|
||||
|
||||
public class BaseController {
|
||||
|
||||
@@ -1371,6 +1384,9 @@ public class BaseController {
|
||||
BlockingQueue<IpRateLimitTemplate> list = ei.getDataList(IpRateLimitTemplate.class
|
||||
);
|
||||
ipPortCfgs=this.checkIpCfgMulity(errTip,serviceDict, regionDict,null,asnGroupInfos, list);
|
||||
} else if(serviceDict!=null&&serviceDict.getAction().equals(32)) {
|
||||
BlockingQueue<IpAllNotDoLogTemplate> list = ei.getDataList(IpAllNotDoLogTemplate.class );
|
||||
ipPortCfgs=this.checkIpCfgMulity(errTip,serviceDict, regionDict, null,asnGroupInfos, list);
|
||||
} else {
|
||||
BlockingQueue<IpAllTemplate> list = ei.getDataList(IpAllTemplate.class );
|
||||
ipPortCfgs=this.checkIpCfgMulity(errTip,serviceDict, regionDict, null,asnGroupInfos, list);
|
||||
@@ -1410,8 +1426,22 @@ public class BaseController {
|
||||
}else if(regionDict.getFunctionId().equals(209)){// HTTP(s)替换
|
||||
BlockingQueue<HttpsReplaceIpTemplate> list = ei.getDataList(HttpsReplaceIpTemplate.class );
|
||||
ipPortCfgs=this.checkIpCfgMulity(errTip,serviceDict, regionDict, null,asnGroupInfos, list);
|
||||
}else if(regionDict.getFunctionId().equals(200) && serviceDict.getAction().equals(64)) {// 拦截策略(限速)
|
||||
BlockingQueue<IpRateLimitTemplate> list = ei.getDataList(IpRateLimitTemplate.class );
|
||||
}else if(regionDict.getFunctionId().equals(211)){// HTTP(s)白名单
|
||||
BlockingQueue<IpAllNotDoLogTemplate> list = ei.getDataList(IpAllNotDoLogTemplate.class );
|
||||
ipPortCfgs=this.checkIpCfgMulity(errTip,serviceDict, regionDict, null,asnGroupInfos, list);
|
||||
}else if(regionDict.getFunctionId().equals(200)) {// 拦截策略
|
||||
if(serviceDict.getAction().equals(64)) {
|
||||
BlockingQueue<IpRateLimitTemplate> list = ei.getDataList(IpRateLimitTemplate.class );
|
||||
ipPortCfgs=this.checkIpCfgMulity(errTip,serviceDict, regionDict,null,asnGroupInfos, list);
|
||||
}else {
|
||||
BlockingQueue<IpAllNotDoLogTemplate> list = ei.getDataList(IpAllNotDoLogTemplate.class );
|
||||
ipPortCfgs=this.checkIpCfgMulity(errTip,serviceDict, regionDict,null,asnGroupInfos, list);
|
||||
}
|
||||
}else if(regionDict.getFunctionId().equals(3)) { // IP白名单
|
||||
BlockingQueue<IpWhitelistTemplate> list = ei.getDataList(IpWhitelistTemplate.class );
|
||||
ipPortCfgs=this.checkIpCfgMulity(errTip,serviceDict, regionDict,null,asnGroupInfos, list);
|
||||
}else if(regionDict.getFunctionId().equals(214)) { // IpSpoofing
|
||||
BlockingQueue<IpSpoofingTemplate> list = ei.getDataList(IpSpoofingTemplate.class );
|
||||
ipPortCfgs=this.checkIpCfgMulity(errTip,serviceDict, regionDict,null,asnGroupInfos, list);
|
||||
}else {
|
||||
BlockingQueue<IpAllTemplate> list = ei.getDataList(IpAllTemplate.class );
|
||||
@@ -1447,6 +1477,9 @@ public class BaseController {
|
||||
}else if(regionDict.getFunctionId().equals(209)){// HTTP(s)替换
|
||||
BlockingQueue<HttpsReplaceTemplate> list = ei.getDataList(HttpsReplaceTemplate.class);
|
||||
stringCfgs=this.checkStringCfgMulity(errTip,serviceDict, regionDict, list);
|
||||
}else if(regionDict.getFunctionId().equals(211)){// HTTP(s)白名单
|
||||
BlockingQueue<StringAllNotDoLogTemplate> list = ei.getDataList(StringAllNotDoLogTemplate.class);
|
||||
stringCfgs=this.checkStringCfgMulity(errTip,serviceDict, regionDict, list);
|
||||
}else if(regionDict.getFunctionId().equals(560)){// 主题网站
|
||||
BlockingQueue<TopicWebsiteTemplate> list = ei.getDataList(TopicWebsiteTemplate.class);
|
||||
appTopicDomainCfgs=this.checkTopicWebsiteCfgMulity(errTip,serviceDict, regionDict, list);
|
||||
@@ -1469,6 +1502,9 @@ public class BaseController {
|
||||
} else if(regionDict.getFunctionId().equals(209)){// HTTP(s)替换
|
||||
BlockingQueue<HttpsReplaceComplexTemplate> list = ei.getDataList(HttpsReplaceComplexTemplate.class);
|
||||
complexkeywordCfgs = this.checkComplexStringCfgMulity(errTip,serviceDict, regionDict, list);
|
||||
} else if(regionDict.getFunctionId().equals(211)){// HTTP(s)白名单
|
||||
BlockingQueue<ComplexStringAllNotDoLogTemplate> list = ei.getDataList(ComplexStringAllNotDoLogTemplate.class);
|
||||
complexkeywordCfgs = this.checkComplexStringCfgMulity(errTip,serviceDict, regionDict, list);
|
||||
} else if(regionDict.getFunctionId().equals(563)){// APP Payload
|
||||
BlockingQueue<AppPayloadTemplate> list = ei.getDataList(AppPayloadTemplate.class);
|
||||
appComplexFeatureCfgs = this.checkAppComplexFeatureStringCfgMulity(errTip,serviceDict, regionDict, list);
|
||||
@@ -1599,6 +1635,145 @@ public class BaseController {
|
||||
_ipPortCfgs.clear();
|
||||
asnIpCfgs.clear();
|
||||
}
|
||||
}else if(regionDict.getFunctionId().intValue()==214) { // IpSpoofing
|
||||
List<BaseIpCfg> _ipPortCfgs=Lists.newArrayList(Constants.MAAT_JSON_SEND_SIZE);
|
||||
while(!ipPortCfgs.isEmpty()) {
|
||||
ipPortCfgs.drainTo(_ipPortCfgs, Constants.MAAT_JSON_SEND_SIZE);
|
||||
List<Integer> compileIds=Lists.newArrayList();
|
||||
List<Integer> spoofingPoolIds=Lists.newArrayList();
|
||||
List<Integer> regionIds=Lists.newArrayList();
|
||||
List<Integer> groupIds=Lists.newArrayList();
|
||||
List<Integer> numRegionGroupIds=Lists.newArrayList();
|
||||
List<Integer> numRegionRegionIds=Lists.newArrayList();
|
||||
List<PxyObjSpoofingIpPool> spoofingPools = new ArrayList<PxyObjSpoofingIpPool>();
|
||||
PxyObjSpoofingIpPoolDao pxyObjSpoofingIpPoolDao = SpringContextHolder.getBean(PxyObjSpoofingIpPoolDao.class);
|
||||
PxyObjSpoofingIpPoolService pxyObjSpoofingIpPoolService = SpringContextHolder.getBean(PxyObjSpoofingIpPoolService.class);
|
||||
try {
|
||||
compileIds = ConfigServiceUtil.getId(1,_ipPortCfgs.size());
|
||||
spoofingPoolIds = ConfigServiceUtil.getId(1,_ipPortCfgs.size());
|
||||
if(isSend.equals("1")) {
|
||||
groupIds = ConfigServiceUtil.getId(2,_ipPortCfgs.size());
|
||||
regionIds = ConfigServiceUtil.getId(3,_ipPortCfgs.size());
|
||||
//需要获取数值域的id
|
||||
if(serviceDict!=null&&serviceDict.getProtocolId()!=null&&serviceDict.getProtocolId()>0) {
|
||||
numRegionGroupIds = ConfigServiceUtil.getId(2,_ipPortCfgs.size());
|
||||
numRegionRegionIds = ConfigServiceUtil.getId(3,_ipPortCfgs.size());
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.info("获取编译ID出错");
|
||||
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>:"+e.getMessage());
|
||||
}
|
||||
|
||||
int ind=0;
|
||||
for (BaseIpCfg cfg : _ipPortCfgs) {
|
||||
cfg.setAction(serviceDict==null?null:serviceDict.getAction());
|
||||
cfg.setCfgRegionCode(regionDict.getConfigRegionCode());
|
||||
cfg.setCfgType(regionDict.getConfigRegionValue());
|
||||
cfg.setCreateTime(date);
|
||||
cfg.setCreatorId(UserUtils.getUser().getId());
|
||||
cfg.setFunctionId(regionDict.getFunctionId());
|
||||
if(isSend.equals("1")) {
|
||||
cfg.setIsAudit(Constants.AUDIT_YES);
|
||||
cfg.setIsValid(Constants.VALID_YES);
|
||||
cfg.setAuditorId(UserUtils.getUser().getId());
|
||||
cfg.setAuditTime(date);
|
||||
if(groupIds!=null&&groupIds.size()==_ipPortCfgs.size()) {
|
||||
cfg.setGroupId(groupIds.get(ind));
|
||||
}
|
||||
if(regionIds!=null&®ionIds.size()==_ipPortCfgs.size()) {
|
||||
cfg.setRegionId(regionIds.get(ind));
|
||||
}
|
||||
if(serviceDict!=null&&serviceDict.getProtocolId()!=null) {
|
||||
if(numRegionGroupIds!=null&&numRegionGroupIds.size()==_ipPortCfgs.size()) {
|
||||
cfg.setNumberRegionGroupId(numRegionGroupIds.get(ind));
|
||||
}
|
||||
if(numRegionRegionIds!=null&&numRegionRegionIds.size()==_ipPortCfgs.size()) {
|
||||
cfg.setNumberRegionRegionId(numRegionRegionIds.get(ind));
|
||||
}
|
||||
}
|
||||
}else {
|
||||
cfg.setIsAudit(Constants.AUDIT_NOT_YET);
|
||||
cfg.setIsValid(Constants.VALID_NO);
|
||||
}
|
||||
cfg.setIsAreaEffective(0);
|
||||
cfg.setLable("0");
|
||||
cfg.setRequestId(StringUtil.isEmpty(requestId) ? 0 : requestId);
|
||||
cfg.setAttribute(attribute);
|
||||
cfg.setClassify(classify);
|
||||
cfg.setServiceId(serviceDict==null?null:serviceDict.getServiceId());
|
||||
cfg.setTableName("ip_port_cfg");
|
||||
if(compileIds.size()==_ipPortCfgs.size()) {
|
||||
cfg.setCompileId(compileIds.get(ind));
|
||||
}
|
||||
|
||||
// 保存IP仿冒池
|
||||
PxyObjSpoofingIpPool spoofingPool = new PxyObjSpoofingIpPool();
|
||||
spoofingPool.setIpType(4);//ipv4
|
||||
spoofingPool.setIpAddress(cfg.getUserRegion2());//仿冒IP
|
||||
spoofingPool.setProtocol(0);
|
||||
if("dnat".equals(cfg.getUserRegion1().toLowerCase())){//spoofing server ip->dnat
|
||||
spoofingPool.setDirection(1);
|
||||
}else{
|
||||
spoofingPool.setDirection(2);//spoofing client ip->snat
|
||||
}
|
||||
spoofingPool.setPort("0");
|
||||
spoofingPool.setUserRegion("0");
|
||||
spoofingPool.setLocation(0);
|
||||
spoofingPool.setServiceId(642);
|
||||
spoofingPool.setAreaEffectiveIds("0");
|
||||
spoofingPool.setIsAreaEffective(0);
|
||||
spoofingPool.setCreateTime(date);
|
||||
spoofingPool.setCreatorId(UserUtils.getUser().getId());
|
||||
if(spoofingPoolIds.size()==_ipPortCfgs.size()) {
|
||||
spoofingPool.setCompileId(spoofingPoolIds.get(ind));
|
||||
}
|
||||
spoofingPool.setAction(1);
|
||||
spoofingPool.setFunctionId(666);
|
||||
spoofingPool.setRequestId(0);
|
||||
if(isSend.equals("1")) {
|
||||
spoofingPool.setIsAudit(Constants.AUDIT_YES);
|
||||
spoofingPool.setIsValid(Constants.VALID_YES);
|
||||
spoofingPool.setAuditorId(UserUtils.getUser().getId());
|
||||
spoofingPool.setAuditTime(date);
|
||||
|
||||
}else {
|
||||
spoofingPool.setIsValid(Constants.VALID_NO);
|
||||
spoofingPool.setIsAudit(Constants.AUDIT_NOT_YET);
|
||||
|
||||
}
|
||||
pxyObjSpoofingIpPoolDao.insert(spoofingPool);//保存仿冒IP池配置
|
||||
cfg.setUserRegion3(String.valueOf(spoofingPool.getCfgId()));//将仿冒IP池配置ID作为策略组ID
|
||||
|
||||
if(isSend.equals("1")) {
|
||||
PxyObjSpoofingIpPool pool=new PxyObjSpoofingIpPool();
|
||||
pool.setCfgId(Long.valueOf(cfg.getUserRegion3()));
|
||||
pool.setIsValid(cfg.getIsValid());
|
||||
pool.setIsAudit(cfg.getIsAudit());
|
||||
pool.setAuditorId(UserUtils.getUser().getId());
|
||||
pool.setAuditTime(date);
|
||||
pxyObjSpoofingIpPoolDao.update(pool);
|
||||
|
||||
spoofingPool.setAreaEffectiveIds("0");
|
||||
spoofingPool.setGroupId(spoofingPool.getCfgId().intValue());
|
||||
spoofingPools.add(spoofingPool);
|
||||
}
|
||||
|
||||
CfgIndexInfo cfgIndexInfo = new CfgIndexInfo();
|
||||
BeanUtils.copyProperties(cfg, cfgIndexInfo,new String[] {"cfgId"});
|
||||
cfgIndexInfos.add(cfgIndexInfo);
|
||||
|
||||
ind++;
|
||||
}
|
||||
if(isSend.equals("1") && spoofingPools.size()>0) {
|
||||
pxyObjSpoofingIpPoolService.auditSpoofingPool(spoofingPools);
|
||||
}
|
||||
ipCfgService.saveAndSend(regionDict, serviceDict, specificServiceCfg, _ipPortCfgs, cfgIndexInfos, appPolicyCfgs,appFeatureIndexs,asnNoMaps,isSend.equals("1"));
|
||||
cfgIndexInfos.clear();
|
||||
appPolicyCfgs.clear();
|
||||
_ipPortCfgs.clear();
|
||||
}
|
||||
}else {
|
||||
List<BaseIpCfg> _ipPortCfgs=Lists.newArrayList(Constants.MAAT_JSON_SEND_SIZE);
|
||||
while(!ipPortCfgs.isEmpty()) {
|
||||
@@ -1643,7 +1818,7 @@ public class BaseController {
|
||||
cfg.setCfgType(regionDict.getConfigRegionValue());
|
||||
cfg.setCreateTime(date);
|
||||
cfg.setCreatorId(UserUtils.getUser().getId());
|
||||
cfg.setDoLog(2);
|
||||
//cfg.setDoLog(2);
|
||||
cfg.setFunctionId(regionDict.getFunctionId());
|
||||
if(isSend.equals("1")) {
|
||||
cfg.setIsAudit(Constants.AUDIT_YES);
|
||||
@@ -1793,7 +1968,7 @@ public class BaseController {
|
||||
cfg.setCfgType(regionDict.getConfigRegionValue());
|
||||
cfg.setCreateTime(date);
|
||||
cfg.setCreatorId(UserUtils.getUser().getId());
|
||||
cfg.setDoLog(2);
|
||||
//cfg.setDoLog(2);
|
||||
cfg.setFunctionId(regionDict.getFunctionId());
|
||||
if(isSend.equals("1")) {
|
||||
cfg.setIsAudit(Constants.AUDIT_YES);
|
||||
@@ -1889,7 +2064,7 @@ public class BaseController {
|
||||
cfg.setCfgType(regionDict.getConfigRegionValue());
|
||||
cfg.setCreateTime(date);
|
||||
cfg.setCreatorId(UserUtils.getUser().getId());
|
||||
cfg.setDoLog(2);
|
||||
//cfg.setDoLog(2);
|
||||
cfg.setFunctionId(regionDict.getFunctionId());
|
||||
if(isSend.equals("1")) {
|
||||
cfg.setIsAudit(Constants.AUDIT_YES);
|
||||
@@ -1945,12 +2120,12 @@ public class BaseController {
|
||||
for (ComplexkeywordCfg cfg : _complexkeywordCfgs) {
|
||||
cfg.setAction(serviceDict.getAction());
|
||||
/*cfg.setAuditorId(UserUtils.getUser().getId());
|
||||
cfg.setAuditTime(date);*/
|
||||
cfg.setAuditTime(date);*/
|
||||
cfg.setCfgRegionCode(regionDict.getConfigRegionCode());
|
||||
cfg.setCfgType(regionDict.getConfigRegionValue());
|
||||
cfg.setCreateTime(date);
|
||||
cfg.setCreatorId(UserUtils.getUser().getId());
|
||||
cfg.setDoLog(2);
|
||||
//cfg.setDoLog(2);
|
||||
cfg.setFunctionId(regionDict.getFunctionId());
|
||||
if(isSend.equals("1")) {
|
||||
cfg.setIsAudit(Constants.AUDIT_YES);
|
||||
@@ -2235,6 +2410,8 @@ public class BaseController {
|
||||
if (regionDict.getFunctionId().equals(5)) {
|
||||
if (serviceDict!=null&&serviceDict.getAction().equals(64)) {
|
||||
ei.loadInitParams(IpRateLimitTemplate.class, msgProp, regionDict, serviceDict);
|
||||
} else if(serviceDict!=null&&serviceDict.getAction().equals(32)) {
|
||||
ei.loadInitParams(IpAllNotDoLogTemplate.class, msgProp, regionDict, serviceDict);
|
||||
} else {
|
||||
ei.loadInitParams(IpAllTemplate.class, msgProp, regionDict, serviceDict);
|
||||
}
|
||||
@@ -2257,8 +2434,18 @@ public class BaseController {
|
||||
ei.loadInitParams(HttpsRedirectIpTemplate.class, this.getMsgProp(), regionDict, serviceDict);
|
||||
} else if(regionDict.getFunctionId().equals(209)){// HTTP(s)替换
|
||||
ei.loadInitParams(HttpsReplaceIpTemplate.class, this.getMsgProp(), regionDict, serviceDict);
|
||||
} else if(regionDict.getFunctionId().equals(200) && serviceDict.getAction().intValue()==64){// 拦截策略(限速)
|
||||
ei.loadInitParams(IpRateLimitTemplate.class, msgProp, regionDict, serviceDict);
|
||||
} else if(regionDict.getFunctionId().equals(211)){// HTTP(s)白名单
|
||||
ei.loadInitParams(IpAllNotDoLogTemplate.class, this.getMsgProp(), regionDict, serviceDict);
|
||||
} else if(regionDict.getFunctionId().equals(200)){// 拦截策略
|
||||
if(serviceDict.getAction().intValue()==64) {
|
||||
ei.loadInitParams(IpRateLimitTemplate.class, msgProp, regionDict, serviceDict);
|
||||
}else {
|
||||
ei.loadInitParams(IpAllNotDoLogTemplate.class, msgProp, regionDict, serviceDict);
|
||||
}
|
||||
} else if(regionDict.getFunctionId().equals(3)) { // IP白名单
|
||||
ei.loadInitParams(IpWhitelistTemplate.class, msgProp, regionDict, serviceDict);
|
||||
} else if(regionDict.getFunctionId().equals(214)) { // IpSpoofing
|
||||
ei.loadInitParams(IpSpoofingTemplate.class, msgProp, regionDict, serviceDict);
|
||||
} else {
|
||||
ei.loadInitParams(IpAllTemplate.class, msgProp, regionDict, serviceDict);
|
||||
}
|
||||
@@ -2282,6 +2469,8 @@ public class BaseController {
|
||||
ei.loadInitParams(HttpsRedirectTemplate.class, this.getMsgProp(), regionDict, serviceDict);
|
||||
}else if(regionDict.getFunctionId().equals(209)){// HTTP(s)替换
|
||||
ei.loadInitParams(HttpsReplaceTemplate.class, this.getMsgProp(), regionDict, serviceDict);
|
||||
}else if(regionDict.getFunctionId().equals(211)){// HTTP(s)白名单
|
||||
ei.loadInitParams(StringAllNotDoLogTemplate.class, this.getMsgProp(), regionDict, serviceDict);
|
||||
}else if(regionDict.getFunctionId().equals(560)){// 主题网站
|
||||
ei.loadInitParams(TopicWebsiteTemplate.class, this.getMsgProp(), regionDict, serviceDict);
|
||||
}else {
|
||||
@@ -2297,6 +2486,8 @@ public class BaseController {
|
||||
ei.loadInitParams(HttpsRedirectComplexTemplate.class, this.getMsgProp(), regionDict, serviceDict);
|
||||
}else if(regionDict.getFunctionId().equals(209)){// HTTP(s)替换
|
||||
ei.loadInitParams(HttpsReplaceComplexTemplate.class, this.getMsgProp(), regionDict, serviceDict);
|
||||
}else if(regionDict.getFunctionId().equals(211)){// HTTP(s)白名单
|
||||
ei.loadInitParams(ComplexStringAllNotDoLogTemplate.class, this.getMsgProp(), regionDict, serviceDict);
|
||||
}else if(regionDict.getFunctionId().equals(563)) {// APP Payload
|
||||
ei.loadInitParams(AppPayloadTemplate.class, this.getMsgProp(), regionDict, serviceDict);
|
||||
} else {
|
||||
@@ -3226,5 +3417,91 @@ public class BaseController {
|
||||
|
||||
return hasData;
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过serviceIds 和 compileIds获取日志总量
|
||||
* */
|
||||
public List<Map<String, Object>> getLogTotal(Long endTime,String serviceIds,String compileIds){
|
||||
List<Map<String, Object>> dataList=new ArrayList<>();
|
||||
SimpleDateFormat sdf=new SimpleDateFormat(Constants.SEARCH_DATEFORMAT);
|
||||
Date endDate=null;
|
||||
Date startDate=null;
|
||||
if(endTime!=null) {
|
||||
if(StringUtils.isNotBlank(Constants.LOG_TIME_START)) {
|
||||
try {
|
||||
startDate=sdf.parse(Constants.LOG_TIME_START);
|
||||
if(StringUtils.isNotBlank(Constants.LOG_TIME_END)) {
|
||||
endDate=sdf.parse(Constants.LOG_TIME_END);
|
||||
}else {
|
||||
endDate=new Date(endTime);
|
||||
}
|
||||
} catch (ParseException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}else {
|
||||
Calendar cal=Calendar.getInstance();
|
||||
//分钟间隔
|
||||
int interval=Constants.LOG_TIME_RANGE/1000/60;
|
||||
cal.setTimeInMillis(endTime);
|
||||
if(interval<60) {//5分钟
|
||||
cal.set(Calendar.SECOND, 0);
|
||||
int minute=cal.get(Calendar.MINUTE);
|
||||
cal.set(Calendar.MINUTE,minute/interval*interval);
|
||||
}else {//1小时
|
||||
cal.set(Calendar.SECOND, 0);
|
||||
cal.set(Calendar.MINUTE, 0);
|
||||
}
|
||||
Calendar endTimeCal=Calendar.getInstance();
|
||||
endTimeCal.setTimeInMillis(cal.getTimeInMillis());
|
||||
//endTimeCal.add(Calendar.SECOND, -1);
|
||||
endDate=endTimeCal.getTime();
|
||||
cal.add(Calendar.MINUTE, -interval);
|
||||
startDate=cal.getTime();
|
||||
}
|
||||
logger.info("log search end time:"+sdf.format(endDate));
|
||||
logger.info("log search start time:"+sdf.format(startDate));
|
||||
}
|
||||
List<NtcPzReport> list=null;
|
||||
try {
|
||||
//调用带有超时时间的方法,设置与页面ajax获取total log 超时时间保持一致 页面设置在pzlog.js
|
||||
String json=ConfigServiceUtil.getReport(Constants.BUSINESSTYPE_CONFIG, compileIds, serviceIds, startDate==null?null:sdf.format(startDate), endDate==null?null:sdf.format(endDate),Constants.CLIENT_CONNECT_TIMEOUT,10000);
|
||||
list=getList(json);
|
||||
} catch (Exception e) {
|
||||
logger.error("获取日志总量失败!",e);
|
||||
|
||||
}
|
||||
|
||||
String[] idArr=compileIds.split(",");
|
||||
for(String id:idArr) {
|
||||
Map<String, Object> data=new HashMap<String, Object>();
|
||||
data.put("compileId", id);
|
||||
Long sum=(long) 0;
|
||||
if(list!=null&&(list.size()>0)){
|
||||
for(NtcPzReport report:list) {
|
||||
if(Long.valueOf(id).longValue() == report.getCfgId().longValue()){
|
||||
sum=report.getSum().longValue();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
data.put("sum",sum);
|
||||
dataList.add(data);
|
||||
}
|
||||
return dataList;
|
||||
}
|
||||
public <E> List<E> getList(String json){
|
||||
JSONObject obj=JSONObject.fromObject(json);
|
||||
if(obj.containsKey("data")) {
|
||||
JSONObject data= obj.getJSONObject("data");
|
||||
if(data.containsKey("list")) {
|
||||
Object list=data.get("list");
|
||||
JSONArray array=JSONArray.fromObject(list);
|
||||
List<E> result=JSONArray.toList(array, new NtcPzReport(),new JsonConfig());
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
return new ArrayList<E>();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
package com.nis.web.controller.basics;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
@@ -97,6 +102,8 @@ public class AsnGroupController extends BaseController {
|
||||
public String delete(RedirectAttributes redirectAttributes,String ids,String asnIds) {
|
||||
try {
|
||||
asnGroupInfoService.delete(ids,asnIds);
|
||||
//TODO 查询本次删除的所有asnOrg组中是否存在asn 没有is_used=0的asn,如果存在则需要将整个组删除
|
||||
|
||||
addMessage(redirectAttributes,"success","delete_success");
|
||||
} catch (Exception e) {
|
||||
logger.error("删除失败",e);
|
||||
@@ -178,5 +185,38 @@ public class AsnGroupController extends BaseController {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 异步获取ASN组织信息
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value="ajaxGetAsnOrg")
|
||||
@ResponseBody
|
||||
public List ajaxGetAsnOrg( ConfigGroupInfo orgGroup,Model model){
|
||||
List<ConfigGroupInfo> orgaList=new ArrayList<>();
|
||||
try {
|
||||
orgaList=configGroupInfoService.findAllList(orgGroup);
|
||||
} catch (Exception e) {
|
||||
logger.error("异步获取ASN组织信息失败",e);
|
||||
return orgaList;
|
||||
}
|
||||
return orgaList;
|
||||
}
|
||||
/**
|
||||
* 异步获取ASN组织信息
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value="ajaxGetAsnNo")
|
||||
@ResponseBody
|
||||
public List ajaxGetAsnNo(AsnGroupInfo asnGroup,Model model){
|
||||
List<AsnGroupInfo> orgaList=new ArrayList<>();
|
||||
try {
|
||||
orgaList=asnGroupInfoService.findAsnGroupList(asnGroup);
|
||||
} catch (Exception e) {
|
||||
logger.error("异步获取ASN NO信息失败",e);
|
||||
return orgaList;
|
||||
}
|
||||
return orgaList;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -134,7 +134,20 @@ public class AsnIpController extends BaseController{
|
||||
asnIpMap.put(Long.parseLong(asnIpCfg.getUserRegion1()), _asnIps);
|
||||
}
|
||||
}
|
||||
asnIpCfgService.auditIpBatch(asnIpMap,isValid);
|
||||
/********************每次下发一个组的region,保证事物********************/
|
||||
for (Long asnId : asnIpMap.keySet()) {
|
||||
try {
|
||||
asnIpCfgService.auditIpBatch(asnIpMap.get(asnId),asnId,isValid);
|
||||
} catch (Exception e) {
|
||||
logger.error("配置下发失败:",e);
|
||||
if(e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes,"error", "request_service_failed");
|
||||
}else {
|
||||
addMessage(redirectAttributes,"error", "audit_failed");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}/*else {
|
||||
//条件下所有配置审核
|
||||
Page<AsnIpCfg> searchPage=new Page<AsnIpCfg>(request,response,"a");
|
||||
|
||||
@@ -4,8 +4,10 @@ import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
@@ -1706,13 +1708,37 @@ public class AppCfgController extends BaseController {
|
||||
Page<AppPolicyCfg> page = appCfgService.findAppPolicyList(pageInfo, entity);
|
||||
ipLists = page.getList();
|
||||
}
|
||||
|
||||
List<Map<String,Object>> logTotals=new ArrayList<Map<String,Object>>();
|
||||
StringBuilder compileIds=new StringBuilder(",");
|
||||
Set<Integer> set=new HashSet<Integer>();
|
||||
for (AppPolicyCfg policy : ipLists) {
|
||||
if(policy.getIsAudit()!=0){
|
||||
set.add(policy.getServiceId());
|
||||
compileIds.append(policy.getCompileId()+",");
|
||||
}else{
|
||||
Map<String,Object> logTotal=new HashMap<String,Object>();
|
||||
logTotal.put("compileId", policy.getCompileId()+"");
|
||||
logTotal.put("sum",0L);
|
||||
logTotals.add(logTotal);
|
||||
}
|
||||
SpecificServiceCfg app = specificServiceCfgService.getBySpecServiceId(policy.getSpecServiceId());
|
||||
if (app != null) {
|
||||
policy.setSocialName(app.getSpecServiceName());
|
||||
}
|
||||
}
|
||||
StringBuilder serviceIds=new StringBuilder(",");
|
||||
for (Integer id : set) {
|
||||
serviceIds.append(id+",");
|
||||
}
|
||||
if(serviceIds.length()>1&&compileIds.length()>1){
|
||||
String serviceIdsStr=serviceIds.toString().substring(1, serviceIds.length()-1);
|
||||
String compileIdsStr=compileIds.toString().substring(1, compileIds.length()-1);
|
||||
//获取日志总量
|
||||
if(!StringUtils.isBlank(serviceIdsStr)&&!StringUtils.isBlank(compileIdsStr)){
|
||||
List<Map<String,Object>> logs = getLogTotal( null,serviceIdsStr,compileIdsStr);
|
||||
logTotals.addAll(logs);
|
||||
}
|
||||
}
|
||||
// 查找社交应用的所有有效二级特定服务
|
||||
SpecificServiceCfg second = new SpecificServiceCfg();
|
||||
for (SysDataDictionaryItem dict : DictUtils.getDictList("SPECIFIC_SERVICE_CFG_TYPE")) {
|
||||
@@ -1726,6 +1752,12 @@ public class AppCfgController extends BaseController {
|
||||
List<SpecificServiceCfg> secondList = specificServiceCfgService.findAllSpecificServiceCfg(second, null);
|
||||
// 遍历,找到匹配项后将行为设置进去
|
||||
for (AppPolicyCfg policy : ipLists) {
|
||||
for (Map<String,Object> logTotal : logTotals) {
|
||||
if(policy.getCompileId().equals(Integer.parseInt((String) logTotal.get("compileId")))){
|
||||
policy.setTotalLogs((Long)logTotal.get("sum"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (policy.getBehavCode() == null)
|
||||
continue;
|
||||
for (SpecificServiceCfg secondCfg : secondList) {
|
||||
@@ -1743,7 +1775,7 @@ public class AppCfgController extends BaseController {
|
||||
classMap.put(entity.getMenuNameCode(), AppPolicyCfg.class);
|
||||
classMap.put("NTC_IP", IpPortCfg.class);
|
||||
classMap.put("NTC_SUBSCRIBE_ID", NtcSubscribeIdCfg.class);
|
||||
String cfgIndexInfoNoExport = ",encrypted_tunnel_behavior,basic_protocol,expression_type,match_method,whether_hexbinary,group_name,userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
String cfgIndexInfoNoExport = ",do_blacklist,encrypted_tunnel_behavior,basic_protocol,expression_type,match_method,whether_hexbinary,group_name,userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
String ipPortInfoNoExport = ",do_log,action,config_describe,valid_identifier,is_audit,creator,creator"
|
||||
+ ",config_time,editor,edit_time,auditor,audit_time"
|
||||
+ ",letter,whether_area_block,classification,attribute,label"
|
||||
|
||||
@@ -1,10 +1,15 @@
|
||||
package com.nis.web.controller.configuration;
|
||||
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
@@ -24,15 +29,21 @@ import com.nis.domain.configuration.BaseStringCfg;
|
||||
import com.nis.domain.configuration.CfgIndexInfo;
|
||||
import com.nis.domain.configuration.IpPortCfg;
|
||||
import com.nis.domain.configuration.NtcSubscribeIdCfg;
|
||||
import com.nis.domain.report.NtcPzReport;
|
||||
import com.nis.domain.specific.ConfigGroupInfo;
|
||||
import com.nis.domain.specific.SpecificServiceCfg;
|
||||
import com.nis.exceptions.CallExternalProceduresException;
|
||||
import com.nis.exceptions.MaatConvertException;
|
||||
import com.nis.util.ConfigServiceUtil;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.web.controller.BaseController;
|
||||
import com.nis.web.security.UserUtils;
|
||||
|
||||
import net.sf.json.JSONArray;
|
||||
import net.sf.json.JSONObject;
|
||||
import net.sf.json.JsonConfig;
|
||||
|
||||
/**
|
||||
* 基础协议控制类
|
||||
*
|
||||
@@ -283,20 +294,46 @@ public class BasicProtocolController extends BaseController {
|
||||
Page<AppPolicyCfg> page = appCfgService.findAppPolicyList(pageInfo, entity);
|
||||
ipLists = page.getList();
|
||||
}
|
||||
|
||||
List<Map<String,Object>> logTotals=new ArrayList<Map<String,Object>>();
|
||||
StringBuilder compileIds=new StringBuilder(",");//配置ids
|
||||
Set<Integer> set=new HashSet<Integer>();//服务ids
|
||||
for (AppPolicyCfg policy : ipLists) {
|
||||
if(policy.getIsAudit()!=0){
|
||||
set.add(policy.getServiceId());
|
||||
compileIds.append(policy.getCompileId()+",");
|
||||
}else{
|
||||
Map<String,Object> logTotal=new HashMap<String,Object>();
|
||||
logTotal.put("compileId", policy.getCompileId()+"");
|
||||
logTotal.put("sum",0L);
|
||||
logTotals.add(logTotal);
|
||||
}
|
||||
SpecificServiceCfg app = specificServiceCfgService.getBySpecServiceId(policy.getSpecServiceId());
|
||||
if (app != null) {
|
||||
policy.setAppName(app.getSpecServiceName());
|
||||
}
|
||||
|
||||
}
|
||||
StringBuilder serviceIds=new StringBuilder(",");
|
||||
for (Integer id : set) {
|
||||
serviceIds.append(id+",");
|
||||
}
|
||||
if(serviceIds.length()>1&&compileIds.length()>1){
|
||||
String serviceIdsStr=serviceIds.toString().substring(1, serviceIds.length()-1);
|
||||
String compileIdsStr=compileIds.toString().substring(1, compileIds.length()-1);
|
||||
//获取日志总量
|
||||
if(!StringUtils.isBlank(serviceIdsStr)&&!StringUtils.isBlank(compileIdsStr)){
|
||||
List<Map<String,Object>> logs = getLogTotal( null,serviceIdsStr,compileIdsStr);
|
||||
logTotals.addAll(logs);
|
||||
}
|
||||
}
|
||||
titleList.add(entity.getMenuNameCode());
|
||||
titleList.add("NTC_IP");
|
||||
titleList.add("NTC_SUBSCRIBE_ID");
|
||||
classMap.put(entity.getMenuNameCode(), AppPolicyCfg.class);
|
||||
classMap.put("NTC_IP", IpPortCfg.class);
|
||||
classMap.put("NTC_SUBSCRIBE_ID", NtcSubscribeIdCfg.class);
|
||||
String cfgIndexInfoNoExport = ",encrypted_tunnel_behavior,behaviour_type,social_app,behaviour_type,expression_type,match_method,whether_hexbinary,group_name,userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
String cfgIndexInfoNoExport = ",do_blacklist,encrypted_tunnel_behavior,behaviour_type,social_app,behaviour_type,expression_type,match_method,whether_hexbinary,group_name,userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
String ipPortInfoNoExport = ",do_log,action,config_describe,valid_identifier,is_audit,creator,creator"
|
||||
+ ",config_time,editor,edit_time,auditor,audit_time"
|
||||
+ ",letter,whether_area_block,classification,attribute,label"
|
||||
@@ -326,6 +363,12 @@ public class BasicProtocolController extends BaseController {
|
||||
List<IpPortCfg> ipList = new ArrayList<IpPortCfg>();
|
||||
List<BaseStringCfg> subscribeInfoList = new ArrayList<BaseStringCfg>();
|
||||
for (AppPolicyCfg cfg : ipLists) {
|
||||
for (Map<String,Object> logTotal : logTotals) {
|
||||
if(cfg.getCompileId().equals(Integer.parseInt((String) logTotal.get("compileId")))){
|
||||
cfg.setTotalLogs((Long)logTotal.get("sum"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
AppPolicyCfg cfgIndexInfo = appCfgService.exportIpInfo(cfg);
|
||||
ipList.addAll(cfgIndexInfo.getIpPortList());
|
||||
subscribeInfoList.addAll(cfgIndexInfo.getNtcSubscribeIdCfgList());
|
||||
@@ -353,5 +396,5 @@ public class BasicProtocolController extends BaseController {
|
||||
// return "redirect:" + adminPath
|
||||
// +"/ntc/iplist/list?functionId="+entity.getFunctionId();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -3,8 +3,10 @@ package com.nis.web.controller.configuration;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
@@ -307,12 +309,37 @@ public class EncryptedTunnelBehaviorController extends BaseController {
|
||||
Page<AppPolicyCfg> page = appCfgService.findAppPolicyList(pageInfo, entity);
|
||||
ipLists = page.getList();
|
||||
}
|
||||
List<Map<String,Object>> logTotals=new ArrayList<Map<String,Object>>();
|
||||
StringBuilder compileIds=new StringBuilder(",");//配置ids
|
||||
Set<Integer> set=new HashSet<Integer>();//服务ids
|
||||
for (AppPolicyCfg policy : ipLists) {
|
||||
if(policy.getIsAudit()!=0){
|
||||
set.add(policy.getServiceId());
|
||||
compileIds.append(policy.getCompileId()+",");
|
||||
}else{
|
||||
Map<String,Object> logTotal=new HashMap<String,Object>();
|
||||
logTotal.put("compileId", policy.getCompileId()+"");
|
||||
logTotal.put("sum",0L);
|
||||
logTotals.add(logTotal);
|
||||
}
|
||||
SpecificServiceCfg app = specificServiceCfgService.getBySpecServiceId(policy.getSpecServiceId());
|
||||
if (app != null) {
|
||||
policy.setBehaviorName(app.getSpecServiceName());
|
||||
}
|
||||
}
|
||||
StringBuilder serviceIds=new StringBuilder(",");
|
||||
for (Integer id : set) {
|
||||
serviceIds.append(id+",");
|
||||
}
|
||||
if(serviceIds.length()>1&&compileIds.length()>1){
|
||||
String serviceIdsStr=serviceIds.toString().substring(1, serviceIds.length()-1);
|
||||
String compileIdsStr=compileIds.toString().substring(1, compileIds.length()-1);
|
||||
//获取日志总量
|
||||
if(!StringUtils.isBlank(serviceIdsStr)&&!StringUtils.isBlank(compileIdsStr)){
|
||||
List<Map<String,Object>> logs = getLogTotal( null,serviceIdsStr,compileIdsStr);
|
||||
logTotals.addAll(logs);
|
||||
}
|
||||
}
|
||||
// 查找社交应用的所有有效二级特定服务
|
||||
SpecificServiceCfg second = new SpecificServiceCfg();
|
||||
for (SysDataDictionaryItem dict : DictUtils.getDictList("SPECIFIC_SERVICE_CFG_TYPE")) {
|
||||
@@ -343,7 +370,7 @@ public class EncryptedTunnelBehaviorController extends BaseController {
|
||||
classMap.put(entity.getMenuNameCode(), AppPolicyCfg.class);
|
||||
classMap.put("NTC_IP", IpPortCfg.class);
|
||||
classMap.put("NTC_SUBSCRIBE_ID", NtcSubscribeIdCfg.class);
|
||||
String cfgIndexInfoNoExport = ",social_app,basic_protocol,expression_type,match_method,whether_hexbinary,group_name,userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
String cfgIndexInfoNoExport = ",do_blacklist,social_app,basic_protocol,expression_type,match_method,whether_hexbinary,group_name,userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
String ipPortInfoNoExport = ",do_log,action,config_describe,valid_identifier,is_audit,creator,creator"
|
||||
+ ",config_time,editor,edit_time,auditor,audit_time"
|
||||
+ ",letter,whether_area_block,classification,attribute,label"
|
||||
@@ -373,6 +400,12 @@ public class EncryptedTunnelBehaviorController extends BaseController {
|
||||
List<IpPortCfg> ipList = new ArrayList<IpPortCfg>();
|
||||
List<BaseStringCfg> subscribeInfoList = new ArrayList<BaseStringCfg>();
|
||||
for (AppPolicyCfg cfg : ipLists) {
|
||||
for (Map<String,Object> logTotal : logTotals) {
|
||||
if(cfg.getCompileId().equals(Integer.parseInt((String) logTotal.get("compileId")))){
|
||||
cfg.setTotalLogs((Long)logTotal.get("sum"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
AppPolicyCfg cfgIndexInfo = appCfgService.exportIpInfo(cfg);
|
||||
ipList.addAll(cfgIndexInfo.getIpPortList());
|
||||
subscribeInfoList.addAll(cfgIndexInfo.getNtcSubscribeIdCfgList());
|
||||
|
||||
@@ -1,14 +1,32 @@
|
||||
package com.nis.web.controller.configuration;
|
||||
|
||||
import java.net.URISyntaxException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.http.client.utils.URIBuilder;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||
|
||||
import com.beust.jcommander.internal.Maps;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.nis.domain.log.BaseLogEntity;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.util.httpclient.HttpClientUtil;
|
||||
import com.nis.web.controller.BaseController;
|
||||
import net.sf.json.JSONObject;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("${adminPath}/toLogSearch")
|
||||
@@ -36,4 +54,99 @@ public class LogSearchController extends BaseController{
|
||||
attr.addAttribute("isLogTotalSearch", entity.getIsLogTotalSearch());
|
||||
return "redirect:"+adminPath+logUrl;
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(value = {"logTrend"})
|
||||
public String logTrend(Model model,BaseLogEntity<Object> entity,String cfgId,String serviceId,RedirectAttributes attr, HttpServletRequest request,
|
||||
HttpServletResponse response) {
|
||||
Calendar cal = Calendar. getInstance ();
|
||||
cal.setTime(new Date());
|
||||
String now = new SimpleDateFormat( "yyyy-MM-dd HH:mm:00" ).format(cal.getTime());//获取到完整的时间
|
||||
cal.set(Calendar.HOUR_OF_DAY, cal.get(Calendar.HOUR_OF_DAY) - 1);
|
||||
String oneHoursAgo = new SimpleDateFormat( "yyyy-MM-dd HH:mm:00" ).format(cal.getTime());
|
||||
model.addAttribute("beginDate", oneHoursAgo);
|
||||
model.addAttribute("endDate", now);
|
||||
model.addAttribute("cfgId", cfgId);
|
||||
model.addAttribute("serviceId", serviceId);
|
||||
return "/cfg/logCfgTrendList";
|
||||
}
|
||||
|
||||
@RequestMapping(value="actionLogTrend")
|
||||
@ResponseBody
|
||||
public List actionTrans(String cfgId,String beginDate,String endDate,String serviceId){
|
||||
Map<String, Object> fromJsonList = new HashMap<String, Object>();
|
||||
List resultList = new ArrayList();
|
||||
String url = Constants.LOG_BASE_URL+Constants.NTC_PZ_REPORT;
|
||||
url=url+"?searchBusinessType=2&searchCfgId="+cfgId;
|
||||
if(!StringUtil.isEmpty(serviceId)){
|
||||
url=url+"&searchService="+serviceId;
|
||||
}
|
||||
try {
|
||||
//String url="http://192.168.10.204:9999/galaxy-service/service/log/v1/ntcPzReport?searchBusinessType=2&searchReportStartTime=2018-12-29%2000:00:00&searchReportEndTime=2018-12-30%2000:00:00";
|
||||
url = urlAddDate(url,beginDate,endDate);
|
||||
//String json=ConfigServiceUtil.getReport(url.toString(), null);
|
||||
String json = HttpClientUtil.get(url);
|
||||
Gson gson = new GsonBuilder().create();
|
||||
fromJsonList = gson.fromJson(json, new TypeToken<Map>(){}.getType());
|
||||
fromJsonList=(Map<String, Object>) fromJsonList.get("data");
|
||||
logger.debug("日志趋势数据"+fromJsonList);
|
||||
JSONObject obj=JSONObject.fromObject(json);
|
||||
resultList =getList(fromJsonList);
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
resultList.add(Maps.newHashMap("error","request_service_failed"));
|
||||
}
|
||||
return resultList;
|
||||
}
|
||||
|
||||
public List getList(Map<String, Object> dateList){
|
||||
List<Map<String,Object>> resultList = new ArrayList<Map<String,Object>>();
|
||||
try {
|
||||
List<Map<String, Object>> mapList=(List<Map<String, Object>>) dateList.get("list");
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
Map<String, Object> maps=new HashMap<String,Object>();
|
||||
List<Double[]> list=new ArrayList<Double[]>();
|
||||
Double total=0.0;
|
||||
for (Map<String, Object> map : mapList) {
|
||||
Double[] logs=new Double[2];
|
||||
Double sum=Double.valueOf(String.valueOf(map.get("sum")));
|
||||
Double date=Double.valueOf(sdf.parse(String.valueOf(map.get("reportTime"))).getTime());
|
||||
total+=sum;
|
||||
logs[0]=date;
|
||||
logs[1]=sum;
|
||||
list.add(logs);
|
||||
}
|
||||
maps.put("sum",total);
|
||||
maps.put("result", list);
|
||||
resultList.add(maps);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return resultList;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* url路径时间参数格式化
|
||||
* @param url
|
||||
* @param beginDate
|
||||
* @param endDate
|
||||
* @return
|
||||
* @throws URISyntaxException
|
||||
*/
|
||||
public String urlAddDate(String url,String beginDate,String endDate) throws URISyntaxException{
|
||||
if(StringUtil.isBlank(beginDate)||StringUtil.isBlank(endDate)){
|
||||
Calendar cal = Calendar. getInstance ();
|
||||
cal.setTime(new Date());
|
||||
endDate = new SimpleDateFormat( "yyyy-MM-dd HH:mm:00" ).format(cal.getTime());//获取到完整的时间
|
||||
cal.set(Calendar.HOUR_OF_DAY, cal.get(Calendar.HOUR_OF_DAY) - 1);
|
||||
beginDate = new SimpleDateFormat( "yyyy-MM-dd HH:mm:00" ).format(cal.getTime());
|
||||
}
|
||||
URIBuilder uriBuilder = new URIBuilder(url);
|
||||
uriBuilder.addParameter("searchReportStartTime",beginDate);
|
||||
uriBuilder.addParameter("searchReportEndTime",endDate);
|
||||
return uriBuilder.toString();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -194,7 +194,7 @@ public class DnsResStrategyController extends BaseController {
|
||||
}
|
||||
titleList.add(entity.getMenuNameCode());
|
||||
classMap.put(entity.getMenuNameCode(), DnsResStrategy.class);
|
||||
String cfgIndexInfoNoExport = ",cfg_id,valid_identifier,do_log,client_port,ir_type,group_name,userregion1,userregion2,userregion3,userregion4,userregion5,&config_describe:policy_name-";
|
||||
String cfgIndexInfoNoExport = ",cfg_id,do_log,client_port,ir_type,group_name,userregion1,userregion2,userregion3,userregion4,userregion5,&config_describe:policy_name-";
|
||||
|
||||
// 时间过滤
|
||||
if (entity.getSearch_create_time_start() == null && entity.getSearch_create_time_end() == null) {
|
||||
|
||||
@@ -3,8 +3,10 @@ package com.nis.web.controller.configuration.manipulation;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
@@ -159,6 +161,35 @@ public class DdosCfgController extends BaseController {
|
||||
Page<DdosIpCfg> page = ddosCfgService.findPage(pageInfo, entity);
|
||||
ipLists = page.getList();
|
||||
}
|
||||
List<Map<String,Object>> logTotals=new ArrayList<Map<String,Object>>();
|
||||
StringBuilder compileIds=new StringBuilder(",");//配置ids
|
||||
Set<Integer> set=new HashSet<Integer>();//服务ids
|
||||
for (DdosIpCfg cfg : ipLists) {
|
||||
if(cfg.getIsAudit()!=0){
|
||||
set.add(cfg.getServiceId());
|
||||
compileIds.append(cfg.getCompileId()+",");
|
||||
}else{
|
||||
Map<String,Object> logTotal=new HashMap<String,Object>();
|
||||
logTotal.put("compileId", cfg.getCompileId()+"");
|
||||
logTotal.put("sum",0L);
|
||||
logTotals.add(logTotal);
|
||||
}
|
||||
|
||||
}
|
||||
StringBuilder serviceIds=new StringBuilder(",");
|
||||
for (Integer id : set) {
|
||||
serviceIds.append(id+",");
|
||||
}
|
||||
if(serviceIds.length()>1&&compileIds.length()>1){
|
||||
String serviceIdsStr=serviceIds.toString().substring(1, serviceIds.length()-1);
|
||||
String compileIdsStr=compileIds.toString().substring(1, compileIds.length()-1);
|
||||
//获取日志总量
|
||||
if(!com.nis.util.StringUtils.isBlank(serviceIdsStr)&&!com.nis.util.StringUtils.isBlank(compileIdsStr)){
|
||||
List<Map<String,Object>> logs = getLogTotal( null,serviceIdsStr,compileIdsStr);
|
||||
logTotals.addAll(logs);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* //导出选中记录 if(!StringUtil.isEmpty(ids)){ for(String
|
||||
* id:ids.split(",")){ Long.parseLong(id); } //List<CfgIndexInfo>
|
||||
@@ -169,7 +200,7 @@ public class DdosCfgController extends BaseController {
|
||||
|
||||
titleList.add(entity.getMenuNameCode());
|
||||
classMap.put(entity.getMenuNameCode(), DdosIpCfg.class);
|
||||
String cfgIndexInfoNoExport = ",do_log,client_ip,client_port,ir_type,group_name,userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
String cfgIndexInfoNoExport = ",client_ip,client_port,ir_type,group_name,userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
|
||||
// 时间过滤
|
||||
if (entity.getSearch_create_time_start() == null && entity.getSearch_create_time_end() == null) {
|
||||
@@ -186,6 +217,15 @@ public class DdosCfgController extends BaseController {
|
||||
}
|
||||
|
||||
noExportMap.put(entity.getMenuNameCode(), cfgIndexInfoNoExport);
|
||||
|
||||
for (DdosIpCfg cfg : ipLists) {
|
||||
for (Map<String,Object> logTotal : logTotals) {
|
||||
if(cfg.getCompileId().equals(Integer.parseInt((String) logTotal.get("compileId")))){
|
||||
cfg.setTotalLogs((Long)logTotal.get("sum"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
dataMap.put(entity.getMenuNameCode(), ipLists);
|
||||
|
||||
String timeRange = initTimeMap(entity);
|
||||
|
||||
@@ -11,13 +11,16 @@ package com.nis.web.controller.configuration.manipulation;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
import java.util.Set;
|
||||
|
||||
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.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
@@ -451,6 +454,33 @@ public class IpMultiplexController extends CommonController {
|
||||
Page<IpReusePolicyCfg> page = ipMultiplexService.findPage(pageInfo,entity);
|
||||
ipLists = page.getList();
|
||||
}
|
||||
//日志总量
|
||||
List<Map<String,Object>> logTotals=new ArrayList<Map<String,Object>>();
|
||||
StringBuilder compileIds=new StringBuilder(",");//配置ids
|
||||
Set<Integer> set=new HashSet<Integer>();//服务ids
|
||||
for (IpReusePolicyCfg cfg : ipLists) {
|
||||
if(cfg.getIsAudit()!=0){
|
||||
set.add(cfg.getServiceId());
|
||||
compileIds.append(cfg.getCompileId()+",");
|
||||
}else{
|
||||
Map<String,Object> logTotal=new HashMap<String,Object>();
|
||||
logTotal.put("compileId", cfg.getCompileId()+"");
|
||||
logTotal.put("sum",0L);
|
||||
logTotals.add(logTotal);
|
||||
}
|
||||
|
||||
}
|
||||
StringBuilder serviceIds=new StringBuilder(",");
|
||||
for (Integer id : set) {
|
||||
serviceIds.append(id+",");
|
||||
}
|
||||
String serviceIdsStr=serviceIds.toString().substring(1, serviceIds.length()-1);
|
||||
String compileIdsStr=compileIds.toString().substring(1, compileIds.length()-1);
|
||||
//获取日志总量
|
||||
if(!StringUtils.isBlank(serviceIdsStr)&&!StringUtils.isBlank(compileIdsStr)){
|
||||
List<Map<String,Object>> logs = getLogTotal( null,serviceIdsStr,compileIdsStr);
|
||||
logTotals.addAll(logs);
|
||||
}
|
||||
List<IpAddrPoolCfg> addrPools = ipAddrPoolCfgService.getEffectiveAddrPool();
|
||||
for (IpReusePolicyCfg ipReusePolicyCfg : ipLists) {
|
||||
if(ipReusePolicyCfg.getAddrPoolId()!=null){
|
||||
@@ -487,6 +517,14 @@ public class IpMultiplexController extends CommonController {
|
||||
}
|
||||
|
||||
noExportMap.put(entity.getMenuNameCode(), snatNoExport);
|
||||
for (IpReusePolicyCfg cfg : ipLists) {
|
||||
for (Map<String,Object> logTotal : logTotals) {
|
||||
if(cfg.getCompileId().equals(Integer.parseInt((String) logTotal.get("compileId")))){
|
||||
cfg.setTotalLogs((Long)logTotal.get("sum"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
dataMap.put(entity.getMenuNameCode(), ipLists);
|
||||
|
||||
String timeRange = initTimeMap(entity);
|
||||
@@ -528,7 +566,34 @@ public class IpMultiplexController extends CommonController {
|
||||
Page<BaseIpCfg> page = ipMultiplexService.findPageDnat(pageInfo, entity);
|
||||
ipLists = page.getList();
|
||||
}
|
||||
|
||||
|
||||
//日志总量
|
||||
List<Map<String,Object>> logTotals=new ArrayList<Map<String,Object>>();
|
||||
StringBuilder compileIds=new StringBuilder(",");//配置ids
|
||||
Set<Integer> set=new HashSet<Integer>();//服务ids
|
||||
for (BaseIpCfg cfg : ipLists) {
|
||||
if(cfg.getIsAudit()!=0){
|
||||
set.add(cfg.getServiceId());
|
||||
compileIds.append(cfg.getCompileId()+",");
|
||||
}else{
|
||||
Map<String,Object> logTotal=new HashMap<String,Object>();
|
||||
logTotal.put("compileId", cfg.getCompileId()+"");
|
||||
logTotal.put("sum",0L);
|
||||
logTotals.add(logTotal);
|
||||
}
|
||||
|
||||
}
|
||||
StringBuilder serviceIds=new StringBuilder(",");
|
||||
for (Integer id : set) {
|
||||
serviceIds.append(id+",");
|
||||
}
|
||||
String serviceIdsStr=serviceIds.toString().substring(1, serviceIds.length()-1);
|
||||
String compileIdsStr=compileIds.toString().substring(1, compileIds.length()-1);
|
||||
//获取日志总量
|
||||
if(!StringUtils.isBlank(serviceIdsStr)&&!StringUtils.isBlank(compileIdsStr)){
|
||||
List<Map<String,Object>> logs = getLogTotal( null,serviceIdsStr,compileIdsStr);
|
||||
logTotals.addAll(logs);
|
||||
}
|
||||
titleList.add(entity.getMenuNameCode());
|
||||
classMap.put(entity.getMenuNameCode(), IpReuseDnatPolicyCfg.class);
|
||||
String snatNoExport = ",group_name,block_type,direction,client_ip,ip_type,ip_pattern,port_pattern,client_port,ir_type,do_log,whether_area_block,userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
@@ -548,6 +613,14 @@ public class IpMultiplexController extends CommonController {
|
||||
}
|
||||
|
||||
noExportMap.put(entity.getMenuNameCode(), snatNoExport);
|
||||
for (BaseIpCfg cfg : ipLists) {
|
||||
for (Map<String,Object> logTotal : logTotals) {
|
||||
if(cfg.getCompileId().equals(Integer.parseInt((String) logTotal.get("compileId")))){
|
||||
cfg.setTotalLogs((Long)logTotal.get("sum"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
dataMap.put(entity.getMenuNameCode(),ipLists);
|
||||
|
||||
String timeRange = initTimeMap(entity);
|
||||
|
||||
@@ -3,9 +3,11 @@ package com.nis.web.controller.configuration.ntc;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
@@ -934,6 +936,35 @@ public class AvContentController extends BaseController {
|
||||
Page<CfgIndexInfo> page = avContentCfgService.findPage(pageInfo, entity);
|
||||
ipLists = page.getList();
|
||||
}
|
||||
|
||||
List<Map<String,Object>> logTotals=new ArrayList<Map<String,Object>>();
|
||||
StringBuilder compileIds=new StringBuilder(",");//配置ids
|
||||
Set<Integer> set=new HashSet<Integer>();//服务ids
|
||||
for (CfgIndexInfo cfg : ipLists) {
|
||||
if(cfg.getIsAudit()!=0){
|
||||
set.add(cfg.getServiceId());
|
||||
compileIds.append(cfg.getCompileId()+",");
|
||||
}else{
|
||||
Map<String,Object> logTotal=new HashMap<String,Object>();
|
||||
logTotal.put("compileId", cfg.getCompileId()+"");
|
||||
logTotal.put("sum",0L);
|
||||
logTotals.add(logTotal);
|
||||
}
|
||||
|
||||
}
|
||||
StringBuilder serviceIds=new StringBuilder(",");
|
||||
for (Integer id : set) {
|
||||
serviceIds.append(id+",");
|
||||
}
|
||||
if(serviceIds.length()>1&&compileIds.length()>1){
|
||||
String serviceIdsStr=serviceIds.toString().substring(1, serviceIds.length()-1);
|
||||
String compileIdsStr=compileIds.toString().substring(1, compileIds.length()-1);
|
||||
//获取日志总量
|
||||
if(!StringUtils.isBlank(serviceIdsStr)&&!StringUtils.isBlank(compileIdsStr)){
|
||||
List<Map<String,Object>> logs = getLogTotal( null,serviceIdsStr,compileIdsStr);
|
||||
logTotals.addAll(logs);
|
||||
}
|
||||
}
|
||||
titleList.add(entity.getMenuNameCode());
|
||||
titleList.add("NTC_UNIVERSAL_IP");
|
||||
titleList.add("NTC_STREAMING_MEDIA_URL");
|
||||
@@ -979,6 +1010,12 @@ public class AvContentController extends BaseController {
|
||||
List<BaseStringCfg> subscribeInfoList = new ArrayList<BaseStringCfg>();
|
||||
List<BaseStringCfg> streamurlList = new ArrayList<BaseStringCfg>();
|
||||
for (CfgIndexInfo cfg : ipLists) {
|
||||
for (Map<String,Object> logTotal : logTotals) {
|
||||
if(cfg.getCompileId().equals(Integer.parseInt((String) logTotal.get("compileId")))){
|
||||
cfg.setTotalLogs((Long)logTotal.get("sum"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
Map<String, List> maps = avContentCfgService.exportstream(cfg);
|
||||
ipList.addAll(maps.get("NTC_UNIVERSAL_IP"));
|
||||
streamurlList.addAll(maps.get("NTC_STREAMING_MEDIA_URL"));
|
||||
@@ -1032,7 +1069,35 @@ public class AvContentController extends BaseController {
|
||||
entity);
|
||||
ipLists = page.getList();
|
||||
}
|
||||
|
||||
List<Map<String,Object>> logTotals=new ArrayList<Map<String,Object>>();
|
||||
StringBuilder compileIds=new StringBuilder(",");//配置ids
|
||||
Set<Integer> set=new HashSet<Integer>();//服务ids
|
||||
for (CfgIndexInfo cfg : ipLists) {
|
||||
if(cfg.getIsAudit()!=0){
|
||||
set.add(cfg.getServiceId());
|
||||
compileIds.append(cfg.getCompileId()+",");
|
||||
}else{
|
||||
Map<String,Object> logTotal=new HashMap<String,Object>();
|
||||
logTotal.put("compileId", cfg.getCompileId()+"");
|
||||
logTotal.put("sum",0L);
|
||||
logTotals.add(logTotal);
|
||||
}
|
||||
|
||||
}
|
||||
StringBuilder serviceIds=new StringBuilder(",");
|
||||
for (Integer id : set) {
|
||||
serviceIds.append(id+",");
|
||||
}
|
||||
if(serviceIds.length()>1&&compileIds.length()>1){
|
||||
String serviceIdsStr=serviceIds.toString().substring(1, serviceIds.length()-1);
|
||||
String compileIdsStr=compileIds.toString().substring(1, compileIds.length()-1);
|
||||
//获取日志总量
|
||||
if(!StringUtils.isBlank(serviceIdsStr)&&!StringUtils.isBlank(compileIdsStr)){
|
||||
List<Map<String,Object>> logs = getLogTotal( null,serviceIdsStr,compileIdsStr);
|
||||
logTotals.addAll(logs);
|
||||
}
|
||||
}
|
||||
|
||||
titleList.add(entity.getMenuNameCode());
|
||||
titleList.add("NTC_UNIVERSAL_IP");
|
||||
titleList.add("NTC_VOIP_ACCOUNT");
|
||||
@@ -1078,6 +1143,12 @@ public class AvContentController extends BaseController {
|
||||
List<BaseStringCfg> subscribeInfoList = new ArrayList<BaseStringCfg>();
|
||||
List<BaseStringCfg> countlList = new ArrayList<BaseStringCfg>();
|
||||
for (CfgIndexInfo cfg : ipLists) {
|
||||
for (Map<String,Object> logTotal : logTotals) {
|
||||
if(cfg.getCompileId().equals(Integer.parseInt((String) logTotal.get("compileId")))){
|
||||
cfg.setTotalLogs((Long)logTotal.get("sum"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
Map<String, List> maps = avContentCfgService.exportvoip(cfg);
|
||||
ipList.addAll(maps.get("NTC_UNIVERSAL_IP"));
|
||||
countlList.addAll(maps.get("NTC_VOIP_ACCOUNT"));
|
||||
|
||||
@@ -8,9 +8,11 @@ import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
@@ -598,11 +600,41 @@ public class AvController extends BaseController {
|
||||
Page<AvFileSampleCfg> page = avCfgService.getAvFileSampleList(pageInfo, entity);
|
||||
ipLists = page.getList();
|
||||
}
|
||||
// 条件导出数据大于最大导出数,只导出最大导出条数
|
||||
|
||||
//日志总量
|
||||
List<Map<String,Object>> logTotals=new ArrayList<Map<String,Object>>();
|
||||
StringBuilder compileIds=new StringBuilder(",");//配置ids
|
||||
Set<Integer> set=new HashSet<Integer>();//服务ids
|
||||
for (AvFileSampleCfg cfg : ipLists) {
|
||||
if(cfg.getIsAudit()!=0){
|
||||
set.add(cfg.getServiceId());
|
||||
compileIds.append(cfg.getCompileId()+",");
|
||||
}else{
|
||||
Map<String,Object> logTotal=new HashMap<String,Object>();
|
||||
logTotal.put("compileId", cfg.getCompileId()+"");
|
||||
logTotal.put("sum",0L);
|
||||
logTotals.add(logTotal);
|
||||
}
|
||||
|
||||
}
|
||||
StringBuilder serviceIds=new StringBuilder(",");
|
||||
for (Integer id : set) {
|
||||
serviceIds.append(id+",");
|
||||
}
|
||||
if(serviceIds.length()>1&&compileIds.length()>1){
|
||||
String serviceIdsStr=serviceIds.toString().substring(1, serviceIds.length()-1);
|
||||
String compileIdsStr=compileIds.toString().substring(1, compileIds.length()-1);
|
||||
//获取日志总量
|
||||
if(!StringUtils.isBlank(serviceIdsStr)&&!StringUtils.isBlank(compileIdsStr)){
|
||||
List<Map<String,Object>> logs = getLogTotal( null,serviceIdsStr,compileIdsStr);
|
||||
logTotals.addAll(logs);
|
||||
}
|
||||
}
|
||||
|
||||
// 条件导出数据大于最大导出数,只导出最大导出条数
|
||||
titleList.add(entity.getMenuNameCode());
|
||||
classMap.put(entity.getMenuNameCode(), AvFileSampleCfg.class);
|
||||
String cfgIndexInfoNoExport = ",group_name,userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
String cfgIndexInfoNoExport = ",do_log,whether_area_block,group_name,userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
|
||||
// 时间过滤
|
||||
if (entity.getSearch_create_time_start() == null && entity.getSearch_create_time_end() == null) {
|
||||
@@ -619,6 +651,14 @@ public class AvController extends BaseController {
|
||||
}
|
||||
|
||||
noExportMap.put(entity.getMenuNameCode(), cfgIndexInfoNoExport);
|
||||
for (AvFileSampleCfg cfg : ipLists) {
|
||||
for (Map<String,Object> logTotal : logTotals) {
|
||||
if(cfg.getCompileId().equals(Integer.parseInt((String) logTotal.get("compileId")))){
|
||||
cfg.setTotalLogs((Long)logTotal.get("sum"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
dataMap.put(entity.getMenuNameCode(), ipLists);
|
||||
|
||||
String timeRange = initTimeMap(entity);
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
package com.nis.web.controller.configuration.ntc;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
@@ -198,6 +201,36 @@ public class BgpCfgController extends BaseController {
|
||||
Page<CfgIndexInfo> page = bgpCfgService.getBgpList(pageInfo, entity);
|
||||
ipLists = page.getList();
|
||||
}
|
||||
List<Map<String,Object>> logTotals=new ArrayList<Map<String,Object>>();
|
||||
StringBuilder compileIds=new StringBuilder(",");//配置ids
|
||||
Set<Integer> set=new HashSet<Integer>();//服务ids
|
||||
for (CfgIndexInfo cfg : ipLists) {
|
||||
if(cfg.getIsAudit()!=0){
|
||||
set.add(cfg.getServiceId());
|
||||
compileIds.append(cfg.getCompileId()+",");
|
||||
}else{
|
||||
Map<String,Object> logTotal=new HashMap<String,Object>();
|
||||
logTotal.put("compileId", cfg.getCompileId()+"");
|
||||
logTotal.put("sum",0L);
|
||||
logTotals.add(logTotal);
|
||||
}
|
||||
|
||||
}
|
||||
StringBuilder serviceIds=new StringBuilder(",");
|
||||
for (Integer id : set) {
|
||||
serviceIds.append(id+",");
|
||||
}
|
||||
if(serviceIds.length()>1&&compileIds.length()>1){
|
||||
String serviceIdsStr=serviceIds.toString().substring(1, serviceIds.length()-1);
|
||||
String compileIdsStr=compileIds.toString().substring(1, compileIds.length()-1);
|
||||
//获取日志总量
|
||||
if(!StringUtils.isBlank(serviceIdsStr)&&!StringUtils.isBlank(compileIdsStr)){
|
||||
List<Map<String,Object>> logs = getLogTotal( null,serviceIdsStr,compileIdsStr);
|
||||
logTotals.addAll(logs);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
titleList.add(entity.getMenuNameCode());
|
||||
titleList.add("NTC_IP");
|
||||
titleList.add("NTC_BGP_AS");
|
||||
@@ -206,7 +239,7 @@ public class BgpCfgController extends BaseController {
|
||||
classMap.put("NTC_IP", IpPortCfg.class);
|
||||
classMap.put("NTC_BGP_AS", BaseStringCfg.class);
|
||||
// classMap.put("NTC_SUBSCRIBE_ID", NtcSubscribeIdCfg.class);
|
||||
String cfgIndexInfoNoExport = ",policy_name,group_name,userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
String cfgIndexInfoNoExport = ",do_blacklist,policy_name,group_name,userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
String ipPortInfoNoExport = ",do_log,action,config_describe,valid_identifier,is_audit,creator,creator"
|
||||
+ ",config_time,editor,edit_time,auditor,audit_time"
|
||||
+ ",letter,whether_area_block,classification,attribute,label"
|
||||
@@ -243,6 +276,12 @@ public class BgpCfgController extends BaseController {
|
||||
// ArrayList<BaseStringCfg>();
|
||||
List<BaseStringCfg> asInfoList = new ArrayList<BaseStringCfg>();
|
||||
for (CfgIndexInfo cfg : ipLists) {
|
||||
for (Map<String,Object> logTotal : logTotals) {
|
||||
if(cfg.getCompileId().equals(Integer.parseInt((String) logTotal.get("compileId")))){
|
||||
cfg.setTotalLogs((Long)logTotal.get("sum"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
CfgIndexInfo cfgIndexInfo = bgpCfgService.exportbgp(cfg);
|
||||
ipList.addAll(cfgIndexInfo.getIpPortList());
|
||||
// subscribeInfoList.addAll(cfgIndexInfo.getNtcSubscribeIdCfgList());
|
||||
|
||||
@@ -6,8 +6,10 @@ import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
@@ -624,6 +626,34 @@ public class FileTransferCfgController extends BaseController {
|
||||
ipLists = page.getList();
|
||||
}
|
||||
|
||||
List<Map<String,Object>> logTotals=new ArrayList<Map<String,Object>>();
|
||||
StringBuilder compileIds=new StringBuilder(",");//配置ids
|
||||
Set<Integer> set=new HashSet<Integer>();//服务ids
|
||||
for (CfgIndexInfo cfg : ipLists) {
|
||||
if(cfg.getIsAudit()!=0){
|
||||
set.add(cfg.getServiceId());
|
||||
compileIds.append(cfg.getCompileId()+",");
|
||||
}else{
|
||||
Map<String,Object> logTotal=new HashMap<String,Object>();
|
||||
logTotal.put("compileId", cfg.getCompileId()+"");
|
||||
logTotal.put("sum",0L);
|
||||
logTotals.add(logTotal);
|
||||
}
|
||||
|
||||
}
|
||||
StringBuilder serviceIds=new StringBuilder(",");
|
||||
for (Integer id : set) {
|
||||
serviceIds.append(id+",");
|
||||
}
|
||||
if(serviceIds.length()>1&&compileIds.length()>1){
|
||||
String serviceIdsStr=serviceIds.toString().substring(1, serviceIds.length()-1);
|
||||
String compileIdsStr=compileIds.toString().substring(1, compileIds.length()-1);
|
||||
//获取日志总量
|
||||
if(!StringUtils.isBlank(serviceIdsStr)&&!StringUtils.isBlank(compileIdsStr)){
|
||||
List<Map<String,Object>> logs = getLogTotal( null,serviceIdsStr,compileIdsStr);
|
||||
logTotals.addAll(logs);
|
||||
}
|
||||
}
|
||||
titleList.add(entity.getMenuNameCode());
|
||||
titleList.add("NTC_UNIVERSAL_IP");
|
||||
titleList.add("NTC_FTP_URL");
|
||||
@@ -673,6 +703,12 @@ public class FileTransferCfgController extends BaseController {
|
||||
List<BaseStringCfg> ftpkeyList = new ArrayList<BaseStringCfg>();
|
||||
List<BaseStringCfg> ftpurlList = new ArrayList<BaseStringCfg>();
|
||||
for (CfgIndexInfo cfg : ipLists) {
|
||||
for (Map<String,Object> logTotal : logTotals) {
|
||||
if(cfg.getCompileId().equals(Integer.parseInt((String) logTotal.get("compileId")))){
|
||||
cfg.setTotalLogs((Long)logTotal.get("sum"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
Map<String, List> maps = fileTransferCfgService.exportftp(cfg);
|
||||
ftpkeyList.addAll(maps.get("NTC_FTP_CONTENT"));
|
||||
ftpurlList.addAll(maps.get("NTC_FTP_URL"));
|
||||
@@ -730,6 +766,34 @@ public class FileTransferCfgController extends BaseController {
|
||||
ipLists = page.getList();
|
||||
}
|
||||
|
||||
List<Map<String,Object>> logTotals=new ArrayList<Map<String,Object>>();
|
||||
StringBuilder compileIds=new StringBuilder(",");//配置ids
|
||||
Set<Integer> set=new HashSet<Integer>();//服务ids
|
||||
for (CfgIndexInfo cfg : ipLists) {
|
||||
if(cfg.getIsAudit()!=0){
|
||||
set.add(cfg.getServiceId());
|
||||
compileIds.append(cfg.getCompileId()+",");
|
||||
}else{
|
||||
Map<String,Object> logTotal=new HashMap<String,Object>();
|
||||
logTotal.put("compileId", cfg.getCompileId()+"");
|
||||
logTotal.put("sum",0L);
|
||||
logTotals.add(logTotal);
|
||||
}
|
||||
|
||||
}
|
||||
StringBuilder serviceIds=new StringBuilder(",");
|
||||
for (Integer id : set) {
|
||||
serviceIds.append(id+",");
|
||||
}
|
||||
if(serviceIds.length()>1&&compileIds.length()>1){
|
||||
String serviceIdsStr=serviceIds.toString().substring(1, serviceIds.length()-1);
|
||||
String compileIdsStr=compileIds.toString().substring(1, compileIds.length()-1);
|
||||
//获取日志总量
|
||||
if(!StringUtils.isBlank(serviceIdsStr)&&!StringUtils.isBlank(compileIdsStr)){
|
||||
List<Map<String,Object>> logs = getLogTotal( null,serviceIdsStr,compileIdsStr);
|
||||
logTotals.addAll(logs);
|
||||
}
|
||||
}
|
||||
titleList.add(entity.getMenuNameCode());
|
||||
titleList.add("NTC_UNIVERSAL_IP");
|
||||
titleList.add("NTC_P2P_KEYWORDS");
|
||||
@@ -783,6 +847,12 @@ public class FileTransferCfgController extends BaseController {
|
||||
List<BaseStringCfg> hashList = new ArrayList<BaseStringCfg>();
|
||||
List<BaseStringCfg> keywordList = new ArrayList<BaseStringCfg>();
|
||||
for (CfgIndexInfo cfg : ipLists) {
|
||||
for (Map<String,Object> logTotal : logTotals) {
|
||||
if(cfg.getCompileId().equals(Integer.parseInt((String) logTotal.get("compileId")))){
|
||||
cfg.setTotalLogs((Long)logTotal.get("sum"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
Map<String, List> maps = fileTransferCfgService.exportp2p(cfg);
|
||||
keywordList.addAll(maps.get("NTC_P2P_KEYWORDS"));
|
||||
hashList.addAll(maps.get("NTC_P2P_HASH_BIN"));
|
||||
@@ -838,9 +908,39 @@ public class FileTransferCfgController extends BaseController {
|
||||
ipLists = page.getList();
|
||||
}
|
||||
|
||||
//日志总量
|
||||
List<Map<String,Object>> logTotals=new ArrayList<Map<String,Object>>();
|
||||
StringBuilder compileIds=new StringBuilder(",");//配置ids
|
||||
Set<Integer> set=new HashSet<Integer>();//服务ids
|
||||
for (FileDigestCfg cfg : ipLists) {
|
||||
if(cfg.getIsAudit()!=0){
|
||||
set.add(cfg.getServiceId());
|
||||
compileIds.append(cfg.getCompileId()+",");
|
||||
}else{
|
||||
Map<String,Object> logTotal=new HashMap<String,Object>();
|
||||
logTotal.put("compileId", cfg.getCompileId()+"");
|
||||
logTotal.put("sum",0L);
|
||||
logTotals.add(logTotal);
|
||||
}
|
||||
|
||||
}
|
||||
StringBuilder serviceIds=new StringBuilder(",");
|
||||
for (Integer id : set) {
|
||||
serviceIds.append(id+",");
|
||||
}
|
||||
if(serviceIds.length()>1&&compileIds.length()>1){
|
||||
String serviceIdsStr=serviceIds.toString().substring(1, serviceIds.length()-1);
|
||||
String compileIdsStr=compileIds.toString().substring(1, compileIds.length()-1);
|
||||
//获取日志总量
|
||||
if(!StringUtils.isBlank(serviceIdsStr)&&!StringUtils.isBlank(compileIdsStr)){
|
||||
List<Map<String,Object>> logs = getLogTotal( null,serviceIdsStr,compileIdsStr);
|
||||
logTotals.addAll(logs);
|
||||
}
|
||||
}
|
||||
|
||||
titleList.add(entity.getMenuNameCode());
|
||||
classMap.put(entity.getMenuNameCode(), FileDigestCfg.class);
|
||||
String cfgIndexInfoNoExport = ",policy_name,group_name,userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
String cfgIndexInfoNoExport = ",do_log,policy_name,group_name,userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
|
||||
// 时间过滤
|
||||
if (entity.getSearch_create_time_start() == null && entity.getSearch_create_time_end() == null) {
|
||||
@@ -856,7 +956,15 @@ public class FileTransferCfgController extends BaseController {
|
||||
cfgIndexInfoNoExport = "," + entity.gethColumns() + "," + cfgIndexInfoNoExport;
|
||||
}
|
||||
|
||||
noExportMap.put(entity.getMenuNameCode(), cfgIndexInfoNoExport);
|
||||
noExportMap.put(entity.getMenuNameCode(), cfgIndexInfoNoExport);
|
||||
for (FileDigestCfg cfg : ipLists) {
|
||||
for (Map<String,Object> logTotal : logTotals) {
|
||||
if(cfg.getCompileId().equals(Integer.parseInt((String) logTotal.get("compileId")))){
|
||||
cfg.setTotalLogs((Long)logTotal.get("sum"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
dataMap.put(entity.getMenuNameCode(), ipLists);
|
||||
/* } */
|
||||
|
||||
|
||||
@@ -5,8 +5,10 @@ import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
@@ -249,7 +251,34 @@ public class MailCfgController extends BaseController {
|
||||
Page<CfgIndexInfo> page = mailCfgService.getMailList(pageInfo, entity);
|
||||
ipLists = page.getList();
|
||||
}
|
||||
|
||||
List<Map<String,Object>> logTotals=new ArrayList<Map<String,Object>>();
|
||||
StringBuilder compileIds=new StringBuilder(",");//配置ids
|
||||
Set<Integer> set=new HashSet<Integer>();//服务ids
|
||||
for (CfgIndexInfo cfg : ipLists) {
|
||||
if(cfg.getIsAudit()!=0){
|
||||
set.add(cfg.getServiceId());
|
||||
compileIds.append(cfg.getCompileId()+",");
|
||||
}else{
|
||||
Map<String,Object> logTotal=new HashMap<String,Object>();
|
||||
logTotal.put("compileId", cfg.getCompileId()+"");
|
||||
logTotal.put("sum",0L);
|
||||
logTotals.add(logTotal);
|
||||
}
|
||||
|
||||
}
|
||||
StringBuilder serviceIds=new StringBuilder(",");
|
||||
for (Integer id : set) {
|
||||
serviceIds.append(id+",");
|
||||
}
|
||||
if(serviceIds.length()>1&&compileIds.length()>1){
|
||||
String serviceIdsStr=serviceIds.toString().substring(1, serviceIds.length()-1);
|
||||
String compileIdsStr=compileIds.toString().substring(1, compileIds.length()-1);
|
||||
//获取日志总量
|
||||
if(!StringUtils.isBlank(serviceIdsStr)&&!StringUtils.isBlank(compileIdsStr)){
|
||||
List<Map<String,Object>> logs = getLogTotal( null,serviceIdsStr,compileIdsStr);
|
||||
logTotals.addAll(logs);
|
||||
}
|
||||
}
|
||||
titleList.add(entity.getMenuNameCode());
|
||||
String cfgIndexInfoNoExport = ",policy_name,group_name,userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
String ipPortInfoNoExport = ",do_log,action,config_describe,valid_identifier,is_audit,creator,creator"
|
||||
@@ -305,6 +334,12 @@ public class MailCfgController extends BaseController {
|
||||
List<ComplexkeywordCfg> mailBodyList = new ArrayList<ComplexkeywordCfg>();
|
||||
List<ComplexkeywordCfg> mailReqHdrList = new ArrayList<ComplexkeywordCfg>();
|
||||
for (CfgIndexInfo cfg : ipLists) {
|
||||
for (Map<String,Object> logTotal : logTotals) {
|
||||
if(cfg.getCompileId().equals(Integer.parseInt((String) logTotal.get("compileId")))){
|
||||
cfg.setTotalLogs((Long)logTotal.get("sum"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
Map<String, List> maps = mailCfgService.exportmail(cfg);
|
||||
mailReqHdrList.addAll(maps.get("NTC_MAIL_HDR"));
|
||||
mailBodyList.addAll(maps.get("NTC_MAIL_BODY"));
|
||||
|
||||
@@ -3,9 +3,11 @@ package com.nis.web.controller.configuration.ntc;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
@@ -626,6 +628,35 @@ public class WebsiteController extends BaseController {
|
||||
Page<CfgIndexInfo> page = httpRedirectCfgService.getHttpRedirectList(pageInfo, entity);
|
||||
ipLists = page.getList();
|
||||
}
|
||||
|
||||
List<Map<String,Object>> logTotals=new ArrayList<Map<String,Object>>();
|
||||
StringBuilder compileIds=new StringBuilder(",");//配置ids
|
||||
Set<Integer> set=new HashSet<Integer>();//服务ids
|
||||
for (CfgIndexInfo cfg : ipLists) {
|
||||
if(cfg.getIsAudit()!=0){
|
||||
set.add(cfg.getServiceId());
|
||||
compileIds.append(cfg.getCompileId()+",");
|
||||
}else{
|
||||
Map<String,Object> logTotal=new HashMap<String,Object>();
|
||||
logTotal.put("compileId", cfg.getCompileId()+"");
|
||||
logTotal.put("sum",0L);
|
||||
logTotals.add(logTotal);
|
||||
}
|
||||
|
||||
}
|
||||
StringBuilder serviceIds=new StringBuilder(",");
|
||||
for (Integer id : set) {
|
||||
serviceIds.append(id+",");
|
||||
}
|
||||
if(serviceIds.length()>1&&compileIds.length()>1){
|
||||
String serviceIdsStr=serviceIds.toString().substring(1, serviceIds.length()-1);
|
||||
String compileIdsStr=compileIds.toString().substring(1, compileIds.length()-1);
|
||||
//获取日志总量
|
||||
if(!StringUtils.isBlank(serviceIdsStr)&&!StringUtils.isBlank(compileIdsStr)){
|
||||
List<Map<String,Object>> logs = getLogTotal( null,serviceIdsStr,compileIdsStr);
|
||||
logTotals.addAll(logs);
|
||||
}
|
||||
}
|
||||
// 条件导出数据大于最大导出数,只导出最大导出条数
|
||||
|
||||
String cfgIndexInfoNoExport = ",policy_name,group_name,userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
@@ -680,6 +711,12 @@ public class WebsiteController extends BaseController {
|
||||
List<IpPortCfg> ipPortList = new ArrayList<>();
|
||||
List<BaseStringCfg> subscribeIdList = new ArrayList<>();
|
||||
for (CfgIndexInfo cfg : ipLists) {
|
||||
for (Map<String,Object> logTotal : logTotals) {
|
||||
if(cfg.getCompileId().equals(Integer.parseInt((String) logTotal.get("compileId")))){
|
||||
cfg.setTotalLogs((Long)logTotal.get("sum"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
Map<String, List> maps = websiteCfgService.exportHttpCfg(cfg);
|
||||
httpUrlList.addAll(maps.get("NTC_HTTP_URL"));
|
||||
httpReqHdrList.addAll(maps.get("NTC_HTTP_REQ_HDR"));
|
||||
@@ -774,8 +811,19 @@ public class WebsiteController extends BaseController {
|
||||
Page<CfgIndexInfo> page = websiteCfgService.getWebsiteList(pageInfo, entity);
|
||||
ipLists = page.getList();
|
||||
}
|
||||
|
||||
List<Map<String,Object>> logTotals=new ArrayList<Map<String,Object>>();
|
||||
StringBuilder compileIds=new StringBuilder(",");//配置ids
|
||||
Set<Integer> set=new HashSet<Integer>();//服务ids
|
||||
for (int i = 0; i < ipLists.size(); i++) {
|
||||
if(ipLists.get(i).getIsAudit()!=0){
|
||||
set.add(ipLists.get(i).getServiceId());
|
||||
compileIds.append(ipLists.get(i).getCompileId()+",");
|
||||
}else{
|
||||
Map<String,Object> logTotal=new HashMap<String,Object>();
|
||||
logTotal.put("compileId", ipLists.get(i).getCompileId()+"");
|
||||
logTotal.put("sum",0L);
|
||||
logTotals.add(logTotal);
|
||||
}
|
||||
if (ipLists.get(i).getDnsStrategyId() != null && ipLists.get(i).getDnsStrategyId() != 0) {
|
||||
List<DnsResStrategy> resStrategys = dnsResStrategyService
|
||||
.findDnsResStrategys(ipLists.get(i).getDnsStrategyId(), 1, 1);
|
||||
@@ -793,6 +841,20 @@ public class WebsiteController extends BaseController {
|
||||
ipLists.get(i).setDnsStrategyName(msgProp.getProperty("no_strategy"));
|
||||
}
|
||||
}
|
||||
|
||||
StringBuilder serviceIds=new StringBuilder(",");
|
||||
for (Integer id : set) {
|
||||
serviceIds.append(id+",");
|
||||
}
|
||||
if(serviceIds.length()>1&&compileIds.length()>1){
|
||||
String serviceIdsStr=serviceIds.toString().substring(1, serviceIds.length()-1);
|
||||
String compileIdsStr=compileIds.toString().substring(1, compileIds.length()-1);
|
||||
//获取日志总量
|
||||
if(!StringUtils.isBlank(serviceIdsStr)&&!StringUtils.isBlank(compileIdsStr)){
|
||||
List<Map<String,Object>> logs = getLogTotal( null,serviceIdsStr,compileIdsStr);
|
||||
logTotals.addAll(logs);
|
||||
}
|
||||
}
|
||||
titleList.add(entity.getMenuNameCode());
|
||||
titleList.add("NTC_IP");
|
||||
titleList.add("NTC_DNS_REGION");
|
||||
@@ -801,7 +863,7 @@ public class WebsiteController extends BaseController {
|
||||
classMap.put("NTC_IP", IpPortCfg.class);
|
||||
classMap.put("NTC_DNS_REGION", ComplexkeywordCfg.class);
|
||||
classMap.put("NTC_SUBSCRIBE_ID", NtcSubscribeIdCfg.class);
|
||||
String cfgIndexInfoNoExport = ",group_name,userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
String cfgIndexInfoNoExport = ",do_blacklist,group_name,userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
String ipPortInfoNoExport = ",do_log,action,config_describe,valid_identifier,is_audit,creator,creator"
|
||||
+ ",config_time,editor,edit_time,auditor,audit_time"
|
||||
+ ",letter,whether_area_block,classification,attribute,label"
|
||||
@@ -837,6 +899,12 @@ public class WebsiteController extends BaseController {
|
||||
List<BaseStringCfg> subscribeInfoList = new ArrayList<BaseStringCfg>();
|
||||
List<ComplexkeywordCfg> regionInfoList = new ArrayList<ComplexkeywordCfg>();
|
||||
for (CfgIndexInfo cfg : ipLists) {
|
||||
for (Map<String,Object> logTotal : logTotals) {
|
||||
if(cfg.getCompileId().equals(Integer.parseInt((String) logTotal.get("compileId")))){
|
||||
cfg.setTotalLogs((Long)logTotal.get("sum"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
CfgIndexInfo cfgIndexInfo = websiteCfgService.exportdns(cfg);
|
||||
ipList.addAll(cfgIndexInfo.getIpPortList());
|
||||
subscribeInfoList.addAll(cfgIndexInfo.getNtcSubscribeIdCfgList());
|
||||
@@ -892,7 +960,33 @@ public class WebsiteController extends BaseController {
|
||||
Page<CfgIndexInfo> page = websiteCfgService.getWebsiteList(pageInfo, entity);
|
||||
ipLists = page.getList();
|
||||
}
|
||||
|
||||
List<Map<String,Object>> logTotals=new ArrayList<Map<String,Object>>();
|
||||
StringBuilder compileIds=new StringBuilder(",");//配置ids
|
||||
Set<Integer> set=new HashSet<Integer>();//服务ids
|
||||
for (CfgIndexInfo cfg : ipLists) {
|
||||
if(cfg.getIsAudit()!=0){
|
||||
set.add(cfg.getServiceId());
|
||||
compileIds.append(cfg.getCompileId()+",");
|
||||
}else{
|
||||
Map<String,Object> logTotal=new HashMap<String,Object>();
|
||||
logTotal.put("compileId", cfg.getCompileId()+"");
|
||||
logTotal.put("sum",0L);
|
||||
logTotals.add(logTotal);
|
||||
}
|
||||
}
|
||||
StringBuilder serviceIds=new StringBuilder(",");
|
||||
for (Integer id : set) {
|
||||
serviceIds.append(id+",");
|
||||
}
|
||||
if(serviceIds.length()>1&&compileIds.length()>1){
|
||||
String serviceIdsStr=serviceIds.toString().substring(1, serviceIds.length()-1);
|
||||
String compileIdsStr=compileIds.toString().substring(1, compileIds.length()-1);
|
||||
//获取日志总量
|
||||
if(!StringUtils.isBlank(serviceIdsStr)&&!StringUtils.isBlank(compileIdsStr)){
|
||||
List<Map<String,Object>> logs = getLogTotal( null,serviceIdsStr,compileIdsStr);
|
||||
logTotals.addAll(logs);
|
||||
}
|
||||
}
|
||||
titleList.add(entity.getMenuNameCode());
|
||||
titleList.add("NTC_UNIVERSAL_IP");
|
||||
titleList.add("NTC_SSL_SNI");
|
||||
@@ -946,6 +1040,12 @@ public class WebsiteController extends BaseController {
|
||||
List<IpPortCfg> ipPortList = new ArrayList<>();
|
||||
List<BaseStringCfg> subscribeIdList = new ArrayList<BaseStringCfg>();
|
||||
for (CfgIndexInfo cfg : ipLists) {
|
||||
for (Map<String,Object> logTotal : logTotals) {
|
||||
if(cfg.getCompileId().equals(Integer.parseInt((String) logTotal.get("compileId")))){
|
||||
cfg.setTotalLogs((Long)logTotal.get("sum"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
Map<String, List> maps = websiteCfgService.exportssl(cfg);
|
||||
sslSniList.addAll(maps.get("NTC_SSL_SNI"));
|
||||
sslSnaList.addAll(maps.get("NTC_SSL_SAN"));
|
||||
|
||||
@@ -3,8 +3,10 @@ package com.nis.web.controller.configuration.ntc;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
@@ -367,11 +369,42 @@ public class WhiteListController extends CommonController {
|
||||
Page<CfgIndexInfo> page = ipCfgService.getIpCfgList(pageInfo, entity);
|
||||
ipLists = page.getList();
|
||||
}
|
||||
|
||||
//日志总量
|
||||
List<Map<String,Object>> logTotals=new ArrayList<Map<String,Object>>();
|
||||
StringBuilder compileIds=new StringBuilder(",");//配置ids
|
||||
Set<Integer> set=new HashSet<Integer>();//服务ids
|
||||
for (CfgIndexInfo cfg : ipLists) {
|
||||
if(cfg.getIsAudit()!=0){
|
||||
set.add(cfg.getServiceId());
|
||||
compileIds.append(cfg.getCompileId()+",");
|
||||
}else{
|
||||
Map<String,Object> logTotal=new HashMap<String,Object>();
|
||||
logTotal.put("compileId", cfg.getCompileId()+"");
|
||||
logTotal.put("sum",0L);
|
||||
logTotals.add(logTotal);
|
||||
}
|
||||
|
||||
}
|
||||
StringBuilder serviceIds=new StringBuilder(",");
|
||||
for (Integer id : set) {
|
||||
serviceIds.append(id+",");
|
||||
}
|
||||
if(serviceIds.length()>1&&compileIds.length()>1){
|
||||
String serviceIdsStr=serviceIds.toString().substring(1, serviceIds.length()-1);
|
||||
String compileIdsStr=compileIds.toString().substring(1, compileIds.length()-1);
|
||||
//获取日志总量
|
||||
if(!StringUtils.isBlank(serviceIdsStr)&&!StringUtils.isBlank(compileIdsStr)){
|
||||
List<Map<String,Object>> logs = getLogTotal( null,serviceIdsStr,compileIdsStr);
|
||||
logTotals.addAll(logs);
|
||||
}
|
||||
}
|
||||
|
||||
titleList.add(entity.getMenuNameCode());
|
||||
titleList.add("NTC_IP");
|
||||
classMap.put(entity.getMenuNameCode(), CfgIndexInfo.class);
|
||||
classMap.put("NTC_IP", IpPortCfg.class);
|
||||
String cfgIndexInfoNoExport = ",policy_name,do_log,letter,whether_area_block,classification,attribute,label,group_name,userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
String cfgIndexInfoNoExport = ",policy_name,letter,whether_area_block,classification,attribute,label,group_name,userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
String ipPortInfoNoExport = ",protocol,direction,do_log,action,config_describe,valid_identifier,is_audit,creator,creator"
|
||||
+ ",config_time,editor,edit_time,auditor,audit_time"
|
||||
+ ",letter,whether_area_block,classification,attribute,label"
|
||||
@@ -395,6 +428,12 @@ public class WhiteListController extends CommonController {
|
||||
noExportMap.put("NTC_IP", ipPortInfoNoExport);
|
||||
List<IpPortCfg> ipList = new ArrayList<IpPortCfg>();
|
||||
for (CfgIndexInfo cfg : ipLists) {
|
||||
for (Map<String,Object> logTotal : logTotals) {
|
||||
if(cfg.getCompileId().equals(Integer.parseInt((String) logTotal.get("compileId")))){
|
||||
cfg.setTotalLogs((Long)logTotal.get("sum"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
CfgIndexInfo cfgIndexInfo = ipCfgService.exportIpInfo(cfg);
|
||||
ipList.addAll(cfgIndexInfo.getIpPortList());
|
||||
}
|
||||
@@ -442,7 +481,32 @@ public class WhiteListController extends CommonController {
|
||||
Page<CfgIndexInfo> page = domainService.getDomainList(pageInfo, entity);
|
||||
ipLists = page.getList();
|
||||
}
|
||||
|
||||
List<Map<String,Object>> logTotals=new ArrayList<Map<String,Object>>();
|
||||
StringBuilder compileIds=new StringBuilder(",");//配置ids
|
||||
Set<Integer> set=new HashSet<Integer>();//服务ids
|
||||
for (CfgIndexInfo cfg : ipLists) {
|
||||
if(cfg.getIsAudit()!=0){
|
||||
set.add(cfg.getServiceId());
|
||||
compileIds.append(cfg.getCompileId()+",");
|
||||
}else{
|
||||
Map<String,Object> logTotal=new HashMap<String,Object>();
|
||||
logTotal.put("compileId", cfg.getCompileId()+"");
|
||||
logTotal.put("sum",0L);
|
||||
logTotals.add(logTotal);
|
||||
}
|
||||
|
||||
}
|
||||
StringBuilder serviceIds=new StringBuilder(",");
|
||||
for (Integer id : set) {
|
||||
serviceIds.append(id+",");
|
||||
}
|
||||
String serviceIdsStr=serviceIds.toString().substring(1, serviceIds.length()-1);
|
||||
String compileIdsStr=compileIds.toString().substring(1, compileIds.length()-1);
|
||||
//获取日志总量
|
||||
if(!StringUtils.isBlank(serviceIdsStr)&&!StringUtils.isBlank(compileIdsStr)){
|
||||
List<Map<String,Object>> logs = getLogTotal( null,serviceIdsStr,compileIdsStr);
|
||||
logTotals.addAll(logs);
|
||||
}
|
||||
titleList.add(entity.getMenuNameCode());
|
||||
titleList.add("NTC_HTTP_URL");
|
||||
classMap.put(entity.getMenuNameCode(), CfgIndexInfo.class);
|
||||
@@ -471,6 +535,12 @@ public class WhiteListController extends CommonController {
|
||||
noExportMap.put("NTC_HTTP_URL", httpUrlInfoNoExport);
|
||||
List<BaseStringCfg> httpurlList = new ArrayList<BaseStringCfg>();
|
||||
for (CfgIndexInfo cfg : ipLists) {
|
||||
for (Map<String,Object> logTotal : logTotals) {
|
||||
if(cfg.getCompileId().equals(Integer.parseInt((String) logTotal.get("compileId")))){
|
||||
cfg.setTotalLogs((Long)logTotal.get("sum"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
CfgIndexInfo cfgIndexInfo = domainService.exportDomainInfo(cfg);
|
||||
httpurlList.addAll(cfgIndexInfo.getHttpUrlList());
|
||||
}
|
||||
|
||||
@@ -3,9 +3,11 @@ package com.nis.web.controller.configuration.proxy;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
@@ -295,9 +297,27 @@ public class HttpRedirectPolicyController extends BaseController {
|
||||
Page<CfgIndexInfo> page = httpRedirectCfgService.getHttpRedirectList(pageInfo, entity);
|
||||
ipLists = page.getList();
|
||||
}
|
||||
|
||||
|
||||
|
||||
//日志总量
|
||||
List<Map<String,Object>> logTotals=new ArrayList<Map<String,Object>>();
|
||||
StringBuilder compileIds=new StringBuilder(",");//配置ids
|
||||
Set<Integer> set=new HashSet<Integer>();//服务ids
|
||||
|
||||
|
||||
Properties prop = getMsgProp();
|
||||
for (CfgIndexInfo str : ipLists) {
|
||||
|
||||
if(str.getIsAudit()!=0){
|
||||
set.add(str.getServiceId());
|
||||
compileIds.append(str.getCompileId()+",");
|
||||
}else{
|
||||
Map<String,Object> logTotal=new HashMap<String,Object>();
|
||||
logTotal.put("compileId", str.getCompileId()+"");
|
||||
logTotal.put("sum",0L);
|
||||
logTotals.add(logTotal);
|
||||
}
|
||||
|
||||
if (entity.getFunctionId() != 210 && entity.getFunctionId() != 211) {
|
||||
String type = "RESPONSE_CODE";
|
||||
if (entity.getFunctionId() == 207) {
|
||||
@@ -324,6 +344,21 @@ public class HttpRedirectPolicyController extends BaseController {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//获取日志总量
|
||||
StringBuilder serviceIds=new StringBuilder(",");
|
||||
if(set.size()>0) {
|
||||
for (Integer id : set) {
|
||||
serviceIds.append(id+",");
|
||||
}
|
||||
String serviceIdsStr=serviceIds.toString().substring(1, serviceIds.length()-1);
|
||||
String compileIdsStr=compileIds.toString().substring(1, compileIds.length()-1);
|
||||
if(!StringUtils.isBlank(serviceIdsStr)&&!StringUtils.isBlank(compileIdsStr)){
|
||||
List<Map<String,Object>> logs = getLogTotal( null,serviceIdsStr,compileIdsStr);
|
||||
logTotals.addAll(logs);
|
||||
}
|
||||
}
|
||||
|
||||
String cfgIndexInfoNoExport = ",policy_name,group_name,userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
if (entity.getFunctionId() == 207) {
|
||||
cfgIndexInfoNoExport = ",policy_name,group_name,userregion3,userregion4,userregion5,&userregion1:response_code-userregion2:response_content-";
|
||||
@@ -393,6 +428,14 @@ public class HttpRedirectPolicyController extends BaseController {
|
||||
httpResBodyList.addAll(maps.get("NTC_HTTP_RES_BODY"));
|
||||
ipPortList.addAll(maps.get("NTC_UNIVERSAL_IP"));
|
||||
subscribeIdList.addAll(maps.get("NTC_SUBSCRIBE_ID"));
|
||||
|
||||
for (Map<String,Object> logTotal : logTotals) {
|
||||
if(cfg.getCompileId().equals(Integer.parseInt((String) logTotal.get("compileId")))){
|
||||
cfg.setTotalLogs((Long)logTotal.get("sum"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
httpUrlList = BaseStringCfg.replaceBaseKeyList(httpUrlList);
|
||||
httpReqHdrList = ComplexkeywordCfg.replaceComplexKeyList(httpReqHdrList);
|
||||
|
||||
@@ -329,6 +329,18 @@ public class InterceptController extends CommonController {
|
||||
httpUrlList.addAll(maps.get("NTC_HTTP_URL"));
|
||||
ipList.addAll(maps.get("PXY_INTERCEPT_IP"));
|
||||
pktBinList.addAll(maps.get("PXY_INTERCEPT_PKT_BIN"));
|
||||
if (entity.getFunctionId() == 200){
|
||||
Properties msgProp = getMsgProp();
|
||||
if(cfg.getAction().equals(1)) {
|
||||
cfg.setUserRegion5(msgProp.getProperty("intercept"));
|
||||
}else if(cfg.getAction().equals(48)) {
|
||||
cfg.setUserRegion5(msgProp.getProperty("action_spoofing"));
|
||||
}else if(cfg.getAction().equals(128)) {
|
||||
cfg.setUserRegion5(msgProp.getProperty("bypass"));
|
||||
}else {
|
||||
cfg.setUserRegion5(msgProp.getProperty(DictUtils.getDictLabels("SERVICE_ACTION", cfg.getAction().toString(), cfg.getAction().toString())));
|
||||
}
|
||||
}
|
||||
}
|
||||
pktBinList = BaseStringCfg.replaceBaseKeyList(pktBinList);
|
||||
httpUrlList = BaseStringCfg.baseHexList(httpUrlList);
|
||||
@@ -344,7 +356,7 @@ public class InterceptController extends CommonController {
|
||||
dataMap.put("PXY_INTERCEPT_IP", ipList);
|
||||
dataMap.put("PXY_INTERCEPT_PKT_BIN", pktBinList);
|
||||
} else if (entity.getFunctionId() == 200) {// IP拦截
|
||||
cfgIndexInfoNoExport = ",policy_name,group_name,userregion3,userregion4,userregion5,userregion2,&userregion1:intercept_file_strategy-";
|
||||
cfgIndexInfoNoExport = ",policy_name,group_name,userregion3,userregion4,block_type,&userregion1:intercept_file_strategy-userregion2:ratelimit-userregion5:block_type";
|
||||
titleList.add("PXY_INTERCEPT_IP");
|
||||
classMap.put("PXY_INTERCEPT_IP", IpPortCfg.class);
|
||||
noExportMap.put("PXY_INTERCEPT_IP", ipPortInfoNoExport);
|
||||
|
||||
@@ -420,7 +420,7 @@ public class PxyObjKeyringController extends BaseController {
|
||||
}
|
||||
titleList.add(entity.getMenuNameCode());
|
||||
classMap.put(entity.getMenuNameCode(), PxyObjKeyring.class);
|
||||
String cfgIndexInfoNoExport = ",config_describe,whether_area_block,block_type,valid_identifier,do_log,client_port,ir_type,group_name,userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
String cfgIndexInfoNoExport = ",config_describe,whether_area_block,block_type,do_log,client_port,ir_type,group_name,userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
|
||||
// 时间过滤
|
||||
if (entity.getSearch_create_time_start() == null && entity.getSearch_create_time_end() == null) {
|
||||
@@ -485,7 +485,7 @@ public class PxyObjKeyringController extends BaseController {
|
||||
}
|
||||
titleList.add(entity.getMenuNameCode());
|
||||
classMap.put(entity.getMenuNameCode(), PxyObjTrustedCaCert.class);
|
||||
String cfgIndexInfoNoExport = ",whether_area_block,block_type,valid_identifier,do_log,client_port,ir_type,group_name,userregion1,userregion2,userregion3,userregion4,userregion5,&config_describe:cert_name-";
|
||||
String cfgIndexInfoNoExport = ",whether_area_block,block_type,do_log,client_port,ir_type,group_name,userregion1,userregion2,userregion3,userregion4,userregion5,&config_describe:cert_name-";
|
||||
|
||||
// 时间过滤
|
||||
if (entity.getSearch_create_time_start() == null && entity.getSearch_create_time_end() == null) {
|
||||
|
||||
@@ -525,7 +525,7 @@ public class TrafficStatisticsInfoController extends BaseController {
|
||||
Calendar cal = Calendar. getInstance ();
|
||||
cal.setTime(new Date());
|
||||
String now = new SimpleDateFormat( "yyyy-MM-dd HH:mm:00" ).format(cal.getTime());//获取到完整的时间
|
||||
cal.set(Calendar.HOUR_OF_DAY, cal.get(Calendar.HOUR_OF_DAY) - 12);
|
||||
cal.set(Calendar.HOUR_OF_DAY, cal.get(Calendar.HOUR_OF_DAY) - 1);
|
||||
String oneHoursAgo = new SimpleDateFormat( "yyyy-MM-dd HH:mm:00" ).format(cal.getTime());
|
||||
List<WebsiteDomainTopic> domainList = appCfgService.getDomainDict(new WebsiteDomainTopic());// domain 域名
|
||||
model.addAttribute("domainList", domainList);
|
||||
|
||||
@@ -0,0 +1,171 @@
|
||||
package com.nis.web.controller.log.ntc;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.commons.lang.StringEscapeUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
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.servlet.mvc.support.RedirectAttributes;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.nis.domain.FunctionServiceDict;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.PageLog;
|
||||
import com.nis.domain.SysUser;
|
||||
import com.nis.domain.log.NtcIpLog;
|
||||
import com.nis.domain.log.NtcMailLog;
|
||||
import com.nis.domain.log.NtcMailLog;
|
||||
import com.nis.domain.maat.LogRecvData;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.DictUtils;
|
||||
import com.nis.util.httpclient.HttpClientUtil;
|
||||
import com.nis.web.controller.BaseController;
|
||||
import com.nis.web.security.UserUtils;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("${adminPath}/log/ntc/mailRecord")
|
||||
public class MailRecordLogController extends BaseController {
|
||||
|
||||
@RequestMapping(value = { "list", "" })
|
||||
public String list(@ModelAttribute("log") NtcMailLog log, Model model, HttpServletRequest request,
|
||||
HttpServletResponse response) {
|
||||
try {
|
||||
PageLog<NtcMailLog> page = new PageLog<NtcMailLog>(request, response);
|
||||
Map<String, Object> params = new HashMap<String, Object>();
|
||||
params.put("pageSize", page.getPageSize());
|
||||
params.put("pageNo", page.getPageNo());
|
||||
initLogSearchValue(log, params);
|
||||
|
||||
// 增加收/发件人、邮件主题查询
|
||||
if (StringUtils.isNotBlank(log.getMailTo())) {
|
||||
params.put("searchMailTo", StringEscapeUtils.unescapeHtml(log.getMailTo()));
|
||||
}
|
||||
if (StringUtils.isNotBlank(log.getMailFrom())) {
|
||||
params.put("searchMailFrom", StringEscapeUtils.unescapeHtml(log.getMailFrom()));
|
||||
}
|
||||
if (StringUtils.isNotBlank(log.getSubject())) {
|
||||
params.put("searchSubject", StringEscapeUtils.unescapeHtml(log.getSubject()));
|
||||
}
|
||||
|
||||
params.put("searchCfgId", "0");// 邮件泛收 cfg_id=0
|
||||
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(log.getFunctionId());
|
||||
model.addAttribute("serviceList", serviceList);
|
||||
|
||||
String url = Constants.LOG_BASE_URL + Constants.NTC_MAIL_LOG;
|
||||
String recv = HttpClientUtil.getMsg(url, params, request);
|
||||
|
||||
if (StringUtils.isNotBlank(recv)) {
|
||||
Gson gson = new GsonBuilder().create();
|
||||
LogRecvData<NtcMailLog> fromJson = gson.fromJson(recv, new TypeToken<LogRecvData<NtcMailLog>>() {
|
||||
}.getType());
|
||||
if (fromJson.getStatus().intValue() == 200) {
|
||||
Page<NtcMailLog> data = fromJson.getData();
|
||||
page.setCount(data.getCount());
|
||||
page.setLast(data.getLast());
|
||||
page.setList(data.getList());
|
||||
List<NtcMailLog> list = page.getList();
|
||||
for (NtcMailLog l : list) {
|
||||
l.setFunctionId(log.getFunctionId());
|
||||
setLogAction(l, serviceList);
|
||||
}
|
||||
model.addAttribute("page", page);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("查询失败", e);
|
||||
addMessageLog(model, e.getMessage());
|
||||
}
|
||||
|
||||
return "/log/ntc/mailRecordList";
|
||||
}
|
||||
|
||||
// Mail泛收导出
|
||||
@RequestMapping(value = "exportMail")
|
||||
public void exportMail(@ModelAttribute("log") NtcMailLog log, Model model, String hColumns, String type,
|
||||
HttpServletRequest request, HttpServletResponse response, RedirectAttributes redirectAttributes) {
|
||||
System.out.println("进来了Mail泛收");
|
||||
try {
|
||||
// export data info
|
||||
List<String> titleList = new ArrayList<String>();
|
||||
Map<String, Class<?>> classMap = new HashMap<String, Class<?>>();
|
||||
Map<String, List> dataMap = new HashMap<String, List>();
|
||||
Map<String, String> noExportMap = new HashMap<String, String>();
|
||||
// ---------------------------
|
||||
PageLog<NtcMailLog> page = new PageLog<NtcMailLog>(request, response);
|
||||
page.setPageNo(1);
|
||||
page.setPageSize(Constants.MAX_LOG_EXPORT_SIZE);
|
||||
Map<String, Object> params = new HashMap<String, Object>();
|
||||
params.put("pageSize", page.getPageSize());
|
||||
params.put("pageNo", page.getPageNo());
|
||||
initLogSearchValue(log, params);
|
||||
|
||||
// 增加收/发件人、邮件主题查询
|
||||
if (StringUtils.isNotBlank(log.getMailTo())) {
|
||||
params.put("searchMailTo", StringEscapeUtils.unescapeHtml(log.getMailTo()));
|
||||
}
|
||||
if (StringUtils.isNotBlank(log.getMailFrom())) {
|
||||
params.put("searchMailFrom", StringEscapeUtils.unescapeHtml(log.getMailFrom()));
|
||||
}
|
||||
if (StringUtils.isNotBlank(log.getSubject())) {
|
||||
params.put("searchSubject", StringEscapeUtils.unescapeHtml(log.getSubject()));
|
||||
}
|
||||
|
||||
params.put("searchCfgId", "0");// 邮件泛收 cfg_id=0
|
||||
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(log.getFunctionId());
|
||||
model.addAttribute("serviceList", serviceList);
|
||||
|
||||
String url = Constants.LOG_BASE_URL + Constants.NTC_MAIL_LOG;
|
||||
String recv = HttpClientUtil.getMsg(url, params, request);
|
||||
List<NtcMailLog> list = new ArrayList<NtcMailLog>();
|
||||
if (StringUtils.isNotBlank(recv)) {
|
||||
Gson gson = new GsonBuilder().create();
|
||||
LogRecvData<NtcMailLog> fromJson = gson.fromJson(recv, new TypeToken<LogRecvData<NtcMailLog>>() {
|
||||
}.getType());
|
||||
if (fromJson.getStatus().intValue() == 200) {
|
||||
Page<NtcMailLog> data = fromJson.getData();
|
||||
list = data.getList();
|
||||
}
|
||||
}
|
||||
for (NtcMailLog l : list) {
|
||||
l.setFunctionId(log.getFunctionId());
|
||||
setLogAction(l, serviceList);
|
||||
}
|
||||
titleList.add("mail_record");
|
||||
classMap.put("mail_record", NtcMailLog.class);
|
||||
SysUser user = UserUtils.getUser();
|
||||
if (!user.isAdmin()) {
|
||||
hColumns += ",scene_file,";
|
||||
} else {
|
||||
hColumns += ",";
|
||||
}
|
||||
String cfgIndexInfoNoExport = "," + hColumns;
|
||||
noExportMap.put("mail_record", cfgIndexInfoNoExport);
|
||||
dataMap.put("mail_record", list);
|
||||
String timeRange = initLogMap(log, "mail_record");
|
||||
noExportMap.put("timeRange", timeRange);
|
||||
/* } */
|
||||
if ("csv".equals(type)) {
|
||||
this._exportCsv(model, request, response, redirectAttributes, "mail_record", titleList, classMap,
|
||||
dataMap, noExportMap);
|
||||
} else {
|
||||
this._export(model, request, response, redirectAttributes, "mail_record", titleList, classMap, dataMap,
|
||||
noExportMap);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("mail_record export failed", e);
|
||||
addMessage(redirectAttributes, "error", "export_failed");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,158 @@
|
||||
package com.nis.web.controller.log.ntc;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.springframework.beans.BeanUtils;
|
||||
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.servlet.mvc.support.RedirectAttributes;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.JsonSyntaxException;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.nis.domain.FunctionServiceDict;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.PageLog;
|
||||
import com.nis.domain.SysUser;
|
||||
import com.nis.domain.log.NtcSslRecordLog;
|
||||
import com.nis.domain.log.NtcSshLog;
|
||||
import com.nis.domain.log.NtcSslRecordLog;
|
||||
import com.nis.domain.maat.LogRecvData;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.DictUtils;
|
||||
import com.nis.util.StringUtils;
|
||||
import com.nis.util.httpclient.HttpClientUtil;
|
||||
import com.nis.web.controller.BaseController;
|
||||
import com.nis.web.security.UserUtils;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("${adminPath}/log/ntc/sslRecord")
|
||||
@SuppressWarnings("all")
|
||||
public class SslRecordLogController extends BaseController {
|
||||
|
||||
@RequestMapping(value = { "list", "" })
|
||||
public String list(HttpServletRequest request, HttpServletResponse response, Model model,
|
||||
@ModelAttribute("log") NtcSslRecordLog NtcSslRecordLog) {
|
||||
|
||||
PageLog<NtcSslRecordLog> page = new PageLog<NtcSslRecordLog>(request, response);
|
||||
Map<String, Object> params = new HashMap<String, Object>();
|
||||
params.put("pageSize", page.getPageSize());
|
||||
params.put("pageNo", page.getPageNo());
|
||||
|
||||
// 请求参数判断
|
||||
initLogSearchValue(NtcSslRecordLog, params);
|
||||
if (StringUtils.isNotBlank(NtcSslRecordLog.getSni())) {
|
||||
params.put("SearchSni", NtcSslRecordLog.getSni());
|
||||
}
|
||||
|
||||
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(NtcSslRecordLog.getFunctionId());
|
||||
model.addAttribute("serviceList", serviceList);
|
||||
|
||||
try {
|
||||
// 请求接口
|
||||
String url = Constants.LOG_BASE_URL + Constants.NTC_SSL_RECORD_LOG;
|
||||
String resJson = HttpClientUtil.getMsg(url, params, request);
|
||||
Gson gson = new GsonBuilder().create();
|
||||
LogRecvData<NtcSslRecordLog> fromJson = gson.fromJson(resJson,
|
||||
new TypeToken<LogRecvData<NtcSslRecordLog>>() {
|
||||
}.getType());
|
||||
if (fromJson.getStatus().intValue() == 200) {
|
||||
Page<NtcSslRecordLog> data = fromJson.getData();
|
||||
page.setCount(data.getCount());
|
||||
page.setLast(data.getLast());
|
||||
page.setList(data.getList());
|
||||
List<NtcSslRecordLog> list = page.getList();
|
||||
for (NtcSslRecordLog log : list) {
|
||||
log.setFunctionId(NtcSslRecordLog.getFunctionId());
|
||||
setLogAction(log, serviceList);
|
||||
}
|
||||
model.addAttribute("page", page);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("SSL泛收日志查询失败", e);
|
||||
addMessageLog(model, e.getMessage());
|
||||
}
|
||||
|
||||
return "/log/ntc/sslRecordLogList";
|
||||
}
|
||||
|
||||
// Ssl泛收配置导出
|
||||
@RequestMapping(value = "exportSsl")
|
||||
public void exportSsl(@ModelAttribute("log") NtcSslRecordLog log, Model model, String hColumns, String type,
|
||||
HttpServletRequest request, HttpServletResponse response, RedirectAttributes redirectAttributes) {
|
||||
System.out.println("进来了ssl泛收");
|
||||
try {
|
||||
// export data info
|
||||
List<String> titleList = new ArrayList<String>();
|
||||
Map<String, Class<?>> classMap = new HashMap<String, Class<?>>();
|
||||
Map<String, List> dataMap = new HashMap<String, List>();
|
||||
Map<String, String> noExportMap = new HashMap<String, String>();
|
||||
PageLog<NtcSslRecordLog> page = new PageLog<NtcSslRecordLog>(request, response);
|
||||
List<NtcSslRecordLog> list = new ArrayList<NtcSslRecordLog>();
|
||||
page.setPageNo(1);
|
||||
page.setPageSize(Constants.MAX_LOG_EXPORT_SIZE);
|
||||
// ---------------------------
|
||||
Map<String, Object> params = new HashMap<String, Object>();
|
||||
params.put("pageSize", page.getPageSize());
|
||||
params.put("pageNo", page.getPageNo());
|
||||
// 请求参数判断
|
||||
initLogSearchValue(log, params);
|
||||
if (StringUtils.isNotBlank(log.getSni())) {
|
||||
params.put("SearchSni", log.getSni());
|
||||
}
|
||||
|
||||
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(log.getFunctionId());
|
||||
model.addAttribute("serviceList", serviceList);
|
||||
|
||||
String url = Constants.LOG_BASE_URL + Constants.NTC_SSL_RECORD_LOG;
|
||||
String recv = HttpClientUtil.getMsg(url, params, request);
|
||||
if (StringUtils.isNotBlank(recv)) {
|
||||
Gson gson = new GsonBuilder().create();
|
||||
LogRecvData<NtcSslRecordLog> fromJson = gson.fromJson(recv,
|
||||
new TypeToken<LogRecvData<NtcSslRecordLog>>() {
|
||||
}.getType());
|
||||
if (fromJson.getStatus().intValue() == 200) {
|
||||
Page<NtcSslRecordLog> data = fromJson.getData();
|
||||
list = data.getList();
|
||||
}
|
||||
}
|
||||
for (NtcSslRecordLog l : list) {
|
||||
l.setFunctionId(log.getFunctionId());
|
||||
setLogAction(l, serviceList);
|
||||
}
|
||||
titleList.add("ssl_record");
|
||||
classMap.put("ssl_record", NtcSslRecordLog.class);
|
||||
SysUser user = UserUtils.getUser();
|
||||
if (!user.isAdmin()) {
|
||||
hColumns += ",scene_file,";
|
||||
} else {
|
||||
hColumns += ",";
|
||||
}
|
||||
String cfgIndexInfoNoExport = "," + hColumns;
|
||||
noExportMap.put("ssl_record", cfgIndexInfoNoExport);
|
||||
dataMap.put("ssl_record", list);
|
||||
String timeRange = initLogMap(log, "ssl_record");
|
||||
noExportMap.put("timeRange", timeRange);
|
||||
/* } */
|
||||
if ("csv".equals(type)) {
|
||||
this._exportCsv(model, request, response, redirectAttributes, "ssl_record", titleList, classMap,
|
||||
dataMap, noExportMap);
|
||||
} else {
|
||||
this._export(model, request, response, redirectAttributes, "ssl_record", titleList, classMap, dataMap,
|
||||
noExportMap);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("ssl_record export failed", e);
|
||||
addMessage(redirectAttributes, "error", "export_failed");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -395,7 +395,32 @@ public class NtcEventBlockController extends BaseController {
|
||||
list = data.getList();
|
||||
}
|
||||
}
|
||||
|
||||
//计算合计,并添加在集合的最后位置
|
||||
Properties msgProp = getMsgProp();
|
||||
NtcEventMonitorOrBlockReport ntcEventMonitorOrBlockReport = new NtcEventMonitorOrBlockReport();
|
||||
long ipNum = 0;
|
||||
long httpNum = 0;
|
||||
long mailNum = 0;
|
||||
long vedioNum = 0;
|
||||
long agentNum = 0;
|
||||
for (NtcEventMonitorOrBlockReport entity : list) {
|
||||
ipNum += entity.getIpNum();
|
||||
httpNum += entity.getHttpNum();
|
||||
mailNum += entity.getMailNum();
|
||||
vedioNum += entity.getVedioNum();
|
||||
agentNum += entity.getAgentNum();
|
||||
}
|
||||
String report_total = msgProp.getProperty("report_total");
|
||||
ntcEventMonitorOrBlockReport.setIpNum(ipNum);
|
||||
ntcEventMonitorOrBlockReport.setHttpNum(httpNum);
|
||||
ntcEventMonitorOrBlockReport.setMailNum(mailNum);
|
||||
ntcEventMonitorOrBlockReport.setVedioNum(vedioNum);
|
||||
ntcEventMonitorOrBlockReport.setAgentNum(agentNum);
|
||||
ntcEventMonitorOrBlockReport.setTaskIds(report_total);
|
||||
ntcEventMonitorOrBlockReport.setTaskName(" 一 ");
|
||||
ntcEventMonitorOrBlockReport.setTaskTime(" 一 ");
|
||||
ntcEventMonitorOrBlockReport.setReportTime(" 一 ");
|
||||
list.add(ntcEventMonitorOrBlockReport);
|
||||
return list;
|
||||
} catch (Exception e) {
|
||||
logger.error("ntc_event_block_report print failed", e);
|
||||
|
||||
@@ -386,6 +386,30 @@ public class NtcEventKeyProtectionController extends BaseController {
|
||||
list = data.getList();
|
||||
}
|
||||
}
|
||||
//计算合计,并填加到集合最后
|
||||
Properties msgProp = getMsgProp();
|
||||
NtcEventKeyProtectionReport ntcEventKey=new NtcEventKeyProtectionReport();
|
||||
long letterNum=0;
|
||||
long configNum=0;
|
||||
long monitorNum=0;
|
||||
long controlNum=0;
|
||||
for (NtcEventKeyProtectionReport entity : list) {
|
||||
letterNum += entity.getLetterNum();
|
||||
configNum += entity.getConfigNum();
|
||||
monitorNum += entity.getMonitorNum();
|
||||
controlNum += entity.getControlNum();
|
||||
}
|
||||
String report_total=msgProp.getProperty("report_total");
|
||||
ntcEventKey.setLetterNum(letterNum);
|
||||
ntcEventKey.setConfigNum(configNum);
|
||||
ntcEventKey.setMonitorNum(monitorNum);
|
||||
ntcEventKey.setControlNum(controlNum);
|
||||
ntcEventKey.setTaskIds(report_total);
|
||||
ntcEventKey.setTaskName(" 一 ");
|
||||
ntcEventKey.setTaskTime(" 一 ");
|
||||
ntcEventKey.setReportTime(" 一 ");
|
||||
list.add(ntcEventKey);
|
||||
|
||||
return list;
|
||||
} catch (Exception e) {
|
||||
logger.error("ntc_event_key_protection_report print failed", e);
|
||||
|
||||
@@ -393,6 +393,32 @@ public class NtcEventMonitorController extends BaseController {
|
||||
list = data.getList();
|
||||
}
|
||||
}
|
||||
//计算合计,并添加到集合的最后
|
||||
Properties msgProp = getMsgProp();
|
||||
NtcEventMonitorOrBlockReport ntcEventMonitorOrBlockReport = new NtcEventMonitorOrBlockReport();
|
||||
long ipNum = 0;
|
||||
long httpNum = 0;
|
||||
long mailNum = 0;
|
||||
long vedioNum = 0;
|
||||
long agentNum = 0;
|
||||
for (NtcEventMonitorOrBlockReport entity : list) {
|
||||
ipNum += entity.getIpNum();
|
||||
httpNum += entity.getHttpNum();
|
||||
mailNum += entity.getMailNum();
|
||||
vedioNum += entity.getVedioNum();
|
||||
agentNum += entity.getAgentNum();
|
||||
}
|
||||
String report_total = msgProp.getProperty("report_total");
|
||||
ntcEventMonitorOrBlockReport.setIpNum(ipNum);
|
||||
ntcEventMonitorOrBlockReport.setHttpNum(httpNum);
|
||||
ntcEventMonitorOrBlockReport.setMailNum(mailNum);
|
||||
ntcEventMonitorOrBlockReport.setVedioNum(vedioNum);
|
||||
ntcEventMonitorOrBlockReport.setAgentNum(agentNum);
|
||||
ntcEventMonitorOrBlockReport.setTaskIds(report_total);
|
||||
ntcEventMonitorOrBlockReport.setTaskName(" 一 ");
|
||||
ntcEventMonitorOrBlockReport.setTaskTime(" 一 ");
|
||||
ntcEventMonitorOrBlockReport.setReportTime(" 一 ");
|
||||
list.add(ntcEventMonitorOrBlockReport);
|
||||
return list;
|
||||
} catch (Exception e) {
|
||||
logger.error("ntc_event_monitor_report print failed", e);
|
||||
|
||||
@@ -613,6 +613,23 @@ public class ReportController extends BaseController {
|
||||
list = data.getList();
|
||||
}
|
||||
}
|
||||
Properties msgProp = getMsgProp();
|
||||
NtcAsnRecord ntcAsnRecord = new NtcAsnRecord();
|
||||
double pps = 0;
|
||||
double bps = 0;
|
||||
for (NtcAsnRecord entity : list) {
|
||||
if (null != entity.getBps() && !"".equals(entity.getBps())) {
|
||||
bps += Double.valueOf(entity.getBps());
|
||||
}
|
||||
if (null != entity.getPps() && !"".equals(entity.getPps())) {
|
||||
pps += Double.valueOf(entity.getPps());
|
||||
}
|
||||
}
|
||||
String report_total = msgProp.getProperty("report_total");
|
||||
ntcAsnRecord.setAsn(report_total);
|
||||
ntcAsnRecord.setBps(String.format("%.2f", bps));
|
||||
ntcAsnRecord.setPps(String.format("%.2f", pps));
|
||||
list.add(ntcAsnRecord);
|
||||
return list;
|
||||
} catch (Exception e) {
|
||||
logger.error("Ntc_Asn_Record print failed", e);
|
||||
@@ -664,6 +681,19 @@ public class ReportController extends BaseController {
|
||||
list = data.getList();
|
||||
}
|
||||
}
|
||||
Properties msgProp = getMsgProp();
|
||||
NtcURLReport ntcURLReport = new NtcURLReport();
|
||||
long ipCount=0;
|
||||
long connCount=0;
|
||||
for (NtcURLReport entity : list) {
|
||||
ipCount += entity.getIpCount();
|
||||
connCount += entity.getConnCount();
|
||||
}
|
||||
String report_total = msgProp.getProperty("report_total");
|
||||
ntcURLReport.setIpCount(ipCount);
|
||||
ntcURLReport.setConnCount(connCount);
|
||||
ntcURLReport.setUrl(report_total);
|
||||
list.add(ntcURLReport);
|
||||
return list;
|
||||
} catch (Exception e) {
|
||||
logger.error("Ntc_HTTPS_Report print failed", e);
|
||||
|
||||
@@ -29,4 +29,7 @@ public interface AsnGroupInfoDao extends CrudDao<AsnGroupInfo> {
|
||||
List<AsnGroupInfo> findAsnGroupInfos();
|
||||
Long getCount();
|
||||
void modifyIssuedIp(AsnGroupInfo info);
|
||||
List<AsnGroupInfo> findAsnGroupInfoByAsnGroup(AsnGroupInfo asnGroupInfo);
|
||||
void updateIsUsedAndIsValid(@Param("asnNos")List asnNos,@Param("isUsed")Integer isUsed,@Param("isValid")Integer isValid);
|
||||
List<AsnGroupInfo> findAsnGroupInfoByAsnNos(@Param("asnNos")List asnNos,@Param("isUsed")Integer isUsed);
|
||||
}
|
||||
@@ -15,10 +15,12 @@
|
||||
<result column="editor_id" property="editorId" jdbcType="INTEGER" />
|
||||
<result column="asn_id" property="asnId" jdbcType="BIGINT" />
|
||||
<result column="issued_ips" property="issuedIPs" jdbcType="INTEGER" />
|
||||
<result column="is_used" property="isUsed" jdbcType="INTEGER" />
|
||||
<result column="region_id" property="regionId" jdbcType="INTEGER" />
|
||||
</resultMap>
|
||||
<sql id="AsnGroupInfoColumns">
|
||||
r.id,r.group_id,r.compile_id,r.organization,r.country,r.detail,r.is_valid,r.create_time,r.edit_time,
|
||||
r.creator_id,r.editor_id,r.asn_id,r.issued_ips
|
||||
r.creator_id,r.editor_id,r.asn_id,r.issued_ips,r.is_used,r.region_id
|
||||
</sql>
|
||||
|
||||
<!-- 查出所有 有效数据-->
|
||||
@@ -79,7 +81,7 @@
|
||||
<select id="findAsnGroupInfos" resultMap="AsnGroupInfoMap">
|
||||
SELECT
|
||||
<include refid="AsnGroupInfoColumns"/>
|
||||
FROM asn_group_info r where is_valid !=-1
|
||||
FROM asn_group_info r where r.is_valid !=-1
|
||||
</select>
|
||||
<select id="getCount" resultType="java.lang.Long">
|
||||
SELECT count(1)
|
||||
@@ -87,7 +89,20 @@
|
||||
</select>
|
||||
|
||||
<insert id="insert" parameterType="com.nis.domain.basics.AsnGroupInfo" >
|
||||
insert into asn_group_info(group_id,compile_id,organization,country,detail,is_valid,creator_id,create_time,editor_id,edit_time,asn_id
|
||||
insert into asn_group_info(
|
||||
group_id,
|
||||
compile_id,
|
||||
organization,
|
||||
country,
|
||||
detail,
|
||||
is_valid,
|
||||
creator_id,
|
||||
create_time,
|
||||
editor_id,
|
||||
edit_time,
|
||||
asn_id,
|
||||
is_used,
|
||||
region_id
|
||||
)values (
|
||||
#{groupId,jdbcType=INTEGER},
|
||||
#{compileId,jdbcType=INTEGER},
|
||||
@@ -99,7 +114,9 @@
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
#{editorId,jdbcType=INTEGER},
|
||||
#{editTime,jdbcType=TIMESTAMP},
|
||||
#{asnId,jdbcType=INTEGER}
|
||||
#{asnId,jdbcType=INTEGER},
|
||||
#{isUsed,jdbcType=INTEGER},
|
||||
#{regionId,jdbcType=INTEGER}
|
||||
)
|
||||
</insert>
|
||||
|
||||
@@ -137,6 +154,12 @@
|
||||
<if test="editTime != null and editTime != ''" >
|
||||
edit_time = #{editTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="isUsed != null" >
|
||||
is_used = #{isUsed,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="regionId != null" >
|
||||
region_id = #{regionId,jdbcType=INTEGER},
|
||||
</if>
|
||||
</trim>
|
||||
</set>
|
||||
<where>
|
||||
@@ -147,6 +170,28 @@
|
||||
</trim>
|
||||
</where>
|
||||
</update>
|
||||
<update id="updateIsUsedAndIsValid" >
|
||||
update asn_group_info
|
||||
<set >
|
||||
<if test="isUsed != null" >
|
||||
is_used = #{isUsed,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isValid != null" >
|
||||
is_valid = #{isValid,jdbcType=INTEGER},
|
||||
</if>
|
||||
</set>
|
||||
<where>
|
||||
<if test="asnNos != null" >
|
||||
and asn_id in
|
||||
<foreach collection ="asnNos" item="asnId" separator ="," open="(" close=")">
|
||||
#{asnId}
|
||||
</foreach >
|
||||
</if>
|
||||
<if test="isValid != null" >
|
||||
and is_valid != #{isValid,jdbcType=INTEGER}
|
||||
</if>
|
||||
</where>
|
||||
</update>
|
||||
<update id="updateValid" parameterType="com.nis.domain.basics.AsnGroupInfo" >
|
||||
update asn_group_info
|
||||
<set >
|
||||
@@ -205,7 +250,7 @@
|
||||
<select id="getByGroupId" resultType="com.nis.domain.basics.AsnGroupInfo">
|
||||
select <include refid="AsnGroupInfoColumns"/>
|
||||
from asn_group_info r
|
||||
where r.group_id =#{groupId} and is_valid !=-1
|
||||
where r.group_id =#{groupId} and r.is_valid !=-1
|
||||
</select>
|
||||
<select id="getGroupInfoByName" resultType="com.nis.domain.basics.AsnGroupInfo">
|
||||
select <include refid="AsnGroupInfoColumns"/>
|
||||
@@ -243,13 +288,13 @@
|
||||
SELECT
|
||||
<include refid="AsnGroupInfoColumns"/>
|
||||
FROM
|
||||
asn_group_info r WHERE group_id = #{groupId,jdbcType=INTEGER} AND is_valid !=-1
|
||||
asn_group_info r WHERE r.group_id = #{groupId,jdbcType=INTEGER} AND r.is_valid !=-1
|
||||
</select>
|
||||
<select id="getConfigGroupInfoByName" resultType="com.nis.domain.basics.AsnGroupInfo">
|
||||
SELECT
|
||||
<include refid="AsnGroupInfoColumns"/>
|
||||
FROM
|
||||
asn_group_info r WHERE organization = #{organization,jdbcType=VARCHAR} AND is_valid !=-1
|
||||
asn_group_info r WHERE r.organization = #{organization,jdbcType=VARCHAR} AND r.is_valid !=-1
|
||||
</select>
|
||||
<select id="getValidConfigGroupInfoByName" resultType="com.nis.domain.basics.AsnGroupInfo">
|
||||
SELECT
|
||||
@@ -278,11 +323,49 @@
|
||||
asn_group_info r
|
||||
<trim prefix="WHERE" prefixOverrides="AND |OR ">
|
||||
<if test="organization != null and organization != ''" >
|
||||
AND organization = #{organization,jdbcType=VARCHAR}
|
||||
AND r.organization = #{organization,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="asnId != null" >
|
||||
AND asn_id = #{asnId,jdbcType=INTEGER}
|
||||
AND r.asn_id = #{asnId,jdbcType=INTEGER}
|
||||
</if>
|
||||
</trim>
|
||||
</select>
|
||||
|
||||
<select id="findAsnGroupInfoByAsnGroup" resultMap="AsnGroupInfoMap">
|
||||
SELECT
|
||||
<include refid="AsnGroupInfoColumns"/>
|
||||
FROM
|
||||
asn_group_info r
|
||||
<where>
|
||||
<if test="asnId != null" >
|
||||
AND r.asn_id = #{asnId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isUsed != null" >
|
||||
AND r.is_used = #{isUsed,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="organization != null and organization != ''" >
|
||||
AND r.organization = #{organization,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="isValid != null" >
|
||||
AND r.is_valid = #{isValid,jdbcType=VARCHAR}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="findAsnGroupInfoByAsnNos" resultMap="AsnGroupInfoMap">
|
||||
SELECT
|
||||
<include refid="AsnGroupInfoColumns"/>
|
||||
FROM
|
||||
asn_group_info r
|
||||
<where>
|
||||
<if test="isUsed != null" >
|
||||
AND r.is_used = #{isUsed,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="asnNos != null" >
|
||||
and r.asn_id in
|
||||
<foreach collection ="asnNos" item="asnId" separator ="," open="(" close=")">
|
||||
#{asnId}
|
||||
</foreach >
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -4,6 +4,7 @@ import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import com.nis.domain.basics.AsnGroupInfo;
|
||||
import com.nis.domain.basics.AsnIpCfg;
|
||||
import com.nis.domain.basics.Varibles;
|
||||
import com.nis.web.dao.CrudDao;
|
||||
@@ -20,6 +21,7 @@ public interface AsnIpCfgDao extends CrudDao<AsnIpCfg>{
|
||||
public List<Integer> hasASNIds(@Param("ids")String ids);
|
||||
public List<Integer> hasASNIpAddrs(@Param("ids")String ids);
|
||||
public List<AsnIpCfg> findAllList(AsnIpCfg cfg);
|
||||
public List<AsnIpCfg> findAllListByAsnGroup(@Param("entity")AsnIpCfg entity,@Param("asnGroups")List<AsnGroupInfo> asnGroups,@Param("asnIds")String asnIds);
|
||||
// public List<ConfigGroupInfo> findPolicyGroupInfosByType(@Param("groupId")Integer groupId);
|
||||
public List<Integer> findOtherIps(@Param("groupId")Integer groupId,@Param("cfgId")Integer cfgId);
|
||||
public List<Integer> countValidIPs(@Param("groups")String groups,@Param("ids")String ids);
|
||||
@@ -32,4 +34,5 @@ public interface AsnIpCfgDao extends CrudDao<AsnIpCfg>{
|
||||
public int hasValidAsnIp(@Param("asnId")Long asnNo);
|
||||
public AsnIpCfg getOne(AsnIpCfg cfg);
|
||||
public void updateAsn(@Param("asnId")String asnNo,@Param("organization")String organization,@Param("country")String country,@Param("detail")String detail);
|
||||
public void updateAsnIpByAsnGroups(@Param("entity")AsnIpCfg entity,@Param("asnGroups")List<AsnGroupInfo> asnGroups,@Param("asnIds")String asnIds);
|
||||
}
|
||||
|
||||
@@ -308,6 +308,26 @@
|
||||
AND r.asn_ip_group =#{asnIpGroup}
|
||||
</if>
|
||||
</select>
|
||||
<select id="findAllListByAsnGroup" resultMap="asnIpCfgMap">
|
||||
select
|
||||
<include refid="columns"></include>
|
||||
from asn_ip_cfg r
|
||||
<where>
|
||||
and is_valid=#{entity.isValid,jdbcType=INTEGER}
|
||||
and is_audit=#{entity.isAudit,jdbcType=INTEGER}
|
||||
<if test=" asnGroups != null">
|
||||
and r.user_region1 in
|
||||
<foreach collection ="asnGroups" item="asnGroup" separator ="," open="(" close=")">
|
||||
#{asnGroup.asnId,jdbcType=INTEGER}
|
||||
</foreach >
|
||||
</if>
|
||||
<if test=" asnIds != null and asnIds !=''">
|
||||
and r.user_region1 in (select asn_id from asn_group_info where asn_id in(${asnIds}) and is_used=0)
|
||||
|
||||
</if>
|
||||
</where>
|
||||
|
||||
</select>
|
||||
<select id="getByIds" resultMap="asnIpCfgMap">
|
||||
select
|
||||
<include refid="columns"></include>
|
||||
@@ -627,6 +647,26 @@
|
||||
<!-- left join policy_group_info d on r.asn_ip_group = d.service_group_id -->
|
||||
where r.CFG_ID in (${ids})
|
||||
</select>
|
||||
|
||||
<update id="updateAsnIpByAsnGroups" >
|
||||
update asn_ip_cfg set
|
||||
<if test=" asnIds != null and asnIds !=''">
|
||||
is_valid=#{entity.isValid} ,
|
||||
is_audit=#{entity.isAudit},
|
||||
</if>
|
||||
AUDITOR_ID = #{entity.auditorId,jdbcType=INTEGER}
|
||||
,AUDIT_TIME = #{entity.auditTime,jdbcType=TIMESTAMP}
|
||||
<where>
|
||||
<if test=" asnGroups != null">
|
||||
and user_region1 in
|
||||
<foreach collection ="asnGroups" item="asnGroup" separator ="," open="(" close=")">
|
||||
#{asnGroup.asnId,jdbcType=INTEGER}
|
||||
</foreach >
|
||||
</if>
|
||||
<if test=" asnIds != null and asnIds !=''">
|
||||
and user_region1 in (select asn_id from asn_group_info where asn_id in(${asnIds}) and is_used=0)
|
||||
|
||||
</if>
|
||||
</where>
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
@@ -115,6 +115,9 @@
|
||||
<result column="icmp_code" property="icmpCode" jdbcType="VARCHAR" />
|
||||
<result column="icmp_identifier" property="icmpIdentifier" jdbcType="VARCHAR" />
|
||||
<result column="header_type" property="headerType" jdbcType="VARCHAR" />
|
||||
<result column="payload_offset" property="payloadOffset" jdbcType="INTEGER" />
|
||||
<result column="payload_size" property="payloadSize" jdbcType="INTEGER" />
|
||||
<result column="payload_packet_direction" property="payloadPacketDirection" jdbcType="VARCHAR" />
|
||||
</resultMap>
|
||||
<!-- APP字符串类配置映射 -->
|
||||
<resultMap id="AppStringFeatureCfgMap" type="com.nis.domain.configuration.AppStringFeatureCfg" >
|
||||
@@ -204,7 +207,7 @@
|
||||
r.ATTRIBUTE,r.LABLE,r.AREA_EFFECTIVE_IDS,r.FUNCTION_ID,r.CFG_TYPE,r.CFG_REGION_CODE,
|
||||
r.DISTRICT,r.CFG_KEYWORDS,r.EXPR_TYPE,r.MATCH_METHOD,r.IS_HEXBIN,r.DO_LOG,
|
||||
r.ver,r.ihl,r.tos,r.total_length,r.flags,r.fragment_offset,r.protocol,r.icmp_type,r.icmp_code,r.icmp_identifier,
|
||||
r.header_type
|
||||
r.header_type,r.payload_offset,r.payload_size,r.payload_packet_direction
|
||||
</sql>
|
||||
|
||||
<sql id="AppStringFeatureCfg_Column" >
|
||||
@@ -540,7 +543,8 @@
|
||||
SERVICE_ID,REQUEST_ID,COMPILE_ID,IS_AREA_EFFECTIVE,CLASSIFY,
|
||||
ATTRIBUTE,LABLE,AREA_EFFECTIVE_IDS,FUNCTION_ID,CFG_TYPE,CFG_REGION_CODE,
|
||||
DISTRICT,CFG_KEYWORDS,EXPR_TYPE,MATCH_METHOD,IS_HEXBIN,DO_LOG,user_region1,user_region2,user_region3,user_region4,user_region5,
|
||||
ver,ihl,tos,total_length,flags,fragment_offset,protocol,icmp_type,icmp_code,icmp_identifier,header_type
|
||||
ver,ihl,tos,total_length,flags,fragment_offset,protocol,icmp_type,icmp_code,icmp_identifier,header_type,
|
||||
payload_offset,payload_size,payload_packet_direction
|
||||
)values (
|
||||
<include refid="AppCommonCfg_Value_List" />,
|
||||
#{cfgType,jdbcType=VARCHAR},#{cfgRegionCode,jdbcType=INTEGER},
|
||||
@@ -550,7 +554,8 @@
|
||||
#{userRegion3,jdbcType=VARCHAR},#{userRegion4,jdbcType=VARCHAR},#{userRegion5,jdbcType=VARCHAR},
|
||||
#{ver,jdbcType=VARCHAR},#{ihl,jdbcType=VARCHAR},#{tos,jdbcType=VARCHAR},#{totalLength,jdbcType=VARCHAR},
|
||||
#{flags,jdbcType=VARCHAR},#{fragmentOffset,jdbcType=VARCHAR},#{protocol,jdbcType=VARCHAR},#{icmpType,jdbcType=VARCHAR},
|
||||
#{icmpCode,jdbcType=VARCHAR},#{icmpIdentifier,jdbcType=VARCHAR},#{headerType,jdbcType=VARCHAR}
|
||||
#{icmpCode,jdbcType=VARCHAR},#{icmpIdentifier,jdbcType=VARCHAR},#{headerType,jdbcType=VARCHAR},
|
||||
#{payloadOffset,jdbcType=INTEGER},#{payloadSize,jdbcType=INTEGER},#{payloadPacketDirection,jdbcType=VARCHAR}
|
||||
)
|
||||
</insert>
|
||||
|
||||
@@ -562,7 +567,8 @@
|
||||
SERVICE_ID,REQUEST_ID,COMPILE_ID,IS_AREA_EFFECTIVE,CLASSIFY,
|
||||
ATTRIBUTE,LABLE,AREA_EFFECTIVE_IDS,FUNCTION_ID,CFG_TYPE,CFG_REGION_CODE,
|
||||
DISTRICT,CFG_KEYWORDS,EXPR_TYPE,MATCH_METHOD,IS_HEXBIN,DO_LOG,user_region1,user_region2,user_region3,user_region4,user_region5,
|
||||
ver,ihl,tos,total_length,flags,fragment_offset,protocol,icmp_type,icmp_code,icmp_identifier,header_type
|
||||
ver,ihl,tos,total_length,flags,fragment_offset,protocol,icmp_type,icmp_code,icmp_identifier,header_type,
|
||||
payload_offset,payload_size,payload_packet_direction
|
||||
)values (
|
||||
<include refid="AppCommonCfg_Value_List" />,
|
||||
#{cfgType,jdbcType=VARCHAR},#{cfgRegionCode,jdbcType=INTEGER},
|
||||
@@ -572,7 +578,8 @@
|
||||
#{userRegion3,jdbcType=VARCHAR},#{userRegion4,jdbcType=VARCHAR},#{userRegion5,jdbcType=VARCHAR},
|
||||
#{ver,jdbcType=VARCHAR},#{ihl,jdbcType=VARCHAR},#{tos,jdbcType=VARCHAR},#{totalLength,jdbcType=VARCHAR},
|
||||
#{flags,jdbcType=VARCHAR},#{fragmentOffset,jdbcType=VARCHAR},#{protocol,jdbcType=VARCHAR},#{icmpType,jdbcType=VARCHAR},
|
||||
#{icmpCode,jdbcType=VARCHAR},#{icmpIdentifier,jdbcType=VARCHAR},#{headerType,jdbcType=VARCHAR}
|
||||
#{icmpCode,jdbcType=VARCHAR},#{icmpIdentifier,jdbcType=VARCHAR},#{headerType,jdbcType=VARCHAR},
|
||||
#{payloadOffset,jdbcType=INTEGER},#{payloadSize,jdbcType=INTEGER},#{payloadPacketDirection,jdbcType=VARCHAR}
|
||||
)
|
||||
</insert>
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
<result column="cfg_type" property="cfgType" jdbcType="VARCHAR" />
|
||||
<result column="dns_strategy_id" property="dnsStrategyId" jdbcType="INTEGER" />
|
||||
<result column="dns_strategy_name" property="dnsStrategyName" jdbcType="VARCHAR" />
|
||||
<result column="do_log" property="doLog" jdbcType="INTEGER" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="columns">
|
||||
@@ -44,7 +45,7 @@
|
||||
,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
|
||||
,r.area_effective_ids,r.function_id,r.cfg_region_code,r.dns_strategy_id,r.do_log
|
||||
</sql>
|
||||
|
||||
<select id="findPage" resultMap="dnsIpCfgMap">
|
||||
@@ -239,7 +240,8 @@
|
||||
dest_ip_address,
|
||||
cfg_type,
|
||||
cfg_region_code,
|
||||
dns_strategy_id
|
||||
dns_strategy_id,
|
||||
do_log
|
||||
)values (
|
||||
#{cfgDesc,jdbcType=VARCHAR},
|
||||
#{action,jdbcType=INTEGER},
|
||||
@@ -272,7 +274,8 @@
|
||||
#{destIpAddress,jdbcType=VARCHAR},
|
||||
#{cfgType,jdbcType=VARCHAR},
|
||||
#{cfgRegionCode,jdbcType=INTEGER},
|
||||
#{dnsStrategyId,jdbcType=INTEGER}
|
||||
#{dnsStrategyId,jdbcType=INTEGER},
|
||||
#{doLog,jdbcType=INTEGER}
|
||||
)
|
||||
</insert>
|
||||
|
||||
@@ -369,6 +372,9 @@
|
||||
</if>
|
||||
<if test="dnsStrategyId != null " >
|
||||
dns_strategy_id = #{dnsStrategyId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="doLog != null" >
|
||||
do_log = #{doLog,jdbcType=INTEGER},
|
||||
</if>
|
||||
</trim>
|
||||
</set>
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
<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" />
|
||||
<result column="do_log" property="doLog" jdbcType="INTEGER" />
|
||||
</resultMap>
|
||||
<sql id="DnsResStrategyColumns">
|
||||
r.cfg_id,r.cfg_desc,r.res_group_1_id,
|
||||
@@ -47,7 +48,7 @@
|
||||
,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.is_area_effective,r.classify,r.attribute,r.lable,r.do_log
|
||||
,r.area_effective_ids,r.function_id,r.cfg_region_code,r.compile_id
|
||||
</sql>
|
||||
|
||||
@@ -229,7 +230,8 @@ LEFT JOIN dns_res_strategy r ON a.dns_strategy_id=r.res_group_1_id
|
||||
max_ttl,
|
||||
cfg_type,
|
||||
compile_Id,
|
||||
cfg_region_code
|
||||
cfg_region_code,
|
||||
do_log
|
||||
)values (
|
||||
#{cfgDesc,jdbcType=VARCHAR},
|
||||
#{action,jdbcType=INTEGER},
|
||||
@@ -263,7 +265,8 @@ LEFT JOIN dns_res_strategy r ON a.dns_strategy_id=r.res_group_1_id
|
||||
#{maxTtl,jdbcType=INTEGER},
|
||||
#{cfgType,jdbcType=VARCHAR},
|
||||
#{compileId,jdbcType=INTEGER},
|
||||
#{cfgRegionCode,jdbcType=INTEGER}
|
||||
#{cfgRegionCode,jdbcType=INTEGER},
|
||||
#{doLog,jdbcType=INTEGER}
|
||||
)
|
||||
</insert>
|
||||
|
||||
@@ -358,6 +361,9 @@ LEFT JOIN dns_res_strategy r ON a.dns_strategy_id=r.res_group_1_id
|
||||
<if test="maxTtl != null" >
|
||||
max_ttl = #{maxTtl,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="doLog != null" >
|
||||
do_log = #{doLog,jdbcType=INTEGER},
|
||||
</if>
|
||||
</trim>
|
||||
</set>
|
||||
<where>
|
||||
|
||||
@@ -80,6 +80,7 @@
|
||||
<result column="user_region3" property="userRegion3" jdbcType="VARCHAR" />
|
||||
<result column="user_region4" property="userRegion4" jdbcType="VARCHAR" />
|
||||
<result column="user_region5" property="userRegion5" jdbcType="VARCHAR" />
|
||||
<result column="common_group_ids" property="commonGroupIds" jdbcType="VARCHAR" />
|
||||
</resultMap>
|
||||
<resultMap id="ipPortMap" type="com.nis.domain.configuration.IpPortCfg" >
|
||||
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
||||
@@ -198,7 +199,7 @@
|
||||
a.CREATOR_ID,a.CREATE_TIME,a.EDITOR_ID,a.EDIT_TIME,a.AUDITOR_ID,a.AUDIT_TIME,
|
||||
a.SERVICE_ID,a.REQUEST_ID,a.COMPILE_ID,a.IS_AREA_EFFECTIVE,a.CLASSIFY,
|
||||
a.ATTRIBUTE,a.LABLE,a.AREA_EFFECTIVE_IDS,a.function_id,a.dns_strategy_id,a.user_region1,
|
||||
a.user_region2,a.user_region3,a.user_region4,a.user_region5,a.do_log,a.do_blacklist
|
||||
a.user_region2,a.user_region3,a.user_region4,a.user_region5,a.do_log,a.do_blacklist,a.common_group_ids
|
||||
</sql>
|
||||
<sql id="IpCfg_Column" >
|
||||
a.cfg_id,a.cfg_desc,a.ip_type,a.src_ip_address,a.ip_pattern,a.port_pattern,a.src_port
|
||||
@@ -812,6 +813,7 @@
|
||||
user_region5,
|
||||
do_log,
|
||||
do_blacklist
|
||||
,common_group_ids
|
||||
)values (
|
||||
#{cfgDesc,jdbcType=VARCHAR},
|
||||
#{action,jdbcType=INTEGER},
|
||||
@@ -839,7 +841,8 @@
|
||||
#{userRegion4,jdbcType=VARCHAR},
|
||||
#{userRegion5,jdbcType=VARCHAR},
|
||||
#{doLog,jdbcType=INTEGER},
|
||||
#{doBlackList,jdbcType=INTEGER}
|
||||
#{doBlackList,jdbcType=INTEGER},
|
||||
#{commonGroupIds,jdbcType=VARCHAR}
|
||||
)
|
||||
</insert>
|
||||
<insert id="saveCfgIndexForBatch" parameterType="com.nis.domain.configuration.CfgIndexInfo" >
|
||||
@@ -870,7 +873,8 @@
|
||||
user_region4,
|
||||
user_region5,
|
||||
do_log,
|
||||
do_blacklist
|
||||
do_blacklist,
|
||||
common_group_ids
|
||||
)values (
|
||||
#{cfgDesc,jdbcType=VARCHAR},
|
||||
#{action,jdbcType=INTEGER},
|
||||
@@ -898,7 +902,8 @@
|
||||
#{userRegion4,jdbcType=VARCHAR},
|
||||
#{userRegion5,jdbcType=VARCHAR},
|
||||
#{doLog,jdbcType=INTEGER},
|
||||
#{doBlackList,jdbcType=INTEGER}
|
||||
#{doBlackList,jdbcType=INTEGER},
|
||||
#{commonGroupIds,jdbcType=VARCHAR}
|
||||
)
|
||||
</insert>
|
||||
<!-- insert ip_port_cfg表信息 -->
|
||||
@@ -990,6 +995,7 @@
|
||||
action = #{action,jdbcType=INTEGER},
|
||||
do_log = #{doLog,jdbcType=INTEGER},
|
||||
do_blacklist = #{doBlackList,jdbcType=INTEGER},
|
||||
common_group_ids = #{commonGroupIds,jdbcType=VARCHAR},
|
||||
is_valid = #{isValid,jdbcType=INTEGER},
|
||||
is_audit = #{isAudit,jdbcType=INTEGER},
|
||||
<if test="creatorId != null" >
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
<result column="cfg_region_code" property="cfgRegionCode" jdbcType="INTEGER" />
|
||||
<result column="cfg_type" property="cfgType" jdbcType="VARCHAR" />
|
||||
<result column="compile_id" property="compileId" jdbcType="INTEGER" />
|
||||
<result column="do_log" property="doLog" jdbcType="INTEGER" />
|
||||
</resultMap>
|
||||
<resultMap id="PxyObjTrustedCaCertMap" type="com.nis.domain.configuration.PxyObjTrustedCaCert" >
|
||||
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
||||
@@ -64,6 +65,7 @@
|
||||
<result column="cfg_type" property="cfgType" jdbcType="VARCHAR" />
|
||||
<result column="compile_id" property="compileId" jdbcType="INTEGER" />
|
||||
<result column="cancel_request_id" property="cancelRequestId" jdbcType="INTEGER" />
|
||||
<result column="do_log" property="doLog" jdbcType="INTEGER" />
|
||||
</resultMap>
|
||||
<resultMap id="PxyObjTrustedCaCrlMap" type="com.nis.domain.configuration.PxyObjTrustedCaCrl" >
|
||||
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
||||
@@ -100,7 +102,7 @@
|
||||
,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,r.cancel_request_id
|
||||
,r.area_effective_ids,r.function_id,r.cfg_region_code,r.compile_id,r.cancel_request_id,r.do_log
|
||||
</sql>
|
||||
<sql id="PxyObjTrustedCaCrlColumns">
|
||||
r.cfg_id,r.cfg_desc
|
||||
@@ -131,7 +133,7 @@
|
||||
,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
|
||||
,r.area_effective_ids,r.function_id,r.cfg_region_code,r.compile_id,r.do_log
|
||||
</sql>
|
||||
|
||||
<!-- 查出所有 有效数据-->
|
||||
@@ -391,7 +393,8 @@
|
||||
alt_name,
|
||||
cfg_type,
|
||||
compile_Id,
|
||||
cfg_region_code
|
||||
cfg_region_code,
|
||||
do_log
|
||||
)values (
|
||||
#{cfgId,jdbcType=VARCHAR},
|
||||
#{cfgDesc,jdbcType=VARCHAR},
|
||||
@@ -426,7 +429,8 @@
|
||||
#{altName,jdbcType=VARCHAR},
|
||||
#{cfgType,jdbcType=VARCHAR},
|
||||
#{compileId,jdbcType=INTEGER},
|
||||
#{cfgRegionCode,jdbcType=INTEGER}
|
||||
#{cfgRegionCode,jdbcType=INTEGER},
|
||||
#{doLog,jdbcType=INTEGER}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertPxyObjTrustedCaCert" parameterType="com.nis.domain.configuration.PxyObjTrustedCaCert" >
|
||||
@@ -454,7 +458,8 @@
|
||||
issuer,
|
||||
cfg_type,
|
||||
compile_Id,
|
||||
cfg_region_code
|
||||
cfg_region_code,
|
||||
do_log
|
||||
)values (
|
||||
#{cfgId,jdbcType=VARCHAR},
|
||||
#{cfgDesc,jdbcType=VARCHAR},
|
||||
@@ -479,7 +484,8 @@
|
||||
#{issuer, jdbcType=VARCHAR},
|
||||
#{cfgType,jdbcType=VARCHAR},
|
||||
#{compileId,jdbcType=INTEGER},
|
||||
#{cfgRegionCode,jdbcType=INTEGER}
|
||||
#{cfgRegionCode,jdbcType=INTEGER},
|
||||
#{doLog,jdbcType=INTEGER}
|
||||
)
|
||||
</insert>
|
||||
|
||||
@@ -546,6 +552,9 @@
|
||||
</if>
|
||||
<if test="issuer != null and issuer !=''" >
|
||||
issuer = #{issuer,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="doLog != null" >
|
||||
do_log = #{doLog,jdbcType=INTEGER},
|
||||
</if>
|
||||
</trim>
|
||||
</set>
|
||||
@@ -787,6 +796,9 @@
|
||||
<if test="altName != null and altName !=''" >
|
||||
alt_name = #{altName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="doLog != null" >
|
||||
do_log = #{doLog,jdbcType=INTEGER},
|
||||
</if>
|
||||
</trim>
|
||||
</set>
|
||||
<where>
|
||||
|
||||
@@ -180,8 +180,8 @@
|
||||
)values (
|
||||
#{cfgDesc,jdbcType=VARCHAR},
|
||||
#{action,jdbcType=INTEGER},
|
||||
0,
|
||||
0,
|
||||
#{isValid,jdbcType=INTEGER},
|
||||
#{isAudit,jdbcType=INTEGER},
|
||||
#{creatorId,jdbcType=INTEGER},
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
#{editorId,jdbcType=INTEGER},
|
||||
|
||||
@@ -5,6 +5,7 @@ import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import com.nis.domain.configuration.AsnKeywordCfg;
|
||||
import com.nis.domain.configuration.BaseCfg;
|
||||
import com.nis.domain.configuration.BaseStringCfg;
|
||||
import com.nis.domain.configuration.CfgIndexInfo;
|
||||
import com.nis.domain.configuration.ComplexkeywordCfg;
|
||||
@@ -24,6 +25,7 @@ public interface StringCfgDao extends CrudDao<BaseStringCfg>{
|
||||
public List<BaseStringCfg> findList(BaseStringCfg entity) ;
|
||||
public int insert(BaseStringCfg entity) ;
|
||||
public int update(BaseStringCfg entity) ;
|
||||
public int updateAsnKeyword(BaseStringCfg entity) ;
|
||||
public int updateValid(BaseStringCfg entity) ;
|
||||
public int audit(BaseStringCfg entity) ;
|
||||
public int getIsValid(@Param("tableName")String tableName,@Param("cfgId")Long id);
|
||||
@@ -46,7 +48,7 @@ public interface StringCfgDao extends CrudDao<BaseStringCfg>{
|
||||
public void deleteByCompileIds(@Param("user")long user,@Param("tableName")String tableName,@Param("compileIds")String compileIds);
|
||||
public List<NtcSubscribeIdCfg> findSubscribeIdCfgListByCfgIndexInfo(CfgIndexInfo entity);
|
||||
public void deleteSubscribeIdCfgByCfgIndexInfo(CfgIndexInfo entity);
|
||||
public void deleteAsnKeyword(CfgIndexInfo entity);
|
||||
public void deleteAsnKeyword(BaseCfg entity);
|
||||
public List<NtcSubscribeIdCfg> findSubscribeIdCfgList(NtcSubscribeIdCfg ntcSubscribeIdCfg);
|
||||
public List<AsnKeywordCfg> findAsnKeywordCfgList(CfgIndexInfo entity);
|
||||
public void saveSubscribeIdCfg(NtcSubscribeIdCfg ntcSubscribeIdCfg);
|
||||
|
||||
@@ -483,6 +483,95 @@
|
||||
where cfg_id = #{cfgId,jdbcType=BIGINT}
|
||||
</update>
|
||||
|
||||
<update id="updateAsnKeyword" parameterType="com.nis.domain.configuration.BaseStringCfg" >
|
||||
update ${tableName}
|
||||
<set >
|
||||
<trim suffixOverrides=",">
|
||||
<if test="cfgDesc != null and cfgDesc != ''" >
|
||||
cfg_desc = #{cfgDesc,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="cfgKeywords != null and cfgKeywords != ''">
|
||||
cfg_keywords = #{cfgKeywords,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="cfgType != null and cfgType != ''">
|
||||
CFG_TYPE=#{cfgType,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="creatorId != null" >
|
||||
creator_id = #{creatorId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="createTime != null" >
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</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="serviceId != null" >
|
||||
service_id = #{serviceId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="requestId != null" >
|
||||
request_id = #{requestId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="compileId != null" >
|
||||
compile_id = #{compileId,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="exprType != null">
|
||||
expr_type=#{exprType,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="matchMethod != null">
|
||||
match_method=#{matchMethod,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isHexbin != null">
|
||||
is_hexbin=#{isHexbin,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="areaEffectiveIds != null" >
|
||||
area_effective_ids = #{areaEffectiveIds,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="functionId != null" >
|
||||
function_id = #{functionId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="cfgRegionCode != null" >
|
||||
cfg_region_code = #{cfgRegionCode,jdbcType=INTEGER},
|
||||
</if>
|
||||
USER_REGION1=#{userRegion1,jdbcType=VARCHAR},
|
||||
USER_REGION2=#{userRegion2,jdbcType=VARCHAR},
|
||||
USER_REGION3=#{userRegion3,jdbcType=VARCHAR},
|
||||
USER_REGION4=#{userRegion4,jdbcType=VARCHAR},
|
||||
USER_REGION5=#{userRegion5,jdbcType=VARCHAR},
|
||||
</trim>
|
||||
</set>
|
||||
where cfg_id = #{cfgId,jdbcType=BIGINT}
|
||||
</update>
|
||||
|
||||
<update id="updateValid" parameterType="com.nis.domain.configuration.BaseStringCfg" >
|
||||
update ${tableName} set is_valid = #{isValid,jdbcType=INTEGER}, editor_id = #{editorId,jdbcType=INTEGER} , edit_time = #{editTime,jdbcType=TIMESTAMP} where cfg_id = #{cfgId,jdbcType=BIGINT}
|
||||
</update>
|
||||
@@ -752,7 +841,7 @@
|
||||
</if>
|
||||
</where>
|
||||
</delete>
|
||||
<delete id="deleteAsnKeyword" parameterType="com.nis.domain.configuration.CfgIndexInfo" >
|
||||
<delete id="deleteAsnKeyword" parameterType="com.nis.domain.configuration.BaseCfg" >
|
||||
delete from asn_keyword_cfg
|
||||
<where>
|
||||
<if test="compileId != null" >
|
||||
|
||||
@@ -15,6 +15,7 @@ public interface ConfigGroupInfoDao extends CrudDao<ConfigGroupInfo>{
|
||||
void insertConfigGroupInfo(ConfigGroupInfo entity);
|
||||
int insertBatch(List<ConfigGroupInfo> list);
|
||||
void updateConfigGroupInfobyGroupId(ConfigGroupInfo entity);
|
||||
void updateAsnOrgGroupByGroupInfo(ConfigGroupInfo entity);
|
||||
ConfigGroupInfo getConfigGroupInfoByGroupId(Integer groupId);
|
||||
@Cacheable(value="asnNoCache",key="#asnNo")
|
||||
ConfigGroupInfo getInfoByAsnNo(@Param("asnId")Long asnNo);
|
||||
@@ -23,4 +24,6 @@ public interface ConfigGroupInfoDao extends CrudDao<ConfigGroupInfo>{
|
||||
//获取asn组织的groupId
|
||||
ConfigGroupInfo getAsnGroupByName(@Param("groupName")String groupName);
|
||||
int delAsnGroup(@Param("groupName")String groupName);
|
||||
void updateIsAuditAll(@Param("groupType")Integer groupType,@Param("isAuditAll")Integer isAuditAll,@Param("groupIds")List groupIds);
|
||||
void updateIsUsed(@Param("groupType")Integer groupType,@Param("isUsed")Integer isUsed,@Param("groupIds")List groupIds);
|
||||
}
|
||||
|
||||
@@ -10,11 +10,12 @@
|
||||
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
|
||||
<result column="group_type" property="groupType" jdbcType="INTEGER" />
|
||||
<result column="compile_id" property="compileId" jdbcType="INTEGER" />
|
||||
<result column="asn_id" property="asnId" jdbcType="BIGINT" />
|
||||
<result column="is_audit_all" property="isAuditAll" jdbcType="INTEGER" />
|
||||
<result column="is_used" property="isUsed" jdbcType="INTEGER" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="columns">
|
||||
id,group_id,group_name,is_issued,insert_time,update_time,group_type,compile_id,asn_id
|
||||
id,group_id,group_name,is_issued,insert_time,update_time,group_type,compile_id,asn_id,is_audit_all
|
||||
</sql>
|
||||
<select id="findAllList" resultMap="configGroupInfoMap">
|
||||
select
|
||||
@@ -43,14 +44,14 @@
|
||||
</select>
|
||||
<!-- 新增配置分组信息 -->
|
||||
<insert id="insertConfigGroupInfo" parameterType="com.nis.domain.specific.ConfigGroupInfo" useGeneratedKeys="true">
|
||||
insert into config_group_info (id,group_id,group_name,is_issued,insert_time,group_type,compile_id,asn_id)
|
||||
values(#{id},#{groupId},#{groupName},#{isIssued},now(),#{groupType},#{compileId},#{asnId})
|
||||
insert into config_group_info (id,group_id,group_name,is_issued,insert_time,group_type,compile_id,asn_id,is_audit_all,is_used)
|
||||
values(#{id},#{groupId},#{groupName},#{isIssued},now(),#{groupType},#{compileId},#{asnId},#{isAuditAll},#{isUsed})
|
||||
</insert>
|
||||
<insert id="insertBatch">
|
||||
insert into config_group_info (id,group_id,group_name,is_issued,insert_time,group_type,compile_id,asn_id)
|
||||
insert into config_group_info (id,group_id,group_name,is_issued,insert_time,group_type,compile_id,asn_id,is_audit_all,is_used)
|
||||
values
|
||||
<foreach collection ="list" item="info" separator =",">
|
||||
(#{info.id},#{info.groupId},#{info.groupName},#{info.isIssued},now(),#{info.groupType},#{info.compileId},#{info.asnId})
|
||||
(#{info.id},#{info.groupId},#{info.groupName},#{info.isIssued},now(),#{info.groupType},#{info.compileId},#{info.asnId},#{info.isAuditAll},#{info.isUsed})
|
||||
</foreach>
|
||||
</insert>
|
||||
<!-- 修改配置分组状态信息 -->
|
||||
@@ -62,16 +63,16 @@
|
||||
where group_id = #{groupId}
|
||||
</update>
|
||||
<select id="getInfoByAsnNo" resultType="com.nis.domain.specific.ConfigGroupInfo" parameterType="java.lang.Long">
|
||||
select id,group_id,group_name,is_issued,insert_time,update_time,group_type,compile_id,asn_id
|
||||
select id,group_id,group_name,is_issued,insert_time,update_time,group_type,compile_id,asn_id,is_audit_all,is_used
|
||||
from config_group_info c where c.asn_id= #{asnId} and c.group_type=4
|
||||
</select>
|
||||
<!-- 根据groupId查出配置分组信息 -->
|
||||
<select id="getConfigGroupInfoByGroupId" resultType="com.nis.domain.specific.ConfigGroupInfo" parameterType="java.lang.Integer">
|
||||
select id,group_id,group_name,is_issued,insert_time,update_time,group_type,compile_id,asn_id
|
||||
select id,group_id,group_name,is_issued,insert_time,update_time,group_type,compile_id,asn_id,is_audit_all,is_used
|
||||
from config_group_info where group_id= #{groupId}
|
||||
</select>
|
||||
<select id="getAsnGroupByName" resultType="com.nis.domain.specific.ConfigGroupInfo" parameterType="java.lang.String">
|
||||
select id,group_id,group_name,is_issued,insert_time,update_time,group_type,compile_id,asn_id
|
||||
select id,group_id,group_name,is_issued,insert_time,update_time,group_type,compile_id,asn_id,is_audit_all,is_used
|
||||
from config_group_info where group_type=4 and group_name= #{groupName}
|
||||
</select>
|
||||
<!-- <select id="findPolicyGroupInfosByType" resultType="com.nis.domain.specific.ConfigGroupInfo" parameterType="java.lang.Integer">
|
||||
@@ -87,4 +88,46 @@
|
||||
<delete id="delAsnGroup" parameterType="java.lang.String">
|
||||
delete from config_group_info where group_name=#{groupName} and group_type=4
|
||||
</delete>
|
||||
<update id="updateAsnOrgGroupByGroupInfo" parameterType="com.nis.domain.specific.ConfigGroupInfo">
|
||||
UPDATE config_group_info set is_issued = #{isIssued},update_time=now()
|
||||
<where>
|
||||
<if test="groupType != null">
|
||||
and group_type =#{groupType}
|
||||
</if>
|
||||
<if test="groupId != null ">
|
||||
and group_id =#{groupId}
|
||||
</if>
|
||||
<if test="groupName != null and groupName != ''">
|
||||
and group_name =#{groupName}
|
||||
</if>
|
||||
</where>
|
||||
</update>
|
||||
<update id="updateIsUsed" >
|
||||
UPDATE config_group_info set is_used = #{isUsed},update_time=now()
|
||||
<where>
|
||||
<if test="groupType != null">
|
||||
and group_type =#{groupType}
|
||||
</if>
|
||||
<if test="groupIds != null ">
|
||||
and group_id in
|
||||
<foreach collection ="groupIds" item="groupId" separator ="," open="(" close=")">
|
||||
#{groupId}
|
||||
</foreach >
|
||||
</if>
|
||||
</where>
|
||||
</update>
|
||||
<update id="updateIsAuditAll" >
|
||||
UPDATE config_group_info set is_audit_all = #{isAuditAll},update_time=now()
|
||||
<where>
|
||||
<if test="groupType != null">
|
||||
and group_type =#{groupType}
|
||||
</if>
|
||||
<if test="groupIds != null ">
|
||||
and group_id in
|
||||
<foreach collection ="groupIds" item="groupId" separator ="," open="(" close=")">
|
||||
#{groupId}
|
||||
</foreach >
|
||||
</if>
|
||||
</where>
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.nis.web.service.basics;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
@@ -13,6 +14,9 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
import com.nis.domain.FunctionServiceDict;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.basics.AsnGroupInfo;
|
||||
import com.nis.domain.configuration.AsnKeywordCfg;
|
||||
import com.nis.domain.maat.GroupReuseAddBean;
|
||||
import com.nis.domain.maat.GroupReuseCfg;
|
||||
import com.nis.domain.maat.MaatCfg;
|
||||
import com.nis.domain.maat.ToMaatBean;
|
||||
import com.nis.domain.maat.ToMaatResult;
|
||||
@@ -85,6 +89,8 @@ public class AsnGroupInfoService extends BaseService{
|
||||
configGroupInfo.setGroupName(org.toUpperCase());
|
||||
configGroupInfo.setIsIssued(0);
|
||||
configGroupInfo.setGroupType(4);
|
||||
configGroupInfo.setIsAuditAll(0);
|
||||
configGroupInfo.setIsUsed(0);
|
||||
configGroupInfo.setGroupId(groupIds.get(1));
|
||||
configGroupInfo.setInsertTime(new Date());
|
||||
configGroupInfoDao.insertConfigGroupInfo(configGroupInfo);
|
||||
@@ -104,13 +110,33 @@ public class AsnGroupInfoService extends BaseService{
|
||||
entity.setCreateTime(createTime);
|
||||
entity.setGroupId(groupId);
|
||||
entity.setIsValid(0);
|
||||
//分组已被策略设定为下发全部域,则需要自动下发新增的asno
|
||||
if(configGroupInfo.getIsAuditAll() != null && configGroupInfo.getIsAuditAll().equals(1)){
|
||||
entity.setIsUsed(1);
|
||||
}else{
|
||||
entity.setIsUsed(0);
|
||||
}
|
||||
|
||||
List<Integer> compileIds= ConfigServiceUtil.getId(1,1);
|
||||
if(compileIds.size()>0) {
|
||||
entity.setCompileId(compileIds.get(0));
|
||||
}else {
|
||||
throw new MaatConvertException("Get asn group id failed");
|
||||
throw new MaatConvertException("Get asn reigon id failed");
|
||||
}
|
||||
List<Integer> regionIds= ConfigServiceUtil.getId(3,1);
|
||||
if(regionIds.size()>0) {
|
||||
entity.setRegionId(regionIds.get(0));
|
||||
}else {
|
||||
throw new MaatConvertException("Get asn reigon id failed");
|
||||
}
|
||||
asnGroupInfoDao.insert(entity);
|
||||
//新增,需要判断组是否被标记为全量下发,如果标记则下发新增的,没有不下发
|
||||
if(configGroupInfo.getIsAuditAll() != null
|
||||
&& configGroupInfo.getIsAuditAll().equals(1)
|
||||
&& configGroupInfo.getIsUsed()!= null
|
||||
&& configGroupInfo.getIsUsed().equals(1)){
|
||||
auditAsn(entity,configGroupInfo,Constants.OPACTION_POST);
|
||||
}
|
||||
//修改
|
||||
}else{
|
||||
long id=entity.getId();
|
||||
@@ -131,6 +157,8 @@ public class AsnGroupInfoService extends BaseService{
|
||||
configGroupInfo1.setGroupName(entity.getOrganization().toUpperCase());
|
||||
configGroupInfo1.setIsIssued(0);
|
||||
configGroupInfo1.setGroupType(4);
|
||||
configGroupInfo1.setIsUsed(0);
|
||||
configGroupInfo1.setIsAuditAll(0);
|
||||
configGroupInfo1.setGroupId(groupIds.get(1));
|
||||
configGroupInfo1.setInsertTime(new Date());
|
||||
configGroupInfoDao.insertConfigGroupInfo(configGroupInfo1);
|
||||
@@ -141,52 +169,148 @@ public class AsnGroupInfoService extends BaseService{
|
||||
entity.setGroupId(groupId);
|
||||
asnGroupInfoDao.update(entity);
|
||||
asnIpCfgDao.updateAsn(String.valueOf(entity.getAsnId()),entity.getOrganization(),entity.getCountry(),entity.getDetail());
|
||||
if(configGroupInfo1.getIsUsed()!= null
|
||||
&& configGroupInfo1.getIsUsed().equals(1)){
|
||||
group.setGroupId(groupId);
|
||||
group.setAsnId(entity.getAsnId());
|
||||
auditAsn(group,configGroupInfo1,Constants.OPACTION_PUT);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
public void auditAsn(AsnGroupInfo entity,ConfigGroupInfo group,Integer action){
|
||||
Map<Integer, List<AsnKeywordCfg>> srcMap=new HashMap<>();
|
||||
List srcList=new ArrayList<>();
|
||||
AsnKeywordCfg cfg=new AsnKeywordCfg();
|
||||
cfg.initDefaultValue();
|
||||
cfg.setGroupId(group.getGroupId());
|
||||
cfg.setCfgKeywords(entity.getAsnId().toString());
|
||||
cfg.setRegionId(entity.getRegionId());
|
||||
cfg.setCfgType(Constants.NTC_ASN_NUMBER);
|
||||
cfg.setAuditTime(new Date());
|
||||
srcList.add(cfg);
|
||||
srcMap.put(group.getGroupId(), srcList);
|
||||
GroupReuseAddBean commonGroupBean=new GroupReuseAddBean();
|
||||
List<GroupReuseCfg> commonGroupList=new ArrayList<>();
|
||||
commonGroupList=convertCommonRegion(srcMap,commonGroupList,1,2);
|
||||
commonGroupBean.setGroupReuseCfgList(commonGroupList);
|
||||
//如果已经被引用,则修改
|
||||
commonGroupBean.setAuditTime(new Date());
|
||||
commonGroupBean.setCreatorName(UserUtils.getUser().getName());
|
||||
commonGroupBean.setVersion(Constants.MAAT_VERSION);
|
||||
if(entity.getIsUsed() != null && entity.getIsUsed().equals(1)){ //已经被引用过的asn可调用修改region
|
||||
commonGroupBean.setOpAction(action);
|
||||
String json = gsonToJson(commonGroupBean);
|
||||
logger.info("ASN配置下发配置参数:" + json);
|
||||
// 调用服务接口下发配置
|
||||
ToMaatResult result = ConfigServiceUtil.auditCommonGroupRegionSources(json, action);
|
||||
}else{//已经被引用过的asn可调用新增region
|
||||
commonGroupBean.setOpAction(action);
|
||||
String json = gsonToJson(commonGroupBean);
|
||||
logger.info("ASN配置下发配置参数:" + json);
|
||||
// 调用服务接口下发配
|
||||
ToMaatResult result = ConfigServiceUtil.auditCommonGroupRegionSources(json, action);
|
||||
}
|
||||
|
||||
}
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public void delete(String ids,String asnIds){
|
||||
|
||||
if(!StringUtil.isEmpty(ids)){
|
||||
List<FunctionServiceDict> dicts=DictUtils.getFunctionServiceDictList(600);
|
||||
int result=0;
|
||||
do {
|
||||
result=asnIpCfgDao.deleteByAsnId(asnIds);
|
||||
}while(result>0);
|
||||
for (String id : ids.split(",")) {
|
||||
if(!StringUtil.isEmpty(id)){
|
||||
AsnGroupInfo entity=asnGroupInfoDao.getById(Integer.parseInt(id));
|
||||
int valid=entity.getIsValid();
|
||||
entity.setIsValid(-1);
|
||||
entity.setId(Long.parseLong(id));
|
||||
asnGroupInfoDao.updateValid(entity);
|
||||
if(asnGroupInfoDao.getCountGroupInfoByName(entity.getOrganization())==0) {
|
||||
configGroupInfoDao.delAsnGroup(entity.getOrganization());
|
||||
}
|
||||
//取消下发过的编译
|
||||
if(valid==1) {
|
||||
ToMaatBean maatBean = new ToMaatBean();
|
||||
MaatCfg maatCfg = new MaatCfg();
|
||||
List<MaatCfg> configCompileList = new ArrayList();
|
||||
maatCfg.setCompileId(entity.getCompileId());
|
||||
maatCfg.setServiceId(dicts.get(0).getServiceId());
|
||||
maatCfg.setIsValid(0);//无效
|
||||
configCompileList.add(maatCfg);
|
||||
maatBean.setConfigCompileList(configCompileList);
|
||||
maatBean.setAuditTime(entity.getAuditTime());
|
||||
maatBean.setCreatorName(entity.getCurrentUser().getName());
|
||||
maatBean.setVersion(Constants.MAAT_VERSION);
|
||||
maatBean.setOpAction(Constants.UPDATE_ACTION);
|
||||
//调用服务接口取消配置
|
||||
String json=gsonToJson(maatBean);
|
||||
logger.info("asn ip配置取消配置参数:"+json);
|
||||
//调用服务接口下发配置
|
||||
ToMaatResult _result = ConfigServiceUtil.put(json,1);
|
||||
logger.info("asn ip配置取消配置响应信息:"+_result.getMsg());
|
||||
List<GroupReuseCfg> commonGroupList=new ArrayList<>();
|
||||
//查询已经被策略引用的asn
|
||||
List<AsnGroupInfo> asnList=asnGroupInfoDao.findAsnGroupInfoByAsnNos(Arrays.asList(asnIds.split(",")), 1);
|
||||
//修改asn为无效,且解除引用
|
||||
asnGroupInfoDao.updateIsUsedAndIsValid(Arrays.asList(asnIds.split(",")), 0, -1);
|
||||
|
||||
//查询已经被策略引用的asn,需要走取消接口
|
||||
if(!StringUtil.isEmpty(asnList)){
|
||||
Map<Integer, List<AsnKeywordCfg>> srcMap=new HashMap<>();
|
||||
Map<String, Integer> groupIdMap=new HashMap<>();
|
||||
for (AsnGroupInfo asnGroupInfo : asnList) {
|
||||
//查询groupId
|
||||
if(StringUtil.isEmpty(groupIdMap.get(asnGroupInfo.getOrganization()))){
|
||||
ConfigGroupInfo group=configGroupInfoDao.getAsnGroupByName(asnGroupInfo.getOrganization());
|
||||
groupIdMap.put(asnGroupInfo.getOrganization(), group.getGroupId());
|
||||
List<AsnKeywordCfg> list1=new ArrayList<>();
|
||||
AsnKeywordCfg asnCfg=new AsnKeywordCfg();
|
||||
asnCfg.initDefaultValue();
|
||||
asnCfg.setCfgType(Constants.NTC_ASN_NUMBER);
|
||||
asnCfg.setRegionId(asnGroupInfo.getRegionId());
|
||||
asnCfg.setGroupId(group.getGroupId());
|
||||
asnCfg.setIsValid(0);
|
||||
list1.add(asnCfg);
|
||||
srcMap.put(group.getGroupId(), list1);
|
||||
}else{
|
||||
Integer groupId=groupIdMap.get(asnGroupInfo.getOrganization());
|
||||
List list2=srcMap.get(groupId);
|
||||
AsnKeywordCfg asnCfg=new AsnKeywordCfg();
|
||||
asnCfg.initDefaultValue();
|
||||
asnCfg.setCfgType(Constants.NTC_ASN_NUMBER);
|
||||
asnCfg.setRegionId(asnGroupInfo.getRegionId());
|
||||
asnCfg.setGroupId(groupId);
|
||||
asnCfg.setIsValid(0);
|
||||
list2.add(asnCfg);
|
||||
srcMap.put(groupId, list2);
|
||||
}
|
||||
}
|
||||
commonGroupList=convertCommonRegion(srcMap, commonGroupList, 0, 2);
|
||||
GroupReuseAddBean commonGroupBean=new GroupReuseAddBean();
|
||||
commonGroupBean.setGroupReuseCfgList(commonGroupList);
|
||||
commonGroupBean.setAuditTime(new Date());
|
||||
commonGroupBean.setCreatorName(UserUtils.getUser().getName());
|
||||
commonGroupBean.setVersion(Constants.MAAT_VERSION);
|
||||
commonGroupBean.setOpAction(2);
|
||||
String json = gsonToJson(commonGroupBean);
|
||||
logger.info("ASN配置下发配置参数:" + json);
|
||||
// 调用服务接口下发配置
|
||||
ToMaatResult result = ConfigServiceUtil.auditCommonGroupRegionSources(json, 3);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*List<FunctionServiceDict> dicts=DictUtils.getFunctionServiceDictList(600);
|
||||
int result=0;
|
||||
do {
|
||||
result=asnIpCfgDao.deleteByAsnId(asnIds);
|
||||
}while(result>0);
|
||||
for (String id : ids.split(",")) {
|
||||
if(!StringUtil.isEmpty(id)){
|
||||
AsnGroupInfo entity=asnGroupInfoDao.getById(Integer.parseInt(id));
|
||||
int valid=entity.getIsValid();
|
||||
entity.setIsValid(-1);
|
||||
entity.setId(Long.parseLong(id));
|
||||
asnGroupInfoDao.updateValid(entity);
|
||||
if(asnGroupInfoDao.getCountGroupInfoByName(entity.getOrganization())==0) {
|
||||
configGroupInfoDao.delAsnGroup(entity.getOrganization());
|
||||
}
|
||||
//取消下发过的编译
|
||||
if(valid==1) {
|
||||
ToMaatBean maatBean = new ToMaatBean();
|
||||
MaatCfg maatCfg = new MaatCfg();
|
||||
List<MaatCfg> configCompileList = new ArrayList();
|
||||
maatCfg.setCompileId(entity.getCompileId());
|
||||
maatCfg.setServiceId(dicts.get(0).getServiceId());
|
||||
maatCfg.setIsValid(0);//无效
|
||||
configCompileList.add(maatCfg);
|
||||
maatBean.setConfigCompileList(configCompileList);
|
||||
maatBean.setAuditTime(entity.getAuditTime());
|
||||
maatBean.setCreatorName(entity.getCurrentUser().getName());
|
||||
maatBean.setVersion(Constants.MAAT_VERSION);
|
||||
maatBean.setOpAction(Constants.UPDATE_ACTION);
|
||||
//调用服务接口取消配置
|
||||
String json=gsonToJson(maatBean);
|
||||
logger.info("asn ip配置取消配置参数:"+json);
|
||||
//调用服务接口下发配置
|
||||
ToMaatResult _result = ConfigServiceUtil.put(json,1);
|
||||
logger.info("asn ip配置取消配置响应信息:"+_result.getMsg());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}*/
|
||||
|
||||
}
|
||||
public boolean checkIps(String groupIds) {
|
||||
@@ -234,4 +358,13 @@ public class AsnGroupInfoService extends BaseService{
|
||||
}
|
||||
return map;
|
||||
}
|
||||
public List<AsnGroupInfo> findAsnGroupList(AsnGroupInfo asnGroupInfo){
|
||||
List<AsnGroupInfo> list=asnGroupInfoDao.findAsnGroupInfoByAsnGroup(asnGroupInfo);
|
||||
return list;
|
||||
}
|
||||
public List<AsnGroupInfo> findAsnGroupList(List<String> asnNos,Integer isUsed){
|
||||
List<AsnGroupInfo> list=asnGroupInfoDao.findAsnGroupInfoByAsnNos(asnNos,null );
|
||||
return list;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -23,6 +23,8 @@ import com.nis.domain.basics.AsnGroupInfo;
|
||||
import com.nis.domain.basics.AsnIpCfg;
|
||||
import com.nis.domain.configuration.BaseIpCfg;
|
||||
import com.nis.domain.configuration.CfgIndexInfo;
|
||||
import com.nis.domain.maat.GroupReuseAddBean;
|
||||
import com.nis.domain.maat.GroupReuseCfg;
|
||||
import com.nis.domain.maat.MaatCfg;
|
||||
import com.nis.domain.maat.MaatCfg.DigestCfg;
|
||||
import com.nis.domain.maat.MaatCfg.GroupCfg;
|
||||
@@ -34,6 +36,7 @@ import com.nis.domain.maat.ToMaatResult;
|
||||
import com.nis.domain.specific.ConfigGroupInfo;
|
||||
import com.nis.util.ConfigServiceUtil;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.web.dao.CrudDao;
|
||||
import com.nis.web.dao.basics.AsnGroupInfoDao;
|
||||
import com.nis.web.dao.basics.AsnIpCfgDao;
|
||||
@@ -100,6 +103,8 @@ public class AsnIpCfgService extends CrudService<CrudDao<AsnIpCfg>, AsnIpCfg> {
|
||||
}
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public void update(AsnIpCfg entity){
|
||||
List<AsnIpCfg> auditAsnIpList=new ArrayList<>();
|
||||
List<AsnGroupInfo> auditAsnGroupList=new ArrayList<>();
|
||||
Date editTime=new Date();
|
||||
entity.setEditTime(editTime);
|
||||
entity.setEditorId(entity.getCurrentUser().getId());
|
||||
@@ -114,7 +119,53 @@ public class AsnIpCfgService extends CrudService<CrudDao<AsnIpCfg>, AsnIpCfg> {
|
||||
entity.setCountry(country);
|
||||
entity.setDetail(detail);
|
||||
entity.setCompileId(groupInfo.getCompileId());
|
||||
/**
|
||||
* isvalid=0 and asnNo=false 直接修改
|
||||
* isvalid=0 and asnNo=true 需要下发
|
||||
* isvalid=1 需要下发asnNo下所有的域配置
|
||||
*/
|
||||
/*if(groupInfo.getIsUsed().equals(1) && entity.getIsValid().equals(Constants.VALID_NO)){
|
||||
entity.setAuditTime(editTime);
|
||||
entity.setAuditorId(entity.getCurrentUser().getId());
|
||||
entity.setIsValid(Constants.VALID_YES);
|
||||
entity.setIsAudit(Constants.AUDIT_YES);
|
||||
auditAsnIpList.add(entity);
|
||||
}
|
||||
if(groupInfo.getIsUsed().equals(1) && entity.getIsValid().equals(Constants.VALID_YES)){
|
||||
entity.setAuditTime(editTime);
|
||||
entity.setAuditorId(entity.getCurrentUser().getId());
|
||||
entity.setIsValid(Constants.VALID_YES);
|
||||
entity.setIsAudit(Constants.AUDIT_YES);
|
||||
auditAsnGroupList.add(groupInfo);
|
||||
}*/
|
||||
if(entity.getIsValid() ==1){
|
||||
entity.setAuditTime(editTime);
|
||||
entity.setAuditorId(entity.getCurrentUser().getId());
|
||||
entity.setEditTime(editTime);
|
||||
entity.setEditorId(entity.getCurrentUser().getId());
|
||||
entity.setIsValid(Constants.VALID_YES);
|
||||
entity.setIsAudit(Constants.AUDIT_YES);
|
||||
}else{
|
||||
entity.setEditTime(editTime);
|
||||
entity.setEditorId(entity.getCurrentUser().getId());
|
||||
entity.setIsValid(Constants.VALID_NO);
|
||||
entity.setIsAudit(Constants.VALID_NO);
|
||||
}
|
||||
asnIpCfgDao.update(entity);
|
||||
//ASN下发状态时可以更改,更改之后直接下发
|
||||
if(entity.getIsValid() ==1){
|
||||
auditAsnIpList.add(entity);
|
||||
asnIPRegionSendToMaat(auditAsnIpList,Constants.VALID_YES,Constants.OPACTION_PUT);
|
||||
}
|
||||
//common group 新增下发 ASN IP配置
|
||||
/*if(!StringUtil.isEmpty(auditAsnIpList)){
|
||||
asnIPRegionSendToMaat(auditAsnIpList,Constants.VALID_YES,Constants.OPACTION_POST);
|
||||
}*/
|
||||
|
||||
//common group 修改已下发过的配置,全量下发 ASN NO下的所有有效配置
|
||||
/*if(entity.getIsAudit().equals(Constants.VALID_YES)){
|
||||
auditAllAsnRegionCfg(entity,auditAsnGroupList,null);
|
||||
}*/
|
||||
}
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public void processGroup(Map<Long,AsnGroupInfo> asnNoMap){
|
||||
@@ -256,11 +307,12 @@ public class AsnIpCfgService extends CrudService<CrudDao<AsnIpCfg>, AsnIpCfg> {
|
||||
}
|
||||
sb.deleteCharAt(sb.toString().lastIndexOf(","));
|
||||
asnIpCfgDao.delete(sb.toString());
|
||||
asnIPRegionSendToMaat(entities,Constants.VALID_NO);
|
||||
asnIPRegionSendToMaat(entities,Constants.VALID_NO,Constants.OPACTION_PUT);
|
||||
}
|
||||
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public void saveAsnIpCfg(CfgIndexInfo entity) {
|
||||
List<AsnIpCfg> auditAsnIpList=new ArrayList<>();
|
||||
Date createTime=new Date();
|
||||
//asn号
|
||||
String userRegion1=entity.getUserRegion1();
|
||||
@@ -301,13 +353,27 @@ public class AsnIpCfgService extends CrudService<CrudDao<AsnIpCfg>, AsnIpCfg> {
|
||||
cfg.setCreateTime(createTime);
|
||||
cfg.setCreatorId(entity.getCurrentUser().getId());
|
||||
cfg.setAsnIpGroup(entity.getAsnIpGroup().intValue());
|
||||
cfg.setIsValid(Constants.VALID_NO);
|
||||
cfg.setIsAudit(Constants.AUDIT_NOT_YET);
|
||||
cfg.setRegionId(idList.get(index));
|
||||
//TODO 注意:被策略引用并下发过的ASN NO,配置新增后直接下发【此功能暂时不做自动,asnip拥有审核功能】
|
||||
/*if(asnGroupInfo.getIsUsed().equals(1)){
|
||||
cfg.setIsValid(Constants.VALID_YES);
|
||||
cfg.setIsAudit(Constants.AUDIT_YES);
|
||||
cfg.setAuditorId(UserUtils.getUser().getId());
|
||||
cfg.setAuditTime(createTime);
|
||||
auditAsnIpList.add(cfg);
|
||||
}else{*/
|
||||
cfg.setIsValid(Constants.VALID_NO);
|
||||
cfg.setIsAudit(Constants.AUDIT_NOT_YET);
|
||||
/*}*/
|
||||
index++;
|
||||
}
|
||||
|
||||
}
|
||||
this.save(entity.getAsnIpCfgs());
|
||||
//TODO 注意:被策略引用并下发过的ASN NO,配置新增后直接下发【此功能暂时不做自动,asnip拥有审核功能】
|
||||
/*if(!StringUtil.isEmpty(auditAsnIpList)){
|
||||
asnIPRegionSendToMaat(auditAsnIpList,Constants.VALID_YES,Constants.OPACTION_POST);
|
||||
}*/
|
||||
}
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public void delete(String ids) {
|
||||
@@ -332,7 +398,7 @@ public class AsnIpCfgService extends CrudService<CrudDao<AsnIpCfg>, AsnIpCfg> {
|
||||
//已经下发过的,调用分组复用配置删除接口
|
||||
// splitAndSend(issuedList,Constants.VALID_NO);
|
||||
if(issuedList.size() > 0){
|
||||
asnIPRegionSendToMaat(issuedList,Constants.VALID_NO);
|
||||
asnIPRegionSendToMaat(issuedList,Constants.VALID_NO,Constants.OPACTION_PUT);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -440,14 +506,11 @@ public class AsnIpCfgService extends CrudService<CrudDao<AsnIpCfg>, AsnIpCfg> {
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public void auditIpBatch(Map<Long,List<AsnIpCfg>> data,Integer isValid) {
|
||||
public void auditIpBatch(List<AsnIpCfg> asnIpCfgs,Long asn,Integer isValid) {
|
||||
List<AsnGroupInfo> auditAsnGroupList=new ArrayList<>();
|
||||
SqlSessionFactory sqlSessionFactory=SpringContextHolder.getBean(SqlSessionFactory.class);
|
||||
final SqlSession batchSqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH, false);
|
||||
try{
|
||||
for(Entry<Long,List<AsnIpCfg>> enrty:data.entrySet()) {
|
||||
//data.entrySet().stream().forEach( enrty->{
|
||||
Long asn=enrty.getKey();//ans group 的group id
|
||||
List<AsnIpCfg> asnIpCfgs=enrty.getValue();
|
||||
int issuedNum=asnIpCfgs.size();
|
||||
for(int index = 0; index < asnIpCfgs.size();index++){
|
||||
AsnIpCfg t = asnIpCfgs.get(index);
|
||||
@@ -461,6 +524,7 @@ public class AsnIpCfgService extends CrudService<CrudDao<AsnIpCfg>, AsnIpCfg> {
|
||||
asnGroupInfo.setAsnId(asn);
|
||||
asnGroupInfo=asnGroupInfoDao.getInfoByAsnNo(asnGroupInfo);
|
||||
Integer groupId=asnGroupInfo.getGroupId();
|
||||
|
||||
MaatCfg maatCfg = new MaatCfg();
|
||||
List<MaatCfg> configCompileList = new ArrayList();
|
||||
List<GroupCfg> groupRelationList = new ArrayList();
|
||||
@@ -484,6 +548,8 @@ public class AsnIpCfgService extends CrudService<CrudDao<AsnIpCfg>, AsnIpCfg> {
|
||||
groupCfg.setCompileId(asnGroupInfo.getCompileId());
|
||||
groupCfg.setGroupId(groupId);
|
||||
groupCfg.setIsValid(Constants.VALID_YES);
|
||||
//asnGroupId标记为公共组
|
||||
groupCfg.setIsCommonGroup(1);
|
||||
groupCfg.setAuditTime(asnIpCfgs.get(0).getAuditTime());
|
||||
groupRelationList.add(groupCfg);
|
||||
BeanUtils.copyProperties(asnIpCfgs.get(0), maatCfg);
|
||||
@@ -517,7 +583,7 @@ public class AsnIpCfgService extends CrudService<CrudDao<AsnIpCfg>, AsnIpCfg> {
|
||||
}else if(asnGroupInfo.getIsValid()==1){//已经下发过,走分组复用
|
||||
asnGroupInfo.setIssuedIPs(issuedNum+0l);
|
||||
asnGroupInfoDao.update(asnGroupInfo);
|
||||
asnIPRegionSendToMaat(asnIpCfgs,isValid);
|
||||
asnIPRegionSendToMaat(asnIpCfgs,isValid,Constants.OPACTION_POST);
|
||||
}else {
|
||||
throw new RuntimeException("asnGroupInfo isValid value is "+asnGroupInfo.getIsValid());
|
||||
}
|
||||
@@ -525,39 +591,34 @@ public class AsnIpCfgService extends CrudService<CrudDao<AsnIpCfg>, AsnIpCfg> {
|
||||
asnGroupInfo.setIssuedIPs(0L-issuedNum);
|
||||
asnGroupInfoDao.update(asnGroupInfo);
|
||||
//已经下发过的,调用分组复用配置删除接口
|
||||
// GroupReuseAddBean maatBean = new GroupReuseAddBean();
|
||||
// List<GroupReuseCfg> groupReuseList=new ArrayList<>();
|
||||
// GroupReuseCfg groupReuseCfg=new GroupReuseCfg();
|
||||
// ipRegionList.addAll(groupReuseCfgAddRemoveConvert(asnIpCfgs,Constants.VALID_NO,groupId));
|
||||
// groupReuseCfg.setIpRegionList(ipRegionList);
|
||||
// groupReuseCfg.setStrRegionList(strRegionList);
|
||||
// groupReuseCfg.setNumRegionList(numRegionList);
|
||||
// groupReuseList.add(groupReuseCfg);
|
||||
// maatBean.setGroupReuseCfgList(groupReuseList);
|
||||
// maatBean.setAuditTime(asnIpCfgs.get(0).getAuditTime());
|
||||
// maatBean.setCreatorName(asnIpCfgs.get(0).getCurrentUser().getName());
|
||||
// maatBean.setVersion(Constants.MAAT_VERSION);
|
||||
// maatBean.setOpAction(Constants.UPDATE_ACTION);
|
||||
// //调用服务接口下发配置数据
|
||||
// String json=gsonToJson(maatBean);
|
||||
// logger.info("ASN IP域删除配置下发配置参数:"+json);
|
||||
// //调用服务接口下发配置
|
||||
// ToMaatResult result = ConfigServiceUtil.put(json,3);
|
||||
// logger.info("ASN IP域删除配置响应信息:"+result.getMsg());
|
||||
asnIPRegionSendToMaat(asnIpCfgs,isValid);
|
||||
GroupReuseAddBean maatBean = new GroupReuseAddBean();
|
||||
List<GroupReuseCfg> groupReuseList=new ArrayList<>();
|
||||
GroupReuseCfg groupReuseCfg=new GroupReuseCfg();
|
||||
ipRegionList.addAll(groupReuseCfgAddRemoveConvert(asnIpCfgs,Constants.VALID_NO,groupId));
|
||||
groupReuseCfg.setIpRegionList(ipRegionList);
|
||||
groupReuseCfg.setStrRegionList(strRegionList);
|
||||
groupReuseCfg.setNumRegionList(numRegionList);
|
||||
groupReuseList.add(groupReuseCfg);
|
||||
maatBean.setGroupReuseCfgList(groupReuseList);
|
||||
maatBean.setAuditTime(asnIpCfgs.get(0).getAuditTime());
|
||||
maatBean.setCreatorName(asnIpCfgs.get(0).getCurrentUser().getName());
|
||||
maatBean.setVersion(Constants.MAAT_VERSION);
|
||||
maatBean.setOpAction(Constants.UPDATE_ACTION);
|
||||
//调用服务接口下发配置数据
|
||||
String json=gsonToJson(maatBean);
|
||||
logger.info("ASN IP域删除配置下发配置参数:"+json);
|
||||
//调用服务接口下发配置
|
||||
ToMaatResult result = ConfigServiceUtil.auditCommonGroupRegionSources(json,3);
|
||||
logger.info("ASN IP域删除配置响应信息:"+result.getMsg());
|
||||
//如果一个asn组下没有IP了,修改有效状态
|
||||
//if(hasValidAsnIp(asn)) {
|
||||
// asnGroupInfo.setIsValid(0);
|
||||
// asnGroupInfo.setEditorId(UserUtils.getUser().getId());
|
||||
// asnGroupInfo.setEditTime(new Date());
|
||||
// asnGroupInfoDao.updateValid(asnGroupInfo);
|
||||
//}
|
||||
if(hasValidAsnIp(asn)) {
|
||||
asnGroupInfo.setIsValid(0);
|
||||
asnGroupInfo.setEditorId(UserUtils.getUser().getId());
|
||||
asnGroupInfo.setEditTime(new Date());
|
||||
asnGroupInfoDao.updateValid(asnGroupInfo);
|
||||
}
|
||||
|
||||
}else {
|
||||
throw new RuntimeException("isValid value is "+isValid);
|
||||
}
|
||||
//});
|
||||
}
|
||||
}finally {
|
||||
if(batchSqlSession != null){
|
||||
batchSqlSession.close();
|
||||
|
||||
@@ -1212,6 +1212,7 @@ public class AppCfgService extends BaseService {
|
||||
GroupCfg groupCfg=new GroupCfg();
|
||||
groupCfg.setCompileId(entitys.get(0).getCompileId());
|
||||
groupCfg.setGroupId(groupId);
|
||||
groupCfg.setIsCommonGroup(1);
|
||||
groupCfg.setIsValid(Constants.VALID_YES);
|
||||
groupCfg.setAuditTime(entitys.get(0).getAuditTime());
|
||||
groupRelationList.add(groupCfg);
|
||||
@@ -1250,7 +1251,7 @@ public class AppCfgService extends BaseService {
|
||||
List<GroupReuseCfg> groupReuseList=new ArrayList<>();
|
||||
GroupReuseCfg groupReuseCfg=new GroupReuseCfg();
|
||||
/*groupReuseCfg.setUserRegion(userRegion);*/
|
||||
groupReuseCfg.setServiceId(entitys.get(0).getServiceId());
|
||||
/*groupReuseCfg.setServiceId(entitys.get(0).getServiceId());*/
|
||||
ipRegionList.addAll(groupReuseCfgAddRemoveConvert(entitys,Constants.VALID_YES,groupId));
|
||||
groupReuseCfg.setIpRegionList(ipRegionList);
|
||||
groupReuseCfg.setStrRegionList(strRegionList);
|
||||
@@ -1265,7 +1266,7 @@ public class AppCfgService extends BaseService {
|
||||
String json=gsonToJson(maatBean);
|
||||
logger.info("app协议IP域新增配置下发配置参数:"+json);
|
||||
//调用服务接口下发配置
|
||||
ToMaatResult result = ConfigServiceUtil.postGroupReuseSources(json);
|
||||
ToMaatResult result = ConfigServiceUtil.auditCommonGroupRegionSources(json,1);
|
||||
logger.info("app协议IP域新增配置响应信息:"+result.getMsg());
|
||||
}else {
|
||||
throw new RuntimeException("Unknown configGroupInfo isIssued value");
|
||||
@@ -1289,7 +1290,7 @@ public class AppCfgService extends BaseService {
|
||||
String json=gsonToJson(maatBean);
|
||||
logger.info("app协议IP域删除配置下发配置参数:"+json);
|
||||
//调用服务接口下发配置
|
||||
ToMaatResult result = ConfigServiceUtil.put(json,3);
|
||||
ToMaatResult result = ConfigServiceUtil.auditCommonGroupRegionSources(json,3);
|
||||
logger.info("app协议IP域删除配置响应信息:"+result.getMsg());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,7 +100,14 @@ public class AppMultiFeatureCfgService extends BaseService {
|
||||
if(entity.getStrList()!=null){
|
||||
for(AppStringFeatureCfg cfg:entity.getStrList()){
|
||||
if(StringUtils.isNotBlank(cfg.getCfgKeywords())){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType","exprType","matchMethod","isHexbin"});
|
||||
if(cfg.getExprType()==null){
|
||||
if(cfg.getCfgKeywords().contains(Constants.KEYWORD_EXPR)){
|
||||
cfg.setExprType(1);//与表达式
|
||||
}else{
|
||||
cfg.setExprType(0);//无表达式
|
||||
}
|
||||
}
|
||||
appMultiFeatureCfgDao.insertAppStringFeatureCfg(cfg);
|
||||
}
|
||||
|
||||
@@ -108,8 +115,8 @@ public class AppMultiFeatureCfgService extends BaseService {
|
||||
}
|
||||
if(entity.getComplexList()!=null){
|
||||
for(AppComplexFeatureCfg cfg:entity.getComplexList()){
|
||||
if(StringUtils.isNotBlank(cfg.getDistrict()) && cfg.getDistrict().equals("L3_header")){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
if(StringUtils.isNotBlank(cfg.getDistrict()) && (cfg.getDistrict().equals("L3_header_IP")||cfg.getDistrict().equals("L3_header_ICMP"))){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType","exprType","matchMethod","isHexbin"});
|
||||
cfg.setIsHexbin(1);
|
||||
cfg.setIsCaseInsenstive(0);
|
||||
cfg.setExprType(3);
|
||||
@@ -117,9 +124,28 @@ public class AppMultiFeatureCfgService extends BaseService {
|
||||
this.setL3HeaderKeyword(cfg);
|
||||
appMultiFeatureCfgDao.insertAppComplexFeatureCfg(cfg);
|
||||
|
||||
}else if(StringUtils.isNotBlank(cfg.getCfgKeywords())){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
}else if(StringUtils.isNotBlank(cfg.getDistrict()) && cfg.getDistrict().equals("Payload") && cfg.getExprType()==3){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType","exprType","matchMethod","isHexbin"});
|
||||
cfg.setIsHexbin(1);
|
||||
cfg.setIsCaseInsenstive(0);
|
||||
cfg.setExprType(3);
|
||||
cfg.setMatchMethod(0);
|
||||
cfg.setHeaderType(null);
|
||||
//设置payload特征的偏移量表达之关键字字符串
|
||||
cfg.setCfgKeywords(cfg.getPayloadOffset()+"-"+((cfg.getCfgKeywords().length()/2)+cfg.getPayloadOffset())+":"+cfg.getCfgKeywords());
|
||||
appMultiFeatureCfgDao.insertAppComplexFeatureCfg(cfg);
|
||||
|
||||
}else if(StringUtils.isNotBlank(cfg.getCfgKeywords())){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType","exprType","matchMethod","isHexbin"});
|
||||
cfg.setHeaderType(null);
|
||||
if(cfg.getExprType()==null){
|
||||
if(cfg.getCfgKeywords().contains(Constants.KEYWORD_EXPR)){
|
||||
cfg.setExprType(1);//与表达式
|
||||
}else{
|
||||
cfg.setExprType(0);//无表达式
|
||||
}
|
||||
}
|
||||
|
||||
appMultiFeatureCfgDao.insertAppComplexFeatureCfg(cfg);
|
||||
}
|
||||
|
||||
@@ -161,15 +187,22 @@ public class AppMultiFeatureCfgService extends BaseService {
|
||||
if(entity.getStrList()!=null){
|
||||
for(AppStringFeatureCfg cfg:entity.getStrList()){
|
||||
if(StringUtils.isNotBlank(cfg.getCfgKeywords())){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType","exprType","matchMethod","isHexbin"});
|
||||
if(cfg.getExprType()==null){
|
||||
if(cfg.getCfgKeywords().contains(Constants.KEYWORD_EXPR)){
|
||||
cfg.setExprType(1);//与表达式
|
||||
}else{
|
||||
cfg.setExprType(0);//无表达式
|
||||
}
|
||||
}
|
||||
appMultiFeatureCfgDao.insertAppStringFeatureCfg(cfg);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(entity.getComplexList()!=null){
|
||||
for(AppComplexFeatureCfg cfg:entity.getComplexList()){
|
||||
if(StringUtils.isNotBlank(cfg.getDistrict()) && cfg.getDistrict().equals("L3_header")){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
if(StringUtils.isNotBlank(cfg.getDistrict()) && (cfg.getDistrict().equals("L3_header_IP")||cfg.getDistrict().equals("L3_header_ICMP"))){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType","exprType","matchMethod","isHexbin"});
|
||||
cfg.setIsHexbin(1);
|
||||
cfg.setIsCaseInsenstive(0);
|
||||
cfg.setExprType(3);
|
||||
@@ -177,9 +210,27 @@ public class AppMultiFeatureCfgService extends BaseService {
|
||||
this.setL3HeaderKeyword(cfg);
|
||||
appMultiFeatureCfgDao.insertAppComplexFeatureCfg(cfg);
|
||||
|
||||
}else if(StringUtils.isNotBlank(cfg.getCfgKeywords())){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
}else if(StringUtils.isNotBlank(cfg.getDistrict()) && cfg.getDistrict().equals("Payload") && cfg.getExprType()==3){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType","exprType","matchMethod","isHexbin"});
|
||||
cfg.setIsHexbin(1);
|
||||
cfg.setIsCaseInsenstive(0);
|
||||
cfg.setExprType(3);
|
||||
cfg.setMatchMethod(0);
|
||||
cfg.setHeaderType(null);
|
||||
//设置payload特征的偏移量表达之关键字字符串
|
||||
cfg.setCfgKeywords(cfg.getPayloadOffset()+"-"+((cfg.getCfgKeywords().length()/2)+cfg.getPayloadOffset())+":"+cfg.getCfgKeywords());
|
||||
appMultiFeatureCfgDao.insertAppComplexFeatureCfg(cfg);
|
||||
|
||||
}else if(StringUtils.isNotBlank(cfg.getCfgKeywords())){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType","exprType","matchMethod","isHexbin"});
|
||||
cfg.setHeaderType(null);
|
||||
if(cfg.getExprType()==null){
|
||||
if(cfg.getCfgKeywords().contains(Constants.KEYWORD_EXPR)){
|
||||
cfg.setExprType(1);//与表达式
|
||||
}else{
|
||||
cfg.setExprType(0);//无表达式
|
||||
}
|
||||
}
|
||||
appMultiFeatureCfgDao.insertAppComplexFeatureCfg(cfg);
|
||||
}
|
||||
}
|
||||
@@ -197,37 +248,38 @@ public class AppMultiFeatureCfgService extends BaseService {
|
||||
|
||||
public void setL3HeaderKeyword(AppComplexFeatureCfg cfg) {
|
||||
String keyword = "";
|
||||
if(cfg.getHeaderType().equals("IP_header")){
|
||||
if(StringUtils.isNoneBlank(cfg.getVer())){
|
||||
if(cfg.getHeaderType().equals("L3_header_IP")){
|
||||
/*if(StringUtils.isNoneBlank(cfg.getVer())){
|
||||
keyword += "0-3:"+cfg.getVer()+Constants.KEYWORD_EXPR;
|
||||
}
|
||||
if(StringUtils.isNotBlank(cfg.getIhl())){
|
||||
keyword += "4-7:"+cfg.getIhl()+Constants.KEYWORD_EXPR;
|
||||
}
|
||||
}*/
|
||||
if(StringUtils.isNotBlank(cfg.getTos())){
|
||||
keyword += "8-15:"+cfg.getTos()+Constants.KEYWORD_EXPR;
|
||||
keyword += "1-2:"+cfg.getTos()+Constants.KEYWORD_EXPR;
|
||||
}
|
||||
if(StringUtils.isNotBlank(cfg.getTotalLength())){
|
||||
keyword += "16-31:"+cfg.getTotalLength()+Constants.KEYWORD_EXPR;
|
||||
}
|
||||
if(StringUtils.isNotBlank(cfg.getFlags())){
|
||||
keyword += "48-50:"+cfg.getFlags()+Constants.KEYWORD_EXPR;
|
||||
}
|
||||
if(StringUtils.isNotBlank(cfg.getFragmentOffset())){
|
||||
keyword += "56-63:"+cfg.getFragmentOffset()+Constants.KEYWORD_EXPR;
|
||||
keyword += "2-4:"+cfg.getTotalLength()+Constants.KEYWORD_EXPR;
|
||||
}
|
||||
if(StringUtils.isNotBlank(cfg.getProtocol())){
|
||||
keyword += "72-79:"+cfg.getProtocol()+Constants.KEYWORD_EXPR;
|
||||
keyword += "9-10:"+cfg.getProtocol()+Constants.KEYWORD_EXPR;
|
||||
}
|
||||
if(StringUtils.isNotBlank(cfg.getFragmentOffset())){//记录IP头的客户端IP
|
||||
keyword += "12-16:"+cfg.getFragmentOffset()+Constants.KEYWORD_EXPR;
|
||||
}
|
||||
if(StringUtils.isNotBlank(cfg.getFlags())){//记录IP头的服务端IP
|
||||
keyword += "16-20:"+cfg.getFlags()+Constants.KEYWORD_EXPR;
|
||||
}
|
||||
|
||||
}else{
|
||||
if(StringUtils.isNoneBlank(cfg.getIcmpType())){
|
||||
keyword += "0-7:"+cfg.getIcmpType()+Constants.KEYWORD_EXPR;
|
||||
keyword += "0-1:"+cfg.getIcmpType()+Constants.KEYWORD_EXPR;
|
||||
}
|
||||
if(StringUtils.isNotBlank(cfg.getIcmpCode())){
|
||||
keyword += "8-15:"+cfg.getIcmpCode()+Constants.KEYWORD_EXPR;
|
||||
keyword += "1-2:"+cfg.getIcmpCode()+Constants.KEYWORD_EXPR;
|
||||
}
|
||||
if(StringUtils.isNotBlank(cfg.getIcmpIdentifier())){
|
||||
keyword += "32-47:"+cfg.getIcmpIdentifier()+Constants.KEYWORD_EXPR;
|
||||
keyword += "4-6:"+cfg.getIcmpIdentifier()+Constants.KEYWORD_EXPR;
|
||||
}
|
||||
}
|
||||
keyword=keyword.substring(0,keyword.lastIndexOf(Constants.KEYWORD_EXPR));
|
||||
@@ -289,9 +341,44 @@ public class AppMultiFeatureCfgService extends BaseService {
|
||||
cfg.setTableName(AppComplexFeatureCfg.getTablename());
|
||||
appMultiFeatureCfgDao.auditCfg(cfg);
|
||||
if(isAudit==1){
|
||||
//如果是payload特征,需要判断匹配区域是否为Payload,并且判断包大小或者本包方向,如果不为空,需要创建域配置
|
||||
if(entity.getServiceId().equals(1025)){//app payload特征
|
||||
for(AppComplexFeatureCfg c:complexList){
|
||||
if(c.getDistrict().equals("Payload")){
|
||||
//payload特征的payloadSize,payloadPacketDirection两个参数各自为单独的域配置下发
|
||||
if(c.getPayloadSize()!=null){
|
||||
AppComplexFeatureCfg payloadSizeCfg = new AppComplexFeatureCfg();
|
||||
BeanUtils.copyProperties(c, payloadSizeCfg, new String[]{"cfgId"});
|
||||
payloadSizeCfg.setCfgKeywords(c.getPayloadSize().toString());
|
||||
payloadSizeCfg.setCfgType("APP_PAYLOAD_SIZE");//综合服务前端redis表名
|
||||
payloadSizeCfg.setDistrict(null);
|
||||
payloadSizeCfg.setExprType(0);;
|
||||
payloadSizeCfg.setMatchMethod(3);
|
||||
payloadSizeCfg.setIsHexbin(0);
|
||||
complexList.add(payloadSizeCfg);
|
||||
}
|
||||
if(c.getPayloadPacketDirection()!=null){
|
||||
AppComplexFeatureCfg packetDirectionCfg = new AppComplexFeatureCfg();
|
||||
BeanUtils.copyProperties(c, packetDirectionCfg, new String[]{"cfgId"});
|
||||
packetDirectionCfg.setCfgKeywords(c.getPayloadPacketDirection().toString());
|
||||
packetDirectionCfg.setCfgType("APP_PKT_SEQ");//综合服务前端redis表名
|
||||
packetDirectionCfg.setDistrict(null);
|
||||
packetDirectionCfg.setExprType(0);;
|
||||
packetDirectionCfg.setMatchMethod(3);
|
||||
packetDirectionCfg.setIsHexbin(0);
|
||||
complexList.add(packetDirectionCfg);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Map<String,List> map = cfgConvert(strRegionList,complexList,2,entity,groupRelationList);
|
||||
groupRelationList=map.get("groupList");
|
||||
strRegionList=map.get("dstList");
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
List<AppTcpCfg> numCfgList = appMultiFeatureCfgDao.getAppTcpCfg(entity.getCompileId(),entity.getFunctionId(),null);
|
||||
|
||||
@@ -1513,7 +1513,7 @@ public class ConfigSynchronizationService extends BaseService{
|
||||
List<GroupReuseCfg> groupReuseList=new ArrayList<>();
|
||||
GroupReuseCfg groupReuseCfg=new GroupReuseCfg();
|
||||
/*groupReuseCfg.setUserRegion(userRegion);*/
|
||||
groupReuseCfg.setServiceId(entitys.get(0).getServiceId());
|
||||
/*groupReuseCfg.setServiceId(entitys.get(0).getServiceId());*/
|
||||
ipRegionList.addAll(groupReuseCfgAddRemoveConvert(entitys,entity.getIsValid(),entitys.get(0).getGroupId()));
|
||||
groupReuseCfg.setIpRegionList(ipRegionList);
|
||||
groupReuseCfg.setStrRegionList(strRegionList);
|
||||
@@ -1592,7 +1592,7 @@ public class ConfigSynchronizationService extends BaseService{
|
||||
}else {
|
||||
logger.info("app ip批量生效:"+json);
|
||||
//调用服务接口同步回调类配置
|
||||
ToMaatResult result = ConfigServiceUtil.postGroupReuseSources(json);
|
||||
ToMaatResult result = ConfigServiceUtil.auditCommonGroupRegionSources(json,1);
|
||||
if(result!=null){
|
||||
logger.info("app ip批量生效响应信息:"+result.getMsg());
|
||||
}
|
||||
|
||||
@@ -149,6 +149,8 @@ public class InterceptCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo>
|
||||
spoofingPool.setCreatorId(UserUtils.getUser().getId());
|
||||
spoofingPool.setCompileId(spoofingPoolId);
|
||||
spoofingPool.setAction(1);
|
||||
spoofingPool.setIsValid(0);
|
||||
spoofingPool.setIsAudit(0);
|
||||
spoofingPool.setFunctionId(666);
|
||||
spoofingPool.setRequestId(0);
|
||||
pxyObjSpoofingIpPoolDao.insert(spoofingPool);//保存仿冒IP池配置
|
||||
|
||||
@@ -132,6 +132,8 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
|
||||
entity.setCompileId(compileId);
|
||||
entity.setCreateTime(new Date());
|
||||
entity.setCreatorId(entity.getCurrentUser().getId());
|
||||
//保存asn组织信息 字符串域信息
|
||||
handleAsn(entity.getAsnKeywords(), entity);
|
||||
ipCfgDao.saveCfgIndex(entity);
|
||||
if(entity.getIpPortList()!=null){
|
||||
for(IpPortCfg cfg:entity.getIpPortList()){
|
||||
@@ -155,42 +157,15 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
|
||||
areaIpCfgDao.saveAreaIpCfg(cfg);
|
||||
}
|
||||
}
|
||||
//保存asn组织信息 字符串域信息
|
||||
if(StringUtils.isNotBlank(entity.getUserRegion4())){
|
||||
List<FunctionRegionDict> functionRegionDicts=DictUtils.getFunctionRegionDictList(entity.getFunctionId());
|
||||
FunctionRegionDict regionDict=null;
|
||||
for(FunctionRegionDict dict:functionRegionDicts) {
|
||||
if("asn".equals(dict.getConfigServiceType())) {
|
||||
regionDict=dict;
|
||||
}
|
||||
}
|
||||
if(regionDict!=null) {
|
||||
String org=entity.getUserRegion4();
|
||||
List<AsnGroupInfo> asnGroupInfos=asnGroupInfoDao.getValidConfigGroupInfoByName(org);
|
||||
for(AsnGroupInfo info:asnGroupInfos) {
|
||||
BaseStringCfg<AsnKeywordCfg> asnKeywordCfg=new AsnKeywordCfg();
|
||||
BeanUtils.copyProperties(entity, asnKeywordCfg,new String[]{"cfgId","cfgDesc","cfgRegionCode","cfgType","userRegion1","userRegion2","userRegion3"});
|
||||
asnKeywordCfg.setTableName(AsnKeywordCfg.getTablename());
|
||||
asnKeywordCfg.setCfgKeywords("AS"+info.getAsnId());
|
||||
asnKeywordCfg.setExprType(0);
|
||||
asnKeywordCfg.setMatchMethod(3);
|
||||
asnKeywordCfg.setExType("0");
|
||||
asnKeywordCfg.setIsHexbin(0);
|
||||
asnKeywordCfg.setCfgRegionCode(regionDict.getConfigRegionCode());
|
||||
asnKeywordCfg.setCfgType(regionDict.getConfigRegionValue());
|
||||
asnKeywordCfg.setCreateTime(entity.getCreateTime());
|
||||
asnKeywordCfg.setCreatorId(UserUtils.getUser().getId());
|
||||
asnKeywordCfg.setFunctionId(regionDict.getFunctionId());
|
||||
asnKeywordCfg.setCompileId(compileId);
|
||||
stringCfgDao.saveStringCfgBatch(asnKeywordCfg);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}else{
|
||||
entity.setEditTime(new Date());
|
||||
entity.setEditorId(entity.getCurrentUser().getId());
|
||||
//保存asn组织信息 字符串域信息
|
||||
handleAsn(entity.getAsnKeywords(), entity);
|
||||
ipCfgDao.updateCfgIndex(entity);
|
||||
entity.setCreateTime(new Date());
|
||||
entity.setCreatorId(entity.getCurrentUser().getId());
|
||||
//无效子配置后,再新增子配置
|
||||
ipCfgDao.deleteIpCfg(entity);
|
||||
stringCfgDao.deleteSubscribeIdCfgByCfgIndexInfo(entity);
|
||||
@@ -198,8 +173,6 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
|
||||
area.setCompileId(entity.getCompileId());
|
||||
area.setFunctionId(entity.getFunctionId());
|
||||
areaIpCfgDao.deleteAreaIpCfg(area);
|
||||
entity.setCreateTime(new Date());
|
||||
entity.setCreatorId(entity.getCurrentUser().getId());
|
||||
if(entity.getIpPortList()!=null){
|
||||
for(IpPortCfg cfg:entity.getIpPortList()){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
@@ -222,8 +195,9 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
|
||||
areaIpCfgDao.saveAreaIpCfg(cfg);
|
||||
}
|
||||
}
|
||||
handleAsn(entity.getAsnKeywords(), entity);
|
||||
//保存asn组织信息 字符串域信息
|
||||
if(StringUtils.isNotBlank(entity.getUserRegion4())){
|
||||
/*if(StringUtils.isNotBlank(entity.getUserRegion4())){
|
||||
List<FunctionRegionDict> functionRegionDicts=DictUtils.getFunctionRegionDictList(entity.getFunctionId());
|
||||
FunctionRegionDict regionDict=null;
|
||||
for(FunctionRegionDict dict:functionRegionDicts) {
|
||||
@@ -257,7 +231,7 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}*/
|
||||
}
|
||||
}
|
||||
public void updateIpCfgValid(Integer isValid,String ids,Integer functionId){
|
||||
@@ -571,6 +545,8 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
|
||||
numRegionList.addAll(map.get("numRegionList"));
|
||||
}
|
||||
}
|
||||
}else{
|
||||
maatType=1;
|
||||
}
|
||||
if(entity.getNtcSubscribeIdCfgList()!=null && entity.getNtcSubscribeIdCfgList().size()>0){
|
||||
NtcSubscribeIdCfg cfg = new NtcSubscribeIdCfg();
|
||||
@@ -583,26 +559,8 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
|
||||
strRegionList=map.get("dstList");
|
||||
}
|
||||
}
|
||||
if(entity.getAsnKeywords()!=null && entity.getAsnKeywords().size()>0){
|
||||
String regionValue=entity.getAsnKeywords().get(0).getCfgType();
|
||||
if(regionValue!=null) {
|
||||
for(FunctionRegionDict region:dictList) {
|
||||
if(regionValue.equals(region.getConfigRegionValue())) {
|
||||
maatType=region.getIsMaat();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
AsnKeywordCfg cfg = new AsnKeywordCfg();
|
||||
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||
cfg.setTableName(AsnKeywordCfg.getTablename());
|
||||
ipCfgDao.auditCfg(cfg);
|
||||
if(isAudit==1&&maatType==Constants.MAAT_TYPE){
|
||||
Map<String,List> map = cfgConvert(strRegionList,entity.getAsnKeywords(),2,entity,groupRelationList);
|
||||
groupRelationList=map.get("groupList");
|
||||
strRegionList=map.get("dstList");
|
||||
}
|
||||
}
|
||||
//asn配置下发
|
||||
auditAsnCfg(groupRelationList,strRegionList,entity,entity.getAsnKeywords());
|
||||
//保存区域IP信息
|
||||
List<AreaIpCfg> areaIpCfgList=areaIpCfgDao.getByCompileId(entity.getCompileId());
|
||||
if(!StringUtil.isEmpty(areaIpCfgList)){
|
||||
@@ -710,7 +668,7 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
|
||||
maatCfg.setCompileId(entity.getCompileId());
|
||||
maatCfg.setServiceId(entity.getServiceId());
|
||||
maatCfg.setIsValid(0);//无效
|
||||
configCompileList.add(maatCfg);
|
||||
configCompileList.add(addKeepGroupList(maatCfg,entity));
|
||||
maatBean.setConfigCompileList(configCompileList);
|
||||
maatBean.setAuditTime(entity.getAuditTime());
|
||||
maatBean.setCreatorName(entity.getCurrentUser().getName());
|
||||
@@ -905,7 +863,7 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
|
||||
List<NtcSubscribeIdCfg> subscribeIdList = stringCfgDao.findSubscribeIdCfgListByCfgIndexInfo(entity);
|
||||
entity.setIpPortList(ipPortList);
|
||||
entity.setNtcSubscribeIdCfgList(subscribeIdList);
|
||||
if(StringUtils.isNotBlank(entity.getUserRegion4())) {
|
||||
if(StringUtils.isNotBlank(entity.getCommonGroupIds())) {
|
||||
List<AsnKeywordCfg> asnKeywordCfgs=stringCfgDao.findAsnKeywordCfgList(entity);
|
||||
entity.setAsnKeywords(asnKeywordCfgs);
|
||||
}
|
||||
|
||||
@@ -269,6 +269,31 @@ public class PxyObjSpoofingIpPoolService extends BaseService{
|
||||
return gsonToJson(rangeCfg);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* IP Spoofing配置导入时 下发仿冒IP池配置
|
||||
* @param spoofingPools
|
||||
*/
|
||||
public void auditSpoofingPool(List<PxyObjSpoofingIpPool> spoofingPools) {
|
||||
//调用服务接口下发配置数据
|
||||
String json=gsonToJson(spoofingPools);
|
||||
if(spoofingPools.size()>10) {
|
||||
logger.info("欺骗IP池配置下发配置条数:" + spoofingPools.size());
|
||||
}else {
|
||||
logger.info("欺骗IP池配置下发配置参数:" + json);
|
||||
}
|
||||
//调用服务接口下发配置
|
||||
try {
|
||||
ToMaatResult result = ConfigServiceUtil.postCallbackCfg(json);
|
||||
if(result!=null){
|
||||
logger.info("欺骗IP池配置下发响应信息:"+result.getMsg());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("欺骗IP池配置配置下发失败",e);
|
||||
throw e;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1018,7 +1018,7 @@ domain_intercepter_ratelimit=Domain Intercept Rate Limit
|
||||
app_built_in_features_config=APP Built-in Features
|
||||
PXY_INTERCEPT_PKT_BIN=Packet Payload
|
||||
certificate=Certificate
|
||||
do_log=Log Option
|
||||
do_log=Do Log
|
||||
file_strategy=File Strategy
|
||||
file_desc=File Desc
|
||||
content_type=Content Type
|
||||
@@ -1045,7 +1045,7 @@ keyring_name=Key Pair Name
|
||||
keyring_type=Certificate Type
|
||||
private_key_file=Private Key File
|
||||
public_key_file=Public Key File
|
||||
expire_after=Expire After
|
||||
expire_after=Expire After(Days)
|
||||
issuer=Certificate Issuer
|
||||
certificate_subject=Certificate Subject
|
||||
not_before_time=Certificate Start Time
|
||||
@@ -1467,4 +1467,11 @@ website_statistics=Website Statistics
|
||||
not_exist=not exist
|
||||
real_time=Real Time
|
||||
history=History
|
||||
all_columns_hidden=All columns are hidden!
|
||||
all_columns_hidden=All columns are hidden!
|
||||
no_log=No Log
|
||||
all_log=Meta And File Log
|
||||
framework_log=Meta Log
|
||||
block_drop=Block(Drop)
|
||||
mail_record=Mail Records
|
||||
ssl_record=SSL Records
|
||||
http_record=HTTP Records
|
||||
@@ -342,10 +342,10 @@ expression_type=\u0422\u0438\u043f \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0
|
||||
null_expression=\u041d\u0435\u0442 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f
|
||||
and_expression=&
|
||||
match_method=\u041c\u0435\u0442\u043e\u0434\u044b \u0441\u043e\u0433\u043b\u0430\u0441\u043e\u0432\u0430\u043d\u0438\u0435
|
||||
substring_match=\u0421\u043E\u0432\u043F\u0430\u0434\u0435\u043D\u0438\u0435 \u041F\u043E\u0434\u0441\u0442\u0440\u043E\u043A\u043E\u0439
|
||||
right_match= \u0421\u0443\u0444\u0444\u0438\u043A\u0441 \u0421\u043E\u0432\u043F\u0430\u0434\u0435\u043D\u0438\u0435
|
||||
left_match=\u041F\u0440\u0435\u0444\u0438\u043A\u0441 \u0421\u043E\u0432\u043F\u0430\u0434\u0435\u043D\u0438\u0435
|
||||
exactly_match=\u0422\u043E\u0447\u043D\u043E\u0441\u0442\u044C\u044E \u0421\u043E\u0432\u043F\u0430\u0434\u0435\u043D\u0438\u0435
|
||||
substring_match=\u0421\u043E\u0433\u043B\u0430\u0441\u043E\u0432\u0430\u043D\u0438\u0435 \u041F\u043E\u0434\u0441\u0442\u0440\u043E\u043A\u043E\u0439
|
||||
right_match= \u0421\u0443\u0444\u0444\u0438\u043A\u0441 \u0421\u043E\u0433\u043B\u0430\u0441\u043E\u0432\u0430\u043D\u0438\u0435
|
||||
left_match=\u041F\u0440\u0435\u0444\u0438\u043A\u0441 \u0421\u043E\u0433\u043B\u0430\u0441\u043E\u0432\u0430\u043D\u0438\u0435
|
||||
exactly_match=\u0422\u043E\u0447\u043D\u043E\u0441\u0442\u044C\u044E \u0421\u043E\u0433\u043B\u0430\u0441\u043E\u0432\u0430\u043D\u0438\u0435
|
||||
whether_hexbinary=\u041d\u0435\u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043a \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0443 \u0438\u043b\u0438 \u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u0438\u043b\u0438 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 HEX
|
||||
hex_binary=HEX \u0444\u043e\u0440\u043c\u0430\u0442
|
||||
case_insensitive_nohex=\u041d\u0435\u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u0435\u043d \u043a \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0443, \u0438 \u043d\u0435 HEX
|
||||
@@ -1018,7 +1018,7 @@ domain_intercepter_ratelimit=\u041f\u0435\u0440\u0435\u0445\u0432\u0430\u0442 \u
|
||||
app_built_in_features_config=\u0412\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f
|
||||
PXY_INTERCEPT_PKT_BIN=\u041f\u043e\u043b\u0435\u0437\u043d\u0430\u044f \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043f\u0430\u043a\u0435\u0442\u043e\u0432
|
||||
certificate=\u0421\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442
|
||||
do_log=\u0417\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u0436\u0443\u0440\u043d\u0430\u043b \u0438\u043b\u0438 \u043d\u0435\u0442
|
||||
do_log=\u041D\u0430\u0434\u043E \u043B\u0438 \u0437\u0430\u043F\u0438\u0441\u0430\u0442\u044C \u0436\u0443\u0440\u043D\u0430\u043B
|
||||
file_strategy=\u041f\u043e\u043b\u0438\u0442\u0438\u043a\u0430 \u0444\u0430\u0439\u043b\u043e\u0432
|
||||
file_desc=\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u043e\u0432
|
||||
content_type=\u0422\u0438\u043f \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044f
|
||||
@@ -1045,7 +1045,7 @@ keyring_name=\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043f\u0430\u0440
|
||||
keyring_type=\u0422\u0438\u043f \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430
|
||||
private_key_file=\u0424\u0430\u0439\u043b \u0441 \u0437\u0430\u043a\u0440\u044b\u0442\u043e\u043c \u043a\u043b\u044e\u0447\u043e\u043c
|
||||
public_key_file=\u0424\u0430\u0439\u043b \u0441 \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u043c \u043a\u043b\u044e\u0447\u043e\u043c
|
||||
expire_after=\u0418\u0441\u0442\u0435\u043a\u0430\u0435\u0442 \u043f\u043e\u0441\u043b\u0435
|
||||
expire_after=\u0418\u0441\u0442\u0435\u043a\u0430\u0435\u0442 \u043f\u043e\u0441\u043b\u0435(\u0414\u043D\u0438)
|
||||
issuer=\u042d\u043c\u0438\u0442\u0435\u043d\u0442 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430
|
||||
certificate_subject=\u041f\u0440\u0435\u0434\u043c\u0435\u0442 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430
|
||||
not_before_time=\u0412\u0440\u0435\u043c\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430
|
||||
@@ -1471,4 +1471,11 @@ website_statistics=\u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430
|
||||
not_exist=not exist
|
||||
real_time=Real Time
|
||||
history=History
|
||||
all_columns_hidden=All columns are hidden!
|
||||
all_columns_hidden=All columns are hidden!
|
||||
no_log=\u041D\u0435\u0442 \u0416\u0443\u0440\u043D\u0430\u043B\u043E\u0432
|
||||
all_log=\u0421\u0442\u0440\u0443\u043A\u0442\u0443\u0440\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0439 \u0416\u0443\u0440\u043D\u0430\u043B \u0438 \u0416\u0443\u0440\u043D\u0430\u043B-\u0444\u0430\u0439\u043B
|
||||
framework_log=\u0421\u0442\u0440\u0443\u043A\u0442\u0443\u0440\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0439 \u0416\u0443\u0440\u043D\u0430\u043B
|
||||
block_drop=\u0411\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435(\u041f\u0430\u0434\u0435\u043d\u0438\u0435)
|
||||
mail_record=\u0417\u0430\u043F\u0438\u0441\u0438 \u041F\u043E\u0447\u0442\u044B
|
||||
ssl_record=SSL \u0417\u0430\u043F\u0438\u0441\u0438
|
||||
http_record=HTTP \u0417\u0430\u043F\u0438\u0441\u0438
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user