Compare commits
28 Commits
devlop_url
...
demo_appse
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e5953a2f81 | ||
|
|
e831718fe7 | ||
|
|
e122f9587a | ||
|
|
4c5bc5b6e9 | ||
|
|
8a0f4d280f | ||
|
|
961cd7d5a1 | ||
|
|
d095635837 | ||
|
|
1afda42d88 | ||
|
|
609a75db67 | ||
|
|
295a4662e8 | ||
|
|
c028613095 | ||
|
|
2900eb1823 | ||
|
|
006cfe89da | ||
|
|
cf5db363fc | ||
|
|
23efabc29a | ||
|
|
6968a27bff | ||
|
|
0e49a1d0ac | ||
|
|
69f993f40f | ||
|
|
b935bad2d0 | ||
|
|
5e4f48088c | ||
|
|
31ec0cd29a | ||
|
|
ad28ae4d13 | ||
|
|
db20e37b13 | ||
|
|
c3f5cb7851 | ||
|
|
f91fd57901 | ||
|
|
92a39366c9 | ||
|
|
8685886b88 | ||
|
|
d1f64348f4 |
64
src/main/java/com/nis/domain/basics/UrlCommGroupCfg.java
Normal file
64
src/main/java/com/nis/domain/basics/UrlCommGroupCfg.java
Normal file
@@ -0,0 +1,64 @@
|
||||
package com.nis.domain.basics;
|
||||
|
||||
import com.nis.domain.configuration.BaseStringCfg;
|
||||
import com.nis.util.excel.ExcelField;
|
||||
|
||||
public class UrlCommGroupCfg extends BaseStringCfg<UrlCommGroupCfg>{
|
||||
|
||||
private static final long serialVersionUID = 398247881810945300L;
|
||||
private static final String tableName="http_url_cfg";
|
||||
|
||||
@ExcelField(title="key_word",sort=3)
|
||||
protected String cfgKeywords;//url关键字配置
|
||||
|
||||
// protected Integer exprType;//表达式类型
|
||||
// protected Integer matchMethod;//匹配类型
|
||||
protected Integer isHexbin;//是否大小写敏感
|
||||
protected String ratelimit;//限速比例,0到1之间
|
||||
@ExcelField(title="group_name",sort=108)
|
||||
protected String groupName;//公共组名称
|
||||
|
||||
|
||||
|
||||
public String getCfgKeywords() {
|
||||
return cfgKeywords;
|
||||
}
|
||||
public void setCfgKeywords(String cfgKeywords) {
|
||||
this.cfgKeywords = cfgKeywords;
|
||||
}
|
||||
// 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 String getRatelimit() {
|
||||
return ratelimit;
|
||||
}
|
||||
public void setRatelimit(String ratelimit) {
|
||||
this.ratelimit = ratelimit;
|
||||
}
|
||||
public static String getTablename() {
|
||||
return tableName;
|
||||
}
|
||||
|
||||
public String getGroupName() {
|
||||
return groupName;
|
||||
}
|
||||
public void setGroupName(String groupName) {
|
||||
this.groupName = groupName;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -44,23 +44,43 @@ public class AppComplexFeatureCfg extends BaseCfg<AppComplexFeatureCfg> {
|
||||
private List<AppIpCfg> ipPortList = new ArrayList();
|
||||
private String cfgRegionCode1;
|
||||
//以下参数为APP PAYLOAD L3_HEADER的特殊属性(使用偏移表达式处理)
|
||||
private String ver;
|
||||
private String ihl;
|
||||
private String tos;
|
||||
private String totalLength;
|
||||
private String flags;
|
||||
private String fragmentOffset;
|
||||
private String protocol;
|
||||
private String icmpType;
|
||||
private String icmpCode;
|
||||
private String icmpIdentifier;
|
||||
private String headerType;
|
||||
private String ver; // s: 为session组件复用时的属性含义 // s:传输协议
|
||||
private String ihl; // s:L7层协议未知×
|
||||
private String tos; // s:L7层协议
|
||||
private String totalLength; // s:链接建立方式
|
||||
private String flags; // s:TCP包发送特性
|
||||
private String fragmentOffset; // s:域名初筛标识
|
||||
private String protocol; // s:S2C Frequent Payload Size
|
||||
private String icmpType; // s:S2C Payload Size Sequence
|
||||
private String icmpCode; // s:C2S Frequent Payload Size
|
||||
private String icmpIdentifier; // s:C2S Payload Size Sequence
|
||||
private String headerType; // s:传输服务端端口
|
||||
|
||||
//以下参数为APP payload payload的特殊属性(偏移量表达式时处理)
|
||||
private Integer payloadOffset;
|
||||
private Integer payloadSize;//下发综合服务接口时,为单独的域配置
|
||||
private String payloadPacketDirection;//下发综合服务接口时,为单独的域配置
|
||||
|
||||
private Integer payloadOffset; // s:session size min
|
||||
private Integer payloadSize;//下发综合服务接口时,为单独的域配置 // s:session size max
|
||||
private String payloadPacketDirection;//下发综合服务接口时,为单独的域配置 // s:清洗标识
|
||||
|
||||
private String sessionC2sRadio;
|
||||
private String sessionS2cRadio;
|
||||
|
||||
|
||||
public String getSessionC2sRadio() {
|
||||
return sessionC2sRadio;
|
||||
}
|
||||
|
||||
public void setSessionC2sRadio(String sessionC2sRadio) {
|
||||
this.sessionC2sRadio = sessionC2sRadio;
|
||||
}
|
||||
|
||||
public String getSessionS2cRadio() {
|
||||
return sessionS2cRadio;
|
||||
}
|
||||
|
||||
public void setSessionS2cRadio(String sessionS2cRadio) {
|
||||
this.sessionS2cRadio = sessionS2cRadio;
|
||||
}
|
||||
|
||||
public String getCfgRegionCode1() {
|
||||
return cfgRegionCode1;
|
||||
}
|
||||
|
||||
@@ -8,6 +8,9 @@
|
||||
*/
|
||||
package com.nis.domain.configuration;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.google.gson.annotations.Expose;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.nis.util.excel.ExcelField;
|
||||
@@ -38,6 +41,10 @@ public class AppDomainCfg extends BaseCfg<AppDomainCfg> {
|
||||
private String cfgKeywords;
|
||||
@ExcelField(title="social_app",sort=2)
|
||||
private String appName;
|
||||
|
||||
private AppFeatureProperties appFeaturePropCfg;
|
||||
private List<AppFeatureProperties> appFeaturePropCfgList = new ArrayList();
|
||||
|
||||
/**
|
||||
* 表达式类型
|
||||
*/
|
||||
@@ -71,6 +78,22 @@ public class AppDomainCfg extends BaseCfg<AppDomainCfg> {
|
||||
|
||||
|
||||
|
||||
public AppFeatureProperties getAppFeaturePropCfg() {
|
||||
return appFeaturePropCfg;
|
||||
}
|
||||
|
||||
public void setAppFeaturePropCfg(AppFeatureProperties appFeaturePropCfg) {
|
||||
this.appFeaturePropCfg = appFeaturePropCfg;
|
||||
}
|
||||
|
||||
public List<AppFeatureProperties> getAppFeaturePropCfgList() {
|
||||
return appFeaturePropCfgList;
|
||||
}
|
||||
|
||||
public void setAppFeaturePropCfgList(List<AppFeatureProperties> appFeaturePropCfgList) {
|
||||
this.appFeaturePropCfgList = appFeaturePropCfgList;
|
||||
}
|
||||
|
||||
public Integer getIsHex() {
|
||||
return isHex;
|
||||
}
|
||||
|
||||
@@ -11,7 +11,6 @@ package com.nis.domain.configuration;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.nis.domain.basics.AsnIpCfg;
|
||||
import com.nis.util.excel.ExcelField;
|
||||
|
||||
|
||||
@@ -37,8 +36,12 @@ public class AppFeatureIndex extends BaseCfg<AppFeatureIndex> {
|
||||
private AppByteCfg strCfg;
|
||||
private AppIpCfg ipCfg;
|
||||
private List<AppIpCfg> ipPortList = new ArrayList();
|
||||
private AppFeatureProperties appFeaturePropCfg;
|
||||
private List<AppFeatureProperties> appFeaturePropCfgList = new ArrayList();
|
||||
|
||||
private List<AppStringFeatureCfg> strList = new ArrayList();
|
||||
private List<AppComplexFeatureCfg> complexList = new ArrayList();
|
||||
private List<AppComplexFeatureCfg> sessionList = new ArrayList();
|
||||
private List<AppTcpCfg> numCfgList = new ArrayList();
|
||||
protected Integer exprType ;
|
||||
protected Integer matchMethod ;
|
||||
@@ -194,4 +197,23 @@ public class AppFeatureIndex extends BaseCfg<AppFeatureIndex> {
|
||||
this.relationTime = relationTime;
|
||||
}
|
||||
|
||||
public List<AppComplexFeatureCfg> getSessionList() {
|
||||
return sessionList;
|
||||
}
|
||||
public void setSessionList(List<AppComplexFeatureCfg> sessionList) {
|
||||
this.sessionList = sessionList;
|
||||
}
|
||||
|
||||
public AppFeatureProperties getAppFeaturePropCfg() {
|
||||
return appFeaturePropCfg;
|
||||
}
|
||||
public void setAppFeaturePropCfg(AppFeatureProperties appFeaturePropCfg) {
|
||||
this.appFeaturePropCfg = appFeaturePropCfg;
|
||||
}
|
||||
public List<AppFeatureProperties> getAppFeaturePropCfgList() {
|
||||
return appFeaturePropCfgList;
|
||||
}
|
||||
public void setAppFeaturePropCfgList(List<AppFeatureProperties> appFeaturePropCfgList) {
|
||||
this.appFeaturePropCfgList = appFeaturePropCfgList;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,94 @@
|
||||
|
||||
package com.nis.domain.configuration;
|
||||
|
||||
import com.google.gson.annotations.Expose;
|
||||
import com.nis.util.excel.ExcelField;
|
||||
|
||||
/**
|
||||
*
|
||||
* @ClassName:AppCorrelationIpCfg
|
||||
* @Description:TODO(这里用一句话描述这个类的作用)
|
||||
* @author zdx
|
||||
* @date 2019年1月28日 下午6:09:24
|
||||
* @version V1.0
|
||||
*/
|
||||
public class AppFeatureProperties extends BaseCfg<AppFeatureProperties> {
|
||||
|
||||
private static final long serialVersionUID = -5994798049255256431L;
|
||||
private static final String tableName="app_feature_prop_cfg";
|
||||
@Expose
|
||||
@ExcelField(title="cfg_id",sort=0)
|
||||
private Long cfgId;
|
||||
private Integer compileId;
|
||||
private Integer dropOpt;
|
||||
private Integer loopOpt;
|
||||
private String weakFeature;
|
||||
private String whitelistFeature;
|
||||
private Integer extendScanPktNum;
|
||||
private Integer correlationValidTime;
|
||||
private String correlationBlockAfter;
|
||||
private Integer longStreamLockTime;
|
||||
public Long getCfgId() {
|
||||
return cfgId;
|
||||
}
|
||||
public void setCfgId(Long cfgId) {
|
||||
this.cfgId = cfgId;
|
||||
}
|
||||
public Integer getCompileId() {
|
||||
return compileId;
|
||||
}
|
||||
public void setCompileId(Integer compileId) {
|
||||
this.compileId = compileId;
|
||||
}
|
||||
public Integer getDropOpt() {
|
||||
return dropOpt;
|
||||
}
|
||||
public void setDropOpt(Integer dropOpt) {
|
||||
this.dropOpt = dropOpt;
|
||||
}
|
||||
public Integer getLoopOpt() {
|
||||
return loopOpt;
|
||||
}
|
||||
public void setLoopOpt(Integer loopOpt) {
|
||||
this.loopOpt = loopOpt;
|
||||
}
|
||||
public String getWeakFeature() {
|
||||
return weakFeature;
|
||||
}
|
||||
public void setWeakFeature(String weakFeature) {
|
||||
this.weakFeature = weakFeature;
|
||||
}
|
||||
public String getWhitelistFeature() {
|
||||
return whitelistFeature;
|
||||
}
|
||||
public void setWhitelistFeature(String whitelistFeature) {
|
||||
this.whitelistFeature = whitelistFeature;
|
||||
}
|
||||
public Integer getExtendScanPktNum() {
|
||||
return extendScanPktNum;
|
||||
}
|
||||
public void setExtendScanPktNum(Integer extendScanPktNum) {
|
||||
this.extendScanPktNum = extendScanPktNum;
|
||||
}
|
||||
public Integer getCorrelationValidTime() {
|
||||
return correlationValidTime;
|
||||
}
|
||||
public void setCorrelationValidTime(Integer correlationValidTime) {
|
||||
this.correlationValidTime = correlationValidTime;
|
||||
}
|
||||
public String getCorrelationBlockAfter() {
|
||||
return correlationBlockAfter;
|
||||
}
|
||||
public void setCorrelationBlockAfter(String correlationBlockAfter) {
|
||||
this.correlationBlockAfter = correlationBlockAfter;
|
||||
}
|
||||
public Integer getLongStreamLockTime() {
|
||||
return longStreamLockTime;
|
||||
}
|
||||
public void setLongStreamLockTime(Integer longStreamLockTime) {
|
||||
this.longStreamLockTime = longStreamLockTime;
|
||||
}
|
||||
public static String getTablename() {
|
||||
return tableName;
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,8 @@
|
||||
|
||||
package com.nis.domain.configuration;
|
||||
|
||||
import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.google.gson.annotations.Expose;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
@@ -42,6 +43,9 @@ public class AppIpCfg extends BaseCfg<AppIpCfg> {
|
||||
protected String srcPort;
|
||||
@ExcelField(title="server_port",sort=5)
|
||||
protected String destPort;
|
||||
private AppFeatureProperties appFeaturePropCfg;
|
||||
private List<AppFeatureProperties> appFeaturePropCfgList = new ArrayList();
|
||||
|
||||
|
||||
/**
|
||||
* 方向
|
||||
@@ -71,6 +75,18 @@ public class AppIpCfg extends BaseCfg<AppIpCfg> {
|
||||
public Integer getIpType() {
|
||||
return ipType;
|
||||
}
|
||||
public AppFeatureProperties getAppFeaturePropCfg() {
|
||||
return appFeaturePropCfg;
|
||||
}
|
||||
public void setAppFeaturePropCfg(AppFeatureProperties appFeaturePropCfg) {
|
||||
this.appFeaturePropCfg = appFeaturePropCfg;
|
||||
}
|
||||
public List<AppFeatureProperties> getAppFeaturePropCfgList() {
|
||||
return appFeaturePropCfgList;
|
||||
}
|
||||
public void setAppFeaturePropCfgList(List<AppFeatureProperties> appFeaturePropCfgList) {
|
||||
this.appFeaturePropCfgList = appFeaturePropCfgList;
|
||||
}
|
||||
/**
|
||||
* @param ipType the ipType to set
|
||||
*/
|
||||
|
||||
@@ -15,6 +15,7 @@ import com.google.gson.annotations.Expose;
|
||||
import com.nis.domain.basics.AsnGroupInfo;
|
||||
import com.nis.domain.basics.AsnIpCfg;
|
||||
import com.nis.domain.basics.IpReuseIpCfg;
|
||||
import com.nis.domain.basics.UrlCommGroupCfg;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.excel.ExcelField;
|
||||
|
||||
@@ -88,8 +89,9 @@ public class CfgIndexInfo extends BaseCfg<CfgIndexInfo> {
|
||||
private List<AsnKeywordCfg> asnKeywords;
|
||||
@ExcelField(title="log_total",sort=42)
|
||||
private Long totalLogs;
|
||||
|
||||
|
||||
|
||||
private UrlCommGroupCfg urlCommGroupCfg;
|
||||
private List<UrlCommGroupCfg> urlCommGroupList;
|
||||
/*private CachePolicyUserRegion cachePolicyUserRegion;//缓存策略用户自定义域参数
|
||||
|
||||
public static class CachePolicyUserRegion{
|
||||
@@ -411,4 +413,16 @@ public class CfgIndexInfo extends BaseCfg<CfgIndexInfo> {
|
||||
public void setTotalLogs(Long totalLogs) {
|
||||
this.totalLogs = totalLogs;
|
||||
}
|
||||
public List<UrlCommGroupCfg> getUrlCommGroupList() {
|
||||
return urlCommGroupList;
|
||||
}
|
||||
public void setUrlCommGroupList(List<UrlCommGroupCfg> urlCommGroupList) {
|
||||
this.urlCommGroupList = urlCommGroupList;
|
||||
}
|
||||
public UrlCommGroupCfg getUrlCommGroupCfg() {
|
||||
return urlCommGroupCfg;
|
||||
}
|
||||
public void setUrlCommGroupCfg(UrlCommGroupCfg urlCommGroupCfg) {
|
||||
this.urlCommGroupCfg = urlCommGroupCfg;
|
||||
}
|
||||
}
|
||||
|
||||
242
src/main/java/com/nis/domain/configuration/DnsKeywordCfg.java
Normal file
242
src/main/java/com/nis/domain/configuration/DnsKeywordCfg.java
Normal file
@@ -0,0 +1,242 @@
|
||||
/**
|
||||
*@Title: BaseEnhancedStringConfig.java
|
||||
*@Package com.nis.domain.restful
|
||||
*@Description TODO
|
||||
*@author dell
|
||||
*@date 2018年2月5日 下午5:42:52
|
||||
*@version 版本号
|
||||
*/
|
||||
package com.nis.domain.configuration;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.lang3.StringEscapeUtils;
|
||||
import org.apache.taglibs.standard.functions.Functions;
|
||||
|
||||
import com.google.gson.annotations.Expose;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.nis.util.excel.ExcelField;
|
||||
|
||||
/**
|
||||
* @ClassName: BaseEnhancedStringConfig.java
|
||||
* @Description: 基础增强字符串类配置
|
||||
* @author (wx)
|
||||
* @date 2018年2月5日 下午5:42:52
|
||||
* @version V1.0
|
||||
*/
|
||||
public class DnsKeywordCfg extends BaseCfg<DnsKeywordCfg>{
|
||||
/**
|
||||
* @Fields serialVersionUID:TODO(用一句话描述这个变量表示什么)
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
|
||||
private static final long serialVersionUID = -1417089397345367232L;
|
||||
private static final String tableName="dns_domain_cfg";
|
||||
/**
|
||||
* 匹配区域
|
||||
*/
|
||||
@Expose
|
||||
@ExcelField(title="district",sort=301)
|
||||
@SerializedName("district")
|
||||
protected String district ;
|
||||
protected String districtShowName;
|
||||
|
||||
protected String dnsGroupName;
|
||||
/**
|
||||
* 关键字
|
||||
*/
|
||||
@Expose
|
||||
@SerializedName("keywords")
|
||||
@ExcelField(title="key_word",sort=302)
|
||||
protected String cfgKeywords;
|
||||
protected String keywordsShowName;
|
||||
/**
|
||||
* 表达式类型
|
||||
*/
|
||||
@Expose
|
||||
@SerializedName("exprType")
|
||||
@ExcelField(title="expression_type",dictType="EXPRESSION_TYPE",sort=303)
|
||||
protected Integer exprType ;
|
||||
/**
|
||||
* 匹配方式
|
||||
*/
|
||||
@Expose
|
||||
@ExcelField(title="match_method",dictType="MATCH_METHOD",sort=304)
|
||||
@SerializedName("matchMethod")
|
||||
protected Integer matchMethod ;
|
||||
|
||||
/**
|
||||
* 是否hex
|
||||
*/
|
||||
@ExcelField(title="is_hex",sort=305)
|
||||
protected Integer isHex;
|
||||
/**
|
||||
* 是否hex
|
||||
*/
|
||||
@ExcelField(title="is_case_insenstive",sort=306)
|
||||
protected Integer isCaseInsenstive;
|
||||
|
||||
/**
|
||||
* 是否hex二进制
|
||||
*/
|
||||
@Expose
|
||||
@SerializedName("isHexbin")
|
||||
protected Integer isHexbin ;
|
||||
/**
|
||||
* district
|
||||
* @return district
|
||||
*/
|
||||
|
||||
public String getDistrict() {
|
||||
return district;
|
||||
}
|
||||
/**
|
||||
* copy属性使用
|
||||
*/
|
||||
protected Long dnsStrategyId;
|
||||
protected Integer appCode;//仅用于copy属性使用
|
||||
protected Integer behavCode;//仅用于copy属性使用
|
||||
protected Integer specServiceId;//仅用于copy属性使用
|
||||
|
||||
public Integer getAppCode() {
|
||||
return appCode;
|
||||
}
|
||||
public void setAppCode(Integer appCode) {
|
||||
this.appCode = appCode;
|
||||
}
|
||||
public Integer getBehavCode() {
|
||||
return behavCode;
|
||||
}
|
||||
public void setBehavCode(Integer behavCode) {
|
||||
this.behavCode = behavCode;
|
||||
}
|
||||
public Integer getSpecServiceId() {
|
||||
return specServiceId;
|
||||
}
|
||||
public void setSpecServiceId(Integer specServiceId) {
|
||||
this.specServiceId = specServiceId;
|
||||
}
|
||||
public Long getDnsStrategyId() {
|
||||
return dnsStrategyId;
|
||||
}
|
||||
public void setDnsStrategyId(Long dnsStrategyId) {
|
||||
this.dnsStrategyId = dnsStrategyId;
|
||||
}
|
||||
/**
|
||||
* @param district the district to set
|
||||
*/
|
||||
public void setDistrict(String district) {
|
||||
this.district = district;
|
||||
}
|
||||
public String getCfgKeywords() {
|
||||
// cfgKeywords = StringEscapeUtils.unescapeHtml4(cfgKeywords);
|
||||
return cfgKeywords;
|
||||
}
|
||||
public void setCfgKeywords(String cfgKeywords) {
|
||||
this.cfgKeywords = cfgKeywords;
|
||||
}
|
||||
public String getDistrictShowName() {
|
||||
return districtShowName;
|
||||
}
|
||||
public void setDistrictShowName(String districtShowName) {
|
||||
this.districtShowName = districtShowName;
|
||||
}
|
||||
/**
|
||||
* exprType
|
||||
* 继承此类的类会覆盖该方法写自己的缺省值
|
||||
* @return exprType
|
||||
*/
|
||||
|
||||
public Integer getExprType() {
|
||||
return this.exprType;
|
||||
}
|
||||
/**
|
||||
* @param exprType the exprType to set
|
||||
*/
|
||||
public void setExprType(Integer exprType) {
|
||||
this.exprType = exprType;
|
||||
}
|
||||
/**
|
||||
* matchMethod
|
||||
* 继承此类的类会覆盖该方法写自己的缺省值
|
||||
* @return matchMethod
|
||||
*/
|
||||
|
||||
public Integer getMatchMethod() {
|
||||
return this.matchMethod;
|
||||
}
|
||||
/**
|
||||
* @param matchMethod the matchMethod to set
|
||||
*/
|
||||
public void setMatchMethod(Integer matchMethod) {
|
||||
this.matchMethod = matchMethod;
|
||||
}
|
||||
/**
|
||||
* isHexbin
|
||||
* @return isHexbin
|
||||
*/
|
||||
|
||||
public Integer getIsHexbin() {
|
||||
return isHexbin;
|
||||
}
|
||||
/**
|
||||
* @param isHexbin the isHexbin to set
|
||||
*/
|
||||
public void setIsHexbin(Integer isHexbin) {
|
||||
this.isHexbin = isHexbin;
|
||||
}
|
||||
public Integer getIsHex() {
|
||||
return isHex;
|
||||
}
|
||||
public void setIsHex(Integer isHex) {
|
||||
this.isHex =isHex;
|
||||
}
|
||||
public Integer getIsCaseInsenstive() {
|
||||
return isCaseInsenstive;
|
||||
}
|
||||
public void setIsCaseInsenstive(Integer isCaseInsenstive) {
|
||||
this.isCaseInsenstive =isCaseInsenstive;
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see com.nis.domain.configuration.BaseCfg#initDefaultValue()
|
||||
*/
|
||||
@Override
|
||||
public void initDefaultValue() {
|
||||
// TODO Auto-generated method stub
|
||||
super.initDefaultValue();
|
||||
this.exprType=0;
|
||||
this.isHexbin = 0 ;
|
||||
this.matchMethod=3;
|
||||
}
|
||||
|
||||
public static List<DnsKeywordCfg> replaceComplexKeyList(List<DnsKeywordCfg> list){
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
DnsKeywordCfg base=(DnsKeywordCfg)list.get(i);
|
||||
base.setIsHex(base.getIsHexbin());
|
||||
// '默认为0:大小写不敏感,且非HEX;1:HEX格式二进制;2:大小写敏感,且非HEX',
|
||||
if(base.getIsHexbin()==2){
|
||||
base.setIsCaseInsenstive(1);
|
||||
}else{
|
||||
base.setIsCaseInsenstive(0);
|
||||
}
|
||||
base.setCfgKeywords(Functions.replace(base.getCfgKeywords(), "***and***"," "));
|
||||
}
|
||||
return list;
|
||||
}
|
||||
public Integer getIndex() {
|
||||
return index;
|
||||
}
|
||||
public void setIndex(Integer index) {
|
||||
this.index = index;
|
||||
}
|
||||
public static String getTablename() {
|
||||
return tableName;
|
||||
}
|
||||
public void setDnsGroupName(String dnsGroupName) {
|
||||
this.dnsGroupName = dnsGroupName;
|
||||
}
|
||||
public String getDnsGroupName() {
|
||||
return dnsGroupName;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.nis.domain.configuration.template;
|
||||
|
||||
import com.nis.util.excel.ExcelField;
|
||||
|
||||
/**
|
||||
* @Description: excel导入url分组 配置
|
||||
*/
|
||||
public class UrlCommGroupTemplate extends BasicTemplate{
|
||||
|
||||
private String cfgDesc;
|
||||
private String cfgKeywords;
|
||||
private String matchMethod;
|
||||
|
||||
|
||||
@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",align=2,sort=2)
|
||||
public String getCfgKeywords() {
|
||||
return cfgKeywords;
|
||||
}
|
||||
public void setCfgKeywords(String cfgKeywords) {
|
||||
this.cfgKeywords = cfgKeywords;
|
||||
}
|
||||
@ExcelField(title="match_method",dictType="MATCH_METHOD",sort=3)
|
||||
public String getMatchMethod() {
|
||||
return matchMethod;
|
||||
}
|
||||
public void setMatchMethod(String matchMethod) {
|
||||
this.matchMethod = matchMethod;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -744,10 +744,14 @@ public class ConfigServiceUtil {
|
||||
result= response.readEntity(String.class);
|
||||
logger.info("cgi info:"+result);
|
||||
}else{
|
||||
if(response!= null) {
|
||||
throw new MaatConvertException("<spring:message code=\"cgi_service_failed\"/>:"+response.readEntity(String.class));
|
||||
}else {
|
||||
throw new MaatConvertException("<spring:message code=\"cgi_service_failed\"/>");
|
||||
Map<String, String> map = new HashMap<String, String>();
|
||||
map = (Map<String, String>) JSON.parse(result);
|
||||
String error = map.get("error");
|
||||
if (!StringUtil.isEmpty(error)) {
|
||||
error=cgiError(error);
|
||||
throw new MaatConvertException(error);
|
||||
}else{
|
||||
throw new MaatConvertException(null);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
@@ -760,6 +764,28 @@ public class ConfigServiceUtil {
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
public static String cgiError(String error){
|
||||
String cgiError="";
|
||||
String er=error.toLowerCase().trim();
|
||||
String errors=Constants.CGI_ERROR;
|
||||
if(!StringUtil.isEmpty(errors)){
|
||||
String [] ers=errors.toLowerCase().split(",");
|
||||
for (int i = 0; i < ers.length; i++) {
|
||||
if(ers[i].trim().equals(er)){
|
||||
cgiError=error;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return cgiError;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 配置全量更新指令下发
|
||||
* @param params
|
||||
|
||||
@@ -725,6 +725,9 @@ public final class Constants {
|
||||
public static final String TREND_TOTAL_REPORT=Configurations.getStringProperty("trendTotalReport","trendTotalReport");
|
||||
public static final String TRAFFIC_APP_TREND=Configurations.getStringProperty("trafficAppTrend","trafficAppTrend");
|
||||
public static final String APPCONN_RECORD_TOP100=Configurations.getStringProperty("appConnRecordTop100","appConnRecordTop100");
|
||||
public static final String TRAFFIC_APP_PPS_TREND=Configurations.getStringProperty("trafficAppPpsTrend","trafficAppPpsTrend");
|
||||
public static final String TRAFFIC_APP_BPS_TREND=Configurations.getStringProperty("trafficAppBpsTrend","trafficAppBpsTrend");
|
||||
|
||||
/**
|
||||
* httpclient 工具超时时间设置
|
||||
*/
|
||||
@@ -828,4 +831,8 @@ public final class Constants {
|
||||
* 时间格式化
|
||||
*/
|
||||
public static final String COMMON_TIME_FORMAT = "HH:mm:ss";
|
||||
/**
|
||||
* vpn cgi接口报错信息
|
||||
*/
|
||||
public static final String CGI_ERROR = Configurations.getStringProperty("cgiError","");;
|
||||
}
|
||||
|
||||
@@ -156,6 +156,7 @@ import com.nis.web.service.SystemService;
|
||||
import com.nis.web.service.UserService;
|
||||
import com.nis.web.service.basics.AsnGroupInfoService;
|
||||
import com.nis.web.service.basics.AsnIpCfgService;
|
||||
import com.nis.web.service.basics.DnsKeywordCfgService;
|
||||
import com.nis.web.service.basics.IpReuseIpCfgService;
|
||||
import com.nis.web.service.basics.PolicyGroupInfoService;
|
||||
import com.nis.web.service.basics.ServiceDictInfoService;
|
||||
@@ -332,6 +333,8 @@ public class BaseController {
|
||||
protected PxyObjSpoofingIpPoolService pxyObjSpoofingIpPoolService;// 欺骗IP池
|
||||
@Autowired
|
||||
protected AsnGroupInfoService asnGroupInfoService;// asn组
|
||||
@Autowired
|
||||
protected DnsKeywordCfgService dnsKeywordCfgService;//DNS关键字分组配置
|
||||
/**
|
||||
* 管理基础路径
|
||||
*/
|
||||
@@ -3779,7 +3782,7 @@ public class BaseController {
|
||||
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);
|
||||
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,30000);
|
||||
list=getList(json);
|
||||
} catch (Exception e) {
|
||||
logger.error("获取日志总量失败!",e);
|
||||
|
||||
@@ -0,0 +1,194 @@
|
||||
package com.nis.web.controller.basics;
|
||||
|
||||
import java.util.ArrayList;
|
||||
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 jersey.repackaged.com.google.common.collect.Lists;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||
|
||||
import com.google.common.collect.Maps;
|
||||
import com.nis.domain.FunctionRegionDict;
|
||||
import com.nis.domain.FunctionServiceDict;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.basics.AsnGroupInfo;
|
||||
import com.nis.domain.basics.AsnIpCfg;
|
||||
import com.nis.domain.configuration.CfgIndexInfo;
|
||||
import com.nis.domain.configuration.ComplexkeywordCfg;
|
||||
import com.nis.domain.configuration.DnsKeywordCfg;
|
||||
import com.nis.exceptions.MaatConvertException;
|
||||
//import com.nis.util.AsnCacheUtils;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.DictUtils;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.web.controller.BaseController;
|
||||
import com.nis.web.security.UserUtils;
|
||||
@Controller
|
||||
@RequestMapping(value = "${adminPath}/basics/dns/keyword")
|
||||
public class DnsKeywordController extends BaseController{
|
||||
@RequestMapping(value = {"/list"})
|
||||
public String list(Model model,HttpServletRequest request
|
||||
,HttpServletResponse response,@ModelAttribute("cfg")DnsKeywordCfg entity
|
||||
){
|
||||
Page<DnsKeywordCfg> page = dnsKeywordCfgService.findPage(new Page<DnsKeywordCfg>(request, response,"r"), entity);
|
||||
model.addAttribute("page", page);
|
||||
initPageCondition(model, entity);
|
||||
List<FunctionRegionDict> regionList = DictUtils.getFunctionRegionDictList(entity.getFunctionId());
|
||||
model.addAttribute("regionList", regionList);
|
||||
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(entity.getFunctionId());
|
||||
model.addAttribute("serviceList", serviceList);
|
||||
return "/basics/dnsKeywordCfgList";
|
||||
}
|
||||
@RequestMapping(value = {"/addForm"})
|
||||
public String addForm(Model model,HttpServletRequest request
|
||||
,HttpServletResponse response,@ModelAttribute("cfg")CfgIndexInfo cfg
|
||||
,RedirectAttributes redirectAttributes){
|
||||
cfg.setGroupType(12);
|
||||
initFormCondition(model,cfg);
|
||||
model.addAttribute("_cfg", cfg);
|
||||
return "/basics/dnsKeywordCfgFormAdd";
|
||||
}
|
||||
@RequestMapping(value = {"/updateForm"})
|
||||
public String updateForm(Model model,HttpServletRequest request
|
||||
,HttpServletResponse response,String ids,@ModelAttribute("cfg")DnsKeywordCfg cfg
|
||||
,RedirectAttributes redirectAttributes){
|
||||
cfg = dnsKeywordCfgService.get(Long.parseLong(ids));
|
||||
cfg.setGroupType(12);
|
||||
initFormCondition(model, cfg);
|
||||
//List<ConfigGroupInfo> groupInfos=configGroupInfoService.findAllList(4);
|
||||
//model.addAttribute("policyGroups", groupInfos);
|
||||
model.addAttribute("cfg", cfg);
|
||||
return "/basics/dnsKeywordCfgFormUpdate";
|
||||
}
|
||||
@RequestMapping(value = {"/save"})
|
||||
@RequiresPermissions(value={"dns:keyword:config"})
|
||||
public String save(Model model,HttpServletRequest request,HttpServletResponse response,@ModelAttribute("cfg")CfgIndexInfo cfg,RedirectAttributes redirectAttributes){
|
||||
try{
|
||||
dnsKeywordCfgService.saveDnsKeywordCfg(cfg);
|
||||
addMessage(redirectAttributes,"success","save_success");
|
||||
}catch(Exception e){
|
||||
logger.error("信息保存失败",e);
|
||||
e.printStackTrace();
|
||||
if(e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes,"error",e.getMessage());
|
||||
}else {
|
||||
addMessage(redirectAttributes,"error","save_failed");
|
||||
}
|
||||
}
|
||||
|
||||
return "redirect:" + adminPath +"/basics/dns/keyword/list?functionId="+cfg.getFunctionId();
|
||||
}
|
||||
@RequestMapping(value = {"/update"})
|
||||
@RequiresPermissions(value={"dns:keyword:config"})
|
||||
public String update(Model model,HttpServletRequest request,HttpServletResponse response,@ModelAttribute("cfg")DnsKeywordCfg cfg,RedirectAttributes redirectAttributes){
|
||||
try{
|
||||
|
||||
dnsKeywordCfgService.update(cfg);
|
||||
addMessage(redirectAttributes,"success","save_success");
|
||||
}catch(Exception e){
|
||||
logger.error("信息保存失败",e);
|
||||
e.printStackTrace();
|
||||
addMessage(redirectAttributes,"error","save_failed");
|
||||
}
|
||||
|
||||
return "redirect:" + adminPath +"/basics/dns/keyword/list?functionId="+cfg.getFunctionId();
|
||||
}
|
||||
@RequestMapping(value = {"/audit"})
|
||||
@RequiresPermissions(value={"dns:keyword:config"})
|
||||
public String audit(Model model,@ModelAttribute("cfg")DnsKeywordCfg cfg
|
||||
,Integer isAudit
|
||||
,Integer isValid
|
||||
,String ids
|
||||
,Integer functionId
|
||||
, HttpServletRequest request
|
||||
,HttpServletResponse response
|
||||
,RedirectAttributes redirectAttributes) {
|
||||
//选中配置审核
|
||||
/*if(!StringUtil.isEmpty(ids)) {
|
||||
List<DnsKeywordCfg> infoList=dnsKeywordCfgService.getByIds(ids);
|
||||
Map<Long,List<DnsKeywordCfg>> dnsKeywordMap=Maps.newHashMap();
|
||||
for(DnsKeywordCfg entity:infoList) {
|
||||
entity.setIsAudit(isAudit);
|
||||
entity.setIsValid(isValid);
|
||||
entity.setAuditorId(UserUtils.getUser().getId());
|
||||
entity.setAuditTime(new Date());
|
||||
entity.setFunctionId(functionId);
|
||||
if(dnsKeywordMap.containsKey(Long.parseLong(entity.getUserRegion1()))) {
|
||||
dnsKeywordMap.get(Long.parseLong(entity.getUserRegion1())).add(entity);
|
||||
}else {
|
||||
List<DnsKeywordCfg> keywords=Lists.newArrayList();
|
||||
keywords.add(entity);
|
||||
dnsKeywordMap.put(Long.parseLong(entity.getUserRegion1()), keywords);
|
||||
}
|
||||
}
|
||||
*//********************每次下发一个组的region,保证事物********************//*
|
||||
for (Long groupId : dnsKeywordMap.keySet()) {
|
||||
try {
|
||||
dnsKeywordCfgService.auditDnsKeywordBatch(dnsKeywordMap.get(groupId),groupId,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");
|
||||
Page<AsnIpCfg> auditPage=new Page<AsnIpCfg>(request,response,"a");
|
||||
BeanUtils.copyProperties(searchPage, auditPage);
|
||||
try {
|
||||
auditAll(auditPage,isValid , cfg);
|
||||
addMessage(redirectAttributes,"success", "audit_success");
|
||||
} catch (Exception e) {
|
||||
logger.error("配置下发失败:",e);
|
||||
if(e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes,"error", "request_service_failed");
|
||||
}else {
|
||||
addMessage(redirectAttributes,"error", "audit_failed");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return list(model, request, response, cfg);
|
||||
}*/
|
||||
return "redirect:" + adminPath +"/basics/dns/keyword/list?functionId="+cfg.getFunctionId();
|
||||
}
|
||||
@RequestMapping(value = {"/delete"})
|
||||
@RequiresPermissions(value={"dns:keyword:config"})
|
||||
public String delete(Integer isValid
|
||||
,String ids,Integer functionId
|
||||
,RedirectAttributes redirectAttributes){
|
||||
try{
|
||||
dnsKeywordCfgService.delete(ids);
|
||||
addMessage(redirectAttributes,"success","delete_success");
|
||||
}catch(Exception e){
|
||||
logger.error("Delete failed",e);
|
||||
if(e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes,"error",e.getMessage());
|
||||
}else {
|
||||
addMessage(redirectAttributes,"error","delete_failed");
|
||||
}
|
||||
}
|
||||
|
||||
return "redirect:" + adminPath +"/basics/dns/keyword/list?functionId="+functionId;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,261 @@
|
||||
package com.nis.web.controller.basics;
|
||||
|
||||
import java.util.ArrayList;
|
||||
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.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
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.common.collect.Maps;
|
||||
import com.nis.domain.FunctionRegionDict;
|
||||
import com.nis.domain.FunctionServiceDict;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.basics.AsnIpCfg;
|
||||
import com.nis.domain.basics.UrlCommGroupCfg;
|
||||
import com.nis.domain.configuration.CfgIndexInfo;
|
||||
import com.nis.domain.configuration.HttpUrlCfg;
|
||||
import com.nis.exceptions.MaatConvertException;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.DictUtils;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.web.controller.BaseController;
|
||||
import com.nis.web.security.UserUtils;
|
||||
import com.nis.web.service.basics.UrlCommGroupService;
|
||||
|
||||
import jersey.repackaged.com.google.common.collect.Lists;
|
||||
|
||||
@Controller
|
||||
@RequestMapping(value = "${adminPath}/basics/url")
|
||||
public class UrlCommGroupController extends BaseController{
|
||||
|
||||
@Autowired
|
||||
private UrlCommGroupService urlCommGroupService;
|
||||
|
||||
@RequestMapping(value = {"/list"})
|
||||
public String list(Model model,HttpServletRequest request
|
||||
,HttpServletResponse response,@ModelAttribute("cfg")UrlCommGroupCfg entity
|
||||
){
|
||||
Page<UrlCommGroupCfg> page = urlCommGroupService.findPage(new Page<UrlCommGroupCfg>(request, response,"r"), entity);
|
||||
model.addAttribute("page", page);
|
||||
|
||||
List<FunctionRegionDict> regionList = DictUtils.getFunctionRegionDictList(entity.getFunctionId());
|
||||
model.addAttribute("regionList", regionList);
|
||||
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(entity.getFunctionId());
|
||||
model.addAttribute("serviceList", serviceList);
|
||||
return "/basics/urlCommGroupList";
|
||||
}
|
||||
|
||||
@RequestMapping(value = {"/addForm"})
|
||||
public String addForm(Model model,HttpServletRequest request
|
||||
,HttpServletResponse response,@ModelAttribute("cfg")CfgIndexInfo cfg
|
||||
,RedirectAttributes redirectAttributes){
|
||||
|
||||
|
||||
// UrlCommGroupCfg urlCfg = new UrlCommGroupCfg();
|
||||
// urlCfg.setCfgType("NTC_URL_REGION");
|
||||
// cfg.setUrlCommGroupCfg(urlCfg);
|
||||
// List<UrlCommGroupCfg> urlList = new ArrayList<UrlCommGroupCfg>();
|
||||
// urlList.add(urlCfg);
|
||||
// cfg.setUrlCommGroupList(urlList);
|
||||
// initFormCondition(model, entity);
|
||||
cfg.setGroupType(11);
|
||||
initFormCondition(model,cfg);
|
||||
//List<ConfigGroupInfo> groupInfos=configGroupInfoService.findAllList(4);
|
||||
//model.addAttribute("policyGroups", groupInfos);
|
||||
|
||||
model.addAttribute("_cfg", cfg);
|
||||
return "/basics/urlCommGroupFormAdd";
|
||||
}
|
||||
|
||||
@RequestMapping(value = {"/save"})
|
||||
@RequiresPermissions(value={"http:url:config"})
|
||||
public String save(Model model,HttpServletRequest request,HttpServletResponse response,@ModelAttribute("cfg")CfgIndexInfo cfg,RedirectAttributes redirectAttributes){
|
||||
|
||||
// System.out.println("URL分组");
|
||||
try{
|
||||
urlCommGroupService.saveUrlCommGroupCfg(cfg);
|
||||
}catch(Exception e){
|
||||
logger.error("信息保存失败",e);
|
||||
e.printStackTrace();
|
||||
if(e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes,"error",e.getMessage());
|
||||
}else {
|
||||
addMessage(redirectAttributes,"error","save_failed");
|
||||
}
|
||||
}
|
||||
|
||||
return "redirect:" + adminPath +"/basics/url/list?functionId="+cfg.getFunctionId();
|
||||
}
|
||||
|
||||
@RequestMapping(value = {"/updateForm"})
|
||||
public String updateForm(Model model,HttpServletRequest request
|
||||
,HttpServletResponse response,String ids,@ModelAttribute("cfg")UrlCommGroupCfg cfg
|
||||
,RedirectAttributes redirectAttributes){
|
||||
cfg = urlCommGroupService.get(Long.parseLong(ids));
|
||||
// initUpdateFormCondition(model, cfg);
|
||||
cfg.setGroupType(11);
|
||||
initUpdateFormCondition(model,cfg);
|
||||
//List<ConfigGroupInfo> groupInfos=configGroupInfoService.findAllList(4);
|
||||
//model.addAttribute("policyGroups", groupInfos);
|
||||
model.addAttribute("_cfg", cfg);
|
||||
return "/basics/urlCommGroupFormUpdate";
|
||||
}
|
||||
@RequestMapping(value = {"/update"})
|
||||
@RequiresPermissions(value={"http:url:config"})
|
||||
public String update(Model model,HttpServletRequest request,HttpServletResponse response,@ModelAttribute("cfg")UrlCommGroupCfg cfg,RedirectAttributes redirectAttributes){
|
||||
try{
|
||||
urlCommGroupService.update(cfg);
|
||||
addMessage(redirectAttributes,"success","save_success");
|
||||
}catch(Exception e){
|
||||
logger.error("信息保存失败",e);
|
||||
e.printStackTrace();
|
||||
addMessage(redirectAttributes,"error","save_failed");
|
||||
}
|
||||
|
||||
return "redirect:" + adminPath +"/basics/url/list?functionId="+cfg.getFunctionId();
|
||||
}
|
||||
|
||||
@RequestMapping(value = {"/audit"})
|
||||
@RequiresPermissions(value={"http:url:config"})
|
||||
public String audit(Model model,@ModelAttribute("cfg")UrlCommGroupCfg cfg
|
||||
,Integer isAudit
|
||||
,Integer isValid
|
||||
,String ids
|
||||
,Integer functionId
|
||||
, HttpServletRequest request
|
||||
,HttpServletResponse response
|
||||
,RedirectAttributes redirectAttributes) {
|
||||
//选中配置审核
|
||||
if(!StringUtil.isEmpty(ids)) {
|
||||
List<UrlCommGroupCfg> urlGroupCfgs=urlCommGroupService.getByIds(ids);
|
||||
// Map<Long,List<UrlCommGroupCfg>> urlcfgMap=Maps.newHashMap();
|
||||
// for(UrlCommGroupCfg urlCommCfg:urlGroupCfgs) {
|
||||
// urlCommCfg.setIsAudit(isAudit);
|
||||
// urlCommCfg.setIsValid(isValid);
|
||||
// urlCommCfg.setAuditorId(UserUtils.getUser().getId());
|
||||
// urlCommCfg.setAuditTime(new Date());
|
||||
// urlCommCfg.setFunctionId(functionId);
|
||||
// if(urlcfgMap.containsKey(Long.parseLong(urlCommCfg.getUserRegion3()))) {
|
||||
// urlcfgMap.get(Long.parseLong(urlCommCfg.getUserRegion3())).add(urlCommCfg);
|
||||
// }else {
|
||||
// List<UrlCommGroupCfg> _urlCfgs=Lists.newArrayList();
|
||||
// _urlCfgs.add(urlCommCfg);
|
||||
// urlcfgMap.put(Long.parseLong(urlCommCfg.getUserRegion3()), _urlCfgs);
|
||||
// }
|
||||
// }
|
||||
/********************每次下发一个组的region,保证事物********************/
|
||||
// for (Long groupId : urlcfgMap.keySet()) {
|
||||
// try {
|
||||
// urlCommGroupService.audit(urlcfgMap.get(groupId),groupId,isValid);
|
||||
// } catch (Exception e) {
|
||||
// logger.error("配置下发失败:",e);
|
||||
// if(e instanceof MaatConvertException) {
|
||||
// addMessage(redirectAttributes,"error", "request_service_failed");
|
||||
// }else {
|
||||
// addMessage(redirectAttributes,"error", "audit_failed");
|
||||
// }
|
||||
//
|
||||
// }
|
||||
// }
|
||||
for (UrlCommGroupCfg urlCommGroup : urlGroupCfgs) {
|
||||
try {
|
||||
urlCommGroupService.audit(urlCommGroup,isAudit,isValid);
|
||||
} catch (Exception e) {
|
||||
logger.error("审核失败",e);
|
||||
e.printStackTrace();
|
||||
addMessage(redirectAttributes,"error","audit_failed");
|
||||
}
|
||||
}
|
||||
}
|
||||
return "redirect:" + adminPath +"/basics/url/list?functionId="+cfg.getFunctionId();
|
||||
}
|
||||
|
||||
@RequestMapping(value = {"/delete"})
|
||||
@RequiresPermissions(value={"http:url:config"})
|
||||
public String delete(Integer isValid
|
||||
,String ids,Integer functionId
|
||||
,RedirectAttributes redirectAttributes){
|
||||
try{
|
||||
urlCommGroupService.delete(ids);
|
||||
addMessage(redirectAttributes,"success","delete_success");
|
||||
}catch(Exception e){
|
||||
logger.error("Delete failed",e);
|
||||
if(e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes,"error",e.getMessage());
|
||||
}else {
|
||||
addMessage(redirectAttributes,"error","delete_failed");
|
||||
}
|
||||
}
|
||||
|
||||
return "redirect:" + adminPath +"/basics/url/list?functionId="+functionId;
|
||||
}
|
||||
//urlComm配置导出
|
||||
@RequestMapping(value = "/exportUrlComm")
|
||||
public void exportAsnIp(Model model,HttpServletRequest request,HttpServletResponse response,
|
||||
@ModelAttribute("cfg")UrlCommGroupCfg entity,String ids,RedirectAttributes redirectAttributes){
|
||||
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>();
|
||||
List<UrlCommGroupCfg> list = new ArrayList<UrlCommGroupCfg>();
|
||||
if (!StringUtil.isEmpty(ids)) {
|
||||
list = urlCommGroupService.findByPage(ids);
|
||||
} else {
|
||||
Page<UrlCommGroupCfg> pageInfo=new Page<UrlCommGroupCfg>(request, response,"r");
|
||||
pageInfo.setPageNo(1);
|
||||
pageInfo.setPageSize(Constants.MAX_EXPORT_SIZE);
|
||||
Page<UrlCommGroupCfg> page = urlCommGroupService.findPage(pageInfo, entity);
|
||||
list=page.getList();
|
||||
}
|
||||
//
|
||||
titleList.add(entity.getMenuNameCode());
|
||||
classMap.put(entity.getMenuNameCode(), UrlCommGroupCfg.class);
|
||||
String cfgIndexInfoNoExport=",block_type,do_log,action"
|
||||
+ ",letter,whether_area_block,classification,attribute,label,expression_type,match_method"
|
||||
+",userregion1,userregion2,userregion3,userregion4,userregion5,ir_type,asn_no,is_hex,is_case_insenstive,";
|
||||
// 时间过滤
|
||||
if (entity.getSearch_create_time_start() == null ) {
|
||||
cfgIndexInfoNoExport = ",config_time" + cfgIndexInfoNoExport;
|
||||
}
|
||||
if (entity.getSearch_edit_time_start() == null) {
|
||||
cfgIndexInfoNoExport = ",edit_time" + cfgIndexInfoNoExport;
|
||||
}
|
||||
if (entity.getSearch_audit_time_start() == null) {
|
||||
cfgIndexInfoNoExport = ",audit_time" + cfgIndexInfoNoExport;
|
||||
}
|
||||
if (!StringUtil.isEmpty(entity.gethColumns())) {
|
||||
cfgIndexInfoNoExport = "," + entity.gethColumns() + "," + cfgIndexInfoNoExport;
|
||||
}
|
||||
|
||||
noExportMap.put(entity.getMenuNameCode(),cfgIndexInfoNoExport);
|
||||
dataMap.put(entity.getMenuNameCode(), list);
|
||||
String timeRange = initTimeMap(entity);
|
||||
noExportMap.put("timeRange", timeRange);
|
||||
|
||||
if ("csv".equals(entity.getExType())) {
|
||||
this._exportCsv(model, request, response, redirectAttributes, entity.getMenuNameCode(), titleList,
|
||||
classMap, dataMap, noExportMap);
|
||||
} else {
|
||||
this._export(model, request, response, redirectAttributes, entity.getMenuNameCode(), titleList,
|
||||
classMap, dataMap, noExportMap);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("urlGroupConfig export failed",e);
|
||||
addMessage(redirectAttributes,"error","export_failed");
|
||||
}
|
||||
//return "redirect:" + adminPath +"/ntc/iplist/list?functionId="+entity.getFunctionId();
|
||||
}
|
||||
}
|
||||
@@ -346,6 +346,7 @@ public class AppCfgController extends BaseController {
|
||||
public String ipCfgForm(Model model, String ids, AppIpCfg entity) {
|
||||
if (StringUtils.isNotBlank(ids)) {
|
||||
entity = appCfgService.getAppIpCfg(Long.parseLong(ids));
|
||||
entity.setAppFeaturePropCfgList(appMultiFeatureCfgService.getAppFeaturePropCfg(entity.getCompileId(), entity.getFunctionId(), null));
|
||||
initUpdateFormCondition(model, entity);
|
||||
} else {
|
||||
initFormCondition(model, entity);
|
||||
@@ -671,6 +672,7 @@ public class AppCfgController extends BaseController {
|
||||
public String domainCfgForm(Model model, String ids, AppDomainCfg entity) {
|
||||
if (StringUtils.isNotBlank(ids)) {
|
||||
entity = appCfgService.getAppDomainCfg(Long.parseLong(ids));
|
||||
entity.setAppFeaturePropCfgList(appMultiFeatureCfgService.getAppFeaturePropCfg(entity.getCompileId(), entity.getFunctionId(), null));
|
||||
initUpdateFormCondition(model, entity);
|
||||
} else {
|
||||
initFormCondition(model, entity);
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.nis.web.controller.configuration;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
@@ -12,52 +11,25 @@ import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.commons.beanutils.BeanUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.apache.taglibs.standard.functions.Functions;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.nis.domain.FunctionRegionDict;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.SysDataDictionaryItem;
|
||||
import com.nis.domain.configuration.AppBuiltInFeatureFile;
|
||||
import com.nis.domain.configuration.AppByteCfg;
|
||||
import com.nis.domain.configuration.AppComplexFeatureCfg;
|
||||
import com.nis.domain.configuration.AppDomainCfg;
|
||||
import com.nis.domain.configuration.AppFeatureIndex;
|
||||
import com.nis.domain.configuration.AppHeaderCfg;
|
||||
import com.nis.domain.configuration.AppHttpCfg;
|
||||
import com.nis.domain.configuration.AppFeatureProperties;
|
||||
import com.nis.domain.configuration.AppIpCfg;
|
||||
import com.nis.domain.configuration.AppPolicyCfg;
|
||||
import com.nis.domain.configuration.AppSslCertCfg;
|
||||
import com.nis.domain.configuration.AppStringFeatureCfg;
|
||||
import com.nis.domain.configuration.AppTcpCfg;
|
||||
import com.nis.domain.configuration.AppTopicDomainCfg;
|
||||
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.configuration.PxyObjTrustedCaCert;
|
||||
import com.nis.domain.configuration.WebsiteDomainTopic;
|
||||
import com.nis.domain.maat.ToMaatResult;
|
||||
import com.nis.domain.maat.ToMaatResult.ResponseData;
|
||||
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.DictUtils;
|
||||
import com.nis.util.FileUtils;
|
||||
import com.nis.util.JsonMapper;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.web.controller.BaseController;
|
||||
import com.nis.web.security.UserUtils;
|
||||
@@ -110,15 +82,27 @@ public class AppFeatureCfgController extends BaseController {
|
||||
appMultiFeatureCfgService.getAppIpRangeCfg(entity.getCompileId(), entity.getFunctionId()));
|
||||
entity.setStrList(appMultiFeatureCfgService.getAppStringFeatureCfg(entity.getCompileId(),
|
||||
entity.getFunctionId(), null));
|
||||
entity.setComplexList(appMultiFeatureCfgService.getAppComplexFeatureCfg(entity.getCompileId(),
|
||||
entity.getFunctionId(), null));
|
||||
entity.setComplexList(appMultiFeatureCfgService.getAppComplexFeatureCfgNotRegionCode(entity.getCompileId(),
|
||||
entity.getFunctionId(), 6));
|
||||
entity.setSessionList(appMultiFeatureCfgService.getAppComplexFeatureCfg(entity.getCompileId(),
|
||||
entity.getFunctionId(), 6));
|
||||
entity.setNumCfgList(
|
||||
appMultiFeatureCfgService.getAppTcpCfg(entity.getCompileId(), entity.getFunctionId(), null));
|
||||
entity.setAppFeaturePropCfgList(appMultiFeatureCfgService.getAppFeaturePropCfg(entity.getCompileId(), entity.getFunctionId(), null));
|
||||
initUpdateFormCondition(model, entity);
|
||||
} else {
|
||||
initFormCondition(model, entity);
|
||||
}
|
||||
// 获取L7 Protocol
|
||||
SpecificServiceCfg specificServiceCfg = new SpecificServiceCfg();
|
||||
specificServiceCfg.setCfgType(3);
|
||||
List<SpecificServiceCfg> l7ProtoList = specificServiceCfgService.findAllSpecificServiceCfg(specificServiceCfg, null);
|
||||
|
||||
model.addAttribute("_cfg", entity);
|
||||
model.addAttribute("l7ProtoList", l7ProtoList);
|
||||
if(entity.getFunctionId() == 567) { // APP关联特征配置
|
||||
return "/cfg/app/appCorrelationFeatureCfgForm";
|
||||
}
|
||||
return "/cfg/app/appMultiFeatureCfgForm";
|
||||
}
|
||||
|
||||
@@ -269,8 +253,26 @@ public class AppFeatureCfgController extends BaseController {
|
||||
Integer.valueOf(cfgRegionCode[i]));
|
||||
map.put("numCfgList", numCfgList);
|
||||
}
|
||||
if ("8".equals(cfgRegionType[i])) {
|
||||
List<AppComplexFeatureCfg> sessionList = appMultiFeatureCfgService
|
||||
.getAppComplexFeatureCfg(compileId, functionId, Integer.valueOf(cfgRegionCode[i]));
|
||||
map.put("sessionList", sessionList);
|
||||
}
|
||||
if ("9".equals(cfgRegionType[i])) {
|
||||
List<AppFeatureProperties> featureList = appMultiFeatureCfgService
|
||||
.getAppFeaturePropCfg(compileId, functionId, null);
|
||||
map.put("featureList", featureList);
|
||||
}
|
||||
|
||||
tabList.add(map);
|
||||
}
|
||||
// 获取L7 Protocol
|
||||
SpecificServiceCfg specificServiceCfg = new SpecificServiceCfg();
|
||||
specificServiceCfg.setCfgType(3);
|
||||
List<SpecificServiceCfg> l7ProtoList = specificServiceCfgService.findAllSpecificServiceCfg(specificServiceCfg, null);
|
||||
|
||||
model.addAttribute("l7ProtoList", l7ProtoList);
|
||||
|
||||
} else {
|
||||
Map<String, Object> map = new HashMap();
|
||||
map.put("regionType", "0");
|
||||
|
||||
@@ -132,8 +132,8 @@ public class UserManageController extends BaseController{
|
||||
exUser=exUser.substring(0, exUser.length()-1);
|
||||
message+="<br/> "+msgProp.getProperty("user")+" "+exUser+" "+msgProp.getProperty("user_check");
|
||||
}
|
||||
if(e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes,"error",message);
|
||||
if(!StringUtil.isEmpty(e.getMessage())) {
|
||||
addMessage(redirectAttributes,"error",e.getMessage());
|
||||
}else {
|
||||
addMessage(redirectAttributes,"error",message);
|
||||
}
|
||||
@@ -274,10 +274,18 @@ public class UserManageController extends BaseController{
|
||||
|
||||
}
|
||||
} catch (MaatConvertException e) {
|
||||
addMessage(redirectAttributes,"error",message);
|
||||
if(!StringUtil.isEmpty(e.getMessage())) {
|
||||
addMessage(redirectAttributes,"error",e.getMessage());
|
||||
}else{
|
||||
addMessage(redirectAttributes,"error",message);
|
||||
}
|
||||
return "redirect:" + adminPath +"/maintenance/userManage/list";
|
||||
} catch (Exception e) {
|
||||
addMessage(redirectAttributes,"error",message);
|
||||
if(!StringUtil.isEmpty(e.getMessage())) {
|
||||
addMessage(redirectAttributes,"error",e.getMessage());
|
||||
}else{
|
||||
addMessage(redirectAttributes,"error",message);
|
||||
}
|
||||
return "redirect:" + adminPath +"/maintenance/userManage/list";
|
||||
}
|
||||
return "redirect:" + adminPath +"/maintenance/userManage/list";
|
||||
|
||||
@@ -66,6 +66,7 @@ import com.nis.domain.configuration.template.SnatTemplate;
|
||||
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.configuration.template.UrlCommGroupTemplate;
|
||||
import com.nis.domain.specific.SpecificServiceCfg;
|
||||
import com.nis.exceptions.MaatConvertException;
|
||||
import com.nis.util.Constants;
|
||||
@@ -490,6 +491,11 @@ public class IpController extends BaseController{
|
||||
ExportExcel excel=new ExportExcel(serviceDict,regionDict,this.getMsgProp(),null, TopicWebsiteTemplate.class, 2);
|
||||
excel.setDataList(pro,classList,null).
|
||||
write(request,response, fileName).dispose();
|
||||
}else if(regionDict.getFunctionId().equals(111)) {// url分组配置
|
||||
List<UrlCommGroupTemplate> classList=new ArrayList<UrlCommGroupTemplate>();
|
||||
ExportExcel excel=new ExportExcel(serviceDict,regionDict,this.getMsgProp(),null, UrlCommGroupTemplate.class, 2);
|
||||
excel.setDataList(pro,classList,null).
|
||||
write(request,response, fileName).dispose();
|
||||
}else{
|
||||
List<StringAllTemplate> classList=new ArrayList<StringAllTemplate>();
|
||||
ExportExcel excel=new ExportExcel(serviceDict,regionDict,pro,null, StringAllTemplate.class, 2);
|
||||
|
||||
@@ -404,11 +404,11 @@ public class WebsiteController extends BaseController {
|
||||
if (StringUtils.isNotBlank(ids)) {
|
||||
entity = websiteCfgService.getDnsCfg(Long.parseLong(ids), null);
|
||||
entity.setGroupType(12);
|
||||
entity.setUdFlag(1);
|
||||
//entity.setUdFlag(1);
|
||||
initUpdateFormCondition(model, entity);
|
||||
} else {
|
||||
entity.setGroupType(12);
|
||||
entity.setUdFlag(1);
|
||||
//entity.setUdFlag(1);
|
||||
initFormCondition(model, entity);
|
||||
}
|
||||
// 获取所有响应策略信息
|
||||
@@ -457,6 +457,8 @@ public class WebsiteController extends BaseController {
|
||||
}
|
||||
}
|
||||
}
|
||||
List<PolicyGroupInfo> policyGroupInfos = policyGroupInfoService.findPolicyGroupInfosByTypeforUD(12, null);
|
||||
model.addAttribute("policyGroupInfos", policyGroupInfos);// 显示分组名称 12:dns 1:有效
|
||||
model.addAttribute("_cfg", cfg);
|
||||
model.addAttribute("index", index);
|
||||
model.addAttribute("tabList", tabList);
|
||||
|
||||
@@ -203,7 +203,7 @@ public class WhiteListController extends CommonController {
|
||||
entity.getHttpUrlList().add(urlCfg);
|
||||
}
|
||||
entity.setGroupType(11);
|
||||
entity.setUdFlag(1);
|
||||
//entity.setUdFlag(1);
|
||||
initUpdateFormCondition(model, entity);
|
||||
} else {
|
||||
HttpUrlCfg urlCfg = new HttpUrlCfg();
|
||||
@@ -213,7 +213,7 @@ public class WhiteListController extends CommonController {
|
||||
urlList.add(urlCfg);
|
||||
entity.setHttpUrlList(urlList);
|
||||
entity.setGroupType(11);
|
||||
entity.setUdFlag(1);
|
||||
//entity.setUdFlag(1);
|
||||
initFormCondition(model, entity);
|
||||
}
|
||||
model.addAttribute("_cfg", entity);
|
||||
@@ -249,6 +249,8 @@ public class WhiteListController extends CommonController {
|
||||
}
|
||||
}
|
||||
}
|
||||
List<PolicyGroupInfo> policyGroupInfos = policyGroupInfoService.findPolicyGroupInfosByTypeforUD(11, null);
|
||||
model.addAttribute("policyGroupInfos", policyGroupInfos);// 显示分组名称 11:url 1:有效
|
||||
model.addAttribute("_cfg", cfg);
|
||||
model.addAttribute("index", index);
|
||||
model.addAttribute("tabList", tabList);
|
||||
|
||||
@@ -481,11 +481,20 @@ public class TrafficStatisticsInfoController extends BaseController {
|
||||
}
|
||||
@RequestMapping("ajaxAppTrend")
|
||||
@ResponseBody
|
||||
public Map ajaxAppTrend(String beginDate,String endDate,Integer appType,Integer entranceId,Integer[] searchIspCode,Model model){
|
||||
public Map ajaxAppTrend(String beginDate,String endDate,Integer appType,Integer entranceId,String searchQuotaType,Integer[] searchIspCode,Model model){
|
||||
Map<String, Object> fromJsonList = new HashMap<String, Object>();
|
||||
Map list = new HashMap();
|
||||
try {
|
||||
String url=Constants.DASHBOARD_URL+Constants.TRAFFIC_APP_TREND;
|
||||
//TRAFFIC_APP_PPS_TREND
|
||||
String trafficApp=Constants.TRAFFIC_APP_TREND;
|
||||
if("Unique Ip".equals(searchQuotaType)){
|
||||
trafficApp=Constants.TRAFFIC_APP_TREND;
|
||||
}else if("Gbps".equals(searchQuotaType)){
|
||||
trafficApp=Constants.TRAFFIC_APP_BPS_TREND;
|
||||
}else if("pps".equals(searchQuotaType)){
|
||||
trafficApp=Constants.TRAFFIC_APP_PPS_TREND;
|
||||
}
|
||||
String url=Constants.DASHBOARD_URL+trafficApp;
|
||||
URIBuilder uriBuilder = new URIBuilder(url);
|
||||
uriBuilder.addParameter("searchStartTime",beginDate);
|
||||
uriBuilder.addParameter("searchEndTime",endDate);
|
||||
|
||||
@@ -121,7 +121,7 @@ public class UserController extends BaseController{
|
||||
for (AuthenticationInfo auth : cache.values()) {
|
||||
userRealm.getAuthenticationCache().remove(auth.getPrincipals().getPrimaryPrincipal());
|
||||
}
|
||||
systemService.deleteAuthenticationCache(keyPrefix + user.getName());
|
||||
systemService.deleteAuthenticationCache(keyPrefix + user.getLoginId());
|
||||
systemService.deleteAuthenticationCache(keyPrefix + user.getId());
|
||||
}
|
||||
}
|
||||
@@ -331,7 +331,7 @@ public class UserController extends BaseController{
|
||||
for (AuthenticationInfo auth : cache.values()) {
|
||||
userRealm.getAuthenticationCache().remove(auth.getPrincipals().getPrimaryPrincipal());
|
||||
}
|
||||
systemService.deleteAuthenticationCache(keyPrefix + user.getName());
|
||||
systemService.deleteAuthenticationCache(keyPrefix + user.getLoginId());
|
||||
systemService.deleteAuthenticationCache(keyPrefix + user.getId());
|
||||
}
|
||||
|
||||
|
||||
@@ -272,7 +272,7 @@
|
||||
<include refid="PolicyGroupInfoColumns"/>
|
||||
FROM policy_group_info r
|
||||
where r.is_valid=1 and r.group_type=#{groupType,jdbcType=INTEGER}
|
||||
<if test="flag!=null">
|
||||
<if test="flag!=null and flag != ''">
|
||||
and ud_flag=#{flag}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
38
src/main/java/com/nis/web/dao/basics/UrlCommGroupDao.java
Normal file
38
src/main/java/com/nis/web/dao/basics/UrlCommGroupDao.java
Normal file
@@ -0,0 +1,38 @@
|
||||
package com.nis.web.dao.basics;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import com.nis.domain.basics.UrlCommGroupCfg;
|
||||
import com.nis.web.dao.CrudDao;
|
||||
import com.nis.web.dao.MyBatisDao;
|
||||
|
||||
@MyBatisDao
|
||||
public interface UrlCommGroupDao extends CrudDao<UrlCommGroupCfg>{
|
||||
|
||||
// 查询列表
|
||||
public List<UrlCommGroupCfg> findAllPageList(UrlCommGroupCfg entity);
|
||||
|
||||
public List<UrlCommGroupCfg> findByPage(@Param("ids")String ids);
|
||||
|
||||
public List<UrlCommGroupCfg> findInfoByCfgId(@Param("cfgId")Long cfgId);
|
||||
//新增
|
||||
public int insertUrlCommGroupCfg(UrlCommGroupCfg entity);
|
||||
|
||||
public Integer findUrlUdFlag(@Param("groupId")Integer groupId);
|
||||
|
||||
public int updateUrlUdFlag(@Param("groupId")Integer groupId,@Param("udFlag")Integer udFlag);
|
||||
|
||||
//修改
|
||||
public int update(UrlCommGroupCfg entity);
|
||||
|
||||
//删除
|
||||
public int delete(@Param("ids")String ids);
|
||||
|
||||
public List<UrlCommGroupCfg> getByIds(@Param("ids")String ids);
|
||||
|
||||
|
||||
public Integer getGroupIdCount(@Param("groupId")String groupId);
|
||||
|
||||
}
|
||||
388
src/main/java/com/nis/web/dao/basics/UrlCommGroupDao.xml
Normal file
388
src/main/java/com/nis/web/dao/basics/UrlCommGroupDao.xml
Normal file
@@ -0,0 +1,388 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.nis.web.dao.basics.UrlCommGroupDao">
|
||||
<resultMap id="urlCommGroupCfgMap" type="com.nis.domain.basics.UrlCommGroupCfg">
|
||||
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
||||
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
||||
<result column="cfg_keywords" property="cfgKeywords" jdbcType="VARCHAR" />
|
||||
<result column="action" property="action" jdbcType="INTEGER" />
|
||||
<result column="is_valid" property="isValid" jdbcType="INTEGER" />
|
||||
<result column="is_audit" property="isAudit" jdbcType="INTEGER" />
|
||||
<result column="creator_id" property="creatorId" jdbcType="INTEGER" />
|
||||
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
|
||||
<result column="editor_id" property="editorId" jdbcType="INTEGER" />
|
||||
<result column="edit_time" property="editTime" jdbcType="TIMESTAMP" />
|
||||
<result column="auditor_id" property="auditorId" jdbcType="INTEGER" />
|
||||
<result column="audit_time" property="auditTime" jdbcType="TIMESTAMP" />
|
||||
<result column="service_id" property="serviceId" jdbcType="INTEGER" />
|
||||
<result column="request_id" property="requestId" jdbcType="INTEGER" />
|
||||
<result column="compile_id" property="compileId" jdbcType="INTEGER" />
|
||||
<result column="is_area_effective" property="isAreaEffective" jdbcType="INTEGER" />
|
||||
<result column="classify" property="classify" jdbcType="VARCHAR" />
|
||||
<result column="attribute" property="attribute" jdbcType="VARCHAR" />
|
||||
<result column="lable" property="lable" jdbcType="VARCHAR" />
|
||||
<result column="expr_type" property="exprType" jdbcType="INTEGER" />
|
||||
<result column="match_method" property="matchMethod" jdbcType="INTEGER" />
|
||||
<result column="is_hexbin" property="isHexbin" jdbcType="INTEGER" />
|
||||
<result column="area_effective_ids" property="areaEffectiveIds" jdbcType="VARCHAR" />
|
||||
<result column="function_id" property="functionId" jdbcType="INTEGER" />
|
||||
<result column="cfg_region_code" property="cfgRegionCode" jdbcType="INTEGER" />
|
||||
<result column="cfg_type" property="cfgType" jdbcType="VARCHAR" />
|
||||
<result column="ratelimit" property="ratelimit" jdbcType="VARCHAR" />
|
||||
<result column="user_region1" property="userRegion1" jdbcType="VARCHAR" />
|
||||
<result column="user_region2" property="userRegion2" jdbcType="VARCHAR" />
|
||||
<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="group_name" property="groupName" jdbcType="VARCHAR" />
|
||||
</resultMap>
|
||||
|
||||
<select id="findAllPageList" parameterType="com.nis.domain.basics.UrlCommGroupCfg" resultMap="urlCommGroupCfgMap">
|
||||
SELECT
|
||||
r.cfg_id,r.cfg_desc,r.cfg_keywords,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.compile_id,r.is_area_effective,r.classify,r.attribute,r.lable,
|
||||
r.expr_type,r.match_method,r.is_hexbin,r.area_effective_ids,r.function_id,
|
||||
r.cfg_region_code,r.cfg_type,r.ratelimit,r.user_region1,r.user_region2,
|
||||
r.user_region3,r.user_region4,r.user_region5,
|
||||
s.name AS creator_name,e.name AS editor_name,u.name AS auditor_name,c.group_name
|
||||
FROM
|
||||
http_url_cfg r
|
||||
LEFT JOIN sys_user s ON r.creator_id = s.id
|
||||
LEFT JOIN sys_user e ON r.editor_id = e.id
|
||||
LEFT JOIN sys_user u ON r.auditor_id = u.id
|
||||
LEFT JOIN policy_group_info c ON c.service_group_id=r.user_region3
|
||||
<trim prefix="WHERE" prefixOverrides="AND |OR ">
|
||||
<if test="page !=null and page.where != null and page.where != ''">
|
||||
AND ${page.where}
|
||||
</if>
|
||||
<if test="cfgId != null">
|
||||
AND r.CFG_ID=#{cfgId,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="cfgDesc != null and cfgDesc != ''">
|
||||
AND r.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="cfgKeywords != null and cfgKeywords != ''">
|
||||
AND r.cfg_keywords like concat(concat('%',#{cfgKeywords,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="cfgRegionCode != null">
|
||||
AND r.CFG_REGION_CODE=#{cfgRegionCode,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="cfgType != null and cfgType != ''">
|
||||
AND r.CFG_TYPE like concat(concat('%',#{cfgType,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="action != null">
|
||||
AND r.ACTION=#{action,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isValid != null">
|
||||
AND r.IS_VALID=#{isValid,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isValid == null">
|
||||
AND r.IS_VALID != -1
|
||||
</if>
|
||||
<if test="isAudit != null">
|
||||
AND r.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="creatorName != null and creatorName !=''">
|
||||
AND CREATOR_NAME like concat(concat('%',#{creatorName,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="createTime != null and createTime !=''">
|
||||
AND r.CREATE_TIME=#{createTime,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="editorName != null and editorName !=''">
|
||||
AND EDITOR_NAME like concat(concat('%',#{editorName,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="editTime != null and editTime !='' ">
|
||||
AND r.EDIT_TIME=#{editTime,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="auditorName != null and auditorName !=''">
|
||||
AND AUDITOR_NAME like concat(concat('%',#{auditorName,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="auditTime != null and auditTime !=''">
|
||||
AND r.AUDIT_TIME=#{auditTime,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="serviceId != null">
|
||||
AND r.SERVICE_ID=#{serviceId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="requestId != null">
|
||||
AND r.REQUEST_ID=#{requestId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isAreaEffective != null">
|
||||
AND r.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="classify != null and classify !=''">
|
||||
AND r.classify like concat(concat('%',#{classify,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="attribute != null and attribute !=''">
|
||||
AND r.attribute like concat(concat('%',#{attribute,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="lable != null and lable !=''">
|
||||
AND r.lable like concat(concat('%',#{lable,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="areaEffectiveIds != null and areaEffectiveIds !=''">
|
||||
AND r.AREA_EFFECTIVE_IDS like concat(concat('%',#{areaEffectiveIds,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="functionId != null">
|
||||
AND r.FUNCTION_ID=#{functionId,jdbcType=INTEGER}
|
||||
</if>
|
||||
|
||||
<!-- 数据范围过滤 -->
|
||||
${sqlMap.dsf}
|
||||
</trim>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY r.is_audit,r.create_time desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
<select id="findByPage" resultMap="urlCommGroupCfgMap">
|
||||
SELECT
|
||||
r.cfg_id,r.cfg_desc,r.cfg_keywords,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.compile_id,r.is_area_effective,r.classify,r.attribute,r.lable,
|
||||
r.expr_type,r.match_method,r.is_hexbin,r.area_effective_ids,r.function_id,
|
||||
r.cfg_region_code,r.cfg_type,r.ratelimit,r.user_region1,r.user_region2,
|
||||
r.user_region3,r.user_region4,r.user_region5,
|
||||
s.name AS creator_name,e.name AS editor_name,u.name AS auditor_name
|
||||
FROM
|
||||
http_url_cfg r
|
||||
LEFT JOIN sys_user s ON r.creator_id = s.id
|
||||
LEFT JOIN sys_user e ON r.editor_id = e.id
|
||||
LEFT JOIN sys_user u ON r.auditor_id = u.id
|
||||
where r.CFG_ID in (${ids})
|
||||
</select>
|
||||
|
||||
<select id="findInfoByCfgId" resultMap="urlCommGroupCfgMap">
|
||||
SELECT
|
||||
r.cfg_id,r.cfg_desc,r.cfg_keywords,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.compile_id,r.is_area_effective,r.classify,r.attribute,r.lable,
|
||||
r.expr_type,r.match_method,r.is_hexbin,r.area_effective_ids,r.function_id,
|
||||
r.cfg_region_code,r.cfg_type,r.ratelimit,r.user_region1,r.user_region2,
|
||||
r.user_region3,r.user_region4,r.user_region5
|
||||
FROM
|
||||
http_url_cfg r
|
||||
where r.CFG_ID =#{cfgId}
|
||||
|
||||
</select>
|
||||
|
||||
<select id="get" resultMap="urlCommGroupCfgMap">
|
||||
SELECT
|
||||
r.cfg_id,r.cfg_desc,r.cfg_keywords,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.compile_id,r.is_area_effective,r.classify,r.attribute,r.lable,
|
||||
r.expr_type,r.match_method,r.is_hexbin,r.area_effective_ids,r.function_id,
|
||||
r.cfg_region_code,r.cfg_type,r.ratelimit,r.user_region1,r.user_region2,
|
||||
r.user_region3,r.user_region4,r.user_region5
|
||||
from http_url_cfg r
|
||||
where r.cfg_id=#{cfgId}
|
||||
</select>
|
||||
|
||||
<insert id="insertUrlCommGroupCfg" parameterType="com.nis.domain.basics.UrlCommGroupCfg">
|
||||
insert into http_url_cfg (
|
||||
CFG_DESC,
|
||||
cfg_keywords,
|
||||
action,
|
||||
is_valid,
|
||||
is_audit,
|
||||
creator_id,
|
||||
create_time,
|
||||
editor_id,
|
||||
edit_time,
|
||||
auditor_id,
|
||||
audit_time,
|
||||
service_id,
|
||||
request_id,
|
||||
compile_id,
|
||||
IS_AREA_EFFECTIVE,
|
||||
CLASSIFY,
|
||||
ATTRIBUTE,
|
||||
LABLE,
|
||||
expr_type,
|
||||
match_method,
|
||||
is_hexbin,
|
||||
area_effective_ids,
|
||||
function_id,
|
||||
cfg_region_code,
|
||||
cfg_type,
|
||||
ratelimit,
|
||||
user_region1,
|
||||
user_region2,
|
||||
user_region3,
|
||||
user_region4,
|
||||
user_region5
|
||||
)values (
|
||||
#{cfgDesc,jdbcType=VARCHAR},
|
||||
#{cfgKeywords,jdbcType=VARCHAR},
|
||||
#{action,jdbcType=INTEGER},
|
||||
#{isValid,jdbcType=INTEGER},
|
||||
#{isAudit,jdbcType=INTEGER},
|
||||
#{creatorId,jdbcType=INTEGER},
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
#{editorId,jdbcType=INTEGER},
|
||||
#{editTime,jdbcType=TIMESTAMP},
|
||||
#{auditorId,jdbcType=INTEGER},
|
||||
#{auditTime,jdbcType=TIMESTAMP},
|
||||
#{serviceId,jdbcType=INTEGER},
|
||||
#{requestId,jdbcType=INTEGER},
|
||||
#{compileId,jdbcType=INTEGER},
|
||||
#{isAreaEffective,jdbcType=INTEGER},
|
||||
#{classify,jdbcType=VARCHAR},
|
||||
#{attribute,jdbcType=VARCHAR},
|
||||
#{lable,jdbcType=VARCHAR},
|
||||
#{exprType,jdbcType=INTEGER},
|
||||
#{matchMethod,jdbcType=INTEGER},
|
||||
#{isHexbin,jdbcType=INTEGER},
|
||||
#{areaEffectiveIds,jdbcType=VARCHAR},
|
||||
#{functionId,jdbcType=INTEGER},
|
||||
#{cfgRegionCode,jdbcType=INTEGER},
|
||||
#{cfgType,jdbcType=VARCHAR},
|
||||
#{ratelimit,jdbcType=VARCHAR},
|
||||
#{userRegion1,jdbcType=VARCHAR},
|
||||
#{userRegion2,jdbcType=VARCHAR},
|
||||
#{userRegion3,jdbcType=VARCHAR},
|
||||
#{userRegion4,jdbcType=VARCHAR},
|
||||
#{userRegion5,jdbcType=VARCHAR}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<select id="findUrlUdFlag" parameterType="java.lang.Integer" resultType="java.lang.Integer">
|
||||
SELECT ud_flag from policy_group_info
|
||||
where service_group_id=#{groupId}
|
||||
and group_type=11
|
||||
</select>
|
||||
|
||||
<update id="updateUrlUdFlag" parameterType="java.lang.Integer">
|
||||
UPDATE policy_group_info SET ud_flag =#{udFlag}
|
||||
WHERE service_group_id=#{groupId}
|
||||
and group_type=11
|
||||
</update>
|
||||
|
||||
<update id="update" parameterType="com.nis.domain.basics.UrlCommGroupCfg" >
|
||||
update http_url_cfg
|
||||
<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="action != null" >
|
||||
action = #{action,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isValid != null" >
|
||||
is_valid = #{isValid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isAudit != null" >
|
||||
is_audit = #{isAudit,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="editorId != null" >
|
||||
editor_id = #{editorId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="editTime != null and editTime != ''" >
|
||||
edit_time = #{editTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="auditorId != null" >
|
||||
AUDITOR_ID = #{auditorId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="auditTime != null and auditTime != ''" >
|
||||
AUDIT_TIME = #{auditTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="serviceId != null" >
|
||||
service_id = #{serviceId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="requestId != null" >
|
||||
request_id = #{requestId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="compileId != null and compileId != ''" >
|
||||
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="cfgType != null and cfgType != ''" >
|
||||
cfg_type = #{cfgType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="cfgRegionCode != null " >
|
||||
cfg_region_code = #{cfgRegionCode,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="ratelimit != null and ratelimit != ''" >
|
||||
ratelimit = #{ratelimit,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="userRegion1 != null and userRegion1 != ''" >
|
||||
user_region1 = #{userRegion1,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="userRegion2 != null and userRegion2 != ''" >
|
||||
user_region2 = #{userRegion2,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="userRegion3 != null and userRegion3 != ''" >
|
||||
user_region3 = #{userRegion3,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="userRegion4 != null and userRegion4 != ''" >
|
||||
user_region4 = #{userRegion4,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="userRegion5 != null and userRegion5 != ''" >
|
||||
user_region5 = #{userRegion5,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</set>
|
||||
<where>
|
||||
and cfg_id = #{cfgId,jdbcType=INTEGER}
|
||||
</where>
|
||||
</update>
|
||||
|
||||
<delete id="delete" parameterType="java.lang.String" >
|
||||
delete from http_url_cfg where cfg_id in (${ids})
|
||||
</delete>
|
||||
|
||||
<select id="getByIds" resultMap="urlCommGroupCfgMap">
|
||||
select
|
||||
r.cfg_id,r.cfg_desc,r.cfg_keywords,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.compile_id,r.is_area_effective,r.classify,r.attribute,r.lable,
|
||||
r.expr_type,r.match_method,r.is_hexbin,r.area_effective_ids,r.function_id,
|
||||
r.cfg_region_code,r.cfg_type,r.ratelimit,r.user_region1,r.user_region2,
|
||||
r.user_region3,r.user_region4,r.user_region5
|
||||
from http_url_cfg r
|
||||
where r.cfg_id in (${ids}) and is_valid !=-1
|
||||
</select>
|
||||
|
||||
<select id="getGroupIdCount" parameterType="java.lang.String" resultType="java.lang.Integer">
|
||||
SELECT COUNT(cfg_id) groupCount from http_url_cfg
|
||||
WHERE user_region3= #{groupId}
|
||||
and is_valid=1
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -1,34 +1,16 @@
|
||||
package com.nis.web.dao.configuration;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import com.nis.domain.configuration.AppByteCfg;
|
||||
import com.nis.domain.configuration.AppComplexFeatureCfg;
|
||||
import com.nis.domain.configuration.AppComplexKeywordCfg;
|
||||
import com.nis.domain.configuration.AppDomainCfg;
|
||||
import com.nis.domain.configuration.AppFeatureIndex;
|
||||
import com.nis.domain.configuration.AppHeaderCfg;
|
||||
import com.nis.domain.configuration.AppHttpCfg;
|
||||
import com.nis.domain.configuration.AppIdCfg;
|
||||
import com.nis.domain.configuration.AppIdCfg.AppFeaturesIndex;
|
||||
import com.nis.domain.configuration.AppInnerRuleCfg;
|
||||
import com.nis.domain.configuration.AppFeatureProperties;
|
||||
import com.nis.domain.configuration.AppIpCfg;
|
||||
import com.nis.domain.configuration.AppPolicyCfg;
|
||||
import com.nis.domain.configuration.AppSslCertCfg;
|
||||
import com.nis.domain.configuration.AppStringCfg;
|
||||
import com.nis.domain.configuration.AppStringFeatureCfg;
|
||||
import com.nis.domain.configuration.AppTcpCfg;
|
||||
import com.nis.domain.configuration.AppTopicDomainCfg;
|
||||
import com.nis.domain.configuration.BaseCfg;
|
||||
import com.nis.domain.configuration.BaseStringCfg;
|
||||
import com.nis.domain.configuration.CfgIndexInfo;
|
||||
import com.nis.domain.configuration.ComplexkeywordCfg;
|
||||
import com.nis.domain.configuration.IpPortCfg;
|
||||
import com.nis.domain.configuration.WebsiteDomainTopic;
|
||||
import com.nis.web.dao.CrudDao;
|
||||
import com.nis.web.dao.MyBatisDao;
|
||||
|
||||
|
||||
@@ -59,6 +41,8 @@ public interface AppMultiFeatureCfgDao {
|
||||
//数值类特征配置
|
||||
public List<AppTcpCfg> getAppTcpCfg(@Param("compileId")Integer compileId,
|
||||
@Param("functionId")Integer functionId,@Param("cfgRegionCode")Integer cfgRegionCode);
|
||||
public List<AppComplexFeatureCfg> getAppComplexFeatureCfgNotRegionCode(@Param("compileId")Integer compileId,
|
||||
@Param("functionId")Integer functionId,@Param("cfgRegionCode")Integer cfgRegionCode);
|
||||
public int insertAppTcpCfg(AppTcpCfg entity);
|
||||
public void deleteAppTcpCfg(BaseCfg entity);
|
||||
|
||||
@@ -71,4 +55,11 @@ public interface AppMultiFeatureCfgDao {
|
||||
public void deleteAppIpRangeCfg(BaseCfg entity);
|
||||
|
||||
public List<AppFeatureIndex> findAppByFeatureIndexList(@Param("ids")String ids);
|
||||
//App特征属性配置
|
||||
public List<AppFeatureProperties> getAppFeaturePropCfg(@Param("compileId")Integer compileId,
|
||||
@Param("functionId")Integer functionId,@Param("cfgRegionCode")Integer cfgRegionCode);
|
||||
|
||||
public int insertAppFeaturePropCfg(AppFeatureProperties entity);
|
||||
public void deleteAppFeaturePropCfg(BaseCfg entity);
|
||||
|
||||
}
|
||||
|
||||
@@ -118,6 +118,12 @@
|
||||
<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" />
|
||||
<result column="user_region1" property="userRegion1" jdbcType="VARCHAR" />
|
||||
<result column="user_region2" property="userRegion2" jdbcType="VARCHAR" />
|
||||
<result column="user_region3" property="userRegion3" jdbcType="VARCHAR" />
|
||||
<result column="user_region4" property="userRegion4" jdbcType="VARCHAR" />
|
||||
<result column="user_region5" property="userRegion5" jdbcType="VARCHAR" />
|
||||
|
||||
</resultMap>
|
||||
<!-- APP字符串类配置映射 -->
|
||||
<resultMap id="AppStringFeatureCfgMap" type="com.nis.domain.configuration.AppStringFeatureCfg" >
|
||||
@@ -181,6 +187,36 @@
|
||||
<result column="function_id" property="functionId" jdbcType="INTEGER" />
|
||||
<result column="do_log" property="doLog" jdbcType="INTEGER" />
|
||||
</resultMap>
|
||||
<!-- APP 特征属性配置映射 -->
|
||||
<resultMap id="AppFeaturePropCfgMap" type="com.nis.domain.configuration.AppFeatureProperties" >
|
||||
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
||||
<result column="compile_id" property="compileId" jdbcType="INTEGER" />
|
||||
<result column="function_id" property="functionId" jdbcType="INTEGER" />
|
||||
<result column="service_id" property="serviceId" jdbcType="INTEGER" />
|
||||
<result column="request_id" property="requestId" jdbcType="INTEGER" />
|
||||
<result column="is_valid" property="isValid" jdbcType="INTEGER" />
|
||||
<result column="is_audit" property="isAudit" jdbcType="INTEGER" />
|
||||
<result column="creator_id" property="creatorId" jdbcType="INTEGER" />
|
||||
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
|
||||
<result column="editor_id" property="editorId" jdbcType="INTEGER" />
|
||||
<result column="edit_time" property="editTime" jdbcType="TIMESTAMP" />
|
||||
<result column="auditor_id" property="auditorId" jdbcType="INTEGER" />
|
||||
<result column="audit_time" property="auditTime" jdbcType="TIMESTAMP" />
|
||||
<result column="drop_opt" property="dropOpt" jdbcType="INTEGER" />
|
||||
<result column="loop_opt" property="loopOpt" jdbcType="INTEGER" />
|
||||
<result column="weak_feature" property="weakFeature" jdbcType="VARCHAR" />
|
||||
<result column="whitelist_feature" property="whitelistFeature" jdbcType="VARCHAR" />
|
||||
<result column="extend_scan_pkt_num" property="extendScanPktNum" jdbcType="INTEGER" />
|
||||
<result column="correlation_valid_time" property="correlationValidTime" jdbcType="INTEGER" />
|
||||
<result column="correlation_block_after" property="correlationBlockAfter" jdbcType="VARCHAR" />
|
||||
<result column="long_stream_lock_time" property="longStreamLockTime" jdbcType="INTEGER" />
|
||||
</resultMap>
|
||||
<sql id="AppFeaturePropCfg_Column" >
|
||||
r.CFG_ID, r.compile_id,r.function_id,r.service_id,r.request_id,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.drop_opt,r.loop_opt,r.weak_feature,r.whitelist_feature,
|
||||
r.extend_scan_pkt_num,r.correlation_valid_time,r.correlation_block_after,r.long_stream_lock_time
|
||||
</sql>
|
||||
|
||||
<sql id="AppFeatureIndex_Column" >
|
||||
r.CFG_ID,r.CFG_DESC,r.ACTION,r.IS_VALID,r.IS_AUDIT,
|
||||
@@ -206,6 +242,7 @@
|
||||
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_TYPE,r.CFG_REGION_CODE,
|
||||
r.DISTRICT,r.CFG_KEYWORDS,r.EXPR_TYPE,r.MATCH_METHOD,r.IS_HEXBIN,r.DO_LOG,
|
||||
r.USER_REGION1,r.USER_REGION2,r.USER_REGION3,r.USER_REGION4,r.USER_REGION5,
|
||||
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.payload_offset,r.payload_size,r.payload_packet_direction
|
||||
</sql>
|
||||
@@ -511,6 +548,16 @@
|
||||
AND r.cfg_region_code = #{cfgRegionCode,jdbcType=BIGINT}
|
||||
</if>
|
||||
</select>
|
||||
<select id="getAppComplexFeatureCfgNotRegionCode" resultMap="AppComplexFeatureCfgMap">
|
||||
SELECT
|
||||
<include refid="AppComplexFeatureCfg_Column" />
|
||||
FROM app_complex_feature_cfg r
|
||||
WHERE r.compile_id=#{compileId} and r.function_id=#{functionId}
|
||||
<if test="cfgRegionCode !=null ">
|
||||
AND r.cfg_region_code != #{cfgRegionCode,jdbcType=BIGINT}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 新增app_ip_range子配置 -->
|
||||
<insert id="insertAppIpRangeCfg" parameterType="com.nis.domain.configuration.AppIpCfg" >
|
||||
<selectKey resultType="java.lang.Long" order="AFTER" keyProperty="cfgId">
|
||||
@@ -653,5 +700,39 @@
|
||||
where r.CFG_ID in (${ids})
|
||||
</select>
|
||||
|
||||
<insert id="insertAppFeaturePropCfg" parameterType="com.nis.domain.configuration.AppFeatureProperties" >
|
||||
<selectKey resultType="java.lang.Long" order="AFTER" keyProperty="cfgId">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into app_feature_prop_cfg(
|
||||
compile_id,function_id,service_id,request_id,is_valid,
|
||||
is_audit,creator_id,create_time,editor_id,edit_time,auditor_id,
|
||||
audit_time,drop_opt,loop_opt,weak_feature,whitelist_feature,
|
||||
extend_scan_pkt_num,correlation_valid_time,correlation_block_after,long_stream_lock_time
|
||||
)values (
|
||||
#{compileId,jdbcType=INTEGER},#{functionId,jdbcType=INTEGER},#{serviceId,jdbcType=INTEGER},
|
||||
#{requestId,jdbcType=INTEGER},#{isValid,jdbcType=INTEGER},#{isAudit,jdbcType=INTEGER},
|
||||
#{creatorId,jdbcType=INTEGER},#{createTime,jdbcType=TIMESTAMP},#{editorId,jdbcType=INTEGER},
|
||||
#{editTime,jdbcType=TIMESTAMP},#{auditorId,jdbcType=INTEGER},#{auditTime,jdbcType=TIMESTAMP},
|
||||
#{dropOpt,jdbcType=INTEGER},#{loopOpt,jdbcType=INTEGER},
|
||||
#{weakFeature,jdbcType=VARCHAR},#{whitelistFeature,jdbcType=VARCHAR},#{extendScanPktNum,jdbcType=INTEGER},
|
||||
#{correlationValidTime,jdbcType=INTEGER},#{correlationBlockAfter,jdbcType=VARCHAR},
|
||||
#{longStreamLockTime,jdbcType=INTEGER}
|
||||
)
|
||||
</insert>
|
||||
<!-- 删除App 特征属性子配置 -->
|
||||
<delete id="deleteAppFeaturePropCfg" >
|
||||
delete from app_feature_prop_cfg where compile_id=#{compileId} and function_id=#{functionId}
|
||||
</delete>
|
||||
<!-- 查询特征属性配置列表 -->
|
||||
<select id="getAppFeaturePropCfg" resultMap="AppFeaturePropCfgMap">
|
||||
SELECT
|
||||
<include refid="AppFeaturePropCfg_Column" />
|
||||
FROM app_feature_prop_cfg r
|
||||
WHERE r.compile_id=#{compileId} and r.function_id=#{functionId}
|
||||
<if test="cfgRegionCode !=null ">
|
||||
AND r.cfg_region_code = #{cfgRegionCode,jdbcType=BIGINT}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.nis.web.dao.configuration;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import com.nis.domain.basics.AsnIpCfg;
|
||||
import com.nis.domain.configuration.CfgIndexInfo;
|
||||
import com.nis.domain.configuration.ComplexkeywordCfg;
|
||||
import com.nis.domain.configuration.DnsKeywordCfg;
|
||||
import com.nis.web.dao.CrudDao;
|
||||
import com.nis.web.dao.MyBatisDao;
|
||||
|
||||
/**
|
||||
* @ClassName:DnsKeyworkCfgDao
|
||||
* @Description:TODO(这里用一句话描述这个类的作用)
|
||||
* @author zdx
|
||||
* @date 2019年2月15日 下午5:55:26
|
||||
* @version V1.0
|
||||
*/
|
||||
@MyBatisDao
|
||||
public interface DnsKeywordCfgDao extends CrudDao<DnsKeywordCfg>{
|
||||
public void saveDnsKeywordsCfg(ComplexkeywordCfg entity);
|
||||
public List<DnsKeywordCfg> findPage(DnsKeywordCfg entity);
|
||||
public List<DnsKeywordCfg> getByIds(@Param("ids")String ids);
|
||||
public void delete(@Param("ids")String ids);
|
||||
}
|
||||
340
src/main/java/com/nis/web/dao/configuration/DnsKeywordCfgDao.xml
Normal file
340
src/main/java/com/nis/web/dao/configuration/DnsKeywordCfgDao.xml
Normal file
@@ -0,0 +1,340 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.nis.web.dao.configuration.DnsKeywordCfgDao" >
|
||||
|
||||
<resultMap id="CfgIndexInfoMap" type="com.nis.domain.configuration.CfgIndexInfo" >
|
||||
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
||||
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
||||
<result column="action" property="action" jdbcType="INTEGER" />
|
||||
<result column="is_valid" property="isValid" jdbcType="INTEGER" />
|
||||
<result column="is_audit" property="isAudit" jdbcType="INTEGER" />
|
||||
<result column="creator_id" property="creatorId" jdbcType="INTEGER" />
|
||||
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
|
||||
<result column="editor_id" property="editorId" jdbcType="INTEGER" />
|
||||
<result column="edit_time" property="editTime" jdbcType="TIMESTAMP" />
|
||||
<result column="auditor_id" property="auditorId" jdbcType="INTEGER" />
|
||||
<result column="audit_time" property="auditTime" jdbcType="TIMESTAMP" />
|
||||
<result column="service_id" property="serviceId" jdbcType="INTEGER" />
|
||||
<result column="request_id" property="requestId" jdbcType="INTEGER" />
|
||||
<result column="compile_id" property="compileId" jdbcType="INTEGER" />
|
||||
<result column="is_area_effective" property="isAreaEffective" jdbcType="INTEGER" />
|
||||
<result column="classify" property="classify" jdbcType="VARCHAR" />
|
||||
<result column="attribute" property="attribute" jdbcType="VARCHAR" />
|
||||
<result column="lable" property="lable" jdbcType="VARCHAR" />
|
||||
<result column="area_effective_ids" property="areaEffectiveIds" jdbcType="VARCHAR" />
|
||||
<result column="function_id" property="functionId" jdbcType="INTEGER" />
|
||||
<result column="dns_strategy_id" property="dnsStrategyId" jdbcType="INTEGER" />
|
||||
<result column="dns_strategy_name" property="dnsStrategyName" jdbcType="VARCHAR" />
|
||||
<result column="do_log" property="doLog" jdbcType="INTEGER" />
|
||||
<result column="user_region1" property="userRegion1" jdbcType="VARCHAR" />
|
||||
<result column="user_region2" property="userRegion2" jdbcType="VARCHAR" />
|
||||
<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="source_compile_id" property="sourceCompileId" jdbcType="INTEGER" />
|
||||
<result column="cancel_request_id" property="cancelRequestId" jdbcType="INTEGER" />
|
||||
<result column="do_blacklist" property="doBlackList" jdbcType="INTEGER" />
|
||||
</resultMap>
|
||||
<resultMap id="stringCfgMap" type="com.nis.domain.configuration.BaseStringCfg" >
|
||||
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
||||
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
||||
<result column="cfg_keywords" property="cfgKeywords" jdbcType="VARCHAR" />
|
||||
<result column="cfg_type" property="cfgType" jdbcType="VARCHAR" />
|
||||
<result column="action" property="action" jdbcType="INTEGER" />
|
||||
<result column="is_valid" property="isValid" jdbcType="INTEGER" />
|
||||
<result column="is_audit" property="isAudit" jdbcType="INTEGER" />
|
||||
<result column="creator_id" property="creatorId" jdbcType="INTEGER" />
|
||||
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
|
||||
<result column="editor_id" property="editorId" jdbcType="INTEGER" />
|
||||
<result column="edit_time" property="editTime" jdbcType="TIMESTAMP" />
|
||||
<result column="auditor_id" property="auditorId" jdbcType="INTEGER" />
|
||||
<result column="audit_time" property="auditTime" jdbcType="TIMESTAMP" />
|
||||
<result column="service_id" property="serviceId" jdbcType="INTEGER" />
|
||||
<result column="request_id" property="requestId" jdbcType="INTEGER" />
|
||||
<result column="compile_id" property="compileId" jdbcType="INTEGER" />
|
||||
<result column="is_area_effective" property="isAreaEffective" jdbcType="INTEGER" />
|
||||
<result column="classify" property="classify" jdbcType="VARCHAR" />
|
||||
<result column="attribute" property="attribute" jdbcType="VARCHAR" />
|
||||
<result column="lable" property="lable" jdbcType="VARCHAR" />
|
||||
<result column="expr_type " property="exprType" jdbcType="INTEGER" />
|
||||
<result column="match_method" property="matchMethod" jdbcType="INTEGER" />
|
||||
<result column="is_hexbin" property="isHexbin" jdbcType="INTEGER" />
|
||||
<result column="area_effective_ids" property="areaEffectiveIds" jdbcType="VARCHAR" />
|
||||
<result column="function_id" property="functionId" jdbcType="INTEGER" />
|
||||
<result column="cfg_region_code" property="cfgRegionCode" jdbcType="INTEGER" />
|
||||
<result column="cfg_type" property="cfgType" jdbcType="VARCHAR" />
|
||||
</resultMap>
|
||||
<resultMap id="dnsKeywordCfgMap" type="com.nis.domain.configuration.DnsKeywordCfg" >
|
||||
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
||||
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
||||
<result column="cfg_keywords" property="cfgKeywords" jdbcType="VARCHAR" />
|
||||
<result column="district" property="district" jdbcType="VARCHAR" />
|
||||
<result column="cfg_type" property="cfgType" jdbcType="VARCHAR" />
|
||||
<result column="action" property="action" jdbcType="INTEGER" />
|
||||
<result column="is_valid" property="isValid" jdbcType="INTEGER" />
|
||||
<result column="is_audit" property="isAudit" jdbcType="INTEGER" />
|
||||
<result column="creator_id" property="creatorId" jdbcType="INTEGER" />
|
||||
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
|
||||
<result column="editor_id" property="editorId" jdbcType="INTEGER" />
|
||||
<result column="edit_time" property="editTime" jdbcType="TIMESTAMP" />
|
||||
<result column="auditor_id" property="auditorId" jdbcType="INTEGER" />
|
||||
<result column="audit_time" property="auditTime" jdbcType="TIMESTAMP" />
|
||||
<result column="service_id" property="serviceId" jdbcType="INTEGER" />
|
||||
<result column="request_id" property="requestId" jdbcType="INTEGER" />
|
||||
<result column="compile_id" property="compileId" jdbcType="INTEGER" />
|
||||
<result column="is_area_effective" property="isAreaEffective" jdbcType="INTEGER" />
|
||||
<result column="classify" property="classify" jdbcType="VARCHAR" />
|
||||
<result column="attribute" property="attribute" jdbcType="VARCHAR" />
|
||||
<result column="lable" property="lable" jdbcType="VARCHAR" />
|
||||
<result column="expr_type " property="exprType" jdbcType="INTEGER" />
|
||||
<result column="match_method" property="matchMethod" jdbcType="INTEGER" />
|
||||
<result column="is_hexbin" property="isHexbin" jdbcType="INTEGER" />
|
||||
<result column="area_effective_ids" property="areaEffectiveIds" jdbcType="VARCHAR" />
|
||||
<result column="function_id" property="functionId" jdbcType="INTEGER" />
|
||||
<result column="cfg_region_code" property="cfgRegionCode" jdbcType="INTEGER" />
|
||||
<result column="cfg_type" property="cfgType" jdbcType="VARCHAR" />
|
||||
</resultMap>
|
||||
<sql id="configIndexColumn" >
|
||||
a.CFG_ID,a.CFG_DESC,a.ACTION,a.IS_VALID,a.IS_AUDIT,
|
||||
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.source_compile_id,a.cancel_request_id,
|
||||
a.do_blacklist
|
||||
</sql>
|
||||
<sql id="ipCfgColumn" >
|
||||
a.cfg_id,a.cfg_desc,a.ip_type,a.src_ip_address,a.ip_pattern,a.port_pattern,a.src_port
|
||||
,a.protocol,a.protocol_id,a.direction,a.cfg_type,a.action,a.dest_port,a.dest_ip_address
|
||||
,a.is_valid,a.is_audit,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.cfg_region_code
|
||||
</sql>
|
||||
<sql id="strCfgColumn" >
|
||||
a.cfg_id,a.cfg_desc,a.cfg_keywords,a.cfg_type,
|
||||
a.action,a.is_valid,a.is_audit,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.expr_type,a.match_method,a.is_hexbin,a.area_effective_ids,a.function_id,a.cfg_region_code
|
||||
</sql>
|
||||
<sql id="complexCfgColumn" >
|
||||
a.cfg_id,a.cfg_desc,a.cfg_keywords,a.cfg_type,a.district,a.user_region1,
|
||||
a.action,a.is_valid,a.is_audit,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.expr_type,a.match_method,a.is_hexbin,a.area_effective_ids,a.function_id,a.cfg_region_code
|
||||
</sql>
|
||||
|
||||
<!-- dns域名查询 -->
|
||||
<select id="findPage" resultMap="dnsKeywordCfgMap" parameterType="com.nis.domain.configuration.DnsKeywordCfg">
|
||||
SELECT
|
||||
<include refid="complexCfgColumn" />
|
||||
,s.name as creator_name,e.name as editor_name,u.name as auditor_name
|
||||
FROM dns_domain_cfg a
|
||||
left join sys_user s on a.creator_id=s.id
|
||||
left join sys_user e on a.editor_id=e.id
|
||||
left join sys_user u on a.auditor_id=u.id
|
||||
where service_id=-2 and function_id=#{functionId}
|
||||
<if test="cfgType != null and cfgType != ''">
|
||||
and a.cfg_type =#{cfgType,jdbcType=VARCHAR}
|
||||
</if>
|
||||
</select>
|
||||
<select id="get" resultMap="dnsKeywordCfgMap">
|
||||
select
|
||||
<include refid="complexCfgColumn"></include>
|
||||
from dns_domain_cfg a
|
||||
where a.cfg_id=#{cfgId}
|
||||
</select>
|
||||
<select id="getByIds" resultMap="dnsKeywordCfgMap">
|
||||
select
|
||||
<include refid="complexCfgColumn"></include>
|
||||
from dns_domain_cfg a
|
||||
where a.cfg_id in (${ids}) and is_valid !=-1
|
||||
</select>
|
||||
<update id="updateCfgValid" parameterType="com.nis.domain.configuration.BaseCfg">
|
||||
update ${tableName} set is_valid = #{isValid,jdbcType=INTEGER},
|
||||
editor_id = #{editorId,jdbcType=INTEGER} ,
|
||||
edit_time = #{editTime,jdbcType=TIMESTAMP}
|
||||
<if test="isAudit !=null ">
|
||||
,is_audit = #{isAudit,jdbcType=BIGINT}
|
||||
</if>
|
||||
<trim prefix="WHERE" prefixOverrides="AND |OR ">
|
||||
<if test="cfgId !=null ">
|
||||
AND cfg_id = #{cfgId,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="compileId !=null ">
|
||||
AND compile_id = #{compileId,jdbcType=INTEGER}
|
||||
</if>
|
||||
and function_id=#{functionId,jdbcType=INTEGER}
|
||||
</trim>
|
||||
</update>
|
||||
<update id="auditCfg" parameterType="com.nis.domain.configuration.BaseCfg">
|
||||
update ${tableName} set is_audit = #{isAudit,jdbcType=INTEGER},
|
||||
auditor_id = #{auditorId,jdbcType=INTEGER},
|
||||
audit_time = #{auditTime,jdbcType=TIMESTAMP}
|
||||
<if test="isValid != null" >
|
||||
,is_valid = #{isValid,jdbcType=INTEGER}
|
||||
</if>
|
||||
<trim prefix="WHERE" prefixOverrides="AND |OR ">
|
||||
<if test="cfgId !=null ">
|
||||
AND cfg_id = #{cfgId,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="compileId !=null ">
|
||||
AND compile_id = #{compileId,jdbcType=INTEGER}
|
||||
</if>
|
||||
and function_id=#{functionId,jdbcType=INTEGER}
|
||||
</trim>
|
||||
|
||||
</update>
|
||||
<!-- insert dns_domain_cfg表信息 -->
|
||||
<insert id="saveDnsKeywordsCfg" parameterType="com.nis.domain.configuration.DnsKeywordCfg" >
|
||||
insert into dns_domain_cfg (
|
||||
CFG_DESC,
|
||||
ACTION,
|
||||
IS_VALID,
|
||||
IS_AUDIT,
|
||||
CREATOR_ID,
|
||||
CREATE_TIME,
|
||||
EDITOR_ID,
|
||||
EDIT_TIME,
|
||||
AUDITOR_ID,
|
||||
AUDIT_TIME,
|
||||
SERVICE_ID,
|
||||
REQUEST_ID,
|
||||
COMPILE_ID,
|
||||
IS_AREA_EFFECTIVE,
|
||||
CLASSIFY,
|
||||
ATTRIBUTE,
|
||||
LABLE,
|
||||
AREA_EFFECTIVE_IDS,
|
||||
function_id,
|
||||
district,
|
||||
cfg_keywords,
|
||||
cfg_type,
|
||||
cfg_region_code,
|
||||
expr_type,
|
||||
match_method,
|
||||
is_hexbin,
|
||||
user_region1
|
||||
)values (
|
||||
#{cfgDesc,jdbcType=VARCHAR},
|
||||
#{action,jdbcType=INTEGER},
|
||||
0,
|
||||
0,
|
||||
#{creatorId,jdbcType=INTEGER},
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
#{editorId,jdbcType=INTEGER},
|
||||
#{editTime,jdbcType=TIMESTAMP},
|
||||
#{auditorId,jdbcType=INTEGER},
|
||||
#{auditTime,jdbcType=TIMESTAMP},
|
||||
#{serviceId,jdbcType=INTEGER},
|
||||
#{requestId,jdbcType=INTEGER},
|
||||
#{compileId,jdbcType=INTEGER},
|
||||
#{isAreaEffective,jdbcType=INTEGER},
|
||||
#{classify,jdbcType=VARCHAR},
|
||||
#{attribute,jdbcType=VARCHAR},
|
||||
#{lable,jdbcType=VARCHAR},
|
||||
#{areaEffectiveIds,jdbcType=VARCHAR},
|
||||
#{functionId,jdbcType=INTEGER},
|
||||
#{district,jdbcType=VARCHAR},
|
||||
#{cfgKeywords,jdbcType=VARCHAR},
|
||||
#{cfgType,jdbcType=VARCHAR},
|
||||
#{cfgRegionCode,jdbcType=INTEGER},
|
||||
#{exprType,jdbcType=INTEGER},
|
||||
#{matchMethod,jdbcType=INTEGER},
|
||||
#{isHexbin,jdbcType=INTEGER},
|
||||
#{userRegion1,jdbcType=VARCHAR}
|
||||
)
|
||||
</insert>
|
||||
<!-- 删除dns公共组域名配置 -->
|
||||
<delete id="deleteDnsDomainCfg">
|
||||
delete from dns_domain_cfg where compile_id=#{compileId} and function_id=#{functionId}
|
||||
</delete>
|
||||
<delete id="delete" parameterType="java.lang.String" >
|
||||
delete from dns_domain_cfg where cfg_id in (${ids})
|
||||
</delete>
|
||||
<update id="update" parameterType="com.nis.domain.configuration.DnsKeywordCfg" >
|
||||
update dns_domain_cfg
|
||||
<set >
|
||||
<trim suffixOverrides=",">
|
||||
<if test="cfgDesc != null and cfgDesc != ''" >
|
||||
cfg_desc = #{cfgDesc,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="action != null" >
|
||||
action = #{action,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isValid != null" >
|
||||
is_valid = #{isValid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isAudit != null" >
|
||||
is_audit = #{isAudit,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="editorId != null" >
|
||||
editor_id = #{editorId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="editTime != null and editTime != ''" >
|
||||
edit_time = #{editTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="auditorId != null" >
|
||||
AUDITOR_ID = #{auditorId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="auditTime != null and auditTime != ''" >
|
||||
AUDIT_TIME = #{auditTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="serviceId != null" >
|
||||
service_id = #{serviceId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="requestId != null" >
|
||||
request_id = #{requestId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isAreaEffective != null" >
|
||||
is_area_effective = #{isAreaEffective,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="classify != null and classify != ''" >
|
||||
classify = #{classify,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="attribute != null and attribute != ''" >
|
||||
attribute = #{attribute,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="lable != null and lable != ''" >
|
||||
lable = #{lable,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="areaEffectiveIds != null" >
|
||||
area_effective_ids = #{areaEffectiveIds,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="functionId != null" >
|
||||
function_id = #{functionId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="district != null" >
|
||||
district = #{district,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="cfgKeywords != null and cfgKeywords != ''" >
|
||||
cfg_keywords = #{cfgKeywords,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="cfgType != null" >
|
||||
cfg_type = #{cfgType,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="cfgRegionCode != null" >
|
||||
cfg_region_code = #{cfgRegionCode,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="exprType != null and exprType != ''" >
|
||||
expr_type = #{exprType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="matchMethod != null" >
|
||||
match_method = #{matchMethod,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isHexbin != null" >
|
||||
is_hexbin = #{isHexbin,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="userRegion1 != null and userRegion1 != ''" >
|
||||
user_region1 = #{userRegion1,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="compileId != null and compileId != ''" >
|
||||
compile_id = #{compileId,jdbcType=INTEGER},
|
||||
</if>
|
||||
</trim>
|
||||
</set>
|
||||
<where>
|
||||
and cfg_id = #{cfgId,jdbcType=INTEGER}
|
||||
</where>
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
@@ -775,7 +775,7 @@
|
||||
sys_user u on r.auditor_id = u.id
|
||||
left join
|
||||
request_info ri on r.request_id = ri.id
|
||||
where a.CFG_ID in (${ids})
|
||||
where r.CFG_ID in (${ids})
|
||||
</select>
|
||||
|
||||
<select id="findPageByDnat" resultMap="dnatPolicyMap">
|
||||
|
||||
@@ -167,6 +167,6 @@
|
||||
FROM user_manage a
|
||||
left join sys_user s on a.creator_id=s.id
|
||||
left join sys_user e on a.editor_id=e.id
|
||||
where a.CFG_ID in (${ids})
|
||||
where a.id in (${ids})
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -134,7 +134,7 @@
|
||||
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.source_compile_id,a.cancel_request_id,
|
||||
a.do_blacklist
|
||||
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
|
||||
@@ -490,7 +490,8 @@
|
||||
user_region5,
|
||||
do_log,
|
||||
source_compile_id,
|
||||
do_blacklist
|
||||
do_blacklist,
|
||||
common_group_ids
|
||||
)values (
|
||||
#{cfgDesc,jdbcType=VARCHAR},
|
||||
#{action,jdbcType=INTEGER},
|
||||
@@ -519,7 +520,8 @@
|
||||
#{userRegion5,jdbcType=VARCHAR},
|
||||
#{doLog,jdbcType=INTEGER},
|
||||
#{sourceCompileId,jdbcType=INTEGER},
|
||||
#{doBlackList,jdbcType=INTEGER}
|
||||
#{doBlackList,jdbcType=INTEGER},
|
||||
#{commonGroupIds,jdbcType=VARCHAR}
|
||||
)
|
||||
</insert>
|
||||
<!-- insert ip_port_cfg表信息 -->
|
||||
@@ -948,6 +950,9 @@
|
||||
user_region4 = #{userRegion4,jdbcType=VARCHAR},
|
||||
user_region5 = #{userRegion5,jdbcType=VARCHAR},
|
||||
dns_strategy_id = #{dnsStrategyId,jdbcType=INTEGER},
|
||||
<if test="commonGroupIds != null">
|
||||
common_group_ids = #{commonGroupIds,jdbcType=VARCHAR}
|
||||
</if>
|
||||
</trim>
|
||||
</set>
|
||||
where cfg_id = #{cfgId,jdbcType=BIGINT}
|
||||
|
||||
@@ -3507,6 +3507,33 @@ public abstract class BaseService {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 关键字公共组配置处理
|
||||
* @param entity
|
||||
*/
|
||||
public void auditStrGroupCfg(List<GroupCfg> groupRelationList,BaseCfg entity){
|
||||
// url,跟dns公共组下发时用的组id
|
||||
if(entity!=null&&!StringUtil.isEmpty(entity.getCommonGroupIds())){
|
||||
// maat添加公共组信息
|
||||
String[] orgGroupIds=entity.getCommonGroupIds().split(",");
|
||||
for (int i = 0; i < orgGroupIds.length; i++) {
|
||||
if(!StringUtil.isEmpty(orgGroupIds[i])){
|
||||
List<Integer> listGroupId=new ArrayList<>();
|
||||
GroupCfg group = new GroupCfg();
|
||||
group.setGroupId(Integer.parseInt(orgGroupIds[i]));
|
||||
group.setCompileId(entity.getCompileId());
|
||||
group.setAuditTime(entity.getAuditTime());
|
||||
group.setIsValid(entity.getIsValid()); // '0无效,1有效,-1删除;
|
||||
group.setIsCommonGroup(1); // 标识为公共组 ,已下发过的组是否还需标记为公共组
|
||||
if(!listGroupId.contains(group.getGroupId())){
|
||||
groupRelationList.add(group);
|
||||
listGroupId.add(group.getGroupId());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,206 @@
|
||||
package com.nis.web.service.basics;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.ibatis.session.ExecutorType;
|
||||
import org.apache.ibatis.session.SqlSession;
|
||||
import org.apache.ibatis.session.SqlSessionFactory;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.beust.jcommander.internal.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.nis.domain.FunctionServiceDict;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.basics.AsnGroupInfo;
|
||||
import com.nis.domain.basics.AsnIpCfg;
|
||||
import com.nis.domain.basics.PolicyGroupInfo;
|
||||
import com.nis.domain.configuration.BaseStringCfg;
|
||||
import com.nis.domain.configuration.CfgIndexInfo;
|
||||
import com.nis.domain.configuration.ComplexkeywordCfg;
|
||||
import com.nis.domain.configuration.DnsKeywordCfg;
|
||||
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;
|
||||
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.maat.ToMaatBean;
|
||||
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;
|
||||
import com.nis.web.dao.basics.PolicyGroupInfoDao;
|
||||
import com.nis.web.dao.configuration.DnsKeywordCfgDao;
|
||||
import com.nis.web.dao.configuration.StringCfgDao;
|
||||
import com.nis.web.dao.specific.ConfigGroupInfoDao;
|
||||
import com.nis.web.security.UserUtils;
|
||||
import com.nis.web.service.CrudService;
|
||||
import com.nis.web.service.SpringContextHolder;
|
||||
@Service
|
||||
public class DnsKeywordCfgService extends CrudService<CrudDao<DnsKeywordCfg>, DnsKeywordCfg> {
|
||||
@Autowired
|
||||
private AsnIpCfgDao asnIpCfgDao;
|
||||
|
||||
@Autowired
|
||||
protected DnsKeywordCfgDao dnsKeywordCfgDao;
|
||||
// @Autowired
|
||||
// private SpecificServiceCfgDao specificServiceCfgDao;
|
||||
@Autowired
|
||||
private ConfigGroupInfoDao configGroupInfoDao;
|
||||
@Autowired
|
||||
private AsnGroupInfoDao asnGroupInfoDao;
|
||||
|
||||
@Autowired
|
||||
private PolicyGroupInfoDao policyGroupInfoDao;
|
||||
/**
|
||||
* @param page
|
||||
* @param entity
|
||||
* @return
|
||||
*/
|
||||
public Page<DnsKeywordCfg> findPage(Page<DnsKeywordCfg> page, DnsKeywordCfg entity) {
|
||||
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"r"));
|
||||
entity.setPage(page);
|
||||
List<DnsKeywordCfg> list=dnsKeywordCfgDao.findPage(entity);
|
||||
List<PolicyGroupInfo> policyGroupInfos = policyGroupInfoDao.findPolicyGroupInfosByTypeForUD(12,1);
|
||||
Map<String, String> policyGroupMap = new HashMap<String, String>();
|
||||
for (PolicyGroupInfo policyGroupInfo : policyGroupInfos) {
|
||||
if (!StringUtil.isEmpty(policyGroupInfo.getServiceGroupId())) {
|
||||
policyGroupMap.put(policyGroupInfo.getServiceGroupId().toString(), policyGroupInfo.getGroupName()+"");
|
||||
}
|
||||
}
|
||||
for (DnsKeywordCfg cfg : list) {
|
||||
cfg.setDnsGroupName(policyGroupMap.get(cfg.getUserRegion1()));
|
||||
}
|
||||
page.setList(list);
|
||||
return page;
|
||||
}
|
||||
|
||||
public List<AsnIpCfg> findByPage(String ids) {
|
||||
List<AsnIpCfg> list=asnIpCfgDao.findByPage(ids);
|
||||
return list;
|
||||
}
|
||||
public DnsKeywordCfg get(Long id ) {
|
||||
return dnsKeywordCfgDao.get(id);
|
||||
}
|
||||
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public void update(DnsKeywordCfg entity){
|
||||
Date editTime=new Date();
|
||||
entity.setEditTime(editTime);
|
||||
entity.setEditorId(entity.getCurrentUser().getId());
|
||||
List<DnsKeywordCfg> auditList=new ArrayList<DnsKeywordCfg>();
|
||||
/**
|
||||
* 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);
|
||||
}
|
||||
dnsKeywordCfgDao.update(entity);
|
||||
//ASN下发状态时可以更改,更改之后直接下发
|
||||
if(entity.getIsValid() ==1){
|
||||
auditList.add(entity);
|
||||
// dnsKeywordRegionSendToMaat(auditList,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 saveDnsKeywordCfg(CfgIndexInfo entity) {
|
||||
// entity.setCompileId(compileId);
|
||||
entity.setCreateTime(new Date());
|
||||
entity.setCreatorId(entity.getCurrentUser().getId());
|
||||
if (!StringUtil.isEmpty(entity.getDomainList())) {
|
||||
for(ComplexkeywordCfg cfg:entity.getDomainList()){
|
||||
if(StringUtils.isNotBlank(cfg.getCfgKeywords())){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
if(StringUtils.isNoneBlank(cfg.getDistrictShowName()) && cfg.getDistrict().equals("others")){
|
||||
cfg.setDistrict(cfg.getDistrictShowName());
|
||||
}
|
||||
dnsKeywordCfgDao.saveDnsKeywordsCfg(cfg);
|
||||
}
|
||||
}
|
||||
}
|
||||
//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) {
|
||||
List<DnsKeywordCfg> issuedList=new ArrayList<>();
|
||||
List<DnsKeywordCfg> dnsKwdCfgList= dnsKeywordCfgDao.getByIds(ids);
|
||||
for(DnsKeywordCfg entity:dnsKwdCfgList) {
|
||||
if(entity.getIsValid()==Constants.VALID_YES) {//代表下发过了
|
||||
entity.setIsValid(Constants.VALID_DEL);
|
||||
issuedList.add(entity);
|
||||
// groupId=asnIpCfg.getAsnIpGroup();
|
||||
//List result=asnIpCfgDao.findOtherIps(groupId, asnIpCfg.getCfgId().intValue());
|
||||
//if(result==null||result.size()==0) {
|
||||
// throw new RuntimeException("Cant not delete ip from asn group, there is only one ip left in the group!");
|
||||
//}
|
||||
}
|
||||
}
|
||||
dnsKeywordCfgDao.delete(ids);
|
||||
//已经下发过的,调用分组复用配置删除接口
|
||||
// splitAndSend(issuedList,Constants.VALID_NO);
|
||||
if(issuedList.size() > 0){
|
||||
// dnsKeywordRegionSendToMaat(issuedList,Constants.VALID_NO,Constants.OPACTION_PUT);
|
||||
}
|
||||
}
|
||||
|
||||
public List<DnsKeywordCfg> getByIds(String ids) {
|
||||
if(ids==null) {
|
||||
throw new RuntimeException("ids is null!");
|
||||
}
|
||||
return dnsKeywordCfgDao.getByIds(ids);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,153 @@
|
||||
package com.nis.web.service.basics;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.session.ExecutorType;
|
||||
import org.apache.ibatis.session.SqlSession;
|
||||
import org.apache.ibatis.session.SqlSessionFactory;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.basics.AsnGroupInfo;
|
||||
import com.nis.domain.basics.AsnIpCfg;
|
||||
import com.nis.domain.basics.UrlCommGroupCfg;
|
||||
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.ToMaatBean;
|
||||
import com.nis.domain.maat.ToMaatResult;
|
||||
import com.nis.domain.maat.MaatCfg.DigestCfg;
|
||||
import com.nis.domain.maat.MaatCfg.GroupCfg;
|
||||
import com.nis.domain.maat.MaatCfg.IpCfg;
|
||||
import com.nis.domain.maat.MaatCfg.NumBoundaryCfg;
|
||||
import com.nis.domain.maat.MaatCfg.StringCfg;
|
||||
import com.nis.util.ConfigServiceUtil;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.web.dao.CrudDao;
|
||||
import com.nis.web.dao.basics.UrlCommGroupDao;
|
||||
import com.nis.web.dao.configuration.IpCfgDao;
|
||||
import com.nis.web.security.UserUtils;
|
||||
import com.nis.web.service.CrudService;
|
||||
import com.nis.web.service.SpringContextHolder;
|
||||
|
||||
@Service
|
||||
public class UrlCommGroupService extends CrudService<CrudDao<UrlCommGroupCfg>, UrlCommGroupCfg>{
|
||||
|
||||
@Autowired
|
||||
private UrlCommGroupDao urlCommGroupDao;
|
||||
|
||||
|
||||
public Page<UrlCommGroupCfg> findPage(Page<UrlCommGroupCfg> page, UrlCommGroupCfg entity) {
|
||||
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"r"));
|
||||
entity.setPage(page);
|
||||
List<UrlCommGroupCfg> list=urlCommGroupDao.findAllPageList(entity);
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
String key=list.get(i).getCfgKeywords().replace("***and***", " ");
|
||||
list.get(i).setCfgKeywords(key);
|
||||
}
|
||||
page.setList(list);
|
||||
return page;
|
||||
}
|
||||
|
||||
|
||||
public List<UrlCommGroupCfg> findByPage(String ids) {
|
||||
List<UrlCommGroupCfg> list=urlCommGroupDao.findByPage(ids);
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public UrlCommGroupCfg get(Long id ) {
|
||||
return urlCommGroupDao.get(id);
|
||||
}
|
||||
|
||||
//新增 insertUrlCommGroupCfg
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public void saveUrlCommGroupCfg(CfgIndexInfo entity) {
|
||||
Date createTime=new Date();
|
||||
if(entity.getUrlCommGroupList()!=null) {
|
||||
for (int i = 0; i < entity.getUrlCommGroupList().size(); i++) {
|
||||
BeanUtils.copyProperties(entity, entity.getUrlCommGroupList().get(i), new String[]{"cfgId"});
|
||||
entity.getUrlCommGroupList().get(i).setRequestId(0);
|
||||
entity.getUrlCommGroupList().get(i).setClassify("0");
|
||||
entity.getUrlCommGroupList().get(i).setAttribute("0");
|
||||
entity.getUrlCommGroupList().get(i).setLable("0");
|
||||
entity.getUrlCommGroupList().get(i).setIsHexbin(0);
|
||||
entity.getUrlCommGroupList().get(i).setCreateTime(createTime);
|
||||
entity.getUrlCommGroupList().get(i).setCreatorId(entity.getCurrentUser().getId());
|
||||
entity.getUrlCommGroupList().get(i).setIsValid(Constants.VALID_NO);
|
||||
entity.getUrlCommGroupList().get(i).setIsAudit(Constants.AUDIT_NOT_YET);
|
||||
if(entity.getUrlCommGroupList().get(i).getCfgKeywords().contains("***and***")){
|
||||
entity.getUrlCommGroupList().get(i).setExprType(1);
|
||||
}else{
|
||||
entity.getUrlCommGroupList().get(i).setExprType(0);
|
||||
}
|
||||
urlCommGroupDao.insertUrlCommGroupCfg(entity.getUrlCommGroupList().get(i));
|
||||
}
|
||||
// //修改公共组的标识
|
||||
// Integer udFlag=urlCommGroupDao.findUrlUdFlag(Integer.parseInt(entity.getUserRegion3()));
|
||||
// if(udFlag == 0){
|
||||
// urlCommGroupDao.updateUrlUdFlag(Integer.parseInt(entity.getUserRegion3()), 1);
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public void update(UrlCommGroupCfg entity){
|
||||
Date editTime=new Date();
|
||||
entity.setIsValid(0);
|
||||
entity.setIsAudit(0);
|
||||
entity.setEditTime(editTime);
|
||||
entity.setEditorId(entity.getCurrentUser().getId());
|
||||
if(entity.getCfgKeywords().contains("***and***")){
|
||||
entity.setExprType(1);
|
||||
}else{
|
||||
entity.setExprType(0);
|
||||
}
|
||||
urlCommGroupDao.update(entity);
|
||||
}
|
||||
|
||||
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public void delete(String ids) {
|
||||
|
||||
urlCommGroupDao.delete(ids);
|
||||
}
|
||||
|
||||
public List<UrlCommGroupCfg> getByIds(String ids) {
|
||||
if(ids==null) {
|
||||
throw new RuntimeException("ids is null!");
|
||||
}
|
||||
return urlCommGroupDao.getByIds(ids);
|
||||
}
|
||||
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public void audit(UrlCommGroupCfg urlGroupCfg,Integer isAudit,Integer isValid) {
|
||||
|
||||
if(!StringUtil.isEmpty(urlGroupCfg)){
|
||||
urlGroupCfg.setIsValid(isValid);
|
||||
urlGroupCfg.setIsAudit(isAudit);
|
||||
urlGroupCfg.setAuditorId(UserUtils.getUser().getId());
|
||||
urlGroupCfg.setAuditTime(new Date());
|
||||
|
||||
urlCommGroupDao.update(urlGroupCfg);
|
||||
}
|
||||
//下发配置时改变公共组udFlag标识
|
||||
//查询有效的url配置个数
|
||||
Integer groupCount=urlCommGroupDao.getGroupIdCount(urlGroupCfg.getUserRegion3());
|
||||
if(groupCount>0){//udFlag 设置为1
|
||||
urlCommGroupDao.updateUrlUdFlag(Integer.parseInt(urlGroupCfg.getUserRegion3()), 1);
|
||||
}else{//udFlag 设置为0
|
||||
urlCommGroupDao.updateUrlUdFlag(Integer.parseInt(urlGroupCfg.getUserRegion3()), 0);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.nis.web.service.configuration;
|
||||
|
||||
import java.nio.charset.Charset;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
@@ -14,12 +13,11 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.basics.AsnIpCfg;
|
||||
import com.nis.domain.basics.Varibles;
|
||||
import com.nis.domain.configuration.AppByteCfg;
|
||||
import com.nis.domain.configuration.AppDomainCfg;
|
||||
import com.nis.domain.configuration.AppFeatureIndex;
|
||||
import com.nis.domain.configuration.AppFeatureProperties;
|
||||
import com.nis.domain.configuration.AppHeaderCfg;
|
||||
import com.nis.domain.configuration.AppHttpCfg;
|
||||
import com.nis.domain.configuration.AppIpCfg;
|
||||
@@ -28,9 +26,7 @@ import com.nis.domain.configuration.AppSslCertCfg;
|
||||
import com.nis.domain.configuration.AppTcpCfg;
|
||||
import com.nis.domain.configuration.AppTopicDomainCfg;
|
||||
import com.nis.domain.configuration.AreaIpCfg;
|
||||
import com.nis.domain.configuration.BaseIpCfg;
|
||||
import com.nis.domain.configuration.BaseStringCfg;
|
||||
import com.nis.domain.configuration.CfgIndexInfo;
|
||||
import com.nis.domain.configuration.ComplexkeywordCfg;
|
||||
import com.nis.domain.configuration.IpPortCfg;
|
||||
import com.nis.domain.configuration.NtcSubscribeIdCfg;
|
||||
@@ -50,11 +46,11 @@ import com.nis.domain.specific.SpecificServiceCfg;
|
||||
import com.nis.exceptions.MaatConvertException;
|
||||
import com.nis.util.ConfigServiceUtil;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.DictUtils;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.util.StringUtils;
|
||||
import com.nis.web.dao.basics.AsnIpCfgDao;
|
||||
import com.nis.web.dao.configuration.AppCfgDao;
|
||||
import com.nis.web.dao.configuration.AppMultiFeatureCfgDao;
|
||||
import com.nis.web.dao.configuration.AreaIpCfgDao;
|
||||
import com.nis.web.dao.configuration.IpCfgDao;
|
||||
import com.nis.web.dao.configuration.StringCfgDao;
|
||||
@@ -86,6 +82,73 @@ public class AppCfgService extends BaseService {
|
||||
protected ConfigGroupInfoDao configGroupInfoDao;
|
||||
@Autowired
|
||||
protected AsnIpCfgDao asnIpCfgDao;
|
||||
@Autowired
|
||||
protected AppMultiFeatureCfgDao appMultiFeatureCfgDao;
|
||||
|
||||
@Transactional(readOnly = false, rollbackFor = RuntimeException.class)
|
||||
public void saveOrUpdateAppFeaturePropCfg(AppFeatureIndex entity) throws Exception {
|
||||
if (entity.getCfgId() == null) {
|
||||
Integer compileId = 0;
|
||||
try {
|
||||
List<Integer> idList = ConfigServiceUtil.getId(1, 1);
|
||||
if (idList != null && idList.size() > 0) {
|
||||
compileId = idList.get(0);
|
||||
}
|
||||
entity.setCompileId(compileId);
|
||||
entity.setCreateTime(new Date());
|
||||
entity.setCreatorId(entity.getCurrentUser().getId());
|
||||
entity.setIsValid(0);
|
||||
entity.setIsAudit(0);
|
||||
appMultiFeatureCfgDao.insertAppFeatureIndex(entity);
|
||||
if(entity.getIpPortList()!=null){
|
||||
for(AppIpCfg cfg:entity.getIpPortList()){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
appMultiFeatureCfgDao.insertAppIpRangeCfg(cfg);
|
||||
}
|
||||
}
|
||||
if(!StringUtil.isEmpty(entity.getAppFeaturePropCfgList())){
|
||||
for(AppFeatureProperties cfg:entity.getAppFeaturePropCfgList()){
|
||||
BeanUtils.copyProperties(entity, cfg);
|
||||
appMultiFeatureCfgDao.insertAppFeaturePropCfg(cfg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.info("获取编译ID出错");
|
||||
throw new MaatConvertException(e.getMessage());
|
||||
}
|
||||
} else {
|
||||
entity.setEditorId(entity.getCurrentUser().getId());
|
||||
entity.setEditTime(new Date());
|
||||
entity.setIsValid(0);
|
||||
entity.setIsAudit(0);
|
||||
appMultiFeatureCfgDao.updateAppFeatureIndex(entity);
|
||||
appMultiFeatureCfgDao.deleteAppIpRangeCfg(entity);
|
||||
appMultiFeatureCfgDao.deleteAppFeaturePropCfg(entity);
|
||||
entity.setCreateTime(new Date());
|
||||
entity.setCreatorId(entity.getCurrentUser().getId());
|
||||
if(entity.getIpPortList()!=null){
|
||||
for(AppIpCfg cfg:entity.getIpPortList()){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
appMultiFeatureCfgDao.insertAppIpRangeCfg(cfg);
|
||||
}
|
||||
}
|
||||
if(entity.getIpPortList()!=null){
|
||||
for(AppIpCfg cfg:entity.getIpPortList()){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
appMultiFeatureCfgDao.insertAppIpRangeCfg(cfg);
|
||||
}
|
||||
}
|
||||
if(!StringUtil.isEmpty(entity.getAppFeaturePropCfgList())){
|
||||
for(AppFeatureProperties cfg:entity.getAppFeaturePropCfgList()){
|
||||
BeanUtils.copyProperties(entity, cfg);
|
||||
appMultiFeatureCfgDao.insertAppFeaturePropCfg(cfg);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public Page<AppPolicyCfg> findAppPolicyList(Page<AppPolicyCfg> page, AppPolicyCfg entity) {
|
||||
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(), "r"));
|
||||
@@ -430,11 +493,19 @@ public class AppCfgService extends BaseService {
|
||||
areaIpCfgDao.saveAreaIpCfg(cfg);
|
||||
}
|
||||
}
|
||||
// 保存 控管参数和特征属性组件信息
|
||||
if(entity.getAppFeaturePropCfgList()!=null){
|
||||
for(AppFeatureProperties cfg:entity.getAppFeaturePropCfgList()){
|
||||
BeanUtils.copyProperties(entity, cfg);
|
||||
appMultiFeatureCfgDao.insertAppFeaturePropCfg(cfg);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
entity.setEditorId(entity.getCurrentUser().getId());
|
||||
entity.setEditTime(new Date());
|
||||
entity.setIsValid(0);
|
||||
entity.setIsAudit(0);
|
||||
appMultiFeatureCfgDao.deleteAppFeaturePropCfg(entity);
|
||||
appCfgDao.updateAppIpCfg(entity);
|
||||
// 删除旧的区域IP,新增新的区域IP
|
||||
AreaIpCfg area = new AreaIpCfg();
|
||||
@@ -454,6 +525,13 @@ public class AppCfgService extends BaseService {
|
||||
areaIpCfgDao.saveAreaIpCfg(cfg);
|
||||
}
|
||||
}
|
||||
// 更新 控管参数和特征属性组件信息
|
||||
if(entity.getAppFeaturePropCfgList()!=null){
|
||||
for(AppFeatureProperties cfg:entity.getAppFeaturePropCfgList()){
|
||||
BeanUtils.copyProperties(entity, cfg);
|
||||
appMultiFeatureCfgDao.insertAppFeaturePropCfg(cfg);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
public void saveAppHttpCfg(List<ComplexkeywordCfg> cfgs) {
|
||||
@@ -557,6 +635,13 @@ public class AppCfgService extends BaseService {
|
||||
areaIpCfgDao.saveAreaIpCfg(cfg);
|
||||
}
|
||||
}
|
||||
// 保存 控管参数和特征属性组件信息
|
||||
if(entity.getAppFeaturePropCfgList()!=null){
|
||||
for(AppFeatureProperties cfg:entity.getAppFeaturePropCfgList()){
|
||||
BeanUtils.copyProperties(entity, cfg);
|
||||
appMultiFeatureCfgDao.insertAppFeaturePropCfg(cfg);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.info("获取编译ID出错");
|
||||
@@ -567,6 +652,7 @@ public class AppCfgService extends BaseService {
|
||||
entity.setEditTime(new Date());
|
||||
entity.setIsValid(0);
|
||||
entity.setIsAudit(0);
|
||||
appMultiFeatureCfgDao.deleteAppFeaturePropCfg(entity);
|
||||
appCfgDao.updateAppDomainCfg(entity);
|
||||
// 删除旧的区域IP,新增新的区域IP
|
||||
AreaIpCfg area = new AreaIpCfg();
|
||||
@@ -583,6 +669,13 @@ public class AppCfgService extends BaseService {
|
||||
areaIpCfgDao.saveAreaIpCfg(cfg);
|
||||
}
|
||||
}
|
||||
// 更新 控管参数和特征属性组件信息
|
||||
if(entity.getAppFeaturePropCfgList()!=null){
|
||||
for(AppFeatureProperties cfg:entity.getAppFeaturePropCfgList()){
|
||||
BeanUtils.copyProperties(entity, cfg);
|
||||
appMultiFeatureCfgDao.insertAppFeaturePropCfg(cfg);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1205,6 +1298,43 @@ public class AppCfgService extends BaseService {
|
||||
specificServiceCfg.setOpTime(new Date());
|
||||
specificServiceCfgDao.update(specificServiceCfg);
|
||||
}
|
||||
|
||||
List<AppFeatureProperties> appFeaturePropCfgList = appMultiFeatureCfgDao.getAppFeaturePropCfg(entitys.get(0).getCompileId(), entitys.get(0).getFunctionId(), null);
|
||||
String featureUserRegion = "";
|
||||
if(!StringUtil.isEmpty(appFeaturePropCfgList)){
|
||||
AppFeatureProperties cfg = appFeaturePropCfgList.get(0);
|
||||
// 处理下发userRegion
|
||||
if(!StringUtil.isEmpty(cfg.getDropOpt())){
|
||||
featureUserRegion += "DKC=10;DKS="+cfg.getDropOpt()+";";
|
||||
}
|
||||
if(!StringUtil.isEmpty(cfg.getLoopOpt())){
|
||||
featureUserRegion += "DKC=4;DKS="+cfg.getLoopOpt()+";";
|
||||
}
|
||||
if(!StringUtil.isEmpty(cfg.getExtendScanPktNum())){
|
||||
featureUserRegion += "DKC=7;DKS="+cfg.getExtendScanPktNum()+";";
|
||||
}
|
||||
if(!StringUtil.isEmpty(cfg.getLongStreamLockTime())){
|
||||
featureUserRegion += "DKC=16;DKS="+cfg.getLongStreamLockTime()+";";
|
||||
}
|
||||
if(!StringUtil.isEmpty(cfg.getCorrelationValidTime())){
|
||||
featureUserRegion += "DKC=3;DKS="+cfg.getCorrelationValidTime()+";";
|
||||
}
|
||||
|
||||
if(!StringUtil.isEmpty(cfg.getWeakFeature())){
|
||||
featureUserRegion += cfg.getWeakFeature();
|
||||
}
|
||||
if(!StringUtil.isEmpty(cfg.getWhitelistFeature())){
|
||||
featureUserRegion += cfg.getWhitelistFeature();
|
||||
}
|
||||
if(!StringUtil.isEmpty(cfg.getCorrelationBlockAfter())){
|
||||
featureUserRegion += cfg.getCorrelationBlockAfter();
|
||||
}
|
||||
AppFeatureProperties appFeatureProp = new AppFeatureProperties();
|
||||
BeanUtils.copyProperties(entitys.get(0), appFeatureProp, new String[] { "cfgId" });
|
||||
appFeatureProp.setTableName(AppFeatureProperties.getTablename());
|
||||
appCfgDao.auditCfg(appFeatureProp);
|
||||
}
|
||||
|
||||
Integer groupId=configGroupInfo.getGroupId();
|
||||
// 构造提交综合服务参数格式,一条配置提交一次综合服务
|
||||
if (isAudit == 1) {
|
||||
@@ -1233,7 +1363,9 @@ public class AppCfgService extends BaseService {
|
||||
maatCfg.setIsValid(entitys.get(0).getIsValid());
|
||||
// 设置APP自定义域
|
||||
String userRegion = "APP_ID=" + entitys.get(0).getAppCode()/*+Constants.USER_REGION_SPLIT+"ASEV_ID="+businessType*/;
|
||||
maatCfg.setUserRegion(userRegion);
|
||||
if(!StringUtil.isEmpty(featureUserRegion)){
|
||||
maatCfg.setUserRegion(userRegion + ";" +featureUserRegion);
|
||||
}
|
||||
configCompileList.add(maatCfg);
|
||||
maatBean.setConfigCompileList(configCompileList);
|
||||
maatBean.setAuditTime(entitys.get(0).getAuditTime());
|
||||
@@ -1441,6 +1573,42 @@ public class AppCfgService extends BaseService {
|
||||
areaIpRegionList = map.get("dstList");
|
||||
}
|
||||
}
|
||||
List<AppFeatureProperties> appFeaturePropCfgList = appMultiFeatureCfgDao.getAppFeaturePropCfg(entity.getCompileId(), entity.getFunctionId(), null);
|
||||
String featureUserRegion = "";
|
||||
if(!StringUtil.isEmpty(appFeaturePropCfgList)){
|
||||
AppFeatureProperties cfg = appFeaturePropCfgList.get(0);
|
||||
// 处理下发userRegion
|
||||
if(!StringUtil.isEmpty(cfg.getDropOpt())){
|
||||
featureUserRegion += "DKC=10;DKS="+cfg.getDropOpt()+";";
|
||||
}
|
||||
if(!StringUtil.isEmpty(cfg.getLoopOpt())){
|
||||
featureUserRegion += "DKC=4;DKS="+cfg.getLoopOpt()+";";
|
||||
}
|
||||
if(!StringUtil.isEmpty(cfg.getExtendScanPktNum())){
|
||||
featureUserRegion += "DKC=7;DKS="+cfg.getExtendScanPktNum()+";";
|
||||
}
|
||||
if(!StringUtil.isEmpty(cfg.getLongStreamLockTime())){
|
||||
featureUserRegion += "DKC=16;DKS="+cfg.getLongStreamLockTime()+";";
|
||||
}
|
||||
if(!StringUtil.isEmpty(cfg.getCorrelationValidTime())){
|
||||
featureUserRegion += "DKC=3;DKS="+cfg.getCorrelationValidTime()+";";
|
||||
}
|
||||
|
||||
if(!StringUtil.isEmpty(cfg.getWeakFeature())){
|
||||
featureUserRegion += cfg.getWeakFeature();
|
||||
}
|
||||
if(!StringUtil.isEmpty(cfg.getWhitelistFeature())){
|
||||
featureUserRegion += cfg.getWhitelistFeature();
|
||||
}
|
||||
if(!StringUtil.isEmpty(cfg.getCorrelationBlockAfter())){
|
||||
featureUserRegion += cfg.getCorrelationBlockAfter();
|
||||
}
|
||||
AppFeatureProperties appFeatureProp = new AppFeatureProperties();
|
||||
BeanUtils.copyProperties(entity, appFeatureProp, new String[] { "cfgId" });
|
||||
appFeatureProp.setTableName(AppFeatureProperties.getTablename());
|
||||
appCfgDao.auditCfg(appFeatureProp);
|
||||
}
|
||||
|
||||
// 构造提交综合服务参数格式,一条配置提交一次综合服务
|
||||
if (isAudit == 1) {
|
||||
maatCfg.initDefaultValue();
|
||||
@@ -1462,8 +1630,9 @@ public class AppCfgService extends BaseService {
|
||||
if(!StringUtil.isEmpty(entity.getUserRegion5())){
|
||||
userRegion+=";"+Constants.INTERCEPT_DOMAN_INTENSITY_USER_REGION_KEY+"="+entity.getUserRegion5();
|
||||
}
|
||||
|
||||
maatCfg.setUserRegion(userRegion);
|
||||
if(!StringUtil.isEmpty(featureUserRegion)) {
|
||||
maatCfg.setUserRegion(userRegion + ";" +featureUserRegion);
|
||||
}
|
||||
configCompileList.add(maatCfg);
|
||||
maatBean.setConfigCompileList(configCompileList);
|
||||
maatBean.setAuditTime(entity.getAuditTime());
|
||||
@@ -1812,6 +1981,13 @@ public class AppCfgService extends BaseService {
|
||||
cfg.setTableName(AreaIpCfg.getTablename());
|
||||
appCfgDao.updateCfgValid(cfg);
|
||||
}
|
||||
//修改特征属性配置表状态
|
||||
if (!StringUtil.isEmpty(entity.getAppFeaturePropCfgList())) {
|
||||
AppFeatureProperties cfg = new AppFeatureProperties();
|
||||
BeanUtils.copyProperties(entity, cfg, new String[] { "cfgId" });
|
||||
cfg.setTableName(AppFeatureProperties.getTablename());
|
||||
appMultiFeatureCfgDao.updateCfgValid(cfg);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1881,6 +2057,13 @@ public class AppCfgService extends BaseService {
|
||||
cfg.setTableName(AreaIpCfg.getTablename());
|
||||
appCfgDao.updateCfgValid(cfg);
|
||||
}
|
||||
//修改特征属性配置表状态
|
||||
if (!StringUtil.isEmpty(entity.getAppFeaturePropCfgList())) {
|
||||
AppFeatureProperties cfg = new AppFeatureProperties();
|
||||
BeanUtils.copyProperties(entity, cfg, new String[] { "cfgId" });
|
||||
cfg.setTableName(AppFeatureProperties.getTablename());
|
||||
appMultiFeatureCfgDao.updateCfgValid(cfg);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -17,17 +17,10 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.configuration.AppComplexFeatureCfg;
|
||||
import com.nis.domain.configuration.AppFeatureIndex;
|
||||
import com.nis.domain.configuration.AppHttpCfg;
|
||||
import com.nis.domain.configuration.AppFeatureProperties;
|
||||
import com.nis.domain.configuration.AppIpCfg;
|
||||
import com.nis.domain.configuration.AppStringFeatureCfg;
|
||||
import com.nis.domain.configuration.AppTcpCfg;
|
||||
import com.nis.domain.configuration.CfgIndexInfo;
|
||||
import com.nis.domain.configuration.ComplexkeywordCfg;
|
||||
import com.nis.domain.configuration.HttpUrlCfg;
|
||||
import com.nis.domain.configuration.IpPortCfg;
|
||||
import com.nis.domain.configuration.NtcSubscribeIdCfg;
|
||||
import com.nis.domain.configuration.P2pHashCfg;
|
||||
import com.nis.domain.configuration.P2pKeywordCfg;
|
||||
import com.nis.domain.maat.MaatCfg;
|
||||
import com.nis.domain.maat.MaatCfg.DigestCfg;
|
||||
import com.nis.domain.maat.MaatCfg.GroupCfg;
|
||||
@@ -39,7 +32,6 @@ import com.nis.domain.maat.ToMaatResult;
|
||||
import com.nis.exceptions.MaatConvertException;
|
||||
import com.nis.util.ConfigServiceUtil;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.DictUtils;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.web.dao.configuration.AppMultiFeatureCfgDao;
|
||||
import com.nis.web.security.UserUtils;
|
||||
@@ -151,6 +143,31 @@ public class AppMultiFeatureCfgService extends BaseService {
|
||||
|
||||
}
|
||||
}
|
||||
// Session组件
|
||||
if(entity.getSessionList() != null) {
|
||||
for (AppComplexFeatureCfg cfg : entity.getSessionList()) {
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType","exprType","matchMethod","isHexbin","userRegion3","userRegion4","userRegion5"});
|
||||
/*cfg.setExprType(1);
|
||||
cfg.setMatchMethod(0);
|
||||
cfg.setIsHexbin(0);
|
||||
cfg.setIsCaseInsenstive(0);*/
|
||||
this.setSessionKeyword(cfg);
|
||||
if("c2sPayload".equals(cfg.getSessionC2sRadio())) {
|
||||
cfg.setIcmpCode(null);
|
||||
}else if("c2sFrequent".equals(cfg.getSessionC2sRadio())){
|
||||
cfg.setIcmpIdentifier(null);
|
||||
}
|
||||
|
||||
if("s2cPayload".equals(cfg.getSessionS2cRadio())) {
|
||||
cfg.setProtocol(null);
|
||||
}else if("s2cFrequent".equals(cfg.getSessionS2cRadio())){
|
||||
cfg.setIcmpType(null);
|
||||
}
|
||||
appMultiFeatureCfgDao.insertAppComplexFeatureCfg(cfg);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if(entity.getNumCfgList()!=null){
|
||||
for(AppTcpCfg cfg:entity.getNumCfgList()){
|
||||
if(cfg.getLowBoundary()!=null && cfg.getUpBoundary()!=null){
|
||||
@@ -160,6 +177,13 @@ public class AppMultiFeatureCfgService extends BaseService {
|
||||
|
||||
}
|
||||
}
|
||||
if(entity.getAppFeaturePropCfgList()!=null){
|
||||
for(AppFeatureProperties cfg:entity.getAppFeaturePropCfgList()){
|
||||
BeanUtils.copyProperties(entity, cfg);
|
||||
appMultiFeatureCfgDao.insertAppFeaturePropCfg(cfg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
@@ -176,6 +200,7 @@ public class AppMultiFeatureCfgService extends BaseService {
|
||||
appMultiFeatureCfgDao.deleteAppStringFeatureCfg(entity);
|
||||
appMultiFeatureCfgDao.deleteAppComplexFeatureCfg(entity);
|
||||
appMultiFeatureCfgDao.deleteAppTcpCfg(entity);//复用AppTcpCfg对象作为数值类对象
|
||||
appMultiFeatureCfgDao.deleteAppFeaturePropCfg(entity);//复用AppTcpCfg对象作为数值类对象
|
||||
entity.setCreateTime(new Date());
|
||||
entity.setCreatorId(entity.getCurrentUser().getId());
|
||||
if(entity.getIpPortList()!=null){
|
||||
@@ -235,6 +260,31 @@ public class AppMultiFeatureCfgService extends BaseService {
|
||||
}
|
||||
}
|
||||
}
|
||||
// Session组件
|
||||
if(entity.getSessionList() != null) {
|
||||
for (AppComplexFeatureCfg cfg : entity.getSessionList()) {
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType","exprType","matchMethod","isHexbin","userRegion3","userRegion4","userRegion5"});
|
||||
/*cfg.setExprType(1);
|
||||
cfg.setMatchMethod(0);
|
||||
cfg.setIsHexbin(0);
|
||||
cfg.setIsCaseInsenstive(0);*/
|
||||
this.setSessionKeyword(cfg);
|
||||
if("c2sPayload".equals(cfg.getSessionC2sRadio())) {
|
||||
cfg.setIcmpCode(null);
|
||||
}else if("c2sFrequent".equals(cfg.getSessionC2sRadio())){
|
||||
cfg.setIcmpIdentifier(null);
|
||||
}
|
||||
|
||||
if("s2cPayload".equals(cfg.getSessionS2cRadio())) {
|
||||
cfg.setProtocol(null);
|
||||
}else if("s2cFrequent".equals(cfg.getSessionS2cRadio())){
|
||||
cfg.setIcmpType(null);
|
||||
}
|
||||
appMultiFeatureCfgDao.insertAppComplexFeatureCfg(cfg);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if(entity.getNumCfgList()!=null){
|
||||
for(AppTcpCfg cfg:entity.getNumCfgList()){
|
||||
if(cfg.getLowBoundary()!=null && cfg.getUpBoundary()!=null){
|
||||
@@ -243,9 +293,82 @@ public class AppMultiFeatureCfgService extends BaseService {
|
||||
}
|
||||
}
|
||||
}
|
||||
//特征属性配置
|
||||
if(entity.getAppFeaturePropCfgList()!=null){
|
||||
for(AppFeatureProperties cfg:entity.getAppFeaturePropCfgList()){
|
||||
BeanUtils.copyProperties(entity, cfg);
|
||||
appMultiFeatureCfgDao.insertAppFeaturePropCfg(cfg);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public void setSessionKeyword(AppComplexFeatureCfg cfg) {
|
||||
// 处理与表达式字符串
|
||||
String keyword = "";
|
||||
if(!cfg.getFunctionId().equals(566)) {
|
||||
if(StringUtils.isNotBlank(cfg.getHeaderType())) { // 传输服务端端口
|
||||
keyword += "DPORT=" + cfg.getHeaderType() + Constants.USER_REGION_SPLIT + Constants.KEYWORD_EXPR;
|
||||
}
|
||||
if(StringUtils.isNotBlank(cfg.getVer())) { // 传输协议
|
||||
keyword += "TSP=" + cfg.getVer() + Constants.USER_REGION_SPLIT + Constants.KEYWORD_EXPR;
|
||||
}
|
||||
if(StringUtils.isNotBlank(cfg.getTos())) { // L7层协议
|
||||
if(cfg.getTos().equals("0")) {
|
||||
keyword += "PROTO_ID=0" + Constants.USER_REGION_SPLIT + "C2S_SEQ>=1" + Constants.USER_REGION_SPLIT + "S2C_SEQ>=1" + Constants.USER_REGION_SPLIT + Constants.KEYWORD_EXPR;
|
||||
}else {
|
||||
keyword += "PROTO_ID=" + cfg.getTos() + Constants.USER_REGION_SPLIT + Constants.KEYWORD_EXPR;
|
||||
}
|
||||
}
|
||||
/*if(StringUtils.isNotBlank(cfg.getIhl())) { // L7层协议未知
|
||||
keyword += "PROTO_ID=0" + Constants.USER_REGION_SPLIT + "C2S_SEQ>=1" + Constants.USER_REGION_SPLIT + "S2C_SEQ>=1" + Constants.KEYWORD_EXPR;
|
||||
}*/
|
||||
if(StringUtils.isNotBlank(cfg.getTotalLength())) { // 链接建立方式
|
||||
keyword += "CR=2" + Constants.USER_REGION_SPLIT + Constants.KEYWORD_EXPR;
|
||||
}
|
||||
if(StringUtils.isNotBlank(cfg.getFlags())) { // Tcp包发送特性
|
||||
keyword += "C2S_SEQ=C2S_P" + Constants.USER_REGION_SPLIT + Constants.KEYWORD_EXPR;
|
||||
}
|
||||
if(StringUtils.isNotBlank(cfg.getFragmentOffset())) { // 域名初筛标识
|
||||
keyword += "IPD_ID=" + cfg.getAppCode() + Constants.USER_REGION_SPLIT + Constants.KEYWORD_EXPR;
|
||||
}
|
||||
if(StringUtils.isNotBlank(cfg.getPayloadPacketDirection())) { // 清洗标识
|
||||
keyword += "CLI_APP_ID=" + cfg.getAppCode() + Constants.USER_REGION_SPLIT + Constants.KEYWORD_EXPR;
|
||||
}
|
||||
cfg.setUserRegion3(null);
|
||||
cfg.setUserRegion4(null);
|
||||
cfg.setUserRegion5(null);
|
||||
}else {
|
||||
if(StringUtils.isNotBlank(cfg.getUserRegion3())) {
|
||||
keyword += "SSL_RES" + Constants.USER_REGION_SPLIT + Constants.KEYWORD_EXPR;
|
||||
}
|
||||
if(StringUtils.isNotBlank(cfg.getUserRegion4())) {
|
||||
keyword += "SINGLE_CERT" + Constants.USER_REGION_SPLIT + Constants.KEYWORD_EXPR;
|
||||
}
|
||||
if(StringUtils.isNotBlank(cfg.getUserRegion5())) {
|
||||
keyword += "SELF_ISSUED" + Constants.USER_REGION_SPLIT + Constants.KEYWORD_EXPR;
|
||||
}
|
||||
cfg.setHeaderType(null);
|
||||
cfg.setVer(null);
|
||||
cfg.setTos(null);
|
||||
cfg.setIhl(null);
|
||||
cfg.setTotalLength(null);
|
||||
cfg.setFlags(null);
|
||||
cfg.setFragmentOffset(null);
|
||||
cfg.setProtocol(null);
|
||||
|
||||
}
|
||||
if(StringUtils.isNotBlank(keyword)) {
|
||||
keyword = keyword.substring(0,keyword.lastIndexOf(Constants.KEYWORD_EXPR));
|
||||
cfg.setCfgKeywords(keyword);
|
||||
}else {
|
||||
cfg.setCfgKeywords("session_default_keyword");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void setL3HeaderKeyword(AppComplexFeatureCfg cfg) {
|
||||
String keyword = "";
|
||||
if(cfg.getHeaderType().equals("L3_header_IP")){
|
||||
@@ -334,7 +457,8 @@ public class AppMultiFeatureCfgService extends BaseService {
|
||||
strRegionList=map.get("dstList");
|
||||
}
|
||||
}
|
||||
List<AppComplexFeatureCfg> complexList = appMultiFeatureCfgDao.getAppComplexFeatureCfg(entity.getCompileId(),entity.getFunctionId(),null);
|
||||
//List<AppComplexFeatureCfg> complexList = appMultiFeatureCfgDao.getAppComplexFeatureCfg(entity.getCompileId(),entity.getFunctionId(),null);
|
||||
List<AppComplexFeatureCfg> complexList = appMultiFeatureCfgDao.getAppComplexFeatureCfgNotRegionCode(entity.getCompileId(),entity.getFunctionId(),6);
|
||||
if(complexList!=null && complexList.size()>0){
|
||||
AppComplexFeatureCfg cfg = new AppComplexFeatureCfg();
|
||||
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||
@@ -381,6 +505,116 @@ public class AppMultiFeatureCfgService extends BaseService {
|
||||
|
||||
}
|
||||
}
|
||||
// session组件
|
||||
// TODO 确保查询出的appSessionList 只有session域配置信息
|
||||
List<AppComplexFeatureCfg> appSessionList = appMultiFeatureCfgDao.getAppComplexFeatureCfg(entity.getCompileId(), entity.getFunctionId(), 6);
|
||||
if(appSessionList != null && appSessionList.size() > 0) {
|
||||
AppComplexFeatureCfg featureCfg = new AppComplexFeatureCfg();
|
||||
BeanUtils.copyProperties(entity, featureCfg, new String[]{"cfgId"});
|
||||
featureCfg.setTableName(AppComplexFeatureCfg.getTablename());
|
||||
appMultiFeatureCfgDao.auditCfg(featureCfg);
|
||||
if(isAudit==1){
|
||||
List<AppTcpCfg> numCfgList = new ArrayList<AppTcpCfg>();
|
||||
List<AppComplexFeatureCfg> appSessionList2 = new ArrayList<AppComplexFeatureCfg>();
|
||||
for (AppComplexFeatureCfg cfg : appSessionList) {
|
||||
// 【1-8处理 】
|
||||
this.setSessionKeyword(cfg);
|
||||
cfg.setCfgType("APP_PAYLOAD");
|
||||
cfg.setDistrict("Attribute");
|
||||
|
||||
boolean flag = false;
|
||||
String keyword = "";
|
||||
// 非APP_SSL
|
||||
if(!cfg.getFunctionId().equals(566)) {
|
||||
AppComplexFeatureCfg cfg2 = new AppComplexFeatureCfg();
|
||||
BeanUtils.copyProperties(cfg, cfg2, new String[]{"cfgId"});
|
||||
|
||||
if(!StringUtil.isBlank(cfg2.getIcmpIdentifier())) { // C2S
|
||||
keyword += cfg2.getIcmpIdentifier().replace(";", ";"+Constants.KEYWORD_EXPR) + Constants.USER_REGION_SPLIT + Constants.KEYWORD_EXPR;
|
||||
flag = true;
|
||||
}
|
||||
if(!StringUtil.isBlank(cfg2.getIcmpCode())) {
|
||||
keyword += cfg2.getIcmpCode().replace(";", ";"+Constants.KEYWORD_EXPR) + Constants.USER_REGION_SPLIT + Constants.KEYWORD_EXPR;
|
||||
flag = true;
|
||||
}
|
||||
if(flag) {
|
||||
cfg2.setCfgType("APP_PAYLOAD");
|
||||
cfg2.setDistrict("C2S_session_size");
|
||||
cfg2.setCfgKeywords(keyword.substring(0,keyword.lastIndexOf(Constants.KEYWORD_EXPR)));
|
||||
appSessionList2.add(cfg2);
|
||||
}
|
||||
|
||||
AppComplexFeatureCfg cfg3 = new AppComplexFeatureCfg();
|
||||
BeanUtils.copyProperties(cfg, cfg3, new String[]{"cfgId"});
|
||||
flag = false;
|
||||
keyword = "";
|
||||
|
||||
if(!StringUtil.isBlank(cfg3.getIcmpType())) { // S2C
|
||||
keyword += cfg3.getIcmpType().replace(";", ";"+Constants.KEYWORD_EXPR) + Constants.USER_REGION_SPLIT + Constants.KEYWORD_EXPR;
|
||||
flag = true;
|
||||
}
|
||||
if(!StringUtil.isBlank(cfg3.getProtocol())) {
|
||||
keyword += cfg3.getProtocol().replace(";", ";"+Constants.KEYWORD_EXPR) + Constants.USER_REGION_SPLIT + Constants.KEYWORD_EXPR;
|
||||
flag = true;
|
||||
}
|
||||
if(flag) {
|
||||
cfg3.setCfgType("APP_PAYLOAD");
|
||||
cfg3.setDistrict("S2C_session_size");
|
||||
cfg3.setCfgKeywords(keyword.substring(0,keyword.lastIndexOf(Constants.KEYWORD_EXPR)));
|
||||
appSessionList2.add(cfg3);
|
||||
}
|
||||
|
||||
// 数值域
|
||||
if(cfg.getPayloadOffset() != null && cfg.getPayloadSize() != null) {
|
||||
AppTcpCfg numCfg = new AppTcpCfg();
|
||||
numCfg.setCfgType("APP_PAYLOAD_SIZE");
|
||||
numCfg.setLowBoundary(cfg.getPayloadOffset());
|
||||
numCfg.setUpBoundary(cfg.getPayloadSize());
|
||||
numCfgList.add(numCfg);
|
||||
}
|
||||
|
||||
}else {
|
||||
if(!StringUtil.isBlank(cfg.getUserRegion3())) {
|
||||
keyword += "SSL_RES;" + Constants.KEYWORD_EXPR;
|
||||
flag = true;
|
||||
}
|
||||
if(!StringUtil.isBlank(cfg.getUserRegion4())) {
|
||||
keyword += "SINGLE_CERT;" + Constants.KEYWORD_EXPR;
|
||||
flag = true;
|
||||
}
|
||||
if(!StringUtil.isBlank(cfg.getUserRegion5())) {
|
||||
keyword += "SELF_ISSUED;" + Constants.KEYWORD_EXPR;
|
||||
flag = true;
|
||||
}
|
||||
if(flag) {
|
||||
keyword = keyword.substring(0,keyword.lastIndexOf(Constants.KEYWORD_EXPR));
|
||||
cfg.setCfgKeywords(keyword);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(appSessionList.get(0).getCfgKeywords().equals("session_default_keyword")) {
|
||||
appSessionList.remove(0);
|
||||
}
|
||||
if(appSessionList2.size() > 0) {
|
||||
appSessionList.addAll(appSessionList2);
|
||||
}
|
||||
|
||||
Map<String,List> map = cfgConvert(strRegionList,appSessionList,2,entity,groupRelationList);
|
||||
groupRelationList=map.get("groupList");
|
||||
strRegionList=map.get("dstList");
|
||||
|
||||
if(numCfgList.size() > 0) {
|
||||
Map<String,List> map2 = cfgConvert(numRegionList,numCfgList,4,entity,groupRelationList);
|
||||
groupRelationList=map2.get("groupList");
|
||||
numRegionList=map2.get("dstList");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
List<AppTcpCfg> numCfgList = appMultiFeatureCfgDao.getAppTcpCfg(entity.getCompileId(),entity.getFunctionId(),null);
|
||||
if(numCfgList!=null && numCfgList.size()>0){
|
||||
AppTcpCfg cfg = new AppTcpCfg();
|
||||
@@ -393,6 +627,42 @@ public class AppMultiFeatureCfgService extends BaseService {
|
||||
numRegionList=map.get("dstList");
|
||||
}
|
||||
}
|
||||
List<AppFeatureProperties> appFeaturePropCfgList = this.getAppFeaturePropCfg(entity.getCompileId(), entity.getFunctionId(), null);
|
||||
String featureUserRegion = "";
|
||||
if(!StringUtil.isEmpty(appFeaturePropCfgList)){
|
||||
AppFeatureProperties cfg = appFeaturePropCfgList.get(0);
|
||||
// 处理下发userRegion
|
||||
if(!StringUtil.isEmpty(cfg.getDropOpt())){
|
||||
featureUserRegion += "DKC=10;DKS="+cfg.getDropOpt()+";";
|
||||
}
|
||||
if(!StringUtil.isEmpty(cfg.getLoopOpt())){
|
||||
featureUserRegion += "DKC=4;DKS="+cfg.getLoopOpt()+";";
|
||||
}
|
||||
if(!StringUtil.isEmpty(cfg.getExtendScanPktNum())){
|
||||
featureUserRegion += "DKC=7;DKS="+cfg.getExtendScanPktNum()+";";
|
||||
}
|
||||
if(!StringUtil.isEmpty(cfg.getLongStreamLockTime())){
|
||||
featureUserRegion += "DKC=16;DKS="+cfg.getLongStreamLockTime()+";";
|
||||
}
|
||||
if(!StringUtil.isEmpty(cfg.getCorrelationValidTime())){
|
||||
featureUserRegion += "DKC=3;DKS="+cfg.getCorrelationValidTime()+";";
|
||||
}
|
||||
|
||||
if(!StringUtil.isEmpty(cfg.getWeakFeature())){
|
||||
featureUserRegion += cfg.getWeakFeature();
|
||||
}
|
||||
if(!StringUtil.isEmpty(cfg.getWhitelistFeature())){
|
||||
featureUserRegion += cfg.getWhitelistFeature();
|
||||
}
|
||||
if(!StringUtil.isEmpty(cfg.getCorrelationBlockAfter())){
|
||||
featureUserRegion += cfg.getCorrelationBlockAfter();
|
||||
}
|
||||
AppFeatureProperties appFeatureProp = new AppFeatureProperties();
|
||||
BeanUtils.copyProperties(entity, appFeatureProp, new String[] { "cfgId" });
|
||||
appFeatureProp.setTableName(AppFeatureProperties.getTablename());
|
||||
appMultiFeatureCfgDao.auditCfg(appFeatureProp);
|
||||
}
|
||||
|
||||
// 构造提交综合服务参数格式,一条配置提交一次综合服务
|
||||
if (isAudit == 1) {
|
||||
maatCfg.initDefaultValue();
|
||||
@@ -415,7 +685,10 @@ public class AppMultiFeatureCfgService extends BaseService {
|
||||
}else{
|
||||
maatCfg.setUserRegion(entity.getUserRegion1());
|
||||
}
|
||||
|
||||
if(!StringUtil.isEmpty(featureUserRegion)){
|
||||
maatCfg.setUserRegion(maatCfg.getUserRegion() + ";" +featureUserRegion);
|
||||
}
|
||||
|
||||
configCompileList.add(maatCfg);
|
||||
maatBean.setConfigCompileList(configCompileList);
|
||||
maatBean.setAuditTime(entity.getAuditTime());
|
||||
@@ -487,9 +760,21 @@ public class AppMultiFeatureCfgService extends BaseService {
|
||||
cfg.setTableName(AppTcpCfg.getTablename());
|
||||
appMultiFeatureCfgDao.updateCfgValid(cfg);
|
||||
}
|
||||
//修改特征属性配置表状态
|
||||
if (!StringUtil.isEmpty(entity.getAppFeaturePropCfgList())) {
|
||||
AppFeatureProperties cfg = new AppFeatureProperties();
|
||||
BeanUtils.copyProperties(entity, cfg, new String[] { "cfgId" });
|
||||
cfg.setTableName(AppFeatureProperties.getTablename());
|
||||
appMultiFeatureCfgDao.updateCfgValid(cfg);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
//session
|
||||
public List<AppComplexFeatureCfg> getAppComplexFeatureCfgNotRegionCode(Integer compileId,Integer functionId,Integer cfgRegionCode){
|
||||
return appMultiFeatureCfgDao.getAppComplexFeatureCfgNotRegionCode(compileId,functionId,cfgRegionCode);
|
||||
}
|
||||
|
||||
//字符串类特征配置列表
|
||||
public List<AppStringFeatureCfg> getAppStringFeatureCfg(Integer compileId,Integer functionId,Integer cfgRegionCode){
|
||||
@@ -507,7 +792,11 @@ public class AppMultiFeatureCfgService extends BaseService {
|
||||
public List<AppTcpCfg> getAppTcpCfg(Integer compileId,Integer functionId,Integer cfgRegionCode){
|
||||
return appMultiFeatureCfgDao.getAppTcpCfg(compileId,functionId,cfgRegionCode);
|
||||
}
|
||||
|
||||
//特征属性配置列表
|
||||
public List<AppFeatureProperties> getAppFeaturePropCfg(Integer compileId,Integer functionId,Integer cfgRegionCode){
|
||||
return appMultiFeatureCfgDao.getAppFeaturePropCfg(compileId,functionId,cfgRegionCode);
|
||||
}
|
||||
|
||||
public Map<String, List> exportFeature(AppFeatureIndex entity){
|
||||
Map<String, List> dataMap=new HashMap<String, List>();
|
||||
List<AppIpCfg> ipRangeList = appMultiFeatureCfgDao.getAppIpRangeCfg(entity.getCompileId(),entity.getFunctionId());
|
||||
|
||||
@@ -577,7 +577,6 @@ public class DomainService extends CrudService<DomainDao,HttpUrlCfg> {
|
||||
|
||||
//查询子配置并修改审核状态
|
||||
entity = this.getDomainCfg(entity.getCfgId(),entity.getCompileId());
|
||||
|
||||
if(entity.getHttpUrlList()!=null && entity.getHttpUrlList().size()>0){
|
||||
HttpUrlCfg cfg = new HttpUrlCfg();
|
||||
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||
@@ -616,6 +615,7 @@ public class DomainService extends CrudService<DomainDao,HttpUrlCfg> {
|
||||
|
||||
//构造提交综合服务参数格式,一条配置提交一次综合服务
|
||||
if(isAudit==1){
|
||||
auditStrGroupCfg(groupRelationList, entity); // 是否添加公共组
|
||||
maatCfg.initDefaultValue();
|
||||
BeanUtils.copyProperties(entity, maatCfg);
|
||||
maatCfg.setAction(entity.getAction());
|
||||
@@ -643,6 +643,7 @@ public class DomainService extends CrudService<DomainDao,HttpUrlCfg> {
|
||||
logger.info("domain配置下发响应信息:"+result.getMsg());
|
||||
|
||||
}else if(isAudit==3){
|
||||
addKeepGroupList(maatCfg, entity);// 取消审核保留公共组
|
||||
maatCfg.setCompileId(entity.getCompileId());
|
||||
maatCfg.setServiceId(entity.getServiceId());
|
||||
maatCfg.setIsValid(0);//无效
|
||||
|
||||
@@ -1195,6 +1195,7 @@ public class WebsiteCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo> {
|
||||
|
||||
//构造提交综合服务参数格式,一条配置提交一次综合服务
|
||||
if(isAudit==1){
|
||||
auditStrGroupCfg(groupRelationList, entity); // 是否添加公共组
|
||||
maatCfg.initDefaultValue();
|
||||
BeanUtils.copyProperties(entity, maatCfg);
|
||||
maatCfg.setAction(entity.getAction());
|
||||
@@ -1226,6 +1227,7 @@ public class WebsiteCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo> {
|
||||
logger.info("dns配置下发响应信息:"+result.getMsg());
|
||||
|
||||
}else if(isAudit==3){
|
||||
addKeepGroupList(maatCfg, entity);// 取消审核保留公共组
|
||||
maatCfg.setCompileId(entity.getCompileId());
|
||||
maatCfg.setServiceId(entity.getServiceId());
|
||||
maatCfg.setIsValid(0);//无效
|
||||
|
||||
@@ -1498,10 +1498,25 @@ Is_schduler=Scheduler
|
||||
v4_num=IPv4 Number
|
||||
v6_num=IPv6 Number
|
||||
is_schduler=Scheduler
|
||||
dnsGroup=DNS Group
|
||||
dnsGroup=DNS Keyword Group
|
||||
urlGroup=Http URL Group
|
||||
#add common group
|
||||
url_group_manage=URL Group Manage
|
||||
url_group_configuration=URL Group Config
|
||||
dns_keyword_group_manage=DNS Group Manage
|
||||
dns_keyword_group_configuration=DNS Group Config
|
||||
dns_keyword_group_manage=DNS Keyword Group Manage
|
||||
dns_keyword_group_configuration=DNS Keyword Group Config
|
||||
current_hour_no_data=There is no data this hour.
|
||||
#app
|
||||
app_ip_correlation=APP Correlation IP
|
||||
APP_IP_CORRELATION=Correlation IP
|
||||
APP_FEATURE_PROPERTIES=Feature Properties
|
||||
drop_option=Drop Keep Time
|
||||
loop_option=Loop Keep Time
|
||||
weak_feature=Weak Feature
|
||||
whitelist_feature=Whitelist Feature
|
||||
extend_scan_pktNum=Extend Scan PktNum
|
||||
long_stream_lock_time=Long Stream Lock Time
|
||||
correlation_valid_time=Correlation Valid Time
|
||||
correlation_block_after=Block After Correlated
|
||||
|
||||
common_group=Common Group
|
||||
|
||||
@@ -1500,10 +1500,25 @@ v4_num=IPv4 Number
|
||||
v6_num=IPv6 Number
|
||||
on=On
|
||||
is_schduler=Scheduler
|
||||
dnsGroup=DNS Group
|
||||
urlGroup=Http URL Group
|
||||
dnsGroup=\u0413\u0440\u0443\u043F\u043F\u0430 DNS \u041A\u043B\u044E\u0447. \u0421\u043B\u043E\u0432\u0430\u0445
|
||||
urlGroup=URL \u0413\u0440\u0443\u043F\u043F\u0430
|
||||
#add common group
|
||||
url_group_manage=URL Group Manage
|
||||
url_group_configuration=URL Group Config
|
||||
dns_keyword_group_manage=DNS Group Manage
|
||||
dns_keyword_group_configuration=DNS Group Config
|
||||
url_group_manage=\u0423\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435 URL \u0413\u0440\u0443\u043F\u043F\u043E\u0439
|
||||
url_group_configuration=\u0413\u0440\u0443\u043F\u043F\u0430 \u041A\u043E\u043D\u0444\u0438\u0433. URL
|
||||
dns_keyword_group_manage=\u0423\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435 \u0413\u0440\u0443\u043F\u043F\u043E\u0439 DNS \u041A\u043B\u044E\u0447. \u0421\u043B\u043E\u0432\u0430\u0445
|
||||
dns_keyword_group_configuration=\u0413\u0440\u0443\u043F\u043F\u0430 \u041A\u043E\u043D\u0444\u0438\u0433. DNS \u041A\u043B\u044E\u0447. \u0421\u043B\u043E\u0432\u0430\u0445
|
||||
current_hour_no_data=\u041D\u0435\u0442 \u0434\u0430\u043D\u043D\u044B\u0445 \u0437\u0430 \u044D\u0442\u043E\u0442 \u0447\u0430\u0441.
|
||||
#app
|
||||
app_ip_correlation=\u041A\u043E\u0440\u0440\u0435\u043B\u044F\u0446\u0438\u044F IP \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u044F
|
||||
APP_IP_CORRELATION=\u041A\u043E\u0440\u0440\u0435\u043B\u044F\u0446\u0438\u044F IP \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u044F
|
||||
APP_FEATURE_PROPERTIES=Feature Properties
|
||||
drop_option=Drop Keep Time
|
||||
loop_option=Loop Keep Time
|
||||
weak_feature=Weak Feature
|
||||
whitelist_feature=Whitelist Feature
|
||||
extend_scan_pktNum=Extend Scan PktNum
|
||||
long_stream_lock_time=Long Stream Lock Time
|
||||
correlation_valid_time=Correlation Valid Time
|
||||
correlation_block_after=Block After Correlated
|
||||
|
||||
common_group=\u041E\u0431\u0449\u0430\u044F \u0413\u0440\u0443\u043F\u043F\u0430
|
||||
|
||||
@@ -1494,10 +1494,25 @@ everyMonth=\u6bcf\u6708
|
||||
validate_error=\u9a8c\u8bc1\u65f6\u53d1\u751f\u610f\u5916\u9519\u8bef
|
||||
v4_num=IPv4 Number
|
||||
v6_num=IPv6 Number
|
||||
dnsGroup=DNS \u7ec4
|
||||
dnsGroup=DNS \u5173\u952E\u5B57\u5206\u7EC4
|
||||
urlGroup=Http URL \u7ec4
|
||||
#\u65b0\u589e\u516c\u5171\u5206\u7ec4
|
||||
url_group_manage=URL\u5206\u7ec4\u7ba1\u7406
|
||||
url_group_configuration=URL\u5206\u7ec4\u914d\u7f6e
|
||||
dns_keyword_group_manage=DNS\u5173\u952e\u5b57\u5206\u7ec4\u7ba1\u7406
|
||||
dns_keyword_group_configuration=DNS\u5173\u952e\u5b57\u5206\u7ec4\u914d\u7f6e
|
||||
dns_keyword_group_configuration=DNS\u5173\u952e\u5b57\u5206\u7ec4\u914d\u7f6e
|
||||
current_hour_no_data=\u672C\u5C0F\u65F6\u65E0\u6570\u636E
|
||||
#app
|
||||
app_ip_correlation=APP\u5173\u8054\u7279\u5F81IP\u914D\u7F6E
|
||||
APP_IP_CORRELATION=\u5173\u8054\u7279\u5F81IP
|
||||
APP_FEATURE_PROPERTIES=\u7279\u5F81\u7EC4\u4EF6
|
||||
drop_option=\u4E22\u5F03\u6301\u7EED\u65F6\u95F4
|
||||
loop_option=\u56DE\u6D41\u6301\u7EED\u65F6\u95F4
|
||||
weak_feature=\u5F31\u7279\u5F81
|
||||
whitelist_feature=\u767D\u540D\u5355
|
||||
extend_scan_pktNum=\u626B\u63CF\u5305\u6570\u6269\u5C55
|
||||
long_stream_lock_time=\u957F\u6D41\u9501\u5B9A\u65F6\u95F4
|
||||
correlation_valid_time=\u5173\u8054\u540E\u63A7\u7BA1\u65F6\u95F4
|
||||
correlation_block_after=\u5173\u8054\u540E\u7BA1\u63A7
|
||||
|
||||
common_group=\u516C\u5171\u5206\u7EC4
|
||||
|
||||
@@ -270,7 +270,7 @@ mmLogoDetectionLog=v1/mmLogoDetectionLogs
|
||||
mmFaceRecognizationLog=v1/mmFaceRecognizationLogs
|
||||
########################################
|
||||
#\u5927\u5c4f\u56fe\u8868\u5c55\u793a\u670d\u52a1\u63a5\u53e3
|
||||
dashboardUrl=http://192.168.10.204:9999/galaxy-service/service/log/
|
||||
dashboardUrl=http://192.168.11.64:8080/galaxy-service/service/log/
|
||||
trafficIpActive=v1/trafficIpActive
|
||||
trafficProtocol=v1/trafficProtocol
|
||||
trafficApp=v1/trafficApp
|
||||
@@ -620,4 +620,9 @@ ntc_asn_number=NTC_ASN_NUMBER
|
||||
addRegionToCommonGroup=v1/addRegionToCommonGroup
|
||||
updateRegionToCommonGroup=v1/updateCommonGroupRegion
|
||||
deleteRegionToCommonGroup=v1/delCommonGroupRegion
|
||||
#\u6d41\u91cf\u7edf\u8ba1app\u8be6\u60c5\u8d8b\u52bf\u56feGbps.pps\u63a5\u53e3
|
||||
trafficAppPpsTrend=v1/trafficAppPpsTrend
|
||||
trafficAppBpsTrend=v1/trafficAppBpsTrend
|
||||
#vpn cgi error info
|
||||
cgiError=cannot connect to vpnserver,Connection to the server has failed,Specified object can not be found,Too many users,User already exists,Too many created users,The destination server is not a VPN server,The connection has been interrupted,
|
||||
|
||||
|
||||
45
src/main/resources/sql/20190215/add_app_correlation_ip.sql
Normal file
45
src/main/resources/sql/20190215/add_app_correlation_ip.sql
Normal file
@@ -0,0 +1,45 @@
|
||||
--------------App 关联特征IP配置----start--------20190201-------------------------------------
|
||||
##菜单
|
||||
INSERT INTO `sys_menu` (`parent_id`, `parent_ids`, `code`, `name`, `sort`, `href`, `target`, `icon`, `is_show`, `permission`, `create_by`, `create_date`, `update_by`, `update_date`, `remarks`, `del_flag`, `menu_bg`, `quick_action`, `is_top`, `function_id`) VALUES ('735', '0,1,86,717,735,', 'app_ip_correlation', 'APP关联特征IP配置', '60', '/app/feature/multiFeatureCfgList', '', '', '1', 'app_correlation_ip_monit:config', '1', '2019-01-29 17:07:57', '1', '2019-01-29 17:22:40', '', '1', NULL, '0', '0', '568');
|
||||
INSERT INTO `sys_menu` (`parent_id`, `parent_ids`, `code`, `name`, `sort`, `href`, `target`, `icon`, `is_show`, `permission`, `create_by`, `create_date`, `update_by`, `update_date`, `remarks`, `del_flag`, `menu_bg`, `quick_action`, `is_top`, `function_id`) VALUES ('751', '0,1,150,750,751,', 'app_ip_correlation', 'APP关联特征IP配置', '60', '/app/feature/multiFeatureCfgList', '', '', '1', 'app_correlation_ip_monit:confirm', '1', '2019-01-31 17:14:47', '1', '2019-01-31 17:14:47', '', '1', NULL, '0', '0', '568');
|
||||
INSERT INTO `sys_menu` (`parent_id`, `parent_ids`, `code`, `name`, `sort`, `href`, `target`, `icon`, `is_show`, `permission`, `create_by`, `create_date`, `update_by`, `update_date`, `remarks`, `del_flag`, `menu_bg`, `quick_action`, `is_top`, `function_id`) VALUES ('866', '0,1,151,865,866,', 'app_ip_correlation', 'APP关联特征IP配置', '60', '/app/feature/multiFeatureCfgList', '', '', '1', 'app_correlation_ip_monit:audit', '1', '2019-01-31 17:15:56', '1', '2019-01-31 17:15:56', '', '1', NULL, '0', '0', '568');
|
||||
|
||||
##添加IP域和特征属性,其中特征属性的region_type=9 config_expr_type控制组件: 1 无控管属性,2 无特征属性,
|
||||
INSERT INTO `function_region_dict` (`function_id`, `config_district`, `config_region_code`, `config_region_value`, `config_desc`, `is_valid`, `is_maat`, `region_type`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `config_service_type`, `config_expr_type`, `config_match_method`, `config_ip_type`, `config_hex`, `config_multi_keywords`, `config_ip_pattern`, `config_port_pattern`, `config_direction`, `config_protocol`, `config_ip_port_show`, `config_region_sort`, `is_import`) VALUES ('568', '', '1', 'APP_IP_CORRELATION', 'APP IP CORRELATION', '1', '1', '1', NULL, '2019-01-31 15:48:13', NULL, NULL, '', '', '', '4,6', '', '', '1,2,3', '1,2', '0', '0,6,17', '1,2,3,4', '1', '0');
|
||||
INSERT INTO `function_region_dict` (`function_id`, `config_district`, `config_region_code`, `config_region_value`, `config_desc`, `is_valid`, `is_maat`, `region_type`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `config_service_type`, `config_expr_type`, `config_match_method`, `config_ip_type`, `config_hex`, `config_multi_keywords`, `config_ip_pattern`, `config_port_pattern`, `config_direction`, `config_protocol`, `config_ip_port_show`, `config_region_sort`, `is_import`) VALUES ('568', '', '7', 'APP_FEATURE_PROPERTIES', 'APP特征属性组件', '1', '1', '9', NULL, '2019-02-01 10:47:28', NULL, '2019-02-01 10:47:32', '', '0', '', '', '', '', NULL, NULL, NULL, NULL, NULL, '2', '0');
|
||||
##添加service和action 暂定service=1031,action=1;
|
||||
INSERT INTO `function_service_dict` (`function_id`, `protocol_id`, `action`, `action_code`, `service_id`, `service_name`, `service_desc`, `is_valid`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `region_code`, `is_import`, `sort`, `config_do_log`) VALUES ('568', '0', '1', 'monit', '1031', 'app_correlation_ip_monit', '', '1', NULL, '0000-00-00 00:00:00', NULL, '0000-00-00 00:00:00', '1', '1', '1', NULL);
|
||||
|
||||
|
||||
##添加App特征组件配置表
|
||||
DROP TABLE IF EXISTS `app_feature_prop_cfg`;
|
||||
CREATE TABLE `app_feature_prop_cfg` (
|
||||
`cfg_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`drop_opt` int(11) COMMENT 'DROP 持续时间(秒):0-7200',
|
||||
`loop_opt` int(11) COMMENT 'LOOP 持续时间(秒):0-7200',
|
||||
`weak_feature` varchar(64) COMMENT '特征强弱属性',
|
||||
`whitelist_feature` varchar(64) COMMENT '白名单属性',
|
||||
`extend_scan_pkt_num` int(11) COMMENT '扫描包数',
|
||||
`correlation_valid_time` int(11) COMMENT '多流汇聚关联时间',
|
||||
`correlation_block_after` varchar(64) COMMENT '多流汇聚关联后控管',
|
||||
`long_stream_lock_time` int(11) COMMENT '长流锁定时间',
|
||||
`compile_id` int(11) NOT NULL,
|
||||
`function_id` int(11) NOT NULL,
|
||||
`service_id` int(11) NOT NULL COMMENT '业务id',
|
||||
`request_id` int(11) NOT NULL COMMENT '来自request_info.id',
|
||||
`is_valid` int(11) NOT NULL,
|
||||
`is_audit` int(11) NOT NULL,
|
||||
`creator_id` int(11) NOT NULL COMMENT 'sys_user.id',
|
||||
`create_time` datetime NOT NULL,
|
||||
`editor_id` int(11) DEFAULT NULL COMMENT '来自sys_user.id',
|
||||
`edit_time` datetime DEFAULT NULL,
|
||||
`auditor_id` int(11) DEFAULT NULL COMMENT '来自sys_user.id',
|
||||
`audit_time` datetime DEFAULT NULL,
|
||||
`user_region1` varchar(1024) DEFAULT NULL COMMENT '预留自定义域1',
|
||||
`user_region2` varchar(1024) DEFAULT NULL COMMENT '预留自定义域2',
|
||||
`user_region3` varchar(1024) DEFAULT NULL COMMENT '预留自定义域3',
|
||||
`user_region4` varchar(1024) DEFAULT NULL COMMENT '预留自定义域4',
|
||||
`user_region5` varchar(1024) DEFAULT NULL COMMENT '预留自定义域5',
|
||||
PRIMARY KEY (`cfg_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4;
|
||||
--------------App 关联特征IP配置----end------------------------------------------------------
|
||||
@@ -0,0 +1,5 @@
|
||||
--添加dns和url公共组的function_region和function_service字典
|
||||
INSERT INTO `function_region_dict` ( `function_id`, `config_district`, `config_region_code`, `config_region_value`, `config_desc`, `is_valid`, `is_maat`, `region_type`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `config_service_type`, `config_expr_type`, `config_match_method`, `config_ip_type`, `config_hex`, `config_multi_keywords`, `config_ip_pattern`, `config_port_pattern`, `config_direction`, `config_protocol`, `config_ip_port_show`, `config_region_sort`, `is_import`) VALUES ('409', 'QNAME', '2', 'NTC_DNS_REGION', 'DNS域名配置', '1', '1', '3', NULL, '0000-00-00 00:00:00', NULL, '0000-00-00 00:00:00', '', '0', '0,1,2,3', '', '0,1,2', '0', '', '', '', '', '', '1', '1');
|
||||
INSERT INTO `function_region_dict` ( `function_id`, `config_district`, `config_region_code`, `config_region_value`, `config_desc`, `is_valid`, `is_maat`, `region_type`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `config_service_type`, `config_expr_type`, `config_match_method`, `config_ip_type`, `config_hex`, `config_multi_keywords`, `config_ip_pattern`, `config_port_pattern`, `config_direction`, `config_protocol`, `config_ip_port_show`, `config_region_sort`, `is_import`) VALUES ( '111', '', '2', 'NTC_URL_REGION', 'URL公共组域配置', '1', '1', '2', NULL, '0000-00-00 00:00:00', NULL, '0000-00-00 00:00:00', '', '0,1', '0,1,2,3', '', '0', '1', NULL, NULL, NULL, NULL, NULL, '2', '1');
|
||||
INSERT INTO `function_service_dict` ( `function_id`, `protocol_id`, `action`, `action_code`, `service_id`, `service_name`, `service_desc`, `is_valid`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `region_code`, `is_import`, `sort`, `config_do_log`) VALUES ( '409', '0', '0', '', '-2', 'NTC_DNS_REGION', NULL, '1', '1', '2019-02-15 16:48:56', NULL, NULL, '1', '1', '1', NULL);
|
||||
INSERT INTO `function_service_dict` ( `function_id`, `protocol_id`, `action`, `action_code`, `service_id`, `service_name`, `service_desc`, `is_valid`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `region_code`, `is_import`, `sort`, `config_do_log`) VALUES ( '111', '0', '0', '', '-1', 'NTC_URL_REGION', NULL, '1', '1', '2019-02-15 16:49:49', NULL, NULL, '1', '1', '1', NULL);
|
||||
15
src/main/resources/sql/20190215/add_function_region_dict.sql
Normal file
15
src/main/resources/sql/20190215/add_function_region_dict.sql
Normal file
@@ -0,0 +1,15 @@
|
||||
-- APP Payload、HTTP、SSL增加session组件
|
||||
INSERT INTO `function_region_dict` (`function_id`, `config_district`, `config_region_code`, `config_region_value`, `config_desc`, `is_valid`, `is_maat`, `region_type`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `config_service_type`, `config_expr_type`, `config_match_method`, `config_ip_type`, `config_hex`, `config_multi_keywords`, `config_ip_pattern`, `config_port_pattern`, `config_direction`, `config_protocol`, `config_ip_port_show`, `config_region_sort`, `is_import`) VALUES ('563', 'Attribute', '6', 'APP_SESSION', 'APP SESSION组件', '1', '1', '8', NULL, '2019-01-22 13:57:49', NULL, NULL, '', '1', '0', '', '0', '', NULL, NULL, NULL, NULL, NULL, '7', '0');
|
||||
INSERT INTO `function_region_dict` (`function_id`, `config_district`, `config_region_code`, `config_region_value`, `config_desc`, `is_valid`, `is_maat`, `region_type`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `config_service_type`, `config_expr_type`, `config_match_method`, `config_ip_type`, `config_hex`, `config_multi_keywords`, `config_ip_pattern`, `config_port_pattern`, `config_direction`, `config_protocol`, `config_ip_port_show`, `config_region_sort`, `is_import`) VALUES ('566', 'Attribute', '6', 'APP_SESSION', 'APP SESSION组件', '1', '1', '8', NULL, '2019-01-24 09:33:13', NULL, NULL, '', '1', '0', '', '0', '', NULL, NULL, NULL, NULL, NULL, '7', '0');
|
||||
INSERT INTO `function_region_dict` (`function_id`, `config_district`, `config_region_code`, `config_region_value`, `config_desc`, `is_valid`, `is_maat`, `region_type`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `config_service_type`, `config_expr_type`, `config_match_method`, `config_ip_type`, `config_hex`, `config_multi_keywords`, `config_ip_pattern`, `config_port_pattern`, `config_direction`, `config_protocol`, `config_ip_port_show`, `config_region_sort`, `is_import`) VALUES ('565', 'Attribute', '6', 'APP_SESSION', 'APP SESSION组件', '1', '1', '8', NULL, '2019-01-24 09:41:17', NULL, NULL, '', '1', '0', '', '0', '', NULL, NULL, NULL, NULL, NULL, '7', '0');
|
||||
|
||||
-- 修改字段注释
|
||||
ALTER TABLE `function_region_dict` MODIFY COLUMN `region_type` INT(1) NOT NULL COMMENT '1IP类,2字符串类,3增强字符串类,4数值类,5摘要类,6回调类,7 ASN,8 APP特征Session组件';
|
||||
|
||||
|
||||
-- APP Payload/http/ssl/domain/ip 增加控管参数组件、特征属性组件
|
||||
INSERT INTO `function_region_dict` (`function_id`, `config_district`, `config_region_code`, `config_region_value`, `config_desc`, `is_valid`, `is_maat`, `region_type`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `config_service_type`, `config_expr_type`, `config_match_method`, `config_ip_type`, `config_hex`, `config_multi_keywords`, `config_ip_pattern`, `config_port_pattern`, `config_direction`, `config_protocol`, `config_ip_port_show`, `config_region_sort`, `is_import`) VALUES ('563', '', '7', 'APP_FEATURE_PROPERTIES', 'APP特征属性组件', '1', '1', '9', NULL, '2019-02-01 10:47:28', NULL, '2019-02-01 10:47:32', '', '0', '', '', '', '', NULL, NULL, NULL, NULL, NULL, '8', '0');
|
||||
INSERT INTO `function_region_dict` (`function_id`, `config_district`, `config_region_code`, `config_region_value`, `config_desc`, `is_valid`, `is_maat`, `region_type`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `config_service_type`, `config_expr_type`, `config_match_method`, `config_ip_type`, `config_hex`, `config_multi_keywords`, `config_ip_pattern`, `config_port_pattern`, `config_direction`, `config_protocol`, `config_ip_port_show`, `config_region_sort`, `is_import`) VALUES ('565', '', '7', 'APP_FEATURE_PROPERTIES', 'APP特征属性组件', '1', '1', '9', NULL, '2019-02-01 10:47:28', NULL, '2019-02-01 10:47:32', '', '0', '', '', '', '', NULL, NULL, NULL, NULL, NULL, '8', '0');
|
||||
INSERT INTO `function_region_dict` (`function_id`, `config_district`, `config_region_code`, `config_region_value`, `config_desc`, `is_valid`, `is_maat`, `region_type`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `config_service_type`, `config_expr_type`, `config_match_method`, `config_ip_type`, `config_hex`, `config_multi_keywords`, `config_ip_pattern`, `config_port_pattern`, `config_direction`, `config_protocol`, `config_ip_port_show`, `config_region_sort`, `is_import`) VALUES ('566', '', '7', 'APP_FEATURE_PROPERTIES', 'APP特征属性组件', '1', '1', '9', NULL, '2019-02-01 10:47:28', NULL, '2019-02-01 10:47:32', '', '0', '', '', '', '', NULL, NULL, NULL, NULL, NULL, '8', '0');
|
||||
INSERT INTO `function_region_dict` (`function_id`, `config_district`, `config_region_code`, `config_region_value`, `config_desc`, `is_valid`, `is_maat`, `region_type`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `config_service_type`, `config_expr_type`, `config_match_method`, `config_ip_type`, `config_hex`, `config_multi_keywords`, `config_ip_pattern`, `config_port_pattern`, `config_direction`, `config_protocol`, `config_ip_port_show`, `config_region_sort`, `is_import`) VALUES ('403', '', '7', 'APP_FEATURE_PROPERTIES', 'APP特征属性组件', '1', '1', '9', NULL, '2019-02-01 10:47:28', NULL, '2019-02-01 10:47:32', '', '0', '', '', '', '', NULL, NULL, NULL, NULL, NULL, '2', '0');
|
||||
INSERT INTO `function_region_dict` (`function_id`, `config_district`, `config_region_code`, `config_region_value`, `config_desc`, `is_valid`, `is_maat`, `region_type`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `config_service_type`, `config_expr_type`, `config_match_method`, `config_ip_type`, `config_hex`, `config_multi_keywords`, `config_ip_pattern`, `config_port_pattern`, `config_direction`, `config_protocol`, `config_ip_port_show`, `config_region_sort`, `is_import`) VALUES ('405', '', '7', 'APP_FEATURE_PROPERTIES', 'APP特征属性组件', '1', '1', '9', NULL, '2019-02-01 10:47:28', NULL, '2019-02-01 10:47:32', '', '1', '', '', '', '', NULL, NULL, NULL, NULL, NULL, '2', '0');
|
||||
@@ -1,7 +1,7 @@
|
||||
--URL DNS COMMONGROUPS
|
||||
--<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>->common_group->DNS<EFBFBD>ؼ<EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>URL<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
--ҵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>->DNS<EFBFBD>ؼ<EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>á<EFBFBD>URL<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
INSERT INTO `sys_menu` (`id`, `parent_id`, `parent_ids`, `code`, `name`, `sort`, `href`, `target`, `icon`, `is_show`, `permission`, `create_by`, `create_date`, `update_by`, `update_date`, `remarks`, `del_flag`, `menu_bg`, `quick_action`, `is_top`, `function_id`) VALUES ('1250', '717', '0,1,86,717,', 'dns_keyword_group_configuration', 'DNS<EFBFBD>ؼ<EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', '5090', '/basics/dns/keyword/list', '', '', '1', 'dns:keyword:config', '1', '2019-02-14 15:00:20', '1', '2019-02-14 15:00:20', '', '1', NULL, '0', '0', NULL);
|
||||
INSERT INTO `sys_menu` (`id`, `parent_id`, `parent_ids`, `code`, `name`, `sort`, `href`, `target`, `icon`, `is_show`, `permission`, `create_by`, `create_date`, `update_by`, `update_date`, `remarks`, `del_flag`, `menu_bg`, `quick_action`, `is_top`, `function_id`) VALUES ('1249', '717', '0,1,86,717,', 'url_group_configuration', 'URL<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', '5060', '/basics/url/list', '', '', '1', 'http:url:config', '1', '2019-02-14 14:57:10', '1', '2019-02-14 14:57:10', '', '1', NULL, '0', '0', NULL);
|
||||
INSERT INTO `sys_menu` (`id`, `parent_id`, `parent_ids`, `code`, `name`, `sort`, `href`, `target`, `icon`, `is_show`, `permission`, `create_by`, `create_date`, `update_by`, `update_date`, `remarks`, `del_flag`, `menu_bg`, `quick_action`, `is_top`, `function_id`) VALUES ('1250', '717', '0,1,86,717,', 'dns_keyword_group_configuration', 'DNS<EFBFBD>ؼ<EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', '5090', '/basics/dns/keyword/list', '', '', '1', 'dns:keyword:config', '1', '2019-02-14 15:00:20', '1', '2019-02-14 15:00:20', '', '1', NULL, '0', '0', '409');
|
||||
INSERT INTO `sys_menu` (`id`, `parent_id`, `parent_ids`, `code`, `name`, `sort`, `href`, `target`, `icon`, `is_show`, `permission`, `create_by`, `create_date`, `update_by`, `update_date`, `remarks`, `del_flag`, `menu_bg`, `quick_action`, `is_top`, `function_id`) VALUES ('1249', '717', '0,1,86,717,', 'url_group_configuration', 'URL<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', '5060', '/basics/url/list', '', '', '1', 'http:url:config', '1', '2019-02-14 14:57:10', '1', '2019-02-14 14:57:10', '', '1', NULL, '0', '0', '111');
|
||||
INSERT INTO `sys_menu` (`id`, `parent_id`, `parent_ids`, `code`, `name`, `sort`, `href`, `target`, `icon`, `is_show`, `permission`, `create_by`, `create_date`, `update_by`, `update_date`, `remarks`, `del_flag`, `menu_bg`, `quick_action`, `is_top`, `function_id`) VALUES ('1248', '1236', '0,1,109,1236,', 'url_group_manage', 'URL<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', '500', '/basics/policyGroup/policyGroupList?groupType=11', '', 'fa fa-globe', '1', '', '1', '2019-02-14 14:27:15', '1', '2019-02-14 14:27:15', '', '1', NULL, '0', '0', NULL);
|
||||
INSERT INTO `sys_menu` (`id`, `parent_id`, `parent_ids`, `code`, `name`, `sort`, `href`, `target`, `icon`, `is_show`, `permission`, `create_by`, `create_date`, `update_by`, `update_date`, `remarks`, `del_flag`, `menu_bg`, `quick_action`, `is_top`, `function_id`) VALUES ('1247', '1236', '0,1,109,1236,', 'dns_keyword_group_manage', 'DNS<EFBFBD>ؼ<EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', '30', '/basics/policyGroup/policyGroupList?groupType=12', '', 'fa fa-map', '1', '', '1', '2019-02-14 14:14:56', '1', '2019-02-14 14:14:56', '', '1', NULL, '0', '0', NULL);
|
||||
@@ -0,0 +1,14 @@
|
||||
-- APP特征 Session组件复用字段添加注释
|
||||
ALTER TABLE `app_complex_feature_cfg` MODIFY COLUMN `header_type` VARCHAR(16) DEFAULT '' COMMENT 'Session组件复用:传输服务端端口';
|
||||
ALTER TABLE `app_complex_feature_cfg` MODIFY COLUMN `ver` VARCHAR(4) DEFAULT '' COMMENT 'Session组件复用:传输协议';
|
||||
ALTER TABLE `app_complex_feature_cfg` MODIFY COLUMN `tos` VARCHAR(16) DEFAULT '' COMMENT 'Session组件复用:L7层协议';
|
||||
ALTER TABLE `app_complex_feature_cfg` MODIFY COLUMN `total_length` VARCHAR(16) DEFAULT '' COMMENT 'Session组件复用:链接建立方式';
|
||||
ALTER TABLE `app_complex_feature_cfg` MODIFY COLUMN `flags` VARCHAR(32) DEFAULT '' COMMENT 'Session组件复用:TCP包发送特性';
|
||||
ALTER TABLE `app_complex_feature_cfg` MODIFY COLUMN `fragment_offset` VARCHAR(32) DEFAULT '' COMMENT 'Session组件复用:域名初筛标识';
|
||||
ALTER TABLE `app_complex_feature_cfg` MODIFY COLUMN `payload_packet_direction` VARCHAR(8) DEFAULT NULL COMMENT 'payload包方向 | Session组件复用:清洗标识';
|
||||
ALTER TABLE `app_complex_feature_cfg` MODIFY COLUMN `payload_offset` INT(11) DEFAULT NULL COMMENT 'payload特征偏移量 | Session组件复用:session size min';
|
||||
ALTER TABLE `app_complex_feature_cfg` MODIFY COLUMN `payload_size` INT(11) DEFAULT NULL COMMENT 'payload包大小 | Session组件复用:session size max';
|
||||
ALTER TABLE `app_complex_feature_cfg` MODIFY COLUMN `icmp_identifier` VARCHAR(32) DEFAULT '' COMMENT 'Session组件复用:C2S Payload Size Sequence';
|
||||
ALTER TABLE `app_complex_feature_cfg` MODIFY COLUMN `icmp_type` VARCHAR(32) DEFAULT '' COMMENT 'Session组件复用:S2C Payload Size Sequence';
|
||||
ALTER TABLE `app_complex_feature_cfg` MODIFY COLUMN `icmp_code` VARCHAR(32) DEFAULT '' COMMENT 'Session组件复用:C2S Frequent Payload Size';
|
||||
ALTER TABLE `app_complex_feature_cfg` MODIFY COLUMN `protocol` VARCHAR(32) DEFAULT '' COMMENT 'Session组件复用:S2C Frequent Payload Size';
|
||||
@@ -0,0 +1,2 @@
|
||||
-- APP关联特征配置 增加控管参数组件
|
||||
INSERT INTO `function_region_dict` (`function_id`, `config_district`, `config_region_code`, `config_region_value`, `config_desc`, `is_valid`, `is_maat`, `region_type`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `config_service_type`, `config_expr_type`, `config_match_method`, `config_ip_type`, `config_hex`, `config_multi_keywords`, `config_ip_pattern`, `config_port_pattern`, `config_direction`, `config_protocol`, `config_ip_port_show`, `config_region_sort`, `is_import`) VALUES ('567', '', '7', 'APP_FEATURE_PROPERTIES', 'APP特征属性组件', '1', '1', '9', NULL, '2019-02-01 10:47:28', NULL, '2019-02-01 10:47:32', '', '1', '', '', '', '', NULL, NULL, NULL, NULL, NULL, '2', '0');
|
||||
@@ -119,13 +119,13 @@
|
||||
</div>
|
||||
<div for="action"></div>
|
||||
</div>
|
||||
<!-- 600 asn ip、 3:IP白名单、 405:APP协议IP、 403:APP域名特征、 563 APP Payload、 565 APP HTTP、 564 APP DNS、 566 APP SSL -->
|
||||
<!-- 111:url公共组域配置 、600 asn ip、 3:IP白名单、 405:APP协议IP、 403:APP域名特征、 563 APP Payload、 565 APP HTTP、 564 APP DNS、 566 APP SSL -->
|
||||
<c:if test="${(cfg.functionId eq 600) || (cfg.functionId eq 3) || (cfg.functionId eq 405) || (cfg.functionId eq 403) || (cfg.functionId eq 563) || (cfg.functionId eq 565) || (cfg.functionId eq 564) || (cfg.functionId eq 566) ||
|
||||
(cfg.functionId eq 560) }">
|
||||
(cfg.functionId eq 560) || (cfg.functionId eq 111)}">
|
||||
<div class="row hidden requestIdSel">
|
||||
</c:if>
|
||||
<c:if test="${(cfg.functionId ne 600) && (cfg.functionId ne 3) && (cfg.functionId ne 405) && (cfg.functionId ne 403) && (cfg.functionId ne 563) && (cfg.functionId ne 565) && (cfg.functionId ne 564) && (cfg.functionId ne 566) &&
|
||||
(cfg.functionId ne 560) }">
|
||||
(cfg.functionId ne 560) && (cfg.functionId ne 111) }">
|
||||
<div class="row requestIdSel">
|
||||
</c:if>
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="letter"/></label>
|
||||
@@ -273,10 +273,10 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<c:if test="${cfg.functionId eq 600 }">
|
||||
<c:if test="${(cfg.functionId eq 600) || (cfg.functionId eq 111)}">
|
||||
<div class="modal-footer" style="border-top:0px">
|
||||
</c:if>
|
||||
<c:if test="${cfg.functionId ne 600 }">
|
||||
<c:if test="${(cfg.functionId ne 600) && (cfg.functionId ne 111)}">
|
||||
<div class="modal-footer">
|
||||
</c:if>
|
||||
<button type="button" class="btn red" onclick="importCfg()">
|
||||
|
||||
423
src/main/webapp/WEB-INF/views/basics/dnsKeywordCfgFormAdd.jsp
Normal file
423
src/main/webapp/WEB-INF/views/basics/dnsKeywordCfgFormAdd.jsp
Normal file
@@ -0,0 +1,423 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<title><spring:message code="dns_keyword_group_configuration"></spring:message></title>
|
||||
<script type="text/javascript">
|
||||
var defaultStrInfo;
|
||||
$(function(){
|
||||
defaultStrInfo=$(".strInfo").clone(true);
|
||||
reSort($(defaultStrInfo),-1);
|
||||
$(".dnsKeywordAdd").click();
|
||||
$("#cfgFrom").validate({
|
||||
errorPlacement: function(error,element){
|
||||
$(element).parents(".form-group").find("div[for='"+element.attr("name")+"']").append(error);
|
||||
},
|
||||
submitHandler: function(form){
|
||||
loading('onloading...');
|
||||
form.submit();
|
||||
},
|
||||
errorContainer: "#messageBox",
|
||||
});
|
||||
});
|
||||
//业务窗口打开
|
||||
var addContent = function(obj, contentClassName) {
|
||||
var showDiv = $(obj).parent().parent().siblings("."+contentClassName).last();
|
||||
if(showDiv.hasClass("hidden")){
|
||||
$(showDiv).removeClass("hidden").removeClass(
|
||||
"disabled");
|
||||
}else{
|
||||
var additional=defaultStrInfo.clone(true);
|
||||
additional.removeClass("hidden").removeClass(
|
||||
"disabled");
|
||||
showDiv.after(additional);
|
||||
}
|
||||
var index=0;
|
||||
$("."+contentClassName).each(function(){
|
||||
reSort($(this),index);
|
||||
index++;
|
||||
});
|
||||
$(".selectpicker").selectpicker("render");
|
||||
//$(obj).addClass("hidden");
|
||||
}
|
||||
|
||||
//业务窗口关闭
|
||||
var delContent = function(obj,contentClassName) {
|
||||
if($("."+contentClassName).length==1){
|
||||
top.$.jBox.tip("<spring:message code='one_more'/>");
|
||||
return;
|
||||
}
|
||||
$(obj).parents("."+contentClassName).remove();
|
||||
var index=0;
|
||||
$("."+contentClassName).each(function(){
|
||||
reSort($(this),index);
|
||||
index++;
|
||||
});
|
||||
}
|
||||
var reSort=function(obj,index){
|
||||
$(obj).find("input,select").each(function(){
|
||||
var name=$(this).attr("name");
|
||||
if(name.indexOf("domainList[")>-1){
|
||||
var namePrefix="domainList[";
|
||||
var nameSubfix=name.substring(name.indexOf("]"));
|
||||
var nameNew=namePrefix+index+nameSubfix;
|
||||
if(nameNew!=name){
|
||||
$(this).attr("name",nameNew);
|
||||
$(this).parents(".form-group").find("div[for='"+name+"']").attr("for",nameNew);
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="page-content">
|
||||
<h3 class="page-title">
|
||||
<spring:message code="dns_keyword_group_configuration"></spring:message>
|
||||
</h3>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet box blue">
|
||||
<div class="portlet-title">
|
||||
<div class="caption">
|
||||
<i class="fa fa-gift"></i>
|
||||
<spring:message code="add"></spring:message>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body form">
|
||||
<!-- BEGIN FORM-->
|
||||
<form id="cfgFrom" action="${ctx}/basics/dns/keyword/save" method="post" class="form-horizontal">
|
||||
<input type="hidden" name="functionId" value="${_cfg.functionId}">
|
||||
<input type="hidden" id="isAreaEffective" name="isAreaEffective" value="0">
|
||||
<input type="hidden" id="compileId" name="compileId" value="0">
|
||||
<input type="hidden" id="requestId" name="requestId" value="0">
|
||||
<input type="hidden" id="dnsKeywordGroup" name="dnsKeywordGroup" value="0">
|
||||
<c:forEach items="${serviceList}" var="service">
|
||||
<input type="hidden" id="serviceId" name="serviceId" value="${service.serviceId}">
|
||||
<input type="hidden" id="action" name="action" value="${service.action}">
|
||||
</c:forEach>
|
||||
<!-- 配置域类型 -->
|
||||
<c:forEach items="${regionList}" var="region">
|
||||
<c:if test="${_cfg.functionId eq region.functionId}">
|
||||
<input type="hidden" name="cfgType" value="${region.configRegionValue}">
|
||||
<input type="hidden" name="cfgRegionCode"
|
||||
isMaat="${region.isMaat}"
|
||||
serviceType="${region.configServiceType}"
|
||||
ipPortShow="${region.configIpPortShow}"
|
||||
ipType="${region.configIpType}"
|
||||
ipPattern="${region.configIpPattern}"
|
||||
portPattern="${region.configPortPattern}"
|
||||
direction="${region.configDirection}"
|
||||
protocol="${region.configProtocol}"
|
||||
regionType="${region.regionType}"
|
||||
value="${region.configRegionCode}">
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
<div class="form-body">
|
||||
<!-- desc and action -->
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><spring:message code="config_describe"/></label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control" type="text" name="cfgDesc" value="${_cfg.cfgDesc}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="dnsGroup"/></label>
|
||||
<div class="col-md-6">
|
||||
<%-- <select name="userRegion1" class="selectpicker show-tick form-control required" data-live-search="true" data-live-search-placeholder="search">
|
||||
</select> --%>
|
||||
<%-- <input class="form-control required digits dnsGroupMustExists" type="text" name="userRegion1" value="${_cfg.userRegion1}" ctx="${ctx}"> --%>
|
||||
<select name="userRegion1" data-live-search="true" data-live-search-placeholder="search" class="selectpicker form-control required">
|
||||
<option value=""><spring:message code="select"/></option>
|
||||
<c:forEach items="${policyGroupInfos}" var="dnsGroupInfo">
|
||||
<option value="${dnsGroupInfo.serviceGroupId}">${dnsGroupInfo.groupName}</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
<div for="userRegion1"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h4 class="form-section">
|
||||
<spring:message code="dns_keyword_group_configuration" />
|
||||
<small> <span
|
||||
class="glyphicon glyphicon-plus dnsKeywordAdd"
|
||||
onClick="addContent(this,'strInfo')" title="add"></span></small>
|
||||
</h4>
|
||||
<div class="row strInfo boxSolid dnsKeyword hidden disabled">
|
||||
<div class="row">
|
||||
<div class="pull-right">
|
||||
<span class="glyphicon glyphicon-remove pull-right" title="remove"
|
||||
onClick="delContent(this,'strInfo');" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<c:forEach items="${regionList}" var="region">
|
||||
<input type="hidden" name="domainList[0].configHex" value="${region.configHex }">
|
||||
<c:if test="${!empty region.configDistrict }">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="district" /></label>
|
||||
<div class="col-md-6">
|
||||
<select name="domainList[0].district"
|
||||
class="selectpicker show-tick form-control required district">
|
||||
<c:forEach items="${fn:split(region.configDistrict,',')}"
|
||||
var="_district">
|
||||
<option value="${_district }">${_district}</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
<input type="hidden" name="domainList[0].districtShowName" maxlength="64" placeholder="<spring:message code='please_input'/> <spring:message code='custom_region'/>" class="otherValue form-control invisibleChar" />
|
||||
</div>
|
||||
<div for="domainList[0].districtShowName"></div>
|
||||
<div for="domainList[0].district"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="keywords" />
|
||||
</label>
|
||||
|
||||
<!-- 此配置的关键词可以输入多个关键词 -->
|
||||
<c:if test="${region.configMultiKeywords eq 1}">
|
||||
<div class="col-md-6">
|
||||
<input class="form-control required tags <c:if test="${fn:containsIgnoreCase(region.configServiceType,'domain') }"> domainCheck </c:if> <c:if test="${fn:containsIgnoreCase(region.configServiceType,'url') }"> urlCheck </c:if>" type="text" id="tags_${tabName}${status.index}"
|
||||
name="domainList[0].cfgKeywords"
|
||||
value="${cfg.cfgKeywords}">
|
||||
</div>
|
||||
</c:if>
|
||||
<!-- 此配置的关键词不允许输入多个关键词 -->
|
||||
<c:if test="${(region.configMultiKeywords eq 0) or (empty region.configMultiKeywords)}">
|
||||
<div class="col-md-6">
|
||||
|
||||
<input class="form-control required invisibleChar"
|
||||
type="text"
|
||||
name="domainList[0].cfgKeywords">
|
||||
</div>
|
||||
</c:if>
|
||||
<div for="domainList[0].cfgKeywords"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6 exprType">
|
||||
<div class="form-group">
|
||||
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="expression_type" /></label>
|
||||
<div class="col-md-6">
|
||||
<c:if test="${!empty region.configExprType}">
|
||||
<c:forEach var="exprType" items="${fn:split(region.configExprType,',')}" varStatus="stat" >
|
||||
<c:forEach items="${fns:getDictList('EXPRESSION_TYPE')}" var="exprTypeC" >
|
||||
<c:if test="${exprTypeC.itemCode eq exprType}">
|
||||
<label class="radio-inline">
|
||||
<input type="radio"
|
||||
name="domainList[0].exprType" value="${exprType }"
|
||||
class="required"
|
||||
<c:if test="${stat.index == 0 }"> checked </c:if>
|
||||
|
||||
>
|
||||
<spring:message code="${exprTypeC.itemValue }" />
|
||||
</label>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
<c:if test="${empty region.configExprType}">
|
||||
<c:forEach items="${fns:getDictList('EXPRESSION_TYPE')}" var="exprTypeC">
|
||||
<c:if test="${exprTypeC.itemCode eq 0}">
|
||||
<label class="radio-inline">
|
||||
<input type="radio"
|
||||
name="domainList[0].exprType" value="${exprTypeC.itemCode }"
|
||||
class="required" checked >
|
||||
<spring:message code="${exprTypeC.itemValue }" />
|
||||
</label>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
</div>
|
||||
<div for="domainList[0].exprType"></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 matchMethod">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="match_method" /></label>
|
||||
<div class="col-md-6">
|
||||
<select name="domainList[0].matchMethod"
|
||||
class="selectpicker select2 form-control required ">
|
||||
<c:if test="${!empty region.configMatchMethod}">
|
||||
<c:forEach var="matchMethod" items="${fn:split(region.configMatchMethod,',')}">
|
||||
<c:forEach items="${fns:getDictList('MATCH_METHOD')}" var="matchMethodC">
|
||||
<c:if test="${matchMethodC.itemCode eq matchMethod}">
|
||||
<option value="${matchMethodC.itemCode}"
|
||||
>
|
||||
<spring:message code="${matchMethodC.itemValue}"/>
|
||||
</option>
|
||||
</c:if>
|
||||
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
<c:if test="${empty region.configMatchMethod}">
|
||||
<c:forEach items="${fns:getDictList('MATCH_METHOD')}" var="matchMethodC">
|
||||
<c:if test="${matchMethodC.itemCode eq 0}">
|
||||
<option value="${matchMethodC.itemCode}"
|
||||
selected
|
||||
>
|
||||
<spring:message code="${matchMethodC.itemValue}"/>
|
||||
</option>
|
||||
</c:if>
|
||||
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
</select>
|
||||
</div>
|
||||
<div for="domainList[0].matchMethod"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row <c:if test="${fn:length(fn:split(region.configHex,',')) ==1}">hidden</c:if>">
|
||||
<c:if test="${!empty region.configHex}">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="is_hex"/></label>
|
||||
<div class="col-md-6">
|
||||
<!-- isP2pHashCfg: P2PHash配置只能是十六进制字符 -->
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="domainList[0].isHex" value="1" class="required"
|
||||
><spring:message code="hex"/>
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="domainList[0].isHex" value="0" class="required"
|
||||
><spring:message code="not_hex"/>
|
||||
</label>
|
||||
</div>
|
||||
<div for="domainList[0].isHex"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="is_case_insenstive"/></label>
|
||||
<div class="col-md-6">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="domainList[0].isCaseSenstive" value="1" class="required"
|
||||
><spring:message code="case_senstive"/>
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="domainList[0].isCaseSenstive" value="0" class="required"
|
||||
><spring:message code="case_insenstive"/>
|
||||
</label>
|
||||
</div>
|
||||
<div for="domainList[0].isCaseInsenstive"></div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
<c:if test="${empty region.configHex}">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="is_hex"/></label>
|
||||
<div class="col-md-6">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="domainList[0].isHex" value="0" class="required" checked
|
||||
><spring:message code="not_hex"/>
|
||||
</label>
|
||||
</div>
|
||||
<div for="domainList[0].isHex"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="is_case_insenstive"/></label>
|
||||
<div class="col-md-6">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="domainList[0].isCaseSenstive" value="0" class="required"
|
||||
checked
|
||||
><spring:message code="case_insenstive"/>
|
||||
</label>
|
||||
</div>
|
||||
<div for="domainList[0].isCaseInsenstive"></div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
</div>
|
||||
<div class="row hidden">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="whether_hexbinary" /></label>
|
||||
<div class="col-md-6">
|
||||
<select name="domainList[0].isHexbin"
|
||||
class="selectpicker select2 form-control required">
|
||||
<c:if test="${!empty region.configHex}">
|
||||
<c:forEach var="isHexbin" items="${fn:split(region.configHex,',')}">
|
||||
<c:forEach items="${fns:getDictList('WHETHER_HEXBINARY')}" var="isHexbinC">
|
||||
<c:if test="${isHexbinC.itemCode eq isHexbin}">
|
||||
<option value="${isHexbinC.itemCode}"
|
||||
<c:if test="${empty isHexbin && isHexbin eq 0}">
|
||||
selected
|
||||
</c:if>
|
||||
>
|
||||
<spring:message code="${isHexbinC.itemValue}"/>
|
||||
</option>
|
||||
</c:if>
|
||||
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
<c:if test="${empty region.configHex}">
|
||||
|
||||
<c:forEach items="${fns:getDictList('WHETHER_HEXBINARY')}" var="isHexbinC">
|
||||
<c:if test="${isHexbinC.itemCode eq 0}">
|
||||
<option value="${isHexbinC.itemCode}" selected >
|
||||
<spring:message code="${isHexbinC.itemValue}"/>
|
||||
</option>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
|
||||
</c:if>
|
||||
</select>
|
||||
</div>
|
||||
<div for="domainList[0].isHexbin"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</c:forEach>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="row">
|
||||
<div class="col-md-offset-3 col-md-8">
|
||||
<button id="save" type="submit" class="btn green"><spring:message code="submit"/></button>
|
||||
<button id="cancel" type="button" class="btn default"><spring:message code="cancel"/></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6"> </div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<!-- END FORM-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
368
src/main/webapp/WEB-INF/views/basics/dnsKeywordCfgFormUpdate.jsp
Normal file
368
src/main/webapp/WEB-INF/views/basics/dnsKeywordCfgFormUpdate.jsp
Normal file
@@ -0,0 +1,368 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<title><spring:message code="dns_keyword_group_configuration"></spring:message></title>
|
||||
<script type="text/javascript">
|
||||
var defaultStrInfo;
|
||||
$(function(){
|
||||
$("#cfgFrom").validate({
|
||||
errorPlacement: function(error,element){
|
||||
$(element).parents(".form-group").find("div[for='"+element.attr("name")+"']").append(error);
|
||||
},
|
||||
submitHandler: function(form){
|
||||
loading('onloading...');
|
||||
form.submit();
|
||||
},
|
||||
errorContainer: "#messageBox",
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="page-content">
|
||||
|
||||
<h3 class="page-title">
|
||||
<spring:message code="dns_keyword_group_configuration"></spring:message>
|
||||
</h3>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet box blue">
|
||||
<div class="portlet-title">
|
||||
<div class="caption">
|
||||
<i class="fa fa-gift"></i>
|
||||
<spring:message code="edit"></spring:message>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body form">
|
||||
<!-- BEGIN FORM-->
|
||||
<form id="cfgFrom" action="${ctx}/basics/dns/keyword/update" method="post" class="form-horizontal">
|
||||
<input type="hidden" name="cfgId" value="${cfg.cfgId}">
|
||||
<input type="hidden" name="regionId" value="${cfg.regionId}">
|
||||
<input type="hidden" name="compileId" value="${cfg.compileId}">
|
||||
<input type="hidden" name="functionId" value="${cfg.functionId}">
|
||||
<input type="hidden" name="isValid" value="${cfg.isValid}">
|
||||
<input type="hidden" name="isAudit" value="${cfg.isAudit}">
|
||||
<input type="hidden" id="serviceId" name="serviceId" value="${cfg.serviceId}">
|
||||
<input type="hidden" id="requestId" name="requestId" value="${cfg.requestId}">
|
||||
<input type="hidden" id="dnsKeywordGroup" name="dnsKeywordGroup" value="${cfg.userRegion1}">
|
||||
<input type="hidden" id="action" name="action" value="${cfg.action}">
|
||||
<!-- 配置域类型 -->
|
||||
<c:forEach items="${regionList}" var="region">
|
||||
<c:if test="${cfg.functionId eq region.functionId}">
|
||||
<input type="hidden" name="cfgType" value="${region.configRegionValue}">
|
||||
<input type="hidden" name="cfgRegionCode"
|
||||
isMaat="${region.isMaat}"
|
||||
serviceType="${region.configServiceType}"
|
||||
ipPortShow="${region.configIpPortShow}"
|
||||
ipType="${region.configIpType}"
|
||||
ipPattern="${region.configIpPattern}"
|
||||
portPattern="${region.configPortPattern}"
|
||||
direction="${region.configDirection}"
|
||||
protocol="${region.configProtocol}"
|
||||
regionType="${region.regionType}"
|
||||
value="${region.configRegionCode}">
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
<div class="form-body">
|
||||
<!-- desc and action -->
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><spring:message code="config_describe"/></label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control" type="text" name="cfgDesc" value="${cfg.cfgDesc}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="dnsGroup"/></label>
|
||||
<div class="col-md-6">
|
||||
<%-- <select name="userRegion1" class="selectpicker show-tick form-control required" data-live-search="true" data-live-search-placeholder="search">
|
||||
</select> --%>
|
||||
<%-- <input class="form-control required digits dnsGroupMustExists" type="text" name="userRegion1" value="${_cfg.userRegion1}" ctx="${ctx}"> --%>
|
||||
<select name="userRegion1" data-live-search="true" data-live-search-placeholder="search" class="selectpicker form-control required">
|
||||
<option value=""><spring:message code="select"/></option>
|
||||
<c:forEach items="${policyGroupInfos}" var="dnsGroupInfo">
|
||||
<option value="${dnsGroupInfo.serviceGroupId}" <c:if test="${cfg.userRegion1 eq dnsGroupInfo.serviceGroupId }">selected</c:if>>${dnsGroupInfo.groupName}</option>
|
||||
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
<div for="userRegion1"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<c:forEach items="${regionList}" var="region">
|
||||
<input type="hidden" name="configHex" value="${region.configHex }">
|
||||
<c:if test="${!empty region.configDistrict }">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="district" /></label>
|
||||
<div class="col-md-6">
|
||||
<select name="district"
|
||||
class="selectpicker show-tick form-control required district">
|
||||
<c:forEach items="${fn:split(region.configDistrict,',')}"
|
||||
var="_district">
|
||||
<option value="${_district }" <c:if test="${cfg.district eq _district}">selected</c:if>>${_district}</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
<div for="district"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="keywords" />
|
||||
</label>
|
||||
|
||||
<!-- 此配置的关键词可以输入多个关键词 -->
|
||||
<c:if test="${region.configMultiKeywords eq 1}">
|
||||
<div class="col-md-6">
|
||||
<input class="form-control required tags <c:if test="${fn:containsIgnoreCase(region.configServiceType,'domain') }"> domainCheck </c:if> <c:if test="${fn:containsIgnoreCase(region.configServiceType,'url') }"> urlCheck </c:if>" type="text" id="tags_${tabName}${status.index}"
|
||||
name="cfgKeywords"
|
||||
value="${cfg.cfgKeywords}">
|
||||
</div>
|
||||
</c:if>
|
||||
<!-- 此配置的关键词不允许输入多个关键词 -->
|
||||
<c:if test="${(region.configMultiKeywords eq 0) or (empty region.configMultiKeywords)}">
|
||||
<div class="col-md-6">
|
||||
|
||||
<input class="form-control required invisibleChar"
|
||||
type="text"
|
||||
name="cfgKeywords" value="${cfg.cfgKeywords}">
|
||||
</div>
|
||||
</c:if>
|
||||
<div for="cfgKeywords"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6 exprType">
|
||||
<div class="form-group">
|
||||
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="expression_type" /></label>
|
||||
<div class="col-md-6">
|
||||
<c:if test="${!empty region.configExprType}">
|
||||
<c:forEach var="exprType" items="${fn:split(region.configExprType,',')}" varStatus="stat" >
|
||||
<c:forEach items="${fns:getDictList('EXPRESSION_TYPE')}" var="exprTypeC" >
|
||||
<c:if test="${exprTypeC.itemCode eq exprType}">
|
||||
<label class="radio-inline">
|
||||
<input type="radio"
|
||||
name="exprType" value="${exprType }"
|
||||
class="required"
|
||||
<c:if test="${cfg.exprType eq exprType}"> checked </c:if>
|
||||
>
|
||||
<spring:message code="${exprTypeC.itemValue }" />
|
||||
</label>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
<c:if test="${empty region.configExprType}">
|
||||
<c:forEach items="${fns:getDictList('EXPRESSION_TYPE')}" var="exprTypeC">
|
||||
<c:if test="${exprTypeC.itemCode eq 0}">
|
||||
<label class="radio-inline">
|
||||
<input type="radio"
|
||||
name="exprType" value="${exprTypeC.itemCode }"
|
||||
class="required" checked >
|
||||
<spring:message code="${exprTypeC.itemValue }" />
|
||||
</label>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
</div>
|
||||
<div for="exprType"></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 matchMethod">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="match_method" /></label>
|
||||
<div class="col-md-6">
|
||||
<select name="matchMethod"
|
||||
class="selectpicker select2 form-control required ">
|
||||
<c:if test="${!empty region.configMatchMethod}">
|
||||
<c:forEach var="matchMethod" items="${fn:split(region.configMatchMethod,',')}">
|
||||
<c:forEach items="${fns:getDictList('MATCH_METHOD')}" var="matchMethodC">
|
||||
<c:if test="${matchMethodC.itemCode eq matchMethod}">
|
||||
<option value="${matchMethodC.itemCode}"
|
||||
<c:if test="${cfg.matchMethod eq matchMethod || (empty cfg.matchMethod && matchMethod eq 0)}">
|
||||
selected
|
||||
</c:if>
|
||||
>
|
||||
<spring:message code="${matchMethodC.itemValue}"/>
|
||||
</option>
|
||||
</c:if>
|
||||
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
<c:if test="${empty region.configMatchMethod}">
|
||||
<c:forEach items="${fns:getDictList('MATCH_METHOD')}" var="matchMethodC">
|
||||
<c:if test="${matchMethodC.itemCode eq 0}">
|
||||
<option value="${matchMethodC.itemCode}"
|
||||
selected
|
||||
>
|
||||
<spring:message code="${matchMethodC.itemValue}"/>
|
||||
</option>
|
||||
</c:if>
|
||||
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
</select>
|
||||
</div>
|
||||
<div for="matchMethod"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row <c:if test="${fn:length(fn:split(region.configHex,',')) ==1}">hidden</c:if>">
|
||||
<c:if test="${!empty region.configHex}">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="is_hex"/></label>
|
||||
<div class="col-md-6">
|
||||
<!-- isP2pHashCfg: P2PHash配置只能是十六进制字符 -->
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isHex" value="1" class="required" <c:if test="${cfg.isHex eq 1 }">checked</c:if>
|
||||
><spring:message code="hex"/>
|
||||
</label>
|
||||
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isHex" value="0" class="required" <c:if test="${cfg.isHex eq 0 }">checked</c:if>
|
||||
><spring:message code="not_hex"/>
|
||||
</label>
|
||||
</div>
|
||||
<div for="isHex"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="is_case_insenstive"/></label>
|
||||
<div class="col-md-6">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isCaseSenstive" value="1" class="required" <%-- <c:if test="${cfg.isCaseSenstive eq 1 }">checked</c:if> --%>
|
||||
><spring:message code="case_senstive"/>
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isCaseSenstive" value="0" class="required" <%-- <c:if test="${cfg.isCaseSenstive eq 1 }">checked</c:if> --%>
|
||||
><spring:message code="case_insenstive"/>
|
||||
</label>
|
||||
</div>
|
||||
<div for="isCaseInsenstive"></div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
<c:if test="${empty region.configHex}">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="is_hex"/></label>
|
||||
<div class="col-md-6">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isHex" value="0" class="required" checked
|
||||
><spring:message code="not_hex"/>
|
||||
</label>
|
||||
</div>
|
||||
<div for="isHex"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="is_case_insenstive"/></label>
|
||||
<div class="col-md-6">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isCaseSenstive" value="0" class="required"
|
||||
checked
|
||||
><spring:message code="case_insenstive"/>
|
||||
</label>
|
||||
</div>
|
||||
<div for="isCaseInsenstive"></div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
</div>
|
||||
<div class="row hidden">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="whether_hexbinary" /></label>
|
||||
<div class="col-md-6">
|
||||
<select name="isHexbin"
|
||||
class="selectpicker select2 form-control required">
|
||||
<c:if test="${!empty region.configHex}">
|
||||
<c:forEach var="isHexbin" items="${fn:split(region.configHex,',')}">
|
||||
<c:forEach items="${fns:getDictList('WHETHER_HEXBINARY')}" var="isHexbinC">
|
||||
<c:if test="${isHexbinC.itemCode eq isHexbin}">
|
||||
<option value="${isHexbinC.itemCode}"
|
||||
<c:if test="${cfg.isHexbin eq isHexbin || (empty isHexbin && isHexbin eq 0)}">
|
||||
selected
|
||||
</c:if>
|
||||
>
|
||||
<spring:message code="${isHexbinC.itemValue}"/>
|
||||
</option>
|
||||
</c:if>
|
||||
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
<c:if test="${empty region.configHex}">
|
||||
|
||||
<c:forEach items="${fns:getDictList('WHETHER_HEXBINARY')}" var="isHexbinC">
|
||||
<c:if test="${isHexbinC.itemCode eq 0}">
|
||||
<option value="${isHexbinC.itemCode}" selected >
|
||||
<spring:message code="${isHexbinC.itemValue}"/>
|
||||
</option>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
|
||||
</c:if>
|
||||
</select>
|
||||
</div>
|
||||
<div for="isHexbin"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</c:forEach>
|
||||
<%-- <%@include file="/WEB-INF/include/form/basicInfo.jsp" %> --%>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="row">
|
||||
<div class="col-md-offset-3 col-md-8">
|
||||
<button id="save" type="submit" class="btn green"><spring:message code="submit"/></button>
|
||||
<button id="cancel" type="button" class="btn default"><spring:message code="cancel"/></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6"> </div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<!-- END FORM-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
307
src/main/webapp/WEB-INF/views/basics/dnsKeywordCfgList.jsp
Normal file
307
src/main/webapp/WEB-INF/views/basics/dnsKeywordCfgList.jsp
Normal file
@@ -0,0 +1,307 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<title><spring:message code="asn_ip_configuration"></spring:message></title>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
//搜索框提示语初始化
|
||||
//搜索框提示语初始化
|
||||
if("${cfg.cfgDesc}"){
|
||||
$("#intype").val("${cfg.cfgDesc}");
|
||||
}else if("${cfg.cfgKeywords}"){
|
||||
$("#intype").val("${cfg.cfgKeywords}");
|
||||
}else{
|
||||
$("#intype").attr("placeholder","<spring:message code='input'/> "+$("#seltype").find("option:selected").text());
|
||||
}
|
||||
$("#seltype").change(function(){
|
||||
$("#intype").attr("placeholder","<spring:message code='input'/> "+$(this).find("option:selected").text());
|
||||
});
|
||||
//筛选功能初始化
|
||||
filterActionInit();
|
||||
$("#isAudit").change(function(){
|
||||
page();
|
||||
});
|
||||
//reset
|
||||
$("#resetBtn").on("click",function(){
|
||||
$("select.selectpicker").each(function(){
|
||||
$(this).selectpicker('val',$(this).find('option:first').val());
|
||||
$(this).find("option").attr("selected",false);
|
||||
$(this).find("option:first").attr("selected",true);
|
||||
});
|
||||
$(".Wdate").attr("value",'');
|
||||
$("#description").attr("value",'');
|
||||
$("#searchForm")[0].reset();
|
||||
});
|
||||
|
||||
if($("#exportType").val() != null && $("#exportType").val() != ""){
|
||||
if($("#intype").val() != null && $("#intype").val() != ""){
|
||||
$("#exportValue").val($("#intype").val());
|
||||
}
|
||||
}
|
||||
});
|
||||
var edit=function(url){
|
||||
var cked = $('tbody tr td input.i-checks:checkbox:checked');
|
||||
if(cked.val()==1){
|
||||
top.$.jBox.tip("<spring:message code='has_approved'/>", "<spring:message code='info'/>");
|
||||
return;
|
||||
}
|
||||
if(cked.length==1){
|
||||
window.location = url+"&compileId="+cked.attr("id");
|
||||
}else{
|
||||
top.$.jBox.tip("<spring:message code='check_one'/>", "<spring:message code='info'/>");
|
||||
return;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="page-content">
|
||||
<div class="theme-panel hidden-xs hidden-sm">
|
||||
|
||||
<shiro:hasPermission name="dns:keyword:config">
|
||||
<button type="button" class="btn btn-primary"
|
||||
onClick="javascript:window.location='${ctx}/basics/dns/keyword/addForm?functionId=${cfg.functionId}'">
|
||||
<i class="fa fa-plus"></i>
|
||||
<spring:message code="add"></spring:message></button>
|
||||
<c:set var="regionImport" value="false"></c:set>
|
||||
<c:forEach items="${regionList}" var="region" >
|
||||
<c:if test="${(cfg.functionId eq region.functionId) && region.isImport eq 1}">
|
||||
<c:set var="regionImport" value="true"></c:set>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
<c:if test="${regionImport eq 'true'}">
|
||||
<button type="button" class="btn btn-primary import" >
|
||||
<i class="fa fa-plus"></i>
|
||||
<spring:message code="import"></spring:message></button>
|
||||
</c:if>
|
||||
</shiro:hasPermission>
|
||||
</div>
|
||||
|
||||
<h3 class="page-title">
|
||||
<spring:message code="dns_keyword_group_configuration"></spring:message>
|
||||
<%-- <small><spring:message code="date_list"/></small> --%>
|
||||
</h3>
|
||||
<h5 class="page-header"></h5>
|
||||
<div class="col-md-12">
|
||||
<div class="portlet">
|
||||
<div class="portlet-body">
|
||||
<div class="row" >
|
||||
<form:form id="searchForm" modelAttribute="cfg" action="${ctx}/basics/dns/keyword/list?functionId=${cfg.functionId}" method="post" class="form-search">
|
||||
<input id="functionId" name="functionId" type="hidden" value="${cfg.functionId}"/>
|
||||
<input id="audit" name="audit" type="hidden" value="${audit}"/>
|
||||
<input id="exportType" type="hidden" value="${cfg.seltype}"/>
|
||||
<input id="exportValue" type="hidden" value=""/>
|
||||
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
|
||||
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
|
||||
<sys:tableSort id="orderBy" name="orderBy" value="${page.orderBy}"
|
||||
callback="page();" />
|
||||
<!-- 筛选按钮展开状态-->
|
||||
<input id="isFilterAction" name="isFilterAction" type="hidden" value="${cfg.isFilterAction }"/>
|
||||
<!-- 搜索内容与操作按钮栏 -->
|
||||
<div class="col-md-12">
|
||||
<div class="pull-left">
|
||||
<c:set var="state"><spring:message code='group'/></c:set>
|
||||
<form:select path="isAudit" class="selectpicker select2 input-small">
|
||||
<form:option value=""><spring:message code="all_states"/></form:option>
|
||||
<form:option value="0"><spring:message code="created"></spring:message></form:option>
|
||||
<form:option value="1"><spring:message code="approved"></spring:message></form:option>
|
||||
<form:option value="2"><spring:message code="unapproved"></spring:message></form:option>
|
||||
<form:option value="3"><spring:message code="cancel_approved"></spring:message></form:option>
|
||||
</form:select>
|
||||
</div>
|
||||
|
||||
<div class="pull-left">
|
||||
|
||||
<div class="input-group">
|
||||
<div class="input-group-btn">
|
||||
<form:select path="seltype" class="selectpicker select2 input-small" >
|
||||
<form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
|
||||
<%-- <form:option value="destPort"><spring:message code="port"></spring:message></form:option> --%>
|
||||
<form:option value="cfgKeywords"><spring:message code="keywords"></spring:message></form:option>
|
||||
<form:option value="isValid"><spring:message code="valid_identifier"></spring:message></form:option>
|
||||
</form:select>
|
||||
</div>
|
||||
|
||||
<input id="intype" class="form-control input-medium" type="text" value="">
|
||||
<div class="input-group-btn">
|
||||
<form:select path="isValid" class="selectpicker select2 input-small" >
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<form:option value="1"><spring:message code="yes"/></form:option>
|
||||
<form:option value="0"><spring:message code="no"/></form:option>
|
||||
</form:select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
<button type="button" class="btn blue" onClick="return page()"> <i class="fa fa-search"></i> <spring:message code="search"/> </button>
|
||||
<button type="button" class="btn btn-default" id="resetBtn"> <i class="fa fa-refresh"></i> <spring:message code="reset"/> </button>
|
||||
<button type="button" class="btn btn-default" id="filter-btn"> <spring:message code="filter"/> <i class="fa fa-angle-double-down"></i></button>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<shiro:hasPermission name="dns:keyword:config">
|
||||
<sys:delRow url="${ctx}/basics/dns/keyword/updateForm?functionId=${cfg.functionId}" id="contentTable" label="update"></sys:delRow>
|
||||
<sys:delRow url="${ctx}/basics/dns/keyword/delete?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
|
||||
</shiro:hasPermission>
|
||||
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
<i class="fa fa-wrench"></i> <spring:message code="export"></spring:message>
|
||||
<i class="fa fa-angle-down"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu pull-right" style="min-width: 110px;" >
|
||||
<li><sys:delRow url="${ctx}/basics/dns/keyword/exportAsnIp?functionId=${cfg.functionId }&exType=excel" searchUrl="${ctx}/basics/dns/keyword/list?functionId=${cfg.functionId}" id="contentTable" maxRow="5" label="cfg_excel"></sys:delRow></li>
|
||||
<li><sys:delRow url="${ctx}/basics/dns/keyword/exportAsnIp?functionId=${cfg.functionId }&exType=csv" searchUrl="${ctx}/basics/dns/keyword/list?functionId=${cfg.functionId}" id="contentTable" maxRow="5" label="cfg_csv"></sys:delRow></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
<shiro:hasPermission name="dns:keyword:config">
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
<i class="fa fa-wrench"></i> <spring:message code="examine"></spring:message>
|
||||
<i class="fa fa-angle-down"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu pull-right">
|
||||
<li><sys:delRow url="${ctx}/basics/dns/keyword/audit?isAudit=1&isValid=1&functionId=${cfg.functionId }" id="contentTable" label="approved"></sys:delRow></li>
|
||||
<li><sys:delRow url="${ctx}/basics/dns/keyword/audit?isAudit=2&isValid=0&functionId=${cfg.functionId }" id="contentTable" label="unapproved"></sys:delRow></li>
|
||||
<li><sys:delRow url="${ctx}/basics/dns/keyword/audit?isAudit=3&isValid=0&functionId=${cfg.functionId }" id="contentTable" label="cancelPass"></sys:delRow></li>
|
||||
</ul>
|
||||
</div>
|
||||
</shiro:hasPermission>
|
||||
<a class="btn btn-icon-only btn-default setfields tooltips"
|
||||
data-container="body" data-placement="top" data-original-title=<spring:message code="custom_columns"/> href="javascript:;">
|
||||
<i class="icon-wrench"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /搜索内容与操作按钮栏 -->
|
||||
|
||||
<!-- 筛选搜索内容栏默认隐藏-->
|
||||
<div class="col-md-12 filter-action-select-panle hide" >
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label><spring:message code="config_time"/>:</label>
|
||||
<input name="search_create_time_start" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value='${cfg.search_create_time_start}' pattern='yyyy-MM-dd HH:mm:ss'/>" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label> </label>
|
||||
<input name="search_create_time_end" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_create_time_end}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label><spring:message code="edit_time"/>:</label>
|
||||
<input name="search_edit_time_start" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_edit_time_start}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label> </label>
|
||||
<input name="search_edit_time_end" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_edit_time_end}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label><spring:message code="audit_time"/>:</label>
|
||||
<input name="search_audit_time_start" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_audit_time_start}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label> </label>
|
||||
<input name="search_audit_time_end" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_audit_time_end}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<!-- /筛选搜索内容栏 结束-->
|
||||
</form:form>
|
||||
</div>
|
||||
<sys:message content="${message}" type="${messageType }"/>
|
||||
<div class="table-responsive">
|
||||
<table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><input type="checkbox" class="i-checks" id="checkAll"></th>
|
||||
<th column="config_describe" ><spring:message code="config_describe"/></th>
|
||||
<th column="keywords" ><spring:message code="keywords"/></th>
|
||||
<th class="sort-column r.user_region1" column="userregion1" ><spring:message code="dnsGroup"/></th>
|
||||
<th><spring:message code="is_audit"/></th>
|
||||
<th column="valid_identifier" ><spring:message code="valid_identifier"/></th>
|
||||
<th column="creator" ><spring:message code="creator"/></th>
|
||||
<th column="config_time" class="sort-column r.create_time"><spring:message code="config_time"/></th>
|
||||
<th column="editor" ><spring:message code="editor"/></th>
|
||||
<th column="edit_time" class="sort-column r.edit_time"><spring:message code="edit_time"/></th>
|
||||
<th><spring:message code="auditor"/></th>
|
||||
<th class="sort-column r.audit_time"><spring:message code="audit_time"/></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:forEach items="${page.list }" var="cfg" varStatus="status" step="1">
|
||||
<tr>
|
||||
<td><input type="checkbox" class="i-checks" id="${cfg.cfgId}" isValid="${cfg.isValid}" value="${cfg.isAudit}"></td>
|
||||
<td>${cfg.cfgDesc }</td>
|
||||
<td>${cfg.cfgKeywords }</td>
|
||||
<td>
|
||||
${cfg.dnsGroupName}
|
||||
</td>
|
||||
<td>
|
||||
<c:choose>
|
||||
<c:when test="${cfg.isAudit eq '0'}"><span class="label label-danger"><spring:message code="created"></spring:message></span></c:when>
|
||||
<c:when test="${cfg.isAudit eq '1'}"><span class="label label-success"><spring:message code="approved"></spring:message></span></c:when>
|
||||
<c:when test="${cfg.isAudit eq '2'}"><span class="label label-warning"><spring:message code="unapproved"></spring:message></span></c:when>
|
||||
<c:when test="${cfg.isAudit eq '3'}"><span class="label label-warning"><spring:message code="cancel_approved"></spring:message></span></c:when>
|
||||
|
||||
</c:choose>
|
||||
</td>
|
||||
<td>
|
||||
<c:if test="${cfg.isValid==0}"><spring:message code="no"/></c:if>
|
||||
<c:if test="${cfg.isValid==1}"><spring:message code="yes"/></c:if>
|
||||
<c:if test="${cfg.isValid==-1}"><spring:message code="deleted"/></c:if>
|
||||
</td>
|
||||
<td>${cfg.creatorName }</td>
|
||||
<td><fmt:formatDate value="${cfg.createTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<td>${cfg.editorName }</td>
|
||||
<td><fmt:formatDate value="${cfg.editTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<td>${cfg.auditorName }</td>
|
||||
<td><fmt:formatDate value="${cfg.auditTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="page">${page}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<c:set var="importPath" value="/basics/dns/keyword/list?functionId=${cfg.functionId}"/>
|
||||
<!-- 模板导入,start -->
|
||||
<%@include file="/WEB-INF/include/excel/importModal.jsp" %>
|
||||
</body>
|
||||
</html>
|
||||
@@ -290,20 +290,22 @@
|
||||
${fns:abbr(cfg.groupName,20)}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<c:choose>
|
||||
<c:when test="${cfg.groupType==6 }">
|
||||
<c:forEach items="${fns:getDictList('IR_TYPE')}" var="groupTypeC">
|
||||
<c:if test="${cfg.asnNo==groupTypeC.itemCode }"><spring:message code="${groupTypeC.itemValue}"/></c:if>
|
||||
</c:forEach>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<c:forEach items="${fns:getDictList('GROUP_TYPE')}" var="groupTypeC">
|
||||
<c:if test="${cfg.groupType==groupTypeC.itemCode }"><spring:message code="${groupTypeC.itemValue}"/></c:if>
|
||||
</c:forEach>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</td>
|
||||
<c:if test="${cfg.groupType!=12&&cfg.groupType!=11}">
|
||||
<td>
|
||||
<c:choose>
|
||||
<c:when test="${cfg.groupType==6 }">
|
||||
<c:forEach items="${fns:getDictList('IR_TYPE')}" var="groupTypeC">
|
||||
<c:if test="${cfg.asnNo==groupTypeC.itemCode }"><spring:message code="${groupTypeC.itemValue}"/></c:if>
|
||||
</c:forEach>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<c:forEach items="${fns:getDictList('GROUP_TYPE')}" var="groupTypeC">
|
||||
<c:if test="${cfg.groupType==groupTypeC.itemCode }"><spring:message code="${groupTypeC.itemValue}"/></c:if>
|
||||
</c:forEach>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</td>
|
||||
</c:if>
|
||||
<%-- <c:if test="${cfg.groupType==4}">
|
||||
<td>${cfg.asnNo}</td>
|
||||
</c:if> --%>
|
||||
|
||||
451
src/main/webapp/WEB-INF/views/basics/urlCommGroupFormAdd.jsp
Normal file
451
src/main/webapp/WEB-INF/views/basics/urlCommGroupFormAdd.jsp
Normal file
@@ -0,0 +1,451 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<title><spring:message code="url_group_configuration"></spring:message></title>
|
||||
<script type="text/javascript">
|
||||
var defaultIpInfo;
|
||||
var protectedList = [".com"];
|
||||
$(function(){
|
||||
|
||||
defaultIpInfo=$(".strInfo").clone(true);
|
||||
|
||||
// reSort($(defaultIpInfo),-1);
|
||||
$(".asnIpAdd").click();
|
||||
$("#cfgFrom").validate({
|
||||
errorPlacement: function(error,element){
|
||||
if($(element).parents().hasClass("tagsinput")){
|
||||
$(element).parents(".col-md-6").next("div").append(error);
|
||||
}else{
|
||||
$(element).parents(".form-group").find("div[for='"+element.attr("name")+"']").append(error);
|
||||
}
|
||||
},
|
||||
submitHandler: function(form){
|
||||
/* $("[name='country']").val($("[name='userRegion1'] option:selected").attr("country"));
|
||||
$("[name='detail']").val($("[name='userRegion1'] option:selected").attr("detail"));
|
||||
$("[name='asnIpGroup']").val($("[name='userRegion1'] option:selected").attr("asnIpGroup")); */
|
||||
var flag = true;
|
||||
/* $(".boxSolid:visible").find("input[name$='cfgKeywords']").each(function(){
|
||||
if($(this).val()==''){
|
||||
$(this).parents(".form-group").find(
|
||||
"div[for='"
|
||||
+ $(this).attr("name")
|
||||
+ "']").html("<label id=\"cfgKeywordsError\" class=\"error\">"+$("#keywordError").text()+"</label>");
|
||||
flag = false;
|
||||
}
|
||||
}); */
|
||||
$(".tagsinput:visible").each(function(){
|
||||
var text='';
|
||||
$(this).find(".tag").each(function(){
|
||||
text+=$(this).children("span").text().trim();
|
||||
});
|
||||
if(text.length < 4 || text.length > 1024){
|
||||
$(this).parents(".col-md-6").next("div").html("<label id=\"cfgKeywordsError\" class=\"error\">"+$.validator.messages.keywordLength+"</label>");
|
||||
if(flag){
|
||||
flag=false;
|
||||
}
|
||||
}
|
||||
});
|
||||
if(flag){
|
||||
loading('onloading...');
|
||||
form.submit();
|
||||
}else{
|
||||
return;
|
||||
}
|
||||
},
|
||||
errorContainer: "#messageBox",
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
//业务窗口打开
|
||||
var addContent = function(obj, contentClassName) {
|
||||
var showDiv = $(obj).parent().parent().siblings("."+contentClassName).last();
|
||||
if(showDiv.hasClass("hidden")){
|
||||
$(showDiv).removeClass("hidden").removeClass(
|
||||
"disabled");
|
||||
}else{
|
||||
var additional=defaultIpInfo.clone();
|
||||
additional.removeClass("hidden").removeClass(
|
||||
"disabled");
|
||||
showDiv.after(additional);
|
||||
}
|
||||
var index=0;
|
||||
$("."+contentClassName).each(function(){
|
||||
reSort($(this),index);
|
||||
// $(".tags").attr("id","tags_"+index);
|
||||
$("input[name='urlCommGroupList["+index+"].cfgKeywords']").attr("id","tags_"+index);
|
||||
index++;
|
||||
});
|
||||
$(".selectpicker").selectpicker("render");
|
||||
|
||||
var flag1=0;
|
||||
$(".tagsinput").each(function(){
|
||||
$(this).attr("id","tags_"+flag1+"_tagsinput");
|
||||
if(flag1>0 && flag1==($(".tagsinput").length-1)){
|
||||
$("#tags_"+flag1+"_tagsinput").remove();
|
||||
inputToDiv();
|
||||
}
|
||||
flag1++;
|
||||
});
|
||||
}
|
||||
|
||||
//业务窗口关闭
|
||||
var delContent = function(obj,contentClassName) {
|
||||
if($("."+contentClassName).length==1){
|
||||
top.$.jBox.tip("<spring:message code='one_more'/>");
|
||||
return;
|
||||
}
|
||||
$(obj).parents("."+contentClassName).remove();
|
||||
var index=0;
|
||||
$("."+contentClassName).each(function(){
|
||||
reSort($(this),index);
|
||||
index++;
|
||||
});
|
||||
|
||||
}
|
||||
var reSort=function(obj,index){
|
||||
$(obj).find("input,select").each(function(){
|
||||
var name=$(this).attr("name");
|
||||
if(name != undefined){
|
||||
if(name.indexOf("urlCommGroupList[")>-1){
|
||||
var namePrefix="urlCommGroupList[";
|
||||
var nameSubfix=name.substring(name.indexOf("]"));
|
||||
var nameNew=namePrefix+index+nameSubfix;
|
||||
// $(".tags").attr("id","tags_"+index);
|
||||
if(nameNew!=name){
|
||||
$(this).attr("name",nameNew);
|
||||
$(this).parents(".form-group").find("div[for='"+name+"']").attr("for",nameNew);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
//input框标签化方法
|
||||
function inputToDiv(){
|
||||
|
||||
var tagsInputSettings1="#tags";
|
||||
var options;
|
||||
var flag2=0;
|
||||
$("input[name$='cfgKeywords']").each(function(){
|
||||
var tagsId = $(this).attr("id");
|
||||
var objNamePrefix = $(this).attr("name").split("cfgKeywords")[0];
|
||||
var isTags = $(this).hasClass("tags");//有tags样式的关键字输入框才需处理
|
||||
if(typeof(tagsId)!=='undefined' && tagsId.indexOf("tags_")!=-1 && isTags){
|
||||
// 表达式类型初始
|
||||
if($("input:radio[name='"+objNamePrefix+"exprType'][checked=checked]").val()==1){
|
||||
options = $("select[name='"+objNamePrefix+"matchMethod']").find("option[value!=0]");
|
||||
$("select[name='"+objNamePrefix+"matchMethod']").find("option[value!=0]").remove();
|
||||
}else{
|
||||
options = $("select[name='"+objNamePrefix+"matchMethod']").find("option[value!=0]");
|
||||
}
|
||||
//表单中如果有关键字内容可能输入多个关键字的情况,根据输入关键字个数确定表达式选中情况,不允许手动选中
|
||||
if($("select[name='"+objNamePrefix+"district']").val()!="Payload"){//如果是app 的payload特征,可选择表达式
|
||||
$("input:radio[name='"+objNamePrefix+"exprType']").attr("disabled",true);
|
||||
}
|
||||
|
||||
if(tagsId !="tags_0" && flag2>0 && flag2==($("input[name$='cfgKeywords']").length-1)){
|
||||
tagsInputSettings1 = tagsInputSettings1+",#"+tagsId;
|
||||
}
|
||||
flag2++;
|
||||
}
|
||||
|
||||
});
|
||||
$(tagsInputSettings1).tagsInput({
|
||||
width:$(tagsInputSettings1).find(".form-control").width(),
|
||||
defaultText:'please input keywords',
|
||||
'delimiter':'***and***',//特殊字符串分隔与表达式的多关键词
|
||||
maxCount:4,
|
||||
onAddTag:function(tag,size){
|
||||
var reg = new RegExp(/\t|\r|\n/);
|
||||
/* if (tag.match(reg)) {
|
||||
$(this).parent(".col-md-6").next("div").html("<label class='error'>"+$.validator.messages.hasInvisibleChar.replace("{0}","'"+tag+"'")+"</label>");
|
||||
}else{
|
||||
$(this).parent(".col-md-6").next("div").html("");
|
||||
} */
|
||||
//var keywordValue = "";
|
||||
var objNamePrefix = $(this).attr("name").split("cfgKeywords")[0];
|
||||
/*$("span[class='tag']").each(function(){
|
||||
keywordValue = keywordValue+"***iie***"+$(this).find("span").text().trim();
|
||||
});
|
||||
$(this).prev("input[name$='cfgKeywords']").val(keywordValue);*/
|
||||
exprTypeChecked(objNamePrefix,size,options);
|
||||
if($(this).hasClass("urlCheck")){
|
||||
protectedListWarn($("#"+$(this).attr("id")+"_tagsinput"),$(this).val(),protectedList);
|
||||
}
|
||||
},
|
||||
onRemoveTag:function(tag,size){
|
||||
// $(this).parent(".col-md-6").next("div").html("");
|
||||
//var keywordValue = "";
|
||||
var objNamePrefix = $(this).attr("name").split("cfgKeywords")[0];
|
||||
/*$("span[class='tag']").each(function(){
|
||||
keywordValue = keywordValue+"***iie***"+$(this).find("span").text().trim();
|
||||
});
|
||||
$(this).prev("input[name$='cfgKeywords']").val(keywordValue);*/
|
||||
exprTypeChecked(objNamePrefix,size,options);
|
||||
if($(this).hasClass("urlCheck")){
|
||||
protectedListWarn($("#"+$(this).attr("id")+"_tagsinput"),$(this).val(),protectedList);
|
||||
}
|
||||
}
|
||||
});
|
||||
$(".tagsinput").popover({
|
||||
animation:true,
|
||||
container:'body',
|
||||
placement:'right',
|
||||
html:true,
|
||||
trigger:"hover",
|
||||
title:"",
|
||||
content:function(){
|
||||
var content = $("#tagsinputTip").text();
|
||||
return content;
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<span id="keywordError" style="display:none"><spring:message code="required"></spring:message></span>
|
||||
<span id="tagsinputTip" style="display:none"><spring:message code="multiple_keywords_tip"></spring:message></span>
|
||||
<div class="page-content">
|
||||
|
||||
<h3 class="page-title">
|
||||
<spring:message code="url_group_configuration"></spring:message>
|
||||
</h3>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet box blue">
|
||||
<div class="portlet-title">
|
||||
<div class="caption">
|
||||
<i class="fa fa-gift"></i>
|
||||
<spring:message code="add"></spring:message>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body form">
|
||||
<!-- BEGIN FORM-->
|
||||
<form id="cfgFrom" action="${ctx}/basics/url/save" method="post" class="form-horizontal">
|
||||
<input type="hidden" name="functionId" value="${_cfg.functionId}">
|
||||
<input type="hidden" id="isAreaEffective" name="isAreaEffective" value="0">
|
||||
<input type="hidden" id="compileId" name="compileId" value="0">
|
||||
<input type="hidden" id="requestId" name="requestId" value="0">
|
||||
<input type="hidden" id="asnIpGroup" name="asnIpGroup" value="0">
|
||||
<c:forEach items="${serviceList}" var="service">
|
||||
<input type="hidden" id="serviceId" name="serviceId" value="${service.serviceId}">
|
||||
<input type="hidden" id="action" name="action" value="${service.action}">
|
||||
</c:forEach>
|
||||
<!-- 配置域类型 -->
|
||||
<c:forEach items="${regionList}" var="region">
|
||||
<c:if test="${_cfg.functionId eq region.functionId}">
|
||||
<input type="hidden" name="cfgType" value="${region.configRegionValue}">
|
||||
<input type="hidden" name="cfgRegionCode"
|
||||
isMaat="${region.isMaat}"
|
||||
serviceType="${region.configServiceType}"
|
||||
ipPortShow="${region.configIpPortShow}"
|
||||
ipType="${region.configIpType}"
|
||||
ipPattern="${region.configIpPattern}"
|
||||
portPattern="${region.configPortPattern}"
|
||||
direction="${region.configDirection}"
|
||||
protocol="${region.configProtocol}"
|
||||
regionType="${region.regionType}"
|
||||
value="${region.configRegionCode}">
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
<div class="form-body">
|
||||
<!-- desc and action -->
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><spring:message code="config_describe"/></label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control" type="text" name="cfgDesc" value="${_cfg.cfgDesc}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="urlGroup"/></label>
|
||||
<div class="col-md-6">
|
||||
<%-- <input class="form-control required digits asnMustExists" type="text" name="${cfgName}.cfgKeywords" value="${cfg.cfgKeywords}" ctx="${ctx}"> --%>
|
||||
<select name="userRegion3" data-live-search="true" data-live-search-placeholder="search" class="selectpicker form-control required">
|
||||
<option value=""><spring:message code="select"/></option>
|
||||
<c:forEach items="${policyGroupInfos}" var="urlGroupInfo">
|
||||
<option value="${urlGroupInfo.serviceGroupId}">${urlGroupInfo.groupName}</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
<div for="userRegion3"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- desc and action -->
|
||||
<h4 class="form-section">
|
||||
<spring:message code="http_url_title" />
|
||||
<small> <span
|
||||
class="glyphicon glyphicon-plus asnIpAdd"
|
||||
onClick="addContent(this,'strInfo')" title="add"></span></small>
|
||||
</h4>
|
||||
<div class="row strInfo boxSolid asnIp hidden disabled">
|
||||
<!-- <input type="hidden" name="asnIpCfgs[0].protocolId" value="0"> -->
|
||||
<div class="row">
|
||||
<div class="pull-right">
|
||||
<span class="glyphicon glyphicon-remove pull-right" title="remove"
|
||||
onClick="delContent(this,'strInfo');" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<c:forEach items="${regionList}" var="region" varStatus="status">
|
||||
<%-- <c:set var="cfgName" value="urlCommGroupList[-1]"></c:set> --%>
|
||||
<%-- <input type="hidden" name="${cfgName}.sourceCompileId" value="${cfg.sourceCompileId }"> --%>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="keywords" />
|
||||
</label>
|
||||
<!-- 此配置的关键词可以输入多个关键词 -->
|
||||
<c:if test="${region.configMultiKeywords eq 1}">
|
||||
<div class="col-md-6">
|
||||
<input class="form-control required tags <c:if test="${fn:containsIgnoreCase(region.configServiceType,'domain') }"> domainCheck </c:if> <c:if test="${fn:containsIgnoreCase(region.configServiceType,'url') }"> urlCheck </c:if>" type="text" id="tags_${status.index}"
|
||||
name="urlCommGroupList[-1].cfgKeywords"
|
||||
>
|
||||
</div>
|
||||
</c:if>
|
||||
<!-- 此配置的关键词不允许输入多个关键词 -->
|
||||
<c:if test="${(region.configMultiKeywords eq 0) or (empty region.configMultiKeywords)}">
|
||||
<div class="col-md-6">
|
||||
<input class="form-control required invisibleChar
|
||||
<c:if test="${fn:containsIgnoreCase(region.configServiceType,'domain') }"> domainCheck </c:if>
|
||||
<c:if test="${fn:containsIgnoreCase(region.configServiceType,'url') }"> urlCheck </c:if>
|
||||
"
|
||||
type="text"
|
||||
name="urlCommGroupList[-1].cfgKeywords"
|
||||
>
|
||||
</div>
|
||||
</c:if>
|
||||
<div for="urlCommGroupList[-1].cfgKeywords"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6 exprType">
|
||||
<div class="form-group">
|
||||
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="expression_type" /></label>
|
||||
<div class="col-md-6">
|
||||
<c:if test="${!empty region.configExprType}">
|
||||
<c:forEach var="exprType" items="${fn:split(region.configExprType,',')}" varStatus="stat" >
|
||||
<c:forEach items="${fns:getDictList('EXPRESSION_TYPE')}" var="exprTypeC" >
|
||||
<c:if test="${exprTypeC.itemCode eq exprType}">
|
||||
<label class="radio-inline">
|
||||
<input type="radio"
|
||||
name="urlCommGroupList[-1].exprType" value="${exprType }"
|
||||
class="required"
|
||||
<c:if test="${stat.index == 0 }"> checked </c:if>
|
||||
|
||||
>
|
||||
<spring:message code="${exprTypeC.itemValue }" />
|
||||
</label>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
<c:if test="${empty region.configExprType}">
|
||||
<c:forEach items="${fns:getDictList('EXPRESSION_TYPE')}" var="exprTypeC">
|
||||
<c:if test="${exprTypeC.itemCode eq 0}">
|
||||
<label class="radio-inline">
|
||||
<input type="radio"
|
||||
name="urlCommGroupList[-1].exprType" value="${exprTypeC.itemCode }"
|
||||
class="required" checked >
|
||||
<spring:message code="${exprTypeC.itemValue }" />
|
||||
</label>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
</div>
|
||||
<div for="urlCommGroupList[-1].exprType"></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 matchMethod">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="match_method" /></label>
|
||||
<div class="col-md-6">
|
||||
<select name="urlCommGroupList[-1].matchMethod"
|
||||
class="selectpicker select2 form-control required ">
|
||||
<c:if test="${!empty region.configMatchMethod}">
|
||||
<c:forEach var="matchMethod" items="${fn:split(region.configMatchMethod,',')}">
|
||||
<c:forEach items="${fns:getDictList('MATCH_METHOD')}" var="matchMethodC">
|
||||
<c:if test="${matchMethodC.itemCode eq matchMethod}">
|
||||
<option value="${matchMethodC.itemCode}"
|
||||
>
|
||||
<spring:message code="${matchMethodC.itemValue}"/>
|
||||
</option>
|
||||
</c:if>
|
||||
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
<c:if test="${empty region.configMatchMethod}">
|
||||
<c:forEach items="${fns:getDictList('MATCH_METHOD')}" var="matchMethodC">
|
||||
<c:if test="${matchMethodC.itemCode eq 0}">
|
||||
<option value="${matchMethodC.itemCode}"
|
||||
selected
|
||||
>
|
||||
<spring:message code="${matchMethodC.itemValue}"/>
|
||||
</option>
|
||||
</c:if>
|
||||
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
</select>
|
||||
</div>
|
||||
<div for="urlCommGroupList[-1].matchMethod"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</c:forEach>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<%-- <div class="row">
|
||||
<button type="button" class="btn btn-red-hollow center-block"
|
||||
onClick="more(this);" data-click-times="0">
|
||||
<spring:message code="show_more" />
|
||||
</button>
|
||||
</div> --%>
|
||||
|
||||
|
||||
<div class="form-actions">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="row">
|
||||
<div class="col-md-offset-3 col-md-8">
|
||||
<button id="save" type="submit" class="btn green"><spring:message code="submit"/></button>
|
||||
<button id="cancel" type="button" class="btn default"><spring:message code="cancel"/></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6"> </div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<!-- END FORM-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
299
src/main/webapp/WEB-INF/views/basics/urlCommGroupFormUpdate.jsp
Normal file
299
src/main/webapp/WEB-INF/views/basics/urlCommGroupFormUpdate.jsp
Normal file
@@ -0,0 +1,299 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<title><spring:message code="url_group_configuration"></spring:message></title>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
|
||||
$("#cfgFrom").validate({
|
||||
errorPlacement: function(error,element){
|
||||
if($(element).parents().hasClass("tagsinput")){
|
||||
$(element).parents(".col-md-6").next("div").append(error);
|
||||
}else{
|
||||
$(element).parents(".form-group").find("div[for='"+element.attr("name")+"']").append(error);
|
||||
}
|
||||
},
|
||||
submitHandler: function(form){
|
||||
/* $("[name='country']").val($("[name='userRegion1'] option:selected").attr("country"));
|
||||
$("[name='detail']").val($("[name='userRegion1'] option:selected").attr("detail"));
|
||||
$("[name='asnIpGroup']").val($("[name='userRegion1'] option:selected").attr("asnIpGroup")); */
|
||||
var flag = true;
|
||||
/* $(".boxSolid:visible").find("input[name$='cfgKeywords']").each(function(){
|
||||
if($(this).val()==''){
|
||||
$(this).parents(".form-group").find(
|
||||
"div[for='"
|
||||
+ $(this).attr("name")
|
||||
+ "']").html("<label id=\"cfgKeywordsError\" class=\"error\">"+$("#keywordError").text()+"</label>");
|
||||
flag = false;
|
||||
}
|
||||
}); */
|
||||
$(".tagsinput:visible").each(function(){
|
||||
var text='';
|
||||
$(this).find(".tag").each(function(){
|
||||
text+=$(this).children("span").text().trim();
|
||||
});
|
||||
if(text.length < 4 || text.length > 1024){
|
||||
$(this).parents(".col-md-6").next("div").html("<label id=\"cfgKeywordsError\" class=\"error\">"+$.validator.messages.keywordLength+"</label>");
|
||||
if(flag){
|
||||
flag=false;
|
||||
}
|
||||
}
|
||||
});
|
||||
if(flag){
|
||||
loading('onloading...');
|
||||
form.submit();
|
||||
}else{
|
||||
return;
|
||||
}
|
||||
|
||||
},
|
||||
errorContainer: "#messageBox",
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<span id="keywordError" style="display:none"><spring:message code="required"></spring:message></span>
|
||||
<span id="tagsinputTip" style="display:none"><spring:message code="multiple_keywords_tip"></spring:message></span>
|
||||
<div class="page-content">
|
||||
|
||||
<h3 class="page-title">
|
||||
<spring:message code="url_group_configuration"></spring:message>
|
||||
</h3>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet box blue">
|
||||
<div class="portlet-title">
|
||||
<div class="caption">
|
||||
<i class="fa fa-gift"></i>
|
||||
<spring:message code="edit"></spring:message>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body form">
|
||||
<!-- BEGIN FORM-->
|
||||
<form id="cfgFrom" action="${ctx}/basics/url/update" method="post" class="form-horizontal">
|
||||
<input type="hidden" name="cfgId" value="${_cfg.cfgId}">
|
||||
<input type="hidden" name="regionId" value="${_cfg.regionId}">
|
||||
<input type="hidden" name="compileId" value="${_cfg.compileId}">
|
||||
<input type="hidden" name="functionId" value="${_cfg.functionId}">
|
||||
<input type="hidden" name="isValid" value="${_cfg.isValid}">
|
||||
<input type="hidden" name="isAudit" value="${_cfg.isAudit}">
|
||||
<input type="hidden" id="serviceId" name="serviceId" value="${_cfg.serviceId}">
|
||||
<input type="hidden" id="isAreaEffective" name="isAreaEffective" value="0">
|
||||
<input type="hidden" id="requestId" name="requestId" value="${_cfg.requestId}">
|
||||
<%-- <input type="hidden" id="protocolId" name="protocolId" value="${_cfg.protocolId}">
|
||||
<input type="hidden" id="asnIpGroup" name="asnIpGroup" value="${_cfg.asnIpGroup}"> --%>
|
||||
<!-- 配置域类型 -->
|
||||
<c:forEach items="${regionList}" var="region">
|
||||
<c:if test="${_cfg.functionId eq region.functionId}">
|
||||
<input type="hidden" name="cfgType" value="${region.configRegionValue}">
|
||||
<input type="hidden" name="cfgRegionCode"
|
||||
isMaat="${region.isMaat}"
|
||||
serviceType="${region.configServiceType}"
|
||||
ipPortShow="${region.configIpPortShow}"
|
||||
ipType="${region.configIpType}"
|
||||
ipPattern="${region.configIpPattern}"
|
||||
portPattern="${region.configPortPattern}"
|
||||
direction="${region.configDirection}"
|
||||
protocol="${region.configProtocol}"
|
||||
regionType="${region.regionType}"
|
||||
value="${region.configRegionCode}">
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
<div class="form-body">
|
||||
<!-- desc and action -->
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><spring:message code="config_describe"/></label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control" type="text" name="cfgDesc" value="${_cfg.cfgDesc}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="urlGroup"/></label>
|
||||
<div class="col-md-6">
|
||||
<%-- <input class="form-control required digits asnMustExists" type="text" name="${cfgName}.cfgKeywords" value="${cfg.cfgKeywords}" ctx="${ctx}"> --%>
|
||||
<select name="userRegion3" data-live-search="true" data-live-search-placeholder="search" class="selectpicker form-control required">
|
||||
<option value="${_cfg.userRegion3}"><spring:message code="select"/></option>
|
||||
<c:forEach items="${policyGroupInfos}" var="urlGroupInfo">
|
||||
<option value="${urlGroupInfo.serviceGroupId}"
|
||||
<c:if test="${_cfg.userRegion3 eq urlGroupInfo.serviceGroupId }">
|
||||
selected
|
||||
</c:if>
|
||||
>${urlGroupInfo.groupName}</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
<div for="userRegion3"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- desc and action -->
|
||||
<h4 class="form-section">
|
||||
<spring:message code="http_url_title" />
|
||||
<!-- <small> <span
|
||||
class="glyphicon glyphicon-plus asnIpAdd"
|
||||
onClick="addContent(this,'strInfo')" title="add"></span></small> -->
|
||||
</h4>
|
||||
<!-- <div class="row strInfo boxSolid asnIp hidden disabled"> -->
|
||||
<!-- <input type="hidden" name="asnIpCfgs[0].protocolId" value="0"> -->
|
||||
<!-- <div class="row">
|
||||
<div class="pull-right">
|
||||
<span class="glyphicon glyphicon-remove pull-right" title="remove"
|
||||
onClick="delContent(this,'strInfo');" />
|
||||
</div>
|
||||
</div> -->
|
||||
<div class=" boxSolid ">
|
||||
<div class="row" style="height: 15px;"></div>
|
||||
<c:forEach items="${regionList}" var="region" varStatus="status">
|
||||
<%-- <c:set var="cfgName" value="urlCommGroupList[-1]"></c:set> --%>
|
||||
<%-- <input type="hidden" name="${cfgName}.sourceCompileId" value="${cfg.sourceCompileId }"> --%>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="keywords" />
|
||||
</label>
|
||||
<!-- 此配置的关键词可以输入多个关键词 -->
|
||||
<c:if test="${region.configMultiKeywords eq 1}">
|
||||
<div class="col-md-6">
|
||||
<input class="form-control required tags <c:if test="${fn:containsIgnoreCase(region.configServiceType,'domain') }"> domainCheck </c:if> <c:if test="${fn:containsIgnoreCase(region.configServiceType,'url') }"> urlCheck </c:if>" type="text" id="tags_${tabName}${status.index}"
|
||||
name="cfgKeywords"
|
||||
value="${_cfg.cfgKeywords}">
|
||||
</div>
|
||||
</c:if>
|
||||
<!-- 此配置的关键词不允许输入多个关键词 -->
|
||||
<c:if test="${(region.configMultiKeywords eq 0) or (empty region.configMultiKeywords)}">
|
||||
<div class="col-md-6">
|
||||
<input class="form-control required invisibleChar
|
||||
<c:if test="${fn:containsIgnoreCase(region.configServiceType,'domain') }"> domainCheck </c:if>
|
||||
<c:if test="${fn:containsIgnoreCase(region.configServiceType,'url') }"> urlCheck </c:if>
|
||||
"
|
||||
type="text"
|
||||
name="cfgKeywords"
|
||||
value="${_cfg.cfgKeywords}">
|
||||
</div>
|
||||
</c:if>
|
||||
<div for="cfgKeywords"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6 exprType">
|
||||
<div class="form-group">
|
||||
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="expression_type" /></label>
|
||||
<div class="col-md-6">
|
||||
<c:if test="${!empty region.configExprType}">
|
||||
<c:forEach var="exprType" items="${fn:split(region.configExprType,',')}" varStatus="stat" >
|
||||
<c:forEach items="${fns:getDictList('EXPRESSION_TYPE')}" var="exprTypeC" >
|
||||
<c:if test="${exprTypeC.itemCode eq exprType}">
|
||||
<label class="radio-inline">
|
||||
<input type="radio"
|
||||
name="exprType" value="${exprType }"
|
||||
class="required"
|
||||
<%-- <c:if test="${stat.index == 0 }"> checked </c:if> --%>
|
||||
<c:if test="${_cfg.exprType eq exprType || (empty _cfg.exprType && exprType eq 0)}">
|
||||
checked
|
||||
</c:if>
|
||||
>
|
||||
<spring:message code="${exprTypeC.itemValue }" />
|
||||
</label>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
<c:if test="${empty region.configExprType}">
|
||||
<c:forEach items="${fns:getDictList('EXPRESSION_TYPE')}" var="exprTypeC">
|
||||
<c:if test="${exprTypeC.itemCode eq 0}">
|
||||
<label class="radio-inline">
|
||||
<input type="radio"
|
||||
name="exprType" value="${exprTypeC.itemCode }"
|
||||
class="required" checked >
|
||||
<spring:message code="${exprTypeC.itemValue }" />
|
||||
</label>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
</div>
|
||||
<div for="exprType"></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 matchMethod">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="match_method" /></label>
|
||||
<div class="col-md-6">
|
||||
<select name="matchMethod"
|
||||
class="selectpicker select2 form-control required ">
|
||||
<c:if test="${!empty region.configMatchMethod}">
|
||||
<c:forEach var="matchMethod" items="${fn:split(region.configMatchMethod,',')}">
|
||||
<c:forEach items="${fns:getDictList('MATCH_METHOD')}" var="matchMethodC">
|
||||
<c:if test="${matchMethodC.itemCode eq matchMethod}">
|
||||
<option value="${matchMethodC.itemCode}"
|
||||
>
|
||||
<spring:message code="${matchMethodC.itemValue}"/>
|
||||
</option>
|
||||
</c:if>
|
||||
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
<c:if test="${empty region.configMatchMethod}">
|
||||
<c:forEach items="${fns:getDictList('MATCH_METHOD')}" var="matchMethodC">
|
||||
<c:if test="${matchMethodC.itemCode eq 0}">
|
||||
<option value="${matchMethodC.itemCode}"
|
||||
selected
|
||||
>
|
||||
<spring:message code="${matchMethodC.itemValue}"/>
|
||||
</option>
|
||||
</c:if>
|
||||
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
</select>
|
||||
</div>
|
||||
<div for="matchMethod"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</c:forEach>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="row">
|
||||
<div class="col-md-offset-3 col-md-8">
|
||||
<button id="save" type="submit" class="btn green"><spring:message code="submit"/></button>
|
||||
<button id="cancel" type="button" class="btn default"><spring:message code="cancel"/></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6"> </div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<!-- END FORM-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
313
src/main/webapp/WEB-INF/views/basics/urlCommGroupList.jsp
Normal file
313
src/main/webapp/WEB-INF/views/basics/urlCommGroupList.jsp
Normal file
@@ -0,0 +1,313 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<title><spring:message code="url_group_configuration"></spring:message></title>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
//搜索框提示语初始化
|
||||
if("${cfg.cfgDesc}"){
|
||||
$("#intype").val("${cfg.cfgDesc}");
|
||||
}else if("${cfg.compileId}"){
|
||||
$("#intype").val("${cfg.compileId}");
|
||||
}else if("${cfg.cfgKeywords}"){
|
||||
$("#intype").val("${cfg.cfgKeywords}");
|
||||
}else{
|
||||
$("#intype").attr("placeholder","<spring:message code='input'/> "+$("#seltype").find("option:selected").text());
|
||||
}
|
||||
$("#seltype").change(function(){
|
||||
$("#intype").attr("placeholder","<spring:message code='input'/> "+$(this).find("option:selected").text());
|
||||
});
|
||||
//筛选功能初始化
|
||||
filterActionInit();
|
||||
$("#isAudit").change(function(){
|
||||
page();
|
||||
});
|
||||
//reset
|
||||
$("#resetBtn").on("click",function(){
|
||||
$("select.selectpicker").each(function(){
|
||||
$(this).selectpicker('val',$(this).find('option:first').val());
|
||||
$(this).find("option").attr("selected",false);
|
||||
$(this).find("option:first").attr("selected",true);
|
||||
});
|
||||
$(".Wdate").attr("value",'');
|
||||
$("#description").attr("value",'');
|
||||
$("#searchForm")[0].reset();
|
||||
});
|
||||
|
||||
if($("#exportType").val() != null && $("#exportType").val() != ""){
|
||||
if($("#intype").val() != null && $("#intype").val() != ""){
|
||||
$("#exportValue").val($("#intype").val());
|
||||
}
|
||||
}
|
||||
});
|
||||
var edit=function(url){
|
||||
var cked = $('tbody tr td input.i-checks:checkbox:checked');
|
||||
if(cked.val()==1){
|
||||
top.$.jBox.tip("<spring:message code='has_approved'/>", "<spring:message code='info'/>");
|
||||
return;
|
||||
}
|
||||
if(cked.length==1){
|
||||
window.location = url+"&compileId="+cked.attr("id");
|
||||
}else{
|
||||
top.$.jBox.tip("<spring:message code='check_one'/>", "<spring:message code='info'/>");
|
||||
return;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="page-content">
|
||||
<div class="theme-panel hidden-xs hidden-sm">
|
||||
<shiro:hasPermission name="asn:ip:config">
|
||||
<button type="button" class="btn btn-primary"
|
||||
onClick="javascript:window.location='${ctx}/basics/url/addForm?functionId=${cfg.functionId}'">
|
||||
<i class="fa fa-plus"></i>
|
||||
<spring:message code="add"></spring:message></button>
|
||||
|
||||
<button type="button" class="btn btn-primary import" >
|
||||
<i class="fa fa-plus"></i>
|
||||
<spring:message code="import"></spring:message></button>
|
||||
|
||||
</shiro:hasPermission>
|
||||
</div>
|
||||
|
||||
<h3 class="page-title">
|
||||
<spring:message code="url_group_configuration"></spring:message>
|
||||
|
||||
</h3>
|
||||
<h5 class="page-header"></h5>
|
||||
<div class="col-md-12">
|
||||
<div class="portlet">
|
||||
<div class="portlet-body">
|
||||
<div class="row" >
|
||||
<form:form id="searchForm" modelAttribute="cfg" action="${ctx}/basics/url/list?functionId=${cfg.functionId}" method="post" class="form-search">
|
||||
<input id="functionId" name="functionId" type="hidden" value="${cfg.functionId}"/>
|
||||
<input id="audit" name="audit" type="hidden" value="${audit}"/>
|
||||
<input id="exportType" type="hidden" value="${cfg.seltype}"/>
|
||||
<input id="exportValue" type="hidden" value=""/>
|
||||
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
|
||||
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
|
||||
<sys:tableSort id="orderBy" name="orderBy" value="${page.orderBy}"
|
||||
callback="page();" />
|
||||
<!-- 筛选按钮展开状态-->
|
||||
<input id="isFilterAction" name="isFilterAction" type="hidden" value="${cfg.isFilterAction }"/>
|
||||
<!-- 搜索内容与操作按钮栏 -->
|
||||
<div class="col-md-12">
|
||||
<%-- <div class="pull-left">
|
||||
<form:select path="asnIpGroup" class="selectpicker select2 input-small" data-live-search="true" data-live-search-placeholder="search">
|
||||
<form:option value=""><spring:message code='asn_ip_group'/></form:option>
|
||||
<c:forEach items="${policyGroups}" var="policyGroup">
|
||||
<form:option value="${policyGroup.groupId}"><spring:message code='${policyGroup.groupName}'/></form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div> --%>
|
||||
<div class="pull-left">
|
||||
<c:set var="state"><spring:message code='group'/></c:set>
|
||||
<form:select path="isAudit" class="selectpicker select2 input-small">
|
||||
<form:option value=""><spring:message code="all_states"/></form:option>
|
||||
<form:option value="0"><spring:message code="created"></spring:message></form:option>
|
||||
<form:option value="1"><spring:message code="approved"></spring:message></form:option>
|
||||
<form:option value="2"><spring:message code="unapproved"></spring:message></form:option>
|
||||
<form:option value="3"><spring:message code="cancel_approved"></spring:message></form:option>
|
||||
</form:select>
|
||||
</div>
|
||||
|
||||
<div class="pull-left">
|
||||
|
||||
<div class="input-group">
|
||||
<div class="input-group-btn">
|
||||
|
||||
<form:select path="seltype" class="selectpicker select2 input-small" >
|
||||
<form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
|
||||
<form:option value="compileId"><spring:message code="cfg_id"></spring:message></form:option>
|
||||
<form:option value="cfgKeywords"><spring:message code="URL"></spring:message></form:option>
|
||||
<%-- <form:option value="action"><spring:message code="block_type"></spring:message></form:option> --%>
|
||||
<form:option value="isValid"><spring:message code="valid_identifier"></spring:message></form:option>
|
||||
</form:select>
|
||||
|
||||
</div>
|
||||
|
||||
<input id="intype" class="form-control input-medium" type="text" value="">
|
||||
<div class="input-group-btn">
|
||||
<form:select path="isValid" class="selectpicker select2 input-small" >
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<form:option value="1"><spring:message code="yes"/></form:option>
|
||||
<form:option value="0"><spring:message code="no"/></form:option>
|
||||
</form:select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
<button type="button" class="btn blue" onClick="return page()"> <i class="fa fa-search"></i> <spring:message code="search"/> </button>
|
||||
<button type="button" class="btn btn-default" id="resetBtn"> <i class="fa fa-refresh"></i> <spring:message code="reset"/> </button>
|
||||
<button type="button" class="btn btn-default" id="filter-btn"> <spring:message code="filter"/> <i class="fa fa-angle-double-down"></i></button>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<shiro:hasPermission name="asn:ip:config">
|
||||
<sys:delRow url="${ctx}/basics/url/updateForm?functionId=${cfg.functionId}" id="contentTable" label="update"></sys:delRow>
|
||||
<sys:delRow url="${ctx}/basics/url/delete?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
|
||||
</shiro:hasPermission>
|
||||
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
<i class="fa fa-wrench"></i> <spring:message code="export"></spring:message>
|
||||
<i class="fa fa-angle-down"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu pull-right" style="min-width: 110px;" >
|
||||
<li><sys:delRow url="${ctx}/basics/url/exportUrlComm?functionId=${cfg.functionId }&exType=excel" searchUrl="${ctx}/basics/url/list?functionId=${cfg.functionId}" id="contentTable" maxRow="5" label="cfg_excel"></sys:delRow></li>
|
||||
<li><sys:delRow url="${ctx}/basics/url/exportUrlComm?functionId=${cfg.functionId }&exType=csv" searchUrl="${ctx}/basics/url/list?functionId=${cfg.functionId}" id="contentTable" maxRow="5" label="cfg_csv"></sys:delRow></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
<shiro:hasPermission name="asn:ip:confirm">
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
<i class="fa fa-wrench"></i> <spring:message code="examine"></spring:message>
|
||||
<i class="fa fa-angle-down"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu pull-right">
|
||||
<li><sys:delRow url="${ctx}/basics/url/audit?isAudit=1&isValid=1&functionId=${cfg.functionId }" id="contentTable" label="approved"></sys:delRow></li>
|
||||
<li><sys:delRow url="${ctx}/basics/url/audit?isAudit=2&isValid=0&functionId=${cfg.functionId }" id="contentTable" label="unapproved"></sys:delRow></li>
|
||||
<li><sys:delRow url="${ctx}/basics/url/audit?isAudit=3&isValid=0&functionId=${cfg.functionId }" id="contentTable" label="cancelPass"></sys:delRow></li>
|
||||
</ul>
|
||||
</div>
|
||||
</shiro:hasPermission>
|
||||
<a class="btn btn-icon-only btn-default setfields tooltips"
|
||||
data-container="body" data-placement="top" data-original-title=<spring:message code="custom_columns"/> href="javascript:;">
|
||||
<i class="icon-wrench"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /搜索内容与操作按钮栏 -->
|
||||
|
||||
<!-- 筛选搜索内容栏默认隐藏-->
|
||||
<div class="col-md-12 filter-action-select-panle hide" >
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label><spring:message code="config_time"/>:</label>
|
||||
<input name="search_create_time_start" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value='${cfg.search_create_time_start}' pattern='yyyy-MM-dd HH:mm:ss'/>" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label> </label>
|
||||
<input name="search_create_time_end" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_create_time_end}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label><spring:message code="edit_time"/>:</label>
|
||||
<input name="search_edit_time_start" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_edit_time_start}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label> </label>
|
||||
<input name="search_edit_time_end" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_edit_time_end}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label><spring:message code="audit_time"/>:</label>
|
||||
<input name="search_audit_time_start" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_audit_time_start}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label> </label>
|
||||
<input name="search_audit_time_end" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_audit_time_end}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<!-- /筛选搜索内容栏 结束-->
|
||||
</form:form>
|
||||
</div>
|
||||
<sys:message content="${message}" type="${messageType }"/>
|
||||
<div class="table-responsive">
|
||||
<table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><input type="checkbox" class="i-checks" id="checkAll"></th>
|
||||
<th class="sort-column r.compile_id" style="display: none;" column="cfg_id" ><spring:message code="cfg_id"/></th>
|
||||
|
||||
<th column="config_describe" ><spring:message code="config_describe"/></th>
|
||||
<th class="sort-column cfg_keywords">URL<spring:message code="key_word"/></th>
|
||||
<th><spring:message code="is_audit"/></th>
|
||||
<th column="sort-column group_name" ><spring:message code="group_name"/></th>
|
||||
<th column="valid_identifier" ><spring:message code="valid_identifier"/></th>
|
||||
<th column="creator" ><spring:message code="creator"/></th>
|
||||
<th column="config_time" class="sort-column create_time"><spring:message code="config_time"/></th>
|
||||
<th column="editor" ><spring:message code="editor"/></th>
|
||||
<th column="edit_time" class="sort-column edit_time"><spring:message code="edit_time"/></th>
|
||||
<th column="auditor"><spring:message code="auditor"/></th>
|
||||
<th class="sort-column audit_time"><spring:message code="audit_time"/></th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:forEach items="${page.list }" var="cfg" varStatus="status" step="1">
|
||||
<tr>
|
||||
<td><input type="checkbox" class="i-checks" id="${cfg.cfgId}" isValid="${cfg.isValid}" value="${cfg.isAudit}"></td>
|
||||
<td>${cfg.compileId }</td>
|
||||
<td>${cfg.cfgDesc }</td>
|
||||
<td>${cfg.cfgKeywords }</td>
|
||||
<td>
|
||||
<c:choose>
|
||||
<c:when test="${cfg.isAudit eq '0'}"><span class="label label-danger"><spring:message code="created"></spring:message></span></c:when>
|
||||
<c:when test="${cfg.isAudit eq '1'}"><span class="label label-success"><spring:message code="approved"></spring:message></span></c:when>
|
||||
<c:when test="${cfg.isAudit eq '2'}"><span class="label label-warning"><spring:message code="unapproved"></spring:message></span></c:when>
|
||||
<c:when test="${cfg.isAudit eq '3'}"><span class="label label-warning"><spring:message code="cancel_approved"></spring:message></span></c:when>
|
||||
</c:choose>
|
||||
</td>
|
||||
<td>${cfg.groupName }</td>
|
||||
<td>
|
||||
<c:if test="${cfg.isValid==0}"><spring:message code="no"/></c:if>
|
||||
<c:if test="${cfg.isValid==1}"><spring:message code="yes"/></c:if>
|
||||
<c:if test="${cfg.isValid==-1}"><spring:message code="deleted"/></c:if>
|
||||
</td>
|
||||
<td>${cfg.creatorName }</td>
|
||||
<td><fmt:formatDate value="${cfg.createTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<td>${cfg.editorName }</td>
|
||||
<td><fmt:formatDate value="${cfg.editTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<td>${cfg.auditorName }</td>
|
||||
<td><fmt:formatDate value="${cfg.auditTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="page">${page}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<c:set var="importPath" value="/basics/url/list?functionId=${cfg.functionId}"/>
|
||||
<!-- 模板导入,start -->
|
||||
<%@include file="/WEB-INF/include/excel/importModal.jsp" %>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,372 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<title><spring:message code="${cfgName}"></spring:message></title>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
$(".action").on("change", function() {
|
||||
$("#serviceId").val($(this).attr("serviceId"));
|
||||
});
|
||||
|
||||
$(".boxSolid:visible").find(".district").each(function(){
|
||||
$(this).change();
|
||||
});
|
||||
$("#serviceId").val($(".action:checked").attr("serviceId"));
|
||||
|
||||
if($("#serviceId").val()==1025 && $("#cfgId").val()!=null){
|
||||
$("input:radio[name$='exprType']").each(function(){
|
||||
if($(this).attr("checked") && $(this).val()==3){
|
||||
changeKeywordFormate($(this).val(),$(this));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$("#cfgFrom").validate({
|
||||
errorPlacement: function(error,element){
|
||||
if($(element).parents().hasClass("tagsinput")){
|
||||
$(element).parents(".col-md-6").next("div").append(error);
|
||||
}else{
|
||||
$(element).parents(".form-group").find("div[for='"+element.attr("name")+"']").append(error);
|
||||
}
|
||||
},
|
||||
submitHandler: function(form){
|
||||
//代表所有业务都隐藏了,提示必须增加一种业务数据
|
||||
if($(".boxSolid").length ==$(".boxSolid.hidden").length){
|
||||
top.$.jBox.tip("<spring:message code='one_more'/>", "<spring:message code='info'/>");
|
||||
return;
|
||||
}
|
||||
|
||||
//将disable属性的元素删除
|
||||
$(".disabled").each(function(){
|
||||
$(this).remove();
|
||||
});
|
||||
if($("input[name$='exprType']").attr("disabled")){
|
||||
$("input[name$='exprType']").attr("disabled",false);
|
||||
}
|
||||
$("#appCode").val($("#specServiceIdId").val());
|
||||
loading('onloading...');
|
||||
form.submit();
|
||||
|
||||
},
|
||||
errorContainer: "#messageBox",
|
||||
});
|
||||
|
||||
// 初始clone
|
||||
ipInfoDiv = $(".ipDiv").clone();
|
||||
if($(".ipDiv").hasClass("hidden")){
|
||||
$(".ipDiv").remove();
|
||||
}
|
||||
$(".addDiv").removeClass("hidden");
|
||||
|
||||
ipInfoDiv.removeClass("ipDiv");
|
||||
ipInfoDiv.removeClass("hidden");
|
||||
resetIndex();
|
||||
|
||||
});
|
||||
|
||||
var resetDiv = function(obj){
|
||||
// 添加 or 删除
|
||||
if($(obj).hasClass("addDiv")){
|
||||
$(".ipInfo").last().after(ipInfoDiv.clone());
|
||||
}else{
|
||||
if($(".ipInfo").length == 1){
|
||||
top.$.jBox.tip("<spring:message code='one_more'/>");
|
||||
return;
|
||||
}else{
|
||||
$(obj).parents(".ipInfo:first").remove();
|
||||
}
|
||||
}
|
||||
|
||||
$(".selectpicker").selectpicker("render");// 重新渲染
|
||||
$("select[name$='ipType']").on("change",function(){
|
||||
switchIpInfo(this);
|
||||
});
|
||||
$("select[name$='ipPattern']").on("change",function(){
|
||||
switchIpInfo(this);
|
||||
});
|
||||
resetIndex();
|
||||
}
|
||||
|
||||
var resetIndex = function(){
|
||||
// 设置索引
|
||||
$(".ipInfo").not(".hidden").each(function(index,element){
|
||||
var ind = index;
|
||||
$(this).find("input,select").each(function(){
|
||||
var oldName = $(this).attr("name");
|
||||
//var newName = oldName.replace(oldName.match(/\[(\S*)\]/)[1],ind);
|
||||
var newName = oldName;
|
||||
$(this).attr("name",newName);
|
||||
$(this).parents(".form-group").find("div[for='"+oldName+"']").attr("for",newName);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
//业务窗口打开
|
||||
var addContent = function(obj, contentClassName) {
|
||||
var showDiv = $(obj).parent().parent().next();
|
||||
$(showDiv).removeClass("hidden").removeClass(
|
||||
"disabled");
|
||||
$("select[name$='portPattern']").parents(".port").removeClass("hidden");
|
||||
$("input[name$='destIpAddress']").parents(".destPort").removeClass("hidden");
|
||||
$(".moreBtn").data("click-times",2);
|
||||
$(obj).addClass("hidden");
|
||||
}
|
||||
|
||||
//业务窗口关闭
|
||||
var delContent = function(contentClassName, addBtnClassName) {
|
||||
$("." + contentClassName).addClass("hidden").addClass("disabled");
|
||||
$("." + addBtnClassName).removeClass("hidden");
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<span id="keywordError" style="display:none"><spring:message
|
||||
code="required"></spring:message></span>
|
||||
<span id="tagsinputTip" style="display:none"><spring:message
|
||||
code="multiple_keywords_tip"></spring:message></span>
|
||||
<span id="l3_header_error" style="display:none"><spring:message
|
||||
code="l3_header_error"></spring:message></span>
|
||||
<div class="page-content">
|
||||
<c:forEach items="${serviceList}" var="service">
|
||||
<c:if test="${cfg.functionId eq service.functionId}">
|
||||
<c:set var="serviceName" value="${service.serviceName}"/>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
<h3 class="page-title">
|
||||
<spring:message code="${_cfg.menuNameCode }"></spring:message>
|
||||
</h3>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet box blue">
|
||||
<div class="portlet-title">
|
||||
<div class="caption">
|
||||
<i class="fa fa-gift"></i>
|
||||
<c:if test="${empty _cfg.cfgId}">
|
||||
<spring:message code="add"></spring:message>
|
||||
</c:if>
|
||||
<c:if test="${not empty _cfg.cfgId}">
|
||||
<spring:message code="edit"></spring:message>
|
||||
</c:if>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body form">
|
||||
<!-- BEGIN FORM-->
|
||||
<form id="cfgFrom" action="${ctx}/app/feature/saveAppMultiFeatureCfg"
|
||||
method="post" class="form-horizontal">
|
||||
<input type="hidden" name="cfgId" id="cfgId" value="${_cfg.cfgId}">
|
||||
<input type="hidden" name="compileId" value="${_cfg.compileId}">
|
||||
<input type="hidden" name="functionId" value="${_cfg.functionId}">
|
||||
<input type="hidden" id="serviceId" name="serviceId" value="${_cfg.serviceId}">
|
||||
<input type="hidden" id="appCode" name="appCode" value="${_cfg.appCode}">
|
||||
<input type="hidden" id="behavCode" name="behavCode" value="${_cfg.behavCode}">
|
||||
<input type="hidden" id="doLog" name="doLog" value="2">
|
||||
<c:set var="serviceId" value="${_cfg.serviceId}" />
|
||||
<!-- 配置域类型 -->
|
||||
<div class="form-body">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<c:set var="spec_service_id"><spring:message code="social_app"/></c:set>
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="social_app"/></label>
|
||||
<div class="col-md-6">
|
||||
<sys:treeselect id="specServiceId" name="specServiceId" value="${_cfg.specServiceId}" enableSearch="true"
|
||||
labelName="parent.specServiceName" notAllowSelectRoot="true" notAllowSelectParent="true" enableAddBtn="true"
|
||||
labelValue="${empty _cfg.specServiceId?spec_service_id:fns:getBySpecServiceId(_cfg.specServiceId).specServiceName}"
|
||||
title="${spec_service_id}" url="/specific/specificServiceCfg/treeData?isLeafShow=false&cfgType=1" extId=""
|
||||
cssClass="form-control required"/>
|
||||
</div>
|
||||
<div for="parent.specServiceName"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><spring:message
|
||||
code="config_describe" /></label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control" type="text" name="cfgDesc"
|
||||
value="${_cfg.cfgDesc}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 hidden">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><spring:message
|
||||
code="action" /></label>
|
||||
<div class="col-md-6">
|
||||
<c:forEach items="${serviceList}" var="service"
|
||||
varStatus="satus">
|
||||
<label class="radio-inline"> <c:if
|
||||
test="${_cfg.functionId eq service.functionId}">
|
||||
<input type="radio" name="action"
|
||||
serviceId="${service.serviceId }"
|
||||
protocolId="${service.protocolId }"
|
||||
regionCode="${service.regionCode }"
|
||||
value="${service.action }" class="required action"
|
||||
<c:if test="${_cfg.action==service.action || (_cfg.action==null && satus.index==0)}">checked</c:if>>
|
||||
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }"
|
||||
var="dict">
|
||||
<c:if test="${dict.itemCode eq service.action }">
|
||||
<spring:message code="${dict.itemValue }" />
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
<c:set var="serviceId" value="${service.serviceId}" />
|
||||
</c:if>
|
||||
</label>
|
||||
</c:forEach>
|
||||
</div>
|
||||
<div for="action"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<c:if test="${fns:getUser().isAdmin() or fns:getUser().loginId eq 'appUser' }">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><spring:message
|
||||
code="user_region" /></label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control" type="text" name="userRegion1" maxlength="1024"
|
||||
value="${_cfg.userRegion1}">
|
||||
</div>
|
||||
<div for="userRegion1"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
|
||||
<!-- 关联特征配置 start -->
|
||||
<h4 class="form-section">
|
||||
<spring:message code="Correlation Feature" />
|
||||
<small>
|
||||
<span class="glyphicon glyphicon-plus addDiv"
|
||||
onClick="resetDiv(this)" title="add"></span>
|
||||
</small>
|
||||
</h4>
|
||||
<div class="row ipInfo boxSolid ipDiv">
|
||||
<div class="row">
|
||||
<div class="pull-right">
|
||||
<span class="glyphicon glyphicon-remove pull-right" title="remove"
|
||||
onClick="resetDiv(this);" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<!-- 特征种类 -->
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><spring:message code="Feature Type"/></label>
|
||||
<div class="col-md-6">
|
||||
<select name="" class="selectpicker show-tick form-control">
|
||||
<option value=""><spring:message code="select"/></option>
|
||||
<option value="ip"><spring:message code="IP"/></option>
|
||||
<option value="domain"><spring:message code="Domain"/></option>
|
||||
<option value="payload"><spring:message code="Payload"/></option>
|
||||
<option value="http"><spring:message code="HTTP"/></option>
|
||||
<option value="ssl"><spring:message code="SSL"/></option>
|
||||
</select>
|
||||
</div>
|
||||
<div for=""></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 特征属性 -->
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><spring:message code="Feature Attributes"/></label>
|
||||
<div class="col-md-6">
|
||||
<select name="" class="selectpicker show-tick form-control" multiple="multiple">
|
||||
<option value=""><spring:message code="weak_feature"/></option>
|
||||
<option value=""><spring:message code="whitelist_feature"/></option>
|
||||
<option value=""><spring:message code="extend_scan_pktNum"/></option>
|
||||
<option value=""><spring:message code="long_stream_lock_time"/></option>
|
||||
<option value=""><spring:message code="correlation_block_after"/></option>
|
||||
<option value=""><spring:message code="correlation_valid_time"/></option>
|
||||
</select>
|
||||
</div>
|
||||
<div for=""></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><spring:message code="Feature Configs"/></label>
|
||||
<div class="col-md-6">
|
||||
<select name="" class="selectpicker show-tick form-control" data-live-search="true" data-live-search-placeholder="search">
|
||||
<option value=""><spring:message code="select"/></option>
|
||||
<option value="cfg1">APP_Feature_Cfg_1</option>
|
||||
<option value="cfg2">APP_Feature_Cfg_2</option>
|
||||
<option value="cfg3">APP_Feature_Cfg_3</option>
|
||||
</select>
|
||||
</div>
|
||||
<div for=""></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><spring:message code="Hit Counts" /></label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control number digits" placeholder="1" min="1" max="16" type="text" name="">
|
||||
</div>
|
||||
<div for=""></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 关联特征配置 end -->
|
||||
|
||||
<c:set var="strCfgIndex" value="0"></c:set>
|
||||
<c:forEach items="${regionList}" var="region" varStatus="status">
|
||||
<c:if test="${region.regionType eq 9 }">
|
||||
<c:set var="tabName" value="${region.configRegionValue}Tab"></c:set>
|
||||
<h4 class="form-section"><spring:message code="${region.configRegionValue}" />
|
||||
<small>
|
||||
<span class="glyphicon glyphicon-plus ${tabName}Add"
|
||||
onClick="addContent(this,'${tabName}')" title="add"></span></small>
|
||||
</h4>
|
||||
<c:set var="cfgName" value="appFeaturePropCfgList[0]"></c:set>
|
||||
<div class="row boxSolid ${tabName}${status.index} <c:if test="${fn:length(_cfg.appFeaturePropCfgList)==0}"> hidden disabled</c:if>">
|
||||
<input type="hidden" name="cfgRegionValue" value="${region.configRegionValue }">
|
||||
<input type="hidden" name="cfgRegionType" value="${region.regionType }">
|
||||
<input type="hidden" name="cfgRegionCode1" value="${region.configRegionCode }">
|
||||
<%@include file="/WEB-INF/views/cfg/app/appFeatureProp.jsp"%>
|
||||
</div>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
|
||||
<input name="isAreaEffective" type="hidden" value="0">
|
||||
<input type="hidden" name="requestId" value="0" />
|
||||
<input type="hidden" name="classify" value="0" />
|
||||
<input type="hidden" name="attribute" value="0" />
|
||||
<input type="hidden" name="lable" value="0" />
|
||||
<div class="form-actions">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="row">
|
||||
<div class="col-md-offset-3 col-md-8">
|
||||
<button id="save" type="submit" class="btn green">
|
||||
<spring:message code="submit" />
|
||||
</button>
|
||||
<button id="cancel" type="button" class="btn default">
|
||||
<spring:message code="cancel" />
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<!-- END FORM-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -40,6 +40,22 @@ $(function(){
|
||||
errorContainer: "#messageBox",
|
||||
});
|
||||
});
|
||||
//业务窗口打开
|
||||
var addContent = function(obj, contentClassName) {
|
||||
var showDiv = $(obj).parent().parent().next();
|
||||
$(showDiv).removeClass("hidden").removeClass("disabled");
|
||||
$("select[name$='portPattern']").parents(".port").removeClass("hidden");
|
||||
$("input[name$='destIpAddress']").parents(".destPort").removeClass("hidden");
|
||||
$(".moreBtn").data("click-times",2);
|
||||
$(obj).addClass("hidden");
|
||||
}
|
||||
|
||||
//业务窗口关闭
|
||||
var delContent = function(contentClassName, addBtnClassName) {
|
||||
$("." + contentClassName).addClass("hidden").addClass("disabled");
|
||||
$("." + addBtnClassName).removeClass("hidden");
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
@@ -168,7 +184,7 @@ $(function(){
|
||||
</div>
|
||||
</div>
|
||||
<c:forEach items="${regionList}" var="region">
|
||||
<c:if test="${_cfg.functionId eq region.functionId}">
|
||||
<c:if test="${_cfg.functionId eq region.functionId && region.regionType ne 9}">
|
||||
<input type="hidden" name="cfgType" value="${region.configRegionValue}">
|
||||
<input type="hidden" name="cfgRegionCode" serviceType="${region.configServiceType }" value="${region.configRegionCode }">
|
||||
<input type="hidden" name="configMultiKeywords" value="${region.configMultiKeywords }">
|
||||
@@ -363,7 +379,22 @@ $(function(){
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
<c:if test="${region.regionType eq 9 }">
|
||||
<c:set var="tabName" value="${region.configRegionValue}Tab"></c:set>
|
||||
<h4 class="form-section"><spring:message code="${region.configRegionValue}" />
|
||||
<small>
|
||||
<span class="glyphicon glyphicon-plus ${tabName}Add"
|
||||
onClick="addContent(this,'${tabName}')" title="add"></span></small>
|
||||
</h4>
|
||||
<c:set var="cfgName" value="appFeaturePropCfgList[0]"></c:set>
|
||||
<div class="row boxSolid ${tabName}${status.index} <c:if test="${fn:length(_cfg.appFeaturePropCfgList)==0}"> hidden disabled</c:if>">
|
||||
<input type="hidden" name="cfgRegionValue" value="${region.configRegionValue }">
|
||||
<input type="hidden" name="cfgRegionType" value="${region.regionType }">
|
||||
<input type="hidden" name="cfgRegionCode1" value="${region.configRegionCode }">
|
||||
<%@include file="/WEB-INF/views/cfg/app/appFeatureProp.jsp"%>
|
||||
</div>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</div>
|
||||
<input name="isAreaEffective" type="hidden" value="0">
|
||||
<%-- <%@include file="/WEB-INF/include/form/areaInfo.jsp" %> --%>
|
||||
|
||||
203
src/main/webapp/WEB-INF/views/cfg/app/appFeatureProp.jsp
Normal file
203
src/main/webapp/WEB-INF/views/cfg/app/appFeatureProp.jsp
Normal file
@@ -0,0 +1,203 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
|
||||
</head>
|
||||
<div class="row">
|
||||
<div class="pull-right">
|
||||
<span class="glyphicon glyphicon-remove pull-right" title="remove"
|
||||
onClick="delContent('${tabName}${status.index}','${tabName}Add');" />
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<!-- 控管组件 -->
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-4"> <spring:message
|
||||
code="drop_option" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-6 input-group showDiv">
|
||||
<span class="input-group-addon"> <input type="checkbox"
|
||||
class="showFlag"
|
||||
<c:if test="${_cfg.appFeaturePropCfgList[0].dropOpt != null}">checked</c:if> />
|
||||
<span></span>
|
||||
</span> <input class="form-control number showInfo" type="text"
|
||||
range="[0,7200]" defaultVal="180" name="${cfgName}.dropOpt"
|
||||
name="" value="${_cfg.appFeaturePropCfgList[0].dropOpt}"
|
||||
disabled="disabled">
|
||||
</div>
|
||||
<div for="${cfgName}.dropOpt"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-4"> <spring:message
|
||||
code="loop_option" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-6 input-group showDiv">
|
||||
<span class="input-group-addon"> <input type="checkbox"
|
||||
class="showFlag"
|
||||
<c:if test="${_cfg.appFeaturePropCfgList[0].loopOpt != null}">checked</c:if> />
|
||||
<span></span>
|
||||
</span> <input class="form-control number showInfo" type="text"
|
||||
range="[0,7200]" defaultVal="180" name="${cfgName}.loopOpt"
|
||||
name="" value="${_cfg.appFeaturePropCfgList[0].loopOpt}"
|
||||
disabled="disabled">
|
||||
</div>
|
||||
<div for="${cfgName}.loopOpt"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 特征组件属性 -->
|
||||
<div class="row" <c:if test="${region.configExprType eq 1}">hidden</c:if>>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-4"> <spring:message
|
||||
code="weak_feature" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<div class="mt-checkbox-inline">
|
||||
<label class="mt-checkbox"> <input type="checkbox"
|
||||
name="${cfgName}.weakFeature" value="DKC=11;DKS=1;"
|
||||
<c:if test="${_cfg.appFeaturePropCfgList[0].weakFeature != null}">checked</c:if> />
|
||||
<span></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-4"> <spring:message
|
||||
code="whitelist_feature" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<div class="mt-checkbox-inline">
|
||||
<label class="mt-checkbox"> <!-- 循环查看user_region中是否包含属性 -->
|
||||
<input type="checkbox" name="${cfgName}.whitelistFeature"
|
||||
value="DKC=13;DKS=1;"
|
||||
<c:if test="${_cfg.appFeaturePropCfgList[0].whitelistFeature != null}">checked</c:if> />
|
||||
<span></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-4"> <spring:message
|
||||
code="extend_scan_pktNum" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-6 input-group showDiv">
|
||||
<span class="input-group-addon"> <input type="checkbox"
|
||||
class="showFlag"
|
||||
<c:if test="${_cfg.appFeaturePropCfgList[0].extendScanPktNum != null}">checked</c:if> />
|
||||
<span></span>
|
||||
</span> <input class="form-control number showInfo" type="text"
|
||||
disabled="disabled" name="${cfgName}.extendScanPktNum"
|
||||
range="[2,8]" defaultVal="4"
|
||||
value="${_cfg.appFeaturePropCfgList[0].extendScanPktNum}">
|
||||
</div>
|
||||
</div>
|
||||
<div for="${cfgName}.extendScanPktNum"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-4"> <spring:message
|
||||
code="long_stream_lock_time" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-6 input-group showDiv">
|
||||
<span class="input-group-addon"> <input type="checkbox"
|
||||
class="showFlag"
|
||||
<c:if test="${_cfg.appFeaturePropCfgList[0].longStreamLockTime != null}">checked</c:if> />
|
||||
<span></span>
|
||||
</span> <input class="form-control number showInfo" type="text"
|
||||
name="${cfgName}.longStreamLockTime" range="[30,300]"
|
||||
defaultVal="180"
|
||||
value="${_cfg.appFeaturePropCfgList[0].longStreamLockTime}"
|
||||
disabled="disabled">
|
||||
</div>
|
||||
</div>
|
||||
<div for="${cfgName}.longStreamLockTime"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-4"> <spring:message
|
||||
code="correlation_block_after" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<div class="mt-checkbox-inline">
|
||||
<label class="mt-checkbox"> <input type="checkbox"
|
||||
name="${cfgName}.correlationBlockAfter" value="DKC=12;DKS=1;"
|
||||
<c:if test="${_cfg.appFeaturePropCfgList[0].correlationBlockAfter != null}">checked</c:if> />
|
||||
<span></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-4"> <spring:message
|
||||
code="correlation_valid_time" />
|
||||
</label>
|
||||
<div class="col-md-6 showDiv">
|
||||
<div class="col-md-6 input-group showDiv">
|
||||
<span class="input-group-addon"> <input type="checkbox"
|
||||
class="showFlag"
|
||||
<c:if test="${_cfg.appFeaturePropCfgList[0].correlationValidTime != null}">checked</c:if> />
|
||||
<span></span>
|
||||
</span> <input class="form-control number showInfo" type="text"
|
||||
disabled="disabled" range="[0,360]" defaultVal="10"
|
||||
name="${cfgName}.correlationValidTime"
|
||||
value="${_cfg.appFeaturePropCfgList[0].correlationValidTime}">
|
||||
</div>
|
||||
</div>
|
||||
<div for="${cfgName}.correlationValidTime"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</html>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$(".showFlag").on("click", function() {
|
||||
var obj = $(this).parents(".showDiv").find(".showInfo");
|
||||
if ($(this).is(':checked')) {
|
||||
$(obj).val($(obj).attr("defaultVal"));
|
||||
$(obj).removeAttr("disabled");
|
||||
} else {
|
||||
$(obj).val("");
|
||||
$(obj).attr("disabled", "disabled");
|
||||
}
|
||||
});
|
||||
$(".showFlag").each(function() {
|
||||
var obj = $(this).parents(".showDiv").find(".showInfo");
|
||||
if ($(this).is(':checked')) {
|
||||
$(obj).removeAttr("disabled");
|
||||
} else {
|
||||
$(obj).attr("disabled", "disabled");
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
614
src/main/webapp/WEB-INF/views/cfg/app/appFeatureSessionForm.jsp
Normal file
614
src/main/webapp/WEB-INF/views/cfg/app/appFeatureSessionForm.jsp
Normal file
@@ -0,0 +1,614 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
|
||||
</head>
|
||||
<%-- <c:forEach items="${regionList}" var="regionDistrict">
|
||||
<c:if
|
||||
test="${cfg.functionId eq regionDistrict.functionId
|
||||
and regionDistrict.regionType eq 3
|
||||
and regionValue eq regionDistrict.configRegionValue}"> --%>
|
||||
<!-- regionDistrict.regionType==3表示增强字符串类配置 -->
|
||||
<input type="hidden" name="${cfgName}.cfgType" value="${region.configRegionValue }">
|
||||
<input type="hidden" name="${cfgName}.cfgRegionCode" serviceType="${region.configServiceType }" value="${region.configRegionCode }">
|
||||
<input type="hidden" name="${cfgName}.configMultiKeywords" value="${region.configMultiKeywords }">
|
||||
<input type="hidden" name="${cfgName}.configServiceType" value="${region.configServiceType }">
|
||||
<input type="hidden" name="${cfgName}.configHex" value="${region.configHex }">
|
||||
<%-- </c:if>
|
||||
</c:forEach> --%>
|
||||
|
||||
<div class="row">
|
||||
<div class="pull-right">
|
||||
<span class="glyphicon glyphicon-remove pull-right" title="remove"
|
||||
onClick="delContent('${tabName}${status.index}','${tabName}Add');" />
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<c:if test="${!empty region.configDistrict }">
|
||||
<div class="row hidden">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="district" /></label>
|
||||
<div class="col-md-6">
|
||||
<select name="${cfgName}.district"
|
||||
class="selectpicker show-tick form-control required district" onchange="changeDistrict($(this))">
|
||||
<c:forEach items="${fn:split(region.configDistrict,',')}"
|
||||
var="_district">
|
||||
<option value="${_district }"
|
||||
<c:if test="${cfg.district==_district}">selected</c:if>>${_district }</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
<input type="hidden" name="${cfgName}.districtShowName" maxlength="64" placeholder="<spring:message code='please_input'/> <spring:message code='custom_region'/>" class="otherValue form-control invisibleChar" value="${cfg.district}"/>
|
||||
</div>
|
||||
<div for="${cfgName}.districtShowName"></div>
|
||||
<div for="${cfgName}.district"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
<c:if test="${region.functionId ne 566 }">
|
||||
<!-- session组件属性 -->
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">
|
||||
<spring:message code="L4 Protocol" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<select name="${cfgName}.ver" class="selectpicker show-tick form-control">
|
||||
<option value=""><spring:message code="select"/></option>
|
||||
<option value="6" <c:if test="${cfg.ver eq 6}">selected</c:if>><spring:message code="TCP"/></option>
|
||||
<option value="17" <c:if test="${cfg.ver eq 17}">selected</c:if>><spring:message code="UDP"/></option>
|
||||
<option value="50" <c:if test="${cfg.ver eq 50}">selected</c:if>><spring:message code="ESP"/></option>
|
||||
<option value="1" <c:if test="${cfg.ver eq 1}">selected</c:if>><spring:message code="ICMP"/></option>
|
||||
<%-- <c:forEach items="${fns:getDictList('PROTOCOL')}" var="dict">
|
||||
<option value="${dict.itemCode }"
|
||||
<c:if test="${cfg.ver == dict}">selected</c:if>>${dict.itemValue }</option>
|
||||
</c:forEach> --%>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">
|
||||
<spring:message code="Server Port" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control number sessionDPortCheck" type="text" name="${cfgName}.headerType" value="${cfg.headerType}">
|
||||
</div>
|
||||
<div for="${cfgName}.headerType"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">
|
||||
<spring:message code="L7 Protocol" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<select name="${cfgName}.tos" class="selectpicker show-tick form-control" data-live-search="true" data-live-search-placeholder="search" >
|
||||
<option value=""><spring:message code="select"/></option>
|
||||
<option value="0" <c:if test="${cfg.tos == '0'}">selected</c:if>><spring:message code="Unknown L7 Protocol"/></option>
|
||||
<c:forEach items="${l7ProtoList}" var="proto">
|
||||
<option value="${proto.specServiceCode }"
|
||||
<c:if test="${cfg.tos == proto.specServiceCode}">selected</c:if>>${proto.specServiceName }
|
||||
</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<%-- <div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">
|
||||
<spring:message code="Private Protocol" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<div class="mt-checkbox-inline">
|
||||
<label class="mt-checkbox">
|
||||
<input type="checkbox" name="${cfgName}.ihl" value="1" class="privateProto"
|
||||
<c:if test="${cfg.ihl != null}">checked</c:if>
|
||||
/>
|
||||
<span></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> --%>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">
|
||||
<spring:message code="TCP Nodelay" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<div class="mt-checkbox-inline">
|
||||
<label class="mt-checkbox">
|
||||
<input type="checkbox" name="${cfgName}.flags" value="1"
|
||||
<c:if test="${cfg.flags != null}">checked</c:if>
|
||||
/>
|
||||
<span></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">
|
||||
<spring:message code="TCP Without SYN" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<div class="mt-checkbox-inline">
|
||||
<label class="mt-checkbox">
|
||||
<input type="checkbox" name="${cfgName}.totalLength" value="1"
|
||||
<c:if test="${cfg.totalLength != null}">checked</c:if>
|
||||
/>
|
||||
<span></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">
|
||||
<spring:message code="Find by Domain" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<div class="mt-checkbox-inline">
|
||||
<label class="mt-checkbox">
|
||||
<input type="checkbox" name="${cfgName}.fragmentOffset" value="1"
|
||||
<c:if test="${cfg.fragmentOffset != null}">checked</c:if>
|
||||
/>
|
||||
<span></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">
|
||||
<spring:message code="Use Loop" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<div class="mt-checkbox-inline">
|
||||
<label class="mt-checkbox">
|
||||
<input type="checkbox" name="${cfgName}.payloadPacketDirection" value="1"
|
||||
<c:if test="${cfg.payloadPacketDirection != null}">checked</c:if>
|
||||
/>
|
||||
<span></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">
|
||||
<spring:message code="Session Size Min" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control number sessionSizeMin" type="text" min="0" maxlength="9" name="${cfgName}.payloadOffset" value="${cfg.payloadOffset}">
|
||||
</div>
|
||||
<div for="${cfgName}.payloadOffset"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">
|
||||
<spring:message code="Session Size Max" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control number sessionSizeMax" type="text" min="0" maxlength="9" name="${cfgName}.payloadSize" value="${cfg.payloadSize}">
|
||||
</div>
|
||||
<div for="${cfgName}.payloadSize"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">
|
||||
<spring:message code="C2S" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<div class="mt-radio-inline">
|
||||
<label class="mt-radio">
|
||||
<input type="radio" class="c2s_radio" name="${cfgName}.sessionC2sRadio" value="c2sPayload"
|
||||
<c:if test="${!empty cfg.icmpIdentifier }"> checked</c:if> />
|
||||
<spring:message code="Payload Size Seq" />
|
||||
<span></span>
|
||||
</label>
|
||||
<label class="mt-radio">
|
||||
<input type="radio" class="c2s_radio" name="${cfgName}.sessionC2sRadio" value="c2sFrequent"
|
||||
<c:if test="${!empty cfg.icmpCode }"> checked</c:if> />
|
||||
<spring:message code="Frequent Payload size" />
|
||||
<span></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 c2sPayload <c:if test='${empty cfg.icmpIdentifier }'>hidden</c:if>">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">
|
||||
<spring:message code="C2S Payload Size Seq" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control number tags c2sAndS2cInput" type="text" name="${cfgName}.icmpIdentifier" value="${cfg.icmpIdentifier}">
|
||||
</div>
|
||||
<div for="${cfgName}.icmpIdentifier"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 c2sFrequent <c:if test='${empty cfg.icmpCode }'>hidden</c:if>">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">
|
||||
<spring:message code="C2S Frequent Payload size" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control number tags c2sAndS2cInput" type="text" name="${cfgName}.icmpCode" value="${cfg.icmpCode}">
|
||||
</div>
|
||||
<div for="${cfgName}.icmpCode"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">
|
||||
<spring:message code="S2C" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<div class="mt-radio-inline">
|
||||
<label class="mt-radio">
|
||||
<input type="radio" class="s2c_radio" name="${cfgName}.sessionS2cRadio" value="s2cPayload"
|
||||
<c:if test="${!empty cfg.icmpType }"> checked</c:if> />
|
||||
<spring:message code="Payload Size Seq" />
|
||||
<span></span>
|
||||
</label>
|
||||
<label class="mt-radio">
|
||||
<input type="radio" class="s2c_radio" name="${cfgName}.sessionS2cRadio" value="s2cFrequent"
|
||||
<c:if test="${!empty cfg.protocol }"> checked</c:if> />
|
||||
<spring:message code="Frequent Payload size" />
|
||||
<span></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 s2cPayload <c:if test='${empty cfg.icmpType }'>hidden</c:if>">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">
|
||||
<spring:message code="S2C Payload Size Seq" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control tags c2sAndS2cInput" type="text" name="${cfgName}.icmpType" value="${cfg.icmpType}">
|
||||
</div>
|
||||
<div for="${cfgName}.icmpType"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 s2cFrequent <c:if test='${empty cfg.protocol }'>hidden</c:if>">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">
|
||||
<spring:message code="S2C Frequent Payload size" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control tags c2sAndS2cInput" type="text" name="${cfgName}.protocol" value="${cfg.protocol}">
|
||||
</div>
|
||||
<div for="${cfgName}.protocol"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</c:if>
|
||||
<c:if test="${region.functionId eq 566 }">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">
|
||||
<spring:message code="TLS Session Resumption" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<div class="mt-checkbox-inline">
|
||||
<label class="mt-checkbox">
|
||||
<input type="checkbox" name="${cfgName}.userRegion3" value="1"
|
||||
<c:if test="${cfg.userRegion3 != null}">checked</c:if>
|
||||
/>
|
||||
<span></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">
|
||||
<spring:message code="TLS Single Certificate" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<div class="mt-checkbox-inline">
|
||||
<label class="mt-checkbox">
|
||||
<input type="checkbox" name="${cfgName}.userRegion4" value="1"
|
||||
<c:if test="${cfg.userRegion4 != null}">checked</c:if>
|
||||
/>
|
||||
<span></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">
|
||||
<spring:message code="TLS Self-issued Certificate" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<div class="mt-checkbox-inline">
|
||||
<label class="mt-checkbox">
|
||||
<input type="checkbox" name="${cfgName}.userRegion5" value="1"
|
||||
<c:if test="${cfg.userRegion5 != null}">checked</c:if>
|
||||
/>
|
||||
<span></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
|
||||
<%-- <div class="row keywords">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<c:choose>
|
||||
<c:when test="${fn:containsIgnoreCase(region.configServiceType,'domain') }">
|
||||
<spring:message code="domain" />
|
||||
</c:when>
|
||||
<c:when test="${fn:containsIgnoreCase(region.configServiceType,'url') }">
|
||||
<spring:message code="URL" />
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<spring:message code="keywords" />
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</label>
|
||||
|
||||
<!-- 此配置的关键词可以输入多个关键词 -->
|
||||
<c:if test="${region.configMultiKeywords eq 1}">
|
||||
<div class="col-md-6">
|
||||
<input class="form-control required tags" type="text" id="tags_${tabName}${status.index}"
|
||||
name="${cfgName}.cfgKeywords"
|
||||
value="${cfg.cfgKeywords}">
|
||||
</div>
|
||||
</c:if>
|
||||
<!-- 此配置的关键词不允许输入多个关键词 -->
|
||||
<c:if test="${(region.configMultiKeywords eq 0) or (empty region.configMultiKeywords)}">
|
||||
<div class="col-md-6">
|
||||
|
||||
<input class="form-control required invisibleChar
|
||||
<c:if test="${fn:containsIgnoreCase(region.configServiceType,'domain') }"> domainCheck </c:if>
|
||||
"
|
||||
type="text"
|
||||
name="${cfgName}.cfgKeywords"
|
||||
value="${cfg.cfgKeywords}">
|
||||
</div>
|
||||
</c:if>
|
||||
|
||||
<div for="${cfgName}.cfgKeywords"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div> --%>
|
||||
|
||||
<div class="row hidden">
|
||||
<div class="col-md-6 exprType">
|
||||
<div class="form-group">
|
||||
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="expression_type" /></label>
|
||||
<div class="col-md-6">
|
||||
<c:if test="${!empty region.configExprType}">
|
||||
<c:forEach var="exprType" items="${fn:split(region.configExprType,',')}" varStatus="stat" >
|
||||
<c:forEach items="${fns:getDictList('EXPRESSION_TYPE')}" var="exprTypeC" >
|
||||
<c:if test="${exprTypeC.itemCode eq exprType}">
|
||||
<label class="radio-inline">
|
||||
<input type="radio"
|
||||
name="${cfgName}.exprType" value="${exprType }"
|
||||
class="required"
|
||||
<c:if test="${stat.index == 0 }"> checked </c:if>
|
||||
<c:if test="${cfg.exprType eq exprType || (empty cfg.exprType && exprType eq 0)}">
|
||||
checked
|
||||
</c:if>
|
||||
>
|
||||
<spring:message code="${exprTypeC.itemValue }" />
|
||||
</label>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
<c:if test="${empty region.configExprType}">
|
||||
<c:forEach items="${fns:getDictList('EXPRESSION_TYPE')}" var="exprTypeC">
|
||||
<c:if test="${exprTypeC.itemCode eq 0}">
|
||||
<label class="radio-inline">
|
||||
<input type="radio"
|
||||
name="${cfgName}.exprType" value="${exprTypeC.itemCode }"
|
||||
class="required" checked >
|
||||
<spring:message code="${exprTypeC.itemValue }" />
|
||||
</label>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
</div>
|
||||
<div for="${cfgName}.exprType"></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 matchMethod">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="match_method" /></label>
|
||||
<div class="col-md-6">
|
||||
<select name="${cfgName}.matchMethod"
|
||||
class="selectpicker select2 form-control required ">
|
||||
<c:if test="${!empty region.configMatchMethod}">
|
||||
<c:forEach var="matchMethod" items="${fn:split(region.configMatchMethod,',')}">
|
||||
<c:forEach items="${fns:getDictList('MATCH_METHOD')}" var="matchMethodC">
|
||||
<c:if test="${matchMethodC.itemCode eq matchMethod}">
|
||||
<option value="${matchMethodC.itemCode}"
|
||||
<c:if test="${cfg.matchMethod eq matchMethod || (empty cfg.matchMethod && matchMethod eq 0)}">
|
||||
selected
|
||||
</c:if>
|
||||
>
|
||||
<spring:message code="${matchMethodC.itemValue}"/>
|
||||
</option>
|
||||
</c:if>
|
||||
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
<c:if test="${empty region.configMatchMethod}">
|
||||
<c:forEach items="${fns:getDictList('MATCH_METHOD')}" var="matchMethodC">
|
||||
<c:if test="${matchMethodC.itemCode eq 0}">
|
||||
<option value="${matchMethodC.itemCode}"
|
||||
selected
|
||||
>
|
||||
<spring:message code="${matchMethodC.itemValue}"/>
|
||||
</option>
|
||||
</c:if>
|
||||
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
</select>
|
||||
</div>
|
||||
<div for="${cfgName}.matchMethod"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row <c:if test="${fn:length(fn:split(region.configHex,',')) ==1}">hidden</c:if>">
|
||||
<c:if test="${!empty region.configHex}">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="is_hex"/></label>
|
||||
<div class="col-md-6">
|
||||
<!-- isP2pHashCfg: P2PHash配置只能是十六进制字符 -->
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="${cfgName}.isHex" value="1" class="required"
|
||||
><spring:message code="hex"/>
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="${cfgName}.isHex" value="0" class="required"
|
||||
><spring:message code="not_hex"/>
|
||||
</label>
|
||||
</div>
|
||||
<div for="${cfgName}.isHex"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="is_case_insenstive"/></label>
|
||||
<div class="col-md-6">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="${cfgName}.isCaseSenstive" value="1" class="required"
|
||||
><spring:message code="case_senstive"/>
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="${cfgName}.isCaseSenstive" value="0" class="required"
|
||||
><spring:message code="case_insenstive"/>
|
||||
</label>
|
||||
</div>
|
||||
<div for="${cfgName}.isCaseInsenstive"></div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
<c:if test="${empty region.configHex}">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="is_hex"/></label>
|
||||
<div class="col-md-6">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="${cfgName}.isHex" value="0" class="required" checked
|
||||
><spring:message code="not_hex"/>
|
||||
</label>
|
||||
</div>
|
||||
<div for="${cfgName}.isHex"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="is_case_insenstive"/></label>
|
||||
<div class="col-md-6">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="${cfgName}.isCaseSenstive" value="0" class="required"
|
||||
checked
|
||||
><spring:message code="case_insenstive"/>
|
||||
</label>
|
||||
</div>
|
||||
<div for="${cfgName}.isCaseInsenstive"></div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
</div>
|
||||
<div class="row hidden">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="whether_hexbinary" /></label>
|
||||
<div class="col-md-6">
|
||||
<select name="${cfgName}.isHexbin"
|
||||
class="selectpicker select2 form-control required">
|
||||
<c:if test="${!empty region.configHex}">
|
||||
<c:forEach var="isHexbin" items="${fn:split(region.configHex,',')}">
|
||||
<c:forEach items="${fns:getDictList('WHETHER_HEXBINARY')}" var="isHexbinC">
|
||||
<c:if test="${isHexbinC.itemCode eq isHexbin}">
|
||||
<option value="${isHexbinC.itemCode}"
|
||||
<c:if test="${cfg.isHexbin eq isHexbin || (empty isHexbin && isHexbin eq 0)}">
|
||||
selected
|
||||
</c:if>
|
||||
>
|
||||
<spring:message code="${isHexbinC.itemValue}"/>
|
||||
</option>
|
||||
</c:if>
|
||||
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
<c:if test="${empty region.configHex}">
|
||||
|
||||
<c:forEach items="${fns:getDictList('WHETHER_HEXBINARY')}" var="isHexbinC">
|
||||
<c:if test="${isHexbinC.itemCode eq 0}">
|
||||
<option value="${isHexbinC.itemCode}" selected >
|
||||
<spring:message code="${isHexbinC.itemValue}"/>
|
||||
</option>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
|
||||
</c:if>
|
||||
</select>
|
||||
</div>
|
||||
<div for="${cfgName}.isHexbin"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</html>
|
||||
@@ -23,6 +23,22 @@ $(function(){
|
||||
errorContainer: "#messageBox",
|
||||
});
|
||||
});
|
||||
//业务窗口打开
|
||||
var addContent = function(obj, contentClassName) {
|
||||
var showDiv = $(obj).parent().parent().next();
|
||||
$(showDiv).removeClass("hidden").removeClass("disabled");
|
||||
$("select[name$='portPattern']").parents(".port").removeClass("hidden");
|
||||
$("input[name$='destIpAddress']").parents(".destPort").removeClass("hidden");
|
||||
$(".moreBtn").data("click-times",2);
|
||||
$(obj).addClass("hidden");
|
||||
}
|
||||
|
||||
//业务窗口关闭
|
||||
var delContent = function(contentClassName, addBtnClassName) {
|
||||
$("." + contentClassName).addClass("hidden").addClass("disabled");
|
||||
$("." + addBtnClassName).removeClass("hidden");
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
@@ -53,7 +69,7 @@ $(function(){
|
||||
<input type="hidden" id="direction" name="direction" value="0">
|
||||
<!-- 配置域类型 -->
|
||||
<c:forEach items="${regionList}" var="region">
|
||||
<c:if test="${_cfg.functionId eq region.functionId}">
|
||||
<c:if test="${_cfg.functionId eq region.functionId && region.regionType ne 9}">
|
||||
<input type="hidden" name="cfgType" value="${region.configRegionValue}">
|
||||
<input type="hidden" name="cfgRegionCode"isMaat="${region.isMaat}"
|
||||
serviceType="${region.configServiceType}"
|
||||
@@ -258,6 +274,24 @@ $(function(){
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<c:forEach items="${regionList}" var="region">
|
||||
<c:if test="${region.regionType eq 9 }">
|
||||
<c:set var="tabName" value="${region.configRegionValue}Tab"></c:set>
|
||||
<h4 class="form-section"><spring:message code="${region.configRegionValue}" />
|
||||
<small>
|
||||
<span class="glyphicon glyphicon-plus ${tabName}Add"
|
||||
onClick="addContent(this,'${tabName}')" title="add"></span></small>
|
||||
</h4>
|
||||
<c:set var="cfgName" value="appFeaturePropCfgList[0]"></c:set>
|
||||
<div class="row boxSolid ${tabName}${status.index} <c:if test="${fn:length(_cfg.appFeaturePropCfgList)==0}"> hidden disabled</c:if>">
|
||||
<input type="hidden" name="cfgRegionValue" value="${region.configRegionValue }">
|
||||
<input type="hidden" name="cfgRegionType" value="${region.regionType }">
|
||||
<input type="hidden" name="cfgRegionCode1" value="${region.configRegionCode }">
|
||||
<%@include file="/WEB-INF/views/cfg/app/appFeatureProp.jsp"%>
|
||||
</div>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
|
||||
<input name="isAreaEffective" type="hidden" value="0">
|
||||
<%-- <%@include file="/WEB-INF/include/form/areaInfo.jsp" %> --%>
|
||||
<input type="hidden" name="requestId" value="0"/>
|
||||
|
||||
@@ -168,7 +168,80 @@ $(function(){
|
||||
},
|
||||
errorContainer: "#messageBox",
|
||||
});
|
||||
// APP SESSION域 Session Size Min 和 Session Size Max属性限制
|
||||
$(".sessionSizeMin").on("change",function(){
|
||||
var minValue = parseInt($(".sessionSizeMin").val());
|
||||
$(".sessionSizeMax").prop("min",minValue+1);
|
||||
$(".sessionSizeMax").addClass("required");
|
||||
if($(".sessionSizeMin").val() == ""){
|
||||
$(".sessionSizeMax").removeClass("required");
|
||||
}
|
||||
|
||||
});
|
||||
$(".sessionSizeMax").on("change",function(){
|
||||
var maxValue = parseInt($(".sessionSizeMax").val());
|
||||
$(".sessionSizeMin").prop("max",maxValue-1);
|
||||
$(".sessionSizeMin").addClass("required");
|
||||
if($(".sessionSizeMax").val() == ""){
|
||||
$(".sessionSizeMin").removeClass("required");
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
$(".c2s_radio").on("click",function(){
|
||||
if($(this).val() == "c2sPayload"){
|
||||
$(".c2sPayload").removeClass("hidden");
|
||||
$(".c2sFrequent").addClass("hidden");
|
||||
}else if($(this).val() == "c2sFrequent"){
|
||||
$(".c2sFrequent").removeClass("hidden");
|
||||
$(".c2sPayload").addClass("hidden");
|
||||
|
||||
}
|
||||
});
|
||||
$(".s2c_radio").on("click",function(){
|
||||
if($(this).val() == "s2cPayload"){
|
||||
$(".s2cPayload").removeClass("hidden");
|
||||
$(".s2cFrequent").addClass("hidden");
|
||||
}else if($(this).val()=="s2cFrequent"){
|
||||
$(".s2cFrequent").removeClass("hidden");
|
||||
$(".s2cPayload").addClass("hidden");
|
||||
}
|
||||
});
|
||||
|
||||
$(".c2sAndS2cInput").tagsInput({
|
||||
width:$(".c2sAndS2cInput").find(".form-control").width(),
|
||||
defaultText:'please input ignore query string in URL',
|
||||
'delimiter':';',//特殊字符串分隔与表达式的多关键词
|
||||
maxCount:4,
|
||||
onAddTag:function(tag,size){
|
||||
//var reg = new RegExp(/\t|\r|\n|,/);
|
||||
var reg = new RegExp(/^([0-9]*)$/);
|
||||
if (!tag.match(reg)) {
|
||||
$(this).parent(".col-md-6").next("div").html("<label class='error'>"+$.validator.messages.number+"</label>");
|
||||
}else{
|
||||
$(this).parent(".col-md-6").next("div").html("");
|
||||
}
|
||||
},
|
||||
onRemoveTag:function(tag,size){
|
||||
$(this).parent(".col-md-6").next("div").html("");
|
||||
}
|
||||
});
|
||||
|
||||
$(".tagsinput").popover({
|
||||
animation:true,
|
||||
container:'body',
|
||||
placement:'right',
|
||||
html:true,
|
||||
trigger:"hover",
|
||||
title:"",
|
||||
content:function(){
|
||||
var content = $("#tagsinputTip").text();
|
||||
return content;
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
//业务窗口打开
|
||||
var addContent = function(obj, contentClassName) {
|
||||
var showDiv = $(obj).parent().parent().next();
|
||||
@@ -341,6 +414,7 @@ function changeKeywordFormate(exprType,obj){
|
||||
<c:set var="complexCfgIndex" value="0"></c:set>
|
||||
<c:set var="strCfgIndex" value="0"></c:set>
|
||||
<c:set var="numCfgIndex" value="0"></c:set>
|
||||
<c:set var="sessionCfgIndex" value="0"></c:set>
|
||||
<c:forEach items="${regionList}" var="region" varStatus="status">
|
||||
|
||||
<c:if test="${region.regionType eq 1 }">
|
||||
@@ -435,7 +509,7 @@ function changeKeywordFormate(exprType,obj){
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</c:if>
|
||||
<c:if test="${region.regionType eq 2 }">
|
||||
<c:if test="${region.regionType eq 8 }">
|
||||
<c:set var="tabName" value="${region.configRegionValue}Tab"></c:set>
|
||||
<h4 class="form-section">
|
||||
<spring:message code="${region.configRegionValue}" />
|
||||
@@ -443,6 +517,71 @@ function changeKeywordFormate(exprType,obj){
|
||||
class="glyphicon glyphicon-plus ${tabName}Add <c:if test="${fn:length(regionList)==1 or status.index==0}"> hidden</c:if>"
|
||||
onClick="addContent(this,'${tabName}')" title="add"></span></small>
|
||||
</h4>
|
||||
<c:set var="cfgName" value="sessionList[${sessionCfgIndex}]"></c:set>
|
||||
<%-- <c:set var="regionValue" value="${region.configRegionValue}"></c:set> --%>
|
||||
<c:choose>
|
||||
<c:when test="${fn:length(_cfg.sessionList)>0}">
|
||||
<c:set var="isBreak" value="false"></c:set>
|
||||
<c:forEach items="${_cfg.sessionList}" var="cfg">
|
||||
<c:choose>
|
||||
<c:when test="${region.configRegionCode eq cfg.cfgRegionCode and !isBreak}">
|
||||
<div class="row boxSolid ${tabName}${status.index}">
|
||||
<input type="hidden" name="cfgRegionValue" value="${region.configRegionValue }">
|
||||
<input type="hidden" name="cfgRegionType" value="${region.regionType }">
|
||||
<input type="hidden" name="cfgRegionCode1" value="${region.configRegionCode }">
|
||||
<%@include file="/WEB-INF/views/cfg/app/appFeatureSessionForm.jsp"%>
|
||||
</div>
|
||||
<c:set var="isBreak" value="true"></c:set>
|
||||
<c:set var="sessionCfgIndex"
|
||||
value="${sessionCfgIndex+1 }"></c:set>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</c:forEach>
|
||||
<c:if test="${!isBreak}">
|
||||
<div class="row boxSolid ${tabName}${status.index} hidden disabled">
|
||||
<input type="hidden" name="cfgRegionValue" value="${region.configRegionValue }">
|
||||
<input type="hidden" name="cfgRegionType" value="${region.regionType }">
|
||||
<input type="hidden" name="cfgRegionCode1" value="${region.configRegionCode }">
|
||||
<%@include file="/WEB-INF/views/cfg/app/appFeatureSessionForm.jsp"%>
|
||||
</div>
|
||||
<c:set var="sessionCfgIndex" value="${sessionCfgIndex+1 }"></c:set>
|
||||
</c:if>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<div class="row boxSolid ${tabName}${status.index} <c:if test="${fn:length(regionList)>1 and status.index>0}"> hidden disabled</c:if>">
|
||||
<input type="hidden" name="cfgRegionValue" value="${region.configRegionValue }">
|
||||
<input type="hidden" name="cfgRegionType" value="${region.regionType }">
|
||||
<input type="hidden" name="cfgRegionCode1" value="${region.configRegionCode }">
|
||||
<%@include file="/WEB-INF/views/cfg/app/appFeatureSessionForm.jsp"%>
|
||||
</div>
|
||||
<c:set var="sessionCfgIndex" value="${sessionCfgIndex+1 }"></c:set>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</c:if>
|
||||
<c:if test="${region.regionType eq 9 }">
|
||||
<c:set var="tabName" value="${region.configRegionValue}Tab"></c:set>
|
||||
<h4 class="form-section"><spring:message code="${region.configRegionValue}" />
|
||||
<small>
|
||||
<span class="glyphicon glyphicon-plus ${tabName}Add"
|
||||
onClick="addContent(this,'${tabName}')" title="add"></span></small>
|
||||
</h4>
|
||||
<c:set var="cfgName" value="appFeaturePropCfgList[0]"></c:set>
|
||||
<div class="row boxSolid ${tabName}${status.index} <c:if test="${fn:length(_cfg.appFeaturePropCfgList)==0}"> hidden disabled</c:if>">
|
||||
<input type="hidden" name="cfgRegionValue" value="${region.configRegionValue }">
|
||||
<input type="hidden" name="cfgRegionType" value="${region.regionType }">
|
||||
<input type="hidden" name="cfgRegionCode1" value="${region.configRegionCode }">
|
||||
<%@include file="/WEB-INF/views/cfg/app/appFeatureProp.jsp"%>
|
||||
</div>
|
||||
</c:if>
|
||||
|
||||
<c:if test="${region.regionType eq 2 }">
|
||||
<c:set var="tabName" value="${region.configRegionValue}Tab"></c:set>
|
||||
<h4 class="form-section">
|
||||
<spring:message code="${region.configRegionValue}" />
|
||||
<small> <span
|
||||
class="glyphicon glyphicon-plus ${tabName}Add"
|
||||
onClick="addContent(this,'${tabName}')" title="add"></span></small>
|
||||
</h4>
|
||||
<c:set var="cfgName"
|
||||
value="strList[${strCfgIndex}]"></c:set>
|
||||
<%-- <c:set var="regionValue" value="${region.configRegionValue}"></c:set> --%>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -53,7 +53,7 @@
|
||||
<select name="commonGroupIds" data-live-search="true" data-live-search-placeholder="search" class="selectpicker form-control required">
|
||||
<option value=""><spring:message code="select"/></option>
|
||||
<c:forEach items="${policyGroupInfos}" var="dnsGroupInfo">
|
||||
<option value="${dnsGroupInfo.groupId}">${dnsGroupInfo.groupName}</option>
|
||||
<option value="${dnsGroupInfo.serviceGroupId}" <c:if test="${_cfg.commonGroupIds==dnsGroupInfo.serviceGroupId}">selected</c:if>>${dnsGroupInfo.groupName}</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
@@ -406,7 +406,10 @@ function showActionTransChart(xData,series){
|
||||
return prev + curr;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
//配置趋势图需特殊提示,所以从公共js文件中拿出无数据提示方法到本文件中
|
||||
var log_data=$.validator.messages.log_no_data;
|
||||
(function(d) {
|
||||
"object" === typeof module && module.exports ? module.exports = d: d(Highcharts)
|
||||
})(function(d) { (function(c) {
|
||||
@@ -416,8 +419,7 @@ function showActionTransChart(xData,series){
|
||||
g = c.extend,
|
||||
h = c.each;
|
||||
g(f.lang, {
|
||||
noData: "No data display within a specified time range"
|
||||
//noData: "There is no data this hour."
|
||||
noData: log_data
|
||||
});
|
||||
f.noData = {
|
||||
position: {
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
<select name="commonGroupIds" data-live-search="true" data-live-search-placeholder="search" class="selectpicker form-control required">
|
||||
<option value=""><spring:message code="select"/></option>
|
||||
<c:forEach items="${policyGroupInfos}" var="urlGroupInfo">
|
||||
<option value="${urlGroupInfo.groupId}">${urlGroupInfo.groupName}</option>
|
||||
<option value="${urlGroupInfo.serviceGroupId}" <c:if test="${_cfg.commonGroupIds==urlGroupInfo.serviceGroupId}">selected</c:if> >${urlGroupInfo.groupName}</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
@@ -13,6 +13,10 @@
|
||||
$(document)
|
||||
.ready(
|
||||
function() {
|
||||
// 修改dns公共组时回显用
|
||||
if($("select[name$='commonGroupIds']").val()){
|
||||
addContent($(".dnsGroupAdd"),'dnsGroup');
|
||||
}
|
||||
$(".action").on("change", function() {
|
||||
$("#serviceId").val($(this).attr("serviceId"));
|
||||
$("#protocolId").val($(this).attr("protocolId"));
|
||||
@@ -274,7 +278,7 @@
|
||||
<small> <span class="glyphicon glyphicon-plus dnsGroupAdd"
|
||||
onClick="addContent(this,'dnsGroup')" title="add"></span></small>
|
||||
</h4>
|
||||
<div class="row boxSolid dnsGroup0 hidden" >
|
||||
<div class="row boxSolid dnsGroup0" >
|
||||
<%@include file="/WEB-INF/views/cfg/dnsGroupForm.jsp"%>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -25,6 +25,13 @@
|
||||
<i id="schedule${index}" class="fa" name="tabFlag${index}"></i>
|
||||
</div>
|
||||
</c:if>
|
||||
<c:if test="${not empty _cfg.commonGroupIds }">
|
||||
<div id="NTC_DNS_REGIONTitle${index}" onclick="switchSubCfgTabInfo('NTC_DNS_REGION',${index})"
|
||||
class="col-md-1 tabInfo" name="tabTitle${index }">
|
||||
<spring:message code='dnsGroup' />
|
||||
<i id="NTC_DNS_REGION${index}" class="fa" name="tabFlag${index}"></i>
|
||||
</div>
|
||||
</c:if>
|
||||
</div>
|
||||
<c:forEach items="${tabList}" var="region">
|
||||
<c:if test="${region[0] eq 1 }">
|
||||
@@ -350,4 +357,21 @@
|
||||
<%@include file="/WEB-INF/include/form/scheduleNewSubList.jsp"%>
|
||||
</div>
|
||||
</c:if>
|
||||
<!-- 显示 公共组信息 -->
|
||||
<c:if test="${not empty _cfg.commonGroupIds }">
|
||||
<div id="NTC_DNS_REGIONInfo${index}" class="content" name="subCfg${index}">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<%-- <label><spring:message code='asn_no'/>:</label> --%>
|
||||
<label>
|
||||
<c:forEach items="${policyGroupInfos}" var="dnsGroupInfo">
|
||||
<c:if test="${_cfg.commonGroupIds==dnsGroupInfo.serviceGroupId}"> ${dnsGroupInfo.groupName} </c:if>
|
||||
</c:forEach>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
</html>
|
||||
@@ -13,6 +13,11 @@
|
||||
$(document)
|
||||
.ready(
|
||||
function() {
|
||||
// 修改url公共组时回显用
|
||||
if($("select[name$='commonGroupIds']").val()){
|
||||
addContent($(".urlGroupAdd"),'urlGroup');
|
||||
}
|
||||
|
||||
$(".action").on("change", function() {
|
||||
$("#serviceId").val($(this).attr("serviceId"));
|
||||
$("#protocolId").val($(this).attr("protocolId"));
|
||||
@@ -240,9 +245,21 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- url组 tabName写死为 urlGroup -->
|
||||
<h4 class="form-section">
|
||||
<spring:message code="urlGroup" />
|
||||
<small> <span class="glyphicon glyphicon-plus urlGroupAdd"
|
||||
onClick="addContent(this,'urlGroup')" title="add"></span></small>
|
||||
</h4>
|
||||
<div class="row boxSolid urlGroup0" >
|
||||
<%@include file="/WEB-INF/views/cfg/urlGroupForm.jsp"%>
|
||||
</div>
|
||||
|
||||
<h4 class="form-section">
|
||||
<spring:message code="http_url_title" />
|
||||
<small> <span class="glyphicon glyphicon-plus httpUrlTabAdd hidden"
|
||||
<small> <span class="glyphicon glyphicon-plus httpUrlTabAdd"
|
||||
onClick="addContent(this,'httpUrlTab')" title="add"></span></small>
|
||||
</h4>
|
||||
<c:set var="strCfgIndex" value="0"></c:set>
|
||||
@@ -279,7 +296,7 @@
|
||||
<c:forEach items="${_cfg.httpUrlList}" var="cfg"
|
||||
varStatus="status">
|
||||
<c:set var="cfgName" value="httpUrlList[${status.index}]"></c:set>
|
||||
<div class="row boxSolid ${tabName}${status.index}" >
|
||||
<div class="row boxSolid ${tabName}${status.index} hidden" >
|
||||
<%@include file="/WEB-INF/views/cfg/complexCfgForm.jsp"%>
|
||||
</div>
|
||||
<input type="hidden" name="${cfgName}.sourceCompileId" value="${cfg.sourceCompileId }">
|
||||
@@ -336,16 +353,7 @@
|
||||
</c:if> --%>
|
||||
</c:forEach>
|
||||
|
||||
<!-- url组 tabName写死为 urlGroup -->
|
||||
<h4 class="form-section">
|
||||
<spring:message code="urlGroup" />
|
||||
<small> <span class="glyphicon glyphicon-plus urlGroupAdd"
|
||||
onClick="addContent(this,'urlGroup')" title="add"></span></small>
|
||||
</h4>
|
||||
<div class="row boxSolid urlGroup0 hidden" >
|
||||
<%@include file="/WEB-INF/views/cfg/urlGroupForm.jsp"%>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
<%@include file="/WEB-INF/include/form/areaInfo.jsp" %>
|
||||
|
||||
@@ -25,6 +25,13 @@
|
||||
<i id="schedule${index}" class="fa" name="tabFlag${index}"></i>
|
||||
</div>
|
||||
</c:if>
|
||||
<c:if test="${not empty _cfg.commonGroupIds }">
|
||||
<div id="NTC_URL_REGIONTitle${index}" onclick="switchSubCfgTabInfo('NTC_URL_REGION',${index})"
|
||||
class="col-md-1 tabInfo" name="tabTitle${index }">
|
||||
<spring:message code='urlGroup' />
|
||||
<i id="NTC_URL_REGION${index}" class="fa" name="tabFlag${index}"></i>
|
||||
</div>
|
||||
</c:if>
|
||||
</div>
|
||||
<c:forEach items="${tabList}" var="region">
|
||||
<c:if test="${region[0] eq 1 }">
|
||||
@@ -345,4 +352,21 @@
|
||||
<%@include file="/WEB-INF/include/form/scheduleNewSubList.jsp"%>
|
||||
</div>
|
||||
</c:if>
|
||||
<!-- 显示 公共组信息 -->
|
||||
<c:if test="${not empty _cfg.commonGroupIds }">
|
||||
<div id="NTC_URL_REGIONInfo${index}" class="content" name="subCfg${index}">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<%-- <label><spring:message code='asn_no'/>:</label> --%>
|
||||
<label>
|
||||
<c:forEach items="${policyGroupInfos}" var="dnsGroupInfo">
|
||||
<c:if test="${_cfg.commonGroupIds==dnsGroupInfo.serviceGroupId}"> ${dnsGroupInfo.groupName} </c:if>
|
||||
</c:forEach>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
</html>
|
||||
@@ -14,7 +14,6 @@
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="page-content">
|
||||
<div class="theme-panel hidden-xs hidden-sm">
|
||||
<button type="button" class="btn btn-default"
|
||||
@@ -154,12 +153,28 @@
|
||||
<!-- 搜索内容与操作按钮栏 -->
|
||||
</form:form>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
<div class="row">
|
||||
<div class="col-md-12 " id="appSelect">
|
||||
<select id="unitType" class="selectpicker select2 input-small">
|
||||
<option value="Unique Ip">Unique Ip</option>
|
||||
<option value="Gbps">Gbps</option>
|
||||
<option value="pps">pps</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row chart-realTime">
|
||||
<div id="chart-realTime" style="width: 97%; height: 430px; margin-top: 20px"></div>
|
||||
<input id="total" type="hidden" />
|
||||
<input id="sipData" type="hidden" />
|
||||
<input id="dipData" type="hidden" />
|
||||
<input id="timeData" type="hidden" />
|
||||
<input id="c2sData" type="hidden" />
|
||||
<input id="s2cData" type="hidden" />
|
||||
<input id="totalData" type="hidden" />
|
||||
<input id="appType" name="appType" type="hidden" value="${appType}" />
|
||||
<input id="beginDateh" type="hidden" value="${beginDate}" />
|
||||
<input id="endDateh" type="hidden" value="${endDate}" />
|
||||
@@ -230,10 +245,11 @@
|
||||
var entranceId2=$("#entranceId2").val();
|
||||
var isp1=$("#isp1").val();
|
||||
var isp2=$("#isp2").val();
|
||||
var unitType=$("#unitType").val();
|
||||
var searchQuota=$(".searchQuota[class~='active']").val();
|
||||
showRealTimeTransChart(appType,entranceId1,isp1);// 实时折线
|
||||
appTransAjax(starth,endh,appType,entranceId2,isp2);
|
||||
appTop100List(starth,endh,appType,entranceId2,searchQuota,isp2);
|
||||
showRealTimeTransChart(appType,entranceId1,isp1,unitType);// 实时折线
|
||||
appTransAjax(starth,endh,appType,entranceId2,isp2,unitType);
|
||||
appTop100List(starth,endh,appType,entranceId2,searchQuota,isp2,unitType);
|
||||
//筛选功能初始化
|
||||
$("#resetBtn1").on("click",function() {
|
||||
$("#searchForm1 select.selectpicker").each(function() {
|
||||
@@ -242,6 +258,12 @@
|
||||
// $(this).find("option:first").attr("selected",true);
|
||||
});
|
||||
$("#searchForm1")[0].reset();
|
||||
$("#appSelect select.selectpicker").each(function() {
|
||||
$(this).selectpicker('val',"Unique Ip");
|
||||
$(this).find("option").attr("selected",false);
|
||||
$(this).find("option:first").attr("selected",true);
|
||||
});
|
||||
|
||||
});
|
||||
//筛选功能初始化
|
||||
$("#resetBtn2").on("click",function() {
|
||||
@@ -251,10 +273,14 @@
|
||||
// $(this).find("option:first").attr("selected",true);
|
||||
});
|
||||
// $(".Wdate").attr("value", '');
|
||||
$("#appSelect select.selectpicker").each(function() {
|
||||
$(this).selectpicker('val',"Unique Ip");
|
||||
$(this).find("option").attr("selected",false);
|
||||
});
|
||||
|
||||
var deftime=(new Date().getTime())-(1000 * 60 * 60);
|
||||
var defbegin=dateFtt("yyyy-MM-dd hh:mm:ss",new Date(deftime)); // 默认一小时
|
||||
var defend=dateFtt("yyyy-MM-dd hh:mm:ss",new Date());
|
||||
|
||||
$("#searchForm2")[0].reset();
|
||||
$("#beginDate").val(defbegin);
|
||||
$("#endDate").val(defend);
|
||||
@@ -265,32 +291,82 @@
|
||||
})
|
||||
$(".chart-history").addClass("hidden");
|
||||
$(".chart-realTime").removeClass("hidden");
|
||||
|
||||
$(".changeData").on("click",function(){
|
||||
loading();
|
||||
$(".changeData").removeClass("active");
|
||||
$(this).addClass("active");
|
||||
$("#appSelect select.selectpicker").each(function() {
|
||||
$(this).selectpicker('val',"Unique Ip");
|
||||
$(this).find("option").attr("selected",false);
|
||||
});
|
||||
|
||||
var starth = $("#beginDateh").val();
|
||||
var endh = $("#endDateh").val();
|
||||
$("#beginDate").val(starth);
|
||||
$("#endDate").val(endh);
|
||||
var appType=$("#appType").val();
|
||||
var entranceId1=$("#entranceId1").val();
|
||||
var entranceId2=$("#entranceId2").val();
|
||||
var isp1=$("#isp1").val();
|
||||
var isp2=$("#isp2").val();
|
||||
var unitType=$("#unitType").val();
|
||||
var searchQuota=$(".searchQuota[class~='active']").val();
|
||||
if($(this).val()==1){
|
||||
showRealTimeTransChart(appType,entranceId1,isp1,unitType);// 实时折线
|
||||
$(".chart-realTime").removeClass("hidden");
|
||||
$(".chart-history").addClass("hidden");
|
||||
}else{
|
||||
appTransAjax(starth,endh,appType,entranceId2,isp2,unitType);
|
||||
$(".chart-realTime").addClass("hidden");
|
||||
$(".chart-history").removeClass("hidden");
|
||||
}
|
||||
/* if($(this).val()==1){
|
||||
$(".chart-realTime").removeClass("hidden");
|
||||
$(".chart-history").addClass("hidden");
|
||||
|
||||
}else{
|
||||
$(".chart-realTime").addClass("hidden");
|
||||
$(".chart-history").removeClass("hidden");
|
||||
|
||||
} */
|
||||
})
|
||||
$('.pageView').hide();
|
||||
|
||||
$("#unitType").on("change",function(){
|
||||
loading();
|
||||
var starth = $("#beginDateh").val();
|
||||
var endh = $("#endDateh").val();
|
||||
$("#beginDate").val(starth);
|
||||
$("#endDate").val(endh);
|
||||
var appType=$("#appType").val();
|
||||
var entranceId1=$("#entranceId1").val();
|
||||
var entranceId2=$("#entranceId2").val();
|
||||
var isp1=$("#isp1").val();
|
||||
var isp2=$("#isp2").val();
|
||||
var unitType=$("#unitType").val();
|
||||
var searchQuota=$(".searchQuota[class~='active']").val();
|
||||
showRealTimeTransChart(appType,entranceId1,isp1,unitType);// 实时折线
|
||||
appTransAjax(starth,endh,appType,entranceId2,isp2,unitType);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
// 改变排序字段
|
||||
function changeOrderby(searchQuota) {
|
||||
loading();
|
||||
appTop100List($("#beginDate").val(),$("#endDate").val(),$("#appType").val(),$("#entranceId2").val(),searchQuota,$("#isp2").val());
|
||||
appTop100List($("#beginDate").val(),$("#endDate").val(),$("#appType").val(),$("#entranceId2").val(),searchQuota,$("#isp2").val(),unitType=$("#unitType").val());
|
||||
}
|
||||
function searchList1() {
|
||||
loading();
|
||||
var unitType=$("#unitType").val();
|
||||
var appType=$("#appType").val();
|
||||
var entranceId1=$("#entranceId1").val();
|
||||
var isp1=$("#isp1").val();
|
||||
showRealTimeTransChart(appType,entranceId1,isp1);// 折线
|
||||
showRealTimeTransChart(appType,entranceId1,isp1,unitType);// 折线
|
||||
}
|
||||
function searchList2() {
|
||||
var unitType=$("#unitType").val();
|
||||
var start = $("#beginDate").val();
|
||||
var end = $("#endDate").val();
|
||||
$("#beginDateh").val(start);
|
||||
@@ -302,7 +378,7 @@
|
||||
var entranceId2=$("#entranceId2").val();
|
||||
var isp2=$("#isp2").val();
|
||||
var searchQuota=$(".searchQuota[class~='active']").val();
|
||||
appTransAjax(start,end,appType,entranceId2,isp2);// 折线
|
||||
appTransAjax(start,end,appType,entranceId2,isp2,unitType);// 折线
|
||||
appTop100List(start,end,appType,entranceId2,searchQuota,isp2);// 列表
|
||||
}
|
||||
}
|
||||
@@ -318,7 +394,7 @@
|
||||
"appType" : appType,
|
||||
"entranceId" : entranceId,
|
||||
"searchQuota":searchQuota,
|
||||
"searchIspCode":isp
|
||||
"searchIspCode":isp,
|
||||
},
|
||||
async : true,
|
||||
timeout : 50000,
|
||||
@@ -403,7 +479,7 @@
|
||||
}
|
||||
|
||||
// app曲线图
|
||||
function appTransAjax(beginDate, endDate,appType,entranceId,isp) {
|
||||
function appTransAjax(beginDate, endDate,appType,entranceId,isp,unitType) {
|
||||
loading();
|
||||
$.ajax({ url : "${ctx}/dashboard/traffic/ajaxAppTrend",
|
||||
type : "get",
|
||||
@@ -414,18 +490,29 @@
|
||||
"endDate" : endDate,
|
||||
"appType" : appType,
|
||||
"entranceId" : entranceId,
|
||||
"searchIspCode":isp
|
||||
"searchIspCode":isp,
|
||||
"searchQuotaType":unitType
|
||||
},
|
||||
traditional:true,
|
||||
success : function(rs) {
|
||||
var series=new Array();
|
||||
var sipResult=new Array();
|
||||
var dipResult=new Array();
|
||||
|
||||
var c2sResult=new Array();
|
||||
var s2cResult=new Array();
|
||||
var totalResult=new Array();
|
||||
|
||||
var sipData=new Array();
|
||||
var dipData=new Array();
|
||||
var timeData=new Array();
|
||||
|
||||
var c2sData=new Array();
|
||||
var s2cData=new Array();
|
||||
var totalData=new Array();
|
||||
var total=[];
|
||||
if(rs!=null&&Object.keys(rs).length>0){
|
||||
if(unitType=='Unique Ip'){
|
||||
sipResult=rs.sipResult;
|
||||
dipResult=rs.dipResult
|
||||
total.push(rs.sipSum,rs.dipSum);
|
||||
@@ -437,15 +524,41 @@
|
||||
$(dipResult).each(function(i,d){
|
||||
dipData.push(d[1])
|
||||
})
|
||||
|
||||
}else{
|
||||
total.push(0,0);
|
||||
}
|
||||
showActionHistoryChart(sipResult,dipResult);
|
||||
}else{
|
||||
c2sResult=rs.c2sResult
|
||||
s2cResult=rs.s2cResult
|
||||
totalResult=rs.totalResult
|
||||
|
||||
// 图表导出用列
|
||||
$(c2sResult).each(function(i,d){
|
||||
c2sData.push(d[1])
|
||||
timeData.push(d[0])
|
||||
})
|
||||
$(s2cResult).each(function(i,d){
|
||||
s2cData.push(d[1])
|
||||
})
|
||||
$(totalResult).each(function(i,d){
|
||||
totalData.push(d[1])
|
||||
})
|
||||
total.push('--','--','--');
|
||||
}
|
||||
}else{
|
||||
if(unitType=='Unique Ip'){
|
||||
total.push(0,0);
|
||||
}else{
|
||||
total.push('--','--','--');
|
||||
}
|
||||
}
|
||||
showActionHistoryChart(sipResult,dipResult,c2sResult,s2cResult,totalResult);
|
||||
$("#total").val(JSON.stringify(total));
|
||||
$("#sipData").val(JSON.stringify(sipData));
|
||||
$("#dipData").val(JSON.stringify(dipData));
|
||||
$("#timeData").val(JSON.stringify(timeData));
|
||||
|
||||
$("#c2sData").val(JSON.stringify(c2sData));
|
||||
$("#s2cData").val(JSON.stringify(s2cData));
|
||||
$("#totalData").val(JSON.stringify(totalData));
|
||||
|
||||
closeTip();
|
||||
},
|
||||
error : function(data, textStatus, errorThrown) {
|
||||
@@ -571,7 +684,8 @@
|
||||
$(".pageNum").text(Math.ceil(totalData/10));
|
||||
}
|
||||
}
|
||||
function realTimeTrendAjax(beginDate, endDate,appType,entranceId,isp){
|
||||
|
||||
function realTimeTrendAjax(beginDate, endDate,appType,entranceId,isp,unitType){
|
||||
var result={};
|
||||
$.ajax({
|
||||
url : "${ctx}/dashboard/traffic/ajaxAppTrend",
|
||||
@@ -582,7 +696,8 @@
|
||||
"endDate" : endDate,
|
||||
"appType" : appType,
|
||||
"entranceId" : entranceId,
|
||||
"searchIspCode":isp
|
||||
"searchIspCode":isp,
|
||||
"searchQuotaType":unitType
|
||||
},
|
||||
async : false,
|
||||
traditional:true,
|
||||
@@ -601,16 +716,214 @@
|
||||
}
|
||||
var timer=null;
|
||||
// 局点信息
|
||||
function showRealTimeTransChart(appType,entranceId,isp) {
|
||||
function showRealTimeTransChart(appType,entranceId,isp,unitType) {
|
||||
var time1=(new Date().getTime())-(1000 * 60 * 10+1000 * 60 * 5);
|
||||
var time2=(new Date().getTime())-(1000 * 60 * 5);//推迟五分钟
|
||||
var beginDate=dateFtt("yyyy-MM-dd hh:mm:ss",new Date(time1)); //获取十个点
|
||||
var endDate=dateFtt("yyyy-MM-dd hh:mm:ss",new Date(time2)); // 少算一分钟
|
||||
var sipResult=new Array();
|
||||
var dipResult=new Array();
|
||||
var intData = realTimeTrendAjax(beginDate, endDate,appType,entranceId,isp); //初始化数据 为10个点
|
||||
sipResult=intData.sipResult;
|
||||
dipResult=intData.dipResult;
|
||||
|
||||
var c2sResult=new Array();
|
||||
var s2cResult=new Array();
|
||||
var totalResult=new Array();
|
||||
var unitType=$("#unitType").val();
|
||||
var intData = realTimeTrendAjax(beginDate, endDate,appType,entranceId,isp,unitType); //初始化数据 为10个点
|
||||
var zxchart=null;
|
||||
if(unitType=='Unique Ip'){
|
||||
sipResult=intData.sipResult;
|
||||
dipResult=intData.dipResult;
|
||||
|
||||
zxchart=[{
|
||||
name: '<spring:message code="client_ip"/>',
|
||||
lineColor:'#a9d4cf',
|
||||
lineWidth:1,
|
||||
marker: {
|
||||
enabled: false
|
||||
},
|
||||
fillOpacity: 0.2 ,// 透明度
|
||||
data: (function () {
|
||||
var data = [];
|
||||
if(sipResult!=null&&sipResult.length>0){
|
||||
var count=10;
|
||||
if(sipResult.length<10){
|
||||
count=sipResult.length;
|
||||
}
|
||||
for (var i = 0; i < count; i++) {
|
||||
var d =sipResult[i];
|
||||
var x = d[0], // 时间
|
||||
y = d[1];
|
||||
data.push({
|
||||
x: x,
|
||||
y: y
|
||||
});
|
||||
}
|
||||
} else{
|
||||
var time = (new Date()).getTime()-(1000 * 60 * 10+1000 * 60 * 5);
|
||||
for (var i = 0; i <10; i++) {
|
||||
data.push({
|
||||
x: time + i * 1000*60,
|
||||
y: 0
|
||||
});
|
||||
}
|
||||
}
|
||||
return data;
|
||||
}())
|
||||
},
|
||||
{
|
||||
name: '<spring:message code="server_ip"/>',
|
||||
lineColor:'#eecf8d',
|
||||
lineWidth:1,
|
||||
marker: {
|
||||
enabled: false
|
||||
},
|
||||
fillOpacity: 0.2, // 透明度
|
||||
data: (function () {
|
||||
var data = [];
|
||||
if(dipResult!=null&&dipResult.length>0){
|
||||
var count=10;
|
||||
if(dipResult.length<10){
|
||||
count=dipResult.length;
|
||||
}
|
||||
for (var i = 0; i < count; i++) {
|
||||
var d =dipResult[i];
|
||||
var x = d[0], // 当前时间
|
||||
y = d[1];
|
||||
data.push({
|
||||
x: x,
|
||||
y: y
|
||||
});
|
||||
}
|
||||
}else{
|
||||
var time = (new Date()).getTime()-(1000 * 60 * 10+1000 * 60 * 5);
|
||||
for (var i = 0; i <10; i++) {
|
||||
data.push({
|
||||
x: time + i * 1000*60,
|
||||
y: 0
|
||||
});
|
||||
}
|
||||
}
|
||||
return data;
|
||||
}())
|
||||
}]
|
||||
|
||||
}else{
|
||||
c2sResult=intData.c2sResult;
|
||||
s2cResult=intData.s2cResult;
|
||||
totalResult=intData.totalResult;
|
||||
|
||||
zxchart=[
|
||||
{
|
||||
name: 'total',
|
||||
lineColor:'#709c58',
|
||||
lineWidth:1,
|
||||
marker: {
|
||||
enabled: false
|
||||
},
|
||||
fillOpacity: 0.2, // 透明度
|
||||
data: (function () {
|
||||
var data = [];
|
||||
if(totalResult!=null&&totalResult.length>0){
|
||||
var count=10;
|
||||
if(totalResult.length<10){
|
||||
count=totalResult.length;
|
||||
}
|
||||
for (var i = 0; i < count; i++) {
|
||||
var d =totalResult[i];
|
||||
var x = d[0], // 当前时间
|
||||
y = d[1];
|
||||
data.push({
|
||||
x: x,
|
||||
y: y
|
||||
});
|
||||
}
|
||||
}else{
|
||||
var time = (new Date()).getTime()-(1000 * 60 * 10+1000 * 60 * 5);
|
||||
for (var i = 0; i <10; i++) {
|
||||
data.push({
|
||||
x: time + i * 1000*60,
|
||||
y: 0
|
||||
});
|
||||
}
|
||||
}
|
||||
return data;
|
||||
}())
|
||||
},
|
||||
{
|
||||
name: 's2c',
|
||||
lineColor:'#c9a206',
|
||||
lineWidth:1,
|
||||
marker: {
|
||||
enabled: false
|
||||
},
|
||||
fillOpacity: 0.15, // 透明度
|
||||
data: (function () {
|
||||
var data = [];
|
||||
if(s2cResult!=null&&s2cResult.length>0){
|
||||
var count=10;
|
||||
if(s2cResult.length<10){
|
||||
count=s2cResult.length;
|
||||
}
|
||||
for (var i = 0; i < count; i++) {
|
||||
var d =s2cResult[i];
|
||||
var x = d[0], // 当前时间
|
||||
y = d[1];
|
||||
data.push({
|
||||
x: x,
|
||||
y: y
|
||||
});
|
||||
}
|
||||
}else{
|
||||
var time = (new Date()).getTime()-(1000 * 60 * 10+1000 * 60 * 5);
|
||||
for (var i = 0; i <10; i++) {
|
||||
data.push({
|
||||
x: time + i * 1000*60,
|
||||
y: 0
|
||||
});
|
||||
}
|
||||
}
|
||||
return data;
|
||||
}())
|
||||
},
|
||||
{
|
||||
name: 'c2s',
|
||||
lineColor:'#64b5c5',
|
||||
lineWidth:1,
|
||||
marker: {
|
||||
enabled: false
|
||||
},
|
||||
fillOpacity: 0.1, // 透明度
|
||||
data: (function () {
|
||||
var data = [];
|
||||
if(c2sResult!=null&&c2sResult.length>0){
|
||||
var count=10;
|
||||
if(c2sResult.length<10){
|
||||
count=c2sResult.length;
|
||||
}
|
||||
for (var i = 0; i < count; i++) {
|
||||
var d =c2sResult[i];
|
||||
var x = d[0], // 时间
|
||||
y = d[1];
|
||||
data.push({
|
||||
x: x,
|
||||
y: y
|
||||
});
|
||||
}
|
||||
} else{
|
||||
var time = (new Date()).getTime()-(1000 * 60 * 10+1000 * 60 * 5);
|
||||
for (var i = 0; i <10; i++) {
|
||||
data.push({
|
||||
x: time + i * 1000*60,
|
||||
y: 0
|
||||
});
|
||||
}
|
||||
}
|
||||
return data;
|
||||
}())
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
var nowDate=new Date();
|
||||
Highcharts.setOptions({ global: { useUTC: false } });
|
||||
var num=0;
|
||||
@@ -650,9 +963,20 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
colors:['#a9d4cf','#eecf8d'],
|
||||
|
||||
// colors:['#a9d4cf','#eecf8d','#ebb093'],
|
||||
colors:['#709c58','#c9a206','#64b5c5'],
|
||||
title : {
|
||||
text : null
|
||||
text : (function () {
|
||||
var timebe=(new Date().getTime())-(1000 * 60 * 6);
|
||||
var start=(new Date().getTime())-(1000 * 60 * 10+1000 * 60 * 5);
|
||||
var begin=dateFtt("yyyy-MM-dd hh:mm:ss",new Date(start)); //获取1个点少算一分钟
|
||||
var end=dateFtt("yyyy-MM-dd hh:mm:ss",new Date(timebe));
|
||||
var tlt='<spring:message code="${appName}"></spring:message> '+begin+'--'+end+''
|
||||
return tlt;
|
||||
}())
|
||||
|
||||
|
||||
},
|
||||
xAxis: {
|
||||
type:'datetime',
|
||||
@@ -675,7 +999,7 @@
|
||||
},
|
||||
yAxis : {
|
||||
title : {
|
||||
text : null
|
||||
text : unitType
|
||||
},
|
||||
min:0,
|
||||
allowDecimals:false
|
||||
@@ -704,88 +1028,28 @@
|
||||
radius : 7,
|
||||
radiusPlus : 5
|
||||
}
|
||||
}
|
||||
},
|
||||
// fillOpacity: 0.2 // 透明度
|
||||
}
|
||||
},
|
||||
series: [{
|
||||
name: '<spring:message code="client_ip"/>',
|
||||
lineColor:'#a9d4cf',
|
||||
lineWidth:1,
|
||||
marker: {
|
||||
enabled: false
|
||||
},
|
||||
data: (function () {
|
||||
var data = [];
|
||||
if(sipResult!=null&&sipResult.length>0){
|
||||
var count=10;
|
||||
if(sipResult.length<10){
|
||||
count=sipResult.length;
|
||||
}
|
||||
for (var i = 0; i < count; i++) {
|
||||
var d =sipResult[i];
|
||||
var x = d[0], // 时间
|
||||
y = d[1];
|
||||
data.push({
|
||||
x: x,
|
||||
y: y
|
||||
});
|
||||
}
|
||||
} else{
|
||||
var time = (new Date()).getTime()-(1000 * 60 * 10+1000 * 60 * 5);
|
||||
for (var i = 0; i <10; i++) {
|
||||
data.push({
|
||||
x: time + i * 1000*60,
|
||||
y: 0
|
||||
});
|
||||
}
|
||||
}
|
||||
return data;
|
||||
}())
|
||||
},
|
||||
{
|
||||
name: '<spring:message code="server_ip"/>',
|
||||
lineColor:'#a9d4cf',
|
||||
lineWidth:1,
|
||||
marker: {
|
||||
enabled: false
|
||||
},
|
||||
data: (function () {
|
||||
var data = [];
|
||||
if(dipResult!=null&&dipResult.length>0){
|
||||
var count=10;
|
||||
if(dipResult.length<10){
|
||||
count=dipResult.length;
|
||||
}
|
||||
for (var i = 0; i < count; i++) {
|
||||
var d =dipResult[i];
|
||||
var x = d[0], // 当前时间
|
||||
y = d[1];
|
||||
data.push({
|
||||
x: x,
|
||||
y: y
|
||||
});
|
||||
}
|
||||
}else{
|
||||
var time = (new Date()).getTime()-(1000 * 60 * 10+1000 * 60 * 5);
|
||||
for (var i = 0; i <10; i++) {
|
||||
data.push({
|
||||
x: time + i * 1000*60,
|
||||
y: 0
|
||||
});
|
||||
}
|
||||
}
|
||||
return data;
|
||||
}())
|
||||
}]
|
||||
series: zxchart
|
||||
});
|
||||
|
||||
var series = chart.series[0];
|
||||
var series1 = chart.series[1];
|
||||
if(unitType!='Unique Ip'){
|
||||
var series2 = chart.series[2];
|
||||
}
|
||||
window.clearInterval(timer);
|
||||
// if(sipResult!=null&&sipResult.length>0){
|
||||
var nu=0;
|
||||
var unitType=$("#unitType").val();
|
||||
timer=setInterval(function() {
|
||||
var time3=(new Date().getTime())-(1000 * 60 * 5);
|
||||
var time4=(new Date().getTime())-(1000 * 60 * 4);
|
||||
var c2sResult=new Array();
|
||||
var s2cResult=new Array();
|
||||
var totalResult=new Array();
|
||||
var begin=dateFtt("yyyy-MM-dd hh:mm:ss",new Date(time3)); //获取1个点少算一分钟
|
||||
var end=dateFtt("yyyy-MM-dd hh:mm:ss",new Date(time4));
|
||||
$.ajax({
|
||||
@@ -798,26 +1062,53 @@
|
||||
"endDate" : end,
|
||||
"appType" : appType,
|
||||
"entranceId" : entranceId,
|
||||
"searchIspCode":isp
|
||||
"searchIspCode":isp,
|
||||
"searchQuotaType":unitType
|
||||
},
|
||||
async : true,
|
||||
traditional:true,
|
||||
success : function(rs) {
|
||||
var realTimeData=rs;
|
||||
if(realTimeData!=null&&Object.keys(realTimeData).length>0){
|
||||
var sipReal=realTimeData.sipResult;
|
||||
var dipReal=realTimeData.dipResult;
|
||||
var d =sipReal[0];
|
||||
if(unitType=='Unique Ip'){
|
||||
var sipReal=realTimeData.sipResult;
|
||||
var dipReal=realTimeData.dipResult;
|
||||
|
||||
var d =sipReal[0];
|
||||
series.addPoint([d[0], d[1]], true, true);
|
||||
var t =dipReal[0];
|
||||
var t =dipReal[0];
|
||||
series1.addPoint([t[0], t[1]], true, true);
|
||||
}else{
|
||||
var c2sRes=realTimeData.c2sResult;
|
||||
var s2cRes=realTimeData.s2cResult;
|
||||
var totalRes=realTimeData.totalResult;
|
||||
|
||||
var s =totalRes[0];
|
||||
series.addPoint([s[0], s[1]], true, true);
|
||||
var t =s2cRes[0];
|
||||
series1.addPoint([t[0], t[1]], true, true);
|
||||
var d =c2sRes[0];
|
||||
series2.addPoint([d[0], d[1]], true, true);
|
||||
}
|
||||
|
||||
}else{
|
||||
var x=(new Date()).getTime()-(1000 * 60 * 5);
|
||||
var y=0;
|
||||
series.addPoint([x, y], true, true);
|
||||
series1.addPoint([x, y], true, true);
|
||||
if(unitType=='Unique Ip'){
|
||||
series.addPoint([x, y], true, true);
|
||||
series1.addPoint([x, y], true, true);
|
||||
}else{
|
||||
series.addPoint([x, y], true, true);
|
||||
series1.addPoint([x, y], true, true);
|
||||
series2.addPoint([x, y], true, true);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
var start=(new Date().getTime())-(1000 * 60 * 10+1000 * 60 * 5);
|
||||
var startTime=dateFtt("yyyy-MM-dd hh:mm:ss",new Date(start));
|
||||
var ends=(new Date().getTime())-(1000 * 60 * 5);
|
||||
var endTime=dateFtt("yyyy-MM-dd hh:mm:ss",new Date(ends));
|
||||
chart.title.update({ text: '<spring:message code="${appName}"></spring:message> '+startTime+'--'+endTime+''});
|
||||
closeTip();
|
||||
},
|
||||
error : function(data, textStatus, errorThrown) {
|
||||
@@ -833,10 +1124,69 @@
|
||||
// }
|
||||
}
|
||||
// 历史信息
|
||||
function showActionHistoryChart(sipResult,dipResult) {
|
||||
function showActionHistoryChart(sipResult,dipResult,c2sResult,s2cResult,totalResult) {
|
||||
var nowDate=new Date();
|
||||
Highcharts.setOptions({ global: { useUTC: false } });
|
||||
var num=0;
|
||||
var lsChart=null;
|
||||
var unitType=$("#unitType").val();
|
||||
if(unitType=='Unique Ip'){
|
||||
lsChart= [{
|
||||
name: '<spring:message code="client_ip"/>',
|
||||
data: sipResult,
|
||||
lineColor:'#a9d4cf',
|
||||
lineWidth:1,
|
||||
marker: {
|
||||
enabled: false
|
||||
},
|
||||
fillOpacity: 0.2 // 透明度
|
||||
},
|
||||
{
|
||||
name: '<spring:message code="server_ip"/>',
|
||||
data: dipResult,
|
||||
lineColor:'#eecf8d',
|
||||
lineWidth:1,
|
||||
marker: {
|
||||
enabled: false
|
||||
},
|
||||
fillOpacity: 0.2 // 透明度
|
||||
}]
|
||||
}else{
|
||||
lsChart= [
|
||||
{
|
||||
name: 'total',
|
||||
data: totalResult,
|
||||
// lineColor:'#D9853A',
|
||||
lineColor:'#709c58',
|
||||
lineWidth:1,
|
||||
marker: {
|
||||
enabled: false
|
||||
},
|
||||
fillOpacity: 0.2 // 透明度
|
||||
},
|
||||
{
|
||||
name: 's2c',
|
||||
data: s2cResult,
|
||||
// lineColor:'#EAB33B',
|
||||
lineColor:'#c9a206',
|
||||
lineWidth:1,
|
||||
marker: {
|
||||
enabled: false
|
||||
},
|
||||
fillOpacity: 0.15 // 透明度
|
||||
},{
|
||||
name: 'c2s',
|
||||
data: c2sResult,
|
||||
// lineColor:'#E5E2CD',
|
||||
lineColor:'#64b5c5',
|
||||
lineWidth:1,
|
||||
marker: {
|
||||
enabled: false
|
||||
},
|
||||
fillOpacity: 0.1 // 透明度
|
||||
}]
|
||||
}
|
||||
|
||||
var chart = Highcharts.chart('chart-history',
|
||||
{
|
||||
chart: {
|
||||
@@ -867,9 +1217,10 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
colors:['#a9d4cf','#eecf8d'],
|
||||
// colors:['#EF843C','#EFCA6B','#6ED0E0'],
|
||||
colors:['#709c58','#c9a206','#64b5c5'],
|
||||
title : {
|
||||
text : null
|
||||
text : '<spring:message code="${appName}"></spring:message> '+$("#beginDateh").val()+'--'+$("#endDateh").val()+''
|
||||
},
|
||||
xAxis: {
|
||||
type:'datetime',
|
||||
@@ -892,7 +1243,7 @@
|
||||
},
|
||||
yAxis : {
|
||||
title : {
|
||||
text : null
|
||||
text : unitType
|
||||
},
|
||||
min:0,
|
||||
allowDecimals:false
|
||||
@@ -921,27 +1272,11 @@
|
||||
radius : 7,
|
||||
radiusPlus : 5
|
||||
}
|
||||
}
|
||||
},
|
||||
// fillOpacity: 0.2 // 透明度
|
||||
}
|
||||
},
|
||||
series: [{
|
||||
name: '<spring:message code="client_ip"/>',
|
||||
data: sipResult,
|
||||
lineColor:'#a9d4cf',
|
||||
lineWidth:1,
|
||||
marker: {
|
||||
enabled: false
|
||||
}
|
||||
},
|
||||
{
|
||||
name: '<spring:message code="server_ip"/>',
|
||||
data: dipResult,
|
||||
lineColor:'#eecf8d',
|
||||
lineWidth:1,
|
||||
marker: {
|
||||
enabled: false
|
||||
}
|
||||
}]
|
||||
series:lsChart
|
||||
});
|
||||
}
|
||||
(function(H) {
|
||||
@@ -954,6 +1289,7 @@
|
||||
rows.shift(); // 删除一个重复行
|
||||
var total=[];
|
||||
var map={};
|
||||
var unitType=$("#unitType").val();
|
||||
if(heard[0].indexOf("History") != -1){
|
||||
rows = [];
|
||||
/* 调用后台接口导出 */
|
||||
@@ -961,13 +1297,27 @@
|
||||
var timeData = JSON.parse($("#timeData").val());
|
||||
var sipData = JSON.parse($("#sipData").val());
|
||||
var dipData = JSON.parse($("#dipData").val());
|
||||
for(var i=0;i<sipData.length;i++){
|
||||
var colData=[];
|
||||
var time=new Date(timeData[i]); //
|
||||
var ftime=dateFtt("yyyy-MM-dd hh:mm:ss",time);
|
||||
colData.push(ftime,sipData[i],dipData[i])
|
||||
rows.push(colData)
|
||||
}
|
||||
|
||||
var c2sData = JSON.parse($("#c2sData").val());
|
||||
var s2cData = JSON.parse($("#s2cData").val());
|
||||
var totalData = JSON.parse($("#totalData").val());
|
||||
if(unitType=='Unique Ip'){
|
||||
for(var i=0;i<sipData.length;i++){
|
||||
var colData=[];
|
||||
var time=new Date(timeData[i]); //
|
||||
var ftime=dateFtt("yyyy-MM-dd hh:mm:ss",time);
|
||||
colData.push(ftime,sipData[i],dipData[i]);
|
||||
rows.push(colData)
|
||||
}
|
||||
}else{
|
||||
for(var i=0;i<c2sData.length;i++){
|
||||
var colData=[];
|
||||
var time=new Date(timeData[i]); //
|
||||
var ftime=dateFtt("yyyy-MM-dd hh:mm:ss",time);
|
||||
colData.push(ftime,c2sData[i],c2sData[i],totalData[i])
|
||||
rows.push(colData)
|
||||
}
|
||||
}
|
||||
}else{
|
||||
var siptotal=0;
|
||||
var diptotal=0;
|
||||
@@ -983,7 +1333,12 @@
|
||||
diptotal=diptotal+Number(d[2]);
|
||||
}
|
||||
})
|
||||
total.push(siptotal,diptotal);
|
||||
if(unitType=='Unique Ip'){
|
||||
total.push(siptotal,diptotal);
|
||||
}else{
|
||||
total.push('--','--','--');
|
||||
}
|
||||
|
||||
}
|
||||
total.unshift('<spring:message code="report_total"/>');
|
||||
rows.push(total)
|
||||
@@ -1005,6 +1360,7 @@
|
||||
var total=[];
|
||||
var start = "";
|
||||
var end = "";
|
||||
var unitType=$("#unitType").val();
|
||||
if(heard[0].indexOf("History") != -1){
|
||||
start = $("#beginDateh").val();
|
||||
end = $("#endDateh").val();
|
||||
@@ -1012,27 +1368,68 @@
|
||||
var timeData = JSON.parse($("#timeData").val());
|
||||
var sipData = JSON.parse($("#sipData").val());
|
||||
var dipData = JSON.parse($("#dipData").val());
|
||||
for(var i=0;i<sipData.length;i++){
|
||||
var colData=[];
|
||||
var time=new Date(timeData[i]); //
|
||||
var ftime=dateFtt("yyyy-MM-dd hh:mm:ss",time);
|
||||
colData.push(ftime,sipData[i],dipData[i])
|
||||
data.push({
|
||||
num1:ftime,
|
||||
num2:sipData[i],
|
||||
num3:dipData[i],
|
||||
|
||||
var c2sData = JSON.parse($("#c2sData").val());
|
||||
var s2cData = JSON.parse($("#s2cData").val());
|
||||
var totalData = JSON.parse($("#totalData").val());
|
||||
if(unitType=='Unique Ip'){
|
||||
for(var i=0;i<sipData.length;i++){
|
||||
var colData=[];
|
||||
var time=new Date(timeData[i]); //
|
||||
var ftime=dateFtt("yyyy-MM-dd hh:mm:ss",time);
|
||||
colData.push(ftime,sipData[i],dipData[i])
|
||||
data.push({
|
||||
num1:ftime,
|
||||
num2:sipData[i],
|
||||
num3:dipData[i],
|
||||
})
|
||||
}
|
||||
data.unshift({
|
||||
num1:'RealTime',
|
||||
num2:'<spring:message code="client_ip"/>',
|
||||
num3:'<spring:message code="server_ip"/>',
|
||||
})
|
||||
}
|
||||
|
||||
}else{
|
||||
for(var i=0;i<c2sData.length;i++){
|
||||
var colData=[];
|
||||
var time=new Date(timeData[i]); //
|
||||
var ftime=dateFtt("yyyy-MM-dd hh:mm:ss",time);
|
||||
colData.push(ftime,c2sData[i],s2cData[i],totalData[i])
|
||||
data.push({
|
||||
num1:ftime,
|
||||
num2:c2sData[i],
|
||||
num3:s2cData[i],
|
||||
num4:totalData[i],
|
||||
})
|
||||
}
|
||||
data.unshift({
|
||||
num1:'RealTime',
|
||||
num2:'c2s',
|
||||
num3:'s2c',
|
||||
num4:'total',
|
||||
})
|
||||
}
|
||||
|
||||
}else{
|
||||
var siptotal=0;
|
||||
var diptotal=0;
|
||||
$(rows).each(function (i,d){
|
||||
if(d!=null){
|
||||
if(unitType=='Unique Ip'){
|
||||
data.push({
|
||||
num1:d[0],
|
||||
num2:d[1],
|
||||
num3:d[2],
|
||||
});
|
||||
}else{
|
||||
data.push({
|
||||
num1:d[0],
|
||||
num2:d[1],
|
||||
num3:d[2],
|
||||
num4:d[3],
|
||||
});
|
||||
}
|
||||
if(i>0){
|
||||
if(i==1){
|
||||
start=d[0];
|
||||
@@ -1045,17 +1442,26 @@
|
||||
}
|
||||
}
|
||||
})
|
||||
total.push(siptotal,diptotal);
|
||||
if(unitType=='Unique Ip'){
|
||||
total.push(siptotal,diptotal);
|
||||
}else{
|
||||
total.push('--','--','--');
|
||||
}
|
||||
}
|
||||
data.push({
|
||||
num1:"<spring:message code='report_total'/>",
|
||||
num2:total
|
||||
})
|
||||
|
||||
|
||||
var titleKey=null;
|
||||
if(unitType=='Unique Ip'){
|
||||
titleKey=["num1","num2","num3"];
|
||||
}else{
|
||||
titleKey=["num1","num2","num3","num4"];
|
||||
}
|
||||
exportCsv({
|
||||
title:["<spring:message code='${appName}'/>",start+"--"+end],
|
||||
titleForKey:["num1","num2","num3"],
|
||||
titleForKey:titleKey,
|
||||
data:data
|
||||
});
|
||||
};
|
||||
|
||||
@@ -182,7 +182,7 @@ function showPortActiveChart(xData,series){
|
||||
},
|
||||
yAxis: {
|
||||
title: {
|
||||
text: 'bytes'
|
||||
text: 'Link Numbers'
|
||||
}
|
||||
},
|
||||
tooltip: {
|
||||
|
||||
@@ -798,6 +798,15 @@ jQuery.validator.addMethod("portCheck",function(value, element) {
|
||||
}
|
||||
}
|
||||
});
|
||||
jQuery.validator.addMethod("sessionDPortCheck",function(value, element) {
|
||||
//port 1~65535
|
||||
if(this.optional(element)||(/^([1-9][0-9]{0,4})$/.test(value)&& RegExp.$1 <=65535)){
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
});
|
||||
|
||||
jQuery.validator.addMethod("chooseAreaOrIsp",function(value, element) {
|
||||
var isp="";
|
||||
if($(element).is(":visible")){
|
||||
|
||||
@@ -89,6 +89,8 @@
|
||||
arbitrary:"Arbitrarily",
|
||||
log_trend:"Log Trend",
|
||||
info:"Prompt",
|
||||
protect_warn:"Policy with relax precondition may consume too much resources.Use with cautions!"
|
||||
protect_warn:"Policy with relax precondition may consume too much resources.Use with cautions!",
|
||||
log_no_data:"This hour no data",
|
||||
sessionDPortCheck:"Port must between 1 and 65535"
|
||||
});
|
||||
}(jQuery));
|
||||
|
||||
@@ -89,6 +89,8 @@
|
||||
arbitrary:"Любой",
|
||||
log_trend:"Журнал Тенденция",
|
||||
info:"Инфо",
|
||||
protect_warn:"Policy with relax precondition may consume too much resources.Use with cautions!"
|
||||
protect_warn:"Policy with relax precondition may consume too much resources.Use with cautions!",
|
||||
log_no_data:"Нет данных за этот час",
|
||||
sessionDPortCheck:"Порт должен между 1 и 65535"
|
||||
});
|
||||
}(jQuery));
|
||||
|
||||
@@ -89,6 +89,8 @@
|
||||
arbitrary:"任意",
|
||||
log_trend:"日志趋势",
|
||||
info:"提示",
|
||||
protect_warn:"该策略执行条件过于宽泛,会消耗较多的计算资源。慎用!"
|
||||
protect_warn:"该策略执行条件过于宽泛,会消耗较多的计算资源。慎用!",
|
||||
log_no_data:"本小时无数据",
|
||||
sessionDPortCheck:"端口应介于1到65535之间,数字不能以0开头"
|
||||
});
|
||||
}(jQuery));
|
||||
|
||||
@@ -1548,10 +1548,14 @@ var validCharLength=function(){
|
||||
$(this).find(".tag").each(function(){
|
||||
text+=$(this).children("span").text().trim();
|
||||
});
|
||||
if(text.length < 4 || text.length > 1024){
|
||||
$(this).parents(".col-md-6").next("div").html("<label id=\"cfgKeywordsError\" class=\"error\">"+$.validator.messages.keywordLength+"</label>");
|
||||
if(flag){
|
||||
flag=false;
|
||||
if(text.length < 4 || text.length > 1024 && (!sessionTagsFlag)){
|
||||
// APP特征配置Session组件tagsInput不校验字符长度
|
||||
var sessionTagsFlag = $(this).prev().hasClass("c2sAndS2cInput");
|
||||
if((text.length < 4 || text.length > 1024) && (!sessionTagsFlag)){
|
||||
$(this).parents(".col-md-6").next("div").html("<label id=\"cfgKeywordsError\" class=\"error\">"+$.validator.messages.keywordLength+"</label>");
|
||||
if(flag){
|
||||
flag=false;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -161,7 +161,7 @@ var GetLogTotal=function(_data){
|
||||
var failed=$.validator.messages.failed;
|
||||
var request=$.ajax({
|
||||
type:'post',
|
||||
timeout:10000,//超时时间设置,查询接口时间过长超时
|
||||
timeout:30000,//超时时间设置,查询接口时间过长超时
|
||||
url:pathName+'/report/ajaxGetLogTotal',
|
||||
data:{"endTime":timeStamp,"serviceIds":_data.serviceIds.join(','),"functionId":_data.functionId,"compileIds":_data.compileIds.join(',')},
|
||||
dataType:'json',
|
||||
|
||||
Reference in New Issue
Block a user