增加导出功能
This commit is contained in:
@@ -31,11 +31,14 @@ public class AppComplexFeatureCfg extends BaseCfg<AppComplexFeatureCfg> {
|
||||
*/
|
||||
private static final String tableName="app_complex_feature_cfg";
|
||||
@Expose
|
||||
@ExcelField(title="cfg_id",sort=0)
|
||||
private Integer compileId;
|
||||
private Integer appCode;//specific_service_cfg表一级节点的spec_service_code
|
||||
private Integer behavCode;//specific_service_cfg表二级节点的spec_service_code
|
||||
private Integer specServiceId;
|
||||
@ExcelField(title="district",sort=1)
|
||||
private String district;
|
||||
@ExcelField(title="key_word",sort=201)
|
||||
private String cfgKeywords;
|
||||
private String appName;
|
||||
private List<AppIpCfg> ipPortList = new ArrayList();
|
||||
@@ -48,20 +51,54 @@ public class AppComplexFeatureCfg extends BaseCfg<AppComplexFeatureCfg> {
|
||||
this.cfgRegionCode1 = cfgRegionCode1;
|
||||
}
|
||||
|
||||
/**
|
||||
* 表达式类型
|
||||
*/
|
||||
@Expose
|
||||
@ExcelField(title="expression_type")
|
||||
@ExcelField(title="expression_type",dictType="EXPRESSION_TYPE",sort=202)
|
||||
@SerializedName("exprType")
|
||||
protected Integer exprType ;
|
||||
|
||||
/**
|
||||
* 匹配方式
|
||||
*/
|
||||
@Expose
|
||||
@ExcelField(title="match_method")
|
||||
@ExcelField(title="match_method",dictType="MATCH_METHOD",sort=203)
|
||||
@SerializedName("matchMethod")
|
||||
protected Integer matchMethod ;
|
||||
|
||||
/**
|
||||
* 是否hex
|
||||
*/
|
||||
@ExcelField(title="is_hex",sort=204)
|
||||
protected Integer isHex;
|
||||
/**
|
||||
* 是否hex
|
||||
*/
|
||||
@ExcelField(title="is_case_insenstive",sort=205)
|
||||
protected Integer isCaseInsenstive;
|
||||
/**
|
||||
* 是否hex二进制
|
||||
*/
|
||||
@Expose
|
||||
@ExcelField(title="whether_hexbinary")
|
||||
@SerializedName("isHexbin")
|
||||
protected Integer isHexbin;
|
||||
|
||||
|
||||
|
||||
public Integer getIsHex() {
|
||||
return isHex;
|
||||
}
|
||||
|
||||
public void setIsHex(Integer isHex) {
|
||||
this.isHex = isHex;
|
||||
}
|
||||
|
||||
public Integer getIsCaseInsenstive() {
|
||||
return isCaseInsenstive;
|
||||
}
|
||||
|
||||
public void setIsCaseInsenstive(Integer isCaseInsenstive) {
|
||||
this.isCaseInsenstive = isCaseInsenstive;
|
||||
}
|
||||
|
||||
public Integer getExprType() {
|
||||
return exprType;
|
||||
|
||||
@@ -26,29 +26,66 @@ public class AppDomainCfg extends BaseCfg<AppDomainCfg> {
|
||||
private static final long serialVersionUID = -4685445179478960429L;
|
||||
private static final String tableName="app_domain_cfg";
|
||||
@Expose
|
||||
@ExcelField(title="cfg_id",sort=0)
|
||||
private Integer compileId;
|
||||
@Expose
|
||||
private String ratelimit;
|
||||
private Integer appCode;//specific_service_cfg表一级节点的spec_service_code
|
||||
private Integer behavCode;//specific_service_cfg表二级节点的spec_service_code
|
||||
private Integer specServiceId;
|
||||
@ExcelField(title="domain",sort=3)
|
||||
private String domain;
|
||||
private String cfgKeywords;
|
||||
@ExcelField(title="social_app",sort=2)
|
||||
private String appName;
|
||||
/**
|
||||
* 表达式类型
|
||||
*/
|
||||
@Expose
|
||||
@ExcelField(title="expression_type")
|
||||
@ExcelField(title="expression_type",dictType="EXPRESSION_TYPE",sort=7)
|
||||
@SerializedName("exprType")
|
||||
protected Integer exprType ;
|
||||
|
||||
/**
|
||||
* 匹配方式
|
||||
*/
|
||||
@Expose
|
||||
@ExcelField(title="match_method")
|
||||
@ExcelField(title="match_method",dictType="MATCH_METHOD",sort=8)
|
||||
@SerializedName("matchMethod")
|
||||
protected Integer matchMethod ;
|
||||
|
||||
@Expose
|
||||
@ExcelField(title="whether_hexbinary")
|
||||
@SerializedName("isHexbin")
|
||||
protected Integer isHexbin;
|
||||
|
||||
|
||||
/**
|
||||
* 是否hex
|
||||
*/
|
||||
@ExcelField(title="is_hex",sort=5)
|
||||
protected Integer isHex;
|
||||
/**
|
||||
* 是否hex
|
||||
*/
|
||||
@ExcelField(title="is_case_insenstive",sort=6)
|
||||
protected Integer isCaseInsenstive;
|
||||
|
||||
|
||||
|
||||
public Integer getIsHex() {
|
||||
return isHex;
|
||||
}
|
||||
|
||||
public void setIsHex(Integer isHex) {
|
||||
this.isHex = isHex;
|
||||
}
|
||||
|
||||
public Integer getIsCaseInsenstive() {
|
||||
return isCaseInsenstive;
|
||||
}
|
||||
|
||||
public void setIsCaseInsenstive(Integer isCaseInsenstive) {
|
||||
this.isCaseInsenstive = isCaseInsenstive;
|
||||
}
|
||||
|
||||
public Integer getExprType() {
|
||||
return exprType;
|
||||
|
||||
@@ -12,6 +12,7 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.nis.domain.basics.AsnIpCfg;
|
||||
import com.nis.util.excel.ExcelField;
|
||||
|
||||
|
||||
/**
|
||||
@@ -28,6 +29,7 @@ public class AppFeatureIndex extends BaseCfg<AppFeatureIndex> {
|
||||
private static final long serialVersionUID = -8069201965300255275L;
|
||||
private static final String tableName="app_feature_index";
|
||||
private Integer appCode;//specific_service_cfg表一级节点的spec_service_code
|
||||
@ExcelField(title="social_app",sort=2)
|
||||
private String appName;
|
||||
private Integer specServiceId;
|
||||
private Integer behavCode;//specific_service_cfg表二级节点的spec_service_code
|
||||
|
||||
@@ -26,30 +26,68 @@ public class AppHttpCfg extends BaseCfg<AppHttpCfg> {
|
||||
private static final long serialVersionUID = 7528723915857911560L;
|
||||
private static final String tableName="app_http_cfg";
|
||||
@Expose
|
||||
@ExcelField(title="cfg_id",sort=0)
|
||||
private Integer compileId;
|
||||
@Expose
|
||||
private String ratelimit;
|
||||
private Integer appCode;//specific_service_cfg表一级节点的spec_service_code
|
||||
private Integer behavCode;//specific_service_cfg表二级节点的spec_service_code
|
||||
private Integer specServiceId;
|
||||
@ExcelField(title="district",sort=3)
|
||||
private String district;
|
||||
@ExcelField(title="key_word",sort=4)
|
||||
private String cfgKeywords;
|
||||
@ExcelField(title="social_app",sort=2)
|
||||
private String appName;
|
||||
|
||||
|
||||
/**
|
||||
* 表达式类型
|
||||
*/
|
||||
@Expose
|
||||
@ExcelField(title="expression_type")
|
||||
@ExcelField(title="expression_type",dictType="EXPRESSION_TYPE",sort=7)
|
||||
@SerializedName("exprType")
|
||||
protected Integer exprType ;
|
||||
|
||||
/**
|
||||
* 匹配方式
|
||||
*/
|
||||
@Expose
|
||||
@ExcelField(title="match_method")
|
||||
@ExcelField(title="match_method",dictType="MATCH_METHOD",sort=8)
|
||||
@SerializedName("matchMethod")
|
||||
protected Integer matchMethod ;
|
||||
|
||||
@Expose
|
||||
@ExcelField(title="whether_hexbinary")
|
||||
@SerializedName("isHexbin")
|
||||
protected Integer isHexbin;
|
||||
|
||||
|
||||
/**
|
||||
* 是否hex
|
||||
*/
|
||||
@ExcelField(title="is_hex",sort=5)
|
||||
protected Integer isHex;
|
||||
/**
|
||||
* 是否hex
|
||||
*/
|
||||
@ExcelField(title="is_case_insenstive",sort=6)
|
||||
protected Integer isCaseInsenstive;
|
||||
|
||||
|
||||
public Integer getIsHex() {
|
||||
return isHex;
|
||||
}
|
||||
|
||||
public void setIsHex(Integer isHex) {
|
||||
this.isHex = isHex;
|
||||
}
|
||||
|
||||
public Integer getIsCaseInsenstive() {
|
||||
return isCaseInsenstive;
|
||||
}
|
||||
|
||||
public void setIsCaseInsenstive(Integer isCaseInsenstive) {
|
||||
this.isCaseInsenstive = isCaseInsenstive;
|
||||
}
|
||||
|
||||
public Integer getExprType() {
|
||||
return exprType;
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.nis.domain.configuration;
|
||||
|
||||
import com.google.gson.annotations.Expose;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.nis.util.excel.ExcelField;
|
||||
|
||||
/**
|
||||
* @Description: APP策略配置
|
||||
@@ -18,21 +19,26 @@ public class AppIpCfg extends BaseCfg<AppIpCfg> {
|
||||
private static final long serialVersionUID = 4758285716968228089L;
|
||||
private static final String tableName="app_ip_cfg";
|
||||
@Expose
|
||||
@ExcelField(title="cfg_id",sort=0)
|
||||
private Integer compileId;
|
||||
@Expose
|
||||
private String ratelimit;
|
||||
private Integer appCode;//specific_service_cfg表一级节点的spec_service_code
|
||||
private Integer behavCode;//specific_service_cfg表二级节点的spec_service_code
|
||||
private Integer specServiceId;
|
||||
@ExcelField(title="social_app",sort=2)
|
||||
private String appName;
|
||||
@Expose
|
||||
@ExcelField(title="ip_type",dictType="IP_TYPE",sort=3)
|
||||
@SerializedName("ipType")
|
||||
protected Integer ipType;
|
||||
protected Integer ipPattern;
|
||||
protected String srcIpAddress;
|
||||
@ExcelField(title="server_ip",sort=4)
|
||||
protected String destIpAddress;
|
||||
protected Integer portPattern;
|
||||
protected String srcPort;
|
||||
@ExcelField(title="server_port",sort=5)
|
||||
protected String destPort;
|
||||
|
||||
/**
|
||||
@@ -45,6 +51,7 @@ public class AppIpCfg extends BaseCfg<AppIpCfg> {
|
||||
* 方向
|
||||
*/
|
||||
@Expose
|
||||
@ExcelField(title="protocol",dictType="PROTOCOL",sort=6)
|
||||
@SerializedName("protocol")
|
||||
protected Integer protocol ;
|
||||
/**
|
||||
|
||||
@@ -25,30 +25,68 @@ public class AppSslCertCfg extends BaseCfg<AppSslCertCfg> {
|
||||
private static final long serialVersionUID = -4366457794248757698L;
|
||||
private static final String tableName="app_ssl_cert_cfg";
|
||||
@Expose
|
||||
@ExcelField(title="cfg_id",sort=0)
|
||||
private Integer compileId;
|
||||
@Expose
|
||||
private String ratelimit;
|
||||
private Integer appCode;//specific_service_cfg表一级节点的spec_service_code
|
||||
private Integer behavCode;//specific_service_cfg表二级节点的spec_service_code
|
||||
private Integer specServiceId;
|
||||
@ExcelField(title="district",sort=3)
|
||||
private String district;
|
||||
@ExcelField(title="key_word",sort=4)
|
||||
private String cfgKeywords;
|
||||
@ExcelField(title="social_app",sort=2)
|
||||
private String appName;
|
||||
|
||||
|
||||
/**
|
||||
* 表达式类型
|
||||
*/
|
||||
@Expose
|
||||
@ExcelField(title="expression_type")
|
||||
@ExcelField(title="expression_type",dictType="EXPRESSION_TYPE",sort=7)
|
||||
@SerializedName("exprType")
|
||||
protected Integer exprType ;
|
||||
|
||||
/**
|
||||
* 匹配方式
|
||||
*/
|
||||
@Expose
|
||||
@ExcelField(title="match_method")
|
||||
@ExcelField(title="match_method",dictType="MATCH_METHOD",sort=8)
|
||||
@SerializedName("matchMethod")
|
||||
protected Integer matchMethod ;
|
||||
|
||||
@Expose
|
||||
@ExcelField(title="whether_hexbinary")
|
||||
@SerializedName("isHexbin")
|
||||
protected Integer isHexbin;
|
||||
|
||||
|
||||
/**
|
||||
* 是否hex
|
||||
*/
|
||||
@ExcelField(title="is_hex",sort=5)
|
||||
protected Integer isHex;
|
||||
/**
|
||||
* 是否hex
|
||||
*/
|
||||
@ExcelField(title="is_case_insenstive",sort=6)
|
||||
protected Integer isCaseInsenstive;
|
||||
|
||||
|
||||
public Integer getIsHex() {
|
||||
return isHex;
|
||||
}
|
||||
|
||||
public void setIsHex(Integer isHex) {
|
||||
this.isHex = isHex;
|
||||
}
|
||||
|
||||
public Integer getIsCaseInsenstive() {
|
||||
return isCaseInsenstive;
|
||||
}
|
||||
|
||||
public void setIsCaseInsenstive(Integer isCaseInsenstive) {
|
||||
this.isCaseInsenstive = isCaseInsenstive;
|
||||
}
|
||||
|
||||
public Integer getExprType() {
|
||||
return exprType;
|
||||
|
||||
@@ -28,30 +28,63 @@ public class AppTopicDomainCfg extends BaseCfg<AppTopicDomainCfg> {
|
||||
@Expose
|
||||
private String ratelimit;
|
||||
// private Integer appCode;//specific_service_cfg表一级节点的spec_service_code
|
||||
@ExcelField(title="website_server",dictType="WEBSITE_SERVER",sort=3)
|
||||
private Long websiteServiceId;//specific_service_cfg表二级节点的spec_service_code
|
||||
private Integer specServiceId;
|
||||
@ExcelField(title="domain",sort=4)
|
||||
private String domain;
|
||||
private String cfgKeywords;
|
||||
private String appName;
|
||||
@ExcelField(title="topic",dictType="TOPIC",sort=2)
|
||||
private Long topicId;
|
||||
|
||||
/**
|
||||
* 表达式类型
|
||||
*/
|
||||
@Expose
|
||||
@ExcelField(title="expression_type")
|
||||
@ExcelField(title="expression_type",dictType="EXPRESSION_TYPE",sort=7)
|
||||
@SerializedName("exprType")
|
||||
protected Integer exprType ;
|
||||
|
||||
/**
|
||||
* 匹配方式
|
||||
*/
|
||||
@Expose
|
||||
@ExcelField(title="match_method")
|
||||
@ExcelField(title="match_method",dictType="MATCH_METHOD",sort=8)
|
||||
@SerializedName("matchMethod")
|
||||
protected Integer matchMethod ;
|
||||
|
||||
@Expose
|
||||
@ExcelField(title="whether_hexbinary")
|
||||
@SerializedName("isHexbin")
|
||||
protected Integer isHexbin;
|
||||
|
||||
/**
|
||||
* 是否hex
|
||||
*/
|
||||
@ExcelField(title="is_hex",sort=5)
|
||||
protected Integer isHex;
|
||||
/**
|
||||
* 是否hex
|
||||
*/
|
||||
@ExcelField(title="is_case_insenstive",sort=6)
|
||||
protected Integer isCaseInsenstive;
|
||||
|
||||
|
||||
|
||||
public Integer getIsHex() {
|
||||
return isHex;
|
||||
}
|
||||
|
||||
public void setIsHex(Integer isHex) {
|
||||
this.isHex = isHex;
|
||||
}
|
||||
|
||||
public Integer getIsCaseInsenstive() {
|
||||
return isCaseInsenstive;
|
||||
}
|
||||
|
||||
public void setIsCaseInsenstive(Integer isCaseInsenstive) {
|
||||
this.isCaseInsenstive = isCaseInsenstive;
|
||||
}
|
||||
|
||||
public Long getTopicId() {
|
||||
return topicId;
|
||||
|
||||
@@ -200,5 +200,14 @@ public class BaseStringCfg<T> extends BaseCfg<T> {
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
public static List<BaseStringCfg> baseHexList(List<BaseStringCfg> list){
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
BaseStringCfg base=(BaseStringCfg)list.get(i);
|
||||
base.setIsHex(base.getIsHexbin());
|
||||
base.setIsCaseInsenstive(base.getIsHexbin());
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ import java.util.Date;
|
||||
import com.google.gson.annotations.Expose;
|
||||
import com.nis.domain.BaseEntity;
|
||||
import com.nis.domain.SysUser;
|
||||
import com.nis.util.excel.ExcelField;
|
||||
|
||||
/**
|
||||
* @ClassName: DnsIpConfig.java
|
||||
@@ -27,6 +28,7 @@ public class DnsIpCfg extends BaseIpCfg {
|
||||
*/
|
||||
private static final long serialVersionUID = 8149437730819674317L;
|
||||
private String indexTable="dns_ip_cfg";
|
||||
@ExcelField(title="group",sort=3)
|
||||
private String dnsStrategyName;
|
||||
private Integer dnsStrategyId;
|
||||
|
||||
|
||||
@@ -2,6 +2,8 @@ package com.nis.domain.configuration;
|
||||
|
||||
import javax.net.ssl.KeyManager;
|
||||
|
||||
import com.nis.util.excel.ExcelField;
|
||||
|
||||
/**
|
||||
* dns响应策略配置
|
||||
* @author dell
|
||||
@@ -14,6 +16,7 @@ public class DnsResStrategy extends BaseCfg<DnsResStrategy> {
|
||||
private static final long serialVersionUID = -2720862431960415564L;
|
||||
private String indexTable="dns_res_strategy";
|
||||
private Integer resGroup1Id;
|
||||
@ExcelField(title="res_group_num",sort=3)
|
||||
private Integer resGroup1Num;
|
||||
private Integer resGroup2Id;
|
||||
private Integer resGroup2Num;
|
||||
@@ -25,7 +28,11 @@ public class DnsResStrategy extends BaseCfg<DnsResStrategy> {
|
||||
private Integer resGroup5Num;
|
||||
private Integer minTtl;
|
||||
private Integer maxTtl;
|
||||
@ExcelField(title="group",sort=2)
|
||||
private String group1Name;
|
||||
@ExcelField(title="min_ttl",sort=4)
|
||||
private String miTtlmax;
|
||||
|
||||
@Override
|
||||
public void initDefaultValue() {
|
||||
this.resGroup2Id=0;
|
||||
@@ -37,6 +44,18 @@ public class DnsResStrategy extends BaseCfg<DnsResStrategy> {
|
||||
this.resGroup5Id=0;
|
||||
this.resGroup5Num=0;
|
||||
}
|
||||
|
||||
|
||||
public String getMiTtlmax() {
|
||||
return miTtlmax;
|
||||
}
|
||||
|
||||
|
||||
public void setMiTtlmax(String miTtlmax) {
|
||||
this.miTtlmax = miTtlmax;
|
||||
}
|
||||
|
||||
|
||||
public Integer getResGroup1Id() {
|
||||
return resGroup1Id;
|
||||
}
|
||||
|
||||
@@ -2,6 +2,8 @@ package com.nis.domain.configuration;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.nis.util.excel.ExcelField;
|
||||
|
||||
/**
|
||||
* 拦截证书策略
|
||||
* @author dell
|
||||
@@ -14,16 +16,34 @@ public class PxyObjKeyring extends BaseCfg<PxyObjKeyring> {
|
||||
*/
|
||||
private static final long serialVersionUID = -2720862431960415564L;
|
||||
private String indexTable="pxy_obj_keyring";
|
||||
@ExcelField(title="keyring_type",dictType="INTERCEPT_CERTIFICATE_TYPE",sort=2)
|
||||
private String keyringType;
|
||||
@ExcelField(title="private_key_file",sort=3)
|
||||
private String privateKeyFile;
|
||||
@ExcelField(title="public_key_file",sort=4)
|
||||
private String publicKeyFile;
|
||||
@ExcelField(title="expire_after",sort=5)
|
||||
private Integer expireAfter;
|
||||
private String publicKeyAlgo;
|
||||
private String crl;
|
||||
@ExcelField(title="issuer",sort=6)
|
||||
private String issuer;
|
||||
@ExcelField(title="not_before_time",sort=8)
|
||||
private Date notBeforeTime;
|
||||
@ExcelField(title="not_after_time",sort=9)
|
||||
private Date notAfterTime;
|
||||
@ExcelField(title="certificate_subject",sort=7)
|
||||
private String subject;
|
||||
@ExcelField(title="keyring_name",sort=1)
|
||||
private String keyringName;
|
||||
|
||||
|
||||
public String getKeyringName() {
|
||||
return keyringName;
|
||||
}
|
||||
public void setKeyringName(String keyringName) {
|
||||
this.keyringName = keyringName;
|
||||
}
|
||||
public String getKeyringType() {
|
||||
return keyringType;
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.apache.taglibs.standard.functions.Functions;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
@@ -36,6 +37,9 @@ import com.nis.domain.configuration.AppPolicyCfg;
|
||||
import com.nis.domain.configuration.AppSslCertCfg;
|
||||
import com.nis.domain.configuration.AppTcpCfg;
|
||||
import com.nis.domain.configuration.AppTopicDomainCfg;
|
||||
import com.nis.domain.configuration.AvFileSampleCfg;
|
||||
import com.nis.domain.configuration.BaseStringCfg;
|
||||
import com.nis.domain.configuration.DdosIpCfg;
|
||||
import com.nis.domain.configuration.IpPortCfg;
|
||||
import com.nis.domain.configuration.NtcSubscribeIdCfg;
|
||||
import com.nis.domain.configuration.WebsiteDomainTopic;
|
||||
@@ -1481,12 +1485,13 @@ public class AppCfgController extends BaseController {
|
||||
noExportMap.put("NTC_IP", ipPortInfoNoExport);
|
||||
noExportMap.put("NTC_SUBSCRIBE_ID", subscribeInfoNoExport);
|
||||
List<IpPortCfg> ipList=new ArrayList<IpPortCfg>();
|
||||
List<NtcSubscribeIdCfg> subscribeInfoList=new ArrayList<NtcSubscribeIdCfg>();
|
||||
List<BaseStringCfg> subscribeInfoList=new ArrayList<BaseStringCfg>();
|
||||
for (AppPolicyCfg cfg : page.getList()) {
|
||||
AppPolicyCfg cfgIndexInfo=appCfgService.exportIpInfo(cfg);
|
||||
ipList.addAll(cfgIndexInfo.getIpPortList());
|
||||
subscribeInfoList.addAll(cfgIndexInfo.getNtcSubscribeIdCfgList());
|
||||
}
|
||||
subscribeInfoList=BaseStringCfg.baseHexList(subscribeInfoList);
|
||||
dataMap.put(entity.getMenuNameCode(), page.getList());
|
||||
dataMap.put("NTC_IP", ipList);
|
||||
dataMap.put("NTC_SUBSCRIBE_ID", subscribeInfoList);
|
||||
@@ -1500,6 +1505,252 @@ public class AppCfgController extends BaseController {
|
||||
//return "redirect:" + adminPath +"/ntc/iplist/list?functionId="+entity.getFunctionId();
|
||||
}
|
||||
|
||||
|
||||
|
||||
//top
|
||||
@RequestMapping(value = "exportTop")
|
||||
public void exporttop(Model model,HttpServletRequest request,HttpServletResponse response,
|
||||
@ModelAttribute("cfg")AppTopicDomainCfg 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>();
|
||||
/*//导出选中记录
|
||||
* if(!StringUtil.isEmpty(ids)){
|
||||
for(String id:ids.split(",")){
|
||||
Long.parseLong(id);
|
||||
}
|
||||
//List<CfgIndexInfo> list=ipCfgService.getListByCfgIdWithName(IpPortCfg.getTablename(), entity.getFunctionId(), ids);
|
||||
}else{*/
|
||||
//条件导出数据大于最大导出数,只导出最大导出条数
|
||||
entity.setTableName(IpPortCfg.getTablename());
|
||||
Page<AppTopicDomainCfg> pageInfo=new Page<AppTopicDomainCfg>(request, response,"r");
|
||||
if(pageInfo.getCount()>Constants.MAX_EXPORT_SIZE){
|
||||
pageInfo.setPageNo(1);
|
||||
pageInfo.setPageSize(Constants.MAX_EXPORT_SIZE);
|
||||
}else{
|
||||
pageInfo.setPageNo(1);
|
||||
pageInfo.setPageSize(-1);
|
||||
}
|
||||
Page<AppTopicDomainCfg> page = appCfgService.findAppTopicDomainList(pageInfo, entity);
|
||||
for (int i = 0; i < page.getList().size(); i++) {
|
||||
AppTopicDomainCfg appTop=page.getList().get(i);
|
||||
appTop.setIsHex(appTop.getIsHexbin());
|
||||
appTop.setIsCaseInsenstive(appTop.getIsHexbin());
|
||||
}
|
||||
titleList.add(entity.getMenuNameCode());
|
||||
classMap.put(entity.getMenuNameCode(), AppTopicDomainCfg.class);
|
||||
String cfgIndexInfoNoExport=",letter,whether_area_block,classification,attribute,label,do_log,action,group_name,userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
noExportMap.put(entity.getMenuNameCode(),cfgIndexInfoNoExport);
|
||||
dataMap.put(entity.getMenuNameCode(), page.getList());
|
||||
/*}*/
|
||||
this._export(model, request, response, redirectAttributes,entity.getMenuNameCode(),titleList,classMap,dataMap,noExportMap);
|
||||
} catch (Exception e) {
|
||||
logger.error("top export failed",e);
|
||||
addMessage(redirectAttributes, "export_failed");
|
||||
}
|
||||
//return "redirect:" + adminPath +"/ntc/iplist/list?functionId="+entity.getFunctionId();
|
||||
}
|
||||
|
||||
//appIp配置导出
|
||||
@RequestMapping(value = "exportAppIp")
|
||||
public void exportAppip(Model model,HttpServletRequest request,HttpServletResponse response,
|
||||
@ModelAttribute("cfg")AppIpCfg 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>();
|
||||
|
||||
|
||||
/*//导出选中记录
|
||||
* if(!StringUtil.isEmpty(ids)){
|
||||
for(String id:ids.split(",")){
|
||||
Long.parseLong(id);
|
||||
}
|
||||
//List<CfgIndexInfo> list=ipCfgService.getListByCfgIdWithName(IpPortCfg.getTablename(), entity.getFunctionId(), ids);
|
||||
}else{*/
|
||||
//条件导出数据大于最大导出数,只导出最大导出条数
|
||||
entity.setTableName(IpPortCfg.getTablename());
|
||||
Page<AppIpCfg> pageInfo=new Page<AppIpCfg>(request, response,"r");
|
||||
if(pageInfo.getCount()>Constants.MAX_EXPORT_SIZE){
|
||||
pageInfo.setPageNo(1);
|
||||
pageInfo.setPageSize(Constants.MAX_EXPORT_SIZE);
|
||||
}else{
|
||||
pageInfo.setPageNo(1);
|
||||
pageInfo.setPageSize(-1);
|
||||
}
|
||||
Page<AppIpCfg> page = appCfgService.findAppIpList(pageInfo, entity);
|
||||
for(AppIpCfg appIp:page.getList()){
|
||||
SpecificServiceCfg app = specificServiceCfgService.getBySpecServiceId(appIp.getSpecServiceId());
|
||||
appIp.setAppName(app.getSpecServiceName());
|
||||
}
|
||||
titleList.add(entity.getMenuNameCode());
|
||||
classMap.put(entity.getMenuNameCode(), AppIpCfg.class);
|
||||
String cfgIndexInfoNoExport=",letter,whether_area_block,classification,attribute,label,do_log,action,client_port,ir_type,group_name,userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
noExportMap.put(entity.getMenuNameCode(),cfgIndexInfoNoExport);
|
||||
dataMap.put(entity.getMenuNameCode(), page.getList());
|
||||
/*}*/
|
||||
this._export(model, request, response, redirectAttributes,entity.getMenuNameCode(),titleList,classMap,dataMap,noExportMap);
|
||||
} catch (Exception e) {
|
||||
logger.error("appIp export failed",e);
|
||||
addMessage(redirectAttributes, "export_failed");
|
||||
}
|
||||
//return "redirect:" + adminPath +"/ntc/iplist/list?functionId="+entity.getFunctionId();
|
||||
}
|
||||
|
||||
//appHttp配置导出
|
||||
@RequestMapping(value = "exportAppHttp")
|
||||
public void exportAppHttp(Model model,HttpServletRequest request,HttpServletResponse response,
|
||||
@ModelAttribute("cfg")AppHttpCfg 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>();
|
||||
|
||||
|
||||
/*//导出选中记录
|
||||
* if(!StringUtil.isEmpty(ids)){
|
||||
for(String id:ids.split(",")){
|
||||
Long.parseLong(id);
|
||||
}
|
||||
//List<CfgIndexInfo> list=ipCfgService.getListByCfgIdWithName(IpPortCfg.getTablename(), entity.getFunctionId(), ids);
|
||||
}else{*/
|
||||
//条件导出数据大于最大导出数,只导出最大导出条数
|
||||
entity.setTableName(IpPortCfg.getTablename());
|
||||
Page<AppHttpCfg> pageInfo=new Page<AppHttpCfg>(request, response,"r");
|
||||
if(pageInfo.getCount()>Constants.MAX_EXPORT_SIZE){
|
||||
pageInfo.setPageNo(1);
|
||||
pageInfo.setPageSize(Constants.MAX_EXPORT_SIZE);
|
||||
}else{
|
||||
pageInfo.setPageNo(1);
|
||||
pageInfo.setPageSize(-1);
|
||||
}
|
||||
Page<AppHttpCfg> page = appCfgService.findAppHttpList(pageInfo, entity);
|
||||
for(AppHttpCfg http:page.getList()){
|
||||
http.setIsHex(http.getIsHexbin());
|
||||
http.setIsCaseInsenstive(http.getIsHexbin());
|
||||
http.setCfgKeywords(Functions.replace(http.getCfgKeywords(), "***and***"," "));
|
||||
SpecificServiceCfg app = specificServiceCfgService.getBySpecServiceId(http.getSpecServiceId());
|
||||
http.setAppName(app.getSpecServiceName());
|
||||
}
|
||||
|
||||
titleList.add(entity.getMenuNameCode());
|
||||
classMap.put(entity.getMenuNameCode(), AppHttpCfg.class);
|
||||
String cfgIndexInfoNoExport=",letter,whether_area_block,classification,attribute,label,do_log,action,client_port,ir_type,group_name,userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
noExportMap.put(entity.getMenuNameCode(),cfgIndexInfoNoExport);
|
||||
dataMap.put(entity.getMenuNameCode(), page.getList());
|
||||
/*}*/
|
||||
this._export(model, request, response, redirectAttributes,entity.getMenuNameCode(),titleList,classMap,dataMap,noExportMap);
|
||||
} catch (Exception e) {
|
||||
logger.error("http export failed",e);
|
||||
addMessage(redirectAttributes, "export_failed");
|
||||
}
|
||||
//return "redirect:" + adminPath +"/ntc/iplist/list?functionId="+entity.getFunctionId();
|
||||
}
|
||||
|
||||
//appdomain配置导出
|
||||
@RequestMapping(value = "exportDomain")
|
||||
public void exportDomain(Model model,HttpServletRequest request,HttpServletResponse response,
|
||||
@ModelAttribute("cfg")AppDomainCfg 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>();
|
||||
|
||||
|
||||
/*//导出选中记录
|
||||
* if(!StringUtil.isEmpty(ids)){
|
||||
for(String id:ids.split(",")){
|
||||
Long.parseLong(id);
|
||||
}
|
||||
//List<CfgIndexInfo> list=ipCfgService.getListByCfgIdWithName(IpPortCfg.getTablename(), entity.getFunctionId(), ids);
|
||||
}else{*/
|
||||
//条件导出数据大于最大导出数,只导出最大导出条数
|
||||
entity.setTableName(IpPortCfg.getTablename());
|
||||
Page<AppDomainCfg> pageInfo=new Page<AppDomainCfg>(request, response,"r");
|
||||
if(pageInfo.getCount()>Constants.MAX_EXPORT_SIZE){
|
||||
pageInfo.setPageNo(1);
|
||||
pageInfo.setPageSize(Constants.MAX_EXPORT_SIZE);
|
||||
}else{
|
||||
pageInfo.setPageNo(1);
|
||||
pageInfo.setPageSize(-1);
|
||||
}
|
||||
Page<AppDomainCfg> page = appCfgService.findAppDomainList(pageInfo, entity);
|
||||
for(AppDomainCfg domain:page.getList()){
|
||||
domain.setIsHex(domain.getIsHexbin());
|
||||
domain.setIsCaseInsenstive(domain.getIsHexbin());
|
||||
SpecificServiceCfg app = specificServiceCfgService.getBySpecServiceId(domain.getSpecServiceId());
|
||||
domain.setAppName(app.getSpecServiceName());
|
||||
}
|
||||
|
||||
titleList.add(entity.getMenuNameCode());
|
||||
classMap.put(entity.getMenuNameCode(), AppDomainCfg.class);
|
||||
String cfgIndexInfoNoExport=",letter,whether_area_block,classification,attribute,label,do_log,action,client_port,ir_type,group_name,userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
noExportMap.put(entity.getMenuNameCode(),cfgIndexInfoNoExport);
|
||||
dataMap.put(entity.getMenuNameCode(), page.getList());
|
||||
/*}*/
|
||||
this._export(model, request, response, redirectAttributes,entity.getMenuNameCode(),titleList,classMap,dataMap,noExportMap);
|
||||
} catch (Exception e) {
|
||||
logger.error("http export failed",e);
|
||||
addMessage(redirectAttributes, "export_failed");
|
||||
}
|
||||
//return "redirect:" + adminPath +"/ntc/iplist/list?functionId="+entity.getFunctionId();
|
||||
}
|
||||
|
||||
//appssl配置导出
|
||||
@RequestMapping(value = "exportAppSsl")
|
||||
public void exportAppSsl(Model model,HttpServletRequest request,HttpServletResponse response,
|
||||
@ModelAttribute("cfg")AppSslCertCfg 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>();
|
||||
|
||||
|
||||
/*//导出选中记录
|
||||
* if(!StringUtil.isEmpty(ids)){
|
||||
for(String id:ids.split(",")){
|
||||
Long.parseLong(id);
|
||||
}
|
||||
//List<CfgIndexInfo> list=ipCfgService.getListByCfgIdWithName(IpPortCfg.getTablename(), entity.getFunctionId(), ids);
|
||||
}else{*/
|
||||
//条件导出数据大于最大导出数,只导出最大导出条数
|
||||
entity.setTableName(IpPortCfg.getTablename());
|
||||
Page<AppSslCertCfg> pageInfo=new Page<AppSslCertCfg>(request, response,"r");
|
||||
if(pageInfo.getCount()>Constants.MAX_EXPORT_SIZE){
|
||||
pageInfo.setPageNo(1);
|
||||
pageInfo.setPageSize(Constants.MAX_EXPORT_SIZE);
|
||||
}else{
|
||||
pageInfo.setPageNo(1);
|
||||
pageInfo.setPageSize(-1);
|
||||
}
|
||||
Page<AppSslCertCfg> page = appCfgService.findAppSslList(pageInfo, entity);
|
||||
for(AppSslCertCfg ssl:page.getList()){
|
||||
ssl.setIsHex(ssl.getIsHexbin());
|
||||
ssl.setIsCaseInsenstive(ssl.getIsHexbin());
|
||||
ssl.setCfgKeywords(Functions.replace(ssl.getCfgKeywords(), "***and***"," "));
|
||||
SpecificServiceCfg app = specificServiceCfgService.getBySpecServiceId(ssl.getSpecServiceId());
|
||||
ssl.setAppName(app.getSpecServiceName());
|
||||
}
|
||||
titleList.add(entity.getMenuNameCode());
|
||||
classMap.put(entity.getMenuNameCode(), AppSslCertCfg.class);
|
||||
String cfgIndexInfoNoExport=",letter,whether_area_block,classification,attribute,label,do_log,action,client_port,ir_type,group_name,userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
noExportMap.put(entity.getMenuNameCode(),cfgIndexInfoNoExport);
|
||||
dataMap.put(entity.getMenuNameCode(), page.getList());
|
||||
/*}*/
|
||||
this._export(model, request, response, redirectAttributes,entity.getMenuNameCode(),titleList,classMap,dataMap,noExportMap);
|
||||
} catch (Exception e) {
|
||||
logger.error("App ssl export failed",e);
|
||||
addMessage(redirectAttributes, "export_failed");
|
||||
}
|
||||
//return "redirect:" + adminPath +"/ntc/iplist/list?functionId="+entity.getFunctionId();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.apache.taglibs.standard.functions.Functions;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
@@ -24,6 +25,7 @@ import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.nis.domain.FunctionRegionDict;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.SysDataDictionaryItem;
|
||||
import com.nis.domain.configuration.AppBuiltInFeatureFile;
|
||||
@@ -39,6 +41,8 @@ import com.nis.domain.configuration.AppSslCertCfg;
|
||||
import com.nis.domain.configuration.AppStringFeatureCfg;
|
||||
import com.nis.domain.configuration.AppTcpCfg;
|
||||
import com.nis.domain.configuration.AppTopicDomainCfg;
|
||||
import com.nis.domain.configuration.BaseStringCfg;
|
||||
import com.nis.domain.configuration.CfgIndexInfo;
|
||||
import com.nis.domain.configuration.IpPortCfg;
|
||||
import com.nis.domain.configuration.NtcSubscribeIdCfg;
|
||||
import com.nis.domain.configuration.WebsiteDomainTopic;
|
||||
@@ -236,7 +240,8 @@ public class AppFeatureCfgController extends BaseController {
|
||||
for(AppComplexFeatureCfg cfg:complexList){
|
||||
if(!cfg.getCfgType().equals(cfgType)){
|
||||
tabList.add(new String[]{"3",cfg.getCfgType()});
|
||||
cfgType = cfg.getCfgType();
|
||||
cfgType = cfg.getCfgType();0.
|
||||
|
||||
}
|
||||
}
|
||||
}*/
|
||||
@@ -244,4 +249,113 @@ public class AppFeatureCfgController extends BaseController {
|
||||
model.addAttribute("tabList", tabList);
|
||||
return "/cfg/app/appSubFeatureList";
|
||||
}
|
||||
|
||||
//appfeature配置导出
|
||||
@RequestMapping(value = "exportFeature")
|
||||
public void exportAppSsl(Model model,HttpServletRequest request,HttpServletResponse response,
|
||||
@ModelAttribute("cfg")AppFeatureIndex 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>();
|
||||
|
||||
|
||||
/*//导出选中记录
|
||||
* if(!StringUtil.isEmpty(ids)){
|
||||
for(String id:ids.split(",")){
|
||||
Long.parseLong(id);
|
||||
}
|
||||
//List<CfgIndexInfo> list=ipCfgService.getListByCfgIdWithName(IpPortCfg.getTablename(), entity.getFunctionId(), ids);
|
||||
}else{*/
|
||||
//条件导出数据大于最大导出数,只导出最大导出条数
|
||||
entity.setTableName(IpPortCfg.getTablename());
|
||||
Page<AppFeatureIndex> pageInfo=new Page<AppFeatureIndex>(request, response,"r");
|
||||
if(pageInfo.getCount()>Constants.MAX_EXPORT_SIZE){
|
||||
pageInfo.setPageNo(1);
|
||||
pageInfo.setPageSize(Constants.MAX_EXPORT_SIZE);
|
||||
}else{
|
||||
pageInfo.setPageNo(1);
|
||||
pageInfo.setPageSize(-1);
|
||||
}
|
||||
Page<AppFeatureIndex> page = appMultiFeatureCfgService.findAppFeatureIndexList(pageInfo, entity);
|
||||
for(AppFeatureIndex feature:page.getList()){
|
||||
SpecificServiceCfg app = specificServiceCfgService.getBySpecServiceId(feature.getSpecServiceId());
|
||||
feature.setAppName(app.getSpecServiceName());
|
||||
}
|
||||
String cfgIndexInfoNoExport=",letter,whether_area_block,classification,attribute,label,do_log,action,client_port,ir_type,group_name,userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
String appComplexNoExport=",do_log,action,config_describe,valid_identifier,is_audit,creator,creator"
|
||||
+ ",config_time,editor,edit_time,auditor,audit_time"
|
||||
+",letter,whether_area_block,classification,attribute,label"
|
||||
+",userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
String ipPortInfoNoExport=",do_log,action,config_describe,valid_identifier,is_audit,creator,creator"
|
||||
+ ",config_time,editor,edit_time,auditor,audit_time"
|
||||
+",letter,whether_area_block,classification,attribute,label"
|
||||
+",userregion1,userregion2,userregion3,userregion4,userregion5,ir_type,group_name,";
|
||||
titleList.add(entity.getMenuNameCode());
|
||||
classMap.put(entity.getMenuNameCode(), AppFeatureIndex.class);
|
||||
noExportMap.put(entity.getMenuNameCode(),cfgIndexInfoNoExport);
|
||||
List<IpPortCfg> ipList=new ArrayList<IpPortCfg>();
|
||||
List<AppComplexFeatureCfg> keywordList=new ArrayList<AppComplexFeatureCfg>();
|
||||
for (AppFeatureIndex cfg : page.getList()) {
|
||||
Map<String, List> maps=appMultiFeatureCfgService.exportFeature(cfg);
|
||||
keywordList.addAll(maps.get("APP_KEYWORDS"));
|
||||
ipList.addAll(maps.get("APP_IP_RANGE"));
|
||||
}
|
||||
keywordList=replaceKeyList(keywordList);
|
||||
dataMap.put(entity.getMenuNameCode(), page.getList());
|
||||
if(entity.getFunctionId()!=564 && entity.getFunctionId()!=567 ){
|
||||
titleList.add("APP_IP_RANGE");
|
||||
classMap.put("APP_IP_RANGE", IpPortCfg.class);
|
||||
noExportMap.put("APP_IP_RANGE",ipPortInfoNoExport);
|
||||
dataMap.put("APP_IP_RANGE", ipList);
|
||||
if(entity.getFunctionId()==563){
|
||||
titleList.add("APP_PAYLOAD");
|
||||
classMap.put("APP_PAYLOAD", AppComplexFeatureCfg.class);
|
||||
noExportMap.put("APP_PAYLOAD",appComplexNoExport);
|
||||
dataMap.put("APP_PAYLOAD", keywordList);
|
||||
}else if(entity.getFunctionId()==565){
|
||||
titleList.add("APP_HTTP");
|
||||
classMap.put("APP_HTTP", AppComplexFeatureCfg.class);
|
||||
noExportMap.put("APP_HTTP",appComplexNoExport);
|
||||
dataMap.put("APP_HTTP", keywordList);
|
||||
}else if(entity.getFunctionId()==566){
|
||||
titleList.add("APP_SSL");
|
||||
classMap.put("APP_SSL", AppComplexFeatureCfg.class);
|
||||
noExportMap.put("APP_SSL",appComplexNoExport);
|
||||
dataMap.put("APP_SSL", keywordList);
|
||||
}else if(entity.getFunctionId()==564){
|
||||
titleList.add("APP_DNS");
|
||||
classMap.put("APP_DNS", AppComplexFeatureCfg.class);
|
||||
noExportMap.put("APP_DNS",appComplexNoExport);
|
||||
dataMap.put("APP_DNS", keywordList);
|
||||
}else if(entity.getFunctionId()==567){
|
||||
appComplexNoExport=appComplexNoExport+"district,";
|
||||
titleList.add("APP_DK_GL");
|
||||
classMap.put("APP_DK_GL", AppComplexFeatureCfg.class);
|
||||
noExportMap.put("APP_DK_GL",appComplexNoExport);
|
||||
dataMap.put("APP_DK_GL", keywordList);
|
||||
}
|
||||
}
|
||||
|
||||
/*}*/
|
||||
this._export(model, request, response, redirectAttributes,entity.getMenuNameCode(),titleList,classMap,dataMap,noExportMap);
|
||||
} catch (Exception e) {
|
||||
logger.error("Appfeature export failed",e);
|
||||
addMessage(redirectAttributes, "export_failed");
|
||||
}
|
||||
//return "redirect:" + adminPath +"/ntc/iplist/list?functionId="+entity.getFunctionId();
|
||||
}
|
||||
|
||||
public static List<AppComplexFeatureCfg> replaceKeyList(List<AppComplexFeatureCfg> list){
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
AppComplexFeatureCfg base=(AppComplexFeatureCfg)list.get(i);
|
||||
base.setIsHex(base.getIsHexbin());
|
||||
base.setIsCaseInsenstive(base.getIsHexbin());
|
||||
base.setCfgKeywords(Functions.replace(base.getCfgKeywords(), "***and***"," "));
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.configuration.AppPolicyCfg;
|
||||
import com.nis.domain.configuration.BaseStringCfg;
|
||||
import com.nis.domain.configuration.CfgIndexInfo;
|
||||
import com.nis.domain.configuration.IpPortCfg;
|
||||
import com.nis.domain.configuration.NtcSubscribeIdCfg;
|
||||
@@ -268,12 +269,13 @@ public class BasicProtocolController extends BaseController {
|
||||
noExportMap.put("NTC_IP", ipPortInfoNoExport);
|
||||
noExportMap.put("NTC_SUBSCRIBE_ID", subscribeInfoNoExport);
|
||||
List<IpPortCfg> ipList=new ArrayList<IpPortCfg>();
|
||||
List<NtcSubscribeIdCfg> subscribeInfoList=new ArrayList<NtcSubscribeIdCfg>();
|
||||
List<BaseStringCfg> subscribeInfoList=new ArrayList<BaseStringCfg>();
|
||||
for (AppPolicyCfg cfg : page.getList()) {
|
||||
AppPolicyCfg cfgIndexInfo=appCfgService.exportIpInfo(cfg);
|
||||
ipList.addAll(cfgIndexInfo.getIpPortList());
|
||||
subscribeInfoList.addAll(cfgIndexInfo.getNtcSubscribeIdCfgList());
|
||||
}
|
||||
subscribeInfoList=BaseStringCfg.baseHexList(subscribeInfoList);
|
||||
dataMap.put(entity.getMenuNameCode(), page.getList());
|
||||
dataMap.put("NTC_IP", ipList);
|
||||
dataMap.put("NTC_SUBSCRIBE_ID", subscribeInfoList);
|
||||
|
||||
@@ -20,6 +20,7 @@ import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.SysDataDictionaryItem;
|
||||
import com.nis.domain.configuration.AppPolicyCfg;
|
||||
import com.nis.domain.configuration.BaseStringCfg;
|
||||
import com.nis.domain.configuration.IpPortCfg;
|
||||
import com.nis.domain.configuration.NtcSubscribeIdCfg;
|
||||
import com.nis.domain.specific.SpecificServiceCfg;
|
||||
@@ -306,12 +307,13 @@ public class EncryptedTunnelBehaviorController extends BaseController {
|
||||
noExportMap.put("NTC_IP", ipPortInfoNoExport);
|
||||
noExportMap.put("NTC_SUBSCRIBE_ID", subscribeInfoNoExport);
|
||||
List<IpPortCfg> ipList=new ArrayList<IpPortCfg>();
|
||||
List<NtcSubscribeIdCfg> subscribeInfoList=new ArrayList<NtcSubscribeIdCfg>();
|
||||
List<BaseStringCfg> subscribeInfoList=new ArrayList<BaseStringCfg>();
|
||||
for (AppPolicyCfg cfg : page.getList()) {
|
||||
AppPolicyCfg cfgIndexInfo=appCfgService.exportIpInfo(cfg);
|
||||
ipList.addAll(cfgIndexInfo.getIpPortList());
|
||||
subscribeInfoList.addAll(cfgIndexInfo.getNtcSubscribeIdCfgList());
|
||||
}
|
||||
subscribeInfoList=BaseStringCfg.baseHexList(subscribeInfoList);
|
||||
dataMap.put(entity.getMenuNameCode(), page.getList());
|
||||
dataMap.put("NTC_IP", ipList);
|
||||
dataMap.put("NTC_SUBSCRIBE_ID", subscribeInfoList);
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
package com.nis.web.controller.configuration.maintenance;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
@@ -20,9 +24,11 @@ import com.nis.domain.basics.ServiceDictInfo;
|
||||
import com.nis.domain.configuration.BaseIpCfg;
|
||||
import com.nis.domain.configuration.DnsIpCfg;
|
||||
import com.nis.domain.configuration.DnsResStrategy;
|
||||
import com.nis.domain.configuration.IpPortCfg;
|
||||
import com.nis.domain.configuration.DnsIpCfg;
|
||||
import com.nis.domain.configuration.RequestInfo;
|
||||
import com.nis.exceptions.MaatConvertException;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.web.controller.BaseController;
|
||||
import com.nis.web.security.UserUtils;
|
||||
@@ -110,4 +116,55 @@ public class DnsIpCfgController extends BaseController {
|
||||
return "redirect:" + adminPath +"/cfg/dnsIp/list?functionId="+functionId;
|
||||
}
|
||||
|
||||
|
||||
//dnsIp配置导出
|
||||
@RequestMapping(value = "exportDnsIp")
|
||||
public void exportDns(Model model,HttpServletRequest request,HttpServletResponse response,
|
||||
@ModelAttribute("cfg")DnsIpCfg 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>();
|
||||
|
||||
|
||||
/*//导出选中记录
|
||||
* if(!StringUtil.isEmpty(ids)){
|
||||
for(String id:ids.split(",")){
|
||||
Long.parseLong(id);
|
||||
}
|
||||
//List<CfgIndexInfo> list=ipCfgService.getListByCfgIdWithName(IpPortCfg.getTablename(), entity.getFunctionId(), ids);
|
||||
}else{*/
|
||||
//条件导出数据大于最大导出数,只导出最大导出条数
|
||||
entity.setTableName(IpPortCfg.getTablename());
|
||||
Page<DnsIpCfg> pageInfo=new Page<DnsIpCfg>(request, response,"r");
|
||||
if(pageInfo.getCount()>Constants.MAX_EXPORT_SIZE){
|
||||
pageInfo.setPageNo(1);
|
||||
pageInfo.setPageSize(Constants.MAX_EXPORT_SIZE);
|
||||
}else{
|
||||
pageInfo.setPageNo(1);
|
||||
pageInfo.setPageSize(-1);
|
||||
}
|
||||
Page<DnsIpCfg> page = dnsIpCfgService.findPage(pageInfo, entity);
|
||||
for (int i = 0; i < page.getList().size(); i++) {
|
||||
if(StringUtil.isEmpty(page.getList().get(i).getDnsStrategyName())){
|
||||
Properties msgProp = getMsgProp();
|
||||
page.getList().get(i).setDnsStrategyName(msgProp.getProperty("default_group"));
|
||||
}
|
||||
}
|
||||
model.addAttribute("page", page);
|
||||
titleList.add(entity.getMenuNameCode());
|
||||
classMap.put(entity.getMenuNameCode(), DnsIpCfg.class);
|
||||
String cfgIndexInfoNoExport=",whether_area_block,client_ip,port_pattern,client_port,server_port,ir_type,direction,protocol,do_log,client_port,ir_type,group_name,userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
noExportMap.put(entity.getMenuNameCode(),cfgIndexInfoNoExport);
|
||||
dataMap.put(entity.getMenuNameCode(), page.getList());
|
||||
/*}*/
|
||||
this._export(model, request, response, redirectAttributes,entity.getMenuNameCode(),titleList,classMap,dataMap,noExportMap);
|
||||
} catch (Exception e) {
|
||||
logger.error("DnsIp export failed",e);
|
||||
addMessage(redirectAttributes, "export_failed");
|
||||
}
|
||||
//return "redirect:" + adminPath +"/ntc/iplist/list?functionId="+entity.getFunctionId();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,16 @@
|
||||
package com.nis.web.controller.configuration.maintenance;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.apache.taglibs.standard.functions.Functions;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
@@ -16,8 +20,12 @@ import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.basics.PolicyGroupInfo;
|
||||
import com.nis.domain.configuration.AppSslCertCfg;
|
||||
import com.nis.domain.configuration.DnsResStrategy;
|
||||
import com.nis.domain.configuration.IpPortCfg;
|
||||
import com.nis.domain.specific.SpecificServiceCfg;
|
||||
import com.nis.exceptions.MaatConvertException;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.web.controller.BaseController;
|
||||
|
||||
@@ -135,4 +143,52 @@ public class DnsResStrategyController extends BaseController {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
//dns配置导出
|
||||
@RequestMapping(value = "exportDns")
|
||||
public void exportDns(Model model,HttpServletRequest request,HttpServletResponse response,
|
||||
@ModelAttribute("cfg")DnsResStrategy 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>();
|
||||
|
||||
|
||||
/*//导出选中记录
|
||||
* if(!StringUtil.isEmpty(ids)){
|
||||
for(String id:ids.split(",")){
|
||||
Long.parseLong(id);
|
||||
}
|
||||
//List<CfgIndexInfo> list=ipCfgService.getListByCfgIdWithName(IpPortCfg.getTablename(), entity.getFunctionId(), ids);
|
||||
}else{*/
|
||||
//条件导出数据大于最大导出数,只导出最大导出条数
|
||||
entity.setTableName(IpPortCfg.getTablename());
|
||||
Page<DnsResStrategy> pageInfo=new Page<DnsResStrategy>(request, response,"r");
|
||||
if(pageInfo.getCount()>Constants.MAX_EXPORT_SIZE){
|
||||
pageInfo.setPageNo(1);
|
||||
pageInfo.setPageSize(Constants.MAX_EXPORT_SIZE);
|
||||
}else{
|
||||
pageInfo.setPageNo(1);
|
||||
pageInfo.setPageSize(-1);
|
||||
}
|
||||
Page<DnsResStrategy> page = dnsResStrategyService.findPage(pageInfo, entity);
|
||||
for (int i = 0; i < page.getList().size(); i++) {
|
||||
page.getList().get(i).setMiTtlmax(String.valueOf(page.getList().get(i).getMinTtl())+"-"+String.valueOf(page.getList().get(i).getMaxTtl()));
|
||||
}
|
||||
model.addAttribute("page", page);
|
||||
titleList.add(entity.getMenuNameCode());
|
||||
classMap.put(entity.getMenuNameCode(), DnsResStrategy.class);
|
||||
String cfgIndexInfoNoExport=",valid_identifier,do_log,client_port,ir_type,group_name,userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
noExportMap.put(entity.getMenuNameCode(),cfgIndexInfoNoExport);
|
||||
dataMap.put(entity.getMenuNameCode(), page.getList());
|
||||
/*}*/
|
||||
this._export(model, request, response, redirectAttributes,entity.getMenuNameCode(),titleList,classMap,dataMap,noExportMap);
|
||||
} catch (Exception e) {
|
||||
logger.error("Dns export failed",e);
|
||||
addMessage(redirectAttributes, "export_failed");
|
||||
}
|
||||
//return "redirect:" + adminPath +"/ntc/iplist/list?functionId="+entity.getFunctionId();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -940,7 +940,7 @@ public class AvContentController extends BaseController {
|
||||
noExportMap.put("NTC_STREAMING_MEDIA_URL", regionCfgNoExport);
|
||||
noExportMap.put("NTC_SUBSCRIBE_ID", ntcSubscribeIdCfgNoExport);
|
||||
List<IpPortCfg> ipList=new ArrayList<IpPortCfg>();
|
||||
List<NtcSubscribeIdCfg> subscribeInfoList=new ArrayList<NtcSubscribeIdCfg>();
|
||||
List<BaseStringCfg> subscribeInfoList=new ArrayList<BaseStringCfg>();
|
||||
List<BaseStringCfg> streamurlList=new ArrayList<BaseStringCfg>();
|
||||
for (CfgIndexInfo cfg : page.getList()) {
|
||||
Map<String, List> maps=avContentCfgService.exportstream(cfg);
|
||||
@@ -948,6 +948,7 @@ public class AvContentController extends BaseController {
|
||||
streamurlList.addAll(maps.get("NTC_STREAMING_MEDIA_URL"));
|
||||
subscribeInfoList.addAll(maps.get("NTC_SUBSCRIBE_ID"));
|
||||
}
|
||||
subscribeInfoList=BaseStringCfg.baseHexList(subscribeInfoList);
|
||||
streamurlList=BaseStringCfg.replaceBaseKeyList(streamurlList);
|
||||
dataMap.put(entity.getMenuNameCode(), page.getList());
|
||||
dataMap.put("NTC_UNIVERSAL_IP", ipList);
|
||||
@@ -1029,7 +1030,7 @@ public class AvContentController extends BaseController {
|
||||
noExportMap.put("NTC_VOIP_ACCOUNT", regionCfgNoExport);
|
||||
noExportMap.put("NTC_SUBSCRIBE_ID", ntcSubscribeIdCfgNoExport);
|
||||
List<IpPortCfg> ipList=new ArrayList<IpPortCfg>();
|
||||
List<NtcSubscribeIdCfg> subscribeInfoList=new ArrayList<NtcSubscribeIdCfg>();
|
||||
List<BaseStringCfg> subscribeInfoList=new ArrayList<BaseStringCfg>();
|
||||
List<BaseStringCfg> countlList=new ArrayList<BaseStringCfg>();
|
||||
for (CfgIndexInfo cfg : page.getList()) {
|
||||
Map<String, List> maps=avContentCfgService.exportvoip(cfg);
|
||||
@@ -1038,6 +1039,7 @@ public class AvContentController extends BaseController {
|
||||
subscribeInfoList.addAll(maps.get("NTC_SUBSCRIBE_ID"));
|
||||
}
|
||||
countlList=BaseStringCfg.replaceBaseKeyList(countlList);
|
||||
subscribeInfoList=BaseStringCfg.baseHexList(subscribeInfoList);
|
||||
dataMap.put(entity.getMenuNameCode(), page.getList());
|
||||
dataMap.put("NTC_UNIVERSAL_IP", ipList);
|
||||
dataMap.put("NTC_VOIP_ACCOUNT", countlList);
|
||||
|
||||
@@ -207,7 +207,7 @@ public class BgpCfgController extends BaseController{
|
||||
noExportMap.put("NTC_BGP_AS", regionCfgNoExport);
|
||||
noExportMap.put("NTC_SUBSCRIBE_ID", ntcSubscribeIdCfgNoExport);
|
||||
List<IpPortCfg> ipList=new ArrayList<IpPortCfg>();
|
||||
List<NtcSubscribeIdCfg> subscribeInfoList=new ArrayList<NtcSubscribeIdCfg>();
|
||||
List<BaseStringCfg> subscribeInfoList=new ArrayList<BaseStringCfg>();
|
||||
List<BaseStringCfg> asInfoList=new ArrayList<BaseStringCfg>();
|
||||
for (CfgIndexInfo cfg : page.getList()) {
|
||||
CfgIndexInfo cfgIndexInfo=bgpCfgService.exportbgp(cfg);
|
||||
@@ -216,6 +216,7 @@ public class BgpCfgController extends BaseController{
|
||||
asInfoList.addAll(cfgIndexInfo.getNtcBgpAsCfgList());
|
||||
}
|
||||
asInfoList=BaseStringCfg.replaceBaseKeyList(asInfoList);
|
||||
subscribeInfoList=BaseStringCfg.baseHexList(subscribeInfoList);
|
||||
dataMap.put(entity.getMenuNameCode(), page.getList());
|
||||
dataMap.put("NTC_IP", ipList);
|
||||
dataMap.put("NTC_BGP_AS", asInfoList);
|
||||
|
||||
@@ -520,7 +520,7 @@ public class FileTransferCfgController extends BaseController{
|
||||
noExportMap.put("NTC_FTP_CONTENT", regionCfgNoExport);
|
||||
noExportMap.put("NTC_SUBSCRIBE_ID", ntcSubscribeIdCfgNoExport);
|
||||
List<IpPortCfg> ipList=new ArrayList<IpPortCfg>();
|
||||
List<NtcSubscribeIdCfg> subscribeInfoList=new ArrayList<NtcSubscribeIdCfg>();
|
||||
List<BaseStringCfg> subscribeInfoList=new ArrayList<BaseStringCfg>();
|
||||
List<BaseStringCfg> ftpkeyList=new ArrayList<BaseStringCfg>();
|
||||
List<BaseStringCfg> ftpurlList=new ArrayList<BaseStringCfg>();
|
||||
for (CfgIndexInfo cfg : page.getList()) {
|
||||
@@ -530,6 +530,7 @@ public class FileTransferCfgController extends BaseController{
|
||||
ipList.addAll(maps.get("NTC_UNIVERSAL_IP"));
|
||||
subscribeInfoList.addAll(maps.get("NTC_SUBSCRIBE_ID"));
|
||||
}
|
||||
subscribeInfoList=BaseStringCfg.baseHexList(subscribeInfoList);
|
||||
ftpkeyList=BaseStringCfg.replaceBaseKeyList(ftpkeyList);
|
||||
ftpurlList=BaseStringCfg.replaceBaseKeyList(ftpurlList);
|
||||
dataMap.put(entity.getMenuNameCode(), page.getList());
|
||||
@@ -612,7 +613,7 @@ public class FileTransferCfgController extends BaseController{
|
||||
noExportMap.put("NTC_P2P_HASH_BIN", hashCfgNoExport);
|
||||
noExportMap.put("NTC_SUBSCRIBE_ID", ntcSubscribeIdCfgNoExport);
|
||||
List<IpPortCfg> ipList=new ArrayList<IpPortCfg>();
|
||||
List<NtcSubscribeIdCfg> subscribeInfoList=new ArrayList<NtcSubscribeIdCfg>();
|
||||
List<BaseStringCfg> subscribeInfoList=new ArrayList<BaseStringCfg>();
|
||||
List<BaseStringCfg> hashList=new ArrayList<BaseStringCfg>();
|
||||
List<BaseStringCfg> keywordList=new ArrayList<BaseStringCfg>();
|
||||
for (CfgIndexInfo cfg : page.getList()) {
|
||||
@@ -622,6 +623,7 @@ public class FileTransferCfgController extends BaseController{
|
||||
ipList.addAll(maps.get("NTC_UNIVERSAL_IP"));
|
||||
subscribeInfoList.addAll(maps.get("NTC_SUBSCRIBE_ID"));
|
||||
}
|
||||
subscribeInfoList=BaseStringCfg.baseHexList(subscribeInfoList);
|
||||
keywordList=BaseStringCfg.replaceBaseKeyList(keywordList);
|
||||
hashList=BaseStringCfg.replaceBaseKeyList(hashList);
|
||||
dataMap.put(entity.getMenuNameCode(), page.getList());
|
||||
|
||||
@@ -24,6 +24,7 @@ import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.configuration.BaseStringCfg;
|
||||
import com.nis.domain.configuration.CfgIndexInfo;
|
||||
import com.nis.domain.configuration.ComplexkeywordCfg;
|
||||
import com.nis.domain.configuration.FileDigestCfg;
|
||||
@@ -242,7 +243,7 @@ public class MailCfgController extends BaseController{
|
||||
noExportMap.put("NTC_MAIL_HDR", regionCfgNoExport);
|
||||
noExportMap.put("NTC_SUBSCRIBE_ID", ntcSubscribeIdCfgNoExport);
|
||||
List<IpPortCfg> ipList=new ArrayList<IpPortCfg>();
|
||||
List<NtcSubscribeIdCfg> subscribeInfoList=new ArrayList<NtcSubscribeIdCfg>();
|
||||
List<BaseStringCfg> subscribeInfoList=new ArrayList<BaseStringCfg>();
|
||||
List<ComplexkeywordCfg> mailBodyList=new ArrayList<ComplexkeywordCfg>();
|
||||
List<ComplexkeywordCfg> mailReqHdrList=new ArrayList<ComplexkeywordCfg>();
|
||||
for (CfgIndexInfo cfg : page.getList()) {
|
||||
@@ -252,6 +253,9 @@ public class MailCfgController extends BaseController{
|
||||
ipList.addAll(maps.get("NTC_UNIVERSAL_IP"));
|
||||
subscribeInfoList.addAll(maps.get("NTC_SUBSCRIBE_ID"));
|
||||
}
|
||||
subscribeInfoList=BaseStringCfg.baseHexList(subscribeInfoList);
|
||||
mailBodyList=ComplexkeywordCfg.replaceComplexKeyList(mailBodyList);
|
||||
mailReqHdrList=ComplexkeywordCfg.replaceComplexKeyList(mailReqHdrList);
|
||||
if(entity.getFunctionId()!=null){
|
||||
if(entity.getFunctionId()!=37){
|
||||
dataMap.put("NTC_IP", ipList);
|
||||
|
||||
@@ -522,130 +522,131 @@ public class WebsiteController extends BaseController{
|
||||
|
||||
|
||||
|
||||
//http配置导出
|
||||
@RequestMapping(value = "exportHttp")
|
||||
public String exportHttp(Model model,HttpServletRequest request,HttpServletResponse response,
|
||||
@ModelAttribute("cfg")CfgIndexInfo 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<FunctionRegionDict> regionList = DictUtils.getFunctionRegionDictList(entity.getFunctionId());
|
||||
|
||||
/*//导出选中记录
|
||||
if(!StringUtil.isEmpty(ids)){
|
||||
for(String id:ids.split(",")){
|
||||
Long.parseLong(id);
|
||||
}
|
||||
//List<CfgIndexInfo> list=ipCfgService.getListByCfgIdWithName(IpPortCfg.getTablename(), entity.getFunctionId(), ids);
|
||||
}else{*/
|
||||
//条件导出数据大于最大导出数,只导出最大导出条数
|
||||
Page<CfgIndexInfo> pageInfo=new Page<CfgIndexInfo>(request, response,"a");
|
||||
if(pageInfo.getCount()>Constants.MAX_EXPORT_SIZE){
|
||||
pageInfo.setPageNo(1);
|
||||
pageInfo.setPageSize(Constants.MAX_EXPORT_SIZE);
|
||||
}else{
|
||||
pageInfo.setPageNo(1);
|
||||
pageInfo.setPageSize(-1);
|
||||
}
|
||||
Page<CfgIndexInfo> page = websiteCfgService.getWebsiteList(pageInfo, entity);
|
||||
|
||||
titleList.add(entity.getMenuNameCode());
|
||||
titleList.add("NTC_HTTP_URL");
|
||||
titleList.add("NTC_HTTP_REQ_HDR");
|
||||
titleList.add("NTC_HTTP_RES_HDR");
|
||||
titleList.add("NTC_HTTP_REQ_BODY");
|
||||
titleList.add("NTC_HTTP_RES_BODY");
|
||||
titleList.add("NTC_UNIVERSAL_IP");
|
||||
titleList.add("NTC_SUBSCRIBE_ID");
|
||||
classMap.put(entity.getMenuNameCode(), CfgIndexInfo.class);
|
||||
classMap.put("NTC_HTTP_URL", HttpUrlCfg.class);
|
||||
classMap.put("NTC_HTTP_REQ_HDR", HttpReqHeadCfg.class);
|
||||
classMap.put("NTC_HTTP_RES_HDR", HttpResHeadCfg.class);
|
||||
classMap.put("NTC_HTTP_REQ_BODY", HttpBodyCfg.class);
|
||||
classMap.put("NTC_HTTP_RES_BODY", HttpBodyCfg.class);
|
||||
classMap.put("NTC_UNIVERSAL_IP", IpPortCfg.class);
|
||||
classMap.put("NTC_SUBSCRIBE_ID", NtcSubscribeIdCfg.class);
|
||||
String cfgIndexInfoNoExport=",policy_name,group_name,userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
String httpUrlCfgNoExport=",do_log,action,config_describe,valid_identifier,is_audit,creator,creator"
|
||||
+ ",config_time,editor,edit_time,auditor,audit_time"
|
||||
+",letter,whether_area_block,classification,attribute,label"
|
||||
+",userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
String httpReqHeadCfgNoExport=",do_log,action,config_describe,valid_identifier,is_audit,creator,creator"
|
||||
+ ",config_time,editor,edit_time,auditor,audit_time"
|
||||
+",letter,whether_area_block,classification,attribute,label"
|
||||
+",userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
String httpResHeadCfgNoExport=",do_log,action,config_describe,valid_identifier,is_audit,creator,creator"
|
||||
+ ",config_time,editor,edit_time,auditor,audit_time"
|
||||
+",letter,whether_area_block,classification,attribute,label"
|
||||
+",userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
String httpReqBodyCfgNoExport=",do_log,action,config_describe,valid_identifier,is_audit,creator,creator"
|
||||
+ ",config_time,editor,edit_time,auditor,audit_time"
|
||||
+",letter,whether_area_block,classification,attribute,label"
|
||||
+",userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
String httpResBodyCfgNoExport=",do_log,action,config_describe,valid_identifier,is_audit,creator,creator"
|
||||
+ ",config_time,editor,edit_time,auditor,audit_time"
|
||||
+",letter,whether_area_block,classification,attribute,label"
|
||||
+",userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
String ipPortCfgNoExport=",do_log,action,config_describe,valid_identifier,is_audit,creator,creator"
|
||||
+ ",config_time,editor,edit_time,auditor,audit_time"
|
||||
+",letter,whether_area_block,classification,attribute,label"
|
||||
+",userregion1,userregion2,userregion3,userregion4,userregion5,ir_type,group_name,";
|
||||
String ntcSubscribeIdCfgNoExport=",do_log,action,config_describe,valid_identifier,is_audit,creator,creator"
|
||||
+ ",config_time,editor,edit_time,auditor,audit_time"
|
||||
+",letter,whether_area_block,classification,attribute,label"
|
||||
+",userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
noExportMap.put(entity.getMenuNameCode(),cfgIndexInfoNoExport);
|
||||
noExportMap.put("NTC_HTTP_URL", httpUrlCfgNoExport);
|
||||
noExportMap.put("NTC_HTTP_REQ_HDR", httpReqHeadCfgNoExport);
|
||||
noExportMap.put("NTC_HTTP_RES_HDR", httpResHeadCfgNoExport);
|
||||
noExportMap.put("NTC_HTTP_REQ_BODY", httpReqBodyCfgNoExport);
|
||||
noExportMap.put("NTC_HTTP_RES_BODY", httpResBodyCfgNoExport);
|
||||
noExportMap.put("NTC_UNIVERSAL_IP", ipPortCfgNoExport);
|
||||
noExportMap.put("NTC_SUBSCRIBE_ID", ntcSubscribeIdCfgNoExport);
|
||||
|
||||
List<BaseStringCfg> httpUrlList = new ArrayList<>();
|
||||
List<ComplexkeywordCfg> httpReqHdrList = new ArrayList<>();
|
||||
List<ComplexkeywordCfg> httpResHdrList = new ArrayList<>();
|
||||
List<BaseStringCfg> httpReqBodyList = new ArrayList<>();
|
||||
List<BaseStringCfg> httpResBodyList = new ArrayList<>();
|
||||
List<IpPortCfg> ipPortList = new ArrayList<>();
|
||||
List<NtcSubscribeIdCfg> subscribeIdList = new ArrayList<>();
|
||||
for (CfgIndexInfo cfg : page.getList()) {
|
||||
Map<String, List> maps=websiteCfgService.exportHttpCfg(cfg);
|
||||
httpUrlList.addAll(maps.get("NTC_HTTP_URL"));
|
||||
httpReqHdrList.addAll(maps.get("NTC_HTTP_REQ_HDR"));
|
||||
httpResHdrList.addAll(maps.get("NTC_HTTP_RES_HDR"));
|
||||
httpReqBodyList.addAll(maps.get("NTC_HTTP_REQ_BODY"));
|
||||
httpResBodyList.addAll(maps.get("NTC_HTTP_RES_BODY"));
|
||||
ipPortList.addAll(maps.get("NTC_UNIVERSAL_IP"));
|
||||
subscribeIdList.addAll(maps.get("NTC_SUBSCRIBE_ID"));
|
||||
//http配置导出
|
||||
@RequestMapping(value = "exportHttp")
|
||||
public String exportHttp(Model model,HttpServletRequest request,HttpServletResponse response,
|
||||
@ModelAttribute("cfg")CfgIndexInfo 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<FunctionRegionDict> regionList = DictUtils.getFunctionRegionDictList(entity.getFunctionId());
|
||||
|
||||
/*//导出选中记录
|
||||
if(!StringUtil.isEmpty(ids)){
|
||||
for(String id:ids.split(",")){
|
||||
Long.parseLong(id);
|
||||
}
|
||||
//List<CfgIndexInfo> list=ipCfgService.getListByCfgIdWithName(IpPortCfg.getTablename(), entity.getFunctionId(), ids);
|
||||
}else{*/
|
||||
//条件导出数据大于最大导出数,只导出最大导出条数
|
||||
Page<CfgIndexInfo> pageInfo=new Page<CfgIndexInfo>(request, response,"a");
|
||||
if(pageInfo.getCount()>Constants.MAX_EXPORT_SIZE){
|
||||
pageInfo.setPageNo(1);
|
||||
pageInfo.setPageSize(Constants.MAX_EXPORT_SIZE);
|
||||
}else{
|
||||
pageInfo.setPageNo(1);
|
||||
pageInfo.setPageSize(-1);
|
||||
}
|
||||
Page<CfgIndexInfo> page = httpRedirectCfgService.getHttpRedirectList(pageInfo, entity);
|
||||
titleList.add(entity.getMenuNameCode());
|
||||
titleList.add("NTC_HTTP_URL");
|
||||
titleList.add("NTC_HTTP_REQ_HDR");
|
||||
titleList.add("NTC_HTTP_RES_HDR");
|
||||
titleList.add("NTC_HTTP_REQ_BODY");
|
||||
titleList.add("NTC_HTTP_RES_BODY");
|
||||
titleList.add("NTC_UNIVERSAL_IP");
|
||||
titleList.add("NTC_SUBSCRIBE_ID");
|
||||
classMap.put(entity.getMenuNameCode(), CfgIndexInfo.class);
|
||||
classMap.put("NTC_HTTP_URL", HttpUrlCfg.class);
|
||||
classMap.put("NTC_HTTP_REQ_HDR", HttpReqHeadCfg.class);
|
||||
classMap.put("NTC_HTTP_RES_HDR", HttpResHeadCfg.class);
|
||||
classMap.put("NTC_HTTP_REQ_BODY", HttpBodyCfg.class);
|
||||
classMap.put("NTC_HTTP_RES_BODY", HttpBodyCfg.class);
|
||||
classMap.put("NTC_UNIVERSAL_IP", IpPortCfg.class);
|
||||
classMap.put("NTC_SUBSCRIBE_ID", NtcSubscribeIdCfg.class);
|
||||
String cfgIndexInfoNoExport=",policy_name,group_name,userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
String httpUrlCfgNoExport=",do_log,action,config_describe,valid_identifier,is_audit,creator,creator"
|
||||
+ ",config_time,editor,edit_time,auditor,audit_time"
|
||||
+",letter,whether_area_block,classification,attribute,label"
|
||||
+",userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
String httpReqHeadCfgNoExport=",do_log,action,config_describe,valid_identifier,is_audit,creator,creator"
|
||||
+ ",config_time,editor,edit_time,auditor,audit_time"
|
||||
+",letter,whether_area_block,classification,attribute,label"
|
||||
+",userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
String httpResHeadCfgNoExport=",do_log,action,config_describe,valid_identifier,is_audit,creator,creator"
|
||||
+ ",config_time,editor,edit_time,auditor,audit_time"
|
||||
+",letter,whether_area_block,classification,attribute,label"
|
||||
+",userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
String httpReqBodyCfgNoExport=",do_log,action,config_describe,valid_identifier,is_audit,creator,creator"
|
||||
+ ",config_time,editor,edit_time,auditor,audit_time"
|
||||
+",letter,whether_area_block,classification,attribute,label"
|
||||
+",userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
String httpResBodyCfgNoExport=",do_log,action,config_describe,valid_identifier,is_audit,creator,creator"
|
||||
+ ",config_time,editor,edit_time,auditor,audit_time"
|
||||
+",letter,whether_area_block,classification,attribute,label"
|
||||
+",userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
String ipPortCfgNoExport=",do_log,action,config_describe,valid_identifier,is_audit,creator,creator"
|
||||
+ ",config_time,editor,edit_time,auditor,audit_time"
|
||||
+",letter,whether_area_block,classification,attribute,label"
|
||||
+",userregion1,userregion2,userregion3,userregion4,userregion5,ir_type,group_name,";
|
||||
String ntcSubscribeIdCfgNoExport=",do_log,action,config_describe,valid_identifier,is_audit,creator,creator"
|
||||
+ ",config_time,editor,edit_time,auditor,audit_time"
|
||||
+",letter,whether_area_block,classification,attribute,label"
|
||||
+",userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
noExportMap.put(entity.getMenuNameCode(),cfgIndexInfoNoExport);
|
||||
noExportMap.put("NTC_HTTP_URL", httpUrlCfgNoExport);
|
||||
noExportMap.put("NTC_HTTP_REQ_HDR", httpReqHeadCfgNoExport);
|
||||
noExportMap.put("NTC_HTTP_RES_HDR", httpResHeadCfgNoExport);
|
||||
noExportMap.put("NTC_HTTP_REQ_BODY", httpReqBodyCfgNoExport);
|
||||
noExportMap.put("NTC_HTTP_RES_BODY", httpResBodyCfgNoExport);
|
||||
noExportMap.put("NTC_UNIVERSAL_IP", ipPortCfgNoExport);
|
||||
noExportMap.put("NTC_SUBSCRIBE_ID", ntcSubscribeIdCfgNoExport);
|
||||
|
||||
List<BaseStringCfg> httpUrlList = new ArrayList<>();
|
||||
List<ComplexkeywordCfg> httpReqHdrList = new ArrayList<>();
|
||||
List<ComplexkeywordCfg> httpResHdrList = new ArrayList<>();
|
||||
List<BaseStringCfg> httpReqBodyList = new ArrayList<>();
|
||||
List<BaseStringCfg> httpResBodyList = new ArrayList<>();
|
||||
List<IpPortCfg> ipPortList = new ArrayList<>();
|
||||
List<BaseStringCfg> subscribeIdList = new ArrayList<>();
|
||||
for (CfgIndexInfo cfg : page.getList()) {
|
||||
Map<String, List> maps=websiteCfgService.exportHttpCfg(cfg);
|
||||
httpUrlList.addAll(maps.get("NTC_HTTP_URL"));
|
||||
httpReqHdrList.addAll(maps.get("NTC_HTTP_REQ_HDR"));
|
||||
httpResHdrList.addAll(maps.get("NTC_HTTP_RES_HDR"));
|
||||
httpReqBodyList.addAll(maps.get("NTC_HTTP_REQ_BODY"));
|
||||
httpResBodyList.addAll(maps.get("NTC_HTTP_RES_BODY"));
|
||||
ipPortList.addAll(maps.get("NTC_UNIVERSAL_IP"));
|
||||
subscribeIdList.addAll(maps.get("NTC_SUBSCRIBE_ID"));
|
||||
}
|
||||
httpUrlList=BaseStringCfg.replaceBaseKeyList(httpUrlList);
|
||||
httpReqHdrList=ComplexkeywordCfg.replaceComplexKeyList(httpReqHdrList);
|
||||
httpResHdrList=ComplexkeywordCfg.replaceComplexKeyList(httpResHdrList);
|
||||
httpReqBodyList=BaseStringCfg.replaceBaseKeyList(httpReqBodyList);
|
||||
httpResBodyList=BaseStringCfg.replaceBaseKeyList(httpResBodyList);
|
||||
subscribeIdList=BaseStringCfg.baseHexList(subscribeIdList);
|
||||
dataMap.put(entity.getMenuNameCode(), page.getList());
|
||||
dataMap.put("NTC_HTTP_URL", httpUrlList);
|
||||
dataMap.put("NTC_HTTP_REQ_HDR", httpReqHdrList);
|
||||
dataMap.put("NTC_HTTP_RES_HDR", httpResHdrList);
|
||||
dataMap.put("NTC_HTTP_REQ_BODY", httpReqBodyList);
|
||||
dataMap.put("NTC_HTTP_RES_BODY", httpResBodyList);
|
||||
dataMap.put("NTC_UNIVERSAL_IP", ipPortList);
|
||||
dataMap.put("NTC_SUBSCRIBE_ID",subscribeIdList);
|
||||
|
||||
/*}*/
|
||||
this._export(model, request, response, redirectAttributes,entity.getMenuNameCode(),titleList,classMap,dataMap,noExportMap);
|
||||
} catch (Exception e) {
|
||||
logger.error("http export failed",e);
|
||||
addMessage(redirectAttributes, "export_failed");
|
||||
}
|
||||
httpUrlList=BaseStringCfg.replaceBaseKeyList(httpUrlList);
|
||||
httpReqHdrList=ComplexkeywordCfg.replaceComplexKeyList(httpReqHdrList);
|
||||
httpResHdrList=ComplexkeywordCfg.replaceComplexKeyList(httpResHdrList);
|
||||
httpReqBodyList=BaseStringCfg.replaceBaseKeyList(httpReqBodyList);
|
||||
httpResBodyList=BaseStringCfg.replaceBaseKeyList(httpResBodyList);
|
||||
dataMap.put(entity.getMenuNameCode(), page.getList());
|
||||
dataMap.put("NTC_HTTP_URL", httpUrlList);
|
||||
dataMap.put("NTC_HTTP_REQ_HDR", httpReqHdrList);
|
||||
dataMap.put("NTC_HTTP_RES_HDR", httpResHdrList);
|
||||
dataMap.put("NTC_HTTP_REQ_BODY", httpReqBodyList);
|
||||
dataMap.put("NTC_HTTP_RES_BODY", httpResBodyList);
|
||||
dataMap.put("NTC_UNIVERSAL_IP", ipPortList);
|
||||
dataMap.put("NTC_SUBSCRIBE_ID",subscribeIdList);
|
||||
|
||||
/*}*/
|
||||
this._export(model, request, response, redirectAttributes,entity.getMenuNameCode(),titleList,classMap,dataMap,noExportMap);
|
||||
} catch (Exception e) {
|
||||
logger.error("http export failed",e);
|
||||
addMessage(redirectAttributes, "export_failed");
|
||||
}
|
||||
return "redirect:" + adminPath +"/ntc/website/httpList?functionId="+entity.getFunctionId();
|
||||
}
|
||||
return "redirect:" + adminPath +"/ntc/website/httpList?functionId="+entity.getFunctionId();
|
||||
}
|
||||
|
||||
//dns配置导出
|
||||
@RequestMapping(value = "exportdns")
|
||||
@@ -681,12 +682,16 @@ public class WebsiteController extends BaseController{
|
||||
Properties msgProp = getMsgProp();
|
||||
if(page.getList().get(i).getDnsStrategyId()!=null && page.getList().get(i).getDnsStrategyId()!=0){
|
||||
List<DnsResStrategy> resStrategys=dnsResStrategyService.findDnsResStrategys(page.getList().get(i).getDnsStrategyId(), 1,1);
|
||||
String msg= msgProp.getProperty(resStrategys.get(0).getCfgDesc());
|
||||
if(resStrategys!=null && resStrategys.size()>0){
|
||||
String msg= msgProp.getProperty(resStrategys.get(0).getCfgDesc());
|
||||
if(!StringUtil.isEmpty(msg)){
|
||||
page.getList().get(i).setDnsStrategyName(msg);
|
||||
}else{
|
||||
page.getList().get(i).setDnsStrategyName(resStrategys.get(0).getCfgDesc());
|
||||
}
|
||||
}else{
|
||||
page.getList().get(i).setDnsStrategyName(msgProp.getProperty("no_strategy"));
|
||||
}
|
||||
}else{
|
||||
page.getList().get(i).setDnsStrategyName(msgProp.getProperty("no_strategy"));
|
||||
}
|
||||
@@ -717,7 +722,7 @@ public class WebsiteController extends BaseController{
|
||||
noExportMap.put("NTC_DNS_REGION", regionCfgNoExport);
|
||||
noExportMap.put("NTC_SUBSCRIBE_ID", ntcSubscribeIdCfgNoExport);
|
||||
List<IpPortCfg> ipList=new ArrayList<IpPortCfg>();
|
||||
List<NtcSubscribeIdCfg> subscribeInfoList=new ArrayList<NtcSubscribeIdCfg>();
|
||||
List<BaseStringCfg> subscribeInfoList=new ArrayList<BaseStringCfg>();
|
||||
List<ComplexkeywordCfg> regionInfoList=new ArrayList<ComplexkeywordCfg>();
|
||||
for (CfgIndexInfo cfg : page.getList()) {
|
||||
CfgIndexInfo cfgIndexInfo=websiteCfgService.exportdns(cfg);
|
||||
@@ -725,6 +730,8 @@ public class WebsiteController extends BaseController{
|
||||
subscribeInfoList.addAll(cfgIndexInfo.getNtcSubscribeIdCfgList());
|
||||
regionInfoList.addAll(cfgIndexInfo.getDomainList());
|
||||
}
|
||||
subscribeInfoList=BaseStringCfg.baseHexList(subscribeInfoList);
|
||||
regionInfoList=ComplexkeywordCfg.replaceComplexKeyList(regionInfoList);
|
||||
dataMap.put(entity.getMenuNameCode(), page.getList());
|
||||
dataMap.put("NTC_IP", ipList);
|
||||
dataMap.put("NTC_DNS_REGION", regionInfoList);
|
||||
@@ -805,7 +812,7 @@ public class WebsiteController extends BaseController{
|
||||
List<BaseStringCfg> sslSnaList = new ArrayList<>();
|
||||
List<BaseStringCfg> sslCnList = new ArrayList<>();
|
||||
List<IpPortCfg> ipPortList = new ArrayList<>();
|
||||
List<NtcSubscribeIdCfg> subscribeIdList = new ArrayList<>();
|
||||
List<BaseStringCfg> subscribeIdList = new ArrayList<BaseStringCfg>();
|
||||
for (CfgIndexInfo cfg : page.getList()) {
|
||||
Map<String, List> maps=websiteCfgService.exportssl(cfg);
|
||||
sslSniList.addAll(maps.get("NTC_SSL_SNI"));
|
||||
@@ -817,6 +824,7 @@ public class WebsiteController extends BaseController{
|
||||
sslSniList=BaseStringCfg.replaceBaseKeyList(sslSniList);
|
||||
sslSnaList=BaseStringCfg.replaceBaseKeyList(sslSnaList);
|
||||
sslCnList=BaseStringCfg.replaceBaseKeyList(sslCnList);
|
||||
subscribeIdList=BaseStringCfg.baseHexList(subscribeIdList);
|
||||
dataMap.put(entity.getMenuNameCode(), page.getList());
|
||||
dataMap.put("NTC_UNIVERSAL_IP", ipPortList);
|
||||
dataMap.put("NTC_SSL_SNI", sslSniList);
|
||||
|
||||
@@ -254,117 +254,117 @@ public class WhiteListController extends CommonController{
|
||||
}
|
||||
|
||||
//ip配置导出
|
||||
@RequestMapping(value = "exportIpAddr")
|
||||
public void exportIp(Model model,HttpServletRequest request,HttpServletResponse response,
|
||||
@ModelAttribute("cfg")CfgIndexInfo 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>();
|
||||
|
||||
|
||||
/*//导出选中记录
|
||||
* if(!StringUtil.isEmpty(ids)){
|
||||
for(String id:ids.split(",")){
|
||||
Long.parseLong(id);
|
||||
}
|
||||
//List<CfgIndexInfo> list=ipCfgService.getListByCfgIdWithName(IpPortCfg.getTablename(), entity.getFunctionId(), ids);
|
||||
}else{*/
|
||||
//条件导出数据大于最大导出数,只导出最大导出条数
|
||||
entity.setTableName(IpPortCfg.getTablename());
|
||||
Page<CfgIndexInfo> pageInfo=new Page<CfgIndexInfo>(request, response,"a");
|
||||
if(pageInfo.getCount()>Constants.MAX_EXPORT_SIZE){
|
||||
pageInfo.setPageNo(1);
|
||||
pageInfo.setPageSize(Constants.MAX_EXPORT_SIZE);
|
||||
}else{
|
||||
pageInfo.setPageNo(1);
|
||||
pageInfo.setPageSize(-1);
|
||||
}
|
||||
Page<CfgIndexInfo> page = ipCfgService.getIpCfgList(pageInfo, entity);
|
||||
titleList.add(entity.getMenuNameCode());
|
||||
titleList.add("NTC_IP");
|
||||
classMap.put(entity.getMenuNameCode(), CfgIndexInfo.class);
|
||||
classMap.put("NTC_IP", IpPortCfg.class);
|
||||
String cfgIndexInfoNoExport=",do_log,letter,whether_area_block,classification,attribute,label,group_name,userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
String ipPortInfoNoExport=",protocol,direction,do_log,action,config_describe,valid_identifier,is_audit,creator,creator"
|
||||
+ ",config_time,editor,edit_time,auditor,audit_time"
|
||||
+",letter,whether_area_block,classification,attribute,label"
|
||||
+",userregion1,userregion2,userregion3,userregion4,userregion5,ir_type,group_name,";
|
||||
noExportMap.put(entity.getMenuNameCode(),cfgIndexInfoNoExport);
|
||||
noExportMap.put("NTC_IP", ipPortInfoNoExport);
|
||||
List<IpPortCfg> ipList=new ArrayList<IpPortCfg>();
|
||||
for (CfgIndexInfo cfg : page.getList()) {
|
||||
CfgIndexInfo cfgIndexInfo=ipCfgService.exportIpInfo(cfg);
|
||||
ipList.addAll(cfgIndexInfo.getIpPortList());
|
||||
}
|
||||
dataMap.put(entity.getMenuNameCode(), page.getList());
|
||||
dataMap.put("NTC_IP", ipList);
|
||||
/*}*/
|
||||
this._export(model, request, response, redirectAttributes,entity.getMenuNameCode(),titleList,classMap,dataMap,noExportMap);
|
||||
} catch (Exception e) {
|
||||
logger.error("ip white export failed",e);
|
||||
addMessage(redirectAttributes, "export_failed");
|
||||
}
|
||||
//return "redirect:" + adminPath +"/ntc/iplist/list?functionId="+entity.getFunctionId();
|
||||
}
|
||||
//ip配置导出
|
||||
@RequestMapping(value = "exportdomain")
|
||||
public void exportdomain(Model model,HttpServletRequest request,HttpServletResponse response,
|
||||
@ModelAttribute("cfg")CfgIndexInfo 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>();
|
||||
|
||||
|
||||
/*//导出选中记录
|
||||
* if(!StringUtil.isEmpty(ids)){
|
||||
for(String id:ids.split(",")){
|
||||
Long.parseLong(id);
|
||||
}
|
||||
//List<CfgIndexInfo> list=ipCfgService.getListByCfgIdWithName(IpPortCfg.getTablename(), entity.getFunctionId(), ids);
|
||||
}else{*/
|
||||
//条件导出数据大于最大导出数,只导出最大导出条数
|
||||
entity.setTableName(IpPortCfg.getTablename());
|
||||
Page<CfgIndexInfo> pageInfo=new Page<CfgIndexInfo>(request, response,"a");
|
||||
if(pageInfo.getCount()>Constants.MAX_EXPORT_SIZE){
|
||||
pageInfo.setPageNo(1);
|
||||
pageInfo.setPageSize(Constants.MAX_EXPORT_SIZE);
|
||||
}else{
|
||||
pageInfo.setPageNo(1);
|
||||
pageInfo.setPageSize(-1);
|
||||
}
|
||||
Page<CfgIndexInfo> page = domainService.getDomainList(pageInfo, entity);
|
||||
titleList.add(entity.getMenuNameCode());
|
||||
titleList.add("NTC_HTTP_URL");
|
||||
classMap.put(entity.getMenuNameCode(), CfgIndexInfo.class);
|
||||
classMap.put("NTC_HTTP_URL", HttpUrlCfg.class);
|
||||
String cfgIndexInfoNoExport=",policy_name,group_name,userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
String httpUrlInfoNoExport=",do_log,action,config_describe,valid_identifier,is_audit,creator,creator"
|
||||
+ ",config_time,editor,edit_time,auditor,audit_time"
|
||||
+",letter,whether_area_block,classification,attribute,label"
|
||||
+",userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
noExportMap.put(entity.getMenuNameCode(),cfgIndexInfoNoExport);
|
||||
noExportMap.put("NTC_HTTP_URL", httpUrlInfoNoExport);
|
||||
List<BaseStringCfg> httpurlList=new ArrayList<BaseStringCfg>();
|
||||
for (CfgIndexInfo cfg : page.getList()) {
|
||||
CfgIndexInfo cfgIndexInfo=domainService.exportDomainInfo(cfg);
|
||||
httpurlList.addAll(cfgIndexInfo.getHttpUrlList());
|
||||
}
|
||||
httpurlList=BaseStringCfg.replaceBaseKeyList(httpurlList);
|
||||
dataMap.put(entity.getMenuNameCode(), page.getList());
|
||||
dataMap.put("NTC_HTTP_URL", httpurlList);
|
||||
/*}*/
|
||||
this._export(model, request, response, redirectAttributes,entity.getMenuNameCode(),titleList,classMap,dataMap,noExportMap);
|
||||
} catch (Exception e) {
|
||||
logger.error("ip white export failed",e);
|
||||
addMessage(redirectAttributes, "export_failed");
|
||||
}
|
||||
//return "redirect:" + adminPath +"/ntc/iplist/list?functionId="+entity.getFunctionId();
|
||||
@RequestMapping(value = "exportIpAddr")
|
||||
public void exportIp(Model model,HttpServletRequest request,HttpServletResponse response,
|
||||
@ModelAttribute("cfg")CfgIndexInfo 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>();
|
||||
|
||||
|
||||
/*//导出选中记录
|
||||
* if(!StringUtil.isEmpty(ids)){
|
||||
for(String id:ids.split(",")){
|
||||
Long.parseLong(id);
|
||||
}
|
||||
//List<CfgIndexInfo> list=ipCfgService.getListByCfgIdWithName(IpPortCfg.getTablename(), entity.getFunctionId(), ids);
|
||||
}else{*/
|
||||
//条件导出数据大于最大导出数,只导出最大导出条数
|
||||
entity.setTableName(IpPortCfg.getTablename());
|
||||
Page<CfgIndexInfo> pageInfo=new Page<CfgIndexInfo>(request, response,"a");
|
||||
if(pageInfo.getCount()>Constants.MAX_EXPORT_SIZE){
|
||||
pageInfo.setPageNo(1);
|
||||
pageInfo.setPageSize(Constants.MAX_EXPORT_SIZE);
|
||||
}else{
|
||||
pageInfo.setPageNo(1);
|
||||
pageInfo.setPageSize(-1);
|
||||
}
|
||||
Page<CfgIndexInfo> page = ipCfgService.getIpCfgList(pageInfo, entity);
|
||||
titleList.add(entity.getMenuNameCode());
|
||||
titleList.add("NTC_IP");
|
||||
classMap.put(entity.getMenuNameCode(), CfgIndexInfo.class);
|
||||
classMap.put("NTC_IP", IpPortCfg.class);
|
||||
String cfgIndexInfoNoExport=",policy_name,do_log,letter,whether_area_block,classification,attribute,label,group_name,userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
String ipPortInfoNoExport=",protocol,direction,do_log,action,config_describe,valid_identifier,is_audit,creator,creator"
|
||||
+ ",config_time,editor,edit_time,auditor,audit_time"
|
||||
+",letter,whether_area_block,classification,attribute,label"
|
||||
+",userregion1,userregion2,userregion3,userregion4,userregion5,ir_type,group_name,";
|
||||
noExportMap.put(entity.getMenuNameCode(),cfgIndexInfoNoExport);
|
||||
noExportMap.put("NTC_IP", ipPortInfoNoExport);
|
||||
List<IpPortCfg> ipList=new ArrayList<IpPortCfg>();
|
||||
for (CfgIndexInfo cfg : page.getList()) {
|
||||
CfgIndexInfo cfgIndexInfo=ipCfgService.exportIpInfo(cfg);
|
||||
ipList.addAll(cfgIndexInfo.getIpPortList());
|
||||
}
|
||||
dataMap.put(entity.getMenuNameCode(), page.getList());
|
||||
dataMap.put("NTC_IP", ipList);
|
||||
/*}*/
|
||||
this._export(model, request, response, redirectAttributes,entity.getMenuNameCode(),titleList,classMap,dataMap,noExportMap);
|
||||
} catch (Exception e) {
|
||||
logger.error("ip white export failed",e);
|
||||
addMessage(redirectAttributes, "export_failed");
|
||||
}
|
||||
//return "redirect:" + adminPath +"/ntc/iplist/list?functionId="+entity.getFunctionId();
|
||||
}
|
||||
//ip配置导出
|
||||
@RequestMapping(value = "exportdomain")
|
||||
public void exportdomain(Model model,HttpServletRequest request,HttpServletResponse response,
|
||||
@ModelAttribute("cfg")CfgIndexInfo 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>();
|
||||
|
||||
|
||||
/*//导出选中记录
|
||||
* if(!StringUtil.isEmpty(ids)){
|
||||
for(String id:ids.split(",")){
|
||||
Long.parseLong(id);
|
||||
}
|
||||
//List<CfgIndexInfo> list=ipCfgService.getListByCfgIdWithName(IpPortCfg.getTablename(), entity.getFunctionId(), ids);
|
||||
}else{*/
|
||||
//条件导出数据大于最大导出数,只导出最大导出条数
|
||||
entity.setTableName(IpPortCfg.getTablename());
|
||||
Page<CfgIndexInfo> pageInfo=new Page<CfgIndexInfo>(request, response,"a");
|
||||
if(pageInfo.getCount()>Constants.MAX_EXPORT_SIZE){
|
||||
pageInfo.setPageNo(1);
|
||||
pageInfo.setPageSize(Constants.MAX_EXPORT_SIZE);
|
||||
}else{
|
||||
pageInfo.setPageNo(1);
|
||||
pageInfo.setPageSize(-1);
|
||||
}
|
||||
Page<CfgIndexInfo> page = domainService.getDomainList(pageInfo, entity);
|
||||
titleList.add(entity.getMenuNameCode());
|
||||
titleList.add("NTC_HTTP_URL");
|
||||
classMap.put(entity.getMenuNameCode(), CfgIndexInfo.class);
|
||||
classMap.put("NTC_HTTP_URL", HttpUrlCfg.class);
|
||||
String cfgIndexInfoNoExport=",policy_name,group_name,userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
String httpUrlInfoNoExport=",do_log,action,config_describe,valid_identifier,is_audit,creator,creator"
|
||||
+ ",config_time,editor,edit_time,auditor,audit_time"
|
||||
+",letter,whether_area_block,classification,attribute,label"
|
||||
+",userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
noExportMap.put(entity.getMenuNameCode(),cfgIndexInfoNoExport);
|
||||
noExportMap.put("NTC_HTTP_URL", httpUrlInfoNoExport);
|
||||
List<BaseStringCfg> httpurlList=new ArrayList<BaseStringCfg>();
|
||||
for (CfgIndexInfo cfg : page.getList()) {
|
||||
CfgIndexInfo cfgIndexInfo=domainService.exportDomainInfo(cfg);
|
||||
httpurlList.addAll(cfgIndexInfo.getHttpUrlList());
|
||||
}
|
||||
httpurlList=BaseStringCfg.replaceBaseKeyList(httpurlList);
|
||||
dataMap.put(entity.getMenuNameCode(), page.getList());
|
||||
dataMap.put("NTC_HTTP_URL", httpurlList);
|
||||
/*}*/
|
||||
this._export(model, request, response, redirectAttributes,entity.getMenuNameCode(),titleList,classMap,dataMap,noExportMap);
|
||||
} catch (Exception e) {
|
||||
logger.error("ip white export failed",e);
|
||||
addMessage(redirectAttributes, "export_failed");
|
||||
}
|
||||
//return "redirect:" + adminPath +"/ntc/iplist/list?functionId="+entity.getFunctionId();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -2,7 +2,9 @@ package com.nis.web.controller.configuration.proxy;
|
||||
|
||||
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;
|
||||
@@ -16,9 +18,12 @@ import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||
|
||||
import com.nis.domain.FunctionRegionDict;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.callback.ProxyFileStrategyCfg;
|
||||
import com.nis.domain.configuration.BaseStringCfg;
|
||||
import com.nis.domain.configuration.CfgIndexInfo;
|
||||
import com.nis.domain.configuration.ComplexkeywordCfg;
|
||||
import com.nis.domain.configuration.HttpBodyCfg;
|
||||
import com.nis.domain.configuration.HttpReqHeadCfg;
|
||||
import com.nis.domain.configuration.HttpResHeadCfg;
|
||||
@@ -27,6 +32,7 @@ import com.nis.domain.configuration.IpPortCfg;
|
||||
import com.nis.domain.configuration.NtcSubscribeIdCfg;
|
||||
import com.nis.exceptions.MaatConvertException;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.DictUtils;
|
||||
import com.nis.web.controller.BaseController;
|
||||
import com.nis.web.security.UserUtils;
|
||||
|
||||
@@ -230,4 +236,132 @@ public class HttpRedirectPolicyController extends BaseController{
|
||||
}
|
||||
return "redirect:" + adminPath +"/proxy/control/httpRedirect/httpRedirectList?functionId="+functionId;
|
||||
}
|
||||
|
||||
|
||||
//http配置导出
|
||||
@RequestMapping(value = "exportHttp")
|
||||
public String exportHttp(Model model,HttpServletRequest request,HttpServletResponse response,
|
||||
@ModelAttribute("cfg")CfgIndexInfo 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<FunctionRegionDict> regionList = DictUtils.getFunctionRegionDictList(entity.getFunctionId());
|
||||
|
||||
/*//导出选中记录
|
||||
if(!StringUtil.isEmpty(ids)){
|
||||
for(String id:ids.split(",")){
|
||||
Long.parseLong(id);
|
||||
}
|
||||
//List<CfgIndexInfo> list=ipCfgService.getListByCfgIdWithName(IpPortCfg.getTablename(), entity.getFunctionId(), ids);
|
||||
}else{*/
|
||||
//条件导出数据大于最大导出数,只导出最大导出条数
|
||||
Page<CfgIndexInfo> pageInfo=new Page<CfgIndexInfo>(request, response,"a");
|
||||
if(pageInfo.getCount()>Constants.MAX_EXPORT_SIZE){
|
||||
pageInfo.setPageNo(1);
|
||||
pageInfo.setPageSize(Constants.MAX_EXPORT_SIZE);
|
||||
}else{
|
||||
pageInfo.setPageNo(1);
|
||||
pageInfo.setPageSize(-1);
|
||||
}
|
||||
Page<CfgIndexInfo> page = httpRedirectCfgService.getHttpRedirectList(pageInfo, entity);
|
||||
String cfgIndexInfoNoExport=",policy_name,group_name,userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
String httpUrlCfgNoExport=",do_log,action,config_describe,valid_identifier,is_audit,creator,creator"
|
||||
+ ",config_time,editor,edit_time,auditor,audit_time"
|
||||
+",letter,whether_area_block,classification,attribute,label"
|
||||
+",userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
String httpReqHeadCfgNoExport=",do_log,action,config_describe,valid_identifier,is_audit,creator,creator"
|
||||
+ ",config_time,editor,edit_time,auditor,audit_time"
|
||||
+",letter,whether_area_block,classification,attribute,label"
|
||||
+",userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
String httpResHeadCfgNoExport=",do_log,action,config_describe,valid_identifier,is_audit,creator,creator"
|
||||
+ ",config_time,editor,edit_time,auditor,audit_time"
|
||||
+",letter,whether_area_block,classification,attribute,label"
|
||||
+",userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
String httpReqBodyCfgNoExport=",do_log,action,config_describe,valid_identifier,is_audit,creator,creator"
|
||||
+ ",config_time,editor,edit_time,auditor,audit_time"
|
||||
+",letter,whether_area_block,classification,attribute,label"
|
||||
+",userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
String httpResBodyCfgNoExport=",do_log,action,config_describe,valid_identifier,is_audit,creator,creator"
|
||||
+ ",config_time,editor,edit_time,auditor,audit_time"
|
||||
+",letter,whether_area_block,classification,attribute,label"
|
||||
+",userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
String ipPortCfgNoExport=",do_log,action,config_describe,valid_identifier,is_audit,creator,creator"
|
||||
+ ",config_time,editor,edit_time,auditor,audit_time"
|
||||
+",letter,whether_area_block,classification,attribute,label"
|
||||
+",userregion1,userregion2,userregion3,userregion4,userregion5,ir_type,group_name,";
|
||||
String ntcSubscribeIdCfgNoExport=",do_log,action,config_describe,valid_identifier,is_audit,creator,creator"
|
||||
+ ",config_time,editor,edit_time,auditor,audit_time"
|
||||
+",letter,whether_area_block,classification,attribute,label"
|
||||
+",userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
List<BaseStringCfg> httpUrlList = new ArrayList<>();
|
||||
List<ComplexkeywordCfg> httpReqHdrList = new ArrayList<>();
|
||||
List<ComplexkeywordCfg> httpResHdrList = new ArrayList<>();
|
||||
List<BaseStringCfg> httpReqBodyList = new ArrayList<>();
|
||||
List<BaseStringCfg> httpResBodyList = new ArrayList<>();
|
||||
List<IpPortCfg> ipPortList = new ArrayList<>();
|
||||
List<BaseStringCfg> subscribeIdList = new ArrayList<>();
|
||||
for (CfgIndexInfo cfg : page.getList()) {
|
||||
Map<String, List> maps=httpRedirectCfgService.exportHttpCfg(cfg);
|
||||
httpUrlList.addAll(maps.get("NTC_HTTP_URL"));
|
||||
httpReqHdrList.addAll(maps.get("NTC_HTTP_REQ_HDR"));
|
||||
httpResHdrList.addAll(maps.get("NTC_HTTP_RES_HDR"));
|
||||
httpReqBodyList.addAll(maps.get("NTC_HTTP_REQ_BODY"));
|
||||
httpResBodyList.addAll(maps.get("NTC_HTTP_RES_BODY"));
|
||||
ipPortList.addAll(maps.get("NTC_UNIVERSAL_IP"));
|
||||
subscribeIdList.addAll(maps.get("NTC_SUBSCRIBE_ID"));
|
||||
}
|
||||
httpUrlList=BaseStringCfg.replaceBaseKeyList(httpUrlList);
|
||||
httpReqHdrList=ComplexkeywordCfg.replaceComplexKeyList(httpReqHdrList);
|
||||
httpResHdrList=ComplexkeywordCfg.replaceComplexKeyList(httpResHdrList);
|
||||
httpReqBodyList=BaseStringCfg.replaceBaseKeyList(httpReqBodyList);
|
||||
httpResBodyList=BaseStringCfg.replaceBaseKeyList(httpResBodyList);
|
||||
subscribeIdList=BaseStringCfg.baseHexList(subscribeIdList);
|
||||
titleList.add(entity.getMenuNameCode());
|
||||
titleList.add("NTC_HTTP_URL");
|
||||
titleList.add("NTC_HTTP_REQ_HDR");
|
||||
classMap.put(entity.getMenuNameCode(), CfgIndexInfo.class);
|
||||
classMap.put("NTC_HTTP_URL", HttpUrlCfg.class);
|
||||
classMap.put("NTC_HTTP_REQ_HDR", HttpReqHeadCfg.class);
|
||||
noExportMap.put(entity.getMenuNameCode(),cfgIndexInfoNoExport);
|
||||
noExportMap.put("NTC_HTTP_URL", httpUrlCfgNoExport);
|
||||
noExportMap.put("NTC_HTTP_REQ_HDR", httpReqHeadCfgNoExport);
|
||||
dataMap.put(entity.getMenuNameCode(), page.getList());
|
||||
dataMap.put("NTC_HTTP_URL", httpUrlList);
|
||||
dataMap.put("NTC_HTTP_REQ_HDR", httpReqHdrList);
|
||||
if(entity.getFunctionId()!=208 && entity.getFunctionId()!=211){
|
||||
titleList.add("NTC_HTTP_RES_BODY");
|
||||
classMap.put("NTC_HTTP_RES_BODY", HttpBodyCfg.class);
|
||||
noExportMap.put("NTC_HTTP_RES_BODY", httpResBodyCfgNoExport);
|
||||
dataMap.put("NTC_HTTP_RES_BODY", httpResBodyList);
|
||||
}else if(entity.getFunctionId()!=211){
|
||||
titleList.add("NTC_HTTP_RES_HDR");
|
||||
titleList.add("NTC_HTTP_REQ_BODY");
|
||||
classMap.put("NTC_HTTP_RES_HDR", HttpResHeadCfg.class);
|
||||
classMap.put("NTC_HTTP_REQ_BODY", HttpBodyCfg.class);
|
||||
noExportMap.put("NTC_HTTP_RES_HDR", httpResHeadCfgNoExport);
|
||||
noExportMap.put("NTC_HTTP_REQ_BODY", httpReqBodyCfgNoExport);
|
||||
dataMap.put("NTC_HTTP_RES_HDR", httpResHdrList);
|
||||
dataMap.put("NTC_HTTP_REQ_BODY", httpReqBodyList);
|
||||
}
|
||||
titleList.add("NTC_UNIVERSAL_IP");
|
||||
titleList.add("NTC_SUBSCRIBE_ID");
|
||||
classMap.put("NTC_UNIVERSAL_IP", IpPortCfg.class);
|
||||
classMap.put("NTC_SUBSCRIBE_ID", NtcSubscribeIdCfg.class);
|
||||
noExportMap.put("NTC_UNIVERSAL_IP", ipPortCfgNoExport);
|
||||
noExportMap.put("NTC_SUBSCRIBE_ID", ntcSubscribeIdCfgNoExport);
|
||||
dataMap.put("NTC_UNIVERSAL_IP", ipPortList);
|
||||
dataMap.put("NTC_SUBSCRIBE_ID",subscribeIdList);
|
||||
|
||||
/*}*/
|
||||
this._export(model, request, response, redirectAttributes,entity.getMenuNameCode(),titleList,classMap,dataMap,noExportMap);
|
||||
} catch (Exception e) {
|
||||
logger.error("http export failed",e);
|
||||
addMessage(redirectAttributes, "export_failed");
|
||||
}
|
||||
return "redirect:" + adminPath +"/ntc/website/httpList?functionId="+entity.getFunctionId();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@ import com.nis.domain.Page;
|
||||
import com.nis.domain.SysUser;
|
||||
import com.nis.domain.configuration.BaseStringCfg;
|
||||
import com.nis.domain.configuration.CfgIndexInfo;
|
||||
import com.nis.domain.configuration.HttpUrlCfg;
|
||||
import com.nis.domain.configuration.InterceptPktBin;
|
||||
import com.nis.domain.configuration.IpPortCfg;
|
||||
import com.nis.domain.configuration.PxyObjKeyring;
|
||||
@@ -218,12 +219,8 @@ public class InterceptController extends CommonController{
|
||||
}
|
||||
Page<CfgIndexInfo> page = ipCfgService.getIpCfgList(pageInfo, entity);
|
||||
titleList.add(entity.getMenuNameCode());
|
||||
titleList.add("PXY_INTERCEPT_IP");
|
||||
titleList.add("PXY_INTERCEPT_PKT_BIN");
|
||||
classMap.put(entity.getMenuNameCode(), CfgIndexInfo.class);
|
||||
classMap.put("PXY_INTERCEPT_IP", IpPortCfg.class);
|
||||
classMap.put("PXY_INTERCEPT_PKT_BIN", InterceptPktBin.class);
|
||||
String cfgIndexInfoNoExport=",group_name,userregion4,userregion5,";
|
||||
String cfgIndexInfoNoExport=",policy_name,group_name,userregion4,userregion5,";
|
||||
String ipPortInfoNoExport=",do_log,action,config_describe,valid_identifier,is_audit,creator,creator"
|
||||
+ ",config_time,editor,edit_time,auditor,audit_time"
|
||||
+",letter,whether_area_block,classification,attribute,label"
|
||||
@@ -232,25 +229,43 @@ public class InterceptController extends CommonController{
|
||||
+ ",config_time,editor,edit_time,auditor,audit_time"
|
||||
+",letter,whether_area_block,classification,attribute,label"
|
||||
+",userregion1,userregion2,userregion3,userregion4,userregion5,ir_type,group_name,";
|
||||
String httpUrlCfgNoExport=",do_log,action,config_describe,valid_identifier,is_audit,creator,creator"
|
||||
+ ",config_time,editor,edit_time,auditor,audit_time"
|
||||
+",letter,whether_area_block,classification,attribute,label"
|
||||
+",userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
noExportMap.put(entity.getMenuNameCode(),cfgIndexInfoNoExport);
|
||||
noExportMap.put("PXY_INTERCEPT_IP", ipPortInfoNoExport);
|
||||
noExportMap.put("PXY_INTERCEPT_PKT_BIN", interceptNoExport);
|
||||
List<IpPortCfg> ipList=new ArrayList<IpPortCfg>();
|
||||
List<BaseStringCfg> interInfoList=new ArrayList<BaseStringCfg>();
|
||||
List<BaseStringCfg> httpUrlList=new ArrayList<BaseStringCfg>();
|
||||
List<BaseStringCfg> pktBinList=new ArrayList<BaseStringCfg>();
|
||||
for (CfgIndexInfo cfg : page.getList()) {
|
||||
CfgIndexInfo cfgIndexInfo=interceptCfgService.exportIpInfo(cfg);
|
||||
if(cfgIndexInfo.getIpPortList()!=null){
|
||||
ipList.addAll(cfgIndexInfo.getIpPortList());
|
||||
}
|
||||
if(cfgIndexInfo.getInterceptPktBinList()!=null){
|
||||
interInfoList.addAll(cfgIndexInfo.getInterceptPktBinList());
|
||||
}
|
||||
Map<String, List> maps=interceptCfgService.exportIpInfo(cfg);
|
||||
httpUrlList.addAll(maps.get("NTC_HTTP_URL"));
|
||||
ipList.addAll(maps.get("PXY_INTERCEPT_IP"));
|
||||
pktBinList.addAll(maps.get("PXY_INTERCEPT_PKT_BIN"));
|
||||
}
|
||||
interInfoList=BaseStringCfg.replaceBaseKeyList(interInfoList);
|
||||
pktBinList=BaseStringCfg.replaceBaseKeyList(pktBinList);
|
||||
httpUrlList=BaseStringCfg.baseHexList(httpUrlList);
|
||||
dataMap.put(entity.getMenuNameCode(), page.getList());
|
||||
dataMap.put("PXY_INTERCEPT_IP", ipList);
|
||||
dataMap.put("PXY_INTERCEPT_PKT_BIN", interInfoList);
|
||||
|
||||
if(entity.getFunctionId()==212){ //IP Payload
|
||||
titleList.add("PXY_INTERCEPT_IP");
|
||||
titleList.add("PXY_INTERCEPT_PKT_BIN");
|
||||
classMap.put("PXY_INTERCEPT_IP", IpPortCfg.class);
|
||||
classMap.put("PXY_INTERCEPT_PKT_BIN", InterceptPktBin.class);
|
||||
noExportMap.put("PXY_INTERCEPT_IP", ipPortInfoNoExport);
|
||||
noExportMap.put("PXY_INTERCEPT_PKT_BIN", interceptNoExport);
|
||||
dataMap.put("PXY_INTERCEPT_IP", ipList);
|
||||
dataMap.put("PXY_INTERCEPT_PKT_BIN", pktBinList);
|
||||
}else if(entity.getFunctionId()==200){//IP拦截
|
||||
titleList.add("PXY_INTERCEPT_IP");
|
||||
classMap.put("PXY_INTERCEPT_IP", IpPortCfg.class);
|
||||
noExportMap.put("PXY_INTERCEPT_IP", ipPortInfoNoExport);
|
||||
dataMap.put("PXY_INTERCEPT_IP", ipList);
|
||||
}else if(entity.getFunctionId()==201){//域名拦截
|
||||
titleList.add("NTC_HTTP_URL");
|
||||
classMap.put("NTC_HTTP_URL", HttpUrlCfg.class);
|
||||
noExportMap.put("NTC_HTTP_URL", httpUrlCfgNoExport);
|
||||
dataMap.put("NTC_HTTP_URL", httpUrlList);
|
||||
}
|
||||
/*}*/
|
||||
this._export(model, request, response, redirectAttributes,entity.getMenuNameCode(),titleList,classMap,dataMap,noExportMap);
|
||||
} catch (Exception e) {
|
||||
|
||||
@@ -6,7 +6,9 @@ import java.security.KeyStore;
|
||||
import java.security.Principal;
|
||||
import java.security.SecureRandom;
|
||||
import java.security.cert.X509Certificate;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
@@ -30,6 +32,8 @@ import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.basics.PolicyGroupInfo;
|
||||
import com.nis.domain.configuration.DnsResStrategy;
|
||||
import com.nis.domain.configuration.IpPortCfg;
|
||||
import com.nis.domain.configuration.PxyObjKeyring;
|
||||
import com.nis.domain.maat.ToMaatResult;
|
||||
import com.nis.domain.maat.ToMaatResult.ResponseData;
|
||||
@@ -288,4 +292,53 @@ public class PxyObjKeyringController extends BaseController {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//pxyObjKeyring配置导出
|
||||
@RequestMapping(value = "exportPxy")
|
||||
public void exportDns(Model model,HttpServletRequest request,HttpServletResponse response,
|
||||
@ModelAttribute("cfg")PxyObjKeyring 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>();
|
||||
|
||||
|
||||
/*//导出选中记录
|
||||
* if(!StringUtil.isEmpty(ids)){
|
||||
for(String id:ids.split(",")){
|
||||
Long.parseLong(id);
|
||||
}
|
||||
//List<CfgIndexInfo> list=ipCfgService.getListByCfgIdWithName(IpPortCfg.getTablename(), entity.getFunctionId(), ids);
|
||||
}else{*/
|
||||
//条件导出数据大于最大导出数,只导出最大导出条数
|
||||
entity.setTableName(IpPortCfg.getTablename());
|
||||
Page<PxyObjKeyring> pageInfo=new Page<PxyObjKeyring>(request, response,"r");
|
||||
if(pageInfo.getCount()>Constants.MAX_EXPORT_SIZE){
|
||||
pageInfo.setPageNo(1);
|
||||
pageInfo.setPageSize(Constants.MAX_EXPORT_SIZE);
|
||||
}else{
|
||||
pageInfo.setPageNo(1);
|
||||
pageInfo.setPageSize(-1);
|
||||
}
|
||||
Page<PxyObjKeyring> page = pxyObjKeyringService.findPage(pageInfo, entity);
|
||||
for (int i = 0; i <page.getList().size(); i++) {
|
||||
page.getList().get(i).setKeyringName(page.getList().get(i).getCfgDesc());
|
||||
}
|
||||
model.addAttribute("page", page);
|
||||
titleList.add(entity.getMenuNameCode());
|
||||
classMap.put(entity.getMenuNameCode(), PxyObjKeyring.class);
|
||||
String cfgIndexInfoNoExport=",config_describe,whether_area_block,action,valid_identifier,do_log,client_port,ir_type,group_name,userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
noExportMap.put(entity.getMenuNameCode(),cfgIndexInfoNoExport);
|
||||
dataMap.put(entity.getMenuNameCode(), page.getList());
|
||||
/*}*/
|
||||
this._export(model, request, response, redirectAttributes,entity.getMenuNameCode(),titleList,classMap,dataMap,noExportMap);
|
||||
} catch (Exception e) {
|
||||
logger.error("pxyObjKeyring export failed",e);
|
||||
addMessage(redirectAttributes, "export_failed");
|
||||
}
|
||||
//return "redirect:" + adminPath +"/ntc/iplist/list?functionId="+entity.getFunctionId();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.nis.web.service.configuration;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -17,7 +18,12 @@ import com.nis.domain.configuration.AppFeatureIndex;
|
||||
import com.nis.domain.configuration.AppHttpCfg;
|
||||
import com.nis.domain.configuration.AppIpCfg;
|
||||
import com.nis.domain.configuration.AppStringFeatureCfg;
|
||||
import com.nis.domain.configuration.CfgIndexInfo;
|
||||
import com.nis.domain.configuration.HttpUrlCfg;
|
||||
import com.nis.domain.configuration.IpPortCfg;
|
||||
import com.nis.domain.configuration.NtcSubscribeIdCfg;
|
||||
import com.nis.domain.configuration.P2pHashCfg;
|
||||
import com.nis.domain.configuration.P2pKeywordCfg;
|
||||
import com.nis.domain.maat.MaatCfg;
|
||||
import com.nis.domain.maat.MaatCfg.DigestCfg;
|
||||
import com.nis.domain.maat.MaatCfg.GroupCfg;
|
||||
@@ -29,6 +35,7 @@ import com.nis.domain.maat.ToMaatResult;
|
||||
import com.nis.exceptions.MaatConvertException;
|
||||
import com.nis.util.ConfigServiceUtil;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.DictUtils;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.web.dao.configuration.AppMultiFeatureCfgDao;
|
||||
import com.nis.web.security.UserUtils;
|
||||
@@ -300,4 +307,14 @@ public class AppMultiFeatureCfgService extends BaseService {
|
||||
public List<AppIpCfg> getAppIpRangeCfg(Integer compileId,Integer functionId){
|
||||
return appMultiFeatureCfgDao.getAppIpRangeCfg(compileId,functionId);
|
||||
}
|
||||
|
||||
public Map<String, List> exportFeature(AppFeatureIndex entity){
|
||||
Map<String, List> dataMap=new HashMap<String, List>();
|
||||
List<AppIpCfg> ipRangeList = appMultiFeatureCfgDao.getAppIpRangeCfg(entity.getCompileId(),entity.getFunctionId());
|
||||
List<AppComplexFeatureCfg> appKeyList = appMultiFeatureCfgDao.getAppComplexFeatureCfg(entity.getCompileId(),entity.getFunctionId(),null);
|
||||
dataMap.put("APP_KEYWORDS", appKeyList);
|
||||
dataMap.put("APP_IP_RANGE", ipRangeList);
|
||||
return dataMap;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -89,6 +89,8 @@ public class FileTransferCfgService extends CrudService<FileTransferCfgDao,CfgIn
|
||||
return entity;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public Map<String, List> exportftp(CfgIndexInfo entity){
|
||||
Map<String, List> dataMap=new HashMap<String, List>();
|
||||
List<IpPortCfg> ipPortList = fileTransferCfgDao.getIpPortList(entity);
|
||||
@@ -694,6 +696,11 @@ public class FileTransferCfgService extends CrudService<FileTransferCfgDao,CfgIn
|
||||
ipPortList.get(i).setUserRegion1(DictUtils.getDictLabel("P2P_IP_TYPE",ipPortList.get(i).getUserRegion1()));
|
||||
}
|
||||
List<P2pHashCfg> hashList = fileTransferCfgDao.getP2pHashList(entity);
|
||||
for (int i = 0; i < hashList.size(); i++) {
|
||||
BaseStringCfg base =hashList.get(i);
|
||||
if(!StringUtil.isEmpty(base.getUserRegion1()))
|
||||
base.setUserRegion1(DictUtils.getDictLabel("P2P_HASH_TYPE",base.getUserRegion1()));
|
||||
}
|
||||
List<P2pKeywordCfg> keywordList = fileTransferCfgDao.getP2pKeywordList(entity);
|
||||
List<NtcSubscribeIdCfg> subscribeIdList = fileTransferCfgDao.getP2pSubscribeidList(entity);
|
||||
dataMap.put("NTC_SUBSCRIBE_ID", subscribeIdList);
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.nis.web.service.configuration;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -73,6 +74,27 @@ public class HttpRedirectCfgService extends CrudService<WebsiteCfgDao,CfgIndexIn
|
||||
return entity;
|
||||
}
|
||||
|
||||
public Map<String, List> exportHttpCfg(CfgIndexInfo entity){
|
||||
Map<String, List> dataMap=new HashMap<String, List>();
|
||||
List<HttpUrlCfg> httpUrlList = websiteCfgDao.getHttpUrlList(entity);
|
||||
List<HttpReqHeadCfg> httpReqHdrList = websiteCfgDao.getHttpReqHdrList(entity);
|
||||
List<HttpResHeadCfg> httpResHdrList = websiteCfgDao.getHttpResHdrList(entity);
|
||||
List<IpPortCfg> ipPortCfgList = websiteCfgDao.getIpPortList(entity);
|
||||
entity.setCfgType(Constants.HTTP_REDIRECT_REQ_BODY_REGION);
|
||||
List<HttpBodyCfg> httpReqBodyList = websiteCfgDao.getHttpReqBodyList(entity);
|
||||
entity.setCfgType(Constants.HTTP_REDIRECT_RES_BODY_REGION);
|
||||
List<HttpBodyCfg> httpResBodyList = websiteCfgDao.getHttpResBodyList(entity);
|
||||
List<NtcSubscribeIdCfg> subscribeIdList = stringCfgDao.findSubscribeIdCfgListByCfgIndexInfo(entity);
|
||||
dataMap.put("NTC_UNIVERSAL_IP", ipPortCfgList);
|
||||
dataMap.put("NTC_HTTP_URL", httpUrlList);
|
||||
dataMap.put("NTC_HTTP_REQ_HDR", httpReqHdrList);
|
||||
dataMap.put("NTC_HTTP_RES_HDR", httpResHdrList);
|
||||
dataMap.put("NTC_HTTP_REQ_BODY", httpReqBodyList);
|
||||
dataMap.put("NTC_HTTP_RES_BODY", httpResBodyList);
|
||||
dataMap.put("NTC_SUBSCRIBE_ID", subscribeIdList);
|
||||
return dataMap;
|
||||
}
|
||||
|
||||
public Page<CfgIndexInfo> getHttpRedirectList(Page<CfgIndexInfo> page, CfgIndexInfo entity){
|
||||
// 生成数据权限过滤条件(dsf为dataScopeFilter的简写,在xml中使用 ${sqlMap.dsf}调用权限SQL)
|
||||
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"a"));
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.nis.web.service.configuration;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -70,22 +71,19 @@ public class InterceptCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo>
|
||||
return page;
|
||||
}
|
||||
/**
|
||||
* 保存dns配置
|
||||
* 保存ip拦截
|
||||
* @param entity
|
||||
*/
|
||||
|
||||
public CfgIndexInfo exportIpInfo(CfgIndexInfo entity){
|
||||
public Map<String, List> exportIpInfo(CfgIndexInfo entity){
|
||||
Map<String, List> dataMap=new HashMap<String, List>();
|
||||
List<IpPortCfg> ipPortList = websiteCfgDao.getIpPortList(entity);
|
||||
if(ipPortList!=null){
|
||||
entity.setIpPortList(ipPortList);
|
||||
}
|
||||
if(entity.getFunctionId()!=null) {
|
||||
List<InterceptPktBin> info=interceptCfgDao.getInterceptPktBin(entity);
|
||||
if(info!=null){
|
||||
entity.setInterceptPktBinList(info);
|
||||
}
|
||||
}
|
||||
return entity;
|
||||
List<InterceptPktBin> info = interceptCfgDao.getInterceptPktBin(entity);
|
||||
List<HttpUrlCfg> httpUrlList = websiteCfgDao.getHttpUrlList(entity);
|
||||
dataMap.put("PXY_INTERCEPT_IP", ipPortList);
|
||||
dataMap.put("NTC_HTTP_URL", httpUrlList);
|
||||
dataMap.put("PXY_INTERCEPT_PKT_BIN", info);
|
||||
return dataMap;
|
||||
}
|
||||
|
||||
public void saveInterceptCfg(List<BaseStringCfg<?>> interceptPktBins){
|
||||
@@ -157,7 +155,6 @@ public class InterceptCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo>
|
||||
|
||||
|
||||
}else{
|
||||
|
||||
entity.setEditTime(new Date());
|
||||
entity.setEditorId(entity.getCurrentUser().getId());
|
||||
|
||||
|
||||
@@ -126,6 +126,7 @@
|
||||
<shiro:hasPermission name="app:domain:config">
|
||||
<sys:delRow url="${ctx}/app/domainCfgForm" id="contentTable" label="update"></sys:delRow>
|
||||
<sys:delRow url="${ctx}/app/updateAppDomainCfgValid?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
|
||||
<sys:delRow url="${ctx}/app/exportDomain?functionId=${cfg.functionId }" searchUrl="${ctx}/app/domainCfgList?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="export"></sys:delRow>
|
||||
</shiro:hasPermission>
|
||||
<shiro:hasPermission name="app:domain:confirm">
|
||||
<div class="btn-group">
|
||||
|
||||
@@ -126,6 +126,7 @@
|
||||
<shiro:hasPermission name="app:http:config">
|
||||
<sys:delRow url="${ctx}/app/httpCfgForm" id="contentTable" label="update"></sys:delRow>
|
||||
<sys:delRow url="${ctx}/app/updateAppHttpCfgValid?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
|
||||
<sys:delRow url="${ctx}/app/exportAppHttp?functionId=${cfg.functionId }" searchUrl="${ctx}/app/httpCfgList?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="export"></sys:delRow>
|
||||
</shiro:hasPermission>
|
||||
<shiro:hasPermission name="app:http:confirm">
|
||||
<div class="btn-group">
|
||||
|
||||
@@ -130,6 +130,7 @@
|
||||
<shiro:hasPermission name="app:ip:config">
|
||||
<sys:delRow url="${ctx}/app/ipCfgForm" id="contentTable" label="update"></sys:delRow>
|
||||
<sys:delRow url="${ctx}/app/updateAppIpCfgValid?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
|
||||
<sys:delRow url="${ctx}/app/exportAppIp?functionId=${cfg.functionId }" searchUrl="${ctx}/app/ipCfgList?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="export"></sys:delRow>
|
||||
</shiro:hasPermission>
|
||||
<shiro:hasPermission name="app:ip:confirm">
|
||||
<div class="btn-group">
|
||||
|
||||
@@ -176,6 +176,7 @@
|
||||
<shiro:hasPermission name="${configPermissionName }">
|
||||
<sys:delRow url="${ctx}/app/feature/multiFeatureCfgForm" id="contentTable" label="update"></sys:delRow>
|
||||
<sys:delRow url="${ctx}/app/feature/updateAppFeatureCfgValid?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
|
||||
<sys:delRow url="${ctx}/app/feature/exportFeature?functionId=${cfg.functionId }" searchUrl="${ctx}/app/feature/multiFeatureCfgList?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="export"></sys:delRow>
|
||||
</shiro:hasPermission>
|
||||
<shiro:hasPermission name="${confirmPermissionName }">
|
||||
<div class="btn-group">
|
||||
|
||||
@@ -126,6 +126,7 @@
|
||||
<shiro:hasPermission name="app:ssl:config">
|
||||
<sys:delRow url="${ctx}/app/sslCfgForm" id="contentTable" label="update"></sys:delRow>
|
||||
<sys:delRow url="${ctx}/app/updateAppSslCfgValid?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
|
||||
<sys:delRow url="${ctx}/app/exportAppSsl?functionId=${cfg.functionId }" searchUrl="${ctx}/app/sslCfgList?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="export"></sys:delRow>
|
||||
</shiro:hasPermission>
|
||||
<shiro:hasPermission name="app:ssl:confirm">
|
||||
<div class="btn-group">
|
||||
|
||||
@@ -123,6 +123,7 @@
|
||||
<shiro:hasPermission name="app:topic:config">
|
||||
<sys:delRow url="${ctx}/app/topicDomainCfgForm" id="contentTable" label="update"></sys:delRow>
|
||||
<sys:delRow url="${ctx}/app/updateAppTopicDomainCfgValid?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
|
||||
<sys:delRow url="${ctx}/app/exportTop?functionId=${cfg.functionId }" searchUrl="${ctx}/app/topicDomainCfgList?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="export"></sys:delRow>
|
||||
</shiro:hasPermission>
|
||||
<shiro:hasPermission name="app:domain:confirm">
|
||||
<div class="btn-group">
|
||||
|
||||
@@ -129,8 +129,8 @@
|
||||
<shiro:hasPermission name="avFileSample:config">
|
||||
<sys:delRow url="${ctx}/ntc/av/sample/fileSampleForm" id="contentTable" label="update"></sys:delRow>
|
||||
<sys:delRow url="${ctx}/ntc/av/sample/updateAvFileSampleValid?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
|
||||
<sys:delRow url="${ctx}/ntc/av/exportYsp?functionId=${cfg.functionId }" searchUrl="${ctx}/ntc/av/sample/fileSampleList?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="export"></sys:delRow>
|
||||
</shiro:hasPermission>
|
||||
<%-- <sys:delRow url="${ctx}/ntc/av/exportYsp?functionId=${cfg.functionId }" searchUrl="${ctx}/ntc/av/sample/fileSampleList?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="export"></sys:delRow>
|
||||
--%> </shiro:hasPermission>
|
||||
<shiro:hasPermission name="avFileSample:confirm">
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
|
||||
@@ -135,6 +135,7 @@
|
||||
<shiro:hasPermission name="dns:fake:ip:config">
|
||||
<sys:delRow url="${ctx}/cfg/dnsIp/form" id="contentTable" label="update"></sys:delRow>
|
||||
<sys:delRow url="${ctx}/cfg/dnsIp/delete?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
|
||||
<sys:delRow url="${ctx}/cfg/dnsIp/exportDnsIp?functionId=${cfg.functionId }" searchUrl="${ctx}/cfg/dnsIp/list?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="export"></sys:delRow>
|
||||
</shiro:hasPermission>
|
||||
<shiro:hasPermission name="dns:fake:ip:confirm">
|
||||
<div class="btn-group">
|
||||
|
||||
@@ -166,8 +166,8 @@
|
||||
<shiro:hasPermission name="fileTransfer:fileDigest:config">
|
||||
<sys:delRow url="${ctx}/ntc/fileTransfer/fileDigestForm" id="contentTable" label="update"></sys:delRow>
|
||||
<sys:delRow url="${ctx}/ntc/fileTransfer/updateFileDigestValid?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
|
||||
<sys:delRow url="${ctx}/ntc/fileTransfer/exportFile?functionId=${cfg.functionId }" searchUrl="${ctx}/ntc/fileTransfer/fileDigestList?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="export"></sys:delRow>
|
||||
</shiro:hasPermission>
|
||||
<%-- <sys:delRow url="${ctx}/ntc/fileTransfer/exportFile?functionId=${cfg.functionId }" searchUrl="${ctx}/ntc/fileTransfer/fileDigestList?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="export"></sys:delRow>
|
||||
--%> </shiro:hasPermission>
|
||||
<shiro:hasPermission name="fileTransfer:fileDigest:confirm">
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
|
||||
@@ -115,6 +115,7 @@
|
||||
<shiro:hasPermission name="proxy:intercept:config">
|
||||
<sys:delRow url="${ctx}/proxy/intercept/strateagy/form" id="contentTable" label="update"></sys:delRow>
|
||||
<sys:delRow url="${ctx}/proxy/intercept/strateagy/delete?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
|
||||
<sys:delRow url="${ctx}/proxy/intercept/strateagy/exportPxy?functionId=${cfg.functionId }" searchUrl="${ctx}/proxy/intercept/strateagy/list?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="export"></sys:delRow>
|
||||
</shiro:hasPermission>
|
||||
<shiro:hasPermission name="proxy:intercept:confirm">
|
||||
<div class="btn-group">
|
||||
|
||||
@@ -120,6 +120,7 @@
|
||||
<shiro:hasPermission name="dns:res:strategy:config">
|
||||
<sys:delRow url="${ctx}/maintenance/dnsResStrategy/form" id="contentTable" label="update"></sys:delRow>
|
||||
<sys:delRow url="${ctx}/maintenance/dnsResStrategy/delete?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
|
||||
<sys:delRow url="${ctx}/maintenance/dnsResStrategy/exportDns?functionId=${cfg.functionId }" searchUrl="${ctx}/maintenance/dnsResStrategy/list?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="export"></sys:delRow>
|
||||
</shiro:hasPermission>
|
||||
<shiro:hasPermission name="dns:res:strategy:confirm">
|
||||
<div class="btn-group">
|
||||
|
||||
@@ -354,6 +354,7 @@
|
||||
<shiro:hasPermission name="${configPermissionName }">
|
||||
<sys:delRow url="${ctx}/proxy/control/httpRedirect/form" id="contentTable" label="update"></sys:delRow>
|
||||
<sys:delRow url="${ctx}/proxy/control/httpRedirect/delete?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
|
||||
<sys:delRow url="${ctx}/proxy/control/httpRedirect/exportHttp?functionId=${cfg.functionId }" id="contentTable" searchUrl="${actionPath }" label="export"></sys:delRow>
|
||||
</shiro:hasPermission>
|
||||
<shiro:hasPermission name="${confirmPermissionName }">
|
||||
<div class="btn-group">
|
||||
|
||||
Reference in New Issue
Block a user