Merge branch 'develop' of http://10.0.6.99/gwall/gwall.git into develop
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
/**
|
||||
*@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 org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import com.google.gson.annotations.Expose;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
/**
|
||||
* @ClassName: BaseEnhancedStringConfig.java
|
||||
* @Description: APP增强字符串类配置
|
||||
* @author (zhangwei)
|
||||
* @date 2018年4月3日 下午5:42:52
|
||||
* @version V1.0
|
||||
*/
|
||||
public class AppComplexKeywordCfg extends ComplexkeywordCfg{
|
||||
/**
|
||||
* @Fields serialVersionUID:TODO(用一句话描述这个变量表示什么)
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -8058690163147881374L;
|
||||
@Expose
|
||||
private Integer compileId;
|
||||
|
||||
public Integer getCompileId() {
|
||||
return compileId;
|
||||
}
|
||||
public void setCompileId(Integer compileId) {
|
||||
this.compileId = compileId;
|
||||
}
|
||||
/* (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;
|
||||
}
|
||||
}
|
||||
@@ -32,7 +32,7 @@ public class AppIdCfg extends BaseCfg<AppIdCfg> {
|
||||
/**
|
||||
* 应用协议id
|
||||
*/
|
||||
private Long appId;
|
||||
private Integer appId;
|
||||
|
||||
/**
|
||||
* 编译id
|
||||
@@ -42,12 +42,17 @@ public class AppIdCfg extends BaseCfg<AppIdCfg> {
|
||||
/**
|
||||
* 协议字符串特征表信息列表
|
||||
*/
|
||||
private List<ComplexkeywordCfg> complexFeaturesList;
|
||||
private List<AppComplexKeywordCfg> complexFeaturesList;
|
||||
|
||||
/**
|
||||
* 协议增强字符串特征配置信息列表
|
||||
*/
|
||||
private List<BaseStringCfg> strFeaturesCfgList;
|
||||
private List<AppStringCfg> strFeaturesCfgList;
|
||||
|
||||
/**
|
||||
* 协议服务器IP配置信息列表
|
||||
*/
|
||||
private List<BaseIpCfg> ipCfgList;
|
||||
|
||||
private List<AppFeaturesIndex> featuresList;
|
||||
|
||||
@@ -111,14 +116,14 @@ public class AppIdCfg extends BaseCfg<AppIdCfg> {
|
||||
* @return appId
|
||||
*/
|
||||
|
||||
public Long getAppId() {
|
||||
public Integer getAppId() {
|
||||
return appId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param appId the appId to set
|
||||
*/
|
||||
public void setAppId(Long appId) {
|
||||
public void setAppId(Integer appId) {
|
||||
this.appId = appId;
|
||||
}
|
||||
|
||||
@@ -149,19 +154,19 @@ public class AppIdCfg extends BaseCfg<AppIdCfg> {
|
||||
|
||||
}
|
||||
|
||||
public List<ComplexkeywordCfg> getComplexFeaturesList() {
|
||||
public List<AppComplexKeywordCfg> getComplexFeaturesList() {
|
||||
return complexFeaturesList;
|
||||
}
|
||||
|
||||
public void setComplexFeaturesList(List<ComplexkeywordCfg> complexFeaturesList) {
|
||||
public void setComplexFeaturesList(List<AppComplexKeywordCfg> complexFeaturesList) {
|
||||
this.complexFeaturesList = complexFeaturesList;
|
||||
}
|
||||
|
||||
public List<BaseStringCfg> getStrFeaturesCfgList() {
|
||||
public List<AppStringCfg> getStrFeaturesCfgList() {
|
||||
return strFeaturesCfgList;
|
||||
}
|
||||
|
||||
public void setStrFeaturesCfgList(List<BaseStringCfg> strFeaturesCfgList) {
|
||||
public void setStrFeaturesCfgList(List<AppStringCfg> strFeaturesCfgList) {
|
||||
this.strFeaturesCfgList = strFeaturesCfgList;
|
||||
}
|
||||
|
||||
@@ -172,5 +177,13 @@ public class AppIdCfg extends BaseCfg<AppIdCfg> {
|
||||
public void setFeaturesList(List<AppFeaturesIndex> featuresList) {
|
||||
this.featuresList = featuresList;
|
||||
}
|
||||
|
||||
public List<BaseIpCfg> getIpCfgList() {
|
||||
return ipCfgList;
|
||||
}
|
||||
|
||||
public void setIpCfgList(List<BaseIpCfg> ipCfgList) {
|
||||
this.ipCfgList = ipCfgList;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
50
src/main/java/com/nis/domain/configuration/AppStringCfg.java
Normal file
50
src/main/java/com/nis/domain/configuration/AppStringCfg.java
Normal file
@@ -0,0 +1,50 @@
|
||||
/**
|
||||
*@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;
|
||||
|
||||
/**
|
||||
* @ClassName: BaseStringConfig.java
|
||||
* @Description: 基础字符串类配置
|
||||
* @author (dell)
|
||||
* @date 2018年2月5日 下午5:26:02
|
||||
* @version V1.0
|
||||
*/
|
||||
public class AppStringCfg extends BaseStringCfg {
|
||||
|
||||
|
||||
/**
|
||||
* @Fields serialVersionUID:TODO(用一句话描述这个变量表示什么)
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private static final long serialVersionUID = 4938724489988587634L;
|
||||
@Expose
|
||||
private Integer compileId;
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.nis.domain.configuration.BaseCfg#initDefaultValue()
|
||||
*/
|
||||
@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;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -29,6 +29,7 @@ public class MultipleCfg extends BaseCfg<MultipleCfg> {
|
||||
private static final long serialVersionUID = -8369567908781421920L;
|
||||
private String mainTable;
|
||||
private String mainTableType;
|
||||
private String mainTableDesc;
|
||||
private List<TableBean> otherTables;//key 表名,value 类型
|
||||
// private BaseCfg mainCfg;
|
||||
//ip配置
|
||||
@@ -153,4 +154,18 @@ public class MultipleCfg extends BaseCfg<MultipleCfg> {
|
||||
public void setOtherTables(List<TableBean> otherTables) {
|
||||
this.otherTables = otherTables;
|
||||
}
|
||||
/**
|
||||
* mainTableDesc
|
||||
* @return mainTableDesc
|
||||
*/
|
||||
|
||||
public String getMainTableDesc() {
|
||||
return mainTableDesc;
|
||||
}
|
||||
/**
|
||||
* @param mainTableDesc the mainTableDesc to set
|
||||
*/
|
||||
public void setMainTableDesc(String mainTableDesc) {
|
||||
this.mainTableDesc = mainTableDesc;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@ public class MultipleSearchCfg extends BaseCfg<MultipleSearchCfg> {
|
||||
private static final long serialVersionUID = -8369567908781421920L;
|
||||
private String mainTable;//主表名
|
||||
private String mainTableType;//主表类型
|
||||
private String mainTableDesc;//主表类型
|
||||
private String ipTable;//查询条件IP表名,界面限制查询条件除了共用属性之外只能查一个条件
|
||||
private String stringTable;//查询条件字符串表名,界面限制查询条件除了共用属性之外只能查一个条件
|
||||
private String complexTable;//查询条件增强字符串串表名,界面限制查询条件除了共用属性之外只能查一个条件
|
||||
@@ -196,5 +197,18 @@ public class MultipleSearchCfg extends BaseCfg<MultipleSearchCfg> {
|
||||
public void setComplexTable(String complexTable) {
|
||||
this.complexTable = complexTable;
|
||||
}
|
||||
/**
|
||||
* mainTableDesc
|
||||
* @return mainTableDesc
|
||||
*/
|
||||
|
||||
public String getMainTableDesc() {
|
||||
return mainTableDesc;
|
||||
}
|
||||
/**
|
||||
* @param mainTableDesc the mainTableDesc to set
|
||||
*/
|
||||
public void setMainTableDesc(String mainTableDesc) {
|
||||
this.mainTableDesc = mainTableDesc;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,13 +27,15 @@ public class TableBean implements Serializable{
|
||||
private static final long serialVersionUID = -7276874824312210708L;
|
||||
private String tableName;
|
||||
private String tableType;
|
||||
private String tableDesc;
|
||||
private boolean canEmpty;
|
||||
public TableBean(){
|
||||
|
||||
}
|
||||
public TableBean(String tableName,String tableType){
|
||||
public TableBean(String tableName,String tableType,String tableDesc){
|
||||
this.tableName=tableName;
|
||||
this.tableType=tableType;
|
||||
this.tableDesc=tableDesc;
|
||||
}
|
||||
/**
|
||||
* tableName
|
||||
@@ -77,4 +79,19 @@ public class TableBean implements Serializable{
|
||||
public void setCanEmpty(boolean canEmpty) {
|
||||
this.canEmpty = canEmpty;
|
||||
}
|
||||
/**
|
||||
* tableDesc
|
||||
* @return tableDesc
|
||||
*/
|
||||
|
||||
public String getTableDesc() {
|
||||
return tableDesc;
|
||||
}
|
||||
/**
|
||||
* @param tableDesc the tableDesc to set
|
||||
*/
|
||||
public void setTableDesc(String tableDesc) {
|
||||
this.tableDesc = tableDesc;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
200
src/main/java/com/nis/domain/maat/AppMaatCfg.java
Normal file
200
src/main/java/com/nis/domain/maat/AppMaatCfg.java
Normal file
@@ -0,0 +1,200 @@
|
||||
/**
|
||||
*@Title: MaatCfg.java
|
||||
*@Package com.nis.domain.maat
|
||||
*@Description TODO
|
||||
*@author dell
|
||||
*@date 2018年3月1日 上午10:29:29
|
||||
*@version 版本号
|
||||
*/
|
||||
package com.nis.domain.maat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import com.google.gson.annotations.Expose;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.nis.domain.configuration.AppComplexKeywordCfg;
|
||||
import com.nis.domain.configuration.AppStringCfg;
|
||||
import com.nis.domain.configuration.AreaIpCfg;
|
||||
import com.nis.domain.configuration.BaseIpCfg;
|
||||
import com.nis.domain.configuration.BaseStringCfg;
|
||||
import com.nis.domain.configuration.ComplexkeywordCfg;
|
||||
import com.nis.domain.configuration.NumBoundaryCfg;
|
||||
import com.nis.domain.specific.SpecificServiceHostCfg;
|
||||
|
||||
/**
|
||||
* @ClassName: MaatCfg.java
|
||||
* @Description: TODO
|
||||
* @author (dell)
|
||||
* @date 2018年3月1日 上午10:29:29
|
||||
* @version V1.0
|
||||
*/
|
||||
public class AppMaatCfg implements Serializable {
|
||||
|
||||
/**
|
||||
* @Fields serialVersionUID:TODO(用一句话描述这个变量表示什么)
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
|
||||
private static final long serialVersionUID = -7745084076394247318L;
|
||||
/**
|
||||
* APP字符串特征配置
|
||||
*/
|
||||
@Expose
|
||||
@SerializedName("strFeaturesCfg")
|
||||
private List<AppStringCfg> strCfg;
|
||||
/**
|
||||
* APP服务器IP配置
|
||||
*/
|
||||
@Expose
|
||||
@SerializedName("specificServiceIpCfg")
|
||||
private List<SpecificServiceHostCfg> ipCfg;
|
||||
/**
|
||||
* APP服务器IP生效区域配置
|
||||
*/
|
||||
@Expose
|
||||
@SerializedName("areaCfg")
|
||||
private List<BaseIpCfg> areaCfg;
|
||||
/**
|
||||
* APP增强字符串特征配置
|
||||
*/
|
||||
@Expose
|
||||
@SerializedName("complexStrFeaturesCfg")
|
||||
private List<AppComplexKeywordCfg> complexStrCfg;
|
||||
|
||||
@Expose
|
||||
@SerializedName("action")
|
||||
private Integer action;
|
||||
@Expose
|
||||
@SerializedName("areaEffectiveIds")
|
||||
private String areaEffectiveIds;
|
||||
@Expose
|
||||
@SerializedName("attribute")
|
||||
private String attribute;
|
||||
@Expose
|
||||
@SerializedName("classify")
|
||||
private String classify;
|
||||
@Expose
|
||||
@SerializedName("lable")
|
||||
private String lable;
|
||||
@Expose
|
||||
@SerializedName("compileId")
|
||||
private Integer compileId;
|
||||
@Expose
|
||||
@SerializedName("isAreaEffective")
|
||||
private Integer isAreaEffective;
|
||||
@Expose
|
||||
@SerializedName("isValid")
|
||||
private Integer isValid;
|
||||
@Expose
|
||||
@SerializedName("requestId")
|
||||
private Integer requestId;
|
||||
@Expose
|
||||
@SerializedName("serviceId")
|
||||
private Integer serviceId;
|
||||
@Expose
|
||||
@SerializedName("specificServiceId")
|
||||
private Integer specificServiceId;
|
||||
|
||||
@Expose
|
||||
private String maatTable;
|
||||
|
||||
public List<AppStringCfg> getStrCfg() {
|
||||
return strCfg;
|
||||
}
|
||||
public void setStrCfg(List<AppStringCfg> strCfg) {
|
||||
this.strCfg = strCfg;
|
||||
}
|
||||
public List<SpecificServiceHostCfg> getIpCfg() {
|
||||
return ipCfg;
|
||||
}
|
||||
public void setIpCfg(List<SpecificServiceHostCfg> ipCfg) {
|
||||
this.ipCfg = ipCfg;
|
||||
}
|
||||
public List<AppComplexKeywordCfg> getComplexStrCfg() {
|
||||
return complexStrCfg;
|
||||
}
|
||||
public void setComplexStrCfg(List<AppComplexKeywordCfg> complexStrCfg) {
|
||||
this.complexStrCfg = complexStrCfg;
|
||||
}
|
||||
public List<BaseIpCfg> getAreaCfg() {
|
||||
return areaCfg;
|
||||
}
|
||||
public void setAreaCfg(List<BaseIpCfg> areaCfg) {
|
||||
this.areaCfg = areaCfg;
|
||||
}
|
||||
public Integer getAction() {
|
||||
return action;
|
||||
}
|
||||
public void setAction(Integer action) {
|
||||
this.action = action;
|
||||
}
|
||||
public String getAreaEffectiveIds() {
|
||||
return areaEffectiveIds;
|
||||
}
|
||||
public void setAreaEffectiveIds(String areaEffectiveIds) {
|
||||
this.areaEffectiveIds = areaEffectiveIds;
|
||||
}
|
||||
public String getAttribute() {
|
||||
return attribute;
|
||||
}
|
||||
public void setAttribute(String attribute) {
|
||||
this.attribute = attribute;
|
||||
}
|
||||
public String getClassify() {
|
||||
return classify;
|
||||
}
|
||||
public void setClassify(String classify) {
|
||||
this.classify = classify;
|
||||
}
|
||||
public String getLable() {
|
||||
return lable;
|
||||
}
|
||||
public void setLable(String lable) {
|
||||
this.lable = lable;
|
||||
}
|
||||
public Integer getCompileId() {
|
||||
return compileId;
|
||||
}
|
||||
public void setCompileId(Integer compileId) {
|
||||
this.compileId = compileId;
|
||||
}
|
||||
public Integer getIsAreaEffective() {
|
||||
return isAreaEffective;
|
||||
}
|
||||
public void setIsAreaEffective(Integer isAreaEffective) {
|
||||
this.isAreaEffective = isAreaEffective;
|
||||
}
|
||||
public Integer getIsValid() {
|
||||
return isValid;
|
||||
}
|
||||
public void setIsValid(Integer isValid) {
|
||||
this.isValid = isValid;
|
||||
}
|
||||
public Integer getRequestId() {
|
||||
return requestId;
|
||||
}
|
||||
public void setRequestId(Integer requestId) {
|
||||
this.requestId = requestId;
|
||||
}
|
||||
public Integer getServiceId() {
|
||||
return serviceId;
|
||||
}
|
||||
public void setServiceId(Integer serviceId) {
|
||||
this.serviceId = serviceId;
|
||||
}
|
||||
public Integer getSpecificServiceId() {
|
||||
return specificServiceId;
|
||||
}
|
||||
public void setSpecificServiceId(Integer specificServiceId) {
|
||||
this.specificServiceId = specificServiceId;
|
||||
}
|
||||
public String getMaatTable() {
|
||||
return maatTable;
|
||||
}
|
||||
public void setMaatTable(String maatTable) {
|
||||
this.maatTable = maatTable;
|
||||
}
|
||||
|
||||
}
|
||||
56
src/main/java/com/nis/domain/specific/ConfigGroupInfo.java
Normal file
56
src/main/java/com/nis/domain/specific/ConfigGroupInfo.java
Normal file
@@ -0,0 +1,56 @@
|
||||
package com.nis.domain.specific;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
public class ConfigGroupInfo {
|
||||
private Integer id;
|
||||
private Integer groupId;
|
||||
private String groupName;
|
||||
private Integer isIssued;
|
||||
private Date insertTime;
|
||||
private Date updateTime;
|
||||
private Integer groupType;
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
public Integer getGroupId() {
|
||||
return groupId;
|
||||
}
|
||||
public void setGroupId(Integer groupId) {
|
||||
this.groupId = groupId;
|
||||
}
|
||||
public String getGroupName() {
|
||||
return groupName;
|
||||
}
|
||||
public void setGroupName(String groupName) {
|
||||
this.groupName = groupName;
|
||||
}
|
||||
public Integer getIsIssued() {
|
||||
return isIssued;
|
||||
}
|
||||
public void setIsIssued(Integer isIssued) {
|
||||
this.isIssued = isIssued;
|
||||
}
|
||||
public Date getInsertTime() {
|
||||
return insertTime;
|
||||
}
|
||||
public void setInsertTime(Date insertTime) {
|
||||
this.insertTime = insertTime;
|
||||
}
|
||||
public Date getUpdateTime() {
|
||||
return updateTime;
|
||||
}
|
||||
public void setUpdateTime(Date updateTime) {
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
public Integer getGroupType() {
|
||||
return groupType;
|
||||
}
|
||||
public void setGroupType(Integer groupType) {
|
||||
this.groupType = groupType;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -4,6 +4,8 @@ import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.google.gson.annotations.Expose;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.nis.domain.BaseEntity;
|
||||
import com.nis.domain.SysUser;
|
||||
|
||||
@@ -15,21 +17,34 @@ import com.nis.domain.SysUser;
|
||||
public class SpecificServiceHostCfg extends BaseEntity<SpecificServiceHostCfg>{
|
||||
|
||||
private static final long serialVersionUID = -301627652860717175L;
|
||||
|
||||
@Expose
|
||||
@SerializedName("cfgId")
|
||||
private Integer hostId; //host_id 配置ID bigint N 主键,自增
|
||||
private Integer specServiceId; //spec_service_id 协议id int N protocol_info_cfg.protocol_id
|
||||
@Expose
|
||||
private Integer ipType; //ip地址类型 ipV4=4 ipV6=6
|
||||
@Expose
|
||||
private String srcIp; //src_ip 源IP地址 varchar(64) N 缺省0.0.0.0值表示任意
|
||||
@Expose
|
||||
private String srcIpMask; //src_ip_mask 源地址掩码 varchar(64) N IPV4:255.255.255.255表示无掩码,即精确IP匹配,0.0.0.0值表示任意;
|
||||
//IPV6:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF表示无掩码,::(两个半角冒号)表示任意。非0掩码值必须是2的指数幂,下同。
|
||||
@Expose
|
||||
private String srcPort; //src_port 源端口 varchar(6) N 0表示任意值
|
||||
@Expose
|
||||
private String srcPortMask; //src_port_mask 源端口掩码 varchar(6) N 65535表示无掩码,即精确端口匹配,0表示任意
|
||||
@Expose
|
||||
private String dstIp; //dst_ip 目的IP地址 varchar(64) N 缺省0.0.0.0值表示任意
|
||||
@Expose
|
||||
private String dstIpMask; //dst_ip_mask 目的地址掩码 varchar(64) N 同源ip地址掩码
|
||||
@Expose
|
||||
private String dstPort; //dst_port 目的端口 varchar(6) N 目的端口,0表示任意值
|
||||
@Expose
|
||||
private String dstPortMask; //dst_port_mask 目的端口掩码 varchar(6) N 同源端口掩码
|
||||
@Expose
|
||||
private Integer direction;; //direction 方向 int N 0双向,1单向,默认缺省为双向。
|
||||
@Expose
|
||||
private Integer protocol; //protocol 协议 int N 6表示tcp,17表示udp,0表示任意
|
||||
|
||||
private Integer isValid; //is_valid 有效标识 int N 0无效,1有效
|
||||
private Integer isAudit; //is_audit 是否审核 int N 0未审核,1审核通过,2审核未通过,3取消审核通过(即删除)
|
||||
private SysUser creator; //creator_id 创建人员 int N 取自sys_user.id
|
||||
@@ -38,9 +53,12 @@ public class SpecificServiceHostCfg extends BaseEntity<SpecificServiceHostCfg>{
|
||||
private Date editTime; //edit_time 修改时间 date Y
|
||||
private SysUser auditor; //auditor_id 审核人员 int Y 取自sys_user.id
|
||||
private Date auditTime; //audit_time 审核时间 date Y
|
||||
|
||||
|
||||
|
||||
@Expose
|
||||
private Integer protocolId;//配置转json下发时使用
|
||||
@Expose
|
||||
private String maatTable;//配置转json下发时使用
|
||||
@Expose
|
||||
private Integer groupId;//配置转json下发时使用
|
||||
|
||||
private Date beginDate;
|
||||
private Date endDate;
|
||||
@@ -226,11 +244,23 @@ public class SpecificServiceHostCfg extends BaseEntity<SpecificServiceHostCfg>{
|
||||
public static void sort(List<SpecificServiceHostCfg> list, List<SpecificServiceHostCfg> sourceList, Integer ParentId, boolean cascade){
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public Integer getProtocolId() {
|
||||
return protocolId;
|
||||
}
|
||||
public void setProtocolId(Integer protocolId) {
|
||||
this.protocolId = protocolId;
|
||||
}
|
||||
public String getMaatTable() {
|
||||
return maatTable;
|
||||
}
|
||||
public void setMaatTable(String maatTable) {
|
||||
this.maatTable = maatTable;
|
||||
}
|
||||
public Integer getGroupId() {
|
||||
return groupId;
|
||||
}
|
||||
public void setGroupId(Integer groupId) {
|
||||
this.groupId = groupId;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -5,7 +5,18 @@ import java.util.Date;
|
||||
import com.google.gson.GsonBuilder;
|
||||
|
||||
public final class Constants {
|
||||
|
||||
/**
|
||||
* 字典表地域运营商
|
||||
*/
|
||||
public static final int ITEM_TYPE_AREA = 1;
|
||||
public static final int ITEM_TYPE_ISP = 2;
|
||||
/**
|
||||
* action值
|
||||
*/
|
||||
public static final int ACTION_DF = 1;
|
||||
public static final int ACTION_DJ = 2;
|
||||
public static final int ACTION_BMD = 5;
|
||||
public static final int ACTION_HMD = 8;
|
||||
public static final int CFG_PAGE = 0;
|
||||
public static final int AUDIT_PAGE = 1;
|
||||
public static final String DEFAULT_CAPTCHA_PARAM = "captcha";
|
||||
|
||||
@@ -102,6 +102,14 @@ public class AppCfgController extends BaseController {
|
||||
//协议特征配置
|
||||
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);
|
||||
@@ -247,7 +255,13 @@ public class AppCfgController extends BaseController {
|
||||
}else if(cfg.getIsAudit()==Constants.AUDIT_YES){//审核通过,设置有效标志为1
|
||||
cfg.setIsValid(Constants.VALID_YES);
|
||||
}
|
||||
int result=appCfgService.auditAppCfg(cfg);
|
||||
try {
|
||||
int result=appCfgService.auditAppCfg(cfg);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.error("配置下发maat失败,"+e.getMessage());
|
||||
addMessage(model,"配置审核下发失败!");
|
||||
}
|
||||
model.addAttribute("serviceId", cfg.getServiceId());
|
||||
model.addAttribute("action", cfg.getAction());
|
||||
}
|
||||
@@ -264,11 +278,11 @@ public class AppCfgController extends BaseController {
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@RequestMapping(value = {"deleteCfg"})
|
||||
public String deleteAppCfg(int action,long cfgId,String cfgName,Integer serviceId,Model model) {
|
||||
public String deleteAppCfg(int action,long cfgId,Integer compileId,String cfgName,Integer serviceId,Model model) {
|
||||
model.addAttribute("serviceId", serviceId);
|
||||
model.addAttribute("cfgName", cfgName);
|
||||
model.addAttribute("action", action);
|
||||
model.addAttribute("cfgType","complex");
|
||||
model.addAttribute("cfgType","app");
|
||||
model.addAttribute("audit", Constants.CFG_PAGE);
|
||||
int audit=appCfgService.getIsAudit(cfgId);
|
||||
//未审核时可删除
|
||||
@@ -278,6 +292,7 @@ public class AppCfgController extends BaseController {
|
||||
cfg.setEditorId(cfg.getCurrentUser().getId());
|
||||
cfg.setEditTime(new Date());
|
||||
cfg.setIsValid(Constants.VALID_DEL);
|
||||
cfg.setCompileId(compileId);
|
||||
int result=appCfgService.deleteAppCfg(cfg);
|
||||
addMessage(model,"删除成功,正在为您跳转页面...");
|
||||
}else{
|
||||
|
||||
@@ -20,7 +20,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.ServiceConfigInfo;
|
||||
import com.nis.domain.basics.ServiceDictInfo;
|
||||
import com.nis.domain.basics.SysDictInfo;
|
||||
import com.nis.domain.configuration.BaseCfg;
|
||||
import com.nis.domain.configuration.BaseIpCfg;
|
||||
import com.nis.domain.configuration.BaseStringCfg;
|
||||
@@ -93,7 +92,9 @@ public class MultipleCfgController extends BaseController{
|
||||
String tableName=info.getTableName();
|
||||
if(mainTable.equals(tableName)){
|
||||
model.addAttribute("mainTableType", String.valueOf(info.getTableType()));
|
||||
model.addAttribute("mainTableDesc", info.getTableDesc());
|
||||
cfg.setMainTableType(String.valueOf(type));
|
||||
cfg.setMainTableDesc(info.getTableDesc());
|
||||
if(Constants.TABLE_TYPE_COMPLEX==type){//增强字符串类型
|
||||
ComplexkeywordCfg _cfg=cfg.getComplexCfg()==null?new ComplexkeywordCfg():cfg.getComplexCfg();
|
||||
_cfg.setTableName(mainTable);
|
||||
@@ -209,7 +210,7 @@ public class MultipleCfgController extends BaseController{
|
||||
}
|
||||
for(ServiceConfigInfo info:serviceConfigInfos){
|
||||
int type=info.getTableType();
|
||||
TableBean tableBean=new TableBean(info.getTableName(),String.valueOf(type));
|
||||
TableBean tableBean=new TableBean(info.getTableName(),String.valueOf(type),info.getTableDesc());
|
||||
if(!mainTable.equals(info.getTableName())){
|
||||
otherTables.add(tableBean);
|
||||
if(Constants.TABLE_TYPE_COMPLEX==type){//增强字符串类型
|
||||
@@ -347,7 +348,7 @@ public class MultipleCfgController extends BaseController{
|
||||
}else{
|
||||
for(ServiceConfigInfo info:serviceConfigInfos){
|
||||
int type=info.getTableType();
|
||||
TableBean tableBean=new TableBean(info.getTableName(),String.valueOf(type));
|
||||
TableBean tableBean=new TableBean(info.getTableName(),String.valueOf(type),info.getTableDesc());
|
||||
if(!mainTable.equals(info.getTableName())){
|
||||
otherTables.add(tableBean);
|
||||
}
|
||||
@@ -356,6 +357,7 @@ public class MultipleCfgController extends BaseController{
|
||||
}
|
||||
}
|
||||
model.addAttribute("mainTableType", cfg.getMainTableType());
|
||||
model.addAttribute("mainTableDesc", cfg.getMainTableDesc());
|
||||
model.addAttribute("action", cfg.getAction());
|
||||
model.addAttribute("page", resultPage);
|
||||
List<RequestInfo> requestInfos=requestInfoService.getAllRequestInfo();
|
||||
@@ -386,10 +388,12 @@ public class MultipleCfgController extends BaseController{
|
||||
cfg.setOtherTables(otherTables);
|
||||
for(ServiceConfigInfo info:serviceConfigInfos){
|
||||
int type=info.getTableType();
|
||||
TableBean tableBean=new TableBean(info.getTableName(), String.valueOf(type));
|
||||
TableBean tableBean=new TableBean(info.getTableName(), String.valueOf(type),info.getTableDesc());
|
||||
if(mainTable.equals(info.getTableName())){
|
||||
cfg.setMainTableType(String.valueOf(type));
|
||||
cfg.setMainTableDesc(info.getTableDesc());
|
||||
model.addAttribute("mainTableType", String.valueOf(type));
|
||||
model.addAttribute("mainTableDesc", info.getTableDesc());
|
||||
}else{
|
||||
otherTables.add(tableBean);
|
||||
}
|
||||
@@ -436,8 +440,8 @@ public class MultipleCfgController extends BaseController{
|
||||
Map<String,ComplexkeywordCfg> map=cfg.getComplexCfg();
|
||||
map.put(tableName,complexCfg);
|
||||
}
|
||||
List<SysDictInfo> districts=sysDictInfoService.getDistrictDict(tableName);
|
||||
model.addAttribute("districts", districts);
|
||||
// List<SysDictInfo> districts=sysDictInfoService.getDistrictDict(tableName);
|
||||
// model.addAttribute("districts", districts);
|
||||
}
|
||||
}
|
||||
cfg.setAction(action);
|
||||
@@ -467,7 +471,9 @@ public class MultipleCfgController extends BaseController{
|
||||
resultCfg.setMainTable(mainTable);
|
||||
String mainTableType=cfg.getMainTableType();
|
||||
model.addAttribute("mainTableType", mainTableType);
|
||||
model.addAttribute("mainTableDesc", cfg.getMainTableDesc());
|
||||
resultCfg.setMainTableType(mainTableType);
|
||||
resultCfg.setMainTableDesc(cfg.getMainTableDesc());
|
||||
resultCfg.setAction(cfg.getAction());
|
||||
int serviceId=cfg.getServiceId();
|
||||
cfg.setServiceId(serviceId);
|
||||
@@ -480,7 +486,7 @@ public class MultipleCfgController extends BaseController{
|
||||
String tableName=info.getTableName();
|
||||
int type=info.getTableType();
|
||||
if(!tableName.equals(mainTable)){
|
||||
TableBean bean=new TableBean(tableName,String.valueOf(type));
|
||||
TableBean bean=new TableBean(tableName,String.valueOf(type),info.getTableDesc());
|
||||
if(Constants.TABLE_TYPE_IP==type){
|
||||
bean.setCanEmpty(true);
|
||||
}
|
||||
@@ -573,6 +579,8 @@ public class MultipleCfgController extends BaseController{
|
||||
this.setPropertiesToMultipleCfg(resultCfg, resultComplexCfg,"update");
|
||||
}
|
||||
}
|
||||
// List<SysDictInfo> districts=sysDictInfoService.getDistrictDict(tableName);
|
||||
// model.addAttribute("districts", districts);
|
||||
}
|
||||
}
|
||||
model.addAttribute("_cfg", resultCfg);
|
||||
@@ -601,7 +609,9 @@ public class MultipleCfgController extends BaseController{
|
||||
resultCfg.setMainTable(mainTable);
|
||||
String mainTableType=cfg.getMainTableType();
|
||||
model.addAttribute("mainTableType", mainTableType);
|
||||
model.addAttribute("mainTableDesc", cfg.getMainTableDesc());
|
||||
resultCfg.setMainTableType(mainTableType);
|
||||
resultCfg.setMainTableDesc(cfg.getMainTableDesc());
|
||||
resultCfg.setAction(cfg.getAction());
|
||||
int serviceId=cfg.getServiceId();
|
||||
cfg.setServiceId(serviceId);
|
||||
@@ -760,7 +770,7 @@ public class MultipleCfgController extends BaseController{
|
||||
if(cfg.getNumCfg()!=null){
|
||||
for(Entry<String,NumBoundaryCfg> numCfg:cfg.getNumCfg().entrySet()){
|
||||
if(!isNull(numCfg.getValue())){
|
||||
numCfg.getValue().setTableName(info.getTableName());
|
||||
numCfg.getValue().setTableName(numCfg.getKey());
|
||||
numCfg.getValue().setIsValid(Constants.VALID_NO);
|
||||
numCfg.getValue().setIsAudit(Constants.AUDIT_NOT_YET);
|
||||
numCfg.getValue().setCompileId(compileId);
|
||||
@@ -779,7 +789,7 @@ public class MultipleCfgController extends BaseController{
|
||||
if(cfg.getComplexCfg()!=null){
|
||||
for(Entry<String,ComplexkeywordCfg> complexCfg:cfg.getComplexCfg().entrySet()){
|
||||
if(!isNull(complexCfg.getValue())){
|
||||
complexCfg.getValue().setTableName(info.getTableName());
|
||||
complexCfg.getValue().setTableName(complexCfg.getKey());
|
||||
complexCfg.getValue().setIsValid(Constants.VALID_NO);
|
||||
complexCfg.getValue().setIsAudit(Constants.AUDIT_NOT_YET);
|
||||
complexCfg.getValue().setCompileId(compileId);
|
||||
@@ -841,6 +851,7 @@ public class MultipleCfgController extends BaseController{
|
||||
String tableName=info.getTableName();
|
||||
if(cfg.getMainTable().equals(tableName)){
|
||||
model.addAttribute("mainTableType", String.valueOf(type));
|
||||
model.addAttribute("mainTableDesc", info.getTableDesc());
|
||||
}
|
||||
if(Constants.TABLE_TYPE_IP==type){
|
||||
BaseIpCfg searchIpCfg=new BaseIpCfg();
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
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.AppComplexKeywordCfg;
|
||||
import com.nis.domain.configuration.AppIdCfg;
|
||||
import com.nis.domain.configuration.AppIdCfg.AppFeaturesIndex;
|
||||
import com.nis.domain.configuration.AppStringCfg;
|
||||
import com.nis.domain.configuration.BaseStringCfg;
|
||||
import com.nis.domain.configuration.ComplexkeywordCfg;
|
||||
import com.nis.web.dao.CrudDao;
|
||||
@@ -26,16 +29,19 @@ public interface AppCfgDao extends CrudDao<AppIdCfg> {
|
||||
public int updateByPrimaryKeySelective(AppIdCfg entity) ;
|
||||
public int updateValid(AppIdCfg entity) ;
|
||||
public int audit(AppIdCfg entity) ;
|
||||
// public int getIsValid(@Param("tableName")String tableName,@Param("cfgId")Long id);
|
||||
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("tableName")String tableName,@Param("cfgId")Long id);
|
||||
public int getIsAudit(@Param("cfgId")Long id);
|
||||
public List<ComplexkeywordCfg> getComplexkeywordCfgList();
|
||||
public List<AppFeaturesIndex> getFeaturesTableListByAppCompileId(@Param("appCompileId")Integer appCompileId) ;
|
||||
public List<ComplexkeywordCfg> getFeaturesCfgListByCompileId(@Param("compileId")Integer compileId) ;
|
||||
public int insertFeatures(AppFeaturesIndex entity) ;
|
||||
public int updateFeaturesByAppId(AppFeaturesIndex entity) ;
|
||||
public int deleteFeaturesByAppId(AppFeaturesIndex entity) ;
|
||||
public List<ComplexkeywordCfg> getComplexkeywordFeaturesCfgListByCompileId(@Param("featuresTable") String featuresTable,@Param("compileId")Integer compileId);
|
||||
public List<BaseStringCfg> getStrFeaturesCfgListByCompileId(@Param("featuresTable") String featuresTable,@Param("compileId")Integer compileId);
|
||||
public List<AppComplexKeywordCfg> getComplexkeywordFeaturesCfgListByCompileId(@Param("featuresTable") String featuresTable,@Param("compileId")Integer compileId);
|
||||
public List<AppStringCfg> getStrFeaturesCfgListByCompileId(@Param("featuresTable") String featuresTable,@Param("compileId")Integer compileId);
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
<result column="FEATURES_TABLE_TYPE" property="featuresTableType" jdbcType="INTEGER" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="ComplexkeywordFeaturesCfgMap" type="com.nis.domain.configuration.ComplexkeywordCfg" >
|
||||
<resultMap id="ComplexkeywordFeaturesCfgMap" type="com.nis.domain.configuration.AppComplexKeywordCfg" >
|
||||
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
||||
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
||||
<result column="district" property="district" jdbcType="VARCHAR" />
|
||||
@@ -64,7 +64,7 @@
|
||||
<result column="is_hexbin" property="isHexbin" jdbcType="INTEGER" />
|
||||
<result column="area_effective_ids" property="areaEffectiveIds" jdbcType="VARCHAR" />
|
||||
</resultMap>
|
||||
<resultMap id="BaseStringFeaturesCfgMap" type="com.nis.domain.configuration.BaseStringCfg" >
|
||||
<resultMap id="BaseStringFeaturesCfgMap" type="com.nis.domain.configuration.AppStringCfg" >
|
||||
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
||||
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
||||
<result column="cfg_keywords" property="cfgKeywords" jdbcType="VARCHAR" />
|
||||
@@ -504,6 +504,16 @@
|
||||
</if>
|
||||
where cfg_id = #{cfgId,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateFeaturesTableValid">
|
||||
update ${tableName} set is_valid = #{isValid,jdbcType=INTEGER}, editor_id = #{editorId,jdbcType=INTEGER} , edit_time = #{editTime,jdbcType=TIMESTAMP} where compile_id = #{compileId,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="auditFeaturesTable">
|
||||
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>
|
||||
where compile_id = #{compileId,jdbcType=INTEGER}
|
||||
</update>
|
||||
<select id="getIsValid" resultType="java.lang.Integer" parameterType="java.lang.Long" >
|
||||
SELECT IS_VALID FROM app_id_cfg
|
||||
WHERE CFG_ID = #{cfgId,jdbcType=BIGINT}
|
||||
|
||||
@@ -4,6 +4,7 @@ import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import com.nis.domain.specific.ConfigGroupInfo;
|
||||
import com.nis.domain.specific.SpecificServiceCfg;
|
||||
import com.nis.web.dao.CrudDao;
|
||||
import com.nis.web.dao.MyBatisDao;
|
||||
@@ -41,6 +42,10 @@ public interface SpecificServiceCfgDao extends CrudDao<SpecificServiceCfg> {
|
||||
*/
|
||||
List<SpecificServiceCfg> getChildrenById(Integer specServiceId);
|
||||
|
||||
|
||||
ConfigGroupInfo getConfigGroupInfoByGroupId(Integer groupId);
|
||||
|
||||
Integer insertConfigGroupInfo(ConfigGroupInfo entity);
|
||||
|
||||
Integer updateConfigGroupInfobyGroupId(ConfigGroupInfo entity);
|
||||
|
||||
}
|
||||
@@ -148,4 +148,21 @@
|
||||
<select id="getChildrenById" resultMap="CFGResultMap" parameterType="java.lang.Integer">
|
||||
SELECT * FROM specific_service_cfg s WHERE s.is_valid = 1 and s.parent_id = #{specServiceId}
|
||||
</select>
|
||||
|
||||
<!-- 根据groupId查出配置分组信息 -->
|
||||
<select id="getConfigGroupInfoByGroupId" resultType="com.nis.domain.specific.ConfigGroupInfo" parameterType="java.lang.Integer">
|
||||
select id,group_id,group_name,is_issued,insert_time,update_time,group_type
|
||||
from config_group_info c where c.group_id= #{groupId}
|
||||
</select>
|
||||
|
||||
<!-- 修改配置分组状态信息 -->
|
||||
<update id="updateConfigGroupInfobyGroupId" parameterType="com.nis.domain.specific.ConfigGroupInfo">
|
||||
UPDATE config_group_info set is_issued = #{isIssued},update_time=now() where group_id = #{groupId}
|
||||
</update>
|
||||
|
||||
<!-- 新增配置分组信息 -->
|
||||
<insert id="insertConfigGroupInfo" parameterType="com.nis.domain.specific.ConfigGroupInfo" useGeneratedKeys="true">
|
||||
insert into config_group_info (id,group_id,group_name,is_issued,insert_time,group_type)
|
||||
values(#{id},#{groupId},#{groupName},#{isIssued},now(),#{groupType})
|
||||
</insert>
|
||||
</mapper>
|
||||
@@ -1,25 +1,40 @@
|
||||
package com.nis.web.service.configuration;
|
||||
|
||||
import java.lang.annotation.Annotation;
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.ServiceConfigInfo;
|
||||
import com.nis.domain.configuration.AppComplexKeywordCfg;
|
||||
import com.nis.domain.configuration.AppIdCfg;
|
||||
import com.nis.domain.configuration.BaseStringCfg;
|
||||
import com.nis.domain.configuration.AppStringCfg;
|
||||
import com.nis.domain.configuration.AreaIpCfg;
|
||||
import com.nis.domain.configuration.BaseIpCfg;
|
||||
import com.nis.domain.configuration.AppIdCfg.AppFeaturesIndex;
|
||||
import com.nis.domain.configuration.ComplexkeywordCfg;
|
||||
import com.nis.domain.maat.AppMaatCfg;
|
||||
import com.nis.domain.specific.ConfigGroupInfo;
|
||||
import com.nis.domain.specific.SpecificServiceCfg;
|
||||
import com.nis.domain.specific.SpecificServiceHostCfg;
|
||||
import com.nis.main.ConvertTool;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.web.dao.configuration.AppCfgDao;
|
||||
import com.nis.web.dao.configuration.ComplexStringCfgDao;
|
||||
import com.nis.web.dao.configuration.IpCfgDao;
|
||||
import com.nis.web.dao.configuration.StringCfgDao;
|
||||
import com.nis.web.dao.specific.SpecificServiceCfgDao;
|
||||
import com.nis.web.dao.specific.SpecificServiceHostCfgDao;
|
||||
import com.nis.web.dao.systemService.ServiceConfigInfoDao;
|
||||
import com.nis.web.service.CrudService;
|
||||
|
||||
@@ -39,6 +54,12 @@ public class AppCfgService extends CrudService<AppCfgDao,AppIdCfg> {
|
||||
protected StringCfgDao stringCfgDao;
|
||||
@Autowired
|
||||
protected ComplexStringCfgDao complexStringCfgDao;
|
||||
@Autowired
|
||||
private SpecificServiceCfgDao specificServiceCfgDao;
|
||||
@Autowired
|
||||
private SpecificServiceHostCfgDao specificServiceHostCfgDao;
|
||||
@Autowired
|
||||
protected IpCfgDao ipCfgDao;
|
||||
|
||||
public Page<AppIdCfg> findPage(Page<AppIdCfg> page, AppIdCfg entity) {
|
||||
entity.setPage(page);
|
||||
@@ -49,18 +70,18 @@ public class AppCfgService extends CrudService<AppCfgDao,AppIdCfg> {
|
||||
public AppIdCfg findAppIdCfg(AppIdCfg entity) {
|
||||
//查询协议关联特征表
|
||||
List<AppFeaturesIndex> featuresTableList = appCfgDao.getFeaturesTableListByAppCompileId(entity.getCompileId());
|
||||
List<ComplexkeywordCfg> complexList = new ArrayList();
|
||||
List<BaseStringCfg> strList = new ArrayList();
|
||||
List<AppComplexKeywordCfg> complexList = new ArrayList();
|
||||
List<AppStringCfg> strList = new ArrayList();
|
||||
if(!StringUtil.isEmpty(featuresTableList)){
|
||||
for(AppFeaturesIndex features:featuresTableList){
|
||||
if(features.getFeaturesTableType().equals(4)){//增强字符串特征配置
|
||||
List<ComplexkeywordCfg> complexFeaturesList = appCfgDao.getComplexkeywordFeaturesCfgListByCompileId(
|
||||
List<AppComplexKeywordCfg> complexFeaturesList = appCfgDao.getComplexkeywordFeaturesCfgListByCompileId(
|
||||
features.getFeaturesTable(),features.getFeaturesCompileId());
|
||||
complexList.addAll(complexFeaturesList);
|
||||
|
||||
|
||||
}else if(features.getFeaturesTableType().equals(2)){//普通字符串特征配置
|
||||
List<BaseStringCfg> strFeaturesCfgList = appCfgDao.getStrFeaturesCfgListByCompileId(
|
||||
List<AppStringCfg> strFeaturesCfgList = appCfgDao.getStrFeaturesCfgListByCompileId(
|
||||
features.getFeaturesTable(),features.getFeaturesCompileId());
|
||||
strList.addAll(strFeaturesCfgList);
|
||||
}
|
||||
@@ -90,7 +111,7 @@ public class AppCfgService extends CrudService<AppCfgDao,AppIdCfg> {
|
||||
cfg.setCompileId(appCompileId);
|
||||
cfgId = appCfgDao.insert(cfg);
|
||||
if(cfg.getComplexFeaturesList()!=null){
|
||||
for(ComplexkeywordCfg c:cfg.getComplexFeaturesList()){
|
||||
for(AppComplexKeywordCfg c:cfg.getComplexFeaturesList()){
|
||||
Integer featuresCompileId = new ConvertTool().getCompileId();
|
||||
AppFeaturesIndex f = new AppFeaturesIndex();
|
||||
f.setAppCompileId(cfg.getCompileId());
|
||||
@@ -119,7 +140,7 @@ public class AppCfgService extends CrudService<AppCfgDao,AppIdCfg> {
|
||||
}
|
||||
}
|
||||
if(cfg.getStrFeaturesCfgList()!=null){
|
||||
for(BaseStringCfg s:cfg.getStrFeaturesCfgList()){
|
||||
for(AppStringCfg s:cfg.getStrFeaturesCfgList()){
|
||||
Integer featuresCompileId = new ConvertTool().getCompileId();
|
||||
AppFeaturesIndex f = new AppFeaturesIndex();
|
||||
f.setAppCompileId(cfg.getCompileId());
|
||||
@@ -162,7 +183,7 @@ public class AppCfgService extends CrudService<AppCfgDao,AppIdCfg> {
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public int updateAppCfg(AppIdCfg cfg) throws Exception{
|
||||
if(cfg.getComplexFeaturesList()!=null){
|
||||
for(ComplexkeywordCfg c:cfg.getComplexFeaturesList()){
|
||||
for(AppComplexKeywordCfg c:cfg.getComplexFeaturesList()){
|
||||
Integer featuresCompileId = 0;
|
||||
c.setIsAreaEffective(cfg.getIsAreaEffective());
|
||||
c.setAreaEffectiveIds(cfg.getAreaEffectiveIds());
|
||||
@@ -191,14 +212,14 @@ public class AppCfgService extends CrudService<AppCfgDao,AppIdCfg> {
|
||||
c.setIsValid(cfg.getIsValid());
|
||||
complexStringCfgDao.insert(c);
|
||||
}else{
|
||||
complexStringCfgDao.update(c);
|
||||
complexStringCfgDao.updateByPrimaryKeySelective(c);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
if(cfg.getStrFeaturesCfgList()!=null){
|
||||
for(BaseStringCfg s:cfg.getStrFeaturesCfgList()){
|
||||
for(AppStringCfg s:cfg.getStrFeaturesCfgList()){
|
||||
Integer featuresCompileId = 0;
|
||||
s.setIsAreaEffective(cfg.getIsAreaEffective());
|
||||
s.setAreaEffectiveIds(cfg.getAreaEffectiveIds());
|
||||
@@ -227,7 +248,7 @@ public class AppCfgService extends CrudService<AppCfgDao,AppIdCfg> {
|
||||
s.setIsValid(cfg.getIsValid());
|
||||
stringCfgDao.insert(s);
|
||||
}else{
|
||||
stringCfgDao.update(s);
|
||||
stringCfgDao.updateByPrimaryKeySelective(s);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -241,12 +262,235 @@ public class AppCfgService extends CrudService<AppCfgDao,AppIdCfg> {
|
||||
* @param cfg
|
||||
* @return
|
||||
*int
|
||||
* @throws Exception
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public int auditAppCfg(AppIdCfg cfg){
|
||||
return appCfgDao.audit(cfg);
|
||||
public int auditAppCfg(AppIdCfg entity) throws Exception{
|
||||
boolean sendFlag = false;
|
||||
AppIdCfg appCfg = appCfgDao.getById(entity.getCfgId());
|
||||
List<AppFeaturesIndex> featuresTableList = appCfgDao.getFeaturesTableListByAppCompileId(appCfg.getCompileId());
|
||||
List<AppStringCfg> strList = new ArrayList();
|
||||
List<AppComplexKeywordCfg> complexList = new ArrayList();
|
||||
List<SpecificServiceHostCfg> hostList =new ArrayList();
|
||||
List<BaseIpCfg> areaList = new ArrayList();
|
||||
ConfigGroupInfo group = null;
|
||||
|
||||
|
||||
Gson gson=new GsonBuilder().disableHtmlEscaping()
|
||||
.excludeFieldsWithoutExposeAnnotation()
|
||||
.create();
|
||||
|
||||
//配置审核状态即将改变后的状态
|
||||
if(Constants.AUDIT_NOT_YES==entity.getIsAudit().intValue()||
|
||||
Constants.AUDIT_YES==entity.getIsAudit().intValue()){//审核通过,取消审核通过需要发到maat
|
||||
|
||||
if(Constants.AUDIT_YES==entity.getIsAudit().intValue()){//审核通过
|
||||
if(StringUtil.isEmpty(featuresTableList)){
|
||||
SpecificServiceCfg protocol = specificServiceCfgDao.getBySpecServiceId(appCfg.getAppId().intValue());
|
||||
group = specificServiceCfgDao.getConfigGroupInfoByGroupId(protocol.getGroupId());
|
||||
//featuresTableList为空的时候,该service只有特定服务IP一个配置表
|
||||
ServiceConfigInfo serviceCfg=serviceConfigInfoDao.findSysServiceConfigInfo(appCfg.getServiceId());
|
||||
if(group==null){
|
||||
throw new RuntimeException("配置审核失败,未获取社交应用服务器IP所属分组信息");
|
||||
}else{
|
||||
if(group.getIsIssued()==0){
|
||||
//如果分组信息尚未下发,则下发IP
|
||||
group.setGroupId(protocol.getGroupId());
|
||||
group.setIsIssued(1);
|
||||
SpecificServiceHostCfg hostCfg = new SpecificServiceHostCfg();
|
||||
hostCfg.setSpecServiceId(protocol.getSpecServiceId());
|
||||
hostList = specificServiceHostCfgDao.findSpecHostList(hostCfg);
|
||||
|
||||
for(SpecificServiceHostCfg host:hostList){
|
||||
SpecificServiceCfg specServiceCfg = specificServiceCfgDao.getBySpecServiceId(host.getSpecServiceId());
|
||||
host.setProtocolId(0);
|
||||
host.setGroupId(specServiceCfg.getGroupId());
|
||||
if(StringUtil.isEmpty(serviceCfg)){
|
||||
host.setMaatTable("DF_PROTOCOL_APP");
|
||||
}else{
|
||||
host.setMaatTable(serviceCfg.getMaatTable());
|
||||
}
|
||||
}
|
||||
}else{
|
||||
SpecificServiceHostCfg host = new SpecificServiceHostCfg();
|
||||
host.setGroupId(protocol.getGroupId());
|
||||
hostList.add(host);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//生效区域列表信息
|
||||
if(appCfg.getIsAreaEffective()==1){
|
||||
if(StringUtil.isEmpty(appCfg.getAreaEffectiveIds())){
|
||||
BaseIpCfg ipCfg = new BaseIpCfg();
|
||||
ipCfg.setCompileId(appCfg.getCompileId());
|
||||
ipCfg.setTableName("area_ip_cfg");
|
||||
areaList = ipCfgDao.findList(ipCfg);
|
||||
}
|
||||
}
|
||||
}else{
|
||||
for(AppFeaturesIndex featuresCfg:featuresTableList){
|
||||
if(featuresCfg.getFeaturesTableType()==2){
|
||||
List<AppStringCfg> list =appCfgDao.getStrFeaturesCfgListByCompileId(featuresCfg.getFeaturesTable(), featuresCfg.getFeaturesCompileId());
|
||||
for(AppStringCfg cfg:list){
|
||||
List<ServiceConfigInfo> cList = serviceConfigInfoDao.findList(appCfg.getServiceId());
|
||||
if(!StringUtil.isEmpty(cList)){
|
||||
for(ServiceConfigInfo c:cList){
|
||||
if(c.getTableName().equals(featuresCfg.getFeaturesTable())){
|
||||
cfg.setMaatTable(c.getMaatTable());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
cfg.setCompileId(featuresCfg.getFeaturesCompileId());
|
||||
strList.add(cfg);
|
||||
}
|
||||
}
|
||||
if(featuresCfg.getFeaturesTableType()==4){
|
||||
List<AppComplexKeywordCfg> list = appCfgDao.getComplexkeywordFeaturesCfgListByCompileId(featuresCfg.getFeaturesTable(), featuresCfg.getFeaturesCompileId());
|
||||
for(AppComplexKeywordCfg cfg:list){
|
||||
List<ServiceConfigInfo> cList = serviceConfigInfoDao.findList(appCfg.getServiceId());
|
||||
if(!StringUtil.isEmpty(cList)){
|
||||
for(ServiceConfigInfo c:cList){
|
||||
if(c.getTableName().equals(featuresCfg.getFeaturesTable())){
|
||||
cfg.setMaatTable(c.getMaatTable());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
cfg.setCompileId(featuresCfg.getFeaturesCompileId());
|
||||
complexList.add(cfg);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
AppMaatCfg maatCfg = new AppMaatCfg();
|
||||
if(StringUtil.isEmpty(featuresTableList)){
|
||||
maatCfg.setIpCfg(hostList);
|
||||
maatCfg.setAreaCfg(areaList);
|
||||
if(appCfg.getCompileId()==0){
|
||||
throw new RuntimeException("转换出错,未获取到正确的compileId");
|
||||
}else{
|
||||
maatCfg.setCompileId(appCfg.getCompileId());
|
||||
}
|
||||
}else{//特征配置
|
||||
maatCfg.setStrCfg(strList);
|
||||
maatCfg.setComplexStrCfg(complexList);
|
||||
}
|
||||
|
||||
if(appCfg.getAction()==null){
|
||||
throw new RuntimeException("转换出错,未获取到正确的action");
|
||||
}else{
|
||||
maatCfg.setAction(appCfg.getAction());
|
||||
}
|
||||
if(appCfg.getIsAreaEffective()==null){
|
||||
throw new RuntimeException("转换出错,未获取到正确的isAreaEffective");
|
||||
}else{
|
||||
maatCfg.setIsAreaEffective(appCfg.getIsAreaEffective());
|
||||
}
|
||||
if(appCfg.getIsValid()==null){
|
||||
throw new RuntimeException("转换出错,未获取到正确的isValid");
|
||||
}else{
|
||||
maatCfg.setIsValid(appCfg.getIsValid());
|
||||
}
|
||||
if(appCfg.getRequestId()==null){
|
||||
throw new RuntimeException("转换出错,未获取到正确的requestId");
|
||||
}else{
|
||||
maatCfg.setRequestId(appCfg.getRequestId());
|
||||
}
|
||||
if(appCfg.getServiceId()==null){
|
||||
throw new RuntimeException("转换出错,未获取到正确的serviceId");
|
||||
}else{
|
||||
maatCfg.setServiceId(appCfg.getServiceId());
|
||||
}
|
||||
maatCfg.setSpecificServiceId(appCfg.getAppId());
|
||||
maatCfg.setAreaEffectiveIds(appCfg.getAreaEffectiveIds()==null?"":appCfg.getAreaEffectiveIds());
|
||||
maatCfg.setAttribute(appCfg.getAttribute()==null?"":appCfg.getAttribute());
|
||||
maatCfg.setClassify(appCfg.getClassify()==null?"":appCfg.getClassify());
|
||||
maatCfg.setLable(appCfg.getLable()==null?"":appCfg.getLable());
|
||||
String json=gson.toJson(maatCfg);
|
||||
//下发maat
|
||||
// new ConvertTool().saveAppConfig(json);
|
||||
sendFlag = true;
|
||||
|
||||
}else{//取消审核通过
|
||||
AppMaatCfg maatCfg = new AppMaatCfg();
|
||||
if(StringUtil.isEmpty(featuresTableList)){
|
||||
ServiceConfigInfo serviceCfg=serviceConfigInfoDao.findSysServiceConfigInfo(appCfg.getServiceId());
|
||||
maatCfg.setMaatTable(serviceCfg.getMaatTable());
|
||||
if(appCfg.getCompileId()==0){
|
||||
throw new RuntimeException("转换出错,未获取到正确的compileId");
|
||||
}else{
|
||||
maatCfg.setCompileId(appCfg.getCompileId());
|
||||
}
|
||||
}else{//特征配置
|
||||
for(AppFeaturesIndex featuresCfg:featuresTableList){
|
||||
if(featuresCfg.getFeaturesTableType()==2){
|
||||
List<AppStringCfg> list =appCfgDao.getStrFeaturesCfgListByCompileId(featuresCfg.getFeaturesTable(), featuresCfg.getFeaturesCompileId());
|
||||
for(AppStringCfg cfg:list){
|
||||
AppStringCfg strCfg = new AppStringCfg();
|
||||
List<ServiceConfigInfo> cList = serviceConfigInfoDao.findList(appCfg.getServiceId());
|
||||
if(!StringUtil.isEmpty(cList)){
|
||||
for(ServiceConfigInfo c:cList){
|
||||
if(c.getTableName().equals(featuresCfg.getFeaturesTable())){
|
||||
strCfg.setMaatTable(c.getMaatTable());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
strCfg.setCompileId(featuresCfg.getFeaturesCompileId());
|
||||
strList.add(strCfg);
|
||||
}
|
||||
}
|
||||
if(featuresCfg.getFeaturesTableType()==4){
|
||||
List<AppComplexKeywordCfg> list = appCfgDao.getComplexkeywordFeaturesCfgListByCompileId(featuresCfg.getFeaturesTable(), featuresCfg.getFeaturesCompileId());
|
||||
for(AppComplexKeywordCfg cfg:list){
|
||||
AppComplexKeywordCfg complexCfg = new AppComplexKeywordCfg();
|
||||
List<ServiceConfigInfo> cList = serviceConfigInfoDao.findList(appCfg.getServiceId());
|
||||
if(!StringUtil.isEmpty(cList)){
|
||||
for(ServiceConfigInfo c:cList){
|
||||
if(c.getTableName().equals(featuresCfg.getFeaturesTable())){
|
||||
complexCfg.setMaatTable(c.getMaatTable());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
complexCfg.setCompileId(featuresCfg.getFeaturesCompileId());
|
||||
complexList.add(complexCfg);
|
||||
}
|
||||
}
|
||||
}
|
||||
maatCfg.setStrCfg(strList);
|
||||
maatCfg.setComplexStrCfg(complexList);
|
||||
}
|
||||
|
||||
String json=gson.toJson(maatCfg);
|
||||
//下发maat
|
||||
// new ConvertTool().saveAppConfig(json);
|
||||
sendFlag = true;
|
||||
}
|
||||
|
||||
}else{
|
||||
sendFlag = false;
|
||||
}
|
||||
|
||||
if(sendFlag){
|
||||
//修改appId配置审核下发状态
|
||||
appCfgDao.audit(entity);
|
||||
//修改特定服务IP分组下发状态
|
||||
specificServiceCfgDao.updateConfigGroupInfobyGroupId(group);
|
||||
//修改特征表配置审核下发状态
|
||||
for(AppFeaturesIndex cfg:featuresTableList){
|
||||
appCfgDao.auditFeaturesTable(cfg.getFeaturesTable(), cfg.getFeaturesCompileId(), entity.getIsValid(),
|
||||
entity.getIsAudit(), entity.getAuditorId(), entity.getAuditTime());
|
||||
|
||||
}
|
||||
return 1;
|
||||
}else{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
/**
|
||||
*
|
||||
@@ -259,8 +503,22 @@ public class AppCfgService extends CrudService<AppCfgDao,AppIdCfg> {
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public int deleteAppCfg(AppIdCfg cfg){
|
||||
return appCfgDao.updateValid(cfg);
|
||||
public int deleteAppCfg(AppIdCfg entity){
|
||||
Integer status = appCfgDao.updateValid(entity);
|
||||
if(status==1){
|
||||
List<AppFeaturesIndex> featuresTableList = appCfgDao.getFeaturesTableListByAppCompileId(entity.getCompileId());
|
||||
for(AppFeaturesIndex cfg:featuresTableList){
|
||||
status = appCfgDao.updateFeaturesTableValid(cfg.getFeaturesTable(), cfg.getFeaturesCompileId(),
|
||||
entity.getIsValid(), entity.getEditorId(), entity.getEditTime());
|
||||
if(status==0){
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
return status;
|
||||
}else{
|
||||
return status;
|
||||
}
|
||||
// return appCfgDao.updateValid(cfg);
|
||||
}
|
||||
/**
|
||||
*
|
||||
@@ -288,18 +546,18 @@ public class AppCfgService extends CrudService<AppCfgDao,AppIdCfg> {
|
||||
public AppIdCfg getAppCfgById(AppIdCfg cfg){
|
||||
cfg = appCfgDao.get(cfg);
|
||||
List<AppFeaturesIndex> featuresTableList = appCfgDao.getFeaturesTableListByAppCompileId(cfg.getCompileId());
|
||||
List<ComplexkeywordCfg> complexList = new ArrayList();
|
||||
List<BaseStringCfg> strList = new ArrayList();
|
||||
List<AppComplexKeywordCfg> complexList = new ArrayList();
|
||||
List<AppStringCfg> strList = new ArrayList();
|
||||
if(!StringUtil.isEmpty(featuresTableList)){
|
||||
for(AppFeaturesIndex features:featuresTableList){
|
||||
if(features.getFeaturesTableType().equals(4)){//增强字符串特征配置
|
||||
List<ComplexkeywordCfg> complexFeaturesList = appCfgDao.getComplexkeywordFeaturesCfgListByCompileId(
|
||||
List<AppComplexKeywordCfg> complexFeaturesList = appCfgDao.getComplexkeywordFeaturesCfgListByCompileId(
|
||||
features.getFeaturesTable(),features.getFeaturesCompileId());
|
||||
complexList.addAll(complexFeaturesList);
|
||||
|
||||
|
||||
}else if(features.getFeaturesTableType().equals(2)){//普通字符串特征配置
|
||||
List<BaseStringCfg> strFeaturesCfgList = appCfgDao.getStrFeaturesCfgListByCompileId(
|
||||
List<AppStringCfg> strFeaturesCfgList = appCfgDao.getStrFeaturesCfgListByCompileId(
|
||||
features.getFeaturesTable(),features.getFeaturesCompileId());
|
||||
strList.addAll(strFeaturesCfgList);
|
||||
}
|
||||
@@ -313,13 +571,13 @@ public class AppCfgService extends CrudService<AppCfgDao,AppIdCfg> {
|
||||
public Integer getIsValid(Long cfgId){
|
||||
return appCfgDao.getIsValid(cfgId);
|
||||
}
|
||||
/*public Integer getIsValid(String tableName, long id){
|
||||
public Integer getIsValid(String tableName, long id){
|
||||
return appCfgDao.getIsValid(tableName,id);
|
||||
}*/
|
||||
}
|
||||
public Integer getIsAudit(Long cfgId){
|
||||
return appCfgDao.getIsAudit(cfgId);
|
||||
}
|
||||
/*public Integer getIsAudit(String tableName, long id){
|
||||
public Integer getIsAudit(String tableName, long id){
|
||||
return appCfgDao.getIsAudit(tableName,id);
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
@@ -158,7 +158,6 @@ public class MultipleCfgService extends CrudService<MultipleCfgDao,MultipleSearc
|
||||
should+=cfg.getIpCfg().size();
|
||||
}
|
||||
int result=0;
|
||||
if(cfg==null) return false;
|
||||
if(Constants.AUDIT_YES==cfg.getIsAudit()||Constants.AUDIT_NOT_YES==cfg.getIsAudit()){
|
||||
List<BaseCfg> cfgs=new ArrayList<BaseCfg>();
|
||||
if(sendCfg.getIpCfg()!=null){
|
||||
|
||||
@@ -10,7 +10,9 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.beust.jcommander.internal.Lists;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.specific.ConfigGroupInfo;
|
||||
import com.nis.domain.specific.SpecificServiceCfg;
|
||||
import com.nis.main.ConvertTool;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.web.dao.specific.SpecificServiceCfgDao;
|
||||
import com.nis.web.service.BaseService;
|
||||
@@ -60,11 +62,22 @@ public class SpecificServiceCfgService extends BaseService{
|
||||
/**
|
||||
* 保存或修改
|
||||
* @param specificServiceCfg
|
||||
* @throws Exception
|
||||
*/
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public void saveOrUpdate(SpecificServiceCfg specificServiceCfg, Integer oldId) {
|
||||
if(specificServiceCfg.getGroupId()==null){
|
||||
specificServiceCfg.setGroupId(0);
|
||||
public void saveOrUpdate(SpecificServiceCfg specificServiceCfg, Integer oldId) throws Exception {
|
||||
if(specificServiceCfg.getGroupId()==null || specificServiceCfg.getGroupId()==0){
|
||||
specificServiceCfg.setGroupId(new ConvertTool().getGroupId());
|
||||
}
|
||||
//新增协议分组
|
||||
ConfigGroupInfo group = specificServiceCfgDao.getConfigGroupInfoByGroupId(specificServiceCfg.getGroupId());
|
||||
if(group==null){
|
||||
group = new ConfigGroupInfo();
|
||||
group.setGroupId(specificServiceCfg.getGroupId());
|
||||
group.setGroupName(specificServiceCfg.getSpecServiceName());
|
||||
group.setIsIssued(0);
|
||||
group.setGroupType(1);
|
||||
specificServiceCfgDao.insertConfigGroupInfo(group);
|
||||
}
|
||||
if(oldId==null){//新增
|
||||
specificServiceCfg.setIsValid(1);
|
||||
|
||||
@@ -31,19 +31,13 @@
|
||||
<c:when test="${_cfg.classify==null or _cfg.classify==''}">
|
||||
<option value="${fl.serviceDictId}">${fl.itemValue}</option>
|
||||
</c:when>
|
||||
<c:when test="${fn:contains(_cfg.classify,',')}">
|
||||
<c:otherwise>
|
||||
<option value="${fl.serviceDictId}"
|
||||
<c:forEach items="${fn:split(_cfg.classify,',')}" var="_classify">
|
||||
<c:if test="${fl.isValid==0}">disabled="disabled"</c:if>
|
||||
<c:if test="${fn:trim(fl.serviceDictId) eq _classify}">selected</c:if>
|
||||
</c:forEach>
|
||||
>${fl.itemValue}</option>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<option value="${fl.serviceDictId}"
|
||||
<c:if test="${fl.isValid==0}">disabled="disabled"</c:if>
|
||||
<c:if test="${fn:trim(fl.serviceDictId) eq _classify}">selected</c:if>
|
||||
>${fl.itemValue}</option>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</c:forEach>
|
||||
|
||||
@@ -87,14 +87,18 @@
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isAreaEffective" value="1"
|
||||
<c:if test="${_cfg.isAreaEffective==1}">checked</c:if>
|
||||
<c:if test="${action==2}">disabled</c:if>
|
||||
><spring:message code="yes"/>
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isAreaEffective" value="0"
|
||||
<c:if test="${_cfg.isAreaEffective==0}">checked</c:if>
|
||||
<c:if test="${action==2}">disabled</c:if>
|
||||
><spring:message code="no"/>
|
||||
</label>
|
||||
<%-- <input class="form-control" type="text" name="isAreaEffective" value="${_cfg.isAreaEffective}"> --%>
|
||||
<c:if test="${action==2}">
|
||||
<input class="form-control" type="hidden" name="isAreaEffective" value="${_cfg.isAreaEffective}">
|
||||
</c:if>
|
||||
</div>
|
||||
<div for="isAreaEffective"></div>
|
||||
</div>
|
||||
|
||||
@@ -53,25 +53,18 @@
|
||||
<label class="control-label col-md-3"><spring:message code="type"/></label>
|
||||
<div class="col-md-6">
|
||||
<select name="classify" multiple class="selectpicker form-control" title=<spring:message code="select"/>>
|
||||
|
||||
<c:forEach items="${fls}" var="fl">
|
||||
<c:choose>
|
||||
<c:when test="${_cfg.classify==null or _cfg.classify==''}">
|
||||
<option value="${fl.serviceDictId}">${fl.itemValue}</option>
|
||||
</c:when>
|
||||
<c:when test="${fn:contains(_cfg.classify,',')}">
|
||||
<c:otherwise>
|
||||
<option value="${fl.serviceDictId}"
|
||||
<c:forEach items="${fn:split(_cfg.classify,',')}" var="_classify">
|
||||
<c:if test="${fl.isValid==0}">disabled="disabled"</c:if>
|
||||
<c:if test="${fn:trim(fl.serviceDictId) eq _classify}">selected</c:if>
|
||||
</c:forEach>
|
||||
>${fl.itemValue}</option>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<option value="${fl.serviceDictId}"
|
||||
<c:if test="${fl.isValid==0}">disabled="disabled"</c:if>
|
||||
<c:if test="${fn:trim(fl.serviceDictId) eq _classify}">selected</c:if>
|
||||
>${fl.itemValue}</option>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</c:forEach>
|
||||
|
||||
@@ -1,7 +1,30 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<h3 class="form-section">增强字符串<spring:message code="block_config"/><small><span class="glyphicon glyphicon-chevron-down" data-toggle="collapse" data-target=".complexCfg" title="add"></span></small></h3>
|
||||
<div class="row complexCfg collapse">
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
if(!$(".district").val()&&$(".otherValue").val()){
|
||||
$(".district").find("option").each(function(){
|
||||
var text=$(this).text().toLowerCase();
|
||||
if("others"==text){
|
||||
$(this).attr("selected","selected");
|
||||
$(this).parent().siblings(".otherValue").prop("type","text");
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<h3 class="form-section">
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '4' and otherTable==null}">
|
||||
<spring:message code="${mainTableDesc}"/>
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '4'}">
|
||||
<spring:message code="${otherTable.tableDesc}"/>
|
||||
</c:when>
|
||||
<c:otherwise>增强字符串<spring:message code="block_config"/></c:otherwise>
|
||||
</c:choose>
|
||||
<!-- <small><span class="glyphicon glyphicon-chevron-down" data-toggle="collapse" data-target=".complexCfg" title="add"></span></small> --></h3>
|
||||
<div class="row complexCfg">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><spring:message code="config_describe"/></label>
|
||||
@@ -15,7 +38,6 @@
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</div>
|
||||
<div for="cfgDesc"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
@@ -26,27 +48,38 @@
|
||||
<c:when test="${mainTableType eq '4' and otherTable==null}">
|
||||
<select name="complexCfg[${mainTable}].district" class="district selectpicker select2 form-control">
|
||||
<option value=""><spring:message code='select'/></option>
|
||||
<c:forEach items="${districts}" var="district">
|
||||
<option value="${district.itemValue}">${district.itemValue}</option>
|
||||
<c:forEach items="${fns:getFeaturesDictData(mainTable)}" var="district">
|
||||
<option value="${district.itemValue}"
|
||||
<c:if test="${_cfg.complexCfg[mainTable].district eq district.itemValue}">selected</c:if>
|
||||
>${district.itemValue}</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '4'}">
|
||||
<select name="complexCfg[${otherTable.tableName}].district" class="district selectpicker select2 form-control">
|
||||
<option value=""><spring:message code='select'/></option>
|
||||
<c:forEach items="${districts}" var="district">
|
||||
<option value="${district.itemValue}">${district.itemValue}</option>
|
||||
<c:forEach items="${fns:getFeaturesDictData(otherTable.tableName)}" var="district">
|
||||
<option value="${district.itemValue}"
|
||||
<c:if test="${_cfg.complexCfg[otherTable.tableName].district eq district.itemValue}">selected</c:if>
|
||||
>${district.itemValue}</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
<input type="hidden" name="" placeholder="请输入自定义域" class="otherValue form-control" value="${_cfg.complexCfg[mainTable].district}"/>
|
||||
</div>
|
||||
<div for="district"></div>
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '4' and otherTable==null}">
|
||||
<div for="complexCfg[${mainTable}].district"></div>
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '4'}">
|
||||
<div for="complexCfg[${otherTable.tableName}].district"></div>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row complexCfg collapse">
|
||||
<div class="row complexCfg">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="key_word"/></label>
|
||||
@@ -60,7 +93,14 @@
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</div>
|
||||
<div for="keywords"></div>
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '4' and otherTable==null}">
|
||||
<div for="complexCfg[${mainTable}].keywords"></div>
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '4'}">
|
||||
<div for="complexCfg[${otherTable.tableName}].keywords"></div>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
@@ -94,11 +134,18 @@
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</div>
|
||||
<div for="isAreaEffective"></div>
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '4' and otherTable==null}">
|
||||
<div for="complexCfg[${mainTable}].exprType"></div>
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '4'}">
|
||||
<div for="complexCfg[${otherTable.tableName}].exprType"></div>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row complexCfg collapse">
|
||||
<div class="row complexCfg">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="match_method"/></label>
|
||||
@@ -124,7 +171,14 @@
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</div>
|
||||
<div for="matchMethod"></div>
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '4' and otherTable==null}">
|
||||
<div for="complexCfg[${mainTable}].matchMethod"></div>
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '4'}">
|
||||
<div for="complexCfg[${otherTable.tableName}].matchMethod"></div>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
@@ -150,6 +204,14 @@
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</div>
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '4' and otherTable==null}">
|
||||
<div for="complexCfg[${mainTable}].isHexbin"></div>
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '4'}">
|
||||
<div for="complexCfg[${otherTable.tableName}].isHexbin"></div>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</div>
|
||||
</div>
|
||||
<c:choose>
|
||||
|
||||
@@ -1,11 +1,19 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<style>
|
||||
.ipCfg-hide{
|
||||
display:none;
|
||||
}
|
||||
|
||||
</style>
|
||||
<h3 class="form-section">IP<spring:message code="block_config"/><small><span class="glyphicon glyphicon-plus" data-toggle="collapse" data-target=".ipCfg" title="add"></span></small></h3>
|
||||
<h3 class="form-section">
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '1' and otherTable==null}">
|
||||
<spring:message code="${mainTableDesc}"/>
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '1'}">
|
||||
<spring:message code="${otherTable.tableDesc}"/>
|
||||
</c:when>
|
||||
<c:otherwise>IP<spring:message code="block_config"/></c:otherwise>
|
||||
</c:choose>
|
||||
<small><span style="margin-left:10px"><input type="checkbox" id="ipSelect"/> 可选</span><!-- <span class="glyphicon glyphicon-plus" data-toggle="collapse" data-target=".ipCfg" title="add"></span> --></small></h3>
|
||||
<div class="row ipCfg collapse">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
@@ -20,7 +28,6 @@
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</div>
|
||||
<div for="cfgDesc"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
@@ -44,7 +51,14 @@
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</div>
|
||||
<div for="ipType"></div>
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '1' and otherTable==null}">
|
||||
<div for="ipCfg[${mainTable}].ipType"></div>
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '1'}">
|
||||
<div for="ipCfg[${otherTable.tableName}].ipType"></div>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -62,7 +76,14 @@
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</div>
|
||||
<div for="srcIp"></div>
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '1' and otherTable==null}">
|
||||
<div for="ipCfg[${mainTable}].srcIp"></div>
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '1'}">
|
||||
<div for="ipCfg[${otherTable.tableName}].srcIp"></div>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
@@ -78,6 +99,14 @@
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</div>
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '1' and otherTable==null}">
|
||||
<div for="ipCfg[${mainTable}].srcIpMask"></div>
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '1'}">
|
||||
<div for="ipCfg[${otherTable.tableName}].srcIpMask"></div>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
<div for="srcIpMask"></div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -96,7 +125,14 @@
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</div>
|
||||
<div for="srcPort"></div>
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '1' and otherTable==null}">
|
||||
<div for="ipCfg[${mainTable}].srcPort"></div>
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '1'}">
|
||||
<div for="ipCfg[${otherTable.tableName}].srcPort"></div>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
@@ -112,7 +148,14 @@
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</div>
|
||||
<div for="srcPortMask"></div>
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '1' and otherTable==null}">
|
||||
<div for="ipCfg[${mainTable}].srcPortMask"></div>
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '1'}">
|
||||
<div for="ipCfg[${otherTable.tableName}].srcPortMask"></div>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -130,7 +173,14 @@
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</div>
|
||||
<div for="dstIp"></div>
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '1' and otherTable==null}">
|
||||
<div for="ipCfg[${mainTable}].dstIp"></div>
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '1'}">
|
||||
<div for="ipCfg[${otherTable.tableName}].dstIp"></div>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
@@ -146,7 +196,14 @@
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</div>
|
||||
<div for="dstIpMask"></div>
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '1' and otherTable==null}">
|
||||
<div for="ipCfg[${mainTable}].dstIpMask"></div>
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '1'}">
|
||||
<div for="ipCfg[${otherTable.tableName}].dstIpMask"></div>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -164,7 +221,14 @@
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</div>
|
||||
<div for="dstPort"></div>
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '1' and otherTable==null}">
|
||||
<div for="ipCfg[${mainTable}].dstPort"></div>
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '1'}">
|
||||
<div for="ipCfg[${otherTable.tableName}].dstPort"></div>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
@@ -180,7 +244,14 @@
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</div>
|
||||
<div for="dstPortMask"></div>
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '1' and otherTable==null}">
|
||||
<div for="ipCfg[${mainTable}].dstPortMask"></div>
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '1'}">
|
||||
<div for="ipCfg[${otherTable.tableName}].dstPortMask"></div>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -207,7 +278,14 @@
|
||||
</c:choose>
|
||||
<%-- <input class="form-control" type="text" name="direction" value="${_cfg.ipCfg.direction}"> --%>
|
||||
</div>
|
||||
<div for="direction"></div>
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '1' and otherTable==null}">
|
||||
<div for="ipCfg[${mainTable}].direction"></div>
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '1'}">
|
||||
<div for="ipCfg[${otherTable.tableName}].direction"></div>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
@@ -233,7 +311,14 @@
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</div>
|
||||
<div for="protocol"></div>
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '1' and otherTable==null}">
|
||||
<div for="ipCfg[${mainTable}].protocol"></div>
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '1'}">
|
||||
<div for="ipCfg[${otherTable.tableName}].protocol"></div>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</div>
|
||||
</div>
|
||||
<c:choose>
|
||||
|
||||
@@ -1,6 +1,16 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<h3 class="form-section">数值<spring:message code="block_config"/><small><span class="glyphicon glyphicon-chevron-down" data-toggle="collapse" data-target=".numCfg" title="add"></span></small></h3>
|
||||
<h3 class="form-section">
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '3' and otherTable==null}">
|
||||
<spring:message code="${mainTableDesc}"/>
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '3'}">
|
||||
<spring:message code="${otherTable.tableDesc}"/>
|
||||
</c:when>
|
||||
<c:otherwise>数值<spring:message code="block_config"/></c:otherwise>
|
||||
</c:choose>
|
||||
<small><span class="glyphicon glyphicon-chevron-down" data-toggle="collapse" data-target=".numCfg" title="add"></span></small></h3>
|
||||
<div class="row numCfg collapse">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
|
||||
@@ -1,7 +1,17 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<h3 class="form-section">字符串<spring:message code="block_config"/><small><span class="glyphicon glyphicon-chevron-down" data-toggle="collapse" data-target=".stringCfg" title="add"></span></small></h3>
|
||||
<div class="row stringCfg collapse">
|
||||
<h3 class="form-section">
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '2' and otherTable==null}">
|
||||
<spring:message code="${mainTableDesc}"/>
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '2'}">
|
||||
<spring:message code="${otherTable.tableDesc}"/>
|
||||
</c:when>
|
||||
<c:otherwise>字符串<spring:message code="block_config"/></c:otherwise>
|
||||
</c:choose>
|
||||
<!-- <small><span class="glyphicon glyphicon-chevron-down" data-toggle="collapse" data-target=".stringCfg" title="add"></span></small> --></h3>
|
||||
<div class="row stringCfg">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><spring:message code="config_describe"/></label>
|
||||
@@ -15,7 +25,6 @@
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</div>
|
||||
<div for="cfgDesc"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
@@ -31,11 +40,18 @@
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</div>
|
||||
<div for="cfgKeywords"></div>
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '2' and otherTable==null}">
|
||||
<div for="stringCfg[${mainTable}].cfgKeywords"></div>
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '2'}">
|
||||
<div for="stringCfg[${otherTable.tableName}].cfgKeywords"></div>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row stringCfg collapse">
|
||||
<div class="row stringCfg">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="expression_type"/></label>
|
||||
@@ -66,9 +82,15 @@
|
||||
</label>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
|
||||
</div>
|
||||
<div for="exprType"></div>
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '2' and otherTable==null}">
|
||||
<div for="stringCfg[${mainTable}].exprType"></div>
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '2'}">
|
||||
<div for="stringCfg[${otherTable.tableName}].exprType"></div>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
@@ -96,11 +118,18 @@
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</div>
|
||||
<div for="matchMethod"></div>
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '2' and otherTable==null}">
|
||||
<div for="stringCfg[${mainTable}].matchMethod"></div>
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '2'}">
|
||||
<div for="stringCfg[${otherTable.tableName}].matchMethod"></div>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row stringCfg collapse">
|
||||
<div class="row stringCfg">
|
||||
<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>
|
||||
@@ -124,7 +153,14 @@
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</div>
|
||||
<div for="isHexbin"></div>
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '2' and otherTable==null}">
|
||||
<div for="stringCfg[${mainTable}].isHexbin"></div>
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '2'}">
|
||||
<div for="stringCfg[${otherTable.tableName}].isHexbin"></div>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</div>
|
||||
</div>
|
||||
<c:choose>
|
||||
|
||||
@@ -6,6 +6,45 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
|
||||
if(!$(".district").val()&&$(".otherValue").val()){
|
||||
$(".district").find("option").each(function(){
|
||||
var text=$(this).text().toLowerCase();
|
||||
if("others"==text){
|
||||
$(this).attr("selected","selected");
|
||||
$(this).parent().siblings(".otherValue").prop("type","text");
|
||||
}
|
||||
});
|
||||
}
|
||||
$(".district").on("change",function(){
|
||||
var text=$(this).find("option:selected").text().toLowerCase();
|
||||
var other=$(this).parent("div").siblings(".otherValue");
|
||||
if("others"==text){
|
||||
other.prop("type","text");
|
||||
$(this).find("option").each(function(){
|
||||
if(other.val()==$(this).text()){
|
||||
other.val("");
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}else{
|
||||
other.prop("type","hidden");
|
||||
}
|
||||
});
|
||||
$(".otherValue").on("change",function(){
|
||||
var val=$(this).val();
|
||||
if($(this).is(":visible")){
|
||||
$(this).prev("div").find("option").each(function(){
|
||||
if("others"==$(this).text().toLowerCase()){
|
||||
$(this).prop("value",val);
|
||||
if($(this).prop("selected")){
|
||||
$(this).parent("select.selectpicker").selectpicker('val',val);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
$("#save").on("click",function(){
|
||||
$("#cfgFrom").attr("action","${ctx}/cfg/app/saveOrUpdateCfg");
|
||||
$("#save").submit();
|
||||
@@ -83,33 +122,38 @@ $(function(){
|
||||
<div for="cfgDesc"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="whether_area_block"/></label>
|
||||
<div class="col-md-6">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" class="required" name="isAreaEffective" value="1"
|
||||
<c:if test="${_cfg.isAreaEffective==1}">checked</c:if>
|
||||
><spring:message code="yes"/>
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" class="required" name="isAreaEffective" value="0"
|
||||
<c:if test="${_cfg.isAreaEffective==0}">checked</c:if>
|
||||
><spring:message code="no"/>
|
||||
</label>
|
||||
<%-- <input class="form-control" type="text" name="isAreaEffective" value="${_cfg.isAreaEffective}"> --%>
|
||||
</div>
|
||||
<div for="isAreaEffective"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><spring:message code="area_effect_id"></spring:message></label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control" type="text" name="areaEffectiveIds" value="${_cfg.areaEffectiveIds}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<c:if test="${isContainFeaturesCfg}">
|
||||
<input type="hidden" name="isAreaEffective" value="0"/>
|
||||
</c:if>
|
||||
<c:if test="${!isContainFeaturesCfg}">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="whether_area_block"/></label>
|
||||
<div class="col-md-6">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" class="required" name="isAreaEffective" value="1"
|
||||
<c:if test="${_cfg.isAreaEffective==1}">checked</c:if>
|
||||
><spring:message code="yes"/>
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" class="required" name="isAreaEffective" value="0"
|
||||
<c:if test="${_cfg.isAreaEffective==0}">checked</c:if>
|
||||
><spring:message code="no"/>
|
||||
</label>
|
||||
<%-- <input class="form-control" type="text" name="isAreaEffective" value="${_cfg.isAreaEffective}"> --%>
|
||||
</div>
|
||||
<div for="isAreaEffective"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><spring:message code="area_effect_id"></spring:message></label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control" type="text" name="areaEffectiveIds" value="${_cfg.areaEffectiveIds}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
<c:if test="${fn:length(featuresList)>0}">
|
||||
<c:set var="index1" value="0"/>
|
||||
<c:set var="index2" value="0"/>
|
||||
@@ -191,11 +235,21 @@ $(function(){
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="match_area"/></label>
|
||||
<div class="col-md-6">
|
||||
<select name="complexFeaturesList[${index2}].district" class="required selectpicker select2 form-control" title="<spring:message code="select"/>" >
|
||||
<c:set var="districtValue" value="noSelect"></c:set>
|
||||
<select name="complexFeaturesList[${index2}].district" class="district required selectpicker select2 form-control" title="<spring:message code="select"/>" >
|
||||
<c:forEach items="${fns:getFeaturesDictData(features.tableName) }" var="item">
|
||||
<option value="${item.itemValue }" <c:if test="${_cfg.complexFeaturesList[index2].district==item.itemValue }">selected</c:if>><spring:message code="${item.itemValue}"></spring:message></option>
|
||||
<c:if test="${_cfg.complexFeaturesList[index2].district==item.itemValue }">
|
||||
<c:set var="districtValue" value="${item.itemValue }"></c:set>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
<c:if test="${districtValue eq 'noSelect' and not empty _cfg.cfgId}">
|
||||
<option value="${_cfg.complexFeaturesList[index2].district}" selected>
|
||||
${_cfg.complexFeaturesList[index2].district}
|
||||
</option>
|
||||
</c:if>
|
||||
</select>
|
||||
<input type="hidden" name="" placeholder="请输入自定义域" class="otherValue form-control" value="${_cfg.complexFeaturesList[index2].district}"/>
|
||||
<%-- <input class="required form-control" type="text" name="complexFeaturesList[${index2}].district" value="${_cfg.complexFeaturesList[index2].district }"> --%>
|
||||
</div>
|
||||
<div for="cfgDesc"></div>
|
||||
|
||||
@@ -285,7 +285,7 @@
|
||||
<c:if test="${isContainFeaturesCfg}">
|
||||
<td>
|
||||
<a href="${ctx}/cfg/app/showFeaturesCfg?serviceId=${cfg.serviceId}&compileId=${cfg.compileId }&action=${cfg.action}&cfgId=${cfg.cfgId}&cfgName=${cfgName}">
|
||||
<spring:message code="show"></spring:message>
|
||||
<spring:message code="detail"></spring:message>
|
||||
</a>
|
||||
</td>
|
||||
</c:if>
|
||||
@@ -361,10 +361,10 @@
|
||||
</c:when>
|
||||
<c:when test="${cfg.isAudit eq '0'}">
|
||||
<shiro:hasPermission name="cfg:edit">
|
||||
<li><a href="${ctx}/cfg/app/updateForm?serviceId=${cfg.serviceId}&action=${cfg.action}&cfgId=${cfg.cfgId}&cfgName=${cfgName}" onclick="javascript:return confirm('sure?', this.href)"><spring:message code="edit"></spring:message></a></li>
|
||||
<li><a href="${ctx}/cfg/app/updateForm?serviceId=${cfg.serviceId}&action=${cfg.action}&compileId=${cfg.compileId}&cfgId=${cfg.cfgId}&cfgName=${cfgName}" onclick="javascript:return confirm('sure?', this.href)"><spring:message code="edit"></spring:message></a></li>
|
||||
</shiro:hasPermission>
|
||||
<shiro:hasPermission name="cfg:delete">
|
||||
<li><a href="${ctx}/cfg/app/deleteCfg?serviceId=${cfg.serviceId}&action=${cfg.action}&cfgId=${cfg.cfgId}&cfgName=${cfgName}" onclick="return confirm('sure?', this.href)"><spring:message code="delete"></spring:message></a></li>
|
||||
<li><a href="${ctx}/cfg/app/deleteCfg?serviceId=${cfg.serviceId}&action=${cfg.action}&compileId=${cfg.compileId}&cfgId=${cfg.cfgId}&cfgName=${cfgName}" onclick="return confirm('sure?', this.href)"><spring:message code="delete"></spring:message></a></li>
|
||||
</shiro:hasPermission>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
@@ -373,15 +373,15 @@
|
||||
<c:choose>
|
||||
<c:when test="${cfg.isAudit eq '1'}">
|
||||
<shiro:hasPermission name="cfg:audit:cancel">
|
||||
<li><a href="${ctx}/cfg/app/auditCfg?serviceId=${cfg.serviceId}&action=${cfg.action}&cfgId=${cfg.cfgId}&isAudit=3&cfgName=${cfgName}" onclick="return confirm('sure?', this.href)"><spring:message code="cancel"></spring:message></a></li>
|
||||
<li><a href="${ctx}/cfg/app/auditCfg?serviceId=${cfg.serviceId}&action=${cfg.action}&compileId=${cfg.compileId}&cfgId=${cfg.cfgId}&isAudit=3&cfgName=${cfgName}" onclick="return confirm('sure?', this.href)"><spring:message code="cancel"></spring:message></a></li>
|
||||
</shiro:hasPermission>
|
||||
</c:when>
|
||||
<c:when test="${cfg.isAudit eq '0'}">
|
||||
<shiro:hasPermission name="cfg:audit:valid">
|
||||
<li><a href="${ctx}/cfg/app/auditCfg?serviceId=${cfg.serviceId}&action=${cfg.action}&cfgId=${cfg.cfgId}&isAudit=1&cfgName=${cfgName}" onclick="return confirm('sure?', this.href)"><spring:message code="approved"></spring:message></a></li>
|
||||
<li><a href="${ctx}/cfg/app/auditCfg?serviceId=${cfg.serviceId}&action=${cfg.action}&compileId=${cfg.compileId}&cfgId=${cfg.cfgId}&isAudit=1&cfgName=${cfgName}" onclick="return confirm('sure?', this.href)"><spring:message code="approved"></spring:message></a></li>
|
||||
</shiro:hasPermission>
|
||||
<shiro:hasPermission name="cfg:audit:invalid">
|
||||
<li><a href="${ctx}/cfg/app/auditCfg?serviceId=${cfg.serviceId}&action=${cfg.action}&cfgId=${cfg.cfgId}&isAudit=2&cfgName=${cfgName}" onclick="return confirm('sure?', this.href)"><spring:message code="unapproved"></spring:message></a></li>
|
||||
<li><a href="${ctx}/cfg/app/auditCfg?serviceId=${cfg.serviceId}&action=${cfg.action}&compileId=${cfg.compileId}&cfgId=${cfg.cfgId}&isAudit=2&cfgName=${cfgName}" onclick="return confirm('sure?', this.href)"><spring:message code="unapproved"></spring:message></a></li>
|
||||
</shiro:hasPermission>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
|
||||
@@ -120,11 +120,21 @@ $(function(){
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="match_area"/></label>
|
||||
<div class="col-md-6">
|
||||
<c:set var="districtValue" value="noSelect"></c:set>
|
||||
<select name="complexFeaturesList[${index2}].district" class="required selectpicker select2 form-control" title="<spring:message code="select"/>" >
|
||||
<c:forEach items="${fns:getFeaturesDictData(features.tableName) }" var="item">
|
||||
<option value="${item.itemValue }" <c:if test="${_cfg.complexFeaturesList[index2].district==item.itemValue }">selected</c:if>><spring:message code="${item.itemValue}"></spring:message></option>
|
||||
<c:if test="${_cfg.complexFeaturesList[index2].district==item.itemValue }">
|
||||
<c:set var="districtValue" value="${item.itemValue }"></c:set>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
<c:if test="${districtValue eq 'noSelect' and not empty _cfg.cfgId}">
|
||||
<option value="${_cfg.complexFeaturesList[index2].district}" selected>
|
||||
${_cfg.complexFeaturesList[index2].district}
|
||||
</option>
|
||||
</c:if>
|
||||
</select>
|
||||
|
||||
<%-- <input class="required form-control" type="text" name="complexFeaturesList[${index2}].district" value="${_cfg.complexFeaturesList[index2].district }"> --%>
|
||||
</div>
|
||||
<div for="cfgDesc"></div>
|
||||
|
||||
@@ -9,7 +9,7 @@ $(function(){
|
||||
//$("[name^='stringCfg']").attr("disabled",true);
|
||||
//$("[name^='complexCfg']").attr("disabled",true);
|
||||
//$("[name^='numCfg']").attr("disabled",true);
|
||||
$(".glyphicon").on("click",function(){
|
||||
/* $(".glyphicon").on("click",function(){
|
||||
var className=$(this).attr("data-target");
|
||||
if($(this).hasClass("glyphicon-chevron-down")){
|
||||
$(this).removeClass("glyphicon-chevron-down").addClass("glyphicon-chevron-up");
|
||||
@@ -29,13 +29,142 @@ $(function(){
|
||||
$(this).removeClass("glyphicon-remove").addClass("glyphicon-plus");
|
||||
$("[name^='"+targetName+"']").attr("disabled",true);
|
||||
}
|
||||
}); */
|
||||
$("#cfgFrom").validate({
|
||||
rules: {
|
||||
//基本配置校验开始
|
||||
'isAreaEffective':{
|
||||
required:true
|
||||
},
|
||||
'requestId': {
|
||||
required: true
|
||||
}
|
||||
//基本配置校验结束
|
||||
//maintable校验开始
|
||||
,
|
||||
'complexCfg[${mainTable}].district': {
|
||||
required: true
|
||||
}
|
||||
,
|
||||
'complexCfg[${mainTable}].keywords': {
|
||||
required: true
|
||||
}
|
||||
,
|
||||
'complexCfg[${mainTable}].exprType': {
|
||||
required: true
|
||||
}
|
||||
,
|
||||
'complexCfg[${mainTable}].matchMethod': {
|
||||
required: true
|
||||
}
|
||||
,
|
||||
'complexCfg[${mainTable}].isHexbin': {
|
||||
required: true
|
||||
}
|
||||
,
|
||||
'stringCfg[${mainTable}].cfgKeywords': {
|
||||
required: true
|
||||
}
|
||||
,
|
||||
'stringCfg[${mainTable}].exprType': {
|
||||
required: true
|
||||
}
|
||||
,
|
||||
'stringCfg[${mainTable}].matchMethod': {
|
||||
required: true
|
||||
}
|
||||
,
|
||||
'stringCfg[${mainTable}].isHexbin': {
|
||||
required: true
|
||||
}
|
||||
//maintable校验结束
|
||||
//othertable校验开始
|
||||
<c:forEach items="${_cfg.otherTables}" var="otherTable">
|
||||
,
|
||||
'complexCfg[${otherTable.tableName}].district': {
|
||||
required: true
|
||||
}
|
||||
,
|
||||
'complexCfg[${otherTable.tableName}].keywords': {
|
||||
required: true
|
||||
}
|
||||
,
|
||||
'complexCfg[${otherTable.tableName}].exprType': {
|
||||
required: true
|
||||
}
|
||||
,
|
||||
'complexCfg[${otherTable.tableName}].matchMethod': {
|
||||
required: true
|
||||
}
|
||||
,
|
||||
'complexCfg[${otherTable.tableName}].isHexbin': {
|
||||
required: true
|
||||
}
|
||||
,
|
||||
'stringCfg[${otherTable.tableName}].cfgKeywords': {
|
||||
required: true
|
||||
}
|
||||
,
|
||||
'stringCfg[${otherTable.tableName}].exprType': {
|
||||
required: true
|
||||
}
|
||||
,
|
||||
'stringCfg[${otherTable.tableName}].matchMethod': {
|
||||
required: true
|
||||
}
|
||||
,
|
||||
'stringCfg[${otherTable.tableName}].isHexbin': {
|
||||
required: true
|
||||
}
|
||||
</c:forEach>
|
||||
//othertable校验结束
|
||||
},
|
||||
messages: {
|
||||
'isAreaEffective':{
|
||||
required:'<spring:message code="required"/>'
|
||||
},
|
||||
'requestId': {
|
||||
required:'<spring:message code="required"/>'
|
||||
}
|
||||
},
|
||||
errorPlacement: function(error,element){
|
||||
$(element).parents(".form-group").find("div[for='"+element.attr("name")+"']").append(error);
|
||||
},
|
||||
submitHandler: function(form){
|
||||
form.submit();
|
||||
},
|
||||
errorContainer: "#messageBox"
|
||||
});
|
||||
|
||||
$("#ipSelect").change(function(){
|
||||
if($(this).prop("checked")){
|
||||
$("[name^='ipCfg']").removeProp("disabled");
|
||||
//解决select插件disbale后无法恢复
|
||||
$(".bootstrap-select").removeClass("disabled");
|
||||
$(".bootstrap-select button").removeClass("disabled");
|
||||
$(".collapse").addClass("in");
|
||||
|
||||
myValidate(true);//开启ip校验
|
||||
}else{
|
||||
myValidate(false);//关闭ip校验
|
||||
|
||||
$(".collapse").removeClass("in");
|
||||
$("[name^='ipCfg']").attr("disabled",true);
|
||||
}
|
||||
});
|
||||
$(".district").on("change",function(){
|
||||
var val=$(this).val().toLowerCase();
|
||||
if("others"==val){
|
||||
$(this).parent("div").siblings(".otherValue").prop("type","text");
|
||||
var text=$(this).find("option:selected").text().toLowerCase();
|
||||
var other=$(this).parent("div").siblings(".otherValue");
|
||||
if("others"==text){
|
||||
other.prop("type","text");
|
||||
$(this).find("option").each(function(){
|
||||
if(other.val()==$(this).text()){
|
||||
other.val("");
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}else{
|
||||
$(this).parent("div").siblings(".otherValue").prop("type","hidden").attr("value","");
|
||||
other.prop("type","hidden");
|
||||
}
|
||||
});
|
||||
$(".otherValue").on("change",function(){
|
||||
@@ -105,33 +234,149 @@ $(function(){
|
||||
$("#cancel").on("click",function(){
|
||||
window.history.back();
|
||||
});
|
||||
$("#cfgFrom").validate({
|
||||
rules: {
|
||||
'isAreaEffective':{
|
||||
required:true
|
||||
},
|
||||
'requestId': {
|
||||
required: true
|
||||
|
||||
}
|
||||
},
|
||||
messages: {
|
||||
'isAreaEffective':{
|
||||
required:'<spring:message code="required"/>'
|
||||
},
|
||||
'requestId': {
|
||||
required: '<spring:message code="required"/>'
|
||||
}
|
||||
},
|
||||
errorPlacement: function(error,element){
|
||||
$(element).parents(".form-group").find("div[for='"+element.attr("name")+"']").append(error);
|
||||
},
|
||||
submitHandler: function(form){
|
||||
form.submit();
|
||||
},
|
||||
errorContainer: "#messageBox"
|
||||
});
|
||||
|
||||
myValidate();
|
||||
});
|
||||
|
||||
function myValidate(flag) {
|
||||
if (flag) {
|
||||
myValidate(false);
|
||||
$("#cfgFrom").validate();
|
||||
$("[name=ipCfg\\[http_ip_cfg\\]\\.ipType]").each(function(){
|
||||
$(this).rules("add", {
|
||||
required: true,
|
||||
messages: {
|
||||
required:'<spring:message code="required"/>'
|
||||
}
|
||||
});
|
||||
});
|
||||
$("[name=ipCfg\\[http_ip_cfg\\]\\.srcIp]").each(function(){
|
||||
$(this).rules("add", {
|
||||
required: true,
|
||||
messages: {
|
||||
required:'<spring:message code="required"/>'
|
||||
}
|
||||
});
|
||||
});
|
||||
$("[name=ipCfg\\[http_ip_cfg\\]\\.srcIpMask]").each(function(){
|
||||
$(this).rules("add", {
|
||||
required: true,
|
||||
messages: {
|
||||
required:'<spring:message code="required"/>'
|
||||
}
|
||||
});
|
||||
});
|
||||
$("[name=ipCfg\\[http_ip_cfg\\]\\.srcPort]").each(function(){
|
||||
$(this).rules("add", {
|
||||
required: true,
|
||||
messages: {
|
||||
required:'<spring:message code="required"/>'
|
||||
}
|
||||
});
|
||||
});
|
||||
$("[name=ipCfg\\[http_ip_cfg\\]\\.srcPortMask]").each(function(){
|
||||
$(this).rules("add", {
|
||||
required: true,
|
||||
messages: {
|
||||
required:'<spring:message code="required"/>'
|
||||
}
|
||||
});
|
||||
});
|
||||
$("[name=ipCfg\\[http_ip_cfg\\]\\.dstIp]").each(function(){
|
||||
$(this).rules("add", {
|
||||
required: true,
|
||||
messages: {
|
||||
required:'<spring:message code="required"/>'
|
||||
}
|
||||
});
|
||||
});
|
||||
$("[name=ipCfg\\[http_ip_cfg\\]\\.dstIpMask]").each(function(){
|
||||
$(this).rules("add", {
|
||||
required: true,
|
||||
messages: {
|
||||
required:'<spring:message code="required"/>'
|
||||
}
|
||||
});
|
||||
});
|
||||
$("[name=ipCfg\\[http_ip_cfg\\]\\.dstPort]").each(function(){
|
||||
$(this).rules("add", {
|
||||
required: true,
|
||||
messages: {
|
||||
required:'<spring:message code="required"/>'
|
||||
}
|
||||
});
|
||||
});
|
||||
$("[name=ipCfg\\[http_ip_cfg\\]\\.dstPortMask]").each(function(){
|
||||
$(this).rules("add", {
|
||||
required: true,
|
||||
messages: {
|
||||
required:'<spring:message code="required"/>'
|
||||
}
|
||||
});
|
||||
});
|
||||
$("[name=ipCfg\\[http_ip_cfg\\]\\.direction]").each(function(){
|
||||
$(this).rules("add", {
|
||||
required: true,
|
||||
messages: {
|
||||
required:'<spring:message code="required"/>'
|
||||
}
|
||||
});
|
||||
});
|
||||
$("[name=ipCfg\\[http_ip_cfg\\]\\.protocol]").each(function(){
|
||||
$(this).rules("add", {
|
||||
required: true,
|
||||
messages: {
|
||||
required:'<spring:message code="required"/>'
|
||||
}
|
||||
});
|
||||
});
|
||||
$("[name=ipCfg\\[http_ip_cfg\\]\\.isAreaEffective]").each(function(){
|
||||
$(this).rules("add", {
|
||||
required: true,
|
||||
messages: {
|
||||
required:'<spring:message code="required"/>'
|
||||
}
|
||||
});
|
||||
});
|
||||
} else {
|
||||
$("[name=ipCfg\\[http_ip_cfg\\]\\.ipType]").each(function(){
|
||||
$(this).rules("remove");
|
||||
});
|
||||
$("[name=ipCfg\\[http_ip_cfg\\]\\.srcIp]").each(function(){
|
||||
$(this).rules("remove");
|
||||
});
|
||||
$("[name=ipCfg\\[http_ip_cfg\\]\\.srcIpMask]").each(function(){
|
||||
$(this).rules("remove");
|
||||
});
|
||||
$("[name=ipCfg\\[http_ip_cfg\\]\\.srcPort]").each(function(){
|
||||
$(this).rules("remove");
|
||||
});
|
||||
$("[name=ipCfg\\[http_ip_cfg\\]\\.srcPortMask]").each(function(){
|
||||
$(this).rules("remove");
|
||||
});
|
||||
$("[name=ipCfg\\[http_ip_cfg\\]\\.dstIp]").each(function(){
|
||||
$(this).rules("remove");
|
||||
});
|
||||
$("[name=ipCfg\\[http_ip_cfg\\]\\.dstIpMask]").each(function(){
|
||||
$(this).rules("remove");
|
||||
});
|
||||
$("[name=ipCfg\\[http_ip_cfg\\]\\.dstPort]").each(function(){
|
||||
$(this).rules("remove");
|
||||
});
|
||||
$("[name=ipCfg\\[http_ip_cfg\\]\\.dstPortMask]").each(function(){
|
||||
$(this).rules("remove");
|
||||
});
|
||||
$("[name=ipCfg\\[http_ip_cfg\\]\\.direction]").each(function(){
|
||||
$(this).rules("remove");
|
||||
});
|
||||
$("[name=ipCfg\\[http_ip_cfg\\]\\.protocol]").each(function(){
|
||||
$(this).rules("remove");
|
||||
});
|
||||
$("[name=ipCfg\\[http_ip_cfg\\]\\.isAreaEffective]").each(function(){
|
||||
$(this).rules("remove");
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
@@ -189,6 +434,10 @@ $(function(){
|
||||
<c:when test="${otherTable.tableType eq '2'}">
|
||||
<%@include file="/WEB-INF/include/form/multiple/stringInfo.jsp" %>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</c:forEach>
|
||||
<c:forEach items="${_cfg.otherTables}" var="otherTable">
|
||||
<c:choose>
|
||||
<c:when test="${otherTable.tableType eq '1'}">
|
||||
<%@include file="/WEB-INF/include/form/multiple/ipInfo.jsp" %>
|
||||
</c:when>
|
||||
|
||||
@@ -72,6 +72,7 @@
|
||||
<form:form id="searchForm" modelAttribute="cfg" action="${ctx}/cfg/multiple/list" method="post" class="form-search">
|
||||
<input id="mainTable" name="mainTable" type="hidden" value="${mainTable}"/>
|
||||
<input id="mainTableType" name="mainTableType" type="hidden" value="${mainTableType}"/>
|
||||
<input id="mainTableDesc" name="mainTableDesc" type="hidden" value="${mainTableDesc}"/>
|
||||
<input id="cfgType" name="cfgType" type="hidden" value="${cfgType}"/>
|
||||
<input id="cfgName" name="cfgName" type="hidden" value="${cfgName}"/>
|
||||
<input id="action" name="action" type="hidden" value="${action}"/>
|
||||
@@ -269,24 +270,24 @@
|
||||
<c:choose>
|
||||
<%--增强字符串 --%>
|
||||
<c:when test="${mainTableType eq '4'}">
|
||||
<th>增强字符串<spring:message code="config_describe"/></th>
|
||||
<th><spring:message code="${mainTableDesc}"/><spring:message code="config_describe"/></th>
|
||||
<th><spring:message code="match_area"/></th>
|
||||
<th><spring:message code="key_word"/></th>
|
||||
</c:when>
|
||||
<%--数值 --%>
|
||||
<c:when test="${mainTableType eq '3'}">
|
||||
<th><spring:message code="${mainTable}"/><spring:message code="config_describe"/></th>
|
||||
<th><spring:message code="${mainTableDesc}"/><spring:message code="config_describe"/></th>
|
||||
<th><spring:message code="数值下界"/></th>
|
||||
<th><spring:message code="数值上界"/></th>
|
||||
</c:when>
|
||||
<%--字符串 --%>
|
||||
<c:when test="${mainTableType eq '2'}">
|
||||
<th>字符串<spring:message code="config_describe"/></th>
|
||||
<th><spring:message code="${mainTableDesc}"/><spring:message code="config_describe"/></th>
|
||||
<th><spring:message code="key_word"/></th>
|
||||
</c:when>
|
||||
<%--IP --%>
|
||||
<c:when test="${mainTableType eq '1'}">
|
||||
<th>ip<spring:message code="config_describe"/></th>
|
||||
<th><spring:message code="${mainTableDesc}"/><spring:message code="config_describe"/></th>
|
||||
<th>ip<spring:message code="type"/></th>
|
||||
<th><spring:message code="client_ip"/></th>
|
||||
<th><spring:message code="client_address_mask"/></th>
|
||||
@@ -304,21 +305,21 @@
|
||||
<%--遍历子表属性 --%>
|
||||
<c:forEach items="${cfg.otherTables}" var="other" varStatus="status">
|
||||
<c:if test="${other.tableType eq '4'}">
|
||||
<th>增强字符串<spring:message code="config_describe"/></th>
|
||||
<th><spring:message code="${other.tableDesc}"/><spring:message code="config_describe"/></th>
|
||||
<th><spring:message code="match_area"/></th>
|
||||
<th><spring:message code="key_word"/></th>
|
||||
</c:if>
|
||||
<c:if test="${other.tableType eq '3'}">
|
||||
<th><spring:message code="${other.tableName}"/><spring:message code="config_describe"/></th>
|
||||
<th><spring:message code="${other.tableDesc}"/><spring:message code="config_describe"/></th>
|
||||
<th><spring:message code="数值下界"/></th>
|
||||
<th><spring:message code="数值上界"/></th>
|
||||
</c:if>
|
||||
<c:if test="${other.tableType eq'2'}">
|
||||
<th>字符串<spring:message code="config_describe"/></th>
|
||||
<th><spring:message code="${other.tableDesc}"/><spring:message code="config_describe"/></th>
|
||||
<th><spring:message code="key_word"/></th>
|
||||
</c:if>
|
||||
<c:if test="${other.tableType eq '1'}">
|
||||
<th>ip<spring:message code="config_describe"/></th>
|
||||
<th><spring:message code="${other.tableDesc}"/><spring:message code="config_describe"/></th>
|
||||
<th>ip<spring:message code="type"/></th>
|
||||
<th><spring:message code="client_ip"/></th>
|
||||
<th><spring:message code="client_address_mask"/></th>
|
||||
@@ -524,22 +525,22 @@
|
||||
<c:if test="${audit==0}">
|
||||
<c:choose>
|
||||
<c:when test="${bean.isAudit eq '2'}">
|
||||
<li><a href="${ctx}/cfg/multiple/updateForm?serviceId=${bean.serviceId}&action=${bean.action}&compileId=${bean.compileId}&cfgName=${cfgName}&mainTable=${mainTable}&mainTableType=${mainTableType}" onclick="javascript:return confirm('sure?', this.href)"><spring:message code="edit"></spring:message></a></li>
|
||||
<li><a href="${ctx}/cfg/multiple/updateForm?serviceId=${bean.serviceId}&action=${bean.action}&compileId=${bean.compileId}&cfgName=${cfgName}&mainTable=${mainTable}&mainTableType=${mainTableType}&mainTableDesc=${mainTableDesc}" onclick="javascript:return confirm('sure?', this.href)"><spring:message code="edit"></spring:message></a></li>
|
||||
</c:when>
|
||||
<c:when test="${bean.isAudit eq '0'}">
|
||||
<li><a href="${ctx}/cfg/multiple/updateForm?serviceId=${bean.serviceId}&action=${bean.action}&compileId=${bean.compileId}&cfgName=${cfgName}&mainTable=${mainTable}&mainTableType=${mainTableType}" onclick="javascript:return confirm('sure?', this.href)"><spring:message code="edit"></spring:message></a></li>
|
||||
<li><a href="${ctx}/cfg/multiple/deleteCfg?serviceId=${bean.serviceId}&action=${bean.action}&compileId=${bean.compileId}&cfgName=${cfgName}&mainTable=${mainTable}&mainTableType=${mainTableType}" onclick="return confirm('sure?', this.href)"><spring:message code="delete"></spring:message></a></li>
|
||||
<li><a href="${ctx}/cfg/multiple/updateForm?serviceId=${bean.serviceId}&action=${bean.action}&compileId=${bean.compileId}&cfgName=${cfgName}&mainTable=${mainTable}&mainTableType=${mainTableType}&mainTableDesc=${mainTableDesc}" onclick="javascript:return confirm('sure?', this.href)"><spring:message code="edit"></spring:message></a></li>
|
||||
<li><a href="${ctx}/cfg/multiple/deleteCfg?serviceId=${bean.serviceId}&action=${bean.action}&compileId=${bean.compileId}&cfgName=${cfgName}&mainTable=${mainTable}&mainTableType=${mainTableType}&mainTableDesc=${mainTableDesc}" onclick="return confirm('sure?', this.href)"><spring:message code="delete"></spring:message></a></li>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</c:if>
|
||||
<c:if test="${audit==1}">
|
||||
<c:choose>
|
||||
<c:when test="${bean.isAudit eq '1'}">
|
||||
<li><a href="${ctx}/cfg/multiple/auditCfg?serviceId=${bean.serviceId}&action=${bean.action}&compileId=${bean.compileId}&isAudit=3&cfgName=${cfgName}&mainTable=${mainTable}" onclick="return confirm('sure?', this.href)"><spring:message code="cancel"></spring:message></a></li>
|
||||
<li><a href="${ctx}/cfg/multiple/auditCfg?serviceId=${bean.serviceId}&action=${bean.action}&compileId=${bean.compileId}&isAudit=3&cfgName=${cfgName}&mainTable=${mainTable}&mainTableType=${mainTableType}&mainTableDesc=${mainTableDesc}" onclick="return confirm('sure?', this.href)"><spring:message code="cancel"></spring:message></a></li>
|
||||
</c:when>
|
||||
<c:when test="${bean.isAudit eq '0'}">
|
||||
<li><a href="${ctx}/cfg/multiple/auditCfg?serviceId=${bean.serviceId}&action=${bean.action}&compileId=${bean.compileId}&isAudit=1&cfgName=${cfgName}&mainTable=${mainTable}" onclick="return confirm('sure?', this.href)"><spring:message code="approved"></spring:message></a></li>
|
||||
<li><a href="${ctx}/cfg/multiple/auditCfg?serviceId=${bean.serviceId}&action=${bean.action}&compileId=${bean.compileId}&isAudit=2&cfgName=${cfgName}&mainTable=${mainTable}" onclick="return confirm('sure?', this.href)"><spring:message code="unapproved"></spring:message></a></li>
|
||||
<li><a href="${ctx}/cfg/multiple/auditCfg?serviceId=${bean.serviceId}&action=${bean.action}&compileId=${bean.compileId}&isAudit=1&cfgName=${cfgName}&mainTable=${mainTable}&mainTableType=${mainTableType}&mainTableDesc=${mainTableDesc}" onclick="return confirm('sure?', this.href)"><spring:message code="approved"></spring:message></a></li>
|
||||
<li><a href="${ctx}/cfg/multiple/auditCfg?serviceId=${bean.serviceId}&action=${bean.action}&compileId=${bean.compileId}&isAudit=2&cfgName=${cfgName}&mainTable=${mainTable}&mainTableType=${mainTableType}&mainTableDesc=${mainTableDesc}" onclick="return confirm('sure?', this.href)"><spring:message code="unapproved"></spring:message></a></li>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</c:if>
|
||||
|
||||
@@ -159,10 +159,10 @@
|
||||
$("#addBtn").attr("disabled", false);
|
||||
} else if ($(obj).val() == '3') {
|
||||
if ($(".table-list").length > 1) {
|
||||
alert('<spring:message code="special_service_message"/>');
|
||||
$(obj).val(v);
|
||||
//alert('<spring:message code="special_service_message"/>');
|
||||
//$(obj).val(v);
|
||||
} else if ($(".table-list").length == 1) {
|
||||
$("#addBtn").attr("disabled", true);
|
||||
//$("#addBtn").attr("disabled", true);
|
||||
} else if ($(".table-list").length == 0) {
|
||||
$("#addBtn").attr("disabled", false);
|
||||
}
|
||||
@@ -241,7 +241,7 @@
|
||||
'</div>'
|
||||
);
|
||||
$("[name=tableType]").selectpicker('refresh');
|
||||
if ($("#serviceType").val() == '1' || $("#serviceType").val() == '3') {
|
||||
if ($("#serviceType").val() == '1') {
|
||||
$("#addBtn").attr("disabled", true);
|
||||
}
|
||||
|
||||
|
||||
4
src/main/webapp/static/global/plugins/jquery-validation/1.14.0/jquery.validate.min.js
vendored
Normal file
4
src/main/webapp/static/global/plugins/jquery-validation/1.14.0/jquery.validate.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user