增加APP策略配置
This commit is contained in:
130
src/main/java/com/nis/domain/configuration/AppByteCfg.java
Normal file
130
src/main/java/com/nis/domain/configuration/AppByteCfg.java
Normal file
@@ -0,0 +1,130 @@
|
||||
/**
|
||||
*@Title: BaseStringConfig.java
|
||||
*@Package com.nis.domain.restful
|
||||
*@Description TODO
|
||||
*@author dell
|
||||
*@date 2018年2月5日 下午5:26:02
|
||||
*@version 版本号
|
||||
*/
|
||||
package com.nis.domain.configuration;
|
||||
|
||||
import com.google.gson.annotations.Expose;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.nis.util.excel.ExcelField;
|
||||
|
||||
/**
|
||||
* @Description: APP策略配置
|
||||
* @author (dell)
|
||||
* @date 2018年2月5日 下午5:26:02
|
||||
* @version V1.0
|
||||
*/
|
||||
public class AppByteCfg extends BaseCfg<AppByteCfg> {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -3350695484085989968L;
|
||||
private static final String tableName="app_byte_cfg";
|
||||
@Expose
|
||||
private Integer compileId;
|
||||
@Expose
|
||||
private Integer ratelimit;
|
||||
private String appCode;
|
||||
private Integer specServiceId;
|
||||
private String bytes;
|
||||
private String cfgKeywords;
|
||||
|
||||
@Expose
|
||||
@ExcelField(title="expression_type")
|
||||
@SerializedName("exprType")
|
||||
protected Integer exprType ;
|
||||
|
||||
@Expose
|
||||
@ExcelField(title="match_method")
|
||||
@SerializedName("matchMethod")
|
||||
protected Integer matchMethod ;
|
||||
|
||||
@Expose
|
||||
@ExcelField(title="whether_hexbinary")
|
||||
@SerializedName("isHexbin")
|
||||
protected Integer isHexbin;
|
||||
|
||||
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;
|
||||
}
|
||||
@Override
|
||||
public void initDefaultValue() {
|
||||
// TODO Auto-generated method stub
|
||||
super.initDefaultValue();
|
||||
this.isHexbin = 0;
|
||||
}
|
||||
|
||||
|
||||
public Integer getCompileId() {
|
||||
return compileId;
|
||||
}
|
||||
public void setCompileId(Integer compileId) {
|
||||
this.compileId = compileId;
|
||||
}
|
||||
|
||||
public static String getTablename() {
|
||||
return tableName;
|
||||
}
|
||||
|
||||
public Integer getRatelimit() {
|
||||
return ratelimit;
|
||||
}
|
||||
|
||||
public void setRatelimit(Integer ratelimit) {
|
||||
this.ratelimit = ratelimit;
|
||||
}
|
||||
public String getAppCode() {
|
||||
return appCode;
|
||||
}
|
||||
public void setAppCode(String appCode) {
|
||||
this.appCode = appCode;
|
||||
}
|
||||
public Integer getSpecServiceId() {
|
||||
return specServiceId;
|
||||
}
|
||||
public void setSpecServiceId(Integer specServiceId) {
|
||||
this.specServiceId = specServiceId;
|
||||
}
|
||||
|
||||
public String getBytes() {
|
||||
return bytes;
|
||||
}
|
||||
|
||||
public void setBytes(String bytes) {
|
||||
this.bytes = bytes;
|
||||
}
|
||||
|
||||
public String getCfgKeywords() {
|
||||
return cfgKeywords;
|
||||
}
|
||||
|
||||
public void setCfgKeywords(String cfgKeywords) {
|
||||
this.cfgKeywords = cfgKeywords;
|
||||
}
|
||||
|
||||
}
|
||||
125
src/main/java/com/nis/domain/configuration/AppDomainCfg.java
Normal file
125
src/main/java/com/nis/domain/configuration/AppDomainCfg.java
Normal file
@@ -0,0 +1,125 @@
|
||||
/**
|
||||
*@Title: BaseStringConfig.java
|
||||
*@Package com.nis.domain.restful
|
||||
*@Description TODO
|
||||
*@author dell
|
||||
*@date 2018年2月5日 下午5:26:02
|
||||
*@version 版本号
|
||||
*/
|
||||
package com.nis.domain.configuration;
|
||||
|
||||
import com.google.gson.annotations.Expose;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.nis.util.excel.ExcelField;
|
||||
|
||||
/**
|
||||
* @Description: APP策略配置
|
||||
* @author (dell)
|
||||
* @date 2018年2月5日 下午5:26:02
|
||||
* @version V1.0
|
||||
*/
|
||||
public class AppDomainCfg extends BaseCfg<AppDomainCfg> {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -4685445179478960429L;
|
||||
private static final String tableName="app_domain_cfg";
|
||||
@Expose
|
||||
private Integer compileId;
|
||||
@Expose
|
||||
private Integer ratelimit;
|
||||
private String appCode;
|
||||
private Integer specServiceId;
|
||||
private String domain;
|
||||
private String cfgKeywords;
|
||||
@Expose
|
||||
@ExcelField(title="expression_type")
|
||||
@SerializedName("exprType")
|
||||
protected Integer exprType ;
|
||||
|
||||
@Expose
|
||||
@ExcelField(title="match_method")
|
||||
@SerializedName("matchMethod")
|
||||
protected Integer matchMethod ;
|
||||
|
||||
@Expose
|
||||
@ExcelField(title="whether_hexbinary")
|
||||
@SerializedName("isHexbin")
|
||||
protected Integer isHexbin;
|
||||
|
||||
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;
|
||||
}
|
||||
@Override
|
||||
public void initDefaultValue() {
|
||||
// TODO Auto-generated method stub
|
||||
super.initDefaultValue();
|
||||
this.isHexbin = 0;
|
||||
}
|
||||
|
||||
|
||||
public Integer getCompileId() {
|
||||
return compileId;
|
||||
}
|
||||
public void setCompileId(Integer compileId) {
|
||||
this.compileId = compileId;
|
||||
}
|
||||
|
||||
public static String getTablename() {
|
||||
return tableName;
|
||||
}
|
||||
|
||||
public Integer getRatelimit() {
|
||||
return ratelimit;
|
||||
}
|
||||
|
||||
public void setRatelimit(Integer ratelimit) {
|
||||
this.ratelimit = ratelimit;
|
||||
}
|
||||
public String getAppCode() {
|
||||
return appCode;
|
||||
}
|
||||
public void setAppCode(String appCode) {
|
||||
this.appCode = appCode;
|
||||
}
|
||||
public Integer getSpecServiceId() {
|
||||
return specServiceId;
|
||||
}
|
||||
public void setSpecServiceId(Integer specServiceId) {
|
||||
this.specServiceId = specServiceId;
|
||||
}
|
||||
public String getDomain() {
|
||||
return domain;
|
||||
}
|
||||
public void setDomain(String domain) {
|
||||
this.domain = domain;
|
||||
}
|
||||
public String getCfgKeywords() {
|
||||
return cfgKeywords;
|
||||
}
|
||||
|
||||
public void setCfgKeywords(String cfgKeywords) {
|
||||
this.cfgKeywords = cfgKeywords;
|
||||
}
|
||||
}
|
||||
130
src/main/java/com/nis/domain/configuration/AppHttpCfg.java
Normal file
130
src/main/java/com/nis/domain/configuration/AppHttpCfg.java
Normal file
@@ -0,0 +1,130 @@
|
||||
/**
|
||||
*@Title: BaseStringConfig.java
|
||||
*@Package com.nis.domain.restful
|
||||
*@Description TODO
|
||||
*@author dell
|
||||
*@date 2018年2月5日 下午5:26:02
|
||||
*@version 版本号
|
||||
*/
|
||||
package com.nis.domain.configuration;
|
||||
|
||||
import com.google.gson.annotations.Expose;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.nis.util.excel.ExcelField;
|
||||
|
||||
/**
|
||||
* @Description: APP策略配置
|
||||
* @author (dell)
|
||||
* @date 2018年2月5日 下午5:26:02
|
||||
* @version V1.0
|
||||
*/
|
||||
public class AppHttpCfg extends BaseCfg<AppHttpCfg> {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 7528723915857911560L;
|
||||
private static final String tableName="app_http_cfg";
|
||||
@Expose
|
||||
private Integer compileId;
|
||||
@Expose
|
||||
private Integer ratelimit;
|
||||
private String appCode;
|
||||
private Integer specServiceId;
|
||||
private String district;
|
||||
private String cfgKeywords;
|
||||
|
||||
@Expose
|
||||
@ExcelField(title="expression_type")
|
||||
@SerializedName("exprType")
|
||||
protected Integer exprType ;
|
||||
|
||||
@Expose
|
||||
@ExcelField(title="match_method")
|
||||
@SerializedName("matchMethod")
|
||||
protected Integer matchMethod ;
|
||||
|
||||
@Expose
|
||||
@ExcelField(title="whether_hexbinary")
|
||||
@SerializedName("isHexbin")
|
||||
protected Integer isHexbin;
|
||||
|
||||
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;
|
||||
}
|
||||
@Override
|
||||
public void initDefaultValue() {
|
||||
// TODO Auto-generated method stub
|
||||
super.initDefaultValue();
|
||||
this.isHexbin = 0;
|
||||
}
|
||||
|
||||
|
||||
public Integer getCompileId() {
|
||||
return compileId;
|
||||
}
|
||||
public void setCompileId(Integer compileId) {
|
||||
this.compileId = compileId;
|
||||
}
|
||||
|
||||
public static String getTablename() {
|
||||
return tableName;
|
||||
}
|
||||
|
||||
public Integer getRatelimit() {
|
||||
return ratelimit;
|
||||
}
|
||||
|
||||
public void setRatelimit(Integer ratelimit) {
|
||||
this.ratelimit = ratelimit;
|
||||
}
|
||||
public String getAppCode() {
|
||||
return appCode;
|
||||
}
|
||||
public void setAppCode(String appCode) {
|
||||
this.appCode = appCode;
|
||||
}
|
||||
public Integer getSpecServiceId() {
|
||||
return specServiceId;
|
||||
}
|
||||
public void setSpecServiceId(Integer specServiceId) {
|
||||
this.specServiceId = specServiceId;
|
||||
}
|
||||
|
||||
public String getDistrict() {
|
||||
return district;
|
||||
}
|
||||
|
||||
public void setDistrict(String district) {
|
||||
this.district = district;
|
||||
}
|
||||
|
||||
public String getCfgKeywords() {
|
||||
return cfgKeywords;
|
||||
}
|
||||
|
||||
public void setCfgKeywords(String cfgKeywords) {
|
||||
this.cfgKeywords = cfgKeywords;
|
||||
}
|
||||
|
||||
}
|
||||
131
src/main/java/com/nis/domain/configuration/AppInnerRuleCfg.java
Normal file
131
src/main/java/com/nis/domain/configuration/AppInnerRuleCfg.java
Normal file
@@ -0,0 +1,131 @@
|
||||
/**
|
||||
*@Title: BaseStringConfig.java
|
||||
*@Package com.nis.domain.restful
|
||||
*@Description TODO
|
||||
*@author dell
|
||||
*@date 2018年2月5日 下午5:26:02
|
||||
*@version 版本号
|
||||
*/
|
||||
package com.nis.domain.configuration;
|
||||
|
||||
import com.google.gson.annotations.Expose;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.nis.util.excel.ExcelField;
|
||||
|
||||
/**
|
||||
* @Description: APP策略配置
|
||||
* @author (dell)
|
||||
* @date 2018年2月5日 下午5:26:02
|
||||
* @version V1.0
|
||||
*/
|
||||
public class AppInnerRuleCfg extends BaseCfg<AppInnerRuleCfg> {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 5620659473745698672L;
|
||||
private static final String tableName="app_inner_rule_cfg";
|
||||
@Expose
|
||||
private Integer compileId;
|
||||
@Expose
|
||||
private Integer ratelimit;
|
||||
private String appCode;
|
||||
private Integer specServiceId;
|
||||
private String ruleFile;
|
||||
private String cfgKeywords;
|
||||
|
||||
@Expose
|
||||
@ExcelField(title="expression_type")
|
||||
@SerializedName("exprType")
|
||||
protected Integer exprType ;
|
||||
|
||||
@Expose
|
||||
@ExcelField(title="match_method")
|
||||
@SerializedName("matchMethod")
|
||||
protected Integer matchMethod ;
|
||||
|
||||
@Expose
|
||||
@ExcelField(title="whether_hexbinary")
|
||||
@SerializedName("isHexbin")
|
||||
protected Integer isHexbin;
|
||||
|
||||
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;
|
||||
}
|
||||
@Override
|
||||
public void initDefaultValue() {
|
||||
// TODO Auto-generated method stub
|
||||
super.initDefaultValue();
|
||||
this.isHexbin = 0;
|
||||
}
|
||||
|
||||
|
||||
public Integer getCompileId() {
|
||||
return compileId;
|
||||
}
|
||||
public void setCompileId(Integer compileId) {
|
||||
this.compileId = compileId;
|
||||
}
|
||||
|
||||
public static String getTablename() {
|
||||
return tableName;
|
||||
}
|
||||
|
||||
public Integer getRatelimit() {
|
||||
return ratelimit;
|
||||
}
|
||||
|
||||
public void setRatelimit(Integer ratelimit) {
|
||||
this.ratelimit = ratelimit;
|
||||
}
|
||||
public String getAppCode() {
|
||||
return appCode;
|
||||
}
|
||||
public void setAppCode(String appCode) {
|
||||
this.appCode = appCode;
|
||||
}
|
||||
public Integer getSpecServiceId() {
|
||||
return specServiceId;
|
||||
}
|
||||
public void setSpecServiceId(Integer specServiceId) {
|
||||
this.specServiceId = specServiceId;
|
||||
}
|
||||
|
||||
public String getRuleFile() {
|
||||
return ruleFile;
|
||||
}
|
||||
|
||||
public void setRuleFile(String ruleFile) {
|
||||
this.ruleFile = ruleFile;
|
||||
}
|
||||
|
||||
public String getCfgKeywords() {
|
||||
return cfgKeywords;
|
||||
}
|
||||
|
||||
public void setCfgKeywords(String cfgKeywords) {
|
||||
this.cfgKeywords = cfgKeywords;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
234
src/main/java/com/nis/domain/configuration/AppIpCfg.java
Normal file
234
src/main/java/com/nis/domain/configuration/AppIpCfg.java
Normal file
@@ -0,0 +1,234 @@
|
||||
|
||||
package com.nis.domain.configuration;
|
||||
|
||||
import com.google.gson.annotations.Expose;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
/**
|
||||
* @Description: APP策略配置
|
||||
* @author (dell)
|
||||
* @date 2018年2月5日 下午5:26:02
|
||||
* @version V1.0
|
||||
*/
|
||||
public class AppIpCfg extends BaseCfg<AppIpCfg> {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 4758285716968228089L;
|
||||
private static final String tableName="app_ip_cfg";
|
||||
@Expose
|
||||
private Integer compileId;
|
||||
@Expose
|
||||
private Integer ratelimit;
|
||||
private String appCode;
|
||||
private Integer specServiceId;
|
||||
@Expose
|
||||
@SerializedName("ipType")
|
||||
protected Integer ipType;
|
||||
protected Integer ipPattern;
|
||||
protected String srcIpAddress;
|
||||
protected String destIpAddress;
|
||||
protected Integer portPattern;
|
||||
protected String srcPort;
|
||||
protected String destPort;
|
||||
|
||||
/**
|
||||
* 方向
|
||||
*/
|
||||
@Expose
|
||||
@SerializedName("direction")
|
||||
protected Integer direction ;
|
||||
/**
|
||||
* 方向
|
||||
*/
|
||||
@Expose
|
||||
@SerializedName("protocol")
|
||||
protected Integer protocol ;
|
||||
/**
|
||||
* 协议ID
|
||||
*/
|
||||
@Expose
|
||||
@SerializedName("protocolId")
|
||||
protected Integer protocolId ;
|
||||
|
||||
/**
|
||||
* ipType
|
||||
* @return ipType
|
||||
*/
|
||||
|
||||
public Integer getIpType() {
|
||||
return ipType;
|
||||
}
|
||||
/**
|
||||
* @param ipType the ipType to set
|
||||
*/
|
||||
public void setIpType(Integer ipType) {
|
||||
this.ipType = ipType;
|
||||
}
|
||||
|
||||
/**
|
||||
* direction
|
||||
* @return direction
|
||||
*/
|
||||
|
||||
public Integer getDirection() {
|
||||
return direction;
|
||||
}
|
||||
/**
|
||||
* @param direction the direction to set
|
||||
*/
|
||||
public void setDirection(Integer direction) {
|
||||
this.direction = direction;
|
||||
}
|
||||
/**
|
||||
* protocol
|
||||
* @return protocol
|
||||
*/
|
||||
|
||||
public Integer getProtocol() {
|
||||
return protocol;
|
||||
}
|
||||
/**
|
||||
* @param protocol the protocol to set
|
||||
*/
|
||||
public void setProtocol(Integer protocol) {
|
||||
this.protocol = protocol;
|
||||
}
|
||||
/**
|
||||
* protocolId
|
||||
* @return protocolId
|
||||
*/
|
||||
|
||||
public Integer getProtocolId() {
|
||||
return protocolId;
|
||||
}
|
||||
/**
|
||||
* @param protocolId the protocolId to set
|
||||
*/
|
||||
public void setProtocolId(Integer protocolId) {
|
||||
this.protocolId = protocolId;
|
||||
}
|
||||
|
||||
/**
|
||||
* ipPattern
|
||||
* @return ipPattern
|
||||
*/
|
||||
|
||||
public Integer getIpPattern() {
|
||||
return ipPattern;
|
||||
}
|
||||
/**
|
||||
* @param ipPattern the ipPattern to set
|
||||
*/
|
||||
public void setIpPattern(Integer ipPattern) {
|
||||
this.ipPattern = ipPattern;
|
||||
}
|
||||
/**
|
||||
* portPattern
|
||||
* @return portPattern
|
||||
*/
|
||||
|
||||
public Integer getPortPattern() {
|
||||
return portPattern;
|
||||
}
|
||||
/**
|
||||
* @param portPattern the portPattern to set
|
||||
*/
|
||||
public void setPortPattern(Integer portPattern) {
|
||||
this.portPattern = portPattern;
|
||||
}
|
||||
|
||||
/**
|
||||
* srcIpAddress
|
||||
* @return srcIpAddress
|
||||
*/
|
||||
|
||||
public String getSrcIpAddress() {
|
||||
return srcIpAddress;
|
||||
}
|
||||
/**
|
||||
* @param srcIpAddress the srcIpAddress to set
|
||||
*/
|
||||
public void setSrcIpAddress(String srcIpAddress) {
|
||||
this.srcIpAddress = srcIpAddress;
|
||||
}
|
||||
/**
|
||||
* destIpAddress
|
||||
* @return destIpAddress
|
||||
*/
|
||||
|
||||
public String getDestIpAddress() {
|
||||
return destIpAddress;
|
||||
}
|
||||
/**
|
||||
* @param destIpAddress the destIpAddress to set
|
||||
*/
|
||||
public void setDestIpAddress(String destIpAddress) {
|
||||
this.destIpAddress = destIpAddress;
|
||||
}
|
||||
/**
|
||||
* srcPort
|
||||
* @return srcPort
|
||||
*/
|
||||
|
||||
public String getSrcPort() {
|
||||
return srcPort;
|
||||
}
|
||||
/**
|
||||
* @param srcPort the srcPort to set
|
||||
*/
|
||||
public void setSrcPort(String srcPort) {
|
||||
this.srcPort = srcPort;
|
||||
}
|
||||
/**
|
||||
* destPort
|
||||
* @return destPort
|
||||
*/
|
||||
|
||||
public String getDestPort() {
|
||||
return destPort;
|
||||
}
|
||||
/**
|
||||
* @param destPort the destPort to set
|
||||
*/
|
||||
public void setDestPort(String destPort) {
|
||||
this.destPort = destPort;
|
||||
}
|
||||
@Override
|
||||
public void initDefaultValue(){
|
||||
super.initDefaultValue();
|
||||
this.direction = 0;
|
||||
}
|
||||
public Integer getCompileId() {
|
||||
return compileId;
|
||||
}
|
||||
public void setCompileId(Integer compileId) {
|
||||
this.compileId = compileId;
|
||||
}
|
||||
|
||||
public static String getTablename() {
|
||||
return tableName;
|
||||
}
|
||||
|
||||
public Integer getRatelimit() {
|
||||
return ratelimit;
|
||||
}
|
||||
|
||||
public void setRatelimit(Integer ratelimit) {
|
||||
this.ratelimit = ratelimit;
|
||||
}
|
||||
public String getAppCode() {
|
||||
return appCode;
|
||||
}
|
||||
public void setAppCode(String appCode) {
|
||||
this.appCode = appCode;
|
||||
}
|
||||
public Integer getSpecServiceId() {
|
||||
return specServiceId;
|
||||
}
|
||||
public void setSpecServiceId(Integer specServiceId) {
|
||||
this.specServiceId = specServiceId;
|
||||
}
|
||||
|
||||
}
|
||||
128
src/main/java/com/nis/domain/configuration/AppPolicyCfg.java
Normal file
128
src/main/java/com/nis/domain/configuration/AppPolicyCfg.java
Normal file
@@ -0,0 +1,128 @@
|
||||
/**
|
||||
*@Title: BaseStringConfig.java
|
||||
*@Package com.nis.domain.restful
|
||||
*@Description TODO
|
||||
*@author dell
|
||||
*@date 2018年2月5日 下午5:26:02
|
||||
*@version 版本号
|
||||
*/
|
||||
package com.nis.domain.configuration;
|
||||
|
||||
import com.google.gson.annotations.Expose;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.nis.util.excel.ExcelField;
|
||||
|
||||
/**
|
||||
* @Description: APP策略配置
|
||||
* @author (dell)
|
||||
* @date 2018年2月5日 下午5:26:02
|
||||
* @version V1.0
|
||||
*/
|
||||
public class AppPolicyCfg extends BaseCfg<AppPolicyCfg> {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -5679998383250783571L;
|
||||
private static final String tableName="app_policy_cfg";
|
||||
@Expose
|
||||
private Integer compileId;
|
||||
@Expose
|
||||
private Integer ratelimit;
|
||||
private String appCode;
|
||||
private Integer specServiceId;
|
||||
private String appName;
|
||||
private String cfgKeywords;
|
||||
|
||||
@Expose
|
||||
@ExcelField(title="expression_type")
|
||||
@SerializedName("exprType")
|
||||
protected Integer exprType ;
|
||||
|
||||
@Expose
|
||||
@ExcelField(title="match_method")
|
||||
@SerializedName("matchMethod")
|
||||
protected Integer matchMethod ;
|
||||
|
||||
@Expose
|
||||
@ExcelField(title="whether_hexbinary")
|
||||
@SerializedName("isHexbin")
|
||||
protected Integer isHexbin;
|
||||
|
||||
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;
|
||||
}
|
||||
@Override
|
||||
public void initDefaultValue() {
|
||||
// TODO Auto-generated method stub
|
||||
super.initDefaultValue();
|
||||
this.isHexbin = 0;
|
||||
}
|
||||
|
||||
|
||||
public Integer getCompileId() {
|
||||
return compileId;
|
||||
}
|
||||
public void setCompileId(Integer compileId) {
|
||||
this.compileId = compileId;
|
||||
}
|
||||
|
||||
public static String getTablename() {
|
||||
return tableName;
|
||||
}
|
||||
|
||||
public Integer getRatelimit() {
|
||||
return ratelimit;
|
||||
}
|
||||
|
||||
public void setRatelimit(Integer ratelimit) {
|
||||
this.ratelimit = ratelimit;
|
||||
}
|
||||
public String getAppCode() {
|
||||
return appCode;
|
||||
}
|
||||
public void setAppCode(String appCode) {
|
||||
this.appCode = appCode;
|
||||
}
|
||||
public Integer getSpecServiceId() {
|
||||
return specServiceId;
|
||||
}
|
||||
public void setSpecServiceId(Integer specServiceId) {
|
||||
this.specServiceId = specServiceId;
|
||||
}
|
||||
|
||||
public String getAppName() {
|
||||
return appName;
|
||||
}
|
||||
|
||||
public void setAppName(String appName) {
|
||||
this.appName = appName;
|
||||
}
|
||||
public String getCfgKeywords() {
|
||||
return cfgKeywords;
|
||||
}
|
||||
|
||||
public void setCfgKeywords(String cfgKeywords) {
|
||||
this.cfgKeywords = cfgKeywords;
|
||||
}
|
||||
}
|
||||
@@ -20,7 +20,7 @@ import com.google.gson.annotations.SerializedName;
|
||||
*/
|
||||
public class AppStringCfg extends BaseStringCfg {
|
||||
|
||||
|
||||
private static final String tableName="app_string_cfg";
|
||||
/**
|
||||
* @Fields serialVersionUID:TODO(用一句话描述这个变量表示什么)
|
||||
*
|
||||
@@ -29,6 +29,8 @@ public class AppStringCfg extends BaseStringCfg {
|
||||
private static final long serialVersionUID = 4938724489988587634L;
|
||||
@Expose
|
||||
private Integer compileId;
|
||||
@Expose
|
||||
private Integer ratelimit;
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.nis.domain.configuration.BaseCfg#initDefaultValue()
|
||||
@@ -46,5 +48,17 @@ public class AppStringCfg extends BaseStringCfg {
|
||||
public void setCompileId(Integer compileId) {
|
||||
this.compileId = compileId;
|
||||
}
|
||||
|
||||
public static String getTablename() {
|
||||
return tableName;
|
||||
}
|
||||
|
||||
public Integer getRatelimit() {
|
||||
return ratelimit;
|
||||
}
|
||||
|
||||
public void setRatelimit(Integer ratelimit) {
|
||||
this.ratelimit = ratelimit;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
package com.nis.web.controller.configuration;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
@@ -14,16 +14,11 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.ServiceConfigInfo;
|
||||
import com.nis.domain.SystemServiceInfo;
|
||||
import com.nis.domain.basics.ServiceDictInfo;
|
||||
import com.nis.domain.basics.SysDictInfo;
|
||||
import com.nis.domain.configuration.AppIdCfg;
|
||||
import com.nis.domain.configuration.BaseCfg;
|
||||
import com.nis.domain.configuration.RequestInfo;
|
||||
import com.nis.domain.configuration.AppPolicyCfg;
|
||||
import com.nis.domain.specific.SpecificServiceCfg;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.exceptions.MaatConvertException;
|
||||
import com.nis.web.controller.BaseController;
|
||||
import com.nis.web.security.UserUtils;
|
||||
|
||||
/**
|
||||
* 特定协议相关配置控制类
|
||||
@@ -31,270 +26,79 @@ import com.nis.web.controller.BaseController;
|
||||
*
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("${adminPath}/cfg/app")
|
||||
@RequestMapping("${adminPath}/app")
|
||||
public class AppCfgController extends BaseController {
|
||||
@RequestMapping(value = {"list"})
|
||||
public String cfgList(Model model,Integer audit,String cfgName,@ModelAttribute("cfg")AppIdCfg cfg,HttpServletRequest request,HttpServletResponse response) {
|
||||
model.addAttribute("cfgName", cfgName);
|
||||
model.addAttribute("audit", audit);
|
||||
if(cfg!=null){
|
||||
Integer serviceId=cfg.getServiceId();
|
||||
logger.info("servcice id is "+serviceId);
|
||||
if(serviceId!=null){
|
||||
model.addAttribute("serviceId", serviceId);
|
||||
List<ServiceConfigInfo> serviceList=serviceConfigInfoService.findList(serviceId);
|
||||
if(serviceList!=null){
|
||||
for(ServiceConfigInfo s:serviceList){
|
||||
if(s.getTableType()==2 || s.getTableType()==4){
|
||||
model.addAttribute("isContainFeaturesCfg", true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
Page<AppIdCfg> page = appCfgService.findPage(new Page<AppIdCfg>(request, response,"r"), cfg);
|
||||
model.addAttribute("page", page);
|
||||
model.addAttribute("action", cfg.getAction());
|
||||
List<RequestInfo> requestInfos=requestInfoService.getValidRequestInfo();
|
||||
model.addAttribute("requestInfos", requestInfos);
|
||||
List<ServiceDictInfo> fls=serviceDictInfoService.findAllFlDict();
|
||||
model.addAttribute("fls", fls);
|
||||
List<ServiceDictInfo> xzs=serviceDictInfoService.findAllXzDict();
|
||||
model.addAttribute("xzs", xzs);
|
||||
List<ServiceDictInfo> lables=serviceDictInfoService.findAllLableDict();
|
||||
model.addAttribute("lables", lables);
|
||||
SpecificServiceCfg specificServiceCfg = new SpecificServiceCfg();
|
||||
specificServiceCfg.setIsValid(1);
|
||||
model.addAttribute("protocolList",specificServiceCfgService.findAllSpecificServiceCfg(specificServiceCfg,"spec_service_id DESC"));
|
||||
}else{
|
||||
logger.error("未获取到正确的serviceId");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return "/cfg/appCfgList";
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(value = {"form"})
|
||||
public String cfgForm(int action,String cfgName,Integer serviceId,Model model,HttpServletRequest request,HttpServletResponse response) {
|
||||
model.addAttribute("action", action);
|
||||
model.addAttribute("serviceId", serviceId);
|
||||
model.addAttribute("audit", Constants.CFG_PAGE);
|
||||
model.addAttribute("cfgName", cfgName);
|
||||
logger.info("sercice id is "+serviceId);
|
||||
|
||||
// SystemServiceInfo serviceInfo=systemServiceService.get(serviceId);
|
||||
// model.addAttribute("serviceInfo", serviceInfo);
|
||||
//来函信息
|
||||
List<RequestInfo> requestInfos=requestInfoService.getValidRequestInfo();
|
||||
model.addAttribute("requestInfos", requestInfos);
|
||||
//分类信息
|
||||
List<ServiceDictInfo> fls=serviceDictInfoService.findFlDict();
|
||||
model.addAttribute("fls", fls);
|
||||
//性质信息
|
||||
List<ServiceDictInfo> xzs=serviceDictInfoService.findXzDict();
|
||||
model.addAttribute("xzs", xzs);
|
||||
//标签信息
|
||||
List<ServiceDictInfo> lables=serviceDictInfoService.findLableDict();
|
||||
model.addAttribute("lables", lables);
|
||||
//特定服务信息
|
||||
SpecificServiceCfg specificServiceCfg = new SpecificServiceCfg();
|
||||
specificServiceCfg.setIsValid(1);
|
||||
model.addAttribute("protocolList",specificServiceCfgService.findAllSpecificServiceCfg(specificServiceCfg,"spec_service_id DESC"));
|
||||
//协议特征配置
|
||||
List<ServiceConfigInfo> featuresList = serviceConfigInfoService.findList(serviceId);
|
||||
model.addAttribute("featuresList",featuresList);
|
||||
if(featuresList!=null){
|
||||
for(ServiceConfigInfo s:featuresList){
|
||||
if(s.getTableType()==2 || s.getTableType()==4){
|
||||
model.addAttribute("isContainFeaturesCfg", true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
//特征作用域信息
|
||||
/*SysDictInfo sysDictInfo = new SysDictInfo();
|
||||
sysDictInfo.setItemType(3);
|
||||
Integer[] itType = new Integer[0];
|
||||
List<SysDictInfo> featuresAreaList = sysDictInfoService.findAllSysDictInfo(sysDictInfo,itType,null);
|
||||
model.addAttribute("featuresAreaList", featuresAreaList);*/
|
||||
AppIdCfg cfg = new AppIdCfg();
|
||||
cfg.initDefaultValue();
|
||||
cfg.setAction(action);
|
||||
cfg.setServiceId(serviceId.intValue());
|
||||
model.addAttribute("_cfg", cfg);
|
||||
return "/cfg/appCfgForm";
|
||||
}
|
||||
@RequestMapping(value = {"updateForm"})
|
||||
public String updateAppCfgForm(int action,long cfgId,String cfgName,Integer serviceId,Model model,HttpServletRequest request,HttpServletResponse response) {
|
||||
model.addAttribute("cfgName", cfgName);
|
||||
model.addAttribute("serviceId", serviceId);
|
||||
model.addAttribute("action", action);
|
||||
model.addAttribute("audit", Constants.CFG_PAGE);
|
||||
|
||||
AppIdCfg searchBean=new AppIdCfg();
|
||||
searchBean.setCfgId(cfgId);
|
||||
AppIdCfg cfg=appCfgService.getAppCfgById(searchBean);
|
||||
model.addAttribute("_cfg", cfg);
|
||||
List<RequestInfo> requestInfos=requestInfoService.getAllRequestInfo();
|
||||
model.addAttribute("requestInfos", requestInfos);
|
||||
List<ServiceDictInfo> fls=serviceDictInfoService.findAllFlDict();
|
||||
model.addAttribute("fls", fls);
|
||||
List<ServiceDictInfo> xzs=serviceDictInfoService.findAllXzDict();
|
||||
model.addAttribute("xzs", xzs);
|
||||
List<ServiceDictInfo> lables=serviceDictInfoService.findAllLableDict();
|
||||
model.addAttribute("lables", lables);
|
||||
//特定服务信息
|
||||
SpecificServiceCfg specificServiceCfg = new SpecificServiceCfg();
|
||||
specificServiceCfg.setIsValid(1);
|
||||
model.addAttribute("protocolList",specificServiceCfgService.findAllSpecificServiceCfg(specificServiceCfg,"spec_service_id DESC"));
|
||||
//协议特征配置
|
||||
List<ServiceConfigInfo> featuresList = serviceConfigInfoService.findList(serviceId);
|
||||
model.addAttribute("featuresList",featuresList);
|
||||
return "/cfg/appCfgForm";
|
||||
}
|
||||
@RequestMapping(value = {"showFeaturesCfg"})
|
||||
public String showFeaturesCfg(int action,long cfgId,Integer compileId,String cfgName,Integer serviceId,Model model,HttpServletRequest request,HttpServletResponse response){
|
||||
AppIdCfg cfg=new AppIdCfg();
|
||||
cfg.setCfgId(cfgId);
|
||||
cfg.setCompileId(compileId);
|
||||
cfg = appCfgService.findAppIdCfg(cfg);
|
||||
model.addAttribute("_cfg", cfg);
|
||||
model.addAttribute("cfgName", cfgName);
|
||||
model.addAttribute("serviceId", serviceId);
|
||||
model.addAttribute("action", action);
|
||||
//协议特征配置
|
||||
List<ServiceConfigInfo> featuresList = serviceConfigInfoService.findList(serviceId);
|
||||
model.addAttribute("featuresList",featuresList);
|
||||
return "/cfg/appFeaturesCfg";
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* addAppCfg(新增IP配置)
|
||||
* (这里描述这个方法适用条件 – 可选)
|
||||
* @return
|
||||
*String
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
* app策略列表
|
||||
* @param model
|
||||
* @param cfg
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = {"saveOrUpdateCfg"})
|
||||
public String saveOrUpdateAppCfg(String cfgName,Model model, AppIdCfg cfg) {
|
||||
model.addAttribute("audit", Constants.CFG_PAGE);
|
||||
model.addAttribute("cfgType","app");
|
||||
model.addAttribute("cfgName",cfgName);
|
||||
model.addAttribute("serviceId",cfg.getServiceId());
|
||||
model.addAttribute("action",cfg.getAction());
|
||||
logger.info("saveOrUpdateAppCfg loaded");
|
||||
if(cfg==null){
|
||||
logger.error("无法保存空的配置!");
|
||||
addMessage(model,"save_failed");
|
||||
@RequestMapping(value = {"policyList"})
|
||||
public String policyList(Model model,@ModelAttribute("cfg")AppPolicyCfg cfg,HttpServletRequest request,HttpServletResponse response) {
|
||||
Page<AppPolicyCfg> searchPage=new Page<AppPolicyCfg>(request,response,"r");
|
||||
Page<AppPolicyCfg> page = appCfgService.findAppPolicyList(searchPage, cfg);
|
||||
for(AppPolicyCfg entity:page.getList()){
|
||||
SpecificServiceCfg app = specificServiceCfgService.getBySpecServiceId(entity.getSpecServiceId());
|
||||
entity.setAppName(app.getSpecServiceName());
|
||||
}
|
||||
model.addAttribute("page", page);
|
||||
initPageCondition(model,cfg);
|
||||
return "/cfg/app/appPolicyCfgList";
|
||||
}
|
||||
@RequestMapping(value = {"policyForm"})
|
||||
@RequiresPermissions(value={"app:policy:config"})
|
||||
public String policyForm(Model model,String ids,AppPolicyCfg entity) {
|
||||
if(StringUtils.isNotBlank(ids)){
|
||||
entity = appCfgService.getAppPolicyCfg(Long.parseLong(ids));
|
||||
initUpdateFormCondition(model,entity);
|
||||
}else{
|
||||
SpecificServiceCfg protocol = specificServiceCfgService.getBySpecServiceId(cfg.getAppId().intValue());
|
||||
if(protocol!=null){
|
||||
cfg.setAppName(protocol.getSpecServiceName());
|
||||
int serviceId=cfg.getServiceId();
|
||||
cfg.setIsValid(Constants.VALID_NO);
|
||||
cfg.setIsAudit(Constants.AUDIT_NOT_YET);
|
||||
if(cfg.getCfgId()==null){
|
||||
cfg.setCreatorId(cfg.getCurrentUser().getId());
|
||||
cfg.setCreateTime(new Date());
|
||||
try {
|
||||
appCfgService.addAppCfg(cfg);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.error("配置保存失败!"+e.getMessage());
|
||||
addMessage(model,"save_failed");
|
||||
}
|
||||
}else{
|
||||
cfg.setEditorId(cfg.getCurrentUser().getId());
|
||||
cfg.setEditTime(new Date());
|
||||
try {
|
||||
appCfgService.updateAppCfg(cfg);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.error("配置保存失败!"+e.getMessage());
|
||||
addMessage(model,"save_failed");
|
||||
}
|
||||
}
|
||||
model.addAttribute("serviceId",serviceId);
|
||||
model.addAttribute("action",cfg.getAction());
|
||||
addMessage(model,"save_success");
|
||||
}else{
|
||||
logger.error("所选协议信息无效!");
|
||||
addMessage(model,"save_failed");
|
||||
}
|
||||
|
||||
initFormCondition(model,entity);
|
||||
}
|
||||
return "/cfg/resultPage";//StringEscapeUtils.escapeHtml4("?serviceId="+cfg.getServiceId()+"&action="+cfg.getAction()+"&cfgName="+cfgName);
|
||||
model.addAttribute("_cfg", entity);
|
||||
return "/cfg/app/appPolicyCfgForm";
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* auditAppCfg(审核IP配置)
|
||||
* (这里描述这个方法适用条件 – 可选)
|
||||
* @return
|
||||
*String
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@RequestMapping(value = {"auditCfg"})
|
||||
public String auditAppCfg(String cfgName,String ids,Integer auditState,Integer serviceId,Integer action,
|
||||
Model model,RedirectAttributes redirectAttributes) {
|
||||
model.addAttribute("cfgName", cfgName);
|
||||
model.addAttribute("audit", Constants.AUDIT_PAGE);
|
||||
model.addAttribute("serviceId", serviceId);
|
||||
model.addAttribute("action",action);
|
||||
model.addAttribute("cfgType","app");
|
||||
@RequestMapping(value = {"saveAppPolicyCfg"})
|
||||
@RequiresPermissions(value={"app:policy:config"})
|
||||
public String saveAppPolicyCfg(Model model,HttpServletRequest request,HttpServletResponse response,
|
||||
AppPolicyCfg entity,RedirectAttributes redirectAttributes) {
|
||||
try {
|
||||
String[] cfgIds = ids.split(",");
|
||||
int result=appCfgService.auditAppCfg(cfgIds,auditState);
|
||||
if(result==1){
|
||||
addMessage(model,"audit_success");
|
||||
}else{
|
||||
addMessage(model,"audit_failed");
|
||||
}
|
||||
appCfgService.saveOrUpdateAppPolicyCfg(entity);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.error("配置下发maat失败,"+e.getMessage());
|
||||
addMessage(model,"audit_failed");
|
||||
addMessage(redirectAttributes, e.getMessage());
|
||||
}
|
||||
return "/cfg/resultPage";
|
||||
|
||||
return "redirect:" + adminPath +"/app/policyList?function="+entity.getFunctionId();
|
||||
}
|
||||
/**
|
||||
*
|
||||
* auditAppCfg(删除IP配置,逻辑删除)
|
||||
* (这里描述这个方法适用条件 – 可选)
|
||||
* @return
|
||||
*String
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@RequestMapping(value = {"deleteCfg"})
|
||||
public String deleteAppCfg(int action,String ids,String cfgName,Integer serviceId,Model model,RedirectAttributes redirectAttributes) {
|
||||
model.addAttribute("serviceId", serviceId);
|
||||
model.addAttribute("cfgName", cfgName);
|
||||
model.addAttribute("action", action);
|
||||
model.addAttribute("cfgType","app");
|
||||
model.addAttribute("audit", Constants.CFG_PAGE);
|
||||
String[] cfgIds = ids.split(",");
|
||||
int result=appCfgService.deleteAppCfg(cfgIds);
|
||||
if(result==1){
|
||||
addMessage(redirectAttributes,"delete_success");
|
||||
}else{
|
||||
addMessage(redirectAttributes,"delete_failed");
|
||||
@RequestMapping(value = {"auditAppPolicyCfg"})
|
||||
@RequiresPermissions(value={"app:policy:audit"})
|
||||
public String auditAppPolicyCfg(Integer isAudit,Integer isValid,String ids,Integer functionId, RedirectAttributes redirectAttributes) {
|
||||
AppPolicyCfg entity = new AppPolicyCfg();
|
||||
String[] idArray = ids.split(",");
|
||||
for(String id :idArray){
|
||||
entity = appCfgService.getAppPolicyCfg(Long.parseLong(id));
|
||||
entity.setIsAudit(isAudit);
|
||||
entity.setIsValid(isValid);
|
||||
entity.setAuditorId(UserUtils.getUser().getId());
|
||||
entity.setAuditTime(new Date());
|
||||
entity.setFunctionId(functionId);
|
||||
try {
|
||||
appCfgService.auditAppPolicyCfg(entity,isAudit);
|
||||
} catch (MaatConvertException e) {
|
||||
e.printStackTrace();
|
||||
logger.info("app策略配置下发失败:"+e.getMessage());
|
||||
addMessage(redirectAttributes, e.getMessage());
|
||||
}
|
||||
}
|
||||
return "/cfg/resultPage";
|
||||
return "redirect:" + adminPath +"/app/policyList?functionId="+functionId;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* getCompileId(获取编译ID)
|
||||
* (这里描述这个方法适用条件 – 可选)
|
||||
* @return
|
||||
*long
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected Integer getCompileId(BaseCfg cfg){
|
||||
return 0;
|
||||
@RequestMapping(value = {"updateAppPolicyCfgValid"})
|
||||
@RequiresPermissions(value={"app:policy:config"})
|
||||
public String updateAppPolicyCfgValid(Integer isValid,String ids,Integer functionId) {
|
||||
appCfgService.updateAppPolicyCfgValid(isValid,ids,functionId);
|
||||
return "redirect:" + adminPath +"/app/policyList?functionId="+functionId;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,10 +5,17 @@ import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import com.nis.domain.configuration.AppByteCfg;
|
||||
import com.nis.domain.configuration.AppComplexKeywordCfg;
|
||||
import com.nis.domain.configuration.AppDomainCfg;
|
||||
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.AppIpCfg;
|
||||
import com.nis.domain.configuration.AppPolicyCfg;
|
||||
import com.nis.domain.configuration.AppStringCfg;
|
||||
import com.nis.domain.configuration.BaseCfg;
|
||||
import com.nis.domain.configuration.BaseStringCfg;
|
||||
import com.nis.domain.configuration.ComplexkeywordCfg;
|
||||
import com.nis.web.dao.CrudDao;
|
||||
@@ -21,27 +28,39 @@ import com.nis.web.dao.MyBatisDao;
|
||||
*
|
||||
*/
|
||||
@MyBatisDao
|
||||
public interface AppCfgDao extends CrudDao<AppIdCfg> {
|
||||
public AppIdCfg getById(@Param("cfgId")Long id) ;
|
||||
public AppIdCfg get(AppIdCfg entity) ;
|
||||
public List<AppIdCfg> findList(AppIdCfg entity) ;
|
||||
public int insert(AppIdCfg entity) ;
|
||||
public int updateByPrimaryKeySelective(AppIdCfg entity) ;
|
||||
public int updateValid(AppIdCfg entity) ;
|
||||
public int audit(AppIdCfg entity) ;
|
||||
public int updateFeaturesTableValid(@Param("tableName")String tableName,@Param("compileId")Integer compileId,
|
||||
@Param("isValid")Integer isValid,@Param("editorId")Long editorId,@Param("editTime")Date editTime) ;
|
||||
public int auditFeaturesTable(@Param("tableName")String tableName,@Param("compileId")Integer compileId,
|
||||
@Param("isValid")Integer isValid,@Param("isAudit")Integer isAudit,
|
||||
@Param("auditorId")Long auditorId,@Param("auditTime")Date auditTime) ;
|
||||
public int getIsValid(@Param("tableName")String tableName,@Param("cfgId")Long id);
|
||||
public int getIsValid(@Param("cfgId")Long id);
|
||||
public int getIsAudit(@Param("tableName")String tableName,@Param("cfgId")Long id);
|
||||
public int getIsAudit(@Param("cfgId")Long id);
|
||||
public List<AppFeaturesIndex> getFeaturesTableListByAppCompileId(@Param("appCompileId")Integer appCompileId) ;
|
||||
public int insertFeatures(AppFeaturesIndex entity) ;
|
||||
public int updateFeaturesByAppId(AppFeaturesIndex entity) ;
|
||||
public int deleteFeaturesByAppId(AppFeaturesIndex entity) ;
|
||||
public List<AppComplexKeywordCfg> getComplexkeywordFeaturesCfgListByCompileId(@Param("featuresTable") String featuresTable,@Param("compileId")Integer compileId);
|
||||
public List<AppStringCfg> getStrFeaturesCfgListByCompileId(@Param("featuresTable") String featuresTable,@Param("compileId")Integer compileId);
|
||||
public interface AppCfgDao {
|
||||
//app策略配置增删改查
|
||||
public List<AppPolicyCfg> findAppPolicyList(AppPolicyCfg entity) ;
|
||||
public AppPolicyCfg getAppPolicyCfg(Long cfgId) ;
|
||||
public int insertAppPolicyCfg(AppPolicyCfg entity);
|
||||
public int updateAppPolicyCfg(AppPolicyCfg entity);
|
||||
//app协议IP配置增删改查
|
||||
public List<AppIpCfg> findAppIpList(AppIpCfg entity) ;
|
||||
public AppIpCfg getAppIpCfg(Long cfgId) ;
|
||||
public int insertAppIpCfg(AppIpCfg entity);
|
||||
public int updateAppIpCfg(AppIpCfg entity);
|
||||
//app http特征增删改查
|
||||
public List<AppHttpCfg> findAppHttpList(AppHttpCfg entity) ;
|
||||
public AppHttpCfg getAppHttpCfg(Long cfgId) ;
|
||||
public int insertAppHttpCfg(AppHttpCfg entity);
|
||||
public int updateAppHttpCfg(AppHttpCfg entity);
|
||||
//app 域名配置增删改查
|
||||
public List<AppDomainCfg> findAppDomainList(AppDomainCfg entity) ;
|
||||
public AppDomainCfg getAppDomainCfg(Long cfgId) ;
|
||||
public int insertAppDomainCfg(AppDomainCfg entity);
|
||||
public int updateAppDomainCfg(AppDomainCfg entity);
|
||||
//app 字节特征增删改查
|
||||
public List<AppByteCfg> findAppByteList(AppByteCfg entity) ;
|
||||
public AppByteCfg getAppByteCfg(Long cfgId) ;
|
||||
public int insertAppByteCfg(AppByteCfg entity);
|
||||
public int updateAppByteCfg(AppByteCfg entity);
|
||||
//app内置文件增删改查
|
||||
public List<AppInnerRuleCfg> findAppInnerRuleList(AppInnerRuleCfg entity) ;
|
||||
public AppInnerRuleCfg getAppInnerRuleCfg(Long cfgId) ;
|
||||
public int insertAppInnerRuleCfg(AppInnerRuleCfg entity);
|
||||
public int updateAppInnerRuleCfg(AppInnerRuleCfg entity);
|
||||
//审核配置
|
||||
public void auditCfg(BaseCfg entity);
|
||||
//修改配置状态
|
||||
public void updateCfgValid(BaseCfg entity);
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -580,13 +580,16 @@ public abstract class BaseService {
|
||||
}
|
||||
}
|
||||
public static String keywordsEscape(String cfgKeywords){
|
||||
//不转译特殊字符
|
||||
cfgKeywords = StringEscapeUtils.unescapeHtml4(cfgKeywords);
|
||||
cfgKeywords=cfgKeywords.replace("\\", "\\\\");
|
||||
cfgKeywords=cfgKeywords.replace("&", "\\&");
|
||||
cfgKeywords=cfgKeywords.replace(" ", "\\b");
|
||||
//***and***在界面表示多个关键字的与表达式,此特殊字符串在common.js中使用定义,maat端以&表示
|
||||
cfgKeywords=cfgKeywords.replace(Constants.KEYWORD_EXPR, "&");
|
||||
if(StringUtils.isNotEmpty(cfgKeywords)){
|
||||
//不转译特殊字符
|
||||
cfgKeywords = StringEscapeUtils.unescapeHtml4(cfgKeywords);
|
||||
cfgKeywords=cfgKeywords.replace("\\", "\\\\");
|
||||
cfgKeywords=cfgKeywords.replace("&", "\\&");
|
||||
cfgKeywords=cfgKeywords.replace(" ", "\\b");
|
||||
//***and***在界面表示多个关键字的与表达式,此特殊字符串在common.js中使用定义,maat端以&表示
|
||||
cfgKeywords=cfgKeywords.replace(Constants.KEYWORD_EXPR, "&");
|
||||
|
||||
}
|
||||
return cfgKeywords;
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
170
src/main/webapp/WEB-INF/views/cfg/app/appPolicyCfgForm.jsp
Normal file
170
src/main/webapp/WEB-INF/views/cfg/app/appPolicyCfgForm.jsp
Normal file
@@ -0,0 +1,170 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<title><spring:message code="${cfgName}"></spring:message></title>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
$("#cancel").on("click",function(){
|
||||
window.history.back();
|
||||
});
|
||||
$(".action").on("change", function() {
|
||||
$("#serviceId").val($(this).attr("serviceId"));
|
||||
if($(".action:checked").val()==64){
|
||||
$("#ratelimit").show();
|
||||
}else{
|
||||
$("#ratelimit").hide();
|
||||
}
|
||||
});
|
||||
$("#serviceId").val($(".action:checked").attr("serviceId"));
|
||||
if($(".action:checked").val()==64){
|
||||
$("#ratelimit").show();
|
||||
}else{
|
||||
$("#ratelimit").hide();
|
||||
}
|
||||
$("#cfgFrom").validate({
|
||||
errorPlacement: function(error,element){
|
||||
if($(element).parents().hasClass("tagsinput")){
|
||||
$(element).parents(".col-md-6").next("div").append(error);
|
||||
}else{
|
||||
$(element).parents(".form-group").find("div[for='"+element.attr("name")+"']").append(error);
|
||||
}
|
||||
},
|
||||
submitHandler: function(form){
|
||||
var flag = true;
|
||||
$("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;
|
||||
return;
|
||||
}
|
||||
})
|
||||
if(flag){
|
||||
$("input[name$='exprType']").attr("disabled",false);
|
||||
$("#appCode").val($("#specServiceIdId").val());
|
||||
form.submit();
|
||||
}
|
||||
},
|
||||
errorContainer: "#messageBox",
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="page-content">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet box blue">
|
||||
<div class="portlet-title">
|
||||
<div class="caption">
|
||||
<i class="fa fa-gift"></i>
|
||||
<c:if test="${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/saveAppPolicyCfg" method="post" class="form-horizontal">
|
||||
<input type="hidden" name="cfgId" value="${_cfg.cfgId}">
|
||||
<input type="hidden" name="compileId" value="${_cfg.compileId}">
|
||||
<input type="hidden" name="functionId" value="${_cfg.functionId}">
|
||||
<input type="hidden" id="serviceId" name="serviceId" value="${_cfg.serviceId}">
|
||||
<input type="hidden" id="appCode" name="appCode" value="${_cfg.appCode}">
|
||||
<input type="hidden" id="exprType" name="exprType" value="0">
|
||||
<input type="hidden" id="matchMethod" name="matchMethod" value="3">
|
||||
<input type="hidden" id="isHexbin" name="isHexbin" value="0">
|
||||
<!-- 配置域类型 -->
|
||||
<c:forEach items="${regionList}" var="region">
|
||||
<c:if test="${_cfg.functionId eq region.functionId}">
|
||||
<input type="hidden" name="cfgType" value="${region.configRegionValue}">
|
||||
<input type="hidden" name="cfgRegionCode" value="${region.configRegionCode}">
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
<div class="form-body">
|
||||
<!-- desc and action -->
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="app"/></label>
|
||||
<div class="col-md-6">
|
||||
<sys:treeselect id="specServiceId" name="specServiceId" value="${_cfg.specServiceId}"
|
||||
labelName="parent.specServiceName"
|
||||
labelValue="${empty _cfg.specServiceId?spec_service_id:fns:getBySpecServiceId(_cfg.specServiceId).specServiceName}"
|
||||
title="${spec_service_id}" url="/specific/specificServiceCfg/treeData?isLeafShow=false" 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>
|
||||
<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="action"/></label>
|
||||
<div class="col-md-6">
|
||||
<c:forEach items="${serviceList}" var="service"
|
||||
varStatus="satus">
|
||||
<label class="radio-inline"> <c:if
|
||||
test="${_cfg.functionId eq service.functionId}">
|
||||
<input type="radio" name="action"
|
||||
serviceId="${service.serviceId }"
|
||||
protocolId="${service.protocolId }"
|
||||
value="${service.action }" class="required action"
|
||||
<c:if test="${_cfg.action==service.action || (_cfg.action==null && satus.index==0)}">checked</c:if>>
|
||||
<spring:message code="${service.actionCode }" />
|
||||
</c:if>
|
||||
</label>
|
||||
</c:forEach>
|
||||
</div>
|
||||
<div for="action"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6" id="ratelimit">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="ratelimit"/></label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control required" type="text" name="ratelimit" value="${_cfg.ratelimit}">
|
||||
</div>
|
||||
<div for="ratelimit"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<%@include file="/WEB-INF/include/form/areaInfo.jsp" %>
|
||||
<%@include file="/WEB-INF/include/form/basicInfo.jsp" %>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="row">
|
||||
<div class="col-md-offset-3 col-md-8">
|
||||
<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>
|
||||
444
src/main/webapp/WEB-INF/views/cfg/app/appPolicyCfgList.jsp
Normal file
444
src/main/webapp/WEB-INF/views/cfg/app/appPolicyCfgList.jsp
Normal file
@@ -0,0 +1,444 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<title><spring:message code="${cfgName}"></spring:message></title>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$(".tooltips").tooltip();
|
||||
//搜索框提示语初始化
|
||||
if("${cfg.cfgDesc}"){
|
||||
$("#intype").val("${cfg.cfgDesc}");
|
||||
}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",'');
|
||||
$("#level").attr("value",'');
|
||||
$("#searchForm")[0].reset();
|
||||
});
|
||||
//异步获取voip相关信息
|
||||
$("span[id^=open]").click(function(){
|
||||
var openId=$(this).attr("id");
|
||||
var closeId=$(this).attr("id").replace("open","close");
|
||||
var index=$(this).attr("id").replace("open","");
|
||||
$("#"+openId).hide();
|
||||
$("#"+closeId).show();
|
||||
//var compileId=$(this).attr("compileId");
|
||||
var cfgId=$(this).attr("cfgId");
|
||||
if($("#"+openId).parent().parent().next("tr").hasClass("child")){
|
||||
$("#"+openId).parent().parent().next("tr").show();
|
||||
}else{
|
||||
$.ajax({
|
||||
type:'post',
|
||||
async:false,
|
||||
url:'${ctx}/app/ajaxMailSubList',
|
||||
data:{"cfgId":cfgId,"index":index},
|
||||
dataType:"html",
|
||||
success:function(data){
|
||||
var subTab="<tr class='child'>"+
|
||||
"<td style='border-right: 1px solid #FFFFFF;'>"+
|
||||
"<input type='checkbox' hidden='hidden'/>"+
|
||||
"</td>"+
|
||||
"<td colspan='"+($(".table tr").eq(0).children("th").length-1)+"'>";
|
||||
var html="";
|
||||
html+="<div class='row'>";
|
||||
html = html+data;
|
||||
subTab=subTab+html;
|
||||
subTab+="</td>";
|
||||
subTab+="</tr>";
|
||||
$("#"+openId).parent().parent().after(subTab);
|
||||
$("div[name='tabTitle"+index+"']").get(0).click();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
$("span[id^=close]").on("click",function(){
|
||||
var closeId=$(this).attr("id");
|
||||
var openId=$(this).attr("id").replace("close","open");
|
||||
$("#"+closeId).hide();
|
||||
$("#"+openId).show();
|
||||
$("#"+closeId).parent().parent().next("tr").hide();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="page-content">
|
||||
<div class="theme-panel hidden-xs hidden-sm">
|
||||
<shiro:hasPermission name="app:policy:config">
|
||||
<button type="button" class="btn btn-primary"
|
||||
onClick="javascript:window.location='${ctx}/app/policyForm?functionId=${cfg.functionId}'">
|
||||
<i class="fa fa-plus"></i>
|
||||
<spring:message code="add"></spring:message></button>
|
||||
</shiro:hasPermission>
|
||||
</div>
|
||||
|
||||
<h3 class="page-title">
|
||||
<spring:message code="app_policy_control"></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" >
|
||||
<sys:message content="${message}"/>
|
||||
<form:form id="searchForm" modelAttribute="cfg" action="${ctx}/app/policyList?functionId=${cfg.functionId}" method="post" class="form-search">
|
||||
<input id="functionId" name="functionId" type="hidden" value="${cfg.functionId}"/>
|
||||
<input id="audit" name="audit" type="hidden" value="${audit}"/>
|
||||
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
|
||||
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
|
||||
<sys:tableSort id="orderBy" name="orderBy" value="${page.orderBy}"
|
||||
callback="page();" />
|
||||
<!-- 筛选按钮展开状态-->
|
||||
<input id="isFilterAction" name="isFilterAction" type="hidden" value="${cfg.isFilterAction }"/>
|
||||
<!-- 搜索内容与操作按钮栏 -->
|
||||
<div class="col-md-12">
|
||||
<div class="pull-left">
|
||||
<c:set var="state"><spring:message code='state'/></c:set>
|
||||
<form:select path="isAudit" class="selectpicker select2 input-small">
|
||||
<form:option value=""><spring:message code="all_states"/></form:option>
|
||||
<form:option value="0"><spring:message code="created"></spring:message></form:option>
|
||||
<form:option value="1"><spring:message code="approved"></spring:message></form:option>
|
||||
<form:option value="2"><spring:message code="unapproved"></spring:message></form:option>
|
||||
<form:option value="3"><spring:message code="cancel_approved"></spring:message></form:option>
|
||||
</form:select>
|
||||
</div>
|
||||
|
||||
<div class="pull-left">
|
||||
<c:set var="spec_service_id"><spring:message code="protocol_name"/></c:set>
|
||||
<sys:treeselect id="specServiceId" name="specServiceId" value="${specificServiceCfg.parent.specServiceId}"
|
||||
labelName="parent.specServiceName"
|
||||
labelValue="${empty cfg.specServiceId?spec_service_id:fns:getBySpecServiceId(cfg.specServiceId).specServiceName}"
|
||||
title="${spec_service_id}" url="/specific/specificServiceCfg/treeData?isLeafShow=false" extId=""
|
||||
cssClass="form-control input-small"/>
|
||||
</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:select>
|
||||
|
||||
</div>
|
||||
|
||||
<input id="intype" class="form-control input-medium" type="text" value="">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
<button type="button" class="btn blue" onClick="return page()"> <i class="fa fa-search"></i> <spring:message code="search"/> </button>
|
||||
<button type="button" class="btn btn-default" id="resetBtn"> <i class="fa fa-refresh"></i> <spring:message code="reset"/> </button>
|
||||
<button type="button" class="btn btn-default" id="filter-btn"> <spring:message code="filter"/> <i class="fa fa-angle-double-down"></i></button>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<shiro:hasPermission name="app:policy:config">
|
||||
<sys:delRow url="${ctx}/app/policyForm" id="contentTable" label="update"></sys:delRow>
|
||||
<sys:delRow url="${ctx}/app/updateAppPolicyCfgValid?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
|
||||
</shiro:hasPermission>
|
||||
<shiro:hasPermission name="app:policy:audit">
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
<i class="fa fa-wrench"></i> <spring:message code="examine"></spring:message>
|
||||
<i class="fa fa-angle-down"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu pull-right">
|
||||
<li><sys:delRow url="${ctx}/app/auditAppPolicyCfg?isAudit=1&isValid=1&functionId=${cfg.functionId }" id="contentTable" label="approved"></sys:delRow></li>
|
||||
<li><sys:delRow url="${ctx}/app/auditAppPolicyCfg?isAudit=2&isValid=0&functionId=${cfg.functionId }" id="contentTable" label="unapproved"></sys:delRow></li>
|
||||
<li><sys:delRow url="${ctx}/app/auditAppPolicyCfg?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-3">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label"><spring:message code='request_number'/></label>
|
||||
<c:set var="select"><spring:message code='select'/></c:set>
|
||||
<form:select path="requestId" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<c:forEach items="${requestInfos}" var="requestInfo" >
|
||||
<form:option value="${requestInfo.id}"><spring:message code="${requestInfo.requestTitle}"></spring:message></form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label"><spring:message code='type'/></label>
|
||||
<form:select path="classify" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<c:forEach items="${fls}" var="fl" >
|
||||
<form:option value="${fl.serviceDictId}"><spring:message code="${fl.itemValue}"></spring:message></form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label"><spring:message code='attribute'/></label>
|
||||
<c:set var="select"><spring:message code='select'/></c:set>
|
||||
<form:select path="attribute" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<c:forEach items="${xzs}" var="xz" >
|
||||
<form:option value="${xz.serviceDictId}"><spring:message code="${xz.itemValue}"></spring:message></form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label"><spring:message code='label'/></label>
|
||||
<form:select path="lable" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<c:forEach items="${lables}" var="lable" >
|
||||
<form:option value="${lable.serviceDictId}"><spring:message code="${lable.itemValue}"></spring:message></form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label><spring:message code="config_time"/>:</label>
|
||||
<input name="search_create_time_start" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value='${cfg.search_create_time_start}' pattern='yyyy-MM-dd HH:mm:ss'/>" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label> </label>
|
||||
<input name="search_create_time_end" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_create_time_end}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label><spring:message code="edit_time"/>:</label>
|
||||
<input name="search_edit_time_start" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_edit_time_start}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label> </label>
|
||||
<input name="search_edit_time_end" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_edit_time_end}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label><spring:message code="audit_time"/>:</label>
|
||||
<input name="search_audit_time_start" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_audit_time_start}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label> </label>
|
||||
<input name="search_audit_time_end" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_audit_time_end}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<!-- /筛选搜索内容栏 结束-->
|
||||
</form:form>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><input type="checkbox" class="i-checks" id="checkAll"></th>
|
||||
<th class="cfgDesc"><spring:message code="config_describe"/></th>
|
||||
<th><spring:message code="protocol"/></th>
|
||||
<th><spring:message code="ratelimit"/></th>
|
||||
<th><spring:message code="block_type"/></th>
|
||||
<th><spring:message code="whether_area_block"/></th>
|
||||
<th><spring:message code="letter"/></th>
|
||||
<th><spring:message code="type"/></th>
|
||||
<th><spring:message code="attribute"/></th>
|
||||
<th><spring:message code="label"/></th>
|
||||
<th><spring:message code="valid_identifier"/></th>
|
||||
<th><spring:message code="is_audit"/></th>
|
||||
<th><spring:message code="creator"/></th>
|
||||
<th class="sort-column a.create_time"><spring:message code="config_time"/></th>
|
||||
<th><spring:message code="editor"/></th>
|
||||
<th class="sort-column a.edit_time"><spring:message code="edit_time"/></th>
|
||||
<th><spring:message code="auditor"/></th>
|
||||
<th class="sort-column a.audit_time"><spring:message code="audit_time"/></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:forEach items="${page.list }" var="indexCfg" varStatus="status" step="1">
|
||||
<tr>
|
||||
<td>
|
||||
<input type="checkbox" class="i-checks child-checks" id="${indexCfg.cfgId}" value="${indexCfg.isAudit}">
|
||||
</td>
|
||||
<td>${indexCfg.cfgDesc }</td>
|
||||
<td>${indexCfg.appName }</td>
|
||||
<td>${indexCfg.ratelimit }</td>
|
||||
<td>
|
||||
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict">
|
||||
<c:if test="${dict.itemCode eq indexCfg.action }">
|
||||
<spring:message code="${dict.itemValue }"/>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td>
|
||||
<c:if test="${indexCfg.isAreaEffective==0}"><spring:message code="no"/></c:if>
|
||||
<c:if test="${indexCfg.isAreaEffective==1}">
|
||||
<a href="javascript:viewAreaInfo('${ctx}','${indexCfg.areaEffectiveIds }','${indexCfg.compileId }')" >
|
||||
<spring:message code="yes"/>
|
||||
</a>
|
||||
</c:if>
|
||||
</td>
|
||||
<td>${indexCfg.requestName }</td>
|
||||
<td>
|
||||
<c:set var="classify"></c:set>
|
||||
<c:forEach items="${fn:split(indexCfg.classify,',')}" var="classifyId" varStatus="status">
|
||||
<c:forEach items="${fls}" var="fl">
|
||||
<c:if test="${classifyId eq fn:trim(fl.serviceDictId)}">
|
||||
<c:if test="${status.index+1 eq 1}">
|
||||
<c:set var="classify" value="${fl.itemValue}"></c:set>
|
||||
</c:if>
|
||||
<c:if test="${status.index+1 ne 1}">
|
||||
<c:set var="classify" value="${classify},${fl.itemValue}"></c:set>
|
||||
</c:if>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
<a href="javascript:;" data-original-title="${classify}"
|
||||
class="tooltips" data-flag="false" data-html="true" data-placement="top">
|
||||
${fns:abbr(classify,20)}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<c:set var="attribute"></c:set>
|
||||
<c:forEach items="${fn:split(indexCfg.attribute,',')}" var="attributeId" varStatus="status">
|
||||
<c:forEach items="${xzs}" var="xz">
|
||||
<c:if test="${attributeId eq fn:trim(xz.serviceDictId)}">
|
||||
<c:if test="${status.index+1 eq 1}">
|
||||
<c:set var="attribute" value="${xz.itemValue}"></c:set>
|
||||
</c:if>
|
||||
<c:if test="${status.index+1 ne 1}">
|
||||
<c:set var="attribute" value="${attribute},${xz.itemValue}"></c:set>
|
||||
</c:if>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
<a href="javascript:;" data-original-title="${attribute}"
|
||||
class="tooltips" data-flag="false" data-html="true" data-placement="top">
|
||||
${fns:abbr(attribute,20)}
|
||||
</a>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<c:set var="lableInfo"></c:set>
|
||||
<c:forEach items="${fn:split(indexCfg.lable,',')}" var="lableId" varStatus="status">
|
||||
<c:forEach items="${lables}" var="lable">
|
||||
<c:if test="${lableId eq fn:trim(lable.serviceDictId)}">
|
||||
<c:if test="${status.index+1 eq 1}">
|
||||
<c:set var="lableInfo" value="${lable.itemValue}"></c:set>
|
||||
</c:if>
|
||||
<c:if test="${status.index+1 ne 1}">
|
||||
<c:set var="lableInfo" value="${lableInfo},${lable.itemValue}"></c:set>
|
||||
</c:if>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
<a href="javascript:;" data-original-title="${lableInfo}"
|
||||
class="tooltips" data-flag="false" data-html="true" data-placement="top">
|
||||
${fns:abbr(lableInfo,20)}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<c:if test="${indexCfg.isValid==0}"><spring:message code="no"/></c:if>
|
||||
<c:if test="${indexCfg.isValid==1}"><spring:message code="yes"/></c:if>
|
||||
<c:if test="${indexCfg.isValid==-1}"><spring:message code="deleted"/></c:if>
|
||||
</td>
|
||||
<td>
|
||||
<c:choose>
|
||||
<c:when test="${indexCfg.isAudit eq '0'}"><span class="label label-danger"><spring:message code="created"></spring:message></span></c:when>
|
||||
<c:when test="${indexCfg.isAudit eq '1'}"><span class="label label-success"><spring:message code="approved"></spring:message></span></c:when>
|
||||
<c:when test="${indexCfg.isAudit eq '2'}"><span class="label label-warning"><spring:message code="unapproved"></spring:message></span></c:when>
|
||||
<c:when test="${indexCfg.isAudit eq '3'}"><span class="label label-warning"><spring:message code="cancel_approved"></spring:message></span></c:when>
|
||||
</c:choose>
|
||||
</td>
|
||||
<td>${indexCfg.creatorName }</td>
|
||||
<td><fmt:formatDate value="${indexCfg.createTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<td>${indexCfg.editorName }</td>
|
||||
<td><fmt:formatDate value="${indexCfg.editTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<td>${indexCfg.auditorName }</td>
|
||||
<td><fmt:formatDate value="${indexCfg.auditTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="page" style="margin-top:40px">${page}</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user