业务配置增加勾选导出
This commit is contained in:
@@ -292,21 +292,20 @@ public class HttpRedirectPolicyController extends BaseController{
|
||||
|
||||
List<FunctionRegionDict> regionList = DictUtils.getFunctionRegionDictList(entity.getFunctionId());
|
||||
|
||||
/*//导出选中记录
|
||||
if(!StringUtil.isEmpty(ids)){
|
||||
for(String id:ids.split(",")){
|
||||
Long.parseLong(id);
|
||||
List<CfgIndexInfo> ipLists=new ArrayList<CfgIndexInfo>();
|
||||
//导出选中记录
|
||||
if(!StringUtil.isEmpty(ids)){
|
||||
ipLists=ipCfgService.getByIdsList(ids);
|
||||
}else{
|
||||
Page<CfgIndexInfo> pageInfo=new Page<CfgIndexInfo>(request, response,"a");
|
||||
pageInfo.setPageNo(1);
|
||||
pageInfo.setPageSize(Constants.MAX_EXPORT_SIZE);
|
||||
Page<CfgIndexInfo> page = httpRedirectCfgService.getHttpRedirectList(pageInfo, entity);
|
||||
ipLists=page.getList();
|
||||
}
|
||||
//List<CfgIndexInfo> list=ipCfgService.getListByCfgIdWithName(IpPortCfg.getTablename(), entity.getFunctionId(), ids);
|
||||
}else{*/
|
||||
//条件导出数据大于最大导出数,只导出最大导出条数
|
||||
Page<CfgIndexInfo> pageInfo=new Page<CfgIndexInfo>(request, response,"a");
|
||||
pageInfo.setPageNo(1);
|
||||
pageInfo.setPageSize(Constants.MAX_EXPORT_SIZE);
|
||||
|
||||
Page<CfgIndexInfo> page = httpRedirectCfgService.getHttpRedirectList(pageInfo, entity);
|
||||
|
||||
Properties prop = getMsgProp();
|
||||
for (CfgIndexInfo str : page.getList()) {
|
||||
for (CfgIndexInfo str :ipLists) {
|
||||
if(entity.getFunctionId()!=210 && entity.getFunctionId()!=211){
|
||||
String type="RESPONSE_CODE";
|
||||
if(entity.getFunctionId()==207){
|
||||
@@ -377,7 +376,7 @@ public class HttpRedirectPolicyController extends BaseController{
|
||||
List<BaseStringCfg> httpResBodyList = new ArrayList<>();
|
||||
List<IpPortCfg> ipPortList = new ArrayList<>();
|
||||
List<BaseStringCfg> subscribeIdList = new ArrayList<>();
|
||||
for (CfgIndexInfo cfg : page.getList()) {
|
||||
for (CfgIndexInfo cfg : ipLists) {
|
||||
Map<String, List> maps=httpRedirectCfgService.exportHttpCfg(cfg);
|
||||
httpUrlList.addAll(maps.get("NTC_HTTP_URL"));
|
||||
httpReqHdrList.addAll(maps.get("NTC_HTTP_REQ_HDR"));
|
||||
@@ -402,7 +401,7 @@ public class HttpRedirectPolicyController extends BaseController{
|
||||
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(entity.getMenuNameCode(), ipLists);
|
||||
dataMap.put("NTC_HTTP_URL", httpUrlList);
|
||||
dataMap.put("NTC_HTTP_REQ_HDR", httpReqHdrList);
|
||||
if(entity.getFunctionId()!=208 && entity.getFunctionId()!=211){
|
||||
|
||||
@@ -241,21 +241,18 @@ public class InterceptController extends CommonController{
|
||||
Map<String, String> noExportMap=new HashMap<String, String>();
|
||||
Map<String, String> replaceExportMap=new HashMap<String, String>();
|
||||
|
||||
|
||||
/*//导出选中记录
|
||||
* if(!StringUtil.isEmpty(ids)){
|
||||
for(String id:ids.split(",")){
|
||||
Long.parseLong(id);
|
||||
List<CfgIndexInfo> ipLists=new ArrayList<CfgIndexInfo>();
|
||||
//导出选中记录
|
||||
if(!StringUtil.isEmpty(ids)){
|
||||
ipLists=ipCfgService.getByIdsList(ids);
|
||||
}else{
|
||||
entity.setTableName(IpPortCfg.getTablename());
|
||||
Page<CfgIndexInfo> pageInfo=new Page<CfgIndexInfo>(request, response,"a");
|
||||
pageInfo.setPageNo(1);
|
||||
pageInfo.setPageSize(Constants.MAX_EXPORT_SIZE);
|
||||
Page<CfgIndexInfo> page = ipCfgService.getIpCfgList(pageInfo, entity);
|
||||
ipLists=page.getList();
|
||||
}
|
||||
//List<CfgIndexInfo> list=ipCfgService.getListByCfgIdWithName(IpPortCfg.getTablename(), entity.getFunctionId(), ids);
|
||||
}else{*/
|
||||
//条件导出数据大于最大导出数,只导出最大导出条数
|
||||
entity.setTableName(IpPortCfg.getTablename());
|
||||
Page<CfgIndexInfo> pageInfo=new Page<CfgIndexInfo>(request, response,"a");
|
||||
pageInfo.setPageNo(1);
|
||||
pageInfo.setPageSize(Constants.MAX_EXPORT_SIZE);
|
||||
Page<CfgIndexInfo> page = ipCfgService.getIpCfgList(pageInfo, entity);
|
||||
|
||||
//获取证书信息
|
||||
List<PxyObjKeyring> certificateList=new ArrayList<PxyObjKeyring>();
|
||||
if(entity.getFunctionId().equals(200)){
|
||||
@@ -264,7 +261,7 @@ public class InterceptController extends CommonController{
|
||||
if(entity.getFunctionId().equals(201)){
|
||||
certificateList=pxyObjKeyringService.findPxyObjKeyrings(null, 1, 1, "domain");
|
||||
}
|
||||
for (CfgIndexInfo str : page.getList()) {
|
||||
for (CfgIndexInfo str : ipLists) {
|
||||
if(!StringUtil.isEmpty(str.getUserRegion5())){
|
||||
Properties prop = getMsgProp();
|
||||
String cs= DictUtils.getDictLabel("INTERCEPT_DOMAIN_INTENSITY", str.getUserRegion5());
|
||||
@@ -308,7 +305,7 @@ public class InterceptController extends CommonController{
|
||||
List<IpPortCfg> ipList=new ArrayList<IpPortCfg>();
|
||||
List<BaseStringCfg> httpUrlList=new ArrayList<BaseStringCfg>();
|
||||
List<BaseStringCfg> pktBinList=new ArrayList<BaseStringCfg>();
|
||||
for (CfgIndexInfo cfg : page.getList()) {
|
||||
for (CfgIndexInfo cfg : ipLists) {
|
||||
Map<String, List> maps=interceptCfgService.exportIpInfo(cfg);
|
||||
httpUrlList.addAll(maps.get("NTC_HTTP_URL"));
|
||||
ipList.addAll(maps.get("PXY_INTERCEPT_IP"));
|
||||
@@ -316,7 +313,7 @@ public class InterceptController extends CommonController{
|
||||
}
|
||||
pktBinList=BaseStringCfg.replaceBaseKeyList(pktBinList);
|
||||
httpUrlList=BaseStringCfg.baseHexList(httpUrlList);
|
||||
dataMap.put(entity.getMenuNameCode(), page.getList());
|
||||
dataMap.put(entity.getMenuNameCode(), ipLists);
|
||||
if(entity.getFunctionId()==212){ //IP Payload
|
||||
cfgIndexInfoNoExport=",do_log,log_total,policy_name,group_name,userregion4,userregion5,&userregion1:replace_zone-userregion2:replaced_content-userregion3:replace_content-";
|
||||
titleList.add("PXY_INTERCEPT_IP");
|
||||
|
||||
@@ -39,6 +39,7 @@ 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.CfgIndexInfo;
|
||||
import com.nis.domain.configuration.DnsResStrategy;
|
||||
import com.nis.domain.configuration.IpPortCfg;
|
||||
import com.nis.domain.configuration.PxyObjKeyring;
|
||||
@@ -410,29 +411,27 @@ public class PxyObjKeyringController extends BaseController {
|
||||
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<PxyObjKeyring> ipLists=new ArrayList<PxyObjKeyring>();
|
||||
//导出选中记录
|
||||
if(!StringUtil.isEmpty(ids)){
|
||||
ipLists=pxyObjKeyringService.findByList(ids);
|
||||
}else{
|
||||
entity.setTableName(IpPortCfg.getTablename());
|
||||
Page<PxyObjKeyring> pageInfo=new Page<PxyObjKeyring>(request, response,"r");
|
||||
pageInfo.setPageNo(1);
|
||||
pageInfo.setPageSize(Constants.MAX_EXPORT_SIZE);
|
||||
Page<PxyObjKeyring> page = pxyObjKeyringService.findPage(pageInfo, entity);
|
||||
ipLists=page.getList();
|
||||
}
|
||||
//List<CfgIndexInfo> list=ipCfgService.getListByCfgIdWithName(IpPortCfg.getTablename(), entity.getFunctionId(), ids);
|
||||
}else{*/
|
||||
//条件导出数据大于最大导出数,只导出最大导出条数
|
||||
entity.setTableName(IpPortCfg.getTablename());
|
||||
Page<PxyObjKeyring> pageInfo=new Page<PxyObjKeyring>(request, response,"r");
|
||||
pageInfo.setPageNo(1);
|
||||
pageInfo.setPageSize(Constants.MAX_EXPORT_SIZE);
|
||||
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());
|
||||
|
||||
for (int i = 0; i <ipLists.size(); i++) {
|
||||
ipLists.get(i).setKeyringName(ipLists.get(i).getCfgDesc());
|
||||
}
|
||||
model.addAttribute("page", page);
|
||||
titleList.add(entity.getMenuNameCode());
|
||||
classMap.put(entity.getMenuNameCode(), PxyObjKeyring.class);
|
||||
String cfgIndexInfoNoExport=",config_describe,whether_area_block,block_type,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());
|
||||
dataMap.put(entity.getMenuNameCode(), ipLists);
|
||||
/*}*/
|
||||
this._export(model, request, response, redirectAttributes,entity.getMenuNameCode(),titleList,classMap,dataMap,noExportMap);
|
||||
} catch (Exception e) {
|
||||
@@ -452,32 +451,27 @@ public class PxyObjKeyringController extends BaseController {
|
||||
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<PxyObjTrustedCaCert> ipLists=new ArrayList<PxyObjTrustedCaCert>();
|
||||
//导出选中记录
|
||||
if(!StringUtil.isEmpty(ids)){
|
||||
ipLists=pxyObjKeyringService.findByCertList(ids);
|
||||
}else{
|
||||
Page<PxyObjTrustedCaCert> pageInfo=new Page<PxyObjTrustedCaCert>(request, response,"r");
|
||||
pageInfo.setPageNo(1);
|
||||
pageInfo.setPageSize(Constants.MAX_EXPORT_SIZE);
|
||||
Page<PxyObjTrustedCaCert> page = pxyObjKeyringService.findTrustedCertPage(pageInfo, entity);
|
||||
ipLists=page.getList();
|
||||
}
|
||||
//List<CfgIndexInfo> list=ipCfgService.getListByCfgIdWithName(IpPortCfg.getTablename(), entity.getFunctionId(), ids);
|
||||
}else{*/
|
||||
//条件导出数据大于最大导出数,只导出最大导出条数
|
||||
entity.setTableName(IpPortCfg.getTablename());
|
||||
Page<PxyObjTrustedCaCert> pageInfo=new Page<PxyObjTrustedCaCert>(request, response,"r");
|
||||
pageInfo.setPageNo(1);
|
||||
pageInfo.setPageSize(Constants.MAX_EXPORT_SIZE);
|
||||
Page<PxyObjTrustedCaCert> page = pxyObjKeyringService.findTrustedCertPage(pageInfo, entity);
|
||||
for (PxyObjTrustedCaCert cert:page.getList()) {
|
||||
for (PxyObjTrustedCaCert cert:ipLists) {
|
||||
if(!StringUtil.isEmpty(cert.getCompileId())){
|
||||
cert.setCrlFile(ConfigDictUtils.getTrustedCrlByCerId(cert.getCompileId()));
|
||||
}
|
||||
}
|
||||
model.addAttribute("page", page);
|
||||
titleList.add(entity.getMenuNameCode());
|
||||
classMap.put(entity.getMenuNameCode(), PxyObjTrustedCaCert.class);
|
||||
String cfgIndexInfoNoExport=",whether_area_block,block_type,valid_identifier,do_log,client_port,ir_type,group_name,userregion1,userregion2,userregion3,userregion4,userregion5,&config_describe:cert_name-";
|
||||
noExportMap.put(entity.getMenuNameCode(),cfgIndexInfoNoExport);
|
||||
dataMap.put(entity.getMenuNameCode(), page.getList());
|
||||
dataMap.put(entity.getMenuNameCode(), ipLists);
|
||||
/*}*/
|
||||
this._export(model, request, response, redirectAttributes,entity.getMenuNameCode(),titleList,classMap,dataMap,noExportMap);
|
||||
} catch (Exception e) {
|
||||
|
||||
Reference in New Issue
Block a user