新增劫持文件、注入脚本文件、流量转发目的地菜单,完善文件劫持菜单。
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
package com.nis.domain.callback;
|
||||
|
||||
import com.nis.domain.configuration.BaseCfg;
|
||||
import com.nis.util.excel.ExcelField;
|
||||
|
||||
/**
|
||||
* http代理劫持文件
|
||||
* @author lenovo
|
||||
*
|
||||
*/
|
||||
public class ProxyFileHijackCfg extends BaseCfg<ProxyFileHijackCfg>{
|
||||
|
||||
private static final long serialVersionUID = -4600604393808056286L;
|
||||
public String indexTable = "pxy_profile_hijack_files";//对应表名
|
||||
@ExcelField(title="profile_name",sort=1)
|
||||
private String profileName;//名称,辅助记忆
|
||||
@ExcelField(title="content_type",sort=3)
|
||||
private String contentType;//填充HTTP content-type,如“video/mp4” (exe、apk)
|
||||
@ExcelField(title="path",sort=2)
|
||||
private String path;//储存路径
|
||||
@ExcelField(title="content_name",sort=3)
|
||||
private String contentName;//内容格式
|
||||
private int quote;//判断与其他菜单是否关联使用中
|
||||
|
||||
public String getContentName() {
|
||||
return contentName;
|
||||
}
|
||||
public void setContentName(String contentName) {
|
||||
this.contentName = contentName;
|
||||
}
|
||||
public int getQuote() {
|
||||
return quote;
|
||||
}
|
||||
public void setQuote(int quote) {
|
||||
this.quote = quote;
|
||||
}
|
||||
public String getIndexTable() {
|
||||
return indexTable;
|
||||
}
|
||||
public void setIndexTable(String indexTable) {
|
||||
this.indexTable = indexTable;
|
||||
}
|
||||
public String getProfileName() {
|
||||
return profileName;
|
||||
}
|
||||
public void setProfileName(String profileName) {
|
||||
this.profileName = profileName;
|
||||
}
|
||||
public String getContentType() {
|
||||
return contentType;
|
||||
}
|
||||
public void setContentType(String contentType) {
|
||||
this.contentType = contentType;
|
||||
}
|
||||
public String getPath() {
|
||||
return path;
|
||||
}
|
||||
public void setPath(String path) {
|
||||
this.path = path;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
package com.nis.domain.callback;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.google.gson.annotations.Expose;
|
||||
|
||||
public class ProxyFileHijackCfgAudit {
|
||||
|
||||
@Expose
|
||||
private Long id; //compileId
|
||||
@Expose
|
||||
private Integer cfgId; //compileId
|
||||
@Expose
|
||||
private Integer profileId;//compileId
|
||||
@Expose
|
||||
private Integer action;
|
||||
@Expose
|
||||
private Integer service;
|
||||
@Expose
|
||||
private Integer isValid;
|
||||
@Expose
|
||||
private Date opTime;
|
||||
@Expose
|
||||
private String profileName;
|
||||
@Expose
|
||||
private String contentType;
|
||||
@Expose
|
||||
private String path;
|
||||
@Expose
|
||||
private String contentName;
|
||||
|
||||
public String getContentName() {
|
||||
return contentName;
|
||||
}
|
||||
|
||||
public void setContentName(String contentName) {
|
||||
this.contentName = contentName;
|
||||
}
|
||||
|
||||
public String getPath() {
|
||||
return path;
|
||||
}
|
||||
|
||||
public void setPath(String path) {
|
||||
this.path = path;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public Integer getProfileId() {
|
||||
return profileId;
|
||||
}
|
||||
|
||||
public void setProfileId(Integer profileId) {
|
||||
this.profileId = profileId;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
public Integer getCfgId() {
|
||||
return cfgId;
|
||||
}
|
||||
public void setCfgId(Integer cfgId) {
|
||||
this.cfgId = cfgId;
|
||||
}
|
||||
public Integer getAction() {
|
||||
return action;
|
||||
}
|
||||
public void setAction(Integer action) {
|
||||
this.action = action;
|
||||
}
|
||||
public Integer getService() {
|
||||
return service;
|
||||
}
|
||||
public void setService(Integer service) {
|
||||
this.service = service;
|
||||
}
|
||||
public Integer getIsValid() {
|
||||
return isValid;
|
||||
}
|
||||
public void setIsValid(Integer isValid) {
|
||||
this.isValid = isValid;
|
||||
}
|
||||
public Date getOpTime() {
|
||||
return opTime;
|
||||
}
|
||||
public void setOpTime(Date opTime) {
|
||||
this.opTime = opTime;
|
||||
}
|
||||
public String getProfileName() {
|
||||
return profileName;
|
||||
}
|
||||
public void setProfileName(String profileName) {
|
||||
this.profileName = profileName;
|
||||
}
|
||||
public String getContentType() {
|
||||
return contentType;
|
||||
}
|
||||
public void setContentType(String contentType) {
|
||||
this.contentType = contentType;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.nis.domain.callback;
|
||||
|
||||
import com.nis.domain.configuration.BaseCfg;
|
||||
import com.nis.util.excel.ExcelField;
|
||||
|
||||
public class ProxyFileInsertScriptCfg extends BaseCfg<ProxyFileInsertScriptCfg>{
|
||||
|
||||
private static final long serialVersionUID = 4705202662940705064L;
|
||||
public String indexTable = "pxy_profile_insert_scripts";//对应表名
|
||||
@ExcelField(title="profile_name",sort=1)
|
||||
private String profileName;//名称,辅助记忆
|
||||
@ExcelField(title="format ",sort=3)
|
||||
private String format;//css/js
|
||||
@ExcelField(title="path",sort=2)
|
||||
private String path;//储存路径
|
||||
private int quote;//判断与其他菜单是否关联使用中
|
||||
|
||||
public int getQuote() {
|
||||
return quote;
|
||||
}
|
||||
public void setQuote(int quote) {
|
||||
this.quote = quote;
|
||||
}
|
||||
public String getIndexTable() {
|
||||
return indexTable;
|
||||
}
|
||||
public void setIndexTable(String indexTable) {
|
||||
this.indexTable = indexTable;
|
||||
}
|
||||
public String getProfileName() {
|
||||
return profileName;
|
||||
}
|
||||
public void setProfileName(String profileName) {
|
||||
this.profileName = profileName;
|
||||
}
|
||||
public String getFormat() {
|
||||
return format;
|
||||
}
|
||||
public void setFormat(String format) {
|
||||
this.format = format;
|
||||
}
|
||||
public String getPath() {
|
||||
return path;
|
||||
}
|
||||
public void setPath(String path) {
|
||||
this.path = path;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
package com.nis.domain.callback;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.google.gson.annotations.Expose;
|
||||
|
||||
public class ProxyFileInsertScriptCfgAudit {
|
||||
@Expose
|
||||
private Long id; //compileId
|
||||
@Expose
|
||||
private Integer cfgId; //compileId
|
||||
@Expose
|
||||
private Integer profileId;//compileId
|
||||
@Expose
|
||||
private Integer action;
|
||||
@Expose
|
||||
private Integer service;
|
||||
@Expose
|
||||
private Integer isValid;
|
||||
@Expose
|
||||
private Date opTime;
|
||||
@Expose
|
||||
private String profileName;
|
||||
@Expose
|
||||
private String format;
|
||||
@Expose
|
||||
private String path;
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
public Integer getCfgId() {
|
||||
return cfgId;
|
||||
}
|
||||
public void setCfgId(Integer cfgId) {
|
||||
this.cfgId = cfgId;
|
||||
}
|
||||
public Integer getProfileId() {
|
||||
return profileId;
|
||||
}
|
||||
public void setProfileId(Integer profileId) {
|
||||
this.profileId = profileId;
|
||||
}
|
||||
public Integer getAction() {
|
||||
return action;
|
||||
}
|
||||
public void setAction(Integer action) {
|
||||
this.action = action;
|
||||
}
|
||||
public Integer getService() {
|
||||
return service;
|
||||
}
|
||||
public void setService(Integer service) {
|
||||
this.service = service;
|
||||
}
|
||||
public Integer getIsValid() {
|
||||
return isValid;
|
||||
}
|
||||
public void setIsValid(Integer isValid) {
|
||||
this.isValid = isValid;
|
||||
}
|
||||
public Date getOpTime() {
|
||||
return opTime;
|
||||
}
|
||||
public void setOpTime(Date opTime) {
|
||||
this.opTime = opTime;
|
||||
}
|
||||
public String getProfileName() {
|
||||
return profileName;
|
||||
}
|
||||
public void setProfileName(String profileName) {
|
||||
this.profileName = profileName;
|
||||
}
|
||||
public String getFormat() {
|
||||
return format;
|
||||
}
|
||||
public void setFormat(String format) {
|
||||
this.format = format;
|
||||
}
|
||||
public String getPath() {
|
||||
return path;
|
||||
}
|
||||
public void setPath(String path) {
|
||||
this.path = path;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -9,12 +9,21 @@ import com.nis.domain.configuration.BaseCfg;
|
||||
public class ProxyFileStrategyCfg extends BaseCfg<ProxyFileStrategyCfg> {
|
||||
private static final long serialVersionUID = 4283944377949702481L;
|
||||
public final static String TABLE_NAME = "PROXY_FILE_STRATEGY_CFG";//对应表名
|
||||
private String indexTable = "proxy_file_strategy_cfg";
|
||||
private String fileDesc;//文件描述
|
||||
private String url;//文件保存的url
|
||||
private String contentType;//内容类型,如text/html,取字典表contentType
|
||||
private String md5;//文件md5值
|
||||
private Long contentLength;//文件长度
|
||||
|
||||
public String getIndexTable() {
|
||||
return indexTable;
|
||||
}
|
||||
|
||||
public void setIndexTable(String indexTable) {
|
||||
this.indexTable = indexTable;
|
||||
}
|
||||
|
||||
public ProxyFileStrategyCfg() {
|
||||
super();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
package com.nis.domain.callback;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.google.gson.annotations.Expose;
|
||||
|
||||
public class ProxyFileStrategyCfgAudit {
|
||||
@Expose
|
||||
private Long id; //compileId
|
||||
@Expose
|
||||
private Integer cfgId; //compileId
|
||||
@Expose
|
||||
private Integer action;
|
||||
@Expose
|
||||
private Integer service;
|
||||
@Expose
|
||||
private Integer isValid;
|
||||
@Expose
|
||||
private Date opTime;
|
||||
@Expose
|
||||
private String contentType;
|
||||
@Expose
|
||||
private Long contentLength;
|
||||
@Expose
|
||||
private String filePath;
|
||||
@Expose
|
||||
private Long fileId;
|
||||
@Expose
|
||||
private String fileDesc;
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
public Integer getCfgId() {
|
||||
return cfgId;
|
||||
}
|
||||
public void setCfgId(Integer cfgId) {
|
||||
this.cfgId = cfgId;
|
||||
}
|
||||
public Integer getAction() {
|
||||
return action;
|
||||
}
|
||||
public void setAction(Integer action) {
|
||||
this.action = action;
|
||||
}
|
||||
public Integer getService() {
|
||||
return service;
|
||||
}
|
||||
public void setService(Integer service) {
|
||||
this.service = service;
|
||||
}
|
||||
public Integer getIsValid() {
|
||||
return isValid;
|
||||
}
|
||||
public void setIsValid(Integer isValid) {
|
||||
this.isValid = isValid;
|
||||
}
|
||||
public Date getOpTime() {
|
||||
return opTime;
|
||||
}
|
||||
public void setOpTime(Date opTime) {
|
||||
this.opTime = opTime;
|
||||
}
|
||||
public String getContentType() {
|
||||
return contentType;
|
||||
}
|
||||
public void setContentType(String contentType) {
|
||||
this.contentType = contentType;
|
||||
}
|
||||
public Long getContentLength() {
|
||||
return contentLength;
|
||||
}
|
||||
public void setContentLength(Long contentLength) {
|
||||
this.contentLength = contentLength;
|
||||
}
|
||||
public String getFilePath() {
|
||||
return filePath;
|
||||
}
|
||||
public void setFilePath(String filePath) {
|
||||
this.filePath = filePath;
|
||||
}
|
||||
public Long getFileId() {
|
||||
return fileId;
|
||||
}
|
||||
public void setFileId(Long fileId) {
|
||||
this.fileId = fileId;
|
||||
}
|
||||
public String getFileDesc() {
|
||||
return fileDesc;
|
||||
}
|
||||
public void setFileDesc(String fileDesc) {
|
||||
this.fileDesc = fileDesc;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package com.nis.domain.callback;
|
||||
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import com.nis.domain.configuration.BaseCfg;
|
||||
import com.nis.util.excel.ExcelField;
|
||||
|
||||
import antlr.collections.List;
|
||||
|
||||
public class ProxyFileTrafficMirrorCfg extends BaseCfg<ProxyFileTrafficMirrorCfg>{
|
||||
|
||||
private static final long serialVersionUID = -5895958073449509268L;
|
||||
public String indexTable = "pxy_profile_traffic_mirror";//对应表名
|
||||
@ExcelField(title="profile_name",sort=1)
|
||||
private String profileName;//名称,辅助记忆
|
||||
@ExcelField(title="addr_list",sort=2)
|
||||
private String addrList;//目标表示列表
|
||||
@ExcelField(title="addr_type",sort=3)
|
||||
private String addrType;//目标表示类型
|
||||
|
||||
public String getAddrList() {
|
||||
return addrList;
|
||||
}
|
||||
public void setAddrList(String addrList) {
|
||||
this.addrList = addrList;
|
||||
}
|
||||
public String getIndexTable() {
|
||||
return indexTable;
|
||||
}
|
||||
public void setIndexTable(String indexTable) {
|
||||
this.indexTable = indexTable;
|
||||
}
|
||||
public String getProfileName() {
|
||||
return profileName;
|
||||
}
|
||||
public void setProfileName(String profileName) {
|
||||
this.profileName = profileName;
|
||||
}
|
||||
public String getAddrType() {
|
||||
return addrType;
|
||||
}
|
||||
public void setAddrType(String addrType) {
|
||||
this.addrType = addrType;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
package com.nis.domain.callback;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.google.gson.annotations.Expose;
|
||||
|
||||
public class ProxyFileTrafficMirrorCfgAudit {
|
||||
@Expose
|
||||
private Long id; //compileId
|
||||
@Expose
|
||||
private Integer cfgId; //compileId
|
||||
@Expose
|
||||
private Integer profileId;//compileId
|
||||
@Expose
|
||||
private Integer action;
|
||||
@Expose
|
||||
private Integer service;
|
||||
@Expose
|
||||
private Integer isValid;
|
||||
@Expose
|
||||
private Date opTime;
|
||||
@Expose
|
||||
private String profileName;
|
||||
@Expose
|
||||
private List<String> addrList;
|
||||
@Expose
|
||||
private String addrType;
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
public Integer getCfgId() {
|
||||
return cfgId;
|
||||
}
|
||||
public void setCfgId(Integer cfgId) {
|
||||
this.cfgId = cfgId;
|
||||
}
|
||||
public Integer getProfileId() {
|
||||
return profileId;
|
||||
}
|
||||
public void setProfileId(Integer profileId) {
|
||||
this.profileId = profileId;
|
||||
}
|
||||
public Integer getAction() {
|
||||
return action;
|
||||
}
|
||||
public void setAction(Integer action) {
|
||||
this.action = action;
|
||||
}
|
||||
public Integer getService() {
|
||||
return service;
|
||||
}
|
||||
public void setService(Integer service) {
|
||||
this.service = service;
|
||||
}
|
||||
public Integer getIsValid() {
|
||||
return isValid;
|
||||
}
|
||||
public void setIsValid(Integer isValid) {
|
||||
this.isValid = isValid;
|
||||
}
|
||||
public Date getOpTime() {
|
||||
return opTime;
|
||||
}
|
||||
public void setOpTime(Date opTime) {
|
||||
this.opTime = opTime;
|
||||
}
|
||||
public String getProfileName() {
|
||||
return profileName;
|
||||
}
|
||||
public void setProfileName(String profileName) {
|
||||
this.profileName = profileName;
|
||||
}
|
||||
public String getAddrType() {
|
||||
return addrType;
|
||||
}
|
||||
public void setAddrType(String addrType) {
|
||||
this.addrType = addrType;
|
||||
}
|
||||
public List<String> getAddrList() {
|
||||
return addrList;
|
||||
}
|
||||
public void setAddrList(List<String> addrList) {
|
||||
this.addrList = addrList;
|
||||
}
|
||||
}
|
||||
@@ -19,8 +19,10 @@ import java.util.concurrent.ExecutionException;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.Future;
|
||||
import java.util.function.Predicate;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
@@ -48,6 +50,10 @@ import com.nis.domain.basics.AsnGroupInfo;
|
||||
import com.nis.domain.basics.AsnIpCfg;
|
||||
import com.nis.domain.basics.ServiceDictInfo;
|
||||
import com.nis.domain.basics.SysDictInfo;
|
||||
import com.nis.domain.callback.ProxyFileHijackCfg;
|
||||
import com.nis.domain.callback.ProxyFileInsertScriptCfg;
|
||||
import com.nis.domain.callback.ProxyFileStrategyCfg;
|
||||
import com.nis.domain.callback.ProxyFileTrafficMirrorCfg;
|
||||
import com.nis.domain.configuration.AppComplexFeatureCfg;
|
||||
import com.nis.domain.configuration.AppDomainCfg;
|
||||
import com.nis.domain.configuration.AppFeatureIndex;
|
||||
@@ -183,7 +189,10 @@ import com.nis.web.service.configuration.IpCfgService;
|
||||
import com.nis.web.service.configuration.IpMultiplexPoolCfgService;
|
||||
import com.nis.web.service.configuration.MailCfgService;
|
||||
import com.nis.web.service.configuration.NumCfgService;
|
||||
import com.nis.web.service.configuration.ProxyFileHijackService;
|
||||
import com.nis.web.service.configuration.ProxyFileInsertScriptService;
|
||||
import com.nis.web.service.configuration.ProxyFileStrategyService;
|
||||
import com.nis.web.service.configuration.ProxyFileTrafficMirrorService;
|
||||
import com.nis.web.service.configuration.PxyObjKeyringService;
|
||||
import com.nis.web.service.configuration.PxyObjSpoofingIpPoolService;
|
||||
import com.nis.web.service.configuration.RequestInfoService;
|
||||
@@ -299,6 +308,12 @@ public class BaseController {
|
||||
@Autowired
|
||||
protected PxyObjKeyringService pxyObjKeyringService;// 拦截策略service
|
||||
@Autowired
|
||||
protected ProxyFileHijackService proxyFileHijackService;// 劫持文件service
|
||||
@Autowired
|
||||
protected ProxyFileInsertScriptService proxyFileInsertScriptService;//注入脚本文件service
|
||||
@Autowired
|
||||
protected ProxyFileTrafficMirrorService proxyFileTrafficMirrorService;//注入流量镜像文件ervice
|
||||
@Autowired
|
||||
protected AppBuiltInFeatureService appBuiltInFeatureService;// 拦截策略service
|
||||
@Autowired
|
||||
protected AsnIpCfgService asnIpCfgService;// asn ip service
|
||||
@@ -2667,6 +2682,10 @@ public class BaseController {
|
||||
AppFeatureIndex searchAppFeatureIndex=new AppFeatureIndex();
|
||||
AppSslCertCfg searchAppSslCertCfg=new AppSslCertCfg();
|
||||
AsnIpCfg searchAsnIpCfg=new AsnIpCfg();
|
||||
ProxyFileHijackCfg searFileHijackCfg = new ProxyFileHijackCfg();
|
||||
ProxyFileInsertScriptCfg searFileInsertScriptCfg = new ProxyFileInsertScriptCfg();
|
||||
ProxyFileTrafficMirrorCfg searFileTrafficMirrorCfg = new ProxyFileTrafficMirrorCfg();
|
||||
ProxyFileStrategyCfg searFileStrategyCfg = new ProxyFileStrategyCfg();
|
||||
if(entity != null && (entity instanceof CfgIndexInfo)) {
|
||||
BeanUtils.copyProperties(entity, auditBatchCfg);
|
||||
BeanUtils.copyProperties(entity, searchCfg);
|
||||
@@ -2743,8 +2762,21 @@ public class BaseController {
|
||||
if(entity != null && (entity instanceof AsnIpCfg)) {
|
||||
BeanUtils.copyProperties(entity, auditBatchCfg);
|
||||
BeanUtils.copyProperties(entity, searchAsnIpCfg);
|
||||
}if(entity != null && (entity instanceof ProxyFileHijackCfg)){
|
||||
BeanUtils.copyProperties(entity, auditBatchCfg);
|
||||
BeanUtils.copyProperties(entity, searFileHijackCfg);
|
||||
}if(entity != null && (entity instanceof ProxyFileInsertScriptCfg)){
|
||||
BeanUtils.copyProperties(entity, auditBatchCfg);
|
||||
BeanUtils.copyProperties(entity, searFileInsertScriptCfg);
|
||||
}if(entity != null && (entity instanceof ProxyFileTrafficMirrorCfg)){
|
||||
BeanUtils.copyProperties(entity, auditBatchCfg);
|
||||
BeanUtils.copyProperties(entity, searFileTrafficMirrorCfg);
|
||||
}if(entity != null && (entity instanceof ProxyFileStrategyCfg)){
|
||||
BeanUtils.copyProperties(entity, auditBatchCfg);
|
||||
BeanUtils.copyProperties(entity, searFileStrategyCfg);
|
||||
}
|
||||
|
||||
|
||||
auditType = (Integer)Reflections.invokeGetter(entity, "isAudit");
|
||||
|
||||
//全部审核通过,只查询当前条件下的所有未审核的配置 -批量审核通过/不通过
|
||||
@@ -2815,6 +2847,14 @@ public class BaseController {
|
||||
searchAppFeatureIndex.setTableName(tableNameXml);
|
||||
searchAppSslCertCfg.setServiceId(Integer.valueOf(serviceIdXml));
|
||||
searchAppSslCertCfg.setTableName(tableNameXml);
|
||||
searFileHijackCfg.setServiceId(Integer.valueOf(serviceIdXml));
|
||||
searFileHijackCfg.setTableName(tableNameXml);
|
||||
searFileInsertScriptCfg.setServiceId(Integer.valueOf(serviceIdXml));
|
||||
searFileInsertScriptCfg.setTableName(tableNameXml);
|
||||
searFileTrafficMirrorCfg.setServiceId(Integer.valueOf(serviceIdXml));
|
||||
searFileTrafficMirrorCfg.setTableName(tableNameXml);
|
||||
searFileStrategyCfg.setServiceId(Integer.valueOf(serviceIdXml));
|
||||
searFileStrategyCfg.setTableName(tableNameXml);
|
||||
|
||||
if("1".equals(serviceTypeXml)){//maat类配置
|
||||
// 存放域配置类型 及 对应表名
|
||||
@@ -3210,7 +3250,11 @@ public class BaseController {
|
||||
, searchDnsResStrategy
|
||||
, searchDnsIpCfg
|
||||
, searchIpPortCfg
|
||||
, searchSignSampleCfg);
|
||||
, searchSignSampleCfg
|
||||
, searFileHijackCfg
|
||||
, searFileInsertScriptCfg
|
||||
, searFileTrafficMirrorCfg
|
||||
, searFileStrategyCfg);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3290,6 +3334,10 @@ public class BaseController {
|
||||
PxyObjKeyring searchObjKeyringCfg=new PxyObjKeyring();
|
||||
PxyObjTrustedCaCert searchTrustedCaCertCfg=new PxyObjTrustedCaCert();
|
||||
AsnIpCfg searchAsnIpCfg=new AsnIpCfg();
|
||||
ProxyFileHijackCfg searchFileHijackCfg = new ProxyFileHijackCfg();
|
||||
ProxyFileInsertScriptCfg searchFileInsertScriptCfg = new ProxyFileInsertScriptCfg();
|
||||
ProxyFileTrafficMirrorCfg searchFileTrafficMirrorCfg = new ProxyFileTrafficMirrorCfg();
|
||||
ProxyFileStrategyCfg searchFileStrategyCfg = new ProxyFileStrategyCfg();
|
||||
|
||||
// 传递检索条件
|
||||
if(entity != null && (entity instanceof CfgIndexInfo)) {
|
||||
@@ -3360,6 +3408,19 @@ public class BaseController {
|
||||
BeanUtils.copyProperties(entity, searchAsnIpCfg);
|
||||
searchAsnIpCfg.setFunctionId(functionId);
|
||||
}
|
||||
if(entity != null && (entity instanceof ProxyFileHijackCfg)){
|
||||
BeanUtils.copyProperties(entity, searchFileHijackCfg);
|
||||
searchFileHijackCfg.setFunctionId(functionId);
|
||||
}if(entity != null && (entity instanceof ProxyFileInsertScriptCfg)){
|
||||
BeanUtils.copyProperties(entity, searchFileInsertScriptCfg);
|
||||
searchFileInsertScriptCfg.setFunctionId(functionId);
|
||||
}if(entity != null && (entity instanceof ProxyFileTrafficMirrorCfg)){
|
||||
BeanUtils.copyProperties(entity, searchFileTrafficMirrorCfg);
|
||||
searchFileTrafficMirrorCfg.setFunctionId(functionId);
|
||||
}if(entity != null && (entity instanceof ProxyFileStrategyCfg)){
|
||||
BeanUtils.copyProperties(entity, searchFileStrategyCfg);
|
||||
searchFileStrategyCfg.setFunctionId(functionId);
|
||||
}
|
||||
|
||||
BaseCfg batchCfg = new BaseCfg();
|
||||
batchCfg.setIsValid(-1);
|
||||
@@ -3569,6 +3630,71 @@ public class BaseController {
|
||||
}
|
||||
}
|
||||
|
||||
}else if("pxy_profile_hijack_files".equals(tableNameXml)) {
|
||||
boolean hasData = true;
|
||||
while(hasData){
|
||||
page.setPageNo(1);
|
||||
page.setLastPage(false);
|
||||
List list = proxyFileHijackService.findPage(page, searchFileHijackCfg).getList();
|
||||
List<BaseCfg> result = new ArrayList();
|
||||
for(int i=0;i<list.size();i++){
|
||||
ProxyFileHijackCfg temp=(ProxyFileHijackCfg)list.get(i);
|
||||
if(temp.getQuote() == -1 || temp.getQuote() ==0){
|
||||
result.add(temp);
|
||||
}
|
||||
}
|
||||
if(!StringUtil.isEmpty(list)){
|
||||
hasData = commonPolicyService.batchDeleteMaatData(cfgList, page, batchCfg, result, hasData);
|
||||
}else{
|
||||
hasData = false;
|
||||
}
|
||||
}
|
||||
}else if("pxy_profile_insert_scripts".equals(tableNameXml)) {
|
||||
boolean hasData = true;
|
||||
while(hasData){
|
||||
page.setPageNo(1);
|
||||
page.setLastPage(false);
|
||||
List list = proxyFileInsertScriptService.findPage(page,searchFileInsertScriptCfg).getList();
|
||||
List<BaseCfg> result = new ArrayList();
|
||||
for(int i=0;i<list.size();i++){
|
||||
ProxyFileInsertScriptCfg temp=(ProxyFileInsertScriptCfg)list.get(i);
|
||||
if(temp.getQuote() == -1 || temp.getQuote() ==0){
|
||||
result.add(temp);
|
||||
}
|
||||
}
|
||||
if(!StringUtil.isEmpty(list)){
|
||||
hasData = commonPolicyService.batchDeleteMaatData(cfgList, page, batchCfg, result, hasData);
|
||||
}else{
|
||||
hasData = false;
|
||||
}
|
||||
}
|
||||
|
||||
}else if("pxy_profile_traffic_mirror".equals(tableNameXml)) {
|
||||
boolean hasData = true;
|
||||
while(hasData){
|
||||
page.setPageNo(1);
|
||||
page.setLastPage(false);
|
||||
List list = proxyFileTrafficMirrorService.findPage(page,searchFileTrafficMirrorCfg).getList();
|
||||
if(!StringUtil.isEmpty(list)){
|
||||
hasData = commonPolicyService.batchDeleteMaatData(cfgList, page, batchCfg, list, hasData);
|
||||
}else{
|
||||
hasData = false;
|
||||
}
|
||||
}
|
||||
|
||||
}else if("proxy_file_strategy_cfg".equals(tableNameXml)) {
|
||||
boolean hasData = true;
|
||||
while(hasData){
|
||||
page.setPageNo(1);
|
||||
page.setLastPage(false);
|
||||
List list = proxyFileStrategyService.findPage(page,searchFileStrategyCfg).getList();
|
||||
if(!StringUtil.isEmpty(list)){
|
||||
hasData = commonPolicyService.batchDeleteMaatData(cfgList, page, batchCfg, list, hasData);
|
||||
}else{
|
||||
hasData = false;
|
||||
}
|
||||
}
|
||||
|
||||
}else {
|
||||
boolean hasData = true;
|
||||
while(hasData){
|
||||
@@ -3703,7 +3829,11 @@ public class BaseController {
|
||||
,DnsResStrategy searchDnsResStrategy
|
||||
,DnsIpCfg searchDnsIpCfg
|
||||
,IpPortCfg searchIpPortCfg
|
||||
,AvSignSampleCfg searchSignSampleCfg) {
|
||||
,AvSignSampleCfg searchSignSampleCfg
|
||||
,ProxyFileHijackCfg searFileHijackCfg
|
||||
,ProxyFileInsertScriptCfg searFileInsertScriptCfg
|
||||
,ProxyFileTrafficMirrorCfg searFileTrafficMirrorCfg
|
||||
,ProxyFileStrategyCfg searFileStrategyCfg) {
|
||||
ToMaatBean maatBean;
|
||||
MaatCfg maatCfg;
|
||||
List<MaatCfg> configCompileList;
|
||||
@@ -3792,6 +3922,82 @@ public class BaseController {
|
||||
notAuditList.add(cfg);
|
||||
}
|
||||
}
|
||||
}else if(className.equals("ProxyFileTrafficMirrorCfg")){
|
||||
list = proxyFileTrafficMirrorService.findPage(page, searFileTrafficMirrorCfg).getList();
|
||||
for(int i=0;i<list.size();i++){
|
||||
ProxyFileTrafficMirrorCfg cfg = (ProxyFileTrafficMirrorCfg) list.get(i);
|
||||
ids.add(cfg.getCompileId());
|
||||
if(cfg.getIsValid()==1) {
|
||||
cfg.setIsValid(entity.getIsValid());
|
||||
cfg.setIsAudit(entity.getIsAudit());
|
||||
cfg.setAuditTime(entity.getAuditTime());
|
||||
cfg.setAuditorId(entity.getAuditorId());
|
||||
auditList.add(cfg);
|
||||
}else {
|
||||
cfg.setIsValid(entity.getIsValid());
|
||||
cfg.setIsAudit(entity.getIsAudit());
|
||||
cfg.setAuditTime(entity.getAuditTime());
|
||||
cfg.setAuditorId(entity.getAuditorId());
|
||||
notAuditList.add(cfg);
|
||||
}
|
||||
}
|
||||
}else if(className.equals("ProxyFileStrategyCfg")){
|
||||
list = proxyFileStrategyService.findPage(page, searFileStrategyCfg).getList();
|
||||
for(int i=0;i<list.size();i++){
|
||||
ProxyFileStrategyCfg cfg = (ProxyFileStrategyCfg) list.get(i);
|
||||
ids.add(cfg.getCompileId());
|
||||
if(cfg.getIsValid()==1) {
|
||||
cfg.setIsValid(entity.getIsValid());
|
||||
cfg.setIsAudit(entity.getIsAudit());
|
||||
cfg.setAuditTime(entity.getAuditTime());
|
||||
cfg.setAuditorId(entity.getAuditorId());
|
||||
auditList.add(cfg);
|
||||
}else {
|
||||
cfg.setIsValid(entity.getIsValid());
|
||||
cfg.setIsAudit(entity.getIsAudit());
|
||||
cfg.setAuditTime(entity.getAuditTime());
|
||||
cfg.setAuditorId(entity.getAuditorId());
|
||||
notAuditList.add(cfg);
|
||||
}
|
||||
}
|
||||
}else if(className.equals("ProxyFileHijackCfg")){
|
||||
list = proxyFileHijackService.findPage(page, searFileHijackCfg).getList();
|
||||
for(int i=0;i<list.size();i++){
|
||||
ProxyFileHijackCfg cfg = (ProxyFileHijackCfg) list.get(i);
|
||||
ids.add(cfg.getCompileId());
|
||||
if(cfg.getIsValid()==1) {
|
||||
cfg.setIsValid(entity.getIsValid());
|
||||
cfg.setIsAudit(entity.getIsAudit());
|
||||
cfg.setAuditTime(entity.getAuditTime());
|
||||
cfg.setAuditorId(entity.getAuditorId());
|
||||
auditList.add(cfg);
|
||||
}else {
|
||||
cfg.setIsValid(entity.getIsValid());
|
||||
cfg.setIsAudit(entity.getIsAudit());
|
||||
cfg.setAuditTime(entity.getAuditTime());
|
||||
cfg.setAuditorId(entity.getAuditorId());
|
||||
notAuditList.add(cfg);
|
||||
}
|
||||
}
|
||||
}else if(className.equals("ProxyFileInsertScriptCfg")){
|
||||
list = proxyFileInsertScriptService.findPage(page, searFileInsertScriptCfg).getList();
|
||||
for(int i=0;i<list.size();i++){
|
||||
ProxyFileInsertScriptCfg cfg = (ProxyFileInsertScriptCfg) list.get(i);
|
||||
ids.add(cfg.getCompileId());
|
||||
if(cfg.getIsValid()==1) {
|
||||
cfg.setIsValid(entity.getIsValid());
|
||||
cfg.setIsAudit(entity.getIsAudit());
|
||||
cfg.setAuditTime(entity.getAuditTime());
|
||||
cfg.setAuditorId(entity.getAuditorId());
|
||||
auditList.add(cfg);
|
||||
}else {
|
||||
cfg.setIsValid(entity.getIsValid());
|
||||
cfg.setIsAudit(entity.getIsAudit());
|
||||
cfg.setAuditTime(entity.getAuditTime());
|
||||
cfg.setAuditorId(entity.getAuditorId());
|
||||
notAuditList.add(cfg);
|
||||
}
|
||||
}
|
||||
}else if(className.equals("PxyObjKeyring")){
|
||||
list = pxyObjKeyringService.findPage(page, searchObjKeyringCfg).getList();
|
||||
for(int i=0;i<list.size();i++){
|
||||
|
||||
@@ -0,0 +1,255 @@
|
||||
package com.nis.web.controller.configuration.proxy;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.apache.commons.beanutils.BeanUtils;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.callback.ProxyFileHijackCfg;
|
||||
import com.nis.domain.configuration.IpPortCfg;
|
||||
import com.nis.domain.maat.ToMaatResult;
|
||||
import com.nis.domain.maat.ToMaatResult.ResponseData;
|
||||
import com.nis.exceptions.MaatConvertException;
|
||||
import com.nis.util.ConfigServiceUtil;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.FileUtils;
|
||||
import com.nis.util.JsonMapper;
|
||||
import com.nis.util.LogUtils;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.web.controller.configuration.CommonController;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("${adminPath}/proxy/fileHijack")
|
||||
public class FileHijackController extends CommonController{
|
||||
|
||||
@RequestMapping(value = {"list"})
|
||||
public String fileHijackList(ProxyFileHijackCfg cfg,Model model,HttpServletRequest request,HttpServletResponse response) {
|
||||
Page<ProxyFileHijackCfg> page = proxyFileHijackService.findPage(new Page<ProxyFileHijackCfg>(request, response,"a"), cfg);
|
||||
model.addAttribute("page", page);
|
||||
model.addAttribute("cfg", cfg);
|
||||
initPageCondition(model);
|
||||
return "/cfg/proxy/fileHijack/list";
|
||||
}
|
||||
|
||||
@RequestMapping(value = {"form"})
|
||||
@RequiresPermissions(value={"proxy:fileHijack:config"})
|
||||
public String fileform(Model model,HttpServletRequest request
|
||||
,HttpServletResponse response
|
||||
,@ModelAttribute("cfg")ProxyFileHijackCfg cfg
|
||||
,String ids
|
||||
,RedirectAttributes redirectAttributes) {
|
||||
if(!StringUtil.isEmpty(ids)){
|
||||
cfg = proxyFileHijackService.getCfgById(Long.valueOf(ids));
|
||||
}
|
||||
//初始化各字典
|
||||
initFormCondition(model, cfg);
|
||||
model.addAttribute("_cfg", cfg);
|
||||
return "/cfg/proxy/fileHijack/form";
|
||||
}
|
||||
|
||||
@RequiresPermissions(value={"proxy:fileHijack:config"})
|
||||
@RequestMapping(value = {"saveOrUpdate"})
|
||||
public String saveOrUpdate(Model model,HttpServletRequest request
|
||||
,HttpServletResponse response,MultipartFile cfgFile,
|
||||
@ModelAttribute("cfg")ProxyFileHijackCfg cfg,
|
||||
RedirectAttributes redirectAttributes){
|
||||
File file = null;
|
||||
try{
|
||||
if(cfgFile != null) {
|
||||
String filename = cfgFile.getOriginalFilename();
|
||||
String prefix = FileUtils.getPrefix(filename, false);
|
||||
String suffix = FileUtils.getSuffix(filename, false);
|
||||
file = File.createTempFile("file_" + prefix, suffix);
|
||||
cfgFile.transferTo(file);// 复制文件
|
||||
String md5 = FileUtils.getFileMD5(file);
|
||||
Map<String, Object> srcMap = Maps.newHashMap();
|
||||
srcMap.put("filetype", suffix);
|
||||
srcMap.put("datatype", "dbSystem");// 源文件存入数据中心
|
||||
srcMap.put("createTime", new Date());
|
||||
srcMap.put("key", prefix);
|
||||
srcMap.put("fileName", filename);
|
||||
srcMap.put("checksum", md5);
|
||||
ToMaatResult result = ConfigServiceUtil.postFileCfg(null, file, JsonMapper.toJsonString(srcMap));
|
||||
logger.info("proxy 劫持文件 上传响应信息:" + JsonMapper.toJsonString(result));
|
||||
String path = null;
|
||||
if (!StringUtil.isEmpty(result)) {
|
||||
ResponseData data = result.getData();
|
||||
path = data.getAccessUrl();
|
||||
cfg.setPath(path);
|
||||
}
|
||||
}
|
||||
proxyFileHijackService.saveOrUpdate(cfg);
|
||||
//配置仅保存
|
||||
if(StringUtil.isEmpty(cfg.getIsValid()) || cfg.getIsValid()!=1) {
|
||||
addMessage(redirectAttributes, "success", "save_success");
|
||||
}else {
|
||||
//配置直接生效
|
||||
addMessage(redirectAttributes, "success", "audit_success");
|
||||
}
|
||||
}catch(Exception e){
|
||||
logger.error("信息保存失败",e);
|
||||
if(e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes,"error","request_service_failed");
|
||||
LogUtils.saveLog(request, null, e, null);
|
||||
}else {
|
||||
addMessage(redirectAttributes,"error","save_failed");
|
||||
LogUtils.saveLog(request, null, e, null);
|
||||
}
|
||||
}finally {
|
||||
if(file != null) {
|
||||
file.delete();//删除临时文件
|
||||
}
|
||||
}
|
||||
return "redirect:" + adminPath +"/proxy/fileHijack/list?functionId="+cfg.getFunctionId();
|
||||
}
|
||||
|
||||
@RequestMapping(value = {"delete"})
|
||||
@RequiresPermissions(value={"proxy:fileStrategy:config"})
|
||||
public String delete(Integer isAudit, Integer isValid, String ids, Integer functionId, Model model, @ModelAttribute("cfg")ProxyFileHijackCfg cfg,
|
||||
HttpServletRequest request, HttpServletResponse response, RedirectAttributes redirectAttributes){
|
||||
try {
|
||||
if (!StringUtil.isEmpty(ids)) {
|
||||
proxyFileHijackService.update(isAudit, isValid, ids, functionId);
|
||||
addMessage(redirectAttributes, "success", "delete_success");
|
||||
}else {
|
||||
// 批量删除
|
||||
Page<ProxyFileHijackCfg> searchPage = new Page<ProxyFileHijackCfg>(request, response, "a");
|
||||
deleteAll(searchPage, functionId, cfg);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("配置删除失败:", e);
|
||||
if (e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||
LogUtils.saveLog(request, null, e, null);
|
||||
} else {
|
||||
addMessage(redirectAttributes, "error", "delete_failed");
|
||||
LogUtils.saveLog(request, null, e, null);
|
||||
}
|
||||
|
||||
}
|
||||
return "redirect:" + adminPath +"/proxy/fileHijack/list?functionId="+functionId;
|
||||
}
|
||||
|
||||
@RequestMapping(value = {"audit"})
|
||||
@RequiresPermissions(value={"proxy:fileHijack:confirm"})
|
||||
public String audit(Model model, @ModelAttribute("cfg") ProxyFileHijackCfg cfg, Integer isValid, Integer isAudit,
|
||||
String ids, Integer functionId, RedirectAttributes redirectAttributes, HttpServletResponse response,
|
||||
HttpServletRequest request) {
|
||||
if (!StringUtil.isEmpty(ids)) {
|
||||
String[] idArray = ids.split(",");
|
||||
for (String id : idArray) {
|
||||
try {
|
||||
proxyFileHijackService.audit(isAudit, isValid, functionId, id);
|
||||
addMessage(redirectAttributes, "success", "audit_success");
|
||||
} catch (MaatConvertException e) {
|
||||
logger.error(e);
|
||||
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||
LogUtils.saveLog(request, null, e, null);
|
||||
} catch (Exception e) {
|
||||
logger.error(e);
|
||||
addMessage(redirectAttributes, "error", "audit_failed");
|
||||
LogUtils.saveLog(request, null, e, null);
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
Page<ProxyFileHijackCfg> searchPage = new Page<ProxyFileHijackCfg>(request, response, "a");
|
||||
Page<ProxyFileHijackCfg> auditPage = new Page<ProxyFileHijackCfg>(request, response, "a");
|
||||
|
||||
try {
|
||||
BeanUtils.copyProperties(searchPage, auditPage);
|
||||
auditAll(auditPage, isValid, cfg);
|
||||
addMessage(redirectAttributes, "success", "audit_success");
|
||||
} catch (Exception e) {
|
||||
logger.error("配置下发失败:", e);
|
||||
if (e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||
LogUtils.saveLog(request, null, e, null);
|
||||
} else {
|
||||
addMessage(redirectAttributes, "error", "audit_failed");
|
||||
LogUtils.saveLog(request, null, e, null);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return fileHijackList(cfg, model, request, response);
|
||||
}
|
||||
|
||||
return "redirect:" + adminPath +"/proxy/fileHijack/list?functionId="+functionId;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "exportFileHijack")
|
||||
public void exportPxy(Model model, HttpServletRequest request, HttpServletResponse response,
|
||||
@ModelAttribute("cfg") ProxyFileHijackCfg entity, String ids, RedirectAttributes redirectAttributes) {
|
||||
try {
|
||||
// export data info
|
||||
List<String> titleList = new ArrayList<String>();
|
||||
Map<String, Class<?>> classMap = new HashMap<String, Class<?>>();
|
||||
Map<String, List> dataMap = new HashMap<String, List>();
|
||||
Map<String, String> noExportMap = new HashMap<String, String>();
|
||||
|
||||
List<ProxyFileHijackCfg> ipLists = new ArrayList<ProxyFileHijackCfg>();
|
||||
// 导出选中记录
|
||||
if (!StringUtil.isEmpty(ids)) {
|
||||
ipLists = proxyFileHijackService.findByList(ids);
|
||||
} else {
|
||||
entity.setTableName(IpPortCfg.getTablename());
|
||||
Page<ProxyFileHijackCfg> pageInfo = new Page<ProxyFileHijackCfg>(request, response, "a");
|
||||
pageInfo.setPageNo(1);
|
||||
pageInfo.setPageSize(Constants.MAX_EXPORT_SIZE);
|
||||
Page<ProxyFileHijackCfg> page = proxyFileHijackService.findPage(pageInfo, entity);
|
||||
ipLists = page.getList();
|
||||
}
|
||||
for (int i = 0; i < ipLists.size(); i++) {
|
||||
ipLists.get(i).setProfileName(ipLists.get(i).getCfgDesc());
|
||||
}
|
||||
titleList.add(entity.getMenuNameCode());
|
||||
classMap.put(entity.getMenuNameCode(), ProxyFileHijackCfg.class);
|
||||
String cfgIndexInfoNoExport = ",config_describe,whether_area_block,block_type,do_log,client_port,ir_type,group_name,userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
|
||||
// 时间过滤
|
||||
if (entity.getSearch_create_time_start() == null && entity.getSearch_create_time_end() == null) {
|
||||
cfgIndexInfoNoExport = ",config_time" + cfgIndexInfoNoExport;
|
||||
}
|
||||
if (entity.getSearch_edit_time_start() == null && entity.getSearch_edit_time_end() == null) {
|
||||
cfgIndexInfoNoExport = ",edit_time" + cfgIndexInfoNoExport;
|
||||
}
|
||||
if (entity.getSearch_audit_time_start() == null && entity.getSearch_audit_time_end() == null) {
|
||||
cfgIndexInfoNoExport = ",audit_time" + cfgIndexInfoNoExport;
|
||||
}
|
||||
if (!StringUtil.isEmpty(entity.gethColumns())) {
|
||||
cfgIndexInfoNoExport = "," + entity.gethColumns() + "," + cfgIndexInfoNoExport;
|
||||
}
|
||||
|
||||
noExportMap.put(entity.getMenuNameCode(), cfgIndexInfoNoExport);
|
||||
dataMap.put(entity.getMenuNameCode(), ipLists);
|
||||
|
||||
String timeRange = initTimeMap(entity);
|
||||
noExportMap.put("timeRange", timeRange);
|
||||
if ("csv".equals(entity.getExType())) {
|
||||
this._exportCsv(model, request, response, redirectAttributes, entity.getMenuNameCode(), titleList,
|
||||
classMap, dataMap, noExportMap);
|
||||
} else {
|
||||
this._export(model, request, response, redirectAttributes, entity.getMenuNameCode(), titleList,
|
||||
classMap, dataMap, noExportMap);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("proxyFileHijack export failed", e);
|
||||
addMessage(redirectAttributes, "error", "export_failed");
|
||||
LogUtils.saveLog(request, null, e, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,248 @@
|
||||
package com.nis.web.controller.configuration.proxy;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.apache.commons.beanutils.BeanUtils;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.callback.ProxyFileHijackCfg;
|
||||
import com.nis.domain.callback.ProxyFileInsertScriptCfg;
|
||||
import com.nis.domain.configuration.IpPortCfg;
|
||||
import com.nis.domain.maat.ToMaatResult;
|
||||
import com.nis.domain.maat.ToMaatResult.ResponseData;
|
||||
import com.nis.exceptions.MaatConvertException;
|
||||
import com.nis.util.ConfigServiceUtil;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.FileUtils;
|
||||
import com.nis.util.JsonMapper;
|
||||
import com.nis.util.LogUtils;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.web.controller.configuration.CommonController;
|
||||
@Controller
|
||||
@RequestMapping("${adminPath}/proxy/fileInsertScript")
|
||||
public class FileInsertScriptController extends CommonController{
|
||||
|
||||
@RequestMapping(value = {"list"})
|
||||
public String fileInsertScriptList(ProxyFileInsertScriptCfg cfg,Model model,HttpServletRequest request,HttpServletResponse response) {
|
||||
Page<ProxyFileInsertScriptCfg> page = proxyFileInsertScriptService.findPage(new Page<ProxyFileInsertScriptCfg>(request, response,"a"), cfg);
|
||||
model.addAttribute("page", page);
|
||||
model.addAttribute("cfg", cfg);
|
||||
initPageCondition(model);
|
||||
return "/cfg/proxy/fileInsertScript/list";
|
||||
}
|
||||
|
||||
@RequestMapping(value = {"form"})
|
||||
@RequiresPermissions(value={"proxy:fileInsertScript:config"})
|
||||
public String fileform(Model model,HttpServletRequest request
|
||||
,HttpServletResponse response
|
||||
,@ModelAttribute("cfg")ProxyFileInsertScriptCfg cfg
|
||||
,String ids
|
||||
,RedirectAttributes redirectAttributes) {
|
||||
if(!StringUtil.isEmpty(ids)){
|
||||
cfg = proxyFileInsertScriptService.getCfgById(Long.valueOf(ids));
|
||||
}
|
||||
initFormCondition(model, cfg);
|
||||
model.addAttribute("_cfg", cfg);
|
||||
return "/cfg/proxy/fileInsertScript/form";
|
||||
}
|
||||
|
||||
@RequiresPermissions(value={"proxy:fileInsertScript:config"})
|
||||
@RequestMapping(value = {"saveOrUpdate"})
|
||||
public String saveOrUpdate(Model model,HttpServletRequest request
|
||||
,HttpServletResponse response,MultipartFile cfgFile,
|
||||
@ModelAttribute("cfg")ProxyFileInsertScriptCfg cfg,
|
||||
RedirectAttributes redirectAttributes){
|
||||
File file = null;
|
||||
try{
|
||||
if(cfgFile != null) {
|
||||
String filename = cfgFile.getOriginalFilename();
|
||||
String prefix = FileUtils.getPrefix(filename, false);
|
||||
String suffix = FileUtils.getSuffix(filename, false);
|
||||
file = File.createTempFile("file_"+ prefix, suffix);
|
||||
cfgFile.transferTo(file);//复制文件
|
||||
String md5 = FileUtils.getFileMD5(file);
|
||||
Map<String,Object> srcMap = Maps.newHashMap();
|
||||
srcMap.put("filetype", suffix);
|
||||
srcMap.put("datatype", "dbSystem");//源文件存入数据中心
|
||||
srcMap.put("createTime",new Date());
|
||||
srcMap.put("key",prefix);
|
||||
srcMap.put("fileName", filename);
|
||||
srcMap.put("checksum", md5);
|
||||
ToMaatResult result = ConfigServiceUtil.postFileCfg(null, file, JsonMapper.toJsonString(srcMap));
|
||||
logger.info("注入脚本文件上传响应信息:"+JsonMapper.toJsonString(result));
|
||||
String srcAccessUrl = null;
|
||||
if(!StringUtil.isEmpty(result)){
|
||||
ResponseData data = result.getData();
|
||||
srcAccessUrl=data.getAccessUrl();
|
||||
cfg.setPath(srcAccessUrl);
|
||||
}
|
||||
}
|
||||
proxyFileInsertScriptService.saveOrUpdate(cfg);
|
||||
addMessage(redirectAttributes,"success","save_success");
|
||||
}catch(Exception e){
|
||||
logger.error("信息保存失败",e);
|
||||
if(e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes,"error","request_service_failed");
|
||||
LogUtils.saveLog(request, null, e, null);
|
||||
}else {
|
||||
addMessage(redirectAttributes,"error","save_failed");
|
||||
LogUtils.saveLog(request, null, e, null);
|
||||
}
|
||||
}finally {
|
||||
if(file != null) {
|
||||
file.delete();//删除临时文件
|
||||
}
|
||||
}
|
||||
return "redirect:" + adminPath +"/proxy/fileInsertScript/list?functionId="+cfg.getFunctionId();
|
||||
}
|
||||
|
||||
@RequestMapping(value = {"audit"})
|
||||
@RequiresPermissions(value={"proxy:fileInsertScript:confirm"})
|
||||
public String audit(Model model, @ModelAttribute("cfg") ProxyFileInsertScriptCfg cfg, Integer isValid, Integer isAudit,
|
||||
String ids, Integer functionId, RedirectAttributes redirectAttributes, HttpServletResponse response,
|
||||
HttpServletRequest request) {
|
||||
if (!StringUtil.isEmpty(ids)) {
|
||||
String[] idArray = ids.split(",");
|
||||
for (String id : idArray) {
|
||||
try {
|
||||
proxyFileInsertScriptService.audit(isAudit, isValid, functionId, id);
|
||||
addMessage(redirectAttributes, "success", "audit_success");
|
||||
} catch (MaatConvertException e) {
|
||||
logger.error(e);
|
||||
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||
LogUtils.saveLog(request, null, e, null);
|
||||
} catch (Exception e) {
|
||||
logger.error(e);
|
||||
addMessage(redirectAttributes, "error", "audit_failed");
|
||||
LogUtils.saveLog(request, null, e, null);
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
Page<ProxyFileInsertScriptCfg> searchPage = new Page<ProxyFileInsertScriptCfg>(request, response, "a");
|
||||
Page<ProxyFileInsertScriptCfg> auditPage = new Page<ProxyFileInsertScriptCfg>(request, response, "a");
|
||||
|
||||
try {
|
||||
BeanUtils.copyProperties(searchPage, auditPage);
|
||||
auditAll(auditPage, isValid, cfg);
|
||||
addMessage(redirectAttributes, "success", "audit_success");
|
||||
} catch (Exception e) {
|
||||
logger.error("批量配置下发失败:", e);
|
||||
if (e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||
LogUtils.saveLog(request, null, e, null);
|
||||
} else {
|
||||
addMessage(redirectAttributes, "error", "audit_failed");
|
||||
LogUtils.saveLog(request, null, e, null);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return fileInsertScriptList(cfg, model, request, response);
|
||||
}
|
||||
|
||||
return "redirect:" + adminPath +"/proxy/fileInsertScript/list?functionId="+functionId;
|
||||
}
|
||||
|
||||
@RequestMapping(value = {"delete"})
|
||||
@RequiresPermissions(value={"proxy:fileInsertScript:config"})
|
||||
public String delete(Integer isAudit, Integer isValid, String ids, Integer functionId, Model model, @ModelAttribute("cfg")ProxyFileInsertScriptCfg cfg,
|
||||
HttpServletRequest request, HttpServletResponse response, RedirectAttributes redirectAttributes){
|
||||
try {
|
||||
if (!StringUtil.isEmpty(ids)) {
|
||||
proxyFileInsertScriptService.delete(isAudit, isValid, ids, functionId);
|
||||
addMessage(redirectAttributes, "success", "delete_success");
|
||||
}else {
|
||||
// 批量删除
|
||||
Page<ProxyFileInsertScriptCfg> searchPage = new Page<ProxyFileInsertScriptCfg>(request, response, "a");
|
||||
deleteAll(searchPage, functionId, cfg);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("配置删除失败:", e);
|
||||
if (e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||
LogUtils.saveLog(request, null, e, null);
|
||||
} else {
|
||||
addMessage(redirectAttributes, "error", "delete_failed");
|
||||
LogUtils.saveLog(request, null, e, null);
|
||||
}
|
||||
|
||||
}
|
||||
return "redirect:" + adminPath +"/proxy/fileInsertScript/list?functionId="+functionId;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "exportFileInsertScript")
|
||||
public void exportFileHijack(Model model, HttpServletRequest request, HttpServletResponse response,
|
||||
@ModelAttribute("cfg") ProxyFileInsertScriptCfg entity, String ids, RedirectAttributes redirectAttributes){
|
||||
try {
|
||||
// export data info
|
||||
List<String> titleList = new ArrayList<String>();
|
||||
Map<String, Class<?>> classMap = new HashMap<String, Class<?>>();
|
||||
Map<String, List> dataMap = new HashMap<String, List>();
|
||||
Map<String, String> noExportMap = new HashMap<String, String>();
|
||||
|
||||
List<ProxyFileInsertScriptCfg> ipLists = new ArrayList<ProxyFileInsertScriptCfg>();
|
||||
// 导出选中记录
|
||||
if (!StringUtil.isEmpty(ids)) {
|
||||
ipLists = proxyFileInsertScriptService.findByList(ids);
|
||||
} else {
|
||||
entity.setTableName(IpPortCfg.getTablename());
|
||||
Page<ProxyFileInsertScriptCfg> pageInfo = new Page<ProxyFileInsertScriptCfg>(request, response, "a");
|
||||
pageInfo.setPageNo(1);
|
||||
pageInfo.setPageSize(Constants.MAX_EXPORT_SIZE);
|
||||
Page<ProxyFileInsertScriptCfg> page = proxyFileInsertScriptService.findPage(pageInfo, entity);
|
||||
ipLists = page.getList();
|
||||
}
|
||||
for (int i = 0; i < ipLists.size(); i++) {
|
||||
ipLists.get(i).setProfileName(ipLists.get(i).getCfgDesc());
|
||||
}
|
||||
titleList.add(entity.getMenuNameCode());
|
||||
classMap.put(entity.getMenuNameCode(), ProxyFileInsertScriptCfg.class);
|
||||
String cfgIndexInfoNoExport = ",config_describe,whether_area_block,block_type,do_log,client_port,ir_type,group_name,userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
|
||||
// 时间过滤
|
||||
if (entity.getSearch_create_time_start() == null && entity.getSearch_create_time_end() == null) {
|
||||
cfgIndexInfoNoExport = ",config_time" + cfgIndexInfoNoExport;
|
||||
}
|
||||
if (entity.getSearch_edit_time_start() == null && entity.getSearch_edit_time_end() == null) {
|
||||
cfgIndexInfoNoExport = ",edit_time" + cfgIndexInfoNoExport;
|
||||
}
|
||||
if (entity.getSearch_audit_time_start() == null && entity.getSearch_audit_time_end() == null) {
|
||||
cfgIndexInfoNoExport = ",audit_time" + cfgIndexInfoNoExport;
|
||||
}
|
||||
if (!StringUtil.isEmpty(entity.gethColumns())) {
|
||||
cfgIndexInfoNoExport = "," + entity.gethColumns() + "," + cfgIndexInfoNoExport;
|
||||
}
|
||||
|
||||
noExportMap.put(entity.getMenuNameCode(), cfgIndexInfoNoExport);
|
||||
dataMap.put(entity.getMenuNameCode(), ipLists);
|
||||
|
||||
String timeRange = initTimeMap(entity);
|
||||
noExportMap.put("timeRange", timeRange);
|
||||
if ("csv".equals(entity.getExType())) {
|
||||
this._exportCsv(model, request, response, redirectAttributes, entity.getMenuNameCode(), titleList,
|
||||
classMap, dataMap, noExportMap);
|
||||
} else {
|
||||
this._export(model, request, response, redirectAttributes, entity.getMenuNameCode(), titleList,
|
||||
classMap, dataMap, noExportMap);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("proxyFileInsertScript export failed", e);
|
||||
addMessage(redirectAttributes, "error", "export_failed");
|
||||
LogUtils.saveLog(request, null, e, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -15,6 +15,7 @@ import java.util.Map;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.commons.beanutils.BeanUtils;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
@@ -25,6 +26,7 @@ import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||
|
||||
import com.google.common.collect.Maps;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.callback.ProxyFileHijackCfg;
|
||||
import com.nis.domain.callback.ProxyFileStrategyCfg;
|
||||
import com.nis.domain.maat.ToMaatResult;
|
||||
import com.nis.domain.maat.ToMaatResult.ResponseData;
|
||||
@@ -118,6 +120,13 @@ public class FileStrategyController extends CommonController {
|
||||
cfg.setContentLength(file.length());//文件长度
|
||||
}
|
||||
proxyFileStrategyService.saveOrUpdate(cfg);
|
||||
//配置仅保存
|
||||
if(StringUtil.isEmpty(cfg.getIsValid()) || cfg.getIsValid()!=1) {
|
||||
addMessage(redirectAttributes, "success", "save_success");
|
||||
}else {
|
||||
//配置直接生效
|
||||
addMessage(redirectAttributes, "success", "audit_success");
|
||||
}
|
||||
addMessage(redirectAttributes,"success","save_success");
|
||||
}catch(Exception e){
|
||||
logger.error("信息保存失败",e);
|
||||
@@ -133,27 +142,81 @@ public class FileStrategyController extends CommonController {
|
||||
file.delete();//删除临时文件
|
||||
}
|
||||
}
|
||||
|
||||
return "redirect:" + adminPath +"/proxy/fileStrategy/list?functionId="+cfg.getFunctionId();
|
||||
}
|
||||
|
||||
@RequestMapping(value = {"delete"})
|
||||
@RequiresPermissions(value={"proxy:fileStrategy:config"})
|
||||
public String delete(Integer isAudit,Integer isValid,
|
||||
String ids,
|
||||
Integer functionId,
|
||||
RedirectAttributes redirectAttributes){
|
||||
proxyFileStrategyService.update(isAudit,isValid,ids,functionId);
|
||||
public String delete(Integer isAudit, Integer isValid, String ids, Integer functionId, Model model, @ModelAttribute("cfg")ProxyFileStrategyCfg cfg,
|
||||
HttpServletRequest request, HttpServletResponse response, RedirectAttributes redirectAttributes){
|
||||
try {
|
||||
if (!StringUtil.isEmpty(ids)) {
|
||||
proxyFileStrategyService.update(isAudit, isValid, ids, functionId);
|
||||
addMessage(redirectAttributes, "success", "delete_success");
|
||||
}else {
|
||||
// 批量删除
|
||||
Page<ProxyFileStrategyCfg> searchPage = new Page<ProxyFileStrategyCfg>(request, response, "a");
|
||||
deleteAll(searchPage, functionId, cfg);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("配置删除失败:", e);
|
||||
if (e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||
LogUtils.saveLog(request, null, e, null);
|
||||
} else {
|
||||
addMessage(redirectAttributes, "error", "delete_failed");
|
||||
LogUtils.saveLog(request, null, e, null);
|
||||
}
|
||||
|
||||
}
|
||||
return "redirect:" + adminPath +"/proxy/fileStrategy/list?functionId="+functionId;
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(value = {"audit"})
|
||||
@RequiresPermissions(value={"proxy:fileStrategy:confirm"})
|
||||
public String audit(Integer isAudit,Integer isValid,String ids
|
||||
,Integer functionId, RedirectAttributes redirectAttributes) {
|
||||
if(!StringUtil.isEmpty(ids)){
|
||||
proxyFileStrategyService.audit(isAudit, isValid, functionId, ids);
|
||||
addMessage(redirectAttributes,"success", "audit_success");
|
||||
public String audit(Model model, @ModelAttribute("cfg") ProxyFileStrategyCfg cfg, Integer isValid, Integer isAudit,
|
||||
String ids, Integer functionId, RedirectAttributes redirectAttributes, HttpServletResponse response,
|
||||
HttpServletRequest request) {
|
||||
if (!StringUtil.isEmpty(ids)) {
|
||||
String[] idArray = ids.split(",");
|
||||
for (String id : idArray) {
|
||||
try {
|
||||
proxyFileStrategyService.audit(isAudit, isValid, functionId, id);
|
||||
addMessage(redirectAttributes, "success", "audit_success");
|
||||
} catch (MaatConvertException e) {
|
||||
logger.error(e);
|
||||
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||
LogUtils.saveLog(request, null, e, null);
|
||||
} catch (Exception e) {
|
||||
logger.error(e);
|
||||
addMessage(redirectAttributes, "error", "audit_failed");
|
||||
LogUtils.saveLog(request, null, e, null);
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
Page<ProxyFileStrategyCfg> searchPage = new Page<ProxyFileStrategyCfg>(request, response, "a");
|
||||
Page<ProxyFileStrategyCfg> auditPage = new Page<ProxyFileStrategyCfg>(request, response, "a");
|
||||
|
||||
try {
|
||||
BeanUtils.copyProperties(searchPage, auditPage);
|
||||
auditAll(auditPage, isValid, cfg);
|
||||
addMessage(redirectAttributes, "success", "audit_success");
|
||||
} catch (Exception e) {
|
||||
logger.error("配置下发失败:", e);
|
||||
if (e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||
LogUtils.saveLog(request, null, e, null);
|
||||
} else {
|
||||
addMessage(redirectAttributes, "error", "audit_failed");
|
||||
LogUtils.saveLog(request, null, e, null);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return fileStrategyList(cfg, model, request, response);
|
||||
}
|
||||
return "redirect:" + adminPath +"/proxy/fileStrategy/list?functionId="+functionId;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,240 @@
|
||||
package com.nis.web.controller.configuration.proxy;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.commons.beanutils.BeanUtils;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.callback.ProxyFileTrafficMirrorCfg;
|
||||
import com.nis.domain.configuration.IpPortCfg;
|
||||
import com.nis.domain.maat.ToMaatResult;
|
||||
import com.nis.exceptions.MaatConvertException;
|
||||
import com.nis.util.ConfigServiceUtil;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.FileUtils;
|
||||
import com.nis.util.JsonMapper;
|
||||
import com.nis.util.LogUtils;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.web.controller.configuration.CommonController;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("${adminPath}/proxy/fileTrafficMirror")
|
||||
public class FileTrafficMirrorController extends CommonController {
|
||||
@RequestMapping(value = {"list"})
|
||||
public String fileTrafficMirrorList(ProxyFileTrafficMirrorCfg cfg,Model model,HttpServletRequest request,HttpServletResponse response) {
|
||||
Page<ProxyFileTrafficMirrorCfg> page = proxyFileTrafficMirrorService.findPage(new Page<ProxyFileTrafficMirrorCfg>(request, response,"a"), cfg);
|
||||
model.addAttribute("page", page);
|
||||
model.addAttribute("cfg", cfg);
|
||||
initPageCondition(model);
|
||||
return "/cfg/proxy/fileTrafficMirror/list";
|
||||
}
|
||||
|
||||
@RequestMapping(value = {"form"})
|
||||
@RequiresPermissions(value={"proxy:fileTrafficMirror:config"})
|
||||
public String fileform(Model model,HttpServletRequest request
|
||||
,HttpServletResponse response
|
||||
,@ModelAttribute("cfg")ProxyFileTrafficMirrorCfg cfg
|
||||
,String ids
|
||||
,RedirectAttributes redirectAttributes) {
|
||||
if(!StringUtil.isEmpty(ids)){
|
||||
cfg = proxyFileTrafficMirrorService.getCfgById(Long.valueOf(ids));
|
||||
}
|
||||
initFormCondition(model, cfg);
|
||||
model.addAttribute("_cfg", cfg);
|
||||
return "/cfg/proxy/fileTrafficMirror/form";
|
||||
}
|
||||
|
||||
@RequiresPermissions(value={"proxy:fileTrafficMirror:config"})
|
||||
@RequestMapping(value = {"saveOrUpdate"})
|
||||
public String saveOrUpdate(Model model,HttpServletRequest request
|
||||
,HttpServletResponse response,MultipartFile cfgFile,
|
||||
@ModelAttribute("cfg")ProxyFileTrafficMirrorCfg cfg,
|
||||
RedirectAttributes redirectAttributes){
|
||||
File file = null;
|
||||
try{
|
||||
if(cfgFile != null) {
|
||||
String filename = cfgFile.getOriginalFilename();
|
||||
String prefix = FileUtils.getPrefix(filename, false);
|
||||
String suffix = FileUtils.getSuffix(filename, false);
|
||||
file = File.createTempFile("file_"+ prefix, suffix);
|
||||
cfgFile.transferTo(file);//复制文件
|
||||
String md5 = FileUtils.getFileMD5(file);
|
||||
Map<String,Object> srcMap = Maps.newHashMap();
|
||||
srcMap.put("filetype", suffix);
|
||||
srcMap.put("datatype", "dbSystem");//源文件存入数据中心
|
||||
srcMap.put("createTime",new Date());
|
||||
srcMap.put("key",prefix);
|
||||
srcMap.put("fileName", filename);
|
||||
srcMap.put("checksum", md5);
|
||||
ToMaatResult result = ConfigServiceUtil.postFileCfg(null, file, JsonMapper.toJsonString(srcMap));
|
||||
logger.info("注入脚本文件上传响应信息:"+JsonMapper.toJsonString(result));
|
||||
}
|
||||
proxyFileTrafficMirrorService.saveOrUpdate(cfg);
|
||||
addMessage(redirectAttributes,"success","save_success");
|
||||
}catch(Exception e){
|
||||
logger.error("信息保存失败",e);
|
||||
if(e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes,"error","request_service_failed");
|
||||
LogUtils.saveLog(request, null, e, null);
|
||||
}else {
|
||||
addMessage(redirectAttributes,"error","save_failed");
|
||||
LogUtils.saveLog(request, null, e, null);
|
||||
}
|
||||
}finally {
|
||||
if(file != null) {
|
||||
file.delete();//删除临时文件
|
||||
}
|
||||
}
|
||||
return "redirect:" + adminPath +"/proxy/fileTrafficMirror/list?functionId="+cfg.getFunctionId();
|
||||
}
|
||||
|
||||
@RequestMapping(value = {"audit"})
|
||||
@RequiresPermissions(value={"proxy:fileTrafficMirror:confirm"})
|
||||
public String audit(Model model, @ModelAttribute("cfg") ProxyFileTrafficMirrorCfg cfg, Integer isValid, Integer isAudit,
|
||||
String ids, Integer functionId, RedirectAttributes redirectAttributes, HttpServletResponse response,
|
||||
HttpServletRequest request) {
|
||||
if (!StringUtil.isEmpty(ids)) {
|
||||
String[] idArray = ids.split(",");
|
||||
for (String id : idArray) {
|
||||
try {
|
||||
proxyFileTrafficMirrorService.audit(isAudit, isValid, functionId, id);
|
||||
addMessage(redirectAttributes, "success", "audit_success");
|
||||
} catch (MaatConvertException e) {
|
||||
logger.error(e);
|
||||
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||
LogUtils.saveLog(request, null, e, null);
|
||||
} catch (Exception e) {
|
||||
logger.error(e);
|
||||
addMessage(redirectAttributes, "error", "audit_failed");
|
||||
LogUtils.saveLog(request, null, e, null);
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
Page<ProxyFileTrafficMirrorCfg> searchPage = new Page<ProxyFileTrafficMirrorCfg>(request, response, "a");
|
||||
Page<ProxyFileTrafficMirrorCfg> auditPage = new Page<ProxyFileTrafficMirrorCfg>(request, response, "a");
|
||||
|
||||
try {
|
||||
BeanUtils.copyProperties(searchPage, auditPage);
|
||||
auditAll(auditPage, isValid, cfg);
|
||||
addMessage(redirectAttributes, "success", "audit_success");
|
||||
} catch (Exception e) {
|
||||
logger.error("批量配置下发失败:", e);
|
||||
if (e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||
LogUtils.saveLog(request, null, e, null);
|
||||
} else {
|
||||
addMessage(redirectAttributes, "error", "audit_failed");
|
||||
LogUtils.saveLog(request, null, e, null);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return fileTrafficMirrorList(cfg, model, request, response);
|
||||
}
|
||||
|
||||
return "redirect:" + adminPath +"/proxy/fileTrafficMirror/list?functionId="+functionId;
|
||||
}
|
||||
|
||||
@RequestMapping(value = {"delete"})
|
||||
@RequiresPermissions(value={"proxy:fileTrafficMirror:config"})
|
||||
public String delete(Integer isAudit, Integer isValid, String ids, Integer functionId, Model model, @ModelAttribute("cfg")ProxyFileTrafficMirrorCfg cfg,
|
||||
HttpServletRequest request, HttpServletResponse response, RedirectAttributes redirectAttributes){
|
||||
try {
|
||||
if (!StringUtil.isEmpty(ids)) {
|
||||
proxyFileTrafficMirrorService.delete(isAudit, isValid, ids, functionId);
|
||||
addMessage(redirectAttributes, "success", "delete_success");
|
||||
}else {
|
||||
// 批量删除
|
||||
Page<ProxyFileTrafficMirrorCfg> searchPage = new Page<ProxyFileTrafficMirrorCfg>(request, response, "d");
|
||||
deleteAll(searchPage, functionId, cfg);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("配置删除失败:", e);
|
||||
if (e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||
LogUtils.saveLog(request, null, e, null);
|
||||
} else {
|
||||
addMessage(redirectAttributes, "error", "delete_failed");
|
||||
LogUtils.saveLog(request, null, e, null);
|
||||
}
|
||||
|
||||
}
|
||||
return "redirect:" + adminPath +"/proxy/fileTrafficMirror/list?functionId="+functionId;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "exportFileTrafficMirror")
|
||||
public void exportFileHijack(Model model, HttpServletRequest request, HttpServletResponse response,
|
||||
@ModelAttribute("cfg") ProxyFileTrafficMirrorCfg entity, String ids, RedirectAttributes redirectAttributes){
|
||||
try {
|
||||
// export data info
|
||||
List<String> titleList = new ArrayList<String>();
|
||||
Map<String, Class<?>> classMap = new HashMap<String, Class<?>>();
|
||||
Map<String, List> dataMap = new HashMap<String, List>();
|
||||
Map<String, String> noExportMap = new HashMap<String, String>();
|
||||
|
||||
List<ProxyFileTrafficMirrorCfg> ipLists = new ArrayList<ProxyFileTrafficMirrorCfg>();
|
||||
// 导出选中记录
|
||||
if (!StringUtil.isEmpty(ids)) {
|
||||
ipLists = proxyFileTrafficMirrorService.findByList(ids);
|
||||
} else {
|
||||
entity.setTableName(IpPortCfg.getTablename());
|
||||
Page<ProxyFileTrafficMirrorCfg> pageInfo = new Page<ProxyFileTrafficMirrorCfg>(request, response, "r");
|
||||
pageInfo.setPageNo(1);
|
||||
pageInfo.setPageSize(Constants.MAX_EXPORT_SIZE);
|
||||
Page<ProxyFileTrafficMirrorCfg> page = proxyFileTrafficMirrorService.findPage(pageInfo, entity);
|
||||
ipLists = page.getList();
|
||||
}
|
||||
|
||||
titleList.add(entity.getMenuNameCode());
|
||||
classMap.put(entity.getMenuNameCode(), ProxyFileTrafficMirrorCfg.class);
|
||||
String cfgIndexInfoNoExport = ",config_describe,whether_area_block,block_type,do_log,client_port,ir_type,group_name,userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
|
||||
// 时间过滤
|
||||
if (entity.getSearch_create_time_start() == null && entity.getSearch_create_time_end() == null) {
|
||||
cfgIndexInfoNoExport = ",config_time" + cfgIndexInfoNoExport;
|
||||
}
|
||||
if (entity.getSearch_edit_time_start() == null && entity.getSearch_edit_time_end() == null) {
|
||||
cfgIndexInfoNoExport = ",edit_time" + cfgIndexInfoNoExport;
|
||||
}
|
||||
if (entity.getSearch_audit_time_start() == null && entity.getSearch_audit_time_end() == null) {
|
||||
cfgIndexInfoNoExport = ",audit_time" + cfgIndexInfoNoExport;
|
||||
}
|
||||
if (!StringUtil.isEmpty(entity.gethColumns())) {
|
||||
cfgIndexInfoNoExport = "," + entity.gethColumns() + "," + cfgIndexInfoNoExport;
|
||||
}
|
||||
|
||||
noExportMap.put(entity.getMenuNameCode(), cfgIndexInfoNoExport);
|
||||
dataMap.put(entity.getMenuNameCode(), ipLists);
|
||||
|
||||
String timeRange = initTimeMap(entity);
|
||||
noExportMap.put("timeRange", timeRange);
|
||||
if ("csv".equals(entity.getExType())) {
|
||||
this._exportCsv(model, request, response, redirectAttributes, entity.getMenuNameCode(), titleList,
|
||||
classMap, dataMap, noExportMap);
|
||||
} else {
|
||||
this._export(model, request, response, redirectAttributes, entity.getMenuNameCode(), titleList,
|
||||
classMap, dataMap, noExportMap);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("proxyFileTrafficMirror export failed", e);
|
||||
addMessage(redirectAttributes, "error", "export_failed");
|
||||
LogUtils.saveLog(request, null, e, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.nis.web.dao.configuration;
|
||||
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.nis.domain.callback.ProxyFileHijackCfg;
|
||||
import com.nis.domain.callback.ProxyFileInsertScriptCfg;
|
||||
import com.nis.domain.configuration.PxyObjKeyring;
|
||||
import com.nis.web.dao.CrudDao;
|
||||
import com.nis.web.dao.MyBatisDao;
|
||||
/**
|
||||
* 劫持文件处理
|
||||
* @author lenovo
|
||||
*
|
||||
*/
|
||||
@MyBatisDao
|
||||
public interface ProxyFileHijackDao extends CrudDao<ProxyFileHijackCfg>{
|
||||
|
||||
public List<ProxyFileHijackCfg> findPage(ProxyFileHijackCfg entity) ;
|
||||
|
||||
public ProxyFileHijackCfg getCfgById(@Param("cfgId")Long cfgId);
|
||||
|
||||
public int insert(ProxyFileHijackCfg entity);
|
||||
|
||||
public int update(ProxyFileHijackCfg entity);
|
||||
|
||||
List<ProxyFileHijackCfg> findByList(@Param("ids")String ids);
|
||||
}
|
||||
@@ -0,0 +1,313 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.nis.web.dao.configuration.ProxyFileHijackDao" >
|
||||
|
||||
<resultMap id="ProxyFileHijackCfg" type="com.nis.domain.callback.ProxyFileHijackCfg" >
|
||||
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
||||
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
||||
<result column="cfg_type" property="cfgType" jdbcType="VARCHAR" />
|
||||
<result column="action" property="action" jdbcType="INTEGER" />
|
||||
<result column="level" property="level" jdbcType="INTEGER" />
|
||||
<result column="is_valid" property="isValid" jdbcType="INTEGER" />
|
||||
<result column="is_audit" property="isAudit" jdbcType="INTEGER" />
|
||||
<result column="creator_id" property="creatorId" jdbcType="INTEGER" />
|
||||
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
|
||||
<result column="editor_id" property="editorId" jdbcType="INTEGER" />
|
||||
<result column="edit_time" property="editTime" jdbcType="TIMESTAMP" />
|
||||
<result column="auditor_id" property="auditorId" jdbcType="INTEGER" />
|
||||
<result column="audit_time" property="auditTime" jdbcType="TIMESTAMP" />
|
||||
<result column="service_id" property="serviceId" jdbcType="INTEGER" />
|
||||
<result column="request_id" property="requestId" jdbcType="INTEGER" />
|
||||
<result column="compile_id" property="compileId" jdbcType="INTEGER" />
|
||||
<result column="is_area_effective" property="isAreaEffective" jdbcType="INTEGER" />
|
||||
<result column="classify" property="classify" jdbcType="VARCHAR" />
|
||||
<result column="attribute" property="attribute" jdbcType="VARCHAR" />
|
||||
<result column="lable" property="lable" jdbcType="VARCHAR" />
|
||||
<result column="area_effective_ids" property="areaEffectiveIds" jdbcType="VARCHAR" />
|
||||
<result column="function_id" property="functionId" jdbcType="INTEGER" />
|
||||
<result column="cfg_region_code" property="cfgRegionCode" jdbcType="INTEGER" />
|
||||
<result column="creator_name" property="creatorName" jdbcType="VARCHAR" />
|
||||
<result column="auditor_name" property="auditorName" jdbcType="VARCHAR" />
|
||||
<result column="editor_name" property="editorName" jdbcType="VARCHAR" />
|
||||
|
||||
<result column="content_type" property="contentType" jdbcType="VARCHAR" />
|
||||
<result column="content_name" property="contentName" jdbcType="VARCHAR" />
|
||||
<result column="path" property="path" jdbcType="VARCHAR" />
|
||||
<result column="cancel_request_id" property="cancelRequestId" jdbcType="INTEGER" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="ProxyFileHijackCfgColumn" >
|
||||
a.CFG_ID,a.CFG_DESC,a.ACTION,a.IS_VALID,a.IS_AUDIT,
|
||||
a.CREATOR_ID,a.CREATE_TIME,a.EDITOR_ID,a.EDIT_TIME,a.AUDITOR_ID,a.AUDIT_TIME,
|
||||
a.SERVICE_ID,a.REQUEST_ID,a.COMPILE_ID,a.IS_AREA_EFFECTIVE,a.CLASSIFY,
|
||||
a.ATTRIBUTE,a.LABLE,a.AREA_EFFECTIVE_IDS,a.function_id,a.cfg_type,a.cfg_region_code,
|
||||
a.CONTENT_TYPE,a.CONTENT_NAME,a.PATH,a.CANCEL_REQUEST_ID
|
||||
</sql>
|
||||
|
||||
|
||||
<!-- voip条件查询列表信息 -->
|
||||
<select id="findPage" resultMap="ProxyFileHijackCfg" parameterType="com.nis.domain.callback.ProxyFileHijackCfg" >
|
||||
SELECT
|
||||
<include refid="ProxyFileHijackCfgColumn" />
|
||||
<trim prefix="," prefixOverrides=",">
|
||||
, s.name as creator_name,e.name as editor_name,u.name as auditor_name
|
||||
,ri.request_title as requestName,i.is_valid as quote
|
||||
</trim>
|
||||
FROM PXY_PROFILE_HIJACK_FILES a
|
||||
left join sys_user s on a.creator_id=s.id
|
||||
left join sys_user e on a.editor_id=e.id
|
||||
left join sys_user u on a.auditor_id=u.id
|
||||
left join request_info ri on a.request_id=ri.id
|
||||
left join cfg_index_info i on a.COMPILE_ID=i.user_region4
|
||||
<trim prefix="WHERE" prefixOverrides="AND |OR ">
|
||||
<if test="page !=null and page.where != null and page.where != ''">
|
||||
AND ${page.where}
|
||||
</if>
|
||||
<if test="cfgId != null">
|
||||
AND a.CFG_ID=#{cfgId,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="cfgDesc != null and cfgDesc != ''">
|
||||
AND a.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="action != null">
|
||||
AND a.ACTION=#{action,jdbcType=INTEGER}
|
||||
</if>
|
||||
<choose>
|
||||
<!-- 判断是否批量操作 -->
|
||||
<when test="batchValidValue != null and batchValidValue != ''">
|
||||
AND a.IS_VALID in (${batchValidValue})
|
||||
</when>
|
||||
<otherwise>
|
||||
<if test="isValid != null">
|
||||
AND a.IS_VALID=#{isValid,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isValid == null">
|
||||
AND a.IS_VALID != -1
|
||||
</if>
|
||||
</otherwise>
|
||||
</choose>
|
||||
<choose>
|
||||
<!-- 判断是否批量操作 -->
|
||||
<when test="batchAuditValue != null and batchAuditValue != ''">
|
||||
<if test="isAudit != null">
|
||||
AND a.IS_AUDIT in(${batchAuditValue})
|
||||
</if>
|
||||
</when>
|
||||
<otherwise>
|
||||
<if test="isAudit != null">
|
||||
AND a.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
|
||||
</if>
|
||||
</otherwise>
|
||||
</choose>
|
||||
<if test="creatorName != null and creatorName != ''">
|
||||
AND a.CREATOR_NAME like concat(concat('%',#{creatorName,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="editorName != null and editorName != ''">
|
||||
AND a.EDITOR_NAME like concat(concat('%',#{editorName,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="auditorName != null and auditorName != ''">
|
||||
AND a.AUDITOR_NAME like concat(concat('%',#{auditorName,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="serviceId != null">
|
||||
AND a.SERVICE_ID=#{serviceId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="requestId != null">
|
||||
AND a.REQUEST_ID=#{requestId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="compileId != null">
|
||||
AND a.COMPILE_ID=#{compileId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isAreaEffective != null">
|
||||
AND a.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="classify != null and classify != ''">
|
||||
AND a.classify like concat(concat('%',#{classify,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="attribute != null and attribute != ''">
|
||||
AND a.attribute like concat(concat('%',#{attribute,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="lable != null and lable != ''">
|
||||
AND a.lable like concat(concat('%',#{lable,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="areaEffectiveIds != null and areaEffectiveIds != ''">
|
||||
AND a.AREA_EFFECTIVE_IDS like concat(concat('%',#{areaEffectiveIds,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="functionId != null">
|
||||
AND a.function_id=#{functionId,jdbcType=INTEGER}
|
||||
</if>
|
||||
|
||||
<!-- 数据范围过滤 -->
|
||||
${sqlMap.dsf}
|
||||
</trim>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy},a.is_audit,a.CFG_ID desc
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY a.is_audit,a.CFG_ID desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
<select id="getCfgById" resultMap="ProxyFileHijackCfg">
|
||||
SELECT
|
||||
<include refid="ProxyFileHijackCfgColumn" />
|
||||
FROM PXY_PROFILE_HIJACK_FILES a
|
||||
<where>
|
||||
<if test="cfgId != null">
|
||||
and a.CFG_ID=#{cfgId,jdbcType=INTEGER}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<insert id="insert" parameterType="com.nis.domain.callback.ProxyFileHijackCfg">
|
||||
<selectKey resultType="java.lang.Long" order="AFTER" keyProperty="cfgId">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into PXY_PROFILE_HIJACK_FILES (
|
||||
CFG_DESC,
|
||||
ACTION,
|
||||
IS_VALID,
|
||||
IS_AUDIT,
|
||||
CREATOR_ID,
|
||||
CREATE_TIME,
|
||||
EDITOR_ID,
|
||||
EDIT_TIME,
|
||||
AUDITOR_ID,
|
||||
AUDIT_TIME,
|
||||
SERVICE_ID,
|
||||
REQUEST_ID,
|
||||
COMPILE_ID,
|
||||
IS_AREA_EFFECTIVE,
|
||||
CLASSIFY,
|
||||
ATTRIBUTE,
|
||||
LABLE,
|
||||
AREA_EFFECTIVE_IDS,
|
||||
function_id,
|
||||
cfg_type,
|
||||
cfg_region_code,
|
||||
|
||||
path,
|
||||
content_type,
|
||||
content_name
|
||||
)values (
|
||||
#{cfgDesc,jdbcType=VARCHAR},
|
||||
#{action,jdbcType=INTEGER},
|
||||
#{isValid,jdbcType=INTEGER},
|
||||
#{isAudit,jdbcType=INTEGER},
|
||||
#{creatorId,jdbcType=INTEGER},
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
#{editorId,jdbcType=INTEGER},
|
||||
#{editTime,jdbcType=TIMESTAMP},
|
||||
#{auditorId,jdbcType=INTEGER},
|
||||
#{auditTime,jdbcType=TIMESTAMP},
|
||||
#{serviceId,jdbcType=INTEGER},
|
||||
#{requestId,jdbcType=INTEGER},
|
||||
#{compileId,jdbcType=INTEGER},
|
||||
#{isAreaEffective,jdbcType=INTEGER},
|
||||
#{classify,jdbcType=VARCHAR},
|
||||
#{attribute,jdbcType=VARCHAR},
|
||||
#{lable,jdbcType=VARCHAR},
|
||||
#{areaEffectiveIds,jdbcType=VARCHAR},
|
||||
#{functionId,jdbcType=INTEGER},
|
||||
#{cfgType,jdbcType=VARCHAR},
|
||||
#{cfgRegionCode,jdbcType=INTEGER},
|
||||
|
||||
#{path,jdbcType=VARCHAR},
|
||||
#{contentType,jdbcType=VARCHAR},
|
||||
#{contentName,jdbcType=VARCHAR}
|
||||
)
|
||||
</insert>
|
||||
|
||||
|
||||
<update id="update" parameterType="com.nis.domain.callback.ProxyFileHijackCfg" >
|
||||
update PXY_PROFILE_HIJACK_FILES
|
||||
<set>
|
||||
<if test="cfgDesc != null and cfgDesc != ''" >
|
||||
cfg_desc = #{cfgDesc,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="action != null" >
|
||||
action = #{action,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isValid != null" >
|
||||
is_valid = #{isValid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isAudit != null" >
|
||||
is_audit = #{isAudit,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="creatorId != null" >
|
||||
creator_id = #{creatorId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="createTime != null and createTime != ''" >
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="editorId != null" >
|
||||
editor_id = #{editorId,jdbcType=INTEGER},
|
||||
</if>
|
||||
edit_time = #{editTime,jdbcType=TIMESTAMP},
|
||||
<if test="auditorId != null" >
|
||||
auditor_id = #{auditorId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="auditTime != null and auditTime != ''" >
|
||||
audit_time = #{auditTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="serviceId != null" >
|
||||
service_id = #{serviceId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="requestId != null" >
|
||||
request_id = #{requestId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isAreaEffective != null" >
|
||||
is_area_effective = #{isAreaEffective,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="classify != null and classify != ''" >
|
||||
classify = #{classify,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="attribute != null and attribute != ''" >
|
||||
attribute = #{attribute,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="lable != null and lable != ''" >
|
||||
lable = #{lable,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="areaEffectiveIds != null" >
|
||||
area_effective_ids = #{areaEffectiveIds,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="functionId != null" >
|
||||
function_id = #{functionId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="cfgRegionCode != null" >
|
||||
cfg_region_code = #{cfgRegionCode,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="cfgType != null" >
|
||||
cfg_type = #{cfgType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="path != null" >
|
||||
path = #{path,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="contentType != null" >
|
||||
content_type = #{contentType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="contentName != null" >
|
||||
content_name = #{contentName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where cfg_id = #{cfgId,jdbcType=BIGINT}
|
||||
</update>
|
||||
|
||||
<!-- 查出所有 有效数据-->
|
||||
<select id="findByList" resultMap="ProxyFileHijackCfg">
|
||||
SELECT
|
||||
<include refid="ProxyFileHijackCfgColumn"/>
|
||||
<trim prefix="," prefixOverrides=",">
|
||||
,s.name as creator_name,e.name as editor_name,u.name as auditor_name
|
||||
,ri.request_title as requestName
|
||||
</trim>
|
||||
FROM PXY_PROFILE_HIJACK_FILES a
|
||||
left join sys_user s on a.creator_id=s.id
|
||||
left join sys_user e on a.editor_id=e.id
|
||||
left join sys_user u on a.auditor_id=u.id
|
||||
left join request_info ri on a.request_id=ri.id
|
||||
where a.CFG_ID in (${ids})
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.nis.web.dao.configuration;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import com.nis.domain.callback.ProxyFileHijackCfg;
|
||||
import com.nis.domain.callback.ProxyFileInsertScriptCfg;
|
||||
import com.nis.domain.configuration.PxyObjKeyring;
|
||||
import com.nis.web.dao.CrudDao;
|
||||
import com.nis.web.dao.MyBatisDao;
|
||||
|
||||
/**
|
||||
* 注入脚本文件
|
||||
* @author lenovo
|
||||
*
|
||||
*/
|
||||
@MyBatisDao
|
||||
public interface ProxyFileInsertScriptDao extends CrudDao<ProxyFileInsertScriptCfg> {
|
||||
|
||||
public List<ProxyFileInsertScriptCfg> findPage(ProxyFileInsertScriptCfg entity);
|
||||
|
||||
public ProxyFileInsertScriptCfg getCfgById(@Param("cfgId")Long cfgId);
|
||||
|
||||
public int insert(ProxyFileInsertScriptCfg entity);
|
||||
|
||||
public int update(ProxyFileInsertScriptCfg entity);
|
||||
|
||||
List<ProxyFileInsertScriptCfg> findByList(@Param("ids")String ids);
|
||||
}
|
||||
@@ -0,0 +1,307 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.nis.web.dao.configuration.ProxyFileInsertScriptDao" >
|
||||
|
||||
<resultMap id="ProxyFileInsertScriptCfg" type="com.nis.domain.callback.ProxyFileInsertScriptCfg" >
|
||||
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
||||
|
||||
<result column="format" property="format" jdbcType="VARCHAR" />
|
||||
<result column="path" property="path" jdbcType="VARCHAR" />
|
||||
<result column="cancel_request_id" property="cancelRequestId" jdbcType="INTEGER" />
|
||||
|
||||
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
||||
<result column="cfg_type" property="cfgType" jdbcType="VARCHAR" />
|
||||
<result column="action" property="action" jdbcType="INTEGER" />
|
||||
<result column="level" property="level" jdbcType="INTEGER" />
|
||||
<result column="is_valid" property="isValid" jdbcType="INTEGER" />
|
||||
<result column="is_audit" property="isAudit" jdbcType="INTEGER" />
|
||||
<result column="creator_id" property="creatorId" jdbcType="INTEGER" />
|
||||
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
|
||||
<result column="editor_id" property="editorId" jdbcType="INTEGER" />
|
||||
<result column="edit_time" property="editTime" jdbcType="TIMESTAMP" />
|
||||
<result column="auditor_id" property="auditorId" jdbcType="INTEGER" />
|
||||
<result column="audit_time" property="auditTime" jdbcType="TIMESTAMP" />
|
||||
<result column="service_id" property="serviceId" jdbcType="INTEGER" />
|
||||
<result column="request_id" property="requestId" jdbcType="INTEGER" />
|
||||
<result column="compile_id" property="compileId" jdbcType="INTEGER" />
|
||||
<result column="is_area_effective" property="isAreaEffective" jdbcType="INTEGER" />
|
||||
<result column="classify" property="classify" jdbcType="VARCHAR" />
|
||||
<result column="attribute" property="attribute" jdbcType="VARCHAR" />
|
||||
<result column="lable" property="lable" jdbcType="VARCHAR" />
|
||||
<result column="area_effective_ids" property="areaEffectiveIds" jdbcType="VARCHAR" />
|
||||
<result column="function_id" property="functionId" jdbcType="INTEGER" />
|
||||
<result column="cfg_region_code" property="cfgRegionCode" jdbcType="INTEGER" />
|
||||
<result column="creator_name" property="creatorName" jdbcType="VARCHAR" />
|
||||
<result column="auditor_name" property="auditorName" jdbcType="VARCHAR" />
|
||||
<result column="editor_name" property="editorName" jdbcType="VARCHAR" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="ProxyFileInsertScriptCfgColumn" >
|
||||
a.CFG_ID,a.CFG_DESC,a.ACTION,a.IS_VALID,a.IS_AUDIT,
|
||||
a.CREATOR_ID,a.CREATE_TIME,a.EDITOR_ID,a.EDIT_TIME,a.AUDITOR_ID,a.AUDIT_TIME,
|
||||
a.SERVICE_ID,a.REQUEST_ID,a.COMPILE_ID,a.IS_AREA_EFFECTIVE,a.CLASSIFY,
|
||||
a.ATTRIBUTE,a.LABLE,a.AREA_EFFECTIVE_IDS,a.function_id,a.cfg_type,a.cfg_region_code,
|
||||
a.FORMAT,a.PATH,a.cancel_request_id
|
||||
</sql>
|
||||
|
||||
|
||||
<!-- voip条件查询列表信息 -->
|
||||
<select id="findPage" resultMap="ProxyFileInsertScriptCfg" parameterType="com.nis.domain.callback.ProxyFileInsertScriptCfg" >
|
||||
SELECT
|
||||
<include refid="ProxyFileInsertScriptCfgColumn" />
|
||||
<trim prefix="," prefixOverrides=",">
|
||||
, s.name as creator_name,e.name as editor_name,u.name as auditor_name
|
||||
,ri.request_title as requestName,i.is_valid as quote
|
||||
</trim>
|
||||
FROM PXY_PROFILE_INSERT_SCRIPTS a
|
||||
left join sys_user s on a.creator_id=s.id
|
||||
left join sys_user e on a.editor_id=e.id
|
||||
left join sys_user u on a.auditor_id=u.id
|
||||
left join request_info ri on a.request_id=ri.id
|
||||
left join cfg_index_info i on a.COMPILE_ID=i.user_region4
|
||||
<trim prefix="WHERE" prefixOverrides="AND |OR ">
|
||||
<if test="page !=null and page.where != null and page.where != ''">
|
||||
AND ${page.where}
|
||||
</if>
|
||||
<if test="cfgId != null">
|
||||
AND a.CFG_ID=#{cfgId,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="cfgDesc != null and cfgDesc != ''">
|
||||
AND a.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="action != null">
|
||||
AND a.ACTION=#{action,jdbcType=INTEGER}
|
||||
</if>
|
||||
<choose>
|
||||
<!-- 判断是否批量操作 -->
|
||||
<when test="batchValidValue != null and batchValidValue != ''">
|
||||
AND a.IS_VALID in (${batchValidValue})
|
||||
</when>
|
||||
<otherwise>
|
||||
<if test="isValid != null">
|
||||
AND a.IS_VALID=#{isValid,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isValid == null">
|
||||
AND a.IS_VALID != -1
|
||||
</if>
|
||||
</otherwise>
|
||||
</choose>
|
||||
<choose>
|
||||
<!-- 判断是否批量操作 -->
|
||||
<when test="batchAuditValue != null and batchAuditValue != ''">
|
||||
<if test="isAudit != null">
|
||||
AND a.IS_AUDIT in(${batchAuditValue})
|
||||
</if>
|
||||
</when>
|
||||
<otherwise>
|
||||
<if test="isAudit != null">
|
||||
AND a.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
|
||||
</if>
|
||||
</otherwise>
|
||||
</choose>
|
||||
<if test="creatorName != null and creatorName != ''">
|
||||
AND a.CREATOR_NAME like concat(concat('%',#{creatorName,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="editorName != null and editorName != ''">
|
||||
AND a.EDITOR_NAME like concat(concat('%',#{editorName,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="auditorName != null and auditorName != ''">
|
||||
AND a.AUDITOR_NAME like concat(concat('%',#{auditorName,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="serviceId != null">
|
||||
AND a.SERVICE_ID=#{serviceId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="requestId != null">
|
||||
AND a.REQUEST_ID=#{requestId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="compileId != null">
|
||||
AND a.COMPILE_ID=#{compileId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isAreaEffective != null">
|
||||
AND a.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="classify != null and classify != ''">
|
||||
AND a.classify like concat(concat('%',#{classify,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="attribute != null and attribute != ''">
|
||||
AND a.attribute like concat(concat('%',#{attribute,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="lable != null and lable != ''">
|
||||
AND a.lable like concat(concat('%',#{lable,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="areaEffectiveIds != null and areaEffectiveIds != ''">
|
||||
AND a.AREA_EFFECTIVE_IDS like concat(concat('%',#{areaEffectiveIds,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="functionId != null">
|
||||
AND a.function_id=#{functionId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<!-- 数据范围过滤 -->
|
||||
${sqlMap.dsf}
|
||||
</trim>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy},a.is_audit,a.CFG_ID desc
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY a.is_audit,a.CFG_ID desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
<select id="getCfgById" resultMap="ProxyFileInsertScriptCfg">
|
||||
SELECT
|
||||
<include refid="ProxyFileInsertScriptCfgColumn" />
|
||||
FROM PXY_PROFILE_INSERT_SCRIPTS a
|
||||
<where>
|
||||
<if test="cfgId != null">
|
||||
and a.CFG_ID=#{cfgId,jdbcType=INTEGER}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<insert id="insert" parameterType="com.nis.domain.callback.ProxyFileInsertScriptCfg">
|
||||
<selectKey resultType="java.lang.Long" order="AFTER" keyProperty="cfgId">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into PXY_PROFILE_INSERT_SCRIPTS (
|
||||
CFG_DESC,
|
||||
ACTION,
|
||||
IS_VALID,
|
||||
IS_AUDIT,
|
||||
CREATOR_ID,
|
||||
CREATE_TIME,
|
||||
EDITOR_ID,
|
||||
EDIT_TIME,
|
||||
AUDITOR_ID,
|
||||
AUDIT_TIME,
|
||||
SERVICE_ID,
|
||||
REQUEST_ID,
|
||||
COMPILE_ID,
|
||||
IS_AREA_EFFECTIVE,
|
||||
CLASSIFY,
|
||||
ATTRIBUTE,
|
||||
LABLE,
|
||||
AREA_EFFECTIVE_IDS,
|
||||
function_id,
|
||||
cfg_type,
|
||||
cfg_region_code,
|
||||
|
||||
path,
|
||||
format
|
||||
)values (
|
||||
#{cfgDesc,jdbcType=VARCHAR},
|
||||
#{action,jdbcType=INTEGER},
|
||||
0,
|
||||
0,
|
||||
#{creatorId,jdbcType=INTEGER},
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
#{editorId,jdbcType=INTEGER},
|
||||
#{editTime,jdbcType=TIMESTAMP},
|
||||
#{auditorId,jdbcType=INTEGER},
|
||||
#{auditTime,jdbcType=TIMESTAMP},
|
||||
#{serviceId,jdbcType=INTEGER},
|
||||
#{requestId,jdbcType=INTEGER},
|
||||
#{compileId,jdbcType=INTEGER},
|
||||
#{isAreaEffective,jdbcType=INTEGER},
|
||||
#{classify,jdbcType=VARCHAR},
|
||||
#{attribute,jdbcType=VARCHAR},
|
||||
#{lable,jdbcType=VARCHAR},
|
||||
#{areaEffectiveIds,jdbcType=VARCHAR},
|
||||
#{functionId,jdbcType=INTEGER},
|
||||
#{cfgType,jdbcType=VARCHAR},
|
||||
#{cfgRegionCode,jdbcType=INTEGER},
|
||||
|
||||
#{path,jdbcType=VARCHAR},
|
||||
#{format,jdbcType=VARCHAR}
|
||||
)
|
||||
</insert>
|
||||
|
||||
|
||||
<update id="update" parameterType="com.nis.domain.callback.ProxyFileInsertScriptCfg" >
|
||||
update PXY_PROFILE_INSERT_SCRIPTS
|
||||
<set>
|
||||
<if test="cfgDesc != null and cfgDesc != ''" >
|
||||
cfg_desc = #{cfgDesc,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="action != null" >
|
||||
action = #{action,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isValid != null" >
|
||||
is_valid = #{isValid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isAudit != null" >
|
||||
is_audit = #{isAudit,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="creatorId != null" >
|
||||
creator_id = #{creatorId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="createTime != null and createTime != ''" >
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="editorId != null" >
|
||||
editor_id = #{editorId,jdbcType=INTEGER},
|
||||
</if>
|
||||
edit_time = #{editTime,jdbcType=TIMESTAMP},
|
||||
<if test="auditorId != null" >
|
||||
auditor_id = #{auditorId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="auditTime != null and auditTime != ''" >
|
||||
audit_time = #{auditTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="serviceId != null" >
|
||||
service_id = #{serviceId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="requestId != null" >
|
||||
request_id = #{requestId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isAreaEffective != null" >
|
||||
is_area_effective = #{isAreaEffective,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="classify != null and classify != ''" >
|
||||
classify = #{classify,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="attribute != null and attribute != ''" >
|
||||
attribute = #{attribute,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="lable != null and lable != ''" >
|
||||
lable = #{lable,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="areaEffectiveIds != null" >
|
||||
area_effective_ids = #{areaEffectiveIds,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="functionId != null" >
|
||||
function_id = #{functionId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="cfgRegionCode != null" >
|
||||
cfg_region_code = #{cfgRegionCode,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="cfgType != null" >
|
||||
cfg_type = #{cfgType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="path != null" >
|
||||
path = #{path ,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="format != null" >
|
||||
format = #{format ,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where cfg_id = #{cfgId,jdbcType=BIGINT}
|
||||
</update>
|
||||
|
||||
<!-- 查出所有 有效数据-->
|
||||
<select id="findByList" resultMap="ProxyFileInsertScriptCfg">
|
||||
SELECT
|
||||
<include refid="ProxyFileInsertScriptCfgColumn"/>
|
||||
<trim prefix="," prefixOverrides=",">
|
||||
,s.name as creator_name,e.name as editor_name,u.name as auditor_name
|
||||
,ri.request_title as requestName
|
||||
</trim>
|
||||
FROM PXY_PROFILE_INSERT_SCRIPTS a
|
||||
left join sys_user s on a.creator_id=s.id
|
||||
left join sys_user e on a.editor_id=e.id
|
||||
left join sys_user u on a.auditor_id=u.id
|
||||
left join request_info ri on a.request_id=ri.id
|
||||
where a.CFG_ID in (${ids})
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -74,15 +74,33 @@
|
||||
<if test="action != null">
|
||||
AND a.ACTION=#{action,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isValid != null">
|
||||
AND a.IS_VALID=#{isValid,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isValid == null">
|
||||
AND a.IS_VALID != -1
|
||||
</if>
|
||||
<if test="isAudit != null">
|
||||
AND a.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
|
||||
</if>
|
||||
<choose>
|
||||
<!-- 判断是否批量操作 -->
|
||||
<when test="batchValidValue != null and batchValidValue != ''">
|
||||
AND a.IS_VALID in (${batchValidValue})
|
||||
</when>
|
||||
<otherwise>
|
||||
<if test="isValid != null">
|
||||
AND a.IS_VALID=#{isValid,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isValid == null">
|
||||
AND a.IS_VALID != -1
|
||||
</if>
|
||||
</otherwise>
|
||||
</choose>
|
||||
<choose>
|
||||
<!-- 判断是否批量操作 -->
|
||||
<when test="batchAuditValue != null and batchAuditValue != ''">
|
||||
<if test="isAudit != null">
|
||||
AND a.IS_AUDIT in(${batchAuditValue})
|
||||
</if>
|
||||
</when>
|
||||
<otherwise>
|
||||
<if test="isAudit != null">
|
||||
AND a.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
|
||||
</if>
|
||||
</otherwise>
|
||||
</choose>
|
||||
<if test="creatorName != null and creatorName != ''">
|
||||
AND a.CREATOR_NAME like concat(concat('%',#{creatorName,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
@@ -148,6 +166,9 @@
|
||||
</select>
|
||||
|
||||
<insert id="insert" parameterType="com.nis.domain.callback.ProxyFileStrategyCfg" >
|
||||
<selectKey resultType="java.lang.Long" order="AFTER" keyProperty="cfgId">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into proxy_file_strategy_cfg (
|
||||
CFG_DESC,
|
||||
ACTION,
|
||||
@@ -179,8 +200,8 @@
|
||||
)values (
|
||||
#{cfgDesc,jdbcType=VARCHAR},
|
||||
#{action,jdbcType=INTEGER},
|
||||
0,
|
||||
0,
|
||||
#{isValid,jdbcType=INTEGER},
|
||||
#{isAudit,jdbcType=INTEGER},
|
||||
#{creatorId,jdbcType=INTEGER},
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
#{editorId,jdbcType=INTEGER},
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.nis.web.dao.configuration;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import com.nis.domain.callback.ProxyFileTrafficMirrorCfg;
|
||||
import com.nis.web.dao.CrudDao;
|
||||
import com.nis.web.dao.MyBatisDao;
|
||||
|
||||
@MyBatisDao
|
||||
public interface ProxyFileTrafficMirrorDao extends CrudDao<ProxyFileTrafficMirrorCfg>{
|
||||
|
||||
public List<ProxyFileTrafficMirrorCfg> findPage(ProxyFileTrafficMirrorCfg entity) ;
|
||||
|
||||
public ProxyFileTrafficMirrorCfg getCfgById(@Param("cfgId")Long cfgId);
|
||||
|
||||
List<ProxyFileTrafficMirrorCfg> findByList(@Param("ids")String ids);
|
||||
}
|
||||
@@ -0,0 +1,309 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.nis.web.dao.configuration.ProxyFileTrafficMirrorDao" >
|
||||
|
||||
<resultMap id="ProxyFileTrafficMirrorCfg" type="com.nis.domain.callback.ProxyFileTrafficMirrorCfg" >
|
||||
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
||||
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
||||
<result column="cfg_type" property="cfgType" jdbcType="VARCHAR" />
|
||||
<result column="action" property="action" jdbcType="INTEGER" />
|
||||
<result column="level" property="level" jdbcType="INTEGER" />
|
||||
<result column="is_valid" property="isValid" jdbcType="INTEGER" />
|
||||
<result column="is_audit" property="isAudit" jdbcType="INTEGER" />
|
||||
<result column="creator_id" property="creatorId" jdbcType="INTEGER" />
|
||||
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
|
||||
<result column="editor_id" property="editorId" jdbcType="INTEGER" />
|
||||
<result column="edit_time" property="editTime" jdbcType="TIMESTAMP" />
|
||||
<result column="auditor_id" property="auditorId" jdbcType="INTEGER" />
|
||||
<result column="audit_time" property="auditTime" jdbcType="TIMESTAMP" />
|
||||
<result column="service_id" property="serviceId" jdbcType="INTEGER" />
|
||||
<result column="request_id" property="requestId" jdbcType="INTEGER" />
|
||||
<result column="compile_id" property="compileId" jdbcType="INTEGER" />
|
||||
<result column="is_area_effective" property="isAreaEffective" jdbcType="INTEGER" />
|
||||
<result column="classify" property="classify" jdbcType="VARCHAR" />
|
||||
<result column="attribute" property="attribute" jdbcType="VARCHAR" />
|
||||
<result column="lable" property="lable" jdbcType="VARCHAR" />
|
||||
<result column="area_effective_ids" property="areaEffectiveIds" jdbcType="VARCHAR" />
|
||||
<result column="function_id" property="functionId" jdbcType="INTEGER" />
|
||||
<result column="cfg_region_code" property="cfgRegionCode" jdbcType="INTEGER" />
|
||||
<result column="creator_name" property="creatorName" jdbcType="VARCHAR" />
|
||||
<result column="auditor_name" property="auditorName" jdbcType="VARCHAR" />
|
||||
<result column="editor_name" property="editorName" jdbcType="VARCHAR" />
|
||||
|
||||
<result column="addr_list" property="addrList" jdbcType="VARCHAR" />
|
||||
<result column="addr_type" property="addrType" jdbcType="VARCHAR" />
|
||||
<result column="cancel_request_id" property="cancelRequestId" jdbcType="INTEGER" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="ProxyFileTrafficMirrorCfgColumn" >
|
||||
a.CFG_ID,a.CFG_DESC,a.ACTION,a.IS_VALID,a.IS_AUDIT,
|
||||
a.CREATOR_ID,a.CREATE_TIME,a.EDITOR_ID,a.EDIT_TIME,a.AUDITOR_ID,a.AUDIT_TIME,
|
||||
a.SERVICE_ID,a.REQUEST_ID,a.COMPILE_ID,a.IS_AREA_EFFECTIVE,a.CLASSIFY,
|
||||
a.ATTRIBUTE,a.LABLE,a.AREA_EFFECTIVE_IDS,a.function_id,a.cfg_type,a.cfg_region_code,
|
||||
a.ADDR_LIST,a.ADDR_TYPE,a.CANCEL_REQUEST_ID
|
||||
</sql>
|
||||
|
||||
|
||||
<!-- voip条件查询列表信息 -->
|
||||
<select id="findPage" resultMap="ProxyFileTrafficMirrorCfg" parameterType="com.nis.domain.callback.ProxyFileTrafficMirrorCfg" >
|
||||
SELECT
|
||||
<include refid="ProxyFileTrafficMirrorCfgColumn" />
|
||||
<trim prefix="," prefixOverrides=",">
|
||||
, s.name as creator_name,e.name as editor_name,u.name as auditor_name
|
||||
,ri.request_title as requestName<!-- ,i.is_valid as quote -->
|
||||
</trim>
|
||||
FROM PXY_PROFILE_TRAFFIC_MIRROR a
|
||||
left join sys_user s on a.creator_id=s.id
|
||||
left join sys_user e on a.editor_id=e.id
|
||||
left join sys_user u on a.auditor_id=u.id
|
||||
left join request_info ri on a.request_id=ri.id
|
||||
<!-- left join cfg_index_info i on a.COMPILE_ID=i.user_region4 -->
|
||||
<trim prefix="WHERE" prefixOverrides="AND |OR ">
|
||||
<if test="page !=null and page.where != null and page.where != ''">
|
||||
AND ${page.where}
|
||||
</if>
|
||||
<if test="cfgId != null">
|
||||
AND a.CFG_ID=#{cfgId,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="cfgDesc != null and cfgDesc != ''">
|
||||
AND a.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="action != null">
|
||||
AND a.ACTION=#{action,jdbcType=INTEGER}
|
||||
</if>
|
||||
<choose>
|
||||
<!-- 判断是否批量操作 -->
|
||||
<when test="batchValidValue != null and batchValidValue != ''">
|
||||
AND a.IS_VALID in (${batchValidValue})
|
||||
</when>
|
||||
<otherwise>
|
||||
<if test="isValid != null">
|
||||
AND a.IS_VALID=#{isValid,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isValid == null">
|
||||
AND a.IS_VALID != -1
|
||||
</if>
|
||||
</otherwise>
|
||||
</choose>
|
||||
<choose>
|
||||
<!-- 判断是否批量操作 -->
|
||||
<when test="batchAuditValue != null and batchAuditValue != ''">
|
||||
<if test="isAudit != null">
|
||||
AND a.IS_AUDIT in(${batchAuditValue})
|
||||
</if>
|
||||
</when>
|
||||
<otherwise>
|
||||
<if test="isAudit != null">
|
||||
AND a.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
|
||||
</if>
|
||||
</otherwise>
|
||||
</choose>
|
||||
<if test="creatorName != null and creatorName != ''">
|
||||
AND a.CREATOR_NAME like concat(concat('%',#{creatorName,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="editorName != null and editorName != ''">
|
||||
AND a.EDITOR_NAME like concat(concat('%',#{editorName,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="auditorName != null and auditorName != ''">
|
||||
AND a.AUDITOR_NAME like concat(concat('%',#{auditorName,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="serviceId != null">
|
||||
AND a.SERVICE_ID=#{serviceId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="requestId != null">
|
||||
AND a.REQUEST_ID=#{requestId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="compileId != null">
|
||||
AND a.COMPILE_ID=#{compileId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isAreaEffective != null">
|
||||
AND a.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="classify != null and classify != ''">
|
||||
AND a.classify like concat(concat('%',#{classify,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="attribute != null and attribute != ''">
|
||||
AND a.attribute like concat(concat('%',#{attribute,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="lable != null and lable != ''">
|
||||
AND a.lable like concat(concat('%',#{lable,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="areaEffectiveIds != null and areaEffectiveIds != ''">
|
||||
AND a.AREA_EFFECTIVE_IDS like concat(concat('%',#{areaEffectiveIds,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="functionId != null">
|
||||
AND a.function_id=#{functionId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="addrType != null and addrType != ''">
|
||||
AND a.addr_type like concat(concat('%',#{addrType,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<!-- 数据范围过滤 -->
|
||||
${sqlMap.dsf}
|
||||
</trim>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy},a.is_audit,a.CFG_ID desc
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY a.is_audit,a.CFG_ID desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
<select id="getCfgById" resultMap="ProxyFileTrafficMirrorCfg">
|
||||
SELECT
|
||||
<include refid="ProxyFileTrafficMirrorCfgColumn" />
|
||||
FROM PXY_PROFILE_TRAFFIC_MIRROR a
|
||||
<where>
|
||||
<if test="cfgId != null">
|
||||
and a.CFG_ID=#{cfgId,jdbcType=INTEGER}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<insert id="insert" parameterType="com.nis.domain.callback.ProxyFileTrafficMirrorCfg">
|
||||
<selectKey resultType="java.lang.Long" order="AFTER" keyProperty="cfgId">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into PXY_PROFILE_TRAFFIC_MIRROR (
|
||||
CFG_DESC,
|
||||
ACTION,
|
||||
IS_VALID,
|
||||
IS_AUDIT,
|
||||
CREATOR_ID,
|
||||
CREATE_TIME,
|
||||
EDITOR_ID,
|
||||
EDIT_TIME,
|
||||
AUDITOR_ID,
|
||||
AUDIT_TIME,
|
||||
SERVICE_ID,
|
||||
REQUEST_ID,
|
||||
COMPILE_ID,
|
||||
IS_AREA_EFFECTIVE,
|
||||
CLASSIFY,
|
||||
ATTRIBUTE,
|
||||
LABLE,
|
||||
AREA_EFFECTIVE_IDS,
|
||||
function_id,
|
||||
cfg_type,
|
||||
cfg_region_code,
|
||||
|
||||
addr_list,
|
||||
addr_type
|
||||
)values (
|
||||
#{cfgDesc,jdbcType=VARCHAR},
|
||||
#{action,jdbcType=INTEGER},
|
||||
#{isValid,jdbcType=INTEGER},
|
||||
#{isAudit,jdbcType=INTEGER},
|
||||
#{creatorId,jdbcType=INTEGER},
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
#{editorId,jdbcType=INTEGER},
|
||||
#{editTime,jdbcType=TIMESTAMP},
|
||||
#{auditorId,jdbcType=INTEGER},
|
||||
#{auditTime,jdbcType=TIMESTAMP},
|
||||
#{serviceId,jdbcType=INTEGER},
|
||||
#{requestId,jdbcType=INTEGER},
|
||||
#{compileId,jdbcType=INTEGER},
|
||||
#{isAreaEffective,jdbcType=INTEGER},
|
||||
#{classify,jdbcType=VARCHAR},
|
||||
#{attribute,jdbcType=VARCHAR},
|
||||
#{lable,jdbcType=VARCHAR},
|
||||
#{areaEffectiveIds,jdbcType=VARCHAR},
|
||||
#{functionId,jdbcType=INTEGER},
|
||||
#{cfgType,jdbcType=VARCHAR},
|
||||
#{cfgRegionCode,jdbcType=INTEGER},
|
||||
|
||||
#{addrList,jdbcType=VARCHAR},
|
||||
#{addrType,jdbcType=VARCHAR}
|
||||
)
|
||||
</insert>
|
||||
|
||||
|
||||
<update id="update" parameterType="com.nis.domain.callback.ProxyFileTrafficMirrorCfg" >
|
||||
update PXY_PROFILE_TRAFFIC_MIRROR
|
||||
<set>
|
||||
<if test="cfgDesc != null and cfgDesc != ''" >
|
||||
cfg_desc = #{cfgDesc,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="action != null" >
|
||||
action = #{action,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isValid != null" >
|
||||
is_valid = #{isValid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isAudit != null" >
|
||||
is_audit = #{isAudit,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="creatorId != null" >
|
||||
creator_id = #{creatorId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="createTime != null and createTime != ''" >
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="editorId != null" >
|
||||
editor_id = #{editorId,jdbcType=INTEGER},
|
||||
</if>
|
||||
edit_time = #{editTime,jdbcType=TIMESTAMP},
|
||||
<if test="auditorId != null" >
|
||||
auditor_id = #{auditorId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="auditTime != null and auditTime != ''" >
|
||||
audit_time = #{auditTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="serviceId != null" >
|
||||
service_id = #{serviceId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="requestId != null" >
|
||||
request_id = #{requestId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isAreaEffective != null" >
|
||||
is_area_effective = #{isAreaEffective,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="classify != null and classify != ''" >
|
||||
classify = #{classify,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="attribute != null and attribute != ''" >
|
||||
attribute = #{attribute,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="lable != null and lable != ''" >
|
||||
lable = #{lable,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="areaEffectiveIds != null" >
|
||||
area_effective_ids = #{areaEffectiveIds,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="functionId != null" >
|
||||
function_id = #{functionId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="cfgRegionCode != null" >
|
||||
cfg_region_code = #{cfgRegionCode,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="cfgType != null" >
|
||||
cfg_type = #{cfgType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="addrList != null" >
|
||||
addr_list = #{addrList,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="addrType != null" >
|
||||
addr_type = #{addrType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where cfg_id = #{cfgId,jdbcType=BIGINT}
|
||||
</update>
|
||||
|
||||
<!-- 导出:查出所有有效数据-->
|
||||
<select id="findByList" resultMap="ProxyFileTrafficMirrorCfg">
|
||||
SELECT
|
||||
<include refid="ProxyFileTrafficMirrorCfgColumn"/>
|
||||
<trim prefix="," prefixOverrides=",">
|
||||
,s.name as creator_name,e.name as editor_name,u.name as auditor_name
|
||||
,ri.request_title as requestName
|
||||
</trim>
|
||||
FROM PXY_PROFILE_TRAFFIC_MIRROR a
|
||||
left join sys_user s on a.creator_id=s.id
|
||||
left join sys_user e on a.editor_id=e.id
|
||||
left join sys_user u on a.auditor_id=u.id
|
||||
left join request_info ri on a.request_id=ri.id
|
||||
where a.CFG_ID in (${ids})
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -9,6 +9,7 @@ import java.nio.charset.Charset;
|
||||
import java.sql.SQLException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
@@ -53,6 +54,14 @@ import com.nis.domain.basics.AsnGroupInfo;
|
||||
import com.nis.domain.basics.AsnIpCfg;
|
||||
import com.nis.domain.callback.InlineIp;
|
||||
import com.nis.domain.callback.NtcDnsResStrategy;
|
||||
import com.nis.domain.callback.ProxyFileHijackCfg;
|
||||
import com.nis.domain.callback.ProxyFileHijackCfgAudit;
|
||||
import com.nis.domain.callback.ProxyFileInsertScriptCfg;
|
||||
import com.nis.domain.callback.ProxyFileInsertScriptCfgAudit;
|
||||
import com.nis.domain.callback.ProxyFileStrategyCfg;
|
||||
import com.nis.domain.callback.ProxyFileStrategyCfgAudit;
|
||||
import com.nis.domain.callback.ProxyFileTrafficMirrorCfg;
|
||||
import com.nis.domain.callback.ProxyFileTrafficMirrorCfgAudit;
|
||||
import com.nis.domain.callback.ProxyObjKeyring;
|
||||
import com.nis.domain.callback.ProxyObjTrustedCa;
|
||||
import com.nis.domain.configuration.AppComplexFeatureCfg;
|
||||
@@ -3078,5 +3087,68 @@ public abstract class BaseService {
|
||||
}
|
||||
return schedule;
|
||||
}
|
||||
|
||||
//劫持文件
|
||||
public static ProxyFileHijackCfgAudit convertCallBackProxyFileHijack(ProxyFileHijackCfg cfg) {
|
||||
ProxyFileHijackCfgAudit hijackTemp = new ProxyFileHijackCfgAudit();
|
||||
hijackTemp.setId(Long.valueOf(cfg.getCompileId()));
|
||||
hijackTemp.setCfgId(cfg.getCompileId());
|
||||
hijackTemp.setProfileId(cfg.getCompileId());
|
||||
hijackTemp.setContentType(cfg.getContentType());
|
||||
hijackTemp.setContentName(keywordsEscape(cfg.getContentName()));
|
||||
hijackTemp.setProfileName(keywordsEscape(cfg.getCfgDesc()));
|
||||
hijackTemp.setPath(cfg.getPath());
|
||||
hijackTemp.setAction(cfg.getAction());
|
||||
hijackTemp.setService(cfg.getServiceId());
|
||||
hijackTemp.setIsValid(cfg.getIsValid());
|
||||
hijackTemp.setOpTime(cfg.getAuditTime());
|
||||
return hijackTemp;
|
||||
}
|
||||
//注入脚本文件
|
||||
public static ProxyFileInsertScriptCfgAudit convertCallBackProxyFileInsertScript(ProxyFileInsertScriptCfg cfg) {
|
||||
ProxyFileInsertScriptCfgAudit fileInsertScriptTemp = new ProxyFileInsertScriptCfgAudit();
|
||||
fileInsertScriptTemp.setId(Long.valueOf(cfg.getCompileId()));
|
||||
fileInsertScriptTemp.setCfgId(cfg.getCompileId());
|
||||
fileInsertScriptTemp.setProfileId(cfg.getCompileId());
|
||||
fileInsertScriptTemp.setFormat(cfg.getFormat());
|
||||
fileInsertScriptTemp.setProfileName(keywordsEscape(cfg.getCfgDesc()));
|
||||
fileInsertScriptTemp.setPath(cfg.getPath());
|
||||
fileInsertScriptTemp.setAction(cfg.getAction());
|
||||
fileInsertScriptTemp.setService(cfg.getServiceId());
|
||||
fileInsertScriptTemp.setIsValid(cfg.getIsValid());
|
||||
fileInsertScriptTemp.setOpTime(cfg.getAuditTime());
|
||||
return fileInsertScriptTemp;
|
||||
}
|
||||
//流量转发目的地址
|
||||
public static ProxyFileTrafficMirrorCfgAudit convertCallBackProxyFileTrafficMirror(ProxyFileTrafficMirrorCfg cfg) {
|
||||
ProxyFileTrafficMirrorCfgAudit fileTemp = new ProxyFileTrafficMirrorCfgAudit();
|
||||
fileTemp.setId(Long.valueOf(cfg.getCompileId()));
|
||||
fileTemp.setCfgId(cfg.getCompileId());
|
||||
fileTemp.setProfileId(cfg.getCompileId());
|
||||
fileTemp.setProfileName(keywordsEscape(cfg.getCfgDesc()));
|
||||
fileTemp.setAddrList(Arrays.asList(cfg.getAddrList().split(",")));
|
||||
fileTemp.setAddrType(cfg.getAddrType());
|
||||
fileTemp.setAction(cfg.getAction());
|
||||
fileTemp.setService(cfg.getServiceId());
|
||||
fileTemp.setIsValid(cfg.getIsValid());
|
||||
fileTemp.setOpTime(cfg.getAuditTime());
|
||||
return fileTemp;
|
||||
}
|
||||
//文件策略
|
||||
public static ProxyFileStrategyCfgAudit convertCallBackProxyFileStrategy(ProxyFileStrategyCfg cfg) {
|
||||
ProxyFileStrategyCfgAudit fileTemp = new ProxyFileStrategyCfgAudit();
|
||||
fileTemp.setId(Long.valueOf(cfg.getCompileId()));
|
||||
fileTemp.setCfgId(cfg.getCompileId());
|
||||
fileTemp.setFileId(Long.valueOf(cfg.getCompileId()));
|
||||
fileTemp.setFileDesc(keywordsEscape(cfg.getFileDesc()));
|
||||
fileTemp.setContentType(cfg.getContentType());
|
||||
fileTemp.setContentLength(cfg.getContentLength());
|
||||
fileTemp.setAction(cfg.getAction());
|
||||
fileTemp.setService(cfg.getServiceId());
|
||||
fileTemp.setFilePath(cfg.getUrl());
|
||||
fileTemp.setIsValid(cfg.getIsValid());
|
||||
fileTemp.setOpTime(cfg.getAuditTime());
|
||||
return fileTemp;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -13,6 +13,14 @@ import com.google.common.collect.Lists;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.callback.InlineIp;
|
||||
import com.nis.domain.callback.NtcDnsResStrategy;
|
||||
import com.nis.domain.callback.ProxyFileHijackCfg;
|
||||
import com.nis.domain.callback.ProxyFileHijackCfgAudit;
|
||||
import com.nis.domain.callback.ProxyFileInsertScriptCfg;
|
||||
import com.nis.domain.callback.ProxyFileInsertScriptCfgAudit;
|
||||
import com.nis.domain.callback.ProxyFileStrategyCfg;
|
||||
import com.nis.domain.callback.ProxyFileStrategyCfgAudit;
|
||||
import com.nis.domain.callback.ProxyFileTrafficMirrorCfg;
|
||||
import com.nis.domain.callback.ProxyFileTrafficMirrorCfgAudit;
|
||||
import com.nis.domain.callback.ProxyObjKeyring;
|
||||
import com.nis.domain.callback.ProxyObjTrustedCa;
|
||||
import com.nis.domain.configuration.BaseCfg;
|
||||
@@ -361,6 +369,42 @@ public class CommonPolicyService extends CrudService<WebsiteCfgDao, CfgIndexInfo
|
||||
if(convertList.size() > 0) {
|
||||
notAuditList = convertList;
|
||||
}
|
||||
}else if(entity.getServiceId().equals(643)) { // 劫持文件
|
||||
List<ProxyFileHijackCfgAudit> convertList = Lists.newArrayList();
|
||||
for (Object object : notAuditList) {
|
||||
ProxyFileHijackCfg cfg = (ProxyFileHijackCfg)object;
|
||||
convertList.add(BaseService.convertCallBackProxyFileHijack(cfg));
|
||||
}
|
||||
if(convertList.size() > 0) {
|
||||
notAuditList = convertList;
|
||||
}
|
||||
}else if(entity.getServiceId().equals(644)) { // 注入脚本文件
|
||||
List<ProxyFileInsertScriptCfgAudit> convertList = Lists.newArrayList();
|
||||
for (Object object : notAuditList) {
|
||||
ProxyFileInsertScriptCfg cfg = (ProxyFileInsertScriptCfg)object;
|
||||
convertList.add(BaseService.convertCallBackProxyFileInsertScript(cfg));
|
||||
}
|
||||
if(convertList.size() > 0) {
|
||||
notAuditList = convertList;
|
||||
}
|
||||
}else if(entity.getServiceId().equals(645)) { // 流量转发目的地址
|
||||
List<ProxyFileTrafficMirrorCfgAudit> convertList = Lists.newArrayList();
|
||||
for (Object object : notAuditList) {
|
||||
ProxyFileTrafficMirrorCfg cfg = (ProxyFileTrafficMirrorCfg)object;
|
||||
convertList.add(BaseService.convertCallBackProxyFileTrafficMirror(cfg));
|
||||
}
|
||||
if(convertList.size() > 0) {
|
||||
notAuditList = convertList;
|
||||
}
|
||||
}else if(entity.getServiceId().equals(608)) { // 文件策略
|
||||
List<ProxyFileStrategyCfgAudit> convertList = Lists.newArrayList();
|
||||
for (Object object : notAuditList) {
|
||||
ProxyFileStrategyCfg cfg = (ProxyFileStrategyCfg)object;
|
||||
convertList.add(BaseService.convertCallBackProxyFileStrategy(cfg));
|
||||
}
|
||||
if(convertList.size() > 0) {
|
||||
notAuditList = convertList;
|
||||
}
|
||||
}
|
||||
// 格式转换 -->
|
||||
|
||||
@@ -423,6 +467,42 @@ public class CommonPolicyService extends CrudService<WebsiteCfgDao, CfgIndexInfo
|
||||
if(convertList.size() > 0) {
|
||||
auditList = convertList;
|
||||
}
|
||||
}else if(entity.getServiceId().equals(643)) { // 劫持文件
|
||||
List<ProxyFileHijackCfgAudit> convertList = Lists.newArrayList();
|
||||
for (Object object : auditList) {
|
||||
ProxyFileHijackCfg cfg = (ProxyFileHijackCfg)object;
|
||||
convertList.add(BaseService.convertCallBackProxyFileHijack(cfg));
|
||||
}
|
||||
if(convertList.size() > 0) {
|
||||
auditList = convertList;
|
||||
}
|
||||
}else if(entity.getServiceId().equals(644)) { // 劫持文件
|
||||
List<ProxyFileInsertScriptCfgAudit> convertList = Lists.newArrayList();
|
||||
for (Object object : auditList) {
|
||||
ProxyFileInsertScriptCfg cfg = (ProxyFileInsertScriptCfg)object;
|
||||
convertList.add(BaseService.convertCallBackProxyFileInsertScript(cfg));
|
||||
}
|
||||
if(convertList.size() > 0) {
|
||||
auditList = convertList;
|
||||
}
|
||||
}else if(entity.getServiceId().equals(645)) { // 流量转发目的地址
|
||||
List<ProxyFileTrafficMirrorCfgAudit> convertList = Lists.newArrayList();
|
||||
for (Object object : auditList) {
|
||||
ProxyFileTrafficMirrorCfg cfg = (ProxyFileTrafficMirrorCfg)object;
|
||||
convertList.add(BaseService.convertCallBackProxyFileTrafficMirror(cfg));
|
||||
}
|
||||
if(convertList.size() > 0) {
|
||||
auditList = convertList;
|
||||
}
|
||||
}else if(entity.getServiceId().equals(608)) { // 文件策略
|
||||
List<ProxyFileStrategyCfgAudit> convertList = Lists.newArrayList();
|
||||
for (Object object : notAuditList) {
|
||||
ProxyFileStrategyCfg cfg = (ProxyFileStrategyCfg)object;
|
||||
convertList.add(BaseService.convertCallBackProxyFileStrategy(cfg));
|
||||
}
|
||||
if(convertList.size() > 0) {
|
||||
notAuditList = convertList;
|
||||
}
|
||||
}
|
||||
// 格式转换 -->
|
||||
|
||||
|
||||
@@ -0,0 +1,157 @@
|
||||
package com.nis.web.service.configuration;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.beust.jcommander.internal.Lists;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.callback.ProxyFileHijackCfg;
|
||||
import com.nis.domain.callback.ProxyFileHijackCfgAudit;
|
||||
import com.nis.domain.callback.ProxyObjKeyring;
|
||||
import com.nis.domain.configuration.PxyObjKeyring;
|
||||
import com.nis.domain.maat.ToMaatResult;
|
||||
import com.nis.exceptions.MaatConvertException;
|
||||
import com.nis.util.ConfigServiceUtil;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.web.dao.configuration.ProxyFileHijackDao;
|
||||
import com.nis.web.security.UserUtils;
|
||||
import com.nis.web.service.BaseService;
|
||||
|
||||
import jersey.repackaged.com.google.common.collect.Maps;
|
||||
|
||||
@Service
|
||||
public class ProxyFileHijackService extends BaseService {
|
||||
|
||||
@Autowired
|
||||
protected ProxyFileHijackDao proxyFileDao;
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param page
|
||||
* @param entity
|
||||
* @return
|
||||
*/
|
||||
public Page<ProxyFileHijackCfg> findPage(Page page, ProxyFileHijackCfg entity) {
|
||||
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"a"));
|
||||
entity.setPage(page);
|
||||
List<ProxyFileHijackCfg> list=proxyFileDao.findPage(entity);
|
||||
page.setList(list);
|
||||
return page;
|
||||
}
|
||||
|
||||
public ProxyFileHijackCfg getCfgById(Long cfgId) {
|
||||
return proxyFileDao.getCfgById(cfgId);
|
||||
}
|
||||
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public void saveOrUpdate(ProxyFileHijackCfg entity){
|
||||
Date createTime=new Date();
|
||||
setAreaEffectiveIds(entity);
|
||||
int isValid=0;
|
||||
if(!StringUtil.isEmpty(entity.getIsValid()) && entity.getIsValid()==1) {
|
||||
isValid=1;
|
||||
}
|
||||
entity.setIsValid(0);
|
||||
entity.setIsAudit(0);
|
||||
//新增
|
||||
if(StringUtil.isEmpty(entity.getCfgId())){
|
||||
entity.initDefaultValue();
|
||||
entity.setCreatorId(UserUtils.getUser().getId());
|
||||
entity.setCreateTime(createTime);
|
||||
//调用服务接口获取compileId
|
||||
try {
|
||||
Integer compileId = ConfigServiceUtil.getId(1, 1).get(0);//获取编译id
|
||||
entity.setCompileId(compileId);
|
||||
} catch (Exception e) {
|
||||
logger.info("获取编译ID出错");
|
||||
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>:"+e.getMessage());
|
||||
}
|
||||
proxyFileDao.insert(entity);
|
||||
//修改
|
||||
}else{
|
||||
Date editTime=new Date();
|
||||
entity.setEditorId(UserUtils.getUser().getId());
|
||||
entity.setEditTime(editTime);
|
||||
|
||||
proxyFileDao.update(entity);
|
||||
}
|
||||
if(isValid==1) {
|
||||
entity.setIsAudit(1);
|
||||
entity.setIsValid(1);
|
||||
audit( entity.getIsAudit(), isValid, entity.getFunctionId(), String.valueOf(entity.getCfgId()));
|
||||
}
|
||||
}
|
||||
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public void update(Integer isAudit,Integer isValid,String ids,Integer functionId){
|
||||
ProxyFileHijackCfg entity = new ProxyFileHijackCfg();
|
||||
String[] idArray = ids.split(",");
|
||||
for(String id :idArray){
|
||||
entity.setCfgId(Long.parseLong(id));
|
||||
entity.setFunctionId(functionId);
|
||||
entity.setIsAudit(isAudit);
|
||||
entity.setIsValid(isValid);
|
||||
entity.setEditorId(UserUtils.getUser().getId());
|
||||
entity.setEditTime(new Date());
|
||||
proxyFileDao.update(entity);
|
||||
}
|
||||
}
|
||||
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public void audit(Integer isAudit,Integer isValid,Integer functionId,String id){
|
||||
Date auditTime = new Date();
|
||||
ProxyFileHijackCfg cfg=new ProxyFileHijackCfg();
|
||||
cfg.setCfgId(Long.valueOf(id));
|
||||
cfg.setIsValid(isValid);
|
||||
cfg.setIsAudit(isAudit);
|
||||
cfg.setAuditorId(UserUtils.getUser().getId());
|
||||
cfg.setAuditTime(auditTime);
|
||||
proxyFileDao.update(cfg);
|
||||
cfg=proxyFileDao.getCfgById(cfg.getCfgId());
|
||||
String json="";
|
||||
if(cfg.getIsAudit()==1){
|
||||
List<ProxyFileHijackCfgAudit> list = new ArrayList<ProxyFileHijackCfgAudit>();
|
||||
ProxyFileHijackCfgAudit listConvert=convertCallBackProxyFileHijack(cfg);
|
||||
list.add(listConvert);
|
||||
//调用服务接口下发配置数据
|
||||
json=gsonToJson(list);
|
||||
logger.info("劫持文件配置下发配置参数:"+json);
|
||||
//调用服务接口下发配置
|
||||
try {
|
||||
//ToMaatResult result = ConfigServiceUtil.postCallbackCfg(json);
|
||||
/*if(result!=null){
|
||||
logger.info("劫持文件配置下发响应信息:"+result.getMsg());
|
||||
}*/
|
||||
} catch (Exception e) {
|
||||
logger.error("劫持文件配置配置下发失败",e);
|
||||
throw e;
|
||||
}
|
||||
}else if(cfg.getIsAudit()==3){
|
||||
List<ProxyFileHijackCfgAudit> list = new ArrayList<ProxyFileHijackCfgAudit>();
|
||||
ProxyFileHijackCfgAudit listConvert = convertCallBackProxyFileHijack(cfg);
|
||||
list.add(listConvert);
|
||||
//调用服务接口取消配置
|
||||
json=gsonToJson(list);
|
||||
logger.info("劫持文件配置配置参数:"+json);
|
||||
//调用服务接口取消配置
|
||||
try {
|
||||
/*ToMaatResult result = ConfigServiceUtil.put(json, 2);
|
||||
logger.info("劫持文件配置响应信息:"+result.getMsg());*/
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.info("劫持文件置配置失败");
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
}
|
||||
public List<ProxyFileHijackCfg> findByList(String ids) {
|
||||
List<ProxyFileHijackCfg> list=proxyFileDao.findByList(ids);
|
||||
return list;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,156 @@
|
||||
package com.nis.web.service.configuration;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.callback.ProxyFileHijackCfg;
|
||||
import com.nis.domain.callback.ProxyFileHijackCfgAudit;
|
||||
import com.nis.domain.callback.ProxyFileInsertScriptCfg;
|
||||
import com.nis.domain.callback.ProxyFileInsertScriptCfgAudit;
|
||||
import com.nis.domain.maat.ToMaatResult;
|
||||
import com.nis.exceptions.MaatConvertException;
|
||||
import com.nis.util.ConfigServiceUtil;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.web.dao.configuration.ProxyFileInsertScriptDao;
|
||||
import com.nis.web.security.UserUtils;
|
||||
import com.nis.web.service.BaseService;
|
||||
|
||||
@Service
|
||||
public class ProxyFileInsertScriptService extends BaseService{
|
||||
|
||||
|
||||
@Autowired
|
||||
protected ProxyFileInsertScriptDao proxyFileDao;
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param page
|
||||
* @param entity
|
||||
* @return
|
||||
*/
|
||||
public Page<ProxyFileInsertScriptCfg> findPage(Page page, ProxyFileInsertScriptCfg entity) {
|
||||
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"a"));
|
||||
entity.setPage(page);
|
||||
List<ProxyFileInsertScriptCfg> list = proxyFileDao.findPage(entity);
|
||||
page.setList(list);
|
||||
return page;
|
||||
}
|
||||
|
||||
public ProxyFileInsertScriptCfg getCfgById(Long cfgId) {
|
||||
return proxyFileDao.getCfgById(cfgId);
|
||||
}
|
||||
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public void saveOrUpdate(ProxyFileInsertScriptCfg entity){
|
||||
Date createTime=new Date();
|
||||
setAreaEffectiveIds(entity);
|
||||
int isValid=0;
|
||||
if(!StringUtil.isEmpty(entity.getIsValid()) && entity.getIsValid()==1) {
|
||||
isValid=1;
|
||||
}
|
||||
entity.setIsValid(0);
|
||||
entity.setIsAudit(0);
|
||||
//新增
|
||||
if(StringUtil.isEmpty(entity.getCfgId())){
|
||||
entity.initDefaultValue();
|
||||
entity.setCreatorId(UserUtils.getUser().getId());
|
||||
entity.setCreateTime(createTime);
|
||||
//调用服务接口获取compileId
|
||||
try {
|
||||
Integer compileId = ConfigServiceUtil.getId(1, 1).get(0);//获取编译id
|
||||
entity.setCompileId(compileId);
|
||||
} catch (Exception e) {
|
||||
logger.info("获取编译ID出错");
|
||||
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>:"+e.getMessage());
|
||||
}
|
||||
proxyFileDao.insert(entity);
|
||||
//修改
|
||||
}else{
|
||||
Date editTime=new Date();
|
||||
entity.setEditorId(UserUtils.getUser().getId());
|
||||
entity.setEditTime(editTime);
|
||||
|
||||
proxyFileDao.update(entity);
|
||||
}
|
||||
if(isValid==1) {
|
||||
entity.setIsAudit(1);
|
||||
entity.setIsValid(1);
|
||||
audit( entity.getIsAudit(), isValid, entity.getFunctionId(), String.valueOf(entity.getCfgId()));
|
||||
}
|
||||
}
|
||||
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public void audit(Integer isAudit,Integer isValid,Integer functionId,String id){
|
||||
Date auditTime = new Date();
|
||||
ProxyFileInsertScriptCfg cfg=new ProxyFileInsertScriptCfg();
|
||||
cfg.setCfgId(Long.valueOf(id));
|
||||
cfg.setIsValid(isValid);
|
||||
cfg.setIsAudit(isAudit);
|
||||
cfg.setAuditorId(UserUtils.getUser().getId());
|
||||
cfg.setAuditTime(auditTime);
|
||||
proxyFileDao.update(cfg);
|
||||
cfg=proxyFileDao.getCfgById(cfg.getCfgId());
|
||||
String json="";
|
||||
if(cfg.getIsAudit()==1){
|
||||
List<ProxyFileInsertScriptCfgAudit> list = new ArrayList<ProxyFileInsertScriptCfgAudit>();
|
||||
ProxyFileInsertScriptCfgAudit listConvert=convertCallBackProxyFileInsertScript(cfg);
|
||||
list.add(listConvert);
|
||||
//调用服务接口下发配置数据
|
||||
json=gsonToJson(list);
|
||||
logger.info("注入脚本文件配置下发配置参数:"+json);
|
||||
//调用服务接口下发配置
|
||||
try {
|
||||
ToMaatResult result = ConfigServiceUtil.postCallbackCfg(json);
|
||||
if(result!=null){
|
||||
logger.info("注入脚本文件配置下发响应信息:"+result.getMsg());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("注入脚本文件配置配置下发失败",e);
|
||||
throw e;
|
||||
}
|
||||
}else if(cfg.getIsAudit()==3){
|
||||
List<ProxyFileInsertScriptCfgAudit> list = new ArrayList<ProxyFileInsertScriptCfgAudit>();
|
||||
ProxyFileInsertScriptCfgAudit listConvert = convertCallBackProxyFileInsertScript(cfg);
|
||||
list.add(listConvert);
|
||||
//调用服务接口取消配置
|
||||
json=gsonToJson(list);
|
||||
logger.info("注入脚本文件配置配置参数:"+json);
|
||||
//调用服务接口取消配置
|
||||
try {
|
||||
ToMaatResult result = ConfigServiceUtil.put(json, 2);
|
||||
logger.info("注入脚本文件配置响应信息:"+result.getMsg());
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.info("注入脚本文件配置配置失败");
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public List<ProxyFileInsertScriptCfg> findByList(String ids) {
|
||||
List<ProxyFileInsertScriptCfg> list=proxyFileDao.findByList(ids);
|
||||
return list;
|
||||
}
|
||||
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public void delete(Integer isAudit,Integer isValid,String ids,Integer functionId){
|
||||
ProxyFileInsertScriptCfg entity = new ProxyFileInsertScriptCfg();
|
||||
String[] idArray = ids.split(",");
|
||||
for(String id :idArray){
|
||||
entity.setCfgId(Long.parseLong(id));
|
||||
entity.setFunctionId(functionId);
|
||||
entity.setIsAudit(isAudit);
|
||||
entity.setIsValid(isValid);
|
||||
entity.setEditorId(UserUtils.getUser().getId());
|
||||
entity.setEditTime(new Date());
|
||||
proxyFileDao.update(entity);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -12,8 +12,10 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
import com.beust.jcommander.internal.Lists;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.callback.ProxyFileStrategyCfg;
|
||||
import com.nis.domain.callback.ProxyFileStrategyCfgAudit;
|
||||
import com.nis.domain.maat.ToMaatResult;
|
||||
import com.nis.util.ConfigServiceUtil;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.web.dao.configuration.ProxyFileStrategyDao;
|
||||
import com.nis.web.security.UserUtils;
|
||||
import com.nis.web.service.BaseService;
|
||||
@@ -49,7 +51,13 @@ public class ProxyFileStrategyService extends BaseService{
|
||||
public void saveOrUpdate(ProxyFileStrategyCfg entity){
|
||||
Date createTime=new Date();
|
||||
//设置区域运营商信息
|
||||
setAreaEffectiveIds(entity);
|
||||
setAreaEffectiveIds(entity);
|
||||
int isValid=0;
|
||||
if(!StringUtil.isEmpty(entity.getIsValid()) && entity.getIsValid()==1) {
|
||||
isValid=1;
|
||||
}
|
||||
entity.setIsValid(0);
|
||||
entity.setIsAudit(0);
|
||||
//新增
|
||||
if(entity.getCfgId()==null){
|
||||
Integer compileId = ConfigServiceUtil.getId(1, 1).get(0);//获取编译id
|
||||
@@ -67,6 +75,11 @@ public class ProxyFileStrategyService extends BaseService{
|
||||
entity.setEditTime(editTime);
|
||||
proxyFileDao.update(entity);//更新
|
||||
}
|
||||
if(isValid==1) {
|
||||
entity.setIsAudit(1);
|
||||
entity.setIsValid(1);
|
||||
audit( entity.getIsAudit(), isValid, entity.getFunctionId(), String.valueOf(entity.getCfgId()));
|
||||
}
|
||||
}
|
||||
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
@@ -96,7 +109,9 @@ public class ProxyFileStrategyService extends BaseService{
|
||||
entity.setAuditTime(auditTime);
|
||||
proxyFileDao.update(entity);
|
||||
if(isAudit == 1) {//审核通过,下发配置回调配置信息
|
||||
Map<String,Object> params = Maps.newHashMap();
|
||||
List<ProxyFileStrategyCfgAudit> convertList = Lists.newArrayList();
|
||||
convertList.add(BaseService.convertCallBackProxyFileStrategy(entity));
|
||||
/*Map<String,Object> params = Maps.newHashMap();
|
||||
params.put("fileId", entity.getCompileId());//文件ID
|
||||
params.put("service", entity.getServiceId());//业务ID
|
||||
params.put("fileDesc", entity.getFileDesc());//文件描述
|
||||
@@ -106,20 +121,22 @@ public class ProxyFileStrategyService extends BaseService{
|
||||
params.put("isValid", 1);//有效标志,有效
|
||||
params.put("opTime", new Date());
|
||||
List list = Lists.newArrayList();
|
||||
list.add(params);
|
||||
String json = gsonToJson(list);
|
||||
list.add(params);*/
|
||||
String json = gsonToJson(convertList);
|
||||
logger.debug("params:" + json);
|
||||
ToMaatResult result = ConfigServiceUtil.postCallbackCfg(json);
|
||||
logger.debug("响应:"+gsonToJson(result));
|
||||
}else if(isAudit == 3) {//取消审核通过,将回调配置信息置为无效
|
||||
Map<String,Object> params = Maps.newHashMap();
|
||||
List<ProxyFileStrategyCfgAudit> convertList = Lists.newArrayList();
|
||||
convertList.add(BaseService.convertCallBackProxyFileStrategy(entity));
|
||||
/*Map<String,Object> params = Maps.newHashMap();
|
||||
params.put("fileId", entity.getCompileId());//文件ID
|
||||
params.put("service", entity.getServiceId());//业务ID
|
||||
params.put("isValid", 0);//有效标志,无效
|
||||
params.put("opTime", new Date());
|
||||
List list = Lists.newArrayList();
|
||||
list.add(params);
|
||||
String json = gsonToJson(list);
|
||||
list.add(params);*/
|
||||
String json = gsonToJson(convertList);
|
||||
logger.debug("params:" + json);
|
||||
ToMaatResult result = ConfigServiceUtil.put(json,2);
|
||||
logger.debug("响应:"+gsonToJson(result));
|
||||
|
||||
@@ -0,0 +1,151 @@
|
||||
package com.nis.web.service.configuration;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.callback.ProxyFileTrafficMirrorCfg;
|
||||
import com.nis.domain.callback.ProxyFileTrafficMirrorCfgAudit;
|
||||
import com.nis.domain.maat.ToMaatResult;
|
||||
import com.nis.exceptions.MaatConvertException;
|
||||
import com.nis.util.ConfigServiceUtil;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.web.dao.configuration.ProxyFileTrafficMirrorDao;
|
||||
import com.nis.web.security.UserUtils;
|
||||
import com.nis.web.service.BaseService;
|
||||
|
||||
@Service
|
||||
public class ProxyFileTrafficMirrorService extends BaseService{
|
||||
@Autowired
|
||||
protected ProxyFileTrafficMirrorDao proxyFileDao;
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param page
|
||||
* @param entity
|
||||
* @return
|
||||
*/
|
||||
public Page<ProxyFileTrafficMirrorCfg> findPage(Page page, ProxyFileTrafficMirrorCfg entity) {
|
||||
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"a"));
|
||||
entity.setPage(page);
|
||||
List<ProxyFileTrafficMirrorCfg> list = proxyFileDao.findPage(entity);
|
||||
page.setList(list);
|
||||
return page;
|
||||
}
|
||||
|
||||
public ProxyFileTrafficMirrorCfg getCfgById(Long cfgId) {
|
||||
return proxyFileDao.getCfgById(cfgId);
|
||||
}
|
||||
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public void saveOrUpdate(ProxyFileTrafficMirrorCfg entity){
|
||||
Date createTime=new Date();
|
||||
setAreaEffectiveIds(entity);
|
||||
int isValid=0;
|
||||
if(!StringUtil.isEmpty(entity.getIsValid()) && entity.getIsValid()==1) {
|
||||
isValid=1;
|
||||
}
|
||||
entity.setIsValid(0);
|
||||
entity.setIsAudit(0);
|
||||
//新增
|
||||
if(StringUtil.isEmpty(entity.getCfgId())){
|
||||
entity.initDefaultValue();
|
||||
entity.setCreatorId(UserUtils.getUser().getId());
|
||||
entity.setCreateTime(createTime);
|
||||
//调用服务接口获取compileId
|
||||
try {
|
||||
Integer compileId = ConfigServiceUtil.getId(1, 1).get(0);//获取编译id
|
||||
entity.setCompileId(compileId);
|
||||
} catch (Exception e) {
|
||||
logger.info("获取编译ID出错");
|
||||
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>:"+e.getMessage());
|
||||
}
|
||||
proxyFileDao.insert(entity);
|
||||
//修改
|
||||
}else{
|
||||
Date editTime=new Date();
|
||||
entity.setEditorId(UserUtils.getUser().getId());
|
||||
entity.setEditTime(editTime);
|
||||
|
||||
proxyFileDao.update(entity);
|
||||
}
|
||||
if(isValid==1) {
|
||||
entity.setIsAudit(1);
|
||||
entity.setIsValid(1);
|
||||
audit( entity.getIsAudit(), isValid, entity.getFunctionId(), String.valueOf(entity.getCfgId()));
|
||||
}
|
||||
}
|
||||
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public void audit(Integer isAudit,Integer isValid,Integer functionId,String id){
|
||||
Date auditTime = new Date();
|
||||
ProxyFileTrafficMirrorCfg cfg=new ProxyFileTrafficMirrorCfg();
|
||||
cfg.setCfgId(Long.valueOf(id));
|
||||
cfg.setIsValid(isValid);
|
||||
cfg.setIsAudit(isAudit);
|
||||
cfg.setAuditorId(UserUtils.getUser().getId());
|
||||
cfg.setAuditTime(auditTime);
|
||||
proxyFileDao.update(cfg);
|
||||
cfg=proxyFileDao.getCfgById(cfg.getCfgId());
|
||||
String json="";
|
||||
if(cfg.getIsAudit()==1){
|
||||
List<ProxyFileTrafficMirrorCfgAudit> list = new ArrayList<ProxyFileTrafficMirrorCfgAudit>();
|
||||
ProxyFileTrafficMirrorCfgAudit listConvert=convertCallBackProxyFileTrafficMirror(cfg);
|
||||
list.add(listConvert);
|
||||
//调用服务接口下发配置数据
|
||||
json=gsonToJson(list);
|
||||
logger.info("流量镜像文件配置下发配置参数:"+json);
|
||||
//调用服务接口下发配置
|
||||
try {
|
||||
ToMaatResult result = ConfigServiceUtil.postCallbackCfg(json);
|
||||
if(result!=null){
|
||||
logger.info("流量镜像文件配置下发响应信息:"+result.getMsg());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("流量镜像文件配置配置下发失败",e);
|
||||
throw e;
|
||||
}
|
||||
}else if(cfg.getIsAudit()==3){
|
||||
List<ProxyFileTrafficMirrorCfgAudit> list = new ArrayList<ProxyFileTrafficMirrorCfgAudit>();
|
||||
ProxyFileTrafficMirrorCfgAudit listConvert = convertCallBackProxyFileTrafficMirror(cfg);
|
||||
list.add(listConvert);
|
||||
//调用服务接口取消配置
|
||||
json=gsonToJson(list);
|
||||
logger.info("流量镜像文件配置配置参数:"+json);
|
||||
//调用服务接口取消配置
|
||||
try {
|
||||
ToMaatResult result = ConfigServiceUtil.put(json, 2);
|
||||
logger.info("流量镜像文件配置响应信息:"+result.getMsg());
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.info("流量镜像文件配置配置失败");
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public List<ProxyFileTrafficMirrorCfg> findByList(String ids) {
|
||||
List<ProxyFileTrafficMirrorCfg> list=proxyFileDao.findByList(ids);
|
||||
return list;
|
||||
}
|
||||
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public void delete(Integer isAudit,Integer isValid,String ids,Integer functionId){
|
||||
ProxyFileTrafficMirrorCfg entity = new ProxyFileTrafficMirrorCfg();
|
||||
String[] idArray = ids.split(",");
|
||||
for(String id :idArray){
|
||||
entity.setCfgId(Long.parseLong(id));
|
||||
entity.setFunctionId(functionId);
|
||||
entity.setIsAudit(isAudit);
|
||||
entity.setIsValid(isValid);
|
||||
entity.setEditorId(UserUtils.getUser().getId());
|
||||
entity.setEditTime(new Date());
|
||||
proxyFileDao.update(entity);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1527,4 +1527,18 @@ url_group_manage=URL Group Manage
|
||||
range_cross=Found intersections between Server IP address and Client IP address
|
||||
app_ip_correlation=APP IP Correlation
|
||||
public_private_file_error=Public-private key mismatch
|
||||
https_url_format_tip=URL(http[s]://xxx.xx)
|
||||
https_url_format_tip=URL(http[s]://xxx.xx)
|
||||
hijack_file_strategy=Hijack File
|
||||
profile_name=Profile Name
|
||||
file_insert_script=File Insert Script
|
||||
disk_path=disk_path
|
||||
format=Format
|
||||
file_quote_disable_delete=File quote Disable Delete
|
||||
target_type=Target Type
|
||||
vlan=VLAN
|
||||
mac=MAC
|
||||
mirror_addr_list=Address List
|
||||
mirror_addr_type=Address Type
|
||||
target_name=Target Name
|
||||
traffic_mirror_address=Traffic Mirror Address
|
||||
content_name=Content Name
|
||||
@@ -1530,4 +1530,17 @@ url_group_manage=URL Group Manage
|
||||
range_cross=\u041d\u0430\u0439\u0434\u0435\u043d\u044b \u043f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u044f \u043c\u0435\u0436\u0434\u0443 ip-\u0430\u0434\u0440\u0435\u0441\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0438 ip-\u0430\u0434\u0440\u0435\u0441\u043e\u043c \u043a\u043b\u0438\u0435\u043d\u0442\u0430
|
||||
app_ip_correlation=\u041a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u044f ip-\u0430\u0434\u0440\u0435\u0441\u043e\u0432 \u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439
|
||||
public_private_file_error=\u041d\u0435\u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u043e-\u043f\u0440\u0438\u0432\u0430\u0442\u043d\u043e\u0433\u043e \u043a\u043b\u044e\u0447\u0430.
|
||||
https_url_format_tip=URL(http[s]://xxx.xx)
|
||||
https_url_format_tip=URL(http[s]://xxx.xx)
|
||||
hijack_file_strategy=\u0417\u0430\u0445\u0432\u0430\u0442 \u0444\u0430\u0439\u043B
|
||||
profile_name=Profile Name
|
||||
file_insert_script=File Insert Script
|
||||
disk_path=disk_path
|
||||
format=Format
|
||||
file_quote_disable_delete=File quote Disable Delete
|
||||
mac=MAC
|
||||
vlan=VLAN
|
||||
mirror_addr_list=Address List
|
||||
mirror_addr_type=Address Type
|
||||
target_name=Target Name
|
||||
traffic_mirror_address=Traffic Mirror Address
|
||||
content_name=Content Name
|
||||
@@ -1528,4 +1528,17 @@ url_group_manage=URL \u5206\u7ec4 \u7ba1\u7406
|
||||
range_cross=\u6E90IP\u4E0E\u76EE\u7684IP\u8303\u56F4\u6709\u4EA4\u53C9
|
||||
app_ip_correlation=APP\u5173\u8054\u7279\u5F81IP\u914D\u7F6E
|
||||
public_private_file_error=\u516C\u79C1\u94A5\u8BC1\u4E66\u4E0D\u5339\u914D
|
||||
https_url_format_tip=URL(http[s]://xxx.xx)
|
||||
https_url_format_tip=URL(http[s]://xxx.xx)
|
||||
hijack_file_strategy=\u52AB\u6301\u6587\u4EF6
|
||||
profile_name=\u6587\u4EF6\u540D\u79F0
|
||||
file_insert_script=\u6CE8\u5165\u811A\u672C\u6587\u4EF6
|
||||
disk_path=\u50A8\u5B58\u8DEF\u5F84
|
||||
format=\u683C\u5F0F
|
||||
file_quote_disable_delete=\u6587\u4EF6\u88AB\u5F15\u7528 \u4E0D\u53EF\u5220\u9664
|
||||
vlan=\u865A\u62DF\u5C40\u57DF\u7F51
|
||||
mac=MAC\u5730\u5740
|
||||
mirror_addr_list=\u76EE\u6807\u6807\u8BC6\u5217\u8868
|
||||
mirror_addr_type=\u76EE\u6807\u6807\u8BC6\u7C7B\u578B
|
||||
target_name=\u76EE\u6807\u540D\u79F0
|
||||
traffic_mirror_address=\u6D41\u91CF\u8F6C\u53D1\u76EE\u7684\u5730\u5740
|
||||
content_name=\u5185\u5BB9\u540D\u79F0
|
||||
@@ -421,6 +421,9 @@
|
||||
<service id="400" functionId="600" serviceType="1" cfgType="1" tableName="asn_ip_cfg" className="AppIpCfg" desc="ASN IP特征">
|
||||
<userRegion regionKey="ASN" regionColumn="userRegion1" userRegionPosition="1"></userRegion>
|
||||
</service>
|
||||
|
||||
<service id="643" functionId="513" serviceType="2" tableName="pxy_profile_hijack_files" className="ProxyFileHijackCfg" desc="劫持文件"></service>
|
||||
<service id="644" functionId="514" serviceType="2" tableName="pxy_profile_insert_scripts" className="ProxyFileInsertScriptCfg" desc="注入脚本文件"></service>
|
||||
<service id="645" functionId="515" serviceType="2" tableName="pxy_profile_traffic_mirror" className="ProxyFileTrafficMirrorCfg" desc="流量转发目的地址"></service>
|
||||
<service id="608" functionId="512" serviceType="2" tableName="proxy_file_strategy_cfg" className="ProxyFileStrategyCfg" desc="http代理文件策略"></service>
|
||||
|
||||
</serviceList>
|
||||
14
src/main/resources/sql/20190521/add_menu.sql
Normal file
14
src/main/resources/sql/20190521/add_menu.sql
Normal file
@@ -0,0 +1,14 @@
|
||||
INSERT INTO sys_menu (`id`, `parent_id`, `parent_ids`, `code`, `name`, `sort`, `href`, `target`, `icon`, `is_show`, `permission`, `create_by`, `create_date`, `update_by`, `update_date`, `remarks`, `del_flag`, `menu_bg`, `quick_action`, `is_top`, `function_id`) VALUES (1256, 1121, '0,1,86,717,1121,', 'hijack_file_strategy', '<EFBFBD>ٳ<EFBFBD><EFBFBD>ļ<EFBFBD>', 4, '/proxy/fileHijack/list', '', '', 1, 'proxy:fileHijack:config', '1', '2019-05-09 11:16:20', '1', '2019-05-09 11:16:20', '', 1, NULL, 0, 0, 513);
|
||||
INSERT INTO sys_menu (`id`, `parent_id`, `parent_ids`, `code`, `name`, `sort`, `href`, `target`, `icon`, `is_show`, `permission`, `create_by`, `create_date`, `update_by`, `update_date`, `remarks`, `del_flag`, `menu_bg`, `quick_action`, `is_top`, `function_id`) VALUES (1257, 1122, '0,1,150,750,1122,', 'hijack_file_strategy', '<EFBFBD>ٳ<EFBFBD><EFBFBD>ļ<EFBFBD>', 422, '/proxy/fileHijack/list', '', '', 1, 'proxy:fileHijack:confirm', '1', '2019-05-09 14:58:10', '1', '2019-05-09 14:58:10', '', 1, NULL, 0, 0, 513);
|
||||
INSERT INTO sys_menu (`id`, `parent_id`, `parent_ids`, `code`, `name`, `sort`, `href`, `target`, `icon`, `is_show`, `permission`, `create_by`, `create_date`, `update_by`, `update_date`, `remarks`, `del_flag`, `menu_bg`, `quick_action`, `is_top`, `function_id`) VALUES (1258, 1123, '0,1,151,865,1123,', 'hijack_file_strategy', '<EFBFBD>ٳ<EFBFBD><EFBFBD>ļ<EFBFBD>', 35, '/proxy/fileHijack/list', '', '', 1, 'proxy:fileHijack:audit', '1', '2019-05-09 14:59:54', '1', '2019-05-09 14:59:54', '', 1, NULL, 0, 0, 513);
|
||||
INSERT INTO sys_menu (`id`, `parent_id`, `parent_ids`, `code`, `name`, `sort`, `href`, `target`, `icon`, `is_show`, `permission`, `create_by`, `create_date`, `update_by`, `update_date`, `remarks`, `del_flag`, `menu_bg`, `quick_action`, `is_top`, `function_id`) VALUES (1260, 1121, '0,1,86,717,1121,', 'file_insert_script', 'ע<EFBFBD><EFBFBD><EFBFBD>ű<EFBFBD><EFBFBD>ļ<EFBFBD>', 4, '/proxy/fileInsertScript/list', '', '', 1, 'proxy:fileInsertScript:config', '1', '2019-05-09 16:03:58', '1', '2019-05-09 16:03:58', '', 1, NULL, 0, 0, 514);
|
||||
INSERT INTO sys_menu (`id`, `parent_id`, `parent_ids`, `code`, `name`, `sort`, `href`, `target`, `icon`, `is_show`, `permission`, `create_by`, `create_date`, `update_by`, `update_date`, `remarks`, `del_flag`, `menu_bg`, `quick_action`, `is_top`, `function_id`) VALUES (1261, 1122, '0,1,150,750,1122,', 'file_insert_script', 'ע<EFBFBD><EFBFBD><EFBFBD>ű<EFBFBD><EFBFBD>ļ<EFBFBD>', 424, '/proxy/fileInsertScript/list', '', '', 1, 'proxy:fileInsertScript:confirm', '1', '2019-05-09 16:06:17', '1', '2019-05-09 16:06:17', '', 1, NULL, 0, 0, 514);
|
||||
INSERT INTO sys_menu (`id`, `parent_id`, `parent_ids`, `code`, `name`, `sort`, `href`, `target`, `icon`, `is_show`, `permission`, `create_by`, `create_date`, `update_by`, `update_date`, `remarks`, `del_flag`, `menu_bg`, `quick_action`, `is_top`, `function_id`) VALUES (1262, 1123, '0,1,151,865,1123,', 'file_insert_script', 'ע<EFBFBD><EFBFBD><EFBFBD>ű<EFBFBD><EFBFBD>ļ<EFBFBD>', 37, '/proxy/fileInsertScript/list', '', '', 1, 'proxy:fileInsertScript:audit', '1', '2019-05-09 16:07:13', '1', '2019-05-09 16:07:13', '', 1, NULL, 0, 0, 514);
|
||||
INSERT INTO sys_menu (`id`, `parent_id`, `parent_ids`, `code`, `name`, `sort`, `href`, `target`, `icon`, `is_show`, `permission`, `create_by`, `create_date`, `update_by`, `update_date`, `remarks`, `del_flag`, `menu_bg`, `quick_action`, `is_top`, `function_id`) VALUES (1263, 1121, '0,1,86,717,1121,', 'traffic_mirror_address', '<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ת<EFBFBD><EFBFBD>Ŀ<EFBFBD>ĵ<EFBFBD>ַ', 8, '/proxy/fileTrafficMirror/list', '', '', 1, 'proxy:fileTrafficMirror:config', '1', '2019-05-09 16:03:58', '1', '2019-05-09 16:03:58', '', 1, NULL, 0, 0, 515);
|
||||
INSERT INTO sys_menu (`id`, `parent_id`, `parent_ids`, `code`, `name`, `sort`, `href`, `target`, `icon`, `is_show`, `permission`, `create_by`, `create_date`, `update_by`, `update_date`, `remarks`, `del_flag`, `menu_bg`, `quick_action`, `is_top`, `function_id`) VALUES (1264, 1122, '0,1,150,750,1122,', 'traffic_mirror_address', '<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ת<EFBFBD><EFBFBD>Ŀ<EFBFBD>ĵ<EFBFBD>ַ', 426, '/proxy/fileTrafficMirror/list', '', '', 1, 'proxy:fileTrafficMirror:confirm', '1', '2019-05-09 16:06:17', '1', '2019-05-09 16:06:17', '', 1, NULL, 0, 0, 515);
|
||||
INSERT INTO sys_menu (`id`, `parent_id`, `parent_ids`, `code`, `name`, `sort`, `href`, `target`, `icon`, `is_show`, `permission`, `create_by`, `create_date`, `update_by`, `update_date`, `remarks`, `del_flag`, `menu_bg`, `quick_action`, `is_top`, `function_id`) VALUES (1265, 1123, '0,1,151,865,1123,', 'traffic_mirror_address', '<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ת<EFBFBD><EFBFBD>Ŀ<EFBFBD>ĵ<EFBFBD>ַ', 39, '/proxy/fileTrafficMirror/list', '', '', 1, 'proxy:fileTrafficMirror:audit', '1', '2019-05-09 16:07:13', '1', '2019-05-09 16:07:13', '', 1, NULL, 0, 0, 515);
|
||||
|
||||
INSERT INTO function_service_dict (`dict_id`, `function_id`, `protocol_id`, `action`, `action_code`, `service_id`, `service_name`, `service_desc`, `is_valid`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `region_code`, `is_import`, `sort`, `config_do_log`) VALUES (166, 513, 0, 1, 'monit', 643, 'hijack_file_strategy', '', 1, NULL, '0000-00-00 00:00:00', NULL, '0000-00-00 00:00:00', '', 0, 1, '');
|
||||
INSERT INTO function_service_dict (`dict_id`, `function_id`, `protocol_id`, `action`, `action_code`, `service_id`, `service_name`, `service_desc`, `is_valid`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `region_code`, `is_import`, `sort`, `config_do_log`) VALUES (167, 514, 0, 1, 'monit', 644, 'file_insert_script', '', 1, NULL, '0000-00-00 00:00:00', NULL, '0000-00-00 00:00:00', '', 0, 1, '');
|
||||
INSERT INTO function_service_dict (`dict_id`, `function_id`, `protocol_id`, `action`, `action_code`, `service_id`, `service_name`, `service_desc`, `is_valid`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `region_code`, `is_import`, `sort`, `config_do_log`) VALUES (168, 515, 0, 1, 'monit', 645, 'file_traffic_mirror', NULL, 1, NULL, '0000-00-00 00:00:00', NULL, '0000-00-00 00:00:00', NULL, 0, 1, NULL);
|
||||
INSERT INTO function_service_dict (`dict_id`, `function_id`, `protocol_id`, `action`, `action_code`, `service_id`, `service_name`, `service_desc`, `is_valid`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `region_code`, `is_import`, `sort`, `config_do_log`) VALUES (169, 512, 0, 1, 'monit', 608, 'file_strategy', NULL, 1, NULL, '2019-05-17 11:46:48', NULL, '2019-05-17 11:46:51', NULL, 0, 1, NULL);
|
||||
@@ -119,6 +119,10 @@ function isBatch(url){
|
||||
|| url.indexOf("functionId=570&") > -1 //Key Ring
|
||||
|| url.indexOf("functionId=571&") > -1 //Trusted Certificate
|
||||
|| url.indexOf("functionId=600&") > -1 //Trusted Certificate
|
||||
|| url.indexOf("functionId=513&") > -1 //FileHijack
|
||||
|| url.indexOf("functionId=514&") > -1 //File Insert Script
|
||||
|| url.indexOf("functionId=515&") > -1 //Traffic Mirror
|
||||
|| url.indexOf("functionId=512&") > -1 //PXY OBJ FILE
|
||||
){
|
||||
flag = true;
|
||||
}
|
||||
@@ -133,6 +137,9 @@ function del(url){
|
||||
if(validateIsDelete(checkboxes)){
|
||||
top.$.jBox.tip("<spring:message code='has_prohibit_delete'/>", "<spring:message code='info'/>");
|
||||
return;
|
||||
}else if(validateIsDeleteOfQuote(checkboxes)){
|
||||
top.$.jBox.tip("<spring:message code='file_quote_disable_delete'/>", "<spring:message code='info'/>");
|
||||
return;
|
||||
}else{
|
||||
var serviceGroupIds=[],ids=[],canDel=true;
|
||||
$(checkboxes).filter(":checked").each(function(){
|
||||
@@ -592,6 +599,18 @@ function validateIsDelete(checkboxes){
|
||||
});
|
||||
return flag;
|
||||
}
|
||||
//验证文件是否其他菜单有引用且非删除状态
|
||||
function validateIsDeleteOfQuote(checkboxes){
|
||||
var flag = false;
|
||||
$(checkboxes).filter(":checked").each(function(){
|
||||
if($(this).attr("quoteStatus") != -1 && $(this).attr("quoteStatus") != 0
|
||||
&& "undefined" != typeof $(this).attr("quoteStatus")){ //可删除的条件
|
||||
flag = true;
|
||||
return;
|
||||
}
|
||||
});
|
||||
return flag;
|
||||
}
|
||||
//验证选择的配置,是否有审核通过的
|
||||
function validatePass(checkboxes){
|
||||
var flag = false;
|
||||
|
||||
235
src/main/webapp/WEB-INF/views/cfg/proxy/fileHijack/form.jsp
Normal file
235
src/main/webapp/WEB-INF/views/cfg/proxy/fileHijack/form.jsp
Normal file
@@ -0,0 +1,235 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<title><spring:message code="${cfgName}"></spring:message></title>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
|
||||
$("#urlInfo,#urlBtn").on('click',function(){
|
||||
$("#cfgFile").trigger("click");
|
||||
});
|
||||
|
||||
$("#cfgFile").on('change',function(){
|
||||
$("#urlInfo").val($("#cfgFile").val());
|
||||
});
|
||||
|
||||
$("#cfgFrom") .validate( {
|
||||
submitHandler : function(form) {
|
||||
loading('onloading...');
|
||||
form.submit();
|
||||
},
|
||||
errorContainer : "#messageBox",
|
||||
errorPlacement : function(error, element) {
|
||||
$(element).parents(".form-group").find( "div[for='" + element.attr("name") + "']").append(error);
|
||||
},
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="page-content">
|
||||
|
||||
<h3 class="page-title">
|
||||
<spring:message code="${_cfg.menuNameCode }"></spring:message>
|
||||
</h3>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet box blue">
|
||||
<div class="portlet-title">
|
||||
<div class="caption">
|
||||
<i class="fa fa-gift"></i>
|
||||
<c:if test="${empty _cfg.cfgId}">
|
||||
<spring:message code="add"></spring:message>
|
||||
</c:if>
|
||||
<c:if test="${not empty _cfg.cfgId}">
|
||||
<spring:message code="edit"></spring:message>
|
||||
</c:if>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body form">
|
||||
<!-- BEGIN FORM-->
|
||||
<form id="cfgFrom" action="${ctx}/proxy/fileHijack/saveOrUpdate" enctype="multipart/form-data" method="post" class="form-horizontal">
|
||||
<input type="hidden" name="functionId" value="${_cfg.functionId}">
|
||||
<input type="hidden" id="compileId" name="compileId" value="${_cfg.compileId}">
|
||||
<input type="hidden" name="isValid" value="${_cfg.isValid}">
|
||||
<input type="hidden" name="isAudit" value="${_cfg.isAudit}">
|
||||
<input type="hidden" id="cfgId" name="cfgId" value="${_cfg.cfgId}">
|
||||
<input type="hidden" id="isAreaEffective" name="isAreaEffective" value="0">
|
||||
<input type="hidden" id="isAdd" name="isAdd" value="${isAdd}">
|
||||
<c:forEach items="${serviceList}" var="service">
|
||||
<c:if test="${_cfg.functionId eq service.functionId}">
|
||||
<input type="hidden" name="serviceId" value="${service.serviceId}">
|
||||
<input type="hidden" name="action" value="${service.action}">
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
<div class="form-body">
|
||||
<div class="row">
|
||||
<div class="col-md-6 hidden">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><spring:message code="action"/></label>
|
||||
<div class="col-md-6">
|
||||
<c:forEach items="${serviceList}" var="service"
|
||||
varStatus="satus">
|
||||
<label class="radio-inline"> <c:if
|
||||
test="${_cfg.functionId eq service.functionId}">
|
||||
<input type="radio" name="action" class="action"
|
||||
serviceId="${service.serviceId }"
|
||||
protocolId="${service.protocolId }"
|
||||
configDolog="${service.configDoLog }"
|
||||
value="${service.action }" class="required action"
|
||||
<c:if test="${_cfg.action==service.action || (_cfg.action==null && satus.index==0)}">checked</c:if>>
|
||||
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict">
|
||||
<c:if test="${dict.itemCode eq service.action }">
|
||||
<spring:message code="${dict.itemValue }"/>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
</label>
|
||||
</c:forEach>
|
||||
</div>
|
||||
<div for="action"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 hidden">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><spring:message code="do_log" /></label>
|
||||
<c:forEach items="${fns:getDictList('DO_LOG') }" var="dict">
|
||||
<c:choose>
|
||||
<c:when test="${dict.itemCode eq _cfg.doLog}">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="doLog" checked value="${dict.itemCode}" ><spring:message code="${dict.itemValue}"/>
|
||||
</label>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="doLog" value="${dict.itemCode}" ><spring:message code="${dict.itemValue}"/>
|
||||
</label>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</c:forEach>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="hijack_file_strategy" /></label>
|
||||
<div class="col-md-6">
|
||||
<input id="cfgFile" name="cfgFile" type="file" style="width: 330px; display: none" />
|
||||
<div class="input-group">
|
||||
<input id="urlInfo" name="urlInfo" readonly="readonly" data-msg-required="" placeholder="<spring:message code="select_file"/>" class="required form-control"
|
||||
style="background-color: transparent" aria-required="true"
|
||||
type="text" value="${_cfg.path}">
|
||||
<div class="input-group-btn">
|
||||
<a id="urlBtn" class="btn btn-default btn-search"
|
||||
href="javascript:" style=""><i class="fa fa-search"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div for="urlInfo"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><spring:message code="profile_name"/></label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control" type="text" name="cfgDesc" value="${_cfg.cfgDesc}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">
|
||||
<font color="red">*</font><spring:message code="content_type" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<select name="contentType" data-live-search="true" data-live-search-placeholder="search" class="selectpicker form-control required">
|
||||
<option value=""><spring:message code="select"/></option>
|
||||
<c:forEach items="${fns:getDictList('CONTENT_TYPE')}" var="dict">
|
||||
<option value="${dict.itemCode}" <c:if test="${dict.itemCode==_cfg.contentType}">selected</c:if>>${dict.itemCode}</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
<div for="contentType"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><spring:message code="content_name" /></label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control required" type="text" name="contentName" value="${_cfg.contentName}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 hidden">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="action"/></label>
|
||||
<div class="col-md-6">
|
||||
<c:forEach items="${serviceList}" var="service" varStatus="satus">
|
||||
<label class="radio-inline"> <c:if
|
||||
test="${_cfg.functionId eq service.functionId}">
|
||||
<input type="radio" name="action"
|
||||
serviceId="${service.serviceId }"
|
||||
protocolId="${service.protocolId }"
|
||||
value="${service.action }" class="required action"
|
||||
<c:if test="${_cfg.action==service.action || (_cfg.action==null && satus.index==0)}">checked</c:if>>
|
||||
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict">
|
||||
<c:if test="${dict.itemCode eq service.action }">
|
||||
<spring:message code="${dict.itemValue }"/>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
</label>
|
||||
</c:forEach>
|
||||
</div>
|
||||
<div for="action"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<%@include file="/WEB-INF/include/form/basicInfo.jsp"%>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="row">
|
||||
<div class="col-md-offset-3 col-md-8">
|
||||
<c:set var="auditPermission" value="false"></c:set>
|
||||
<!-- 拥有配置新增直接生效的功能权限 -->
|
||||
<shiro:hasPermission name="save:audit:permission">
|
||||
<c:set var="auditPermission" value="true"></c:set>
|
||||
</shiro:hasPermission>
|
||||
<c:choose>
|
||||
<c:when test="${!(fns:getUser().isAdmin()) && auditPermission}">
|
||||
<button id="audit" type="submit" class="btn green">
|
||||
<spring:message code="submit" />
|
||||
</button>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<button id="save" type="submit" class="btn green">
|
||||
<spring:message code="submit" />
|
||||
</button>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
<button id="cancel" type="button" class="btn default"><spring:message code="cancel"/></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6"></div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<!-- END FORM-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
414
src/main/webapp/WEB-INF/views/cfg/proxy/fileHijack/list.jsp
Normal file
414
src/main/webapp/WEB-INF/views/cfg/proxy/fileHijack/list.jsp
Normal file
@@ -0,0 +1,414 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<title><spring:message code="${cfgName}"></spring:message></title>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
//搜索框提示语初始化
|
||||
if("${cfg.cfgDesc}"){
|
||||
$("#intype").val("${cfg.cfgDesc}");
|
||||
}else{
|
||||
$("#intype").attr("placeholder","<spring:message code='input'/> "+$("#seltype").find("option:selected").text());
|
||||
}
|
||||
$("#seltype").change(function(){
|
||||
$("#intype").attr("placeholder","<spring:message code='input'/> "+$(this).find("option:selected").text());
|
||||
});
|
||||
//筛选功能初始化
|
||||
filterActionInit();
|
||||
$("#isAudit").change(function(){
|
||||
page();
|
||||
});
|
||||
//reset
|
||||
$("#resetBtn").on("click",function(){
|
||||
$("select.selectpicker").each(function(){
|
||||
$(this).selectpicker('val',$(this).find('option:first').val());
|
||||
$(this).find("option").attr("selected",false);
|
||||
$(this).find("option:first").attr("selected",true);
|
||||
});
|
||||
$(".Wdate").attr("value",'');
|
||||
$("#description").attr("value",'');
|
||||
$("#searchForm")[0].reset();
|
||||
$("#intype").attr("placeholder","<spring:message code='input'/> "+$("#seltype").find("option:selected").text());
|
||||
});
|
||||
|
||||
if($("#exportType").val() != null && $("#exportType").val() != ""){
|
||||
if($("#intype").val() != null && $("#intype").val() != ""){
|
||||
$("#exportValue").val($("#intype").val());
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="page-content">
|
||||
<div class="theme-panel hidden-xs hidden-sm">
|
||||
|
||||
<shiro:hasPermission name="proxy:fileHijack:config">
|
||||
<button type="button" class="addId btn btn-primary"
|
||||
onClick="javascript:window.location='${ctx}/proxy/fileHijack/form?functionId=${cfg.functionId}'">
|
||||
<i class="fa fa-plus"></i>
|
||||
<spring:message code="add"></spring:message></button>
|
||||
</shiro:hasPermission>
|
||||
</div>
|
||||
|
||||
<h3 class="page-title">
|
||||
<spring:message code="${cfg.menuNameCode }"></spring:message>
|
||||
</h3>
|
||||
<h5 class="page-header"></h5>
|
||||
<div class="col-md-12">
|
||||
<div class="portlet">
|
||||
<div class="portlet-body">
|
||||
<div class="row" >
|
||||
<form:form id="searchForm" modelAttribute="cfg" action="${ctx}/proxy/fileHijack/list?functionId=${cfg.functionId}" method="post" class="form-search">
|
||||
<input id="functionId" name="functionId" type="hidden" value="${cfg.functionId}"/>
|
||||
<input id="audit" name="audit" type="hidden" value="${audit}"/>
|
||||
<input id="exportType" type="hidden" value="${cfg.seltype}"/>
|
||||
<input id="exportValue" type="hidden" value=""/>
|
||||
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
|
||||
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
|
||||
<sys:tableSort id="orderBy" name="orderBy" value="${page.orderBy}"
|
||||
callback="page();" />
|
||||
<!-- 筛选按钮展开状态-->
|
||||
<input id="isFilterAction" name="isFilterAction" type="hidden" value="${cfg.isFilterAction }"/>
|
||||
<!-- 搜索内容与操作按钮栏 -->
|
||||
<div class="col-md-12">
|
||||
<div class="pull-left">
|
||||
<c:set var="state"><spring:message code='state'/></c:set>
|
||||
<form:select path="isAudit" class="selectpicker select2 input-small">
|
||||
<form:option value=""><spring:message code="all_states"/></form:option>
|
||||
<form:option value="0"><spring:message code="created"></spring:message></form:option>
|
||||
<form:option value="1"><spring:message code="approved"></spring:message></form:option>
|
||||
<form:option value="2"><spring:message code="unapproved"></spring:message></form:option>
|
||||
<form:option value="3"><spring:message code="cancel_approved"></spring:message></form:option>
|
||||
</form:select>
|
||||
</div>
|
||||
|
||||
<div class="pull-left">
|
||||
|
||||
<div class="input-group">
|
||||
<div class="input-group-btn">
|
||||
|
||||
<form:select path="seltype" class="selectpicker select2 input-small" >
|
||||
<form:option value="cfgDesc"><spring:message code="profile_name"></spring:message></form:option>
|
||||
<form:option value="isValid"><spring:message code="valid_identifier"></spring:message></form:option>
|
||||
</form:select>
|
||||
|
||||
</div>
|
||||
|
||||
<input id="intype" class="form-control input-medium" type="text" value="">
|
||||
<div class="input-group-btn">
|
||||
<form:select id="actionSelect" path="action" class="selectpicker select2 input-small" >
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<c:forEach items="${serviceList}" var="service">
|
||||
<form:option value="${service.action }"><spring:message code="action_${service.actionCode }"/></form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
<form:select path="isValid" class="selectpicker select2 input-small" >
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<form:option value="1"><spring:message code="yes"/></form:option>
|
||||
<form:option value="0"><spring:message code="no"/></form:option>
|
||||
</form:select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
<button type="button" class="btn blue" onClick="return page()"> <i class="fa fa-search"></i> <spring:message code="search"/> </button>
|
||||
<button type="button" class="btn btn-default" id="resetBtn"> <i class="fa fa-refresh"></i> <spring:message code="reset"/> </button>
|
||||
<button type="button" class="btn btn-default" id="filter-btn"> <spring:message code="filter"/> <i class="fa fa-angle-double-down"></i></button>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<shiro:hasPermission name="proxy:fileHijack:config">
|
||||
<sys:delRow url="${ctx}/proxy/fileHijack/form" id="contentTable" label="update"></sys:delRow>
|
||||
<sys:delRow url="${ctx}/proxy/fileHijack/delete?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
|
||||
</shiro:hasPermission>
|
||||
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
<i class="fa fa-wrench"></i> <spring:message code="export"></spring:message>
|
||||
<i class="fa fa-angle-down"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu pull-right" style="min-width: 110px;" >
|
||||
<li><sys:delRow url="${ctx}/proxy/fileHijack/exportFileHijack?functionId=${cfg.functionId }&exType=excel" searchUrl="${ctx}/proxy/fileHijack/list?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="cfg_excel"></sys:delRow></li>
|
||||
<li><sys:delRow url="${ctx}/proxy/fileHijack/exportFileHijack?functionId=${cfg.functionId }&exType=csv" searchUrl="${ctx}/proxy/fileHijack/list?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="cfg_csv"></sys:delRow></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<shiro:hasPermission name="proxy:fileHijack:confirm">
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
<i class="fa fa-wrench"></i> <spring:message code="examine"></spring:message>
|
||||
<i class="fa fa-angle-down"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu pull-right">
|
||||
<li><sys:delRow url="${ctx}/proxy/fileHijack/audit?isAudit=1&isValid=1&functionId=${cfg.functionId }" id="contentTable" label="approved"></sys:delRow></li>
|
||||
<li><sys:delRow url="${ctx}/proxy/fileHijack/audit?isAudit=2&isValid=0&functionId=${cfg.functionId }" id="contentTable" label="unapproved"></sys:delRow></li>
|
||||
<li><sys:delRow url="${ctx}/proxy/fileHijack/audit?isAudit=3&isValid=0&functionId=${cfg.functionId }" id="contentTable" label="cancelPass"></sys:delRow></li>
|
||||
</ul>
|
||||
</div>
|
||||
</shiro:hasPermission>
|
||||
<a class="btn btn-icon-only btn-default setfields tooltips"
|
||||
data-container="body" data-placement="top" data-original-title=<spring:message code="custom_columns"/> href="javascript:;">
|
||||
<i class="icon-wrench"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /搜索内容与操作按钮栏 -->
|
||||
|
||||
<!-- 筛选搜索内容栏默认隐藏-->
|
||||
<div class="col-md-12 filter-action-select-panle hide" >
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-3">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label"><spring:message code='letter'/></label>
|
||||
<c:set var="select"><spring:message code='select'/></c:set>
|
||||
<form:select path="requestId" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<c:forEach items="${requestInfos}" var="requestInfo" >
|
||||
<form:option value="${requestInfo.id}"><spring:message code="${requestInfo.requestTitle}"></spring:message></form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label"><spring:message code='classification'/></label>
|
||||
<form:select path="classify" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<c:forEach items="${fls}" var="fl" >
|
||||
<form:option value="${fl.serviceDictId}"><spring:message code="${fl.itemValue}"></spring:message></form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label"><spring:message code='attribute'/></label>
|
||||
<c:set var="select"><spring:message code='select'/></c:set>
|
||||
<form:select path="attribute" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<c:forEach items="${xzs}" var="xz" >
|
||||
<form:option value="${xz.serviceDictId}"><spring:message code="${xz.itemValue}"></spring:message></form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label"><spring:message code='label'/></label>
|
||||
<form:select path="lable" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<c:forEach items="${lables}" var="lable" >
|
||||
<form:option value="${lable.serviceDictId}"><spring:message code="${lable.itemValue}"></spring:message></form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label><spring:message code="config_time"/>:</label>
|
||||
<input name="search_create_time_start" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value='${cfg.search_create_time_start}' pattern='yyyy-MM-dd HH:mm:ss'/>" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label> </label>
|
||||
<input name="search_create_time_end" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_create_time_end}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label><spring:message code="edit_time"/>:</label>
|
||||
<input name="search_edit_time_start" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_edit_time_start}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label> </label>
|
||||
<input name="search_edit_time_end" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_edit_time_end}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label><spring:message code="audit_time"/>:</label>
|
||||
<input name="search_audit_time_start" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_audit_time_start}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label> </label>
|
||||
<input name="search_audit_time_end" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_audit_time_end}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<!-- /筛选搜索内容栏 结束-->
|
||||
</form:form>
|
||||
</div>
|
||||
<sys:message content="${message}" type="${messageType }"/>
|
||||
<div class="table-responsive">
|
||||
|
||||
<table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><input type="checkbox" class="i-checks" id="checkAll"></th>
|
||||
<th column="cfg_id" class="sort-column a.compile_id" style="display: none;"><spring:message code="cfg_id"/></th>
|
||||
<th column="profile_name" class="sort-column a.cfg_desc"><spring:message code="profile_name"/></th>
|
||||
<th column="disk_path" ><spring:message code="disk_path"/></th>
|
||||
<th column="content_type" ><spring:message code="content_type"/></th>
|
||||
<th column="content_name" ><spring:message code="content_name"/></th>
|
||||
<th column="is_audit" class="a.is_valid"><spring:message code="is_audit"/></th>
|
||||
<th column="letter" ><spring:message code="letter"/></th>
|
||||
<th column="classification" ><spring:message code="classification"/></th>
|
||||
<th column="attribute" ><spring:message code="attribute"/></th>
|
||||
<th column="label" ><spring:message code="label"/></th>
|
||||
<th column="valid_identifier" class="sort-column a.is_valid"><spring:message code="valid_identifier"/></th>
|
||||
<th column="creator" ><spring:message code="creator"/></th>
|
||||
<th column="config_time" class="sort-column a.create_time"><spring:message code="config_time"/></th>
|
||||
<th column="editor" ><spring:message code="editor"/></th>
|
||||
<th column="edit_time" class="sort-column a.edit_time"><spring:message code="edit_time"/></th>
|
||||
<th column="auditor" ><spring:message code="auditor"/></th>
|
||||
<th column="audit_time" class="sort-column a.audit_time"><spring:message code="audit_time"/></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:forEach items="${page.list }" var="indexCfg" varStatus="status" step="1">
|
||||
<tr>
|
||||
<td>
|
||||
<input type="checkbox" class="i-checks child-checks" id="${indexCfg.cfgId}" quoteStatus="${indexCfg.quote}" value="${indexCfg.isAudit}">
|
||||
</td>
|
||||
<td>${indexCfg.compileId }</td>
|
||||
<td>${indexCfg.cfgDesc}</a></td>
|
||||
<td><a href="${indexCfg.path}" target="_blank" data-original-title="${indexCfg.path}"
|
||||
class="tooltips" data-flag="false" data-html="true" data-placement="top">
|
||||
${fn:substring(indexCfg.path,0,20) }</a>
|
||||
</td>
|
||||
<td>${indexCfg.contentType }</td>
|
||||
<td>${indexCfg.contentName }</td>
|
||||
<td>
|
||||
<c:choose>
|
||||
<c:when test="${indexCfg.isAudit eq '0'}"><span class="label label-danger"><spring:message code="created"></spring:message></span></c:when>
|
||||
<c:when test="${indexCfg.isAudit eq '1'}"><span class="label label-success"><spring:message code="approved"></spring:message></span></c:when>
|
||||
<c:when test="${indexCfg.isAudit eq '2'}"><span class="label label-warning"><spring:message code="unapproved"></spring:message></span></c:when>
|
||||
<c:when test="${indexCfg.isAudit eq '3'}"><span indexTable="${indexCfg.indexTable}" data-placement="right" data-original-title="<spring:message code='letter_cancel_info'/>: " class="label le-ca-fo label-warning tooltips" data-icon=""> <spring:message code="cancel_approved"/></span></c:when>
|
||||
</c:choose>
|
||||
</td>
|
||||
<td>${indexCfg.requestName }</td>
|
||||
<td>
|
||||
<c:set var="classify"></c:set>
|
||||
<c:forEach items="${fn:split(indexCfg.classify,',')}" var="classifyId" varStatus="status">
|
||||
<c:forEach items="${fls}" var="fl">
|
||||
<c:if test="${classifyId eq fn:trim(fl.serviceDictId)}">
|
||||
<c:if test="${status.index+1 eq 1}">
|
||||
<c:set var="classify" value="${fl.itemValue}"></c:set>
|
||||
</c:if>
|
||||
<c:if test="${status.index+1 ne 1}">
|
||||
<c:set var="classify" value="${classify},${fl.itemValue}"></c:set>
|
||||
</c:if>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
<a href="javascript:;" data-original-title="${classify}"
|
||||
class="tooltips" data-flag="false" data-html="true" data-placement="top">
|
||||
${fns:abbr(classify,20)}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<c:set var="attribute"></c:set>
|
||||
<c:forEach items="${fn:split(indexCfg.attribute,',')}" var="attributeId" varStatus="status">
|
||||
<c:forEach items="${xzs}" var="xz">
|
||||
<c:if test="${attributeId eq fn:trim(xz.serviceDictId)}">
|
||||
<c:if test="${status.index+1 eq 1}">
|
||||
<c:set var="attribute" value="${xz.itemValue}"></c:set>
|
||||
</c:if>
|
||||
<c:if test="${status.index+1 ne 1}">
|
||||
<c:set var="attribute" value="${attribute},${xz.itemValue}"></c:set>
|
||||
</c:if>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
<a href="javascript:;" data-original-title="${attribute}"
|
||||
class="tooltips" data-flag="false" data-html="true" data-placement="top">
|
||||
${fns:abbr(attribute,20)}
|
||||
</a>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<c:set var="lableInfo"></c:set>
|
||||
<c:forEach items="${fn:split(indexCfg.lable,',')}" var="lableId" varStatus="status">
|
||||
<c:forEach items="${lables}" var="lable">
|
||||
<c:if test="${lableId eq fn:trim(lable.serviceDictId)}">
|
||||
<c:if test="${status.index+1 eq 1}">
|
||||
<c:set var="lableInfo" value="${lable.itemValue}"></c:set>
|
||||
</c:if>
|
||||
<c:if test="${status.index+1 ne 1}">
|
||||
<c:set var="lableInfo" value="${lableInfo},${lable.itemValue}"></c:set>
|
||||
</c:if>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
<a href="javascript:;" data-original-title="${lableInfo}"
|
||||
class="tooltips" data-flag="false" data-html="true" data-placement="top">
|
||||
${fns:abbr(lableInfo,20)}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<c:if test="${indexCfg.isValid==0}"><spring:message code="no"/></c:if>
|
||||
<c:if test="${indexCfg.isValid==1}"><spring:message code="yes"/></c:if>
|
||||
<c:if test="${indexCfg.isValid==-1}"><spring:message code="deleted"/></c:if>
|
||||
</td>
|
||||
<td>${indexCfg.creatorName }</td>
|
||||
<td><fmt:formatDate value="${indexCfg.createTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<td>${indexCfg.editorName }</td>
|
||||
<td><fmt:formatDate value="${indexCfg.editTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<td>${indexCfg.auditorName }</td>
|
||||
<td><fmt:formatDate value="${indexCfg.auditTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="page">${page}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,233 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<title><spring:message code="${cfgName}"></spring:message></title>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
|
||||
$("#urlInfo,#urlBtn").on('click',function(){
|
||||
$("#cfgFile").trigger("click");
|
||||
});
|
||||
|
||||
$("#cfgFile").on('change',function(){
|
||||
$("#urlInfo").val($("#cfgFile").val());
|
||||
});
|
||||
|
||||
$("#cfgFrom") .validate( {
|
||||
submitHandler : function(form) {
|
||||
loading('onloading...');
|
||||
form.submit();
|
||||
},
|
||||
errorContainer : "#messageBox",
|
||||
errorPlacement : function(error, element) {
|
||||
$(element).parents(".form-group").find( "div[for='" + element.attr("name") + "']").append(error);
|
||||
},
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="page-content">
|
||||
|
||||
<h3 class="page-title">
|
||||
<spring:message code="${_cfg.menuNameCode }"></spring:message>
|
||||
</h3>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet box blue">
|
||||
<div class="portlet-title">
|
||||
<div class="caption">
|
||||
<i class="fa fa-gift"></i>
|
||||
<c:if test="${empty _cfg.cfgId}">
|
||||
<spring:message code="add"></spring:message>
|
||||
</c:if>
|
||||
<c:if test="${not empty _cfg.cfgId}">
|
||||
<spring:message code="edit"></spring:message>
|
||||
</c:if>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body form">
|
||||
<!-- BEGIN FORM-->
|
||||
<form id="cfgFrom" action="${ctx}/proxy/fileInsertScript/saveOrUpdate" enctype="multipart/form-data" method="post" class="form-horizontal">
|
||||
<input type="hidden" name="functionId" value="${_cfg.functionId}">
|
||||
<input type="hidden" id="compileId" name="compileId" value="${_cfg.compileId}">
|
||||
<input type="hidden" name="isValid" value="${_cfg.isValid}">
|
||||
<input type="hidden" name="isAudit" value="${_cfg.isAudit}">
|
||||
<input type="hidden" id="cfgId" name="cfgId" value="${_cfg.cfgId}">
|
||||
<input type="hidden" id="isAreaEffective" name="isAreaEffective" value="0">
|
||||
<input type="hidden" id="isAdd" name="isAdd" value="${isAdd}">
|
||||
<c:forEach items="${serviceList}" var="service">
|
||||
<c:if test="${_cfg.functionId eq service.functionId}">
|
||||
<input type="hidden" name="serviceId" value="${service.serviceId}">
|
||||
<input type="hidden" name="action" value="${service.action}">
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
<div class="form-body">
|
||||
<div class="row">
|
||||
<div class="col-md-6 hidden">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><spring:message code="action"/></label>
|
||||
<div class="col-md-6">
|
||||
<c:forEach items="${serviceList}" var="service"
|
||||
varStatus="satus">
|
||||
<label class="radio-inline"> <c:if
|
||||
test="${_cfg.functionId eq service.functionId}">
|
||||
<input type="radio" name="action" class="action"
|
||||
serviceId="${service.serviceId }"
|
||||
protocolId="${service.protocolId }"
|
||||
configDolog="${service.configDoLog }"
|
||||
value="${service.action }" class="required action"
|
||||
<c:if test="${_cfg.action==service.action || (_cfg.action==null && satus.index==0)}">checked</c:if>>
|
||||
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict">
|
||||
<c:if test="${dict.itemCode eq service.action }">
|
||||
<spring:message code="${dict.itemValue }"/>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
</label>
|
||||
</c:forEach>
|
||||
</div>
|
||||
<div for="action"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 hidden">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><spring:message code="do_log" /></label>
|
||||
<c:forEach items="${fns:getDictList('DO_LOG') }" var="dict">
|
||||
<c:choose>
|
||||
<c:when test="${dict.itemCode eq _cfg.doLog}">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="doLog" checked value="${dict.itemCode}" ><spring:message code="${dict.itemValue}"/>
|
||||
</label>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="doLog" value="${dict.itemCode}" ><spring:message code="${dict.itemValue}"/>
|
||||
</label>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</c:forEach>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="file_insert_script" /></label>
|
||||
<div class="col-md-6">
|
||||
<input id="cfgFile" name="cfgFile" type="file" style="width: 330px; display: none" />
|
||||
<div class="input-group">
|
||||
<input id="urlInfo" name="urlInfo" readonly="readonly" data-msg-required="" placeholder="<spring:message code="select_file"/>" class="required form-control"
|
||||
style="background-color: transparent" aria-required="true"
|
||||
type="text" value="${_cfg.path}">
|
||||
<div class="input-group-btn">
|
||||
<a id="urlBtn" class="btn btn-default btn-search"
|
||||
href="javascript:" style=""><i class="fa fa-search"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div for="urlInfo"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><spring:message code="profile_name"/></label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control" type="text" name="cfgDesc" value="${_cfg.cfgDesc}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">
|
||||
<font color="red">*</font><spring:message code="format" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<%-- <select name="format" data-live-search="true" data-live-search-placeholder="search" class="selectpicker form-control required">
|
||||
<option value=""><spring:message code="select"/></option>
|
||||
<c:forEach items="${fns:getDictList('CONTENT_TYPE')}" var="dict">
|
||||
<option value="${dict.itemCode}" <c:if test="${dict.itemCode==_cfg.format}">selected</c:if>>${dict.itemCode}</option>
|
||||
</c:forEach>
|
||||
</select> --%>
|
||||
<select name="format" data-live-search="true" data-live-search-placeholder="search" class="selectpicker form-control required">
|
||||
<option value=""><spring:message code="select"/></option>
|
||||
<option value="js" <c:if test="${'js'==_cfg.format}">selected</c:if>>js</option>
|
||||
<option value="css" <c:if test="${'css'==_cfg.format}">selected</c:if>>css</option>
|
||||
</select>
|
||||
</div>
|
||||
<div for="format"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 hidden">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="action"/></label>
|
||||
<div class="col-md-6">
|
||||
<c:forEach items="${serviceList}" var="service" varStatus="satus">
|
||||
<label class="radio-inline"> <c:if
|
||||
test="${_cfg.functionId eq service.functionId}">
|
||||
<input type="radio" name="action"
|
||||
serviceId="${service.serviceId }"
|
||||
protocolId="${service.protocolId }"
|
||||
value="${service.action }" class="required action"
|
||||
<c:if test="${_cfg.action==service.action || (_cfg.action==null && satus.index==0)}">checked</c:if>>
|
||||
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict">
|
||||
<c:if test="${dict.itemCode eq service.action }">
|
||||
<spring:message code="${dict.itemValue }"/>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
</label>
|
||||
</c:forEach>
|
||||
</div>
|
||||
<div for="action"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<%@include file="/WEB-INF/include/form/basicInfo.jsp"%>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="row">
|
||||
<div class="col-md-offset-3 col-md-8">
|
||||
<c:set var="auditPermission" value="false"></c:set>
|
||||
<!-- 拥有配置新增直接生效的功能权限 -->
|
||||
<shiro:hasPermission name="save:audit:permission">
|
||||
<c:set var="auditPermission" value="true"></c:set>
|
||||
</shiro:hasPermission>
|
||||
<c:choose>
|
||||
<c:when test="${!(fns:getUser().isAdmin()) && auditPermission}">
|
||||
<button id="audit" type="submit" class="btn green">
|
||||
<spring:message code="submit" />
|
||||
</button>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<button id="save" type="submit" class="btn green">
|
||||
<spring:message code="submit" />
|
||||
</button>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
<button id="cancel" type="button" class="btn default"><spring:message code="cancel"/></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6"></div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<!-- END FORM-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,412 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<title><spring:message code="${cfgName}"></spring:message></title>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
//搜索框提示语初始化
|
||||
if("${cfg.cfgDesc}"){
|
||||
$("#intype").val("${cfg.cfgDesc}");
|
||||
}else{
|
||||
$("#intype").attr("placeholder","<spring:message code='input'/> "+$("#seltype").find("option:selected").text());
|
||||
}
|
||||
$("#seltype").change(function(){
|
||||
$("#intype").attr("placeholder","<spring:message code='input'/> "+$(this).find("option:selected").text());
|
||||
});
|
||||
//筛选功能初始化
|
||||
filterActionInit();
|
||||
$("#isAudit").change(function(){
|
||||
page();
|
||||
});
|
||||
//reset
|
||||
$("#resetBtn").on("click",function(){
|
||||
$("select.selectpicker").each(function(){
|
||||
$(this).selectpicker('val',$(this).find('option:first').val());
|
||||
$(this).find("option").attr("selected",false);
|
||||
$(this).find("option:first").attr("selected",true);
|
||||
});
|
||||
$(".Wdate").attr("value",'');
|
||||
$("#description").attr("value",'');
|
||||
$("#searchForm")[0].reset();
|
||||
$("#intype").attr("placeholder","<spring:message code='input'/> "+$("#seltype").find("option:selected").text());
|
||||
});
|
||||
|
||||
if($("#exportType").val() != null && $("#exportType").val() != ""){
|
||||
if($("#intype").val() != null && $("#intype").val() != ""){
|
||||
$("#exportValue").val($("#intype").val());
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="page-content">
|
||||
<div class="theme-panel hidden-xs hidden-sm">
|
||||
|
||||
<shiro:hasPermission name="proxy:fileInsertScript:config">
|
||||
<button type="button" class="addId btn btn-primary"
|
||||
onClick="javascript:window.location='${ctx}/proxy/fileInsertScript/form?functionId=${cfg.functionId}'">
|
||||
<i class="fa fa-plus"></i>
|
||||
<spring:message code="add"></spring:message></button>
|
||||
</shiro:hasPermission>
|
||||
</div>
|
||||
|
||||
<h3 class="page-title">
|
||||
<spring:message code="${cfg.menuNameCode }"></spring:message>
|
||||
</h3>
|
||||
<h5 class="page-header"></h5>
|
||||
<div class="col-md-12">
|
||||
<div class="portlet">
|
||||
<div class="portlet-body">
|
||||
<div class="row" >
|
||||
<form:form id="searchForm" modelAttribute="cfg" action="${ctx}/proxy/fileInsertScript/list?functionId=${cfg.functionId}" method="post" class="form-search">
|
||||
<input id="functionId" name="functionId" type="hidden" value="${cfg.functionId}"/>
|
||||
<input id="audit" name="audit" type="hidden" value="${audit}"/>
|
||||
<input id="exportType" type="hidden" value="${cfg.seltype}"/>
|
||||
<input id="exportValue" type="hidden" value=""/>
|
||||
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
|
||||
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
|
||||
<sys:tableSort id="orderBy" name="orderBy" value="${page.orderBy}"
|
||||
callback="page();" />
|
||||
<!-- 筛选按钮展开状态-->
|
||||
<input id="isFilterAction" name="isFilterAction" type="hidden" value="${cfg.isFilterAction }"/>
|
||||
<!-- 搜索内容与操作按钮栏 -->
|
||||
<div class="col-md-12">
|
||||
<div class="pull-left">
|
||||
<c:set var="state"><spring:message code='state'/></c:set>
|
||||
<form:select path="isAudit" class="selectpicker select2 input-small">
|
||||
<form:option value=""><spring:message code="all_states"/></form:option>
|
||||
<form:option value="0"><spring:message code="created"></spring:message></form:option>
|
||||
<form:option value="1"><spring:message code="approved"></spring:message></form:option>
|
||||
<form:option value="2"><spring:message code="unapproved"></spring:message></form:option>
|
||||
<form:option value="3"><spring:message code="cancel_approved"></spring:message></form:option>
|
||||
</form:select>
|
||||
</div>
|
||||
|
||||
<div class="pull-left">
|
||||
|
||||
<div class="input-group">
|
||||
<div class="input-group-btn">
|
||||
|
||||
<form:select path="seltype" class="selectpicker select2 input-small" >
|
||||
<form:option value="cfgDesc"><spring:message code="profile_name"></spring:message></form:option>
|
||||
<form:option value="isValid"><spring:message code="valid_identifier"></spring:message></form:option>
|
||||
</form:select>
|
||||
|
||||
</div>
|
||||
|
||||
<input id="intype" class="form-control input-medium" type="text" value="">
|
||||
<div class="input-group-btn">
|
||||
<form:select id="actionSelect" path="action" class="selectpicker select2 input-small" >
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<c:forEach items="${serviceList}" var="service">
|
||||
<form:option value="${service.action }"><spring:message code="action_${service.actionCode }"/></form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
<form:select path="isValid" class="selectpicker select2 input-small" >
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<form:option value="1"><spring:message code="yes"/></form:option>
|
||||
<form:option value="0"><spring:message code="no"/></form:option>
|
||||
</form:select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
<button type="button" class="btn blue" onClick="return page()"> <i class="fa fa-search"></i> <spring:message code="search"/> </button>
|
||||
<button type="button" class="btn btn-default" id="resetBtn"> <i class="fa fa-refresh"></i> <spring:message code="reset"/> </button>
|
||||
<button type="button" class="btn btn-default" id="filter-btn"> <spring:message code="filter"/> <i class="fa fa-angle-double-down"></i></button>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<shiro:hasPermission name="proxy:fileInsertScript:config">
|
||||
<sys:delRow url="${ctx}/proxy/fileInsertScript/form" id="contentTable" label="update"></sys:delRow>
|
||||
<sys:delRow url="${ctx}/proxy/fileInsertScript/delete?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
|
||||
</shiro:hasPermission>
|
||||
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
<i class="fa fa-wrench"></i> <spring:message code="export"></spring:message>
|
||||
<i class="fa fa-angle-down"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu pull-right" style="min-width: 110px;" >
|
||||
<li><sys:delRow url="${ctx}/proxy/fileInsertScript/exportFileInsertScript?functionId=${cfg.functionId }&exType=excel" searchUrl="${ctx}/proxy/fileInsertScript/list?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="cfg_excel"></sys:delRow></li>
|
||||
<li><sys:delRow url="${ctx}/proxy/fileInsertScript/exportFileInsertScript?functionId=${cfg.functionId }&exType=csv" searchUrl="${ctx}/proxy/fileInsertScript/list?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="cfg_csv"></sys:delRow></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<shiro:hasPermission name="proxy:fileInsertScript:confirm">
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
<i class="fa fa-wrench"></i> <spring:message code="examine"></spring:message>
|
||||
<i class="fa fa-angle-down"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu pull-right">
|
||||
<li><sys:delRow url="${ctx}/proxy/fileInsertScript/audit?isAudit=1&isValid=1&functionId=${cfg.functionId }" id="contentTable" label="approved"></sys:delRow></li>
|
||||
<li><sys:delRow url="${ctx}/proxy/fileInsertScript/audit?isAudit=2&isValid=0&functionId=${cfg.functionId }" id="contentTable" label="unapproved"></sys:delRow></li>
|
||||
<li><sys:delRow url="${ctx}/proxy/fileInsertScript/audit?isAudit=3&isValid=0&functionId=${cfg.functionId }" id="contentTable" label="cancelPass"></sys:delRow></li>
|
||||
</ul>
|
||||
</div>
|
||||
</shiro:hasPermission>
|
||||
<a class="btn btn-icon-only btn-default setfields tooltips"
|
||||
data-container="body" data-placement="top" data-original-title=<spring:message code="custom_columns"/> href="javascript:;">
|
||||
<i class="icon-wrench"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /搜索内容与操作按钮栏 -->
|
||||
|
||||
<!-- 筛选搜索内容栏默认隐藏-->
|
||||
<div class="col-md-12 filter-action-select-panle hide" >
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-3">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label"><spring:message code='letter'/></label>
|
||||
<c:set var="select"><spring:message code='select'/></c:set>
|
||||
<form:select path="requestId" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<c:forEach items="${requestInfos}" var="requestInfo" >
|
||||
<form:option value="${requestInfo.id}"><spring:message code="${requestInfo.requestTitle}"></spring:message></form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label"><spring:message code='classification'/></label>
|
||||
<form:select path="classify" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<c:forEach items="${fls}" var="fl" >
|
||||
<form:option value="${fl.serviceDictId}"><spring:message code="${fl.itemValue}"></spring:message></form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label"><spring:message code='attribute'/></label>
|
||||
<c:set var="select"><spring:message code='select'/></c:set>
|
||||
<form:select path="attribute" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<c:forEach items="${xzs}" var="xz" >
|
||||
<form:option value="${xz.serviceDictId}"><spring:message code="${xz.itemValue}"></spring:message></form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label"><spring:message code='label'/></label>
|
||||
<form:select path="lable" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<c:forEach items="${lables}" var="lable" >
|
||||
<form:option value="${lable.serviceDictId}"><spring:message code="${lable.itemValue}"></spring:message></form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label><spring:message code="config_time"/>:</label>
|
||||
<input name="search_create_time_start" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value='${cfg.search_create_time_start}' pattern='yyyy-MM-dd HH:mm:ss'/>" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label> </label>
|
||||
<input name="search_create_time_end" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_create_time_end}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label><spring:message code="edit_time"/>:</label>
|
||||
<input name="search_edit_time_start" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_edit_time_start}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label> </label>
|
||||
<input name="search_edit_time_end" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_edit_time_end}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label><spring:message code="audit_time"/>:</label>
|
||||
<input name="search_audit_time_start" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_audit_time_start}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label> </label>
|
||||
<input name="search_audit_time_end" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_audit_time_end}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<!-- /筛选搜索内容栏 结束-->
|
||||
</form:form>
|
||||
</div>
|
||||
<sys:message content="${message}" type="${messageType }"/>
|
||||
<div class="table-responsive">
|
||||
|
||||
<table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><input type="checkbox" class="i-checks" id="checkAll"></th>
|
||||
<th column="cfg_id" class="sort-column a.compile_id" style="display: none;"><spring:message code="cfg_id"/></th>
|
||||
<th column="profile_name" class="sort-column a.cfgDesc"><spring:message code="profile_name"/></th>
|
||||
<th column="disk_path" ><spring:message code="disk_path"/></th>
|
||||
<th column="format" ><spring:message code="format"/></th>
|
||||
<th column="is_audit" class="a.is_valid"><spring:message code="is_audit"/></th>
|
||||
<th column="letter" ><spring:message code="letter"/></th>
|
||||
<th column="classification" ><spring:message code="classification"/></th>
|
||||
<th column="attribute" ><spring:message code="attribute"/></th>
|
||||
<th column="label" ><spring:message code="label"/></th>
|
||||
<th column="valid_identifier" class="sort-column a.is_valid"><spring:message code="valid_identifier"/></th>
|
||||
<th column="creator" ><spring:message code="creator"/></th>
|
||||
<th column="config_time" class="sort-column a.create_time"><spring:message code="config_time"/></th>
|
||||
<th column="editor" ><spring:message code="editor"/></th>
|
||||
<th column="edit_time" class="sort-column a.edit_time"><spring:message code="edit_time"/></th>
|
||||
<th column="auditor" ><spring:message code="auditor"/></th>
|
||||
<th column="audit_time" class="sort-column a.audit_time"><spring:message code="audit_time"/></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:forEach items="${page.list }" var="indexCfg" varStatus="status" step="1">
|
||||
<tr>
|
||||
<td>
|
||||
<input type="checkbox" class="i-checks child-checks" id="${indexCfg.cfgId}" quoteStatus="${indexCfg.quote}" value="${indexCfg.isAudit}">
|
||||
</td>
|
||||
<td>${indexCfg.compileId }</td>
|
||||
<td>${indexCfg.cfgDesc}</a></td>
|
||||
<td><a href="${indexCfg.path}" target="_blank" data-original-title="${indexCfg.path}"
|
||||
class="tooltips" data-flag="false" data-html="true" data-placement="top">
|
||||
${fn:substring(indexCfg.path,0,20) }</a>
|
||||
</td>
|
||||
<td>${indexCfg.format }</td>
|
||||
<td>
|
||||
<c:choose>
|
||||
<c:when test="${indexCfg.isAudit eq '0'}"><span class="label label-danger"><spring:message code="created"></spring:message></span></c:when>
|
||||
<c:when test="${indexCfg.isAudit eq '1'}"><span class="label label-success"><spring:message code="approved"></spring:message></span></c:when>
|
||||
<c:when test="${indexCfg.isAudit eq '2'}"><span class="label label-warning"><spring:message code="unapproved"></spring:message></span></c:when>
|
||||
<c:when test="${indexCfg.isAudit eq '3'}"><span indexTable="${indexCfg.indexTable}" data-placement="right" data-original-title="<spring:message code='letter_cancel_info'/>: " class="label le-ca-fo label-warning tooltips" data-icon=""> <spring:message code="cancel_approved"/></span></c:when>
|
||||
</c:choose>
|
||||
</td>
|
||||
<td>${indexCfg.requestName }</td>
|
||||
<td>
|
||||
<c:set var="classify"></c:set>
|
||||
<c:forEach items="${fn:split(indexCfg.classify,',')}" var="classifyId" varStatus="status">
|
||||
<c:forEach items="${fls}" var="fl">
|
||||
<c:if test="${classifyId eq fn:trim(fl.serviceDictId)}">
|
||||
<c:if test="${status.index+1 eq 1}">
|
||||
<c:set var="classify" value="${fl.itemValue}"></c:set>
|
||||
</c:if>
|
||||
<c:if test="${status.index+1 ne 1}">
|
||||
<c:set var="classify" value="${classify},${fl.itemValue}"></c:set>
|
||||
</c:if>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
<a href="javascript:;" data-original-title="${classify}"
|
||||
class="tooltips" data-flag="false" data-html="true" data-placement="top">
|
||||
${fns:abbr(classify,20)}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<c:set var="attribute"></c:set>
|
||||
<c:forEach items="${fn:split(indexCfg.attribute,',')}" var="attributeId" varStatus="status">
|
||||
<c:forEach items="${xzs}" var="xz">
|
||||
<c:if test="${attributeId eq fn:trim(xz.serviceDictId)}">
|
||||
<c:if test="${status.index+1 eq 1}">
|
||||
<c:set var="attribute" value="${xz.itemValue}"></c:set>
|
||||
</c:if>
|
||||
<c:if test="${status.index+1 ne 1}">
|
||||
<c:set var="attribute" value="${attribute},${xz.itemValue}"></c:set>
|
||||
</c:if>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
<a href="javascript:;" data-original-title="${attribute}"
|
||||
class="tooltips" data-flag="false" data-html="true" data-placement="top">
|
||||
${fns:abbr(attribute,20)}
|
||||
</a>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<c:set var="lableInfo"></c:set>
|
||||
<c:forEach items="${fn:split(indexCfg.lable,',')}" var="lableId" varStatus="status">
|
||||
<c:forEach items="${lables}" var="lable">
|
||||
<c:if test="${lableId eq fn:trim(lable.serviceDictId)}">
|
||||
<c:if test="${status.index+1 eq 1}">
|
||||
<c:set var="lableInfo" value="${lable.itemValue}"></c:set>
|
||||
</c:if>
|
||||
<c:if test="${status.index+1 ne 1}">
|
||||
<c:set var="lableInfo" value="${lableInfo},${lable.itemValue}"></c:set>
|
||||
</c:if>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
<a href="javascript:;" data-original-title="${lableInfo}"
|
||||
class="tooltips" data-flag="false" data-html="true" data-placement="top">
|
||||
${fns:abbr(lableInfo,20)}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<c:if test="${indexCfg.isValid==0}"><spring:message code="no"/></c:if>
|
||||
<c:if test="${indexCfg.isValid==1}"><spring:message code="yes"/></c:if>
|
||||
<c:if test="${indexCfg.isValid==-1}"><spring:message code="deleted"/></c:if>
|
||||
</td>
|
||||
<td>${indexCfg.creatorName }</td>
|
||||
<td><fmt:formatDate value="${indexCfg.createTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<td>${indexCfg.editorName }</td>
|
||||
<td><fmt:formatDate value="${indexCfg.editTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<td>${indexCfg.auditorName }</td>
|
||||
<td><fmt:formatDate value="${indexCfg.auditTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="page">${page}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -10,11 +10,6 @@
|
||||
$("#cfgFile").trigger("click");
|
||||
});
|
||||
|
||||
/* $(".action").on("change",function(){
|
||||
$("#serviceId").val($(this).attr("serviceId"));
|
||||
});
|
||||
$("#serviceId").val($(".action:checked").attr("serviceId"));//初始化*/
|
||||
|
||||
$("#cfgFile").on('change',function(){
|
||||
$("#urlInfo").val($("#cfgFile").val());
|
||||
});
|
||||
@@ -58,11 +53,68 @@
|
||||
<div class="portlet-body form">
|
||||
<!-- BEGIN FORM-->
|
||||
<form id="cfgFrom" action="${ctx}/proxy/fileStrategy/saveOrUpdate" enctype="multipart/form-data" method="post" class="form-horizontal">
|
||||
<input type="hidden" name="cfgId" value="${_cfg.cfgId}">
|
||||
<input type="hidden" name="functionId" value="${_cfg.functionId}">
|
||||
<input type="hidden" id="serviceId" name="serviceId" value="608">
|
||||
<input type="hidden" id="compileId" name="compileId" value="${_cfg.compileId}">
|
||||
<input type="hidden" name="isValid" value="${_cfg.isValid}">
|
||||
<input type="hidden" name="isAudit" value="${_cfg.isAudit}">
|
||||
<input type="hidden" id="cfgId" name="cfgId" value="${_cfg.cfgId}">
|
||||
<input type="hidden" id="isAreaEffective" name="isAreaEffective" value="0">
|
||||
<input type="hidden" id="isAdd" name="isAdd" value="${isAdd}">
|
||||
<c:forEach items="${serviceList}" var="service">
|
||||
<c:if test="${_cfg.functionId eq service.functionId}">
|
||||
<input type="hidden" name="serviceId" value="${service.serviceId}">
|
||||
<input type="hidden" name="action" value="${service.action}">
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
<div class="form-body">
|
||||
<div class="row">
|
||||
<div class="row">
|
||||
<div class="col-md-6 hidden">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><spring:message code="action"/></label>
|
||||
<div class="col-md-6">
|
||||
<c:forEach items="${serviceList}" var="service"
|
||||
varStatus="satus">
|
||||
<label class="radio-inline"> <c:if
|
||||
test="${_cfg.functionId eq service.functionId}">
|
||||
<input type="radio" name="action" class="action"
|
||||
serviceId="${service.serviceId }"
|
||||
protocolId="${service.protocolId }"
|
||||
configDolog="${service.configDoLog }"
|
||||
value="${service.action }" class="required action"
|
||||
<c:if test="${_cfg.action==service.action || (_cfg.action==null && satus.index==0)}">checked</c:if>>
|
||||
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict">
|
||||
<c:if test="${dict.itemCode eq service.action }">
|
||||
<spring:message code="${dict.itemValue }"/>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
</label>
|
||||
</c:forEach>
|
||||
</div>
|
||||
<div for="action"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 hidden">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><spring:message code="do_log" /></label>
|
||||
<c:forEach items="${fns:getDictList('DO_LOG') }" var="dict">
|
||||
<c:choose>
|
||||
<c:when test="${dict.itemCode eq _cfg.doLog}">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="doLog" checked value="${dict.itemCode}" ><spring:message code="${dict.itemValue}"/>
|
||||
</label>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="doLog" value="${dict.itemCode}" ><spring:message code="${dict.itemValue}"/>
|
||||
</label>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</c:forEach>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
@@ -79,7 +131,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div for="fileUrl"></div>
|
||||
<div for="urlInfo"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
@@ -135,24 +187,35 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="isAreaEffective" value="0">
|
||||
<%@include file="/WEB-INF/include/form/basicInfo.jsp"%>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="row">
|
||||
<div class="col-md-offset-3 col-md-8">
|
||||
<button id="save" type="submit" class="btn green">
|
||||
<spring:message code="submit" />
|
||||
</button>
|
||||
<button id="cancel" type="button" class="btn default">
|
||||
<spring:message code="cancel" />
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6"></div>
|
||||
<div class="row">
|
||||
<div class="col-md-offset-3 col-md-8">
|
||||
<c:set var="auditPermission" value="false"></c:set>
|
||||
<!-- 拥有配置新增直接生效的功能权限 -->
|
||||
<shiro:hasPermission name="save:audit:permission">
|
||||
<c:set var="auditPermission" value="true"></c:set>
|
||||
</shiro:hasPermission>
|
||||
<c:choose>
|
||||
<c:when test="${!(fns:getUser().isAdmin()) && auditPermission}">
|
||||
<button id="audit" type="submit" class="btn green">
|
||||
<spring:message code="submit" />
|
||||
</button>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<button id="save" type="submit" class="btn green">
|
||||
<spring:message code="submit" />
|
||||
</button>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
<button id="cancel" type="button" class="btn default"><spring:message code="cancel"/></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6"></div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@@ -0,0 +1,239 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<title><spring:message code="${cfgName}"></spring:message></title>
|
||||
<style type="text/css">
|
||||
.comments {
|
||||
width:100%;/*自动适应父布局宽度*/
|
||||
overflow:auto;
|
||||
word-break:break-all;
|
||||
/*在ie中解决断行问题(防止自动变为在一行显示,主要解决ie兼容问题,ie8中当设宽度为100%时,文本域类容超过一行时,
|
||||
当我们双击文本内容就会自动变为一行显示,所以只能用ie的专有断行属性“word-break或word-wrap”控制其断行)*/
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
var regex = /^([A-Fa-f0-9]{2}-){5}[A-Fa-f0-9]{2}$/;
|
||||
var num = /^[1-9]*[1-9][0-9]*$/;
|
||||
var tip =$.validator.messages.addrList;
|
||||
jQuery.validator.addMethod("addrList",function(value,element){
|
||||
var flagTypeSame=true;
|
||||
var addrType = $("#addrTypeList").val();
|
||||
var addrList = $("#addrList").val();
|
||||
var addrListTemp = addrList.split(",");
|
||||
if(addrType=='mac'){
|
||||
for(var i = 0; i < addrListTemp.length; i++){
|
||||
if(!regex.test(addrListTemp[i])){
|
||||
flagTypeSame=false;
|
||||
return flagTypeSame;
|
||||
}else{
|
||||
flagTypeSame=true;
|
||||
}
|
||||
}
|
||||
}else if(addrType=='vlan'){
|
||||
for(var i = 0; i < addrListTemp.length; i++){
|
||||
if(!num.test(addrListTemp[i])){
|
||||
flagTypeSame=false;
|
||||
return flagTypeSame;
|
||||
}else{
|
||||
if(addrListTemp[i]>4094){
|
||||
flagTypeSame=false;
|
||||
return flagTypeSame;
|
||||
}
|
||||
flagTypeSame=true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return flagTypeSame;
|
||||
},tip);
|
||||
|
||||
/* $('#addrTypeList').change(function(){
|
||||
var addrTypeT = $('#addrTypeList').val();
|
||||
var addrListT = $('#addrList').val();
|
||||
if (addrTypeT == 'mac') {
|
||||
if(!regexp.test(addrListT)){
|
||||
console.log("mac地址输入不正确--筛选框检测");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}); */
|
||||
|
||||
$("#cfgFrom") .validate( {
|
||||
submitHandler : function(form) {
|
||||
loading('onloading...');
|
||||
form.submit();
|
||||
},
|
||||
errorContainer : "#messageBox",
|
||||
errorPlacement : function(error, element) {
|
||||
$(element).parents(".form-group").find( "div[for='" + element.attr("name") + "']").append(error);
|
||||
},
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="page-content">
|
||||
|
||||
<h3 class="page-title">
|
||||
<spring:message code="${_cfg.menuNameCode }"></spring:message>
|
||||
</h3>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet box blue">
|
||||
<div class="portlet-title">
|
||||
<div class="caption">
|
||||
<i class="fa fa-gift"></i>
|
||||
<c:if test="${empty _cfg.cfgId}">
|
||||
<spring:message code="add"></spring:message>
|
||||
</c:if>
|
||||
<c:if test="${not empty _cfg.cfgId}">
|
||||
<spring:message code="edit"></spring:message>
|
||||
</c:if>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body form">
|
||||
<!-- BEGIN FORM-->
|
||||
<form id="cfgFrom" action="${ctx}/proxy/fileTrafficMirror/saveOrUpdate" enctype="multipart/form-data" method="post" class="form-horizontal">
|
||||
<input type="hidden" name="functionId" value="${_cfg.functionId}">
|
||||
<input type="hidden" id="compileId" name="compileId" value="${_cfg.compileId}">
|
||||
<input type="hidden" name="isValid" value="${_cfg.isValid}">
|
||||
<input type="hidden" name="isAudit" value="${_cfg.isAudit}">
|
||||
<input type="hidden" id="cfgId" name="cfgId" value="${_cfg.cfgId}">
|
||||
<input type="hidden" id="isAreaEffective" name="isAreaEffective" value="0">
|
||||
<input type="hidden" id="isAdd" name="isAdd" value="${isAdd}">
|
||||
<c:forEach items="${serviceList}" var="service">
|
||||
<c:if test="${_cfg.functionId eq service.functionId}">
|
||||
<input type="hidden" name="serviceId" value="${service.serviceId}">
|
||||
<input type="hidden" name="action" value="${service.action}">
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
<div class="form-body">
|
||||
<div class="row">
|
||||
<div class="col-md-6 hidden">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><spring:message code="action"/></label>
|
||||
<div class="col-md-6">
|
||||
<c:forEach items="${serviceList}" var="service"
|
||||
varStatus="satus">
|
||||
<label class="radio-inline"> <c:if
|
||||
test="${_cfg.functionId eq service.functionId}">
|
||||
<input type="radio" name="action" class="action"
|
||||
serviceId="${service.serviceId }"
|
||||
protocolId="${service.protocolId }"
|
||||
configDolog="${service.configDoLog }"
|
||||
value="${service.action }" class="required action"
|
||||
<c:if test="${_cfg.action==service.action || (_cfg.action==null && satus.index==0)}">checked</c:if>>
|
||||
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict">
|
||||
<c:if test="${dict.itemCode eq service.action }">
|
||||
<spring:message code="${dict.itemValue }"/>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
</label>
|
||||
</c:forEach>
|
||||
</div>
|
||||
<div for="action"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 hidden">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><spring:message code="do_log" /></label>
|
||||
<c:forEach items="${fns:getDictList('DO_LOG') }" var="dict">
|
||||
<c:choose>
|
||||
<c:when test="${dict.itemCode eq _cfg.doLog}">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="doLog" checked value="${dict.itemCode}" ><spring:message code="${dict.itemValue}"/>
|
||||
</label>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="doLog" value="${dict.itemCode}" ><spring:message code="${dict.itemValue}"/>
|
||||
</label>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</c:forEach>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><spring:message code="target_name"/></label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control" type="text" name="cfgDesc" value="${_cfg.cfgDesc}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">
|
||||
<font color="red">*</font><spring:message code="mirror_addr_type" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<select id="addrTypeList" name="addrType" data-live-search="true" data-live-search-placeholder="search" class="selectpicker form-control required">
|
||||
<option value=""><spring:message code="select"/></option>
|
||||
<option value="vlan" <c:if test="${'vlan'==_cfg.addrType}">selected</c:if>>vlan</option>
|
||||
<option value="mac" <c:if test="${'mac'==_cfg.addrType}">selected</c:if>>mac</option>
|
||||
</select>
|
||||
</div>
|
||||
<div for="addrType"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">
|
||||
<font color="red">*</font><spring:message code="mirror_addr_list" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<textarea id="addrList" name="addrList" class="form-control addrList" style="height:expression((this.scrollHeight>150)?'150px':(this.scrollHeight+5)+'px');overflow:auto;">${_cfg.addrList}</textarea>
|
||||
</div>
|
||||
<div for="addrList"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<%@include file="/WEB-INF/include/form/basicInfo.jsp"%>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="row">
|
||||
<div class="col-md-offset-3 col-md-8">
|
||||
<c:set var="auditPermission" value="false"></c:set>
|
||||
<!-- 拥有配置新增直接生效的功能权限 -->
|
||||
<shiro:hasPermission name="save:audit:permission">
|
||||
<c:set var="auditPermission" value="true"></c:set>
|
||||
</shiro:hasPermission>
|
||||
<c:choose>
|
||||
<c:when test="${!(fns:getUser().isAdmin()) && auditPermission}">
|
||||
<button id="audit" type="submit" class="btn green">
|
||||
<spring:message code="submit" />
|
||||
</button>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<button id="save" type="submit" class="btn green">
|
||||
<spring:message code="submit" />
|
||||
</button>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
<button id="cancel" type="button" class="btn default"><spring:message code="cancel"/></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6"></div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<!-- END FORM-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,419 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<title><spring:message code="${cfgName}"></spring:message></title>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
//搜索框提示语初始化
|
||||
if("${cfg.cfgDesc}"){
|
||||
$("#intype").val("${cfg.cfgDesc}");
|
||||
}else{
|
||||
$("#intype").attr("placeholder","<spring:message code='input'/> "+$("#seltype").find("option:selected").text());
|
||||
}
|
||||
$("#seltype").change(function(){
|
||||
$("#intype").attr("placeholder","<spring:message code='input'/> "+$(this).find("option:selected").text());//
|
||||
});
|
||||
//筛选功能初始化
|
||||
filterActionInit();
|
||||
$("#isAudit").change(function(){
|
||||
page();
|
||||
});
|
||||
//reset
|
||||
$("#resetBtn").on("click",function(){
|
||||
$("select.selectpicker").each(function(){
|
||||
$(this).selectpicker('val',$(this).find('option:first').val());
|
||||
$(this).find("option").attr("selected",false);
|
||||
$(this).find("option:first").attr("selected",true);
|
||||
});
|
||||
$(".Wdate").attr("value",'');
|
||||
$("#description").attr("value",'');
|
||||
$("#searchForm")[0].reset();
|
||||
$("#intype").attr("placeholder","<spring:message code='input'/> "+$("#seltype").find("option:selected").text());
|
||||
});
|
||||
|
||||
if($("#exportType").val() != null && $("#exportType").val() != ""){
|
||||
if($("#intype").val() != null && $("#intype").val() != ""){
|
||||
$("#exportValue").val($("#intype").val());
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="page-content">
|
||||
<div class="theme-panel hidden-xs hidden-sm">
|
||||
|
||||
<shiro:hasPermission name="proxy:fileTrafficMirror:config">
|
||||
<button type="button" class="addId btn btn-primary"
|
||||
onClick="javascript:window.location='${ctx}/proxy/fileTrafficMirror/form?functionId=${cfg.functionId}'">
|
||||
<i class="fa fa-plus"></i>
|
||||
<spring:message code="add"></spring:message></button>
|
||||
</shiro:hasPermission>
|
||||
</div>
|
||||
|
||||
<h3 class="page-title">
|
||||
<spring:message code="${cfg.menuNameCode }"></spring:message>
|
||||
</h3>
|
||||
<h5 class="page-header"></h5>
|
||||
<div class="col-md-12">
|
||||
<div class="portlet">
|
||||
<div class="portlet-body">
|
||||
<div class="row" >
|
||||
<form:form id="searchForm" modelAttribute="cfg" action="${ctx}/proxy/fileTrafficMirror/list?functionId=${cfg.functionId}" method="post" class="form-search">
|
||||
<input id="functionId" name="functionId" type="hidden" value="${cfg.functionId}"/>
|
||||
<input id="audit" name="audit" type="hidden" value="${audit}"/>
|
||||
<input id="exportType" type="hidden" value="${cfg.seltype}"/>
|
||||
<input id="exportValue" type="hidden" value=""/>
|
||||
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
|
||||
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
|
||||
<sys:tableSort id="orderBy" name="orderBy" value="${page.orderBy}"
|
||||
callback="page();" />
|
||||
<!-- 筛选按钮展开状态-->
|
||||
<input id="isFilterAction" name="isFilterAction" type="hidden" value="${cfg.isFilterAction }"/>
|
||||
<!-- 搜索内容与操作按钮栏 -->
|
||||
<div class="col-md-12">
|
||||
<div class="pull-left">
|
||||
<c:set var="state"><spring:message code='state'/></c:set>
|
||||
<form:select path="isAudit" class="selectpicker select2 input-small">
|
||||
<form:option value=""><spring:message code="all_states"/></form:option>
|
||||
<form:option value="0"><spring:message code="created"></spring:message></form:option>
|
||||
<form:option value="1"><spring:message code="approved"></spring:message></form:option>
|
||||
<form:option value="2"><spring:message code="unapproved"></spring:message></form:option>
|
||||
<form:option value="3"><spring:message code="cancel_approved"></spring:message></form:option>
|
||||
</form:select>
|
||||
</div>
|
||||
|
||||
<div class="pull-left">
|
||||
|
||||
<div class="input-group">
|
||||
<div class="input-group-btn">
|
||||
|
||||
<form:select path="seltype" class="selectpicker select2 input-small" >
|
||||
<form:option value="cfgDesc"><spring:message code="profile_name"></spring:message></form:option>
|
||||
<form:option value="isValid"><spring:message code="valid_identifier"></spring:message></form:option>
|
||||
<form:option value="addrType"><spring:message code="mirror_addr_type"></spring:message></form:option>
|
||||
</form:select>
|
||||
|
||||
</div>
|
||||
|
||||
<input id="intype" class="form-control input-medium" type="text" value="">
|
||||
<div class="input-group-btn">
|
||||
<form:select id="actionSelect" path="action" class="selectpicker select2 input-small" >
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<c:forEach items="${serviceList}" var="service">
|
||||
<form:option value="${service.action }"><spring:message code="action_${service.actionCode }"/></form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
<form:select path="isValid" class="selectpicker select2 input-small" >
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<form:option value="1"><spring:message code="yes"/></form:option>
|
||||
<form:option value="0"><spring:message code="no"/></form:option>
|
||||
</form:select>
|
||||
<form:select path="addrType" class="selectpicker select2 input-small" >
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<form:option value="mac"><spring:message code="mac"/></form:option>
|
||||
<form:option value="vlan"><spring:message code="vlan"/></form:option>
|
||||
</form:select>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
<button type="button" class="btn blue" onClick="return page()"> <i class="fa fa-search"></i> <spring:message code="search"/> </button>
|
||||
<button type="button" class="btn btn-default" id="resetBtn"> <i class="fa fa-refresh"></i> <spring:message code="reset"/> </button>
|
||||
<button type="button" class="btn btn-default" id="filter-btn"> <spring:message code="filter"/> <i class="fa fa-angle-double-down"></i></button>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<shiro:hasPermission name="proxy:fileTrafficMirror:config">
|
||||
<sys:delRow url="${ctx}/proxy/fileTrafficMirror/form" id="contentTable" label="update"></sys:delRow>
|
||||
<sys:delRow url="${ctx}/proxy/fileTrafficMirror/delete?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
|
||||
</shiro:hasPermission>
|
||||
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
<i class="fa fa-wrench"></i> <spring:message code="export"></spring:message>
|
||||
<i class="fa fa-angle-down"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu pull-right" style="min-width: 110px;" >
|
||||
<li><sys:delRow url="${ctx}/proxy/fileTrafficMirror/exportFileTrafficMirror?functionId=${cfg.functionId }&exType=excel" searchUrl="${ctx}/proxy/fileTrafficMirror/list?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="cfg_excel"></sys:delRow></li>
|
||||
<li><sys:delRow url="${ctx}/proxy/fileTrafficMirror/exportFileTrafficMirror?functionId=${cfg.functionId }&exType=csv" searchUrl="${ctx}/proxy/fileTrafficMirror/list?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="cfg_csv"></sys:delRow></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<shiro:hasPermission name="proxy:fileTrafficMirror:confirm">
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
<i class="fa fa-wrench"></i> <spring:message code="examine"></spring:message>
|
||||
<i class="fa fa-angle-down"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu pull-right">
|
||||
<li><sys:delRow url="${ctx}/proxy/fileTrafficMirror/audit?isAudit=1&isValid=1&functionId=${cfg.functionId }" id="contentTable" label="approved"></sys:delRow></li>
|
||||
<li><sys:delRow url="${ctx}/proxy/fileTrafficMirror/audit?isAudit=2&isValid=0&functionId=${cfg.functionId }" id="contentTable" label="unapproved"></sys:delRow></li>
|
||||
<li><sys:delRow url="${ctx}/proxy/fileTrafficMirror/audit?isAudit=3&isValid=0&functionId=${cfg.functionId }" id="contentTable" label="cancelPass"></sys:delRow></li>
|
||||
</ul>
|
||||
</div>
|
||||
</shiro:hasPermission>
|
||||
<a class="btn btn-icon-only btn-default setfields tooltips"
|
||||
data-container="body" data-placement="top" data-original-title=<spring:message code="custom_columns"/> href="javascript:;">
|
||||
<i class="icon-wrench"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /搜索内容与操作按钮栏 -->
|
||||
|
||||
<!-- 筛选搜索内容栏默认隐藏-->
|
||||
<div class="col-md-12 filter-action-select-panle hide" >
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-3">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label"><spring:message code='letter'/></label>
|
||||
<c:set var="select"><spring:message code='select'/></c:set>
|
||||
<form:select path="requestId" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<c:forEach items="${requestInfos}" var="requestInfo" >
|
||||
<form:option value="${requestInfo.id}"><spring:message code="${requestInfo.requestTitle}"></spring:message></form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label"><spring:message code='classification'/></label>
|
||||
<form:select path="classify" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<c:forEach items="${fls}" var="fl" >
|
||||
<form:option value="${fl.serviceDictId}"><spring:message code="${fl.itemValue}"></spring:message></form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label"><spring:message code='attribute'/></label>
|
||||
<c:set var="select"><spring:message code='select'/></c:set>
|
||||
<form:select path="attribute" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<c:forEach items="${xzs}" var="xz" >
|
||||
<form:option value="${xz.serviceDictId}"><spring:message code="${xz.itemValue}"></spring:message></form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label"><spring:message code='label'/></label>
|
||||
<form:select path="lable" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<c:forEach items="${lables}" var="lable" >
|
||||
<form:option value="${lable.serviceDictId}"><spring:message code="${lable.itemValue}"></spring:message></form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label><spring:message code="config_time"/>:</label>
|
||||
<input name="search_create_time_start" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value='${cfg.search_create_time_start}' pattern='yyyy-MM-dd HH:mm:ss'/>" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label> </label>
|
||||
<input name="search_create_time_end" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_create_time_end}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label><spring:message code="edit_time"/>:</label>
|
||||
<input name="search_edit_time_start" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_edit_time_start}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label> </label>
|
||||
<input name="search_edit_time_end" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_edit_time_end}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label><spring:message code="audit_time"/>:</label>
|
||||
<input name="search_audit_time_start" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_audit_time_start}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label> </label>
|
||||
<input name="search_audit_time_end" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_audit_time_end}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<!-- /筛选搜索内容栏 结束-->
|
||||
</form:form>
|
||||
</div>
|
||||
<sys:message content="${message}" type="${messageType }"/>
|
||||
<div class="table-responsive">
|
||||
|
||||
<table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><input type="checkbox" class="i-checks" id="checkAll"></th>
|
||||
<th column="cfg_id" class="sort-column a.compile_id" style="display: none;"><spring:message code="cfg_id"/></th>
|
||||
<th column="target_name" class="sort-column a.cfgDesc"><spring:message code="target_name"/></th>
|
||||
<th column="addr_type" ><spring:message code="mirror_addr_type"/></th>
|
||||
<th column="addr_list" ><spring:message code="mirror_addr_list"/></th>
|
||||
<th column="is_audit" class="a.is_valid"><spring:message code="is_audit"/></th>
|
||||
<th column="letter" ><spring:message code="letter"/></th>
|
||||
<th column="classification" ><spring:message code="classification"/></th>
|
||||
<th column="attribute" ><spring:message code="attribute"/></th>
|
||||
<th column="label" ><spring:message code="label"/></th>
|
||||
<th column="valid_identifier" class="sort-column a.is_valid"><spring:message code="valid_identifier"/></th>
|
||||
<th column="creator" ><spring:message code="creator"/></th>
|
||||
<th column="config_time" class="sort-column a.create_time"><spring:message code="config_time"/></th>
|
||||
<th column="editor" ><spring:message code="editor"/></th>
|
||||
<th column="edit_time" class="sort-column a.edit_time"><spring:message code="edit_time"/></th>
|
||||
<th column="auditor" ><spring:message code="auditor"/></th>
|
||||
<th column="audit_time" class="sort-column a.audit_time"><spring:message code="audit_time"/></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:forEach items="${page.list }" var="indexCfg" varStatus="status" step="1">
|
||||
<tr>
|
||||
<td>
|
||||
<input type="checkbox" class="i-checks child-checks" id="${indexCfg.cfgId}" value="${indexCfg.isAudit}">
|
||||
</td>
|
||||
<td>${indexCfg.compileId }</td>
|
||||
<td>${indexCfg.cfgDesc}</a></td>
|
||||
<td>${indexCfg.addrType }</td>
|
||||
<td><a target="_blank" data-original-title="${indexCfg.addrList}"
|
||||
class="tooltips" data-flag="false" data-html="true" data-placement="top">
|
||||
${fn:substring(indexCfg.addrList,0,20) }</a>
|
||||
</td>
|
||||
<td>
|
||||
<c:choose>
|
||||
<c:when test="${indexCfg.isAudit eq '0'}"><span class="label label-danger"><spring:message code="created"></spring:message></span></c:when>
|
||||
<c:when test="${indexCfg.isAudit eq '1'}"><span class="label label-success"><spring:message code="approved"></spring:message></span></c:when>
|
||||
<c:when test="${indexCfg.isAudit eq '2'}"><span class="label label-warning"><spring:message code="unapproved"></spring:message></span></c:when>
|
||||
<c:when test="${indexCfg.isAudit eq '3'}"><span indexTable="${indexCfg.indexTable}" data-placement="right" data-original-title="<spring:message code='letter_cancel_info'/>: " class="label le-ca-fo label-warning tooltips" data-icon=""> <spring:message code="cancel_approved"/></span></c:when>
|
||||
</c:choose>
|
||||
</td>
|
||||
<td>${indexCfg.requestName }</td>
|
||||
<td>
|
||||
<c:set var="classify"></c:set>
|
||||
<c:forEach items="${fn:split(indexCfg.classify,',')}" var="classifyId" varStatus="status">
|
||||
<c:forEach items="${fls}" var="fl">
|
||||
<c:if test="${classifyId eq fn:trim(fl.serviceDictId)}">
|
||||
<c:if test="${status.index+1 eq 1}">
|
||||
<c:set var="classify" value="${fl.itemValue}"></c:set>
|
||||
</c:if>
|
||||
<c:if test="${status.index+1 ne 1}">
|
||||
<c:set var="classify" value="${classify},${fl.itemValue}"></c:set>
|
||||
</c:if>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
<a href="javascript:;" data-original-title="${classify}"
|
||||
class="tooltips" data-flag="false" data-html="true" data-placement="top">
|
||||
${fns:abbr(classify,20)}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<c:set var="attribute"></c:set>
|
||||
<c:forEach items="${fn:split(indexCfg.attribute,',')}" var="attributeId" varStatus="status">
|
||||
<c:forEach items="${xzs}" var="xz">
|
||||
<c:if test="${attributeId eq fn:trim(xz.serviceDictId)}">
|
||||
<c:if test="${status.index+1 eq 1}">
|
||||
<c:set var="attribute" value="${xz.itemValue}"></c:set>
|
||||
</c:if>
|
||||
<c:if test="${status.index+1 ne 1}">
|
||||
<c:set var="attribute" value="${attribute},${xz.itemValue}"></c:set>
|
||||
</c:if>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
<a href="javascript:;" data-original-title="${attribute}"
|
||||
class="tooltips" data-flag="false" data-html="true" data-placement="top">
|
||||
${fns:abbr(attribute,20)}
|
||||
</a>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<c:set var="lableInfo"></c:set>
|
||||
<c:forEach items="${fn:split(indexCfg.lable,',')}" var="lableId" varStatus="status">
|
||||
<c:forEach items="${lables}" var="lable">
|
||||
<c:if test="${lableId eq fn:trim(lable.serviceDictId)}">
|
||||
<c:if test="${status.index+1 eq 1}">
|
||||
<c:set var="lableInfo" value="${lable.itemValue}"></c:set>
|
||||
</c:if>
|
||||
<c:if test="${status.index+1 ne 1}">
|
||||
<c:set var="lableInfo" value="${lableInfo},${lable.itemValue}"></c:set>
|
||||
</c:if>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
<a href="javascript:;" data-original-title="${lableInfo}"
|
||||
class="tooltips" data-flag="false" data-html="true" data-placement="top">
|
||||
${fns:abbr(lableInfo,20)}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<c:if test="${indexCfg.isValid==0}"><spring:message code="no"/></c:if>
|
||||
<c:if test="${indexCfg.isValid==1}"><spring:message code="yes"/></c:if>
|
||||
<c:if test="${indexCfg.isValid==-1}"><spring:message code="deleted"/></c:if>
|
||||
</td>
|
||||
<td>${indexCfg.creatorName }</td>
|
||||
<td><fmt:formatDate value="${indexCfg.createTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<td>${indexCfg.editorName }</td>
|
||||
<td><fmt:formatDate value="${indexCfg.editTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<td>${indexCfg.auditorName }</td>
|
||||
<td><fmt:formatDate value="${indexCfg.auditTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="page">${page}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,102 +1,103 @@
|
||||
/*
|
||||
* Translated default messages for the jQuery validation plugin.
|
||||
* Locale: EN (England, 英文 (YingWen), 鸟语)
|
||||
*/
|
||||
(function ($) {
|
||||
$.extend($.validator.messages, {
|
||||
required: "This field is required.",
|
||||
remote: "Please fix this field.",
|
||||
email: "Please enter a valid email address.",
|
||||
url: "Please enter a valid URL.",
|
||||
date: "Please enter a valid date.",
|
||||
dateISO: "Please enter a valid date (ISO).",
|
||||
number: "Please enter a valid number.",
|
||||
digits: "Please enter only digits.",
|
||||
creditcard: "Please enter a valid credit card number.",
|
||||
equalTo: "Please enter the same value again.",
|
||||
accept: "Please enter the string with a valid suffix",
|
||||
maxlength: $.validator.format("Please enter no more than {0} characters."),
|
||||
minlength: $.validator.format("Please enter at least {0} characters."),
|
||||
rangelength: $.validator.format("Please enter a value between {0} and {1} characters long."),
|
||||
range: $.validator.format("Please enter a value between {0} and {1}."),
|
||||
max: $.validator.format("Please enter a value less than or equal to {0}."),
|
||||
min: $.validator.format("Please enter a value greater than or equal to {0}."),
|
||||
noBlankSpace:"can not be space",
|
||||
ip:"Please enter a correct IP address",
|
||||
ipCheck:"Please enter a correct IP address",
|
||||
ipMask:"Please enter a correct IP/mask",
|
||||
ipPart:"Invalid IP part",
|
||||
//ipv6MaskPart:"Mask must be exponent of 2,not greater than 128",
|
||||
ipv6MaskPart:"Mask must between 2 and 128",
|
||||
//ipMaskRange:"IP mask must between 0 and 32",
|
||||
ipMaskRange:"IP mask must between 16 and 32",
|
||||
srcIpNotEqDestIp:"Client IP ",
|
||||
destIpNotEqDestIp:" and Server IP ",
|
||||
IpNotEqDestIp:" can't be the same",
|
||||
srcIpIsNotValue:"Client IP can't be ",
|
||||
destIpIsNotValue:"Server IP can't be ",
|
||||
ipRange:"Wrong IP format",
|
||||
ipRange1:"start IP should smaller than end IP",
|
||||
portCheck:"Please enter a correct port",
|
||||
notStartZero:"Please enter a valid Integer",
|
||||
portRange:"Port must between 0 and 65535",
|
||||
portMaskRange:"Port and mask must between 0 and 65535.The correct pattern is \"port/mask\".",
|
||||
chooseAreaOrIsp:"The region and the oprater must choose one",
|
||||
areaControl:"Action drop and loop do not need area control",
|
||||
ip_type: "IP type",
|
||||
ip_pattern: "IP Pattern",
|
||||
area: "Area",
|
||||
isp: "ISP",
|
||||
close_info: "Close",
|
||||
client_ip: "Client IP",
|
||||
ipv4: "IPv4",
|
||||
ipv6: "IPv6",
|
||||
over6: "4over6",
|
||||
over4: "6over4",
|
||||
ipv4v6:"Please enter a correct IPv4(0.0.0.0) or IPv6(::)",
|
||||
all: "All",
|
||||
ip_subnet: "IP/Subnet mask",
|
||||
ip_range: "IP Range",
|
||||
timeout:"Timeout",
|
||||
areaIpPrefix:"Forbiden value: ",
|
||||
domainCheck:"Please enter a valid domain.",
|
||||
checkParent:"Configuration Type must match it's parent.",
|
||||
specServiceCodeCheck:"Protocol No is repeat.",
|
||||
compareDate:"The end time should not be earlier than the start time.",
|
||||
hexCheck:"Please enter the HEX format character",
|
||||
invisibleChar:"Please enter the visible character",
|
||||
hasInvisibleChar:"The tag {0} has invisible character",
|
||||
haveInvisibleChar:"The tags {0} have invisible character",
|
||||
httpCheck:"Please enter a correct url(http[s]://xxx.xx)",
|
||||
crlCheck:"Please enter a correct crl(http://xxx.xx.crl)",
|
||||
failed:"Failed",
|
||||
go_back:"Return",
|
||||
log_5_minutes:"Log For The Last Five Minutes",
|
||||
log_1_hour:"Log For The Last Hour",
|
||||
input:"Please Enter ",
|
||||
protocolPort:"TCP protocol or UDP protocol must be chosen when port is greater than 0",
|
||||
protocolPort1:"Only when TCP protocol or UDP protocol is chosen can port greater than 0",
|
||||
netAddress:"The class C type of IP addresses must has the same network number bit field",
|
||||
addrPoolUnique:"Address Pool already exists.",
|
||||
asnNoUnique:"ASN already exists.",
|
||||
asnMustExists:"ASN Must exists in ASN Group.",
|
||||
orgMustExists:"ASN organization Must exists in ASN Group and have an approved ASN IP",
|
||||
areaUnique:"Area already exists.",
|
||||
config_sync_tip:"The system is being maintained and temporarily inaccessible.",
|
||||
ipMaskSole:"IP already exists.",
|
||||
noStrategyCheck:"No effective spoofing IP configuration",
|
||||
keywordLength:"Please enter a value between 4 and 1024 characters long.",
|
||||
arbitrary:"Arbitrarily",
|
||||
log_trend:"Log Trend",
|
||||
info:"Prompt",
|
||||
protect_warn:"Policy with relax precondition may consume too much resources.Use with cautions!",
|
||||
log_no_data:"This hour no data",
|
||||
expireTip:"Start time and end time interval is at least 1 minute",
|
||||
compareTip:"Start time should be at least two minutes earlier than current time.",
|
||||
compileIdCheck:"Please enter the correct query format",
|
||||
compileIdCheckNum:"The number of queries should not be greater than 200",
|
||||
rangeCross0:"The IP {0} must not between {1} and {2}",
|
||||
rangeCross1:"The IP range {0} has intersections with {1}",
|
||||
protectedCfgUnique:"Keyword already exists."
|
||||
});
|
||||
}(jQuery));
|
||||
/*
|
||||
* Translated default messages for the jQuery validation plugin.
|
||||
* Locale: EN (England, 英文 (YingWen), 鸟语)
|
||||
*/
|
||||
(function ($) {
|
||||
$.extend($.validator.messages, {
|
||||
required: "This field is required.",
|
||||
remote: "Please fix this field.",
|
||||
email: "Please enter a valid email address.",
|
||||
url: "Please enter a valid URL.",
|
||||
date: "Please enter a valid date.",
|
||||
dateISO: "Please enter a valid date (ISO).",
|
||||
number: "Please enter a valid number.",
|
||||
digits: "Please enter only digits.",
|
||||
creditcard: "Please enter a valid credit card number.",
|
||||
equalTo: "Please enter the same value again.",
|
||||
accept: "Please enter the string with a valid suffix",
|
||||
maxlength: $.validator.format("Please enter no more than {0} characters."),
|
||||
minlength: $.validator.format("Please enter at least {0} characters."),
|
||||
rangelength: $.validator.format("Please enter a value between {0} and {1} characters long."),
|
||||
range: $.validator.format("Please enter a value between {0} and {1}."),
|
||||
max: $.validator.format("Please enter a value less than or equal to {0}."),
|
||||
min: $.validator.format("Please enter a value greater than or equal to {0}."),
|
||||
noBlankSpace:"can not be space",
|
||||
ip:"Please enter a correct IP address",
|
||||
ipCheck:"Please enter a correct IP address",
|
||||
ipMask:"Please enter a correct IP/mask",
|
||||
ipPart:"Invalid IP part",
|
||||
//ipv6MaskPart:"Mask must be exponent of 2,not greater than 128",
|
||||
ipv6MaskPart:"Mask must between 2 and 128",
|
||||
//ipMaskRange:"IP mask must between 0 and 32",
|
||||
ipMaskRange:"IP mask must between 16 and 32",
|
||||
srcIpNotEqDestIp:"Client IP ",
|
||||
destIpNotEqDestIp:" and Server IP ",
|
||||
IpNotEqDestIp:" can't be the same",
|
||||
srcIpIsNotValue:"Client IP can't be ",
|
||||
destIpIsNotValue:"Server IP can't be ",
|
||||
ipRange:"Wrong IP format",
|
||||
ipRange1:"start IP should smaller than end IP",
|
||||
portCheck:"Please enter a correct port",
|
||||
notStartZero:"Please enter a valid Integer",
|
||||
portRange:"Port must between 0 and 65535",
|
||||
portMaskRange:"Port and mask must between 0 and 65535.The correct pattern is \"port/mask\".",
|
||||
chooseAreaOrIsp:"The region and the oprater must choose one",
|
||||
areaControl:"Action drop and loop do not need area control",
|
||||
ip_type: "IP type",
|
||||
ip_pattern: "IP Pattern",
|
||||
area: "Area",
|
||||
isp: "ISP",
|
||||
close_info: "Close",
|
||||
client_ip: "Client IP",
|
||||
ipv4: "IPv4",
|
||||
ipv6: "IPv6",
|
||||
over6: "4over6",
|
||||
over4: "6over4",
|
||||
ipv4v6:"Please enter a correct IPv4(0.0.0.0) or IPv6(::)",
|
||||
all: "All",
|
||||
ip_subnet: "IP/Subnet mask",
|
||||
ip_range: "IP Range",
|
||||
timeout:"Timeout",
|
||||
areaIpPrefix:"Forbiden value: ",
|
||||
domainCheck:"Please enter a valid domain.",
|
||||
checkParent:"Configuration Type must match it's parent.",
|
||||
specServiceCodeCheck:"Protocol No is repeat.",
|
||||
compareDate:"The end time should not be earlier than the start time.",
|
||||
hexCheck:"Please enter the HEX format character",
|
||||
invisibleChar:"Please enter the visible character",
|
||||
hasInvisibleChar:"The tag {0} has invisible character",
|
||||
haveInvisibleChar:"The tags {0} have invisible character",
|
||||
httpCheck:"Please enter a correct url(http[s]://xxx.xx)",
|
||||
crlCheck:"Please enter a correct crl(http://xxx.xx.crl)",
|
||||
failed:"Failed",
|
||||
go_back:"Return",
|
||||
log_5_minutes:"Log For The Last Five Minutes",
|
||||
log_1_hour:"Log For The Last Hour",
|
||||
input:"Please Enter ",
|
||||
protocolPort:"TCP protocol or UDP protocol must be chosen when port is greater than 0",
|
||||
protocolPort1:"Only when TCP protocol or UDP protocol is chosen can port greater than 0",
|
||||
netAddress:"The class C type of IP addresses must has the same network number bit field",
|
||||
addrPoolUnique:"Address Pool already exists.",
|
||||
asnNoUnique:"ASN already exists.",
|
||||
asnMustExists:"ASN Must exists in ASN Group.",
|
||||
orgMustExists:"ASN organization Must exists in ASN Group and have an approved ASN IP",
|
||||
areaUnique:"Area already exists.",
|
||||
config_sync_tip:"The system is being maintained and temporarily inaccessible.",
|
||||
ipMaskSole:"IP already exists.",
|
||||
noStrategyCheck:"No effective spoofing IP configuration",
|
||||
keywordLength:"Please enter a value between 4 and 1024 characters long.",
|
||||
arbitrary:"Arbitrarily",
|
||||
log_trend:"Log Trend",
|
||||
info:"Prompt",
|
||||
protect_warn:"Policy with relax precondition may consume too much resources.Use with cautions!",
|
||||
log_no_data:"This hour no data",
|
||||
expireTip:"Start time and end time interval is at least 1 minute",
|
||||
compareTip:"Start time should be at least two minutes earlier than current time.",
|
||||
compileIdCheck:"Please enter the correct query format",
|
||||
compileIdCheckNum:"The number of queries should not be greater than 200",
|
||||
rangeCross0:"The IP {0} must not between {1} and {2}",
|
||||
rangeCross1:"The IP range {0} has intersections with {1}",
|
||||
protectedCfgUnique:"Keyword already exists.",
|
||||
addrList:"Please enter the legitimate targets identification list"
|
||||
});
|
||||
}(jQuery));
|
||||
|
||||
@@ -1,102 +1,103 @@
|
||||
/*
|
||||
* Translated default messages for the jQuery validation plugin.
|
||||
* Locale: RU (Russian; Русский Язык)
|
||||
*/
|
||||
(function ($) {
|
||||
$.extend($.validator.messages, {
|
||||
required: "Это поле является обязательным.",
|
||||
remote: "Пожалуйста, исправьте это поле.",
|
||||
email: "Введите действующий адрес эл. почты.",
|
||||
url: "Введите действительный URL.",
|
||||
date: "Введите действительную дату.",
|
||||
dateISO: "Введите действительную дату (ISO).",
|
||||
number: "Введите действительный номер",
|
||||
digits: "Введите только целое число.",
|
||||
creditcard: "Введите действительный номер кредитной карты.",
|
||||
equalTo: "Введите такое же значение ещё раз.",
|
||||
accept: "Введите строку с действительным суффиксом",
|
||||
maxlength: $.validator.format("Введите не больше {0} символов длинной."),
|
||||
minlength: $.validator.format("Введите не менее {0} символов длинной."),
|
||||
rangelength: $.validator.format("Введите между {0} и {1} символов длинной."),
|
||||
range: $.validator.format("Введите значение от {0} до {1}."),
|
||||
max: $.validator.format("Введите значение, меньшее или равно {0}."),
|
||||
min: $.validator.format("Введите значение больше или равно {0}."),
|
||||
noBlankSpace:"Не может быть пробелом",
|
||||
ip:"Введите правильный IP-адрес",
|
||||
ipCheck:"Введите правильный IP-адрес",
|
||||
ipMask:"Введите правильный IP/маску",
|
||||
ipPart:"Недопустимая часть IP",
|
||||
//ipv6MaskPart:"Mаска-показатель степени 2, небольше 128",
|
||||
ipv6MaskPart:"Маска должна быть между 2 и 128",
|
||||
//ipMaskRange:"Маска IP между 0 и 32",
|
||||
ipMaskRange:"Маска IP должна между 16 и 32",
|
||||
srcIpNotEqDestIp:"IP-адрес клиента",
|
||||
destIpNotEqDestIp:"и IP-адрес сервера",
|
||||
IpNotEqDestIp:"Не может быть одинаковым",
|
||||
srcIpIsNotValue:"IP-адрес клиента не может быть",
|
||||
destIpIsNotValue:"IP-адрес сервера не может быть",
|
||||
ipRange:"Неверный IP-формат",
|
||||
ipRange1:"Начальный IP должен быть меньше конечного IP",
|
||||
portCheck: "Введите правильный порт.",
|
||||
notStartZero:"Введите действительное целое число",
|
||||
portRange:"Порт должен между 0 и 65535",
|
||||
portMaskRange:"Порт и маска должны быть между 0 и 65535. Правильный шаблон -«порт/маска».",
|
||||
chooseAreaOrIsp:"Регион или оператор должны выбрать один",
|
||||
areaControl:"Падению и циклу не нужно управление зоны",
|
||||
ip_type: "IP Тип",
|
||||
ip_pattern: "IP Формат",
|
||||
area: "Район",
|
||||
isp: "ISP",
|
||||
close_info: "Выключить",
|
||||
client_ip: "Клиент IP",
|
||||
ipv4: "IPv4",
|
||||
ipv6: "IPv6",
|
||||
over6: "4over6",
|
||||
over4: "6over4",
|
||||
ipv4v6:"Введите правильный IPv4 (0.0.0.0) или IPv6 (::)",
|
||||
all: "Все",
|
||||
ip_subnet: "IP/Маска Подсети",
|
||||
ip_range: "IP Диапазон",
|
||||
timeout:"Тайм-аут",
|
||||
areaIpPrefix:"Запрещенное значение:",
|
||||
domainCheck:"Введите действительный домен.",
|
||||
checkParent:"Тип конфигурации должен совпадать с родительским типом.",
|
||||
specServiceCodeCheck:"Номер протокола повторяется.",
|
||||
compareDate:"Время окончания не должно быть раньше времени начала.",
|
||||
hexCheck:"Введите символ шестнадцатеричного формата",
|
||||
invisibleChar:"Введите видимый символ",
|
||||
hasInvisibleChar:"Тег {0} включает невидимый символ",
|
||||
haveInvisibleChar:"Теги {0} включают невидимый символ",
|
||||
httpCheck:"Введите правильный URL(http[s]://xxx.xx)",
|
||||
crlCheck:"Введите правильный CRL(http://xxx.xx.crl)",
|
||||
failed:"Неудачно",
|
||||
go_back:"Назад",
|
||||
log_5_minutes:"Журнал за последние пять минут",
|
||||
log_1_hour:"Журнал За последний час",
|
||||
input:"Введите, пожалуйста ",
|
||||
protocolPort:"Если порт больше 0, необходимо выбрать протокол TCP или протокол UDP",
|
||||
protocolPort1:"Только при выборе протокола TCP или протокола UDP порт может быть больше 0",
|
||||
netAddress:"Тип IP-адресов класса C должен иметь один и тот же номер сети бит поля.",
|
||||
addrPoolUnique:"Address Pool уже существует.",
|
||||
asnNoUnique:"ASN уже существует.",
|
||||
asnMustExists:"Номер ASN должен существовать в ASN группе.",
|
||||
orgMustExists:"Организация ASN должна существовать в ASN группе и включаться в себя утвержденный ASN IP-адрес.",
|
||||
areaUnique:"Регион уже существует.",
|
||||
config_sync_tip:"Система находится под техническим обслуживанием и временно недоступна.",
|
||||
ipMaskSole:"IP уже существует.",
|
||||
noStrategyCheck:"Нет актированной конфигурации IP-спуфинг.",
|
||||
keywordLength:"Введите между 4 и 1024 символов длинной.",
|
||||
arbitrary:"Любой",
|
||||
log_trend:"Журнал Тенденция",
|
||||
info:"Инфо",
|
||||
protect_warn:"Политика с широким предварительным условием может потреблять слишком много ресурсов.Использовать осторожно!",
|
||||
log_no_data:"Нет данных за этот час",
|
||||
expireTip:"Интервал времени начала и окончания не менее 1 минуты",
|
||||
compareTip:"Время начала не должно быть меньше текущего времени плюс 2 минуты.",
|
||||
compileIdCheck:"Пожалуйста, введите правильный формат запроса",
|
||||
compileIdCheckNum:"Количество запросов не должно превышать 200",
|
||||
rangeCross0:"IP {0} не должен находиться между {1} и {2}",
|
||||
rangeCross1:"Диапазон IP {0} имеет пересечения с {1}",
|
||||
protectedCfgUnique:"Ключевое слово уже существует."
|
||||
});
|
||||
}(jQuery));
|
||||
/*
|
||||
* Translated default messages for the jQuery validation plugin.
|
||||
* Locale: RU (Russian; Русский Язык)
|
||||
*/
|
||||
(function ($) {
|
||||
$.extend($.validator.messages, {
|
||||
required: "Это поле является обязательным.",
|
||||
remote: "Пожалуйста, исправьте это поле.",
|
||||
email: "Введите действующий адрес эл. почты.",
|
||||
url: "Введите действительный URL.",
|
||||
date: "Введите действительную дату.",
|
||||
dateISO: "Введите действительную дату (ISO).",
|
||||
number: "Введите действительный номер",
|
||||
digits: "Введите только целое число.",
|
||||
creditcard: "Введите действительный номер кредитной карты.",
|
||||
equalTo: "Введите такое же значение ещё раз.",
|
||||
accept: "Введите строку с действительным суффиксом",
|
||||
maxlength: $.validator.format("Введите не больше {0} символов длинной."),
|
||||
minlength: $.validator.format("Введите не менее {0} символов длинной."),
|
||||
rangelength: $.validator.format("Введите между {0} и {1} символов длинной."),
|
||||
range: $.validator.format("Введите значение от {0} до {1}."),
|
||||
max: $.validator.format("Введите значение, меньшее или равно {0}."),
|
||||
min: $.validator.format("Введите значение больше или равно {0}."),
|
||||
noBlankSpace:"Не может быть пробелом",
|
||||
ip:"Введите правильный IP-адрес",
|
||||
ipCheck:"Введите правильный IP-адрес",
|
||||
ipMask:"Введите правильный IP/маску",
|
||||
ipPart:"Недопустимая часть IP",
|
||||
//ipv6MaskPart:"Mаска-показатель степени 2, небольше 128",
|
||||
ipv6MaskPart:"Маска должна быть между 2 и 128",
|
||||
//ipMaskRange:"Маска IP между 0 и 32",
|
||||
ipMaskRange:"Маска IP должна между 16 и 32",
|
||||
srcIpNotEqDestIp:"IP-адрес клиента",
|
||||
destIpNotEqDestIp:"и IP-адрес сервера",
|
||||
IpNotEqDestIp:"Не может быть одинаковым",
|
||||
srcIpIsNotValue:"IP-адрес клиента не может быть",
|
||||
destIpIsNotValue:"IP-адрес сервера не может быть",
|
||||
ipRange:"Неверный IP-формат",
|
||||
ipRange1:"Начальный IP должен быть меньше конечного IP",
|
||||
portCheck: "Введите правильный порт.",
|
||||
notStartZero:"Введите действительное целое число",
|
||||
portRange:"Порт должен между 0 и 65535",
|
||||
portMaskRange:"Порт и маска должны быть между 0 и 65535. Правильный шаблон -«порт/маска».",
|
||||
chooseAreaOrIsp:"Регион или оператор должны выбрать один",
|
||||
areaControl:"Падению и циклу не нужно управление зоны",
|
||||
ip_type: "IP Тип",
|
||||
ip_pattern: "IP Формат",
|
||||
area: "Район",
|
||||
isp: "ISP",
|
||||
close_info: "Выключить",
|
||||
client_ip: "Клиент IP",
|
||||
ipv4: "IPv4",
|
||||
ipv6: "IPv6",
|
||||
over6: "4over6",
|
||||
over4: "6over4",
|
||||
ipv4v6:"Введите правильный IPv4 (0.0.0.0) или IPv6 (::)",
|
||||
all: "Все",
|
||||
ip_subnet: "IP/Маска Подсети",
|
||||
ip_range: "IP Диапазон",
|
||||
timeout:"Тайм-аут",
|
||||
areaIpPrefix:"Запрещенное значение:",
|
||||
domainCheck:"Введите действительный домен.",
|
||||
checkParent:"Тип конфигурации должен совпадать с родительским типом.",
|
||||
specServiceCodeCheck:"Номер протокола повторяется.",
|
||||
compareDate:"Время окончания не должно быть раньше времени начала.",
|
||||
hexCheck:"Введите символ шестнадцатеричного формата",
|
||||
invisibleChar:"Введите видимый символ",
|
||||
hasInvisibleChar:"Тег {0} включает невидимый символ",
|
||||
haveInvisibleChar:"Теги {0} включают невидимый символ",
|
||||
httpCheck:"Введите правильный URL(http[s]://xxx.xx)",
|
||||
crlCheck:"Введите правильный CRL(http://xxx.xx.crl)",
|
||||
failed:"Неудачно",
|
||||
go_back:"Назад",
|
||||
log_5_minutes:"Журнал за последние пять минут",
|
||||
log_1_hour:"Журнал За последний час",
|
||||
input:"Введите, пожалуйста ",
|
||||
protocolPort:"Если порт больше 0, необходимо выбрать протокол TCP или протокол UDP",
|
||||
protocolPort1:"Только при выборе протокола TCP или протокола UDP порт может быть больше 0",
|
||||
netAddress:"Тип IP-адресов класса C должен иметь один и тот же номер сети бит поля.",
|
||||
addrPoolUnique:"Address Pool уже существует.",
|
||||
asnNoUnique:"ASN уже существует.",
|
||||
asnMustExists:"Номер ASN должен существовать в ASN группе.",
|
||||
orgMustExists:"Организация ASN должна существовать в ASN группе и включаться в себя утвержденный ASN IP-адрес.",
|
||||
areaUnique:"Регион уже существует.",
|
||||
config_sync_tip:"Система находится под техническим обслуживанием и временно недоступна.",
|
||||
ipMaskSole:"IP уже существует.",
|
||||
noStrategyCheck:"Нет актированной конфигурации IP-спуфинг.",
|
||||
keywordLength:"Введите между 4 и 1024 символов длинной.",
|
||||
arbitrary:"Любой",
|
||||
log_trend:"Журнал Тенденция",
|
||||
info:"Инфо",
|
||||
protect_warn:"Политика с широким предварительным условием может потреблять слишком много ресурсов.Использовать осторожно!",
|
||||
log_no_data:"Нет данных за этот час",
|
||||
expireTip:"Интервал времени начала и окончания не менее 1 минуты",
|
||||
compareTip:"Время начала не должно быть меньше текущего времени плюс 2 минуты.",
|
||||
compileIdCheck:"Пожалуйста, введите правильный формат запроса",
|
||||
compileIdCheckNum:"Количество запросов не должно превышать 200",
|
||||
rangeCross0:"IP {0} не должен находиться между {1} и {2}",
|
||||
rangeCross1:"Диапазон IP {0} имеет пересечения с {1}",
|
||||
protectedCfgUnique:"Ключевое слово уже существует.",
|
||||
addrList:"Please enter the legitimate targets identification list"
|
||||
});
|
||||
}(jQuery));
|
||||
|
||||
@@ -1,102 +1,103 @@
|
||||
/*
|
||||
* Translated default messages for the jQuery validation plugin.
|
||||
* Locale: ZH (Chinese, 中文 (Zhōngwén), 汉语, 漢語)
|
||||
*/
|
||||
(function ($) {
|
||||
$.extend($.validator.messages, {
|
||||
required: "必填信息",
|
||||
remote: "请修正该信息",
|
||||
email: "请输入正确格式的电子邮件",
|
||||
url: "请输入有效的网址",
|
||||
date: "请输入有效的日期",
|
||||
dateISO: "请输入有效的日期 (ISO).",
|
||||
number: "请输入有效的数字",
|
||||
digits: "只能输入整数",
|
||||
creditcard: "请输入有效的信用卡号",
|
||||
equalTo: "请再次输入相同的值",
|
||||
accept: "请输入拥有合法后缀名的字符串",
|
||||
maxlength: $.validator.format("请输入一个长度最多是 {0} 的字符串"),
|
||||
minlength: $.validator.format("请输入一个长度最少是 {0} 的字符串"),
|
||||
rangelength: $.validator.format("请输入一个长度介于 {0} 和 {1} 之间的字符串"),
|
||||
range: $.validator.format("请输入一个介于 {0} 和 {1} 之间的值"),
|
||||
max: $.validator.format("请输入一个最大为 {0} 的值"),
|
||||
min: $.validator.format("请输入一个最小为 {0} 的值"),
|
||||
noBlankSpace:"不能为空格",
|
||||
ip:"请填写正确的IP地址",
|
||||
ipCheck:"请填写正确的IP地址",
|
||||
ipMask:"请填写正确的IP地址/掩码",
|
||||
ipPart:"IP部分格式错误",
|
||||
//ipv6MaskPart:"掩码为不大于128的2的指数幂",
|
||||
ipv6MaskPart:"掩码介于2到128",
|
||||
//ipMaskRange:"IP掩码介于0到32",
|
||||
ipMaskRange:"IP掩码介于16到32",
|
||||
srcIpNotEqDestIp:"源IP ",
|
||||
destIpNotEqDestIp:" 与目的IP ",
|
||||
IpNotEqDestIp:" 不能相同",
|
||||
srcIpIsNotValue:"源IP不能为 ",
|
||||
destIpIsNotValue:"目的IP不能为",
|
||||
ipRange:"IP范围格式错误",
|
||||
ipRange1:"起始IP值应小于结束IP值",
|
||||
portCheck:"请填写正确的端口",
|
||||
notStartZero:"请填写正确的数值",
|
||||
portRange:"端口应小于65536,非0数字不能以0开头",
|
||||
portMaskRange:"端口以及掩码范围0-65535,非0数字不能以0开头。格式为\"端口/掩码\"",
|
||||
chooseAreaOrIsp:"区域和运营商必选一个",
|
||||
areaControl:"丢弃和回流动作不能区域管控",
|
||||
ip_type: "ip类型",
|
||||
ip_pattern: "ip格式",
|
||||
area: "区域",
|
||||
isp: "运营商",
|
||||
close_info: "关闭",
|
||||
client_ip: "源IP",
|
||||
ipv4: "IPv4",
|
||||
ipv6: "IPv6",
|
||||
over6: "4over6",
|
||||
over4: "6over4",
|
||||
ipv4v6:"请输入合法的IP地址如IPv4(0.0.0.0)或IPv6(::)",
|
||||
all: "全部",
|
||||
ip_subnet: "IP/子网掩码",
|
||||
ip_range: "IP范围",
|
||||
timeout:"超时",
|
||||
areaIpPrefix:"禁止使用的值: ",
|
||||
domainCheck:"请输入有效的域名",
|
||||
checkParent:"配置类型必须与上级配置一致!",
|
||||
specServiceCodeCheck:"协议号重复",
|
||||
compareDate:"结束时间不能早于开始时间",
|
||||
hexCheck:"请输入十六进制字符",
|
||||
invisibleChar:"请输入可见字符",
|
||||
hasInvisibleChar:"标签{0}包含不可见字符",
|
||||
haveInvisibleChar:"标签{0}包含不可见字符",
|
||||
httpCheck:"请输入正确的URL(http[s]://xxx.xx)",
|
||||
crlCheck:"请输入正确的CRL(http://xxx.xx.crl)",
|
||||
failed:"获取失败",
|
||||
go_back:"返回",
|
||||
log_5_minutes:"5分钟日志量",
|
||||
log_1_hour:"1小时日志量",
|
||||
input:"请输入 ",
|
||||
protocolPort:"端口大于0时必须选择TCP协议或者UDP协议",
|
||||
protocolPort1:"只有tcp,udp协议端口号可以不为0",
|
||||
netAddress:"C类IP地址网络位必须相同",
|
||||
addrPoolUnique:"地址池已存在",
|
||||
asnNoUnique:"ASN号已存在",
|
||||
asnMustExists:"ASN号必须存在于ASN组中",
|
||||
orgMustExists:"ASN组织 必须存在于ASN组中并且包含已审核ASN IP",
|
||||
areaUnique:"该区域已存在",
|
||||
config_sync_tip:"系统正在维护中,暂时不可访问!",
|
||||
ipMaskSole:"IP已存在",
|
||||
noStrategyCheck:"策略组下无有效的欺骗IP配置",
|
||||
keywordLength:"请输入一个长度介于4 和1024 之间的字符串",
|
||||
arbitrary:"任意",
|
||||
log_trend:"日志趋势",
|
||||
info:"提示",
|
||||
protect_warn:"该策略执行条件过于宽泛,会消耗较多的计算资源。慎用!",
|
||||
log_no_data:"本小时无数据",
|
||||
expireTip:"开始时间结束时间间隔至少为1分钟",
|
||||
compareTip:"开始时间不能小于当前时间加上2分钟 ",
|
||||
compileIdCheck:"请输入正确的查询格式",
|
||||
compileIdCheckNum:"查询个数不能大于200",
|
||||
rangeCross0:"IP{0}不能介于{1}和{2}",
|
||||
rangeCross1:"IP范围{0}和IP范围{1}有交集",
|
||||
protectedCfgUnique:"关键字已存在"
|
||||
});
|
||||
}(jQuery));
|
||||
/*
|
||||
* Translated default messages for the jQuery validation plugin.
|
||||
* Locale: ZH (Chinese, 中文 (Zhōngwén), 汉语, 漢語)
|
||||
*/
|
||||
(function ($) {
|
||||
$.extend($.validator.messages, {
|
||||
required: "必填信息",
|
||||
remote: "请修正该信息",
|
||||
email: "请输入正确格式的电子邮件",
|
||||
url: "请输入有效的网址",
|
||||
date: "请输入有效的日期",
|
||||
dateISO: "请输入有效的日期 (ISO).",
|
||||
number: "请输入有效的数字",
|
||||
digits: "只能输入整数",
|
||||
creditcard: "请输入有效的信用卡号",
|
||||
equalTo: "请再次输入相同的值",
|
||||
accept: "请输入拥有合法后缀名的字符串",
|
||||
maxlength: $.validator.format("请输入一个长度最多是 {0} 的字符串"),
|
||||
minlength: $.validator.format("请输入一个长度最少是 {0} 的字符串"),
|
||||
rangelength: $.validator.format("请输入一个长度介于 {0} 和 {1} 之间的字符串"),
|
||||
range: $.validator.format("请输入一个介于 {0} 和 {1} 之间的值"),
|
||||
max: $.validator.format("请输入一个最大为 {0} 的值"),
|
||||
min: $.validator.format("请输入一个最小为 {0} 的值"),
|
||||
noBlankSpace:"不能为空格",
|
||||
ip:"请填写正确的IP地址",
|
||||
ipCheck:"请填写正确的IP地址",
|
||||
ipMask:"请填写正确的IP地址/掩码",
|
||||
ipPart:"IP部分格式错误",
|
||||
//ipv6MaskPart:"掩码为不大于128的2的指数幂",
|
||||
ipv6MaskPart:"掩码介于2到128",
|
||||
//ipMaskRange:"IP掩码介于0到32",
|
||||
ipMaskRange:"IP掩码介于16到32",
|
||||
srcIpNotEqDestIp:"源IP ",
|
||||
destIpNotEqDestIp:" 与目的IP ",
|
||||
IpNotEqDestIp:" 不能相同",
|
||||
srcIpIsNotValue:"源IP不能为 ",
|
||||
destIpIsNotValue:"目的IP不能为",
|
||||
ipRange:"IP范围格式错误",
|
||||
ipRange1:"起始IP值应小于结束IP值",
|
||||
portCheck:"请填写正确的端口",
|
||||
notStartZero:"请填写正确的数值",
|
||||
portRange:"端口应小于65536,非0数字不能以0开头",
|
||||
portMaskRange:"端口以及掩码范围0-65535,非0数字不能以0开头。格式为\"端口/掩码\"",
|
||||
chooseAreaOrIsp:"区域和运营商必选一个",
|
||||
areaControl:"丢弃和回流动作不能区域管控",
|
||||
ip_type: "ip类型",
|
||||
ip_pattern: "ip格式",
|
||||
area: "区域",
|
||||
isp: "运营商",
|
||||
close_info: "关闭",
|
||||
client_ip: "源IP",
|
||||
ipv4: "IPv4",
|
||||
ipv6: "IPv6",
|
||||
over6: "4over6",
|
||||
over4: "6over4",
|
||||
ipv4v6:"请输入合法的IP地址如IPv4(0.0.0.0)或IPv6(::)",
|
||||
all: "全部",
|
||||
ip_subnet: "IP/子网掩码",
|
||||
ip_range: "IP范围",
|
||||
timeout:"超时",
|
||||
areaIpPrefix:"禁止使用的值: ",
|
||||
domainCheck:"请输入有效的域名",
|
||||
checkParent:"配置类型必须与上级配置一致!",
|
||||
specServiceCodeCheck:"协议号重复",
|
||||
compareDate:"结束时间不能早于开始时间",
|
||||
hexCheck:"请输入十六进制字符",
|
||||
invisibleChar:"请输入可见字符",
|
||||
hasInvisibleChar:"标签{0}包含不可见字符",
|
||||
haveInvisibleChar:"标签{0}包含不可见字符",
|
||||
httpCheck:"请输入正确的URL(http[s]://xxx.xx)",
|
||||
crlCheck:"请输入正确的CRL(http://xxx.xx.crl)",
|
||||
failed:"获取失败",
|
||||
go_back:"返回",
|
||||
log_5_minutes:"5分钟日志量",
|
||||
log_1_hour:"1小时日志量",
|
||||
input:"请输入 ",
|
||||
protocolPort:"端口大于0时必须选择TCP协议或者UDP协议",
|
||||
protocolPort1:"只有tcp,udp协议端口号可以不为0",
|
||||
netAddress:"C类IP地址网络位必须相同",
|
||||
addrPoolUnique:"地址池已存在",
|
||||
asnNoUnique:"ASN号已存在",
|
||||
asnMustExists:"ASN号必须存在于ASN组中",
|
||||
orgMustExists:"ASN组织 必须存在于ASN组中并且包含已审核ASN IP",
|
||||
areaUnique:"该区域已存在",
|
||||
config_sync_tip:"系统正在维护中,暂时不可访问!",
|
||||
ipMaskSole:"IP已存在",
|
||||
noStrategyCheck:"策略组下无有效的欺骗IP配置",
|
||||
keywordLength:"请输入一个长度介于4 和1024 之间的字符串",
|
||||
arbitrary:"任意",
|
||||
log_trend:"日志趋势",
|
||||
info:"提示",
|
||||
protect_warn:"该策略执行条件过于宽泛,会消耗较多的计算资源。慎用!",
|
||||
log_no_data:"本小时无数据",
|
||||
expireTip:"开始时间结束时间间隔至少为1分钟",
|
||||
compareTip:"开始时间不能小于当前时间加上2分钟 ",
|
||||
compileIdCheck:"请输入正确的查询格式",
|
||||
compileIdCheckNum:"查询个数不能大于200",
|
||||
rangeCross0:"IP{0}不能介于{1}和{2}",
|
||||
rangeCross1:"IP范围{0}和IP范围{1}有交集",
|
||||
protectedCfgUnique:"关键字已存在",
|
||||
addrList:"请输入合法的目标标识列表"
|
||||
});
|
||||
}(jQuery));
|
||||
|
||||
@@ -677,12 +677,19 @@ $(function(){
|
||||
$("#actionSelect").find("option[value='']").remove();
|
||||
}
|
||||
$("#isValid").selectpicker("hide");// 隐藏下拉框
|
||||
$("#addrType").selectpicker("hide");// 隐藏下拉框
|
||||
}else if($("#seltype").val() == "isValid"){
|
||||
$("#intype").hide();// 隐藏输入框
|
||||
$("#actionSelect").selectpicker("hide");// 隐藏下拉框
|
||||
$("#addrType").selectpicker("hide");// 隐藏下拉框
|
||||
}else if($("#seltype").val() == "addrType"){
|
||||
$("#intype").hide();// 隐藏输入框
|
||||
$("#actionSelect").selectpicker("hide");// 隐藏下拉框
|
||||
$("#isValid").selectpicker("hide");// 隐藏下拉框
|
||||
}else{
|
||||
$("#actionSelect").selectpicker("hide");// 隐藏下拉框
|
||||
$("#isValid").selectpicker("hide");// 隐藏下拉框
|
||||
$("#addrType").selectpicker("hide");// 隐藏下拉框
|
||||
}
|
||||
// 改变
|
||||
$("#seltype").on("change",function() {
|
||||
@@ -697,6 +704,8 @@ $(function(){
|
||||
$("#actionSelect").selectpicker("show");// 显示下拉框
|
||||
$("#isValid").find("option:first").attr("selected",true);// 清空action条件
|
||||
$("#isValid").selectpicker("hide");// 隐藏下拉框
|
||||
$("#addrType").find("option:first").attr("selected",true);// 清空action条件
|
||||
$("#addrType").selectpicker("hide");// 隐藏下拉框
|
||||
}else if($(this).val() == "isValid"){
|
||||
$("#intype").hide();// 隐藏输入框
|
||||
$("#intype").val("");// 清空input条件
|
||||
@@ -705,6 +714,18 @@ $(function(){
|
||||
$("#isValid").selectpicker("show");// 显示下拉框
|
||||
$("#actionSelect").find("option:first").attr("selected",true);// 清空action条件
|
||||
$("#actionSelect").selectpicker("hide");// 隐藏下拉框
|
||||
$("#addrType").find("option:first").attr("selected",true);// 清空action条件
|
||||
$("#addrType").selectpicker("hide");// 隐藏下拉框
|
||||
}else if($(this).val() == "addrType"){
|
||||
$("#intype").hide();// 隐藏输入框
|
||||
$("#intype").val("");// 清空input条件
|
||||
$("#addrType").find("option").removeAttr("selected",false);
|
||||
$("#addrType").selectpicker("refresh");
|
||||
$("#addrType").selectpicker("show");// 显示下拉框
|
||||
$("#actionSelect").find("option:first").attr("selected",true);// 清空action条件
|
||||
$("#actionSelect").selectpicker("hide");// 隐藏下拉框
|
||||
$("#isValid").find("option:first").attr("selected",true);// 清空action条件
|
||||
$("#isValid").selectpicker("hide");// 隐藏下拉框
|
||||
}else{
|
||||
$("#intype").show(); // 显示输入框
|
||||
$("#intype").val("");// 清空input条件
|
||||
@@ -712,6 +733,8 @@ $(function(){
|
||||
$("#actionSelect").selectpicker("hide");// 隐藏下拉框
|
||||
$("#isValid").find("option:first").attr("selected",true);// 清空action条件
|
||||
$("#isValid").selectpicker("hide");// 隐藏下拉框
|
||||
$("#addrType").find("option:first").attr("selected",true);// 清空action条件
|
||||
$("#addrType").selectpicker("hide");// 隐藏下拉框
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user