修复配置td title显示问题

http url界面增加配置来源信息
This commit is contained in:
duandongmei
2018-10-29 16:23:33 +08:00
parent a4bd74e5c2
commit d46051aebd
9 changed files with 186 additions and 112 deletions

View File

@@ -192,6 +192,20 @@ public class WebsiteController extends BaseController{
websiteCfgService.saveHttpCfg(entity);
return "redirect:" + adminPath +"/ntc/website/httpList?functionId="+entity.getFunctionId();
}
@RequestMapping(value = {"saveHttpUrlCfgs"})
public String saveHttpUrlCfgs(RedirectAttributes model,HttpServletRequest request,HttpServletResponse response,CfgIndexInfo entity) {
if(!StringUtil.isEmpty(entity) && !StringUtil.isEmpty(entity.getHttpUrlList())){
for (HttpUrlCfg httpUrlCfg : entity.getHttpUrlList()) {
CfgIndexInfo cfg=new CfgIndexInfo();
List httpList=new ArrayList<>();
BeanUtils.copyProperties(httpUrlCfg, cfg);
httpList.add(httpUrlCfg);
cfg.setHttpUrlList(httpList);
websiteCfgService.saveHttpCfg(cfg);
}
}
return "redirect:" + adminPath +"/ntc/website/httpList?functionId="+entity.getFunctionId();
}
@RequestMapping(value = {"ajaxHttpSubList"})
public String ajaxHttpSubList(Model model,Long cfgId,Integer index) {
CfgIndexInfo cfg = websiteCfgService.getHttpCfg(cfgId);
@@ -220,9 +234,11 @@ public class WebsiteController extends BaseController{
try {
websiteCfgService.auditHttpCfg(entity,isAudit);
} catch (MaatConvertException e) {
e.printStackTrace();
logger.info("http配置下发失败"+e.getMessage());
addMessage(redirectAttributes, e.getMessage());
logger.error("http配置下发失败"+e.getMessage());
addMessage(redirectAttributes, "request_service_failed");
}catch (Exception e) {
logger.error("http配置下发失败"+e.getMessage());
addMessage(redirectAttributes, "audit_failed");
}
}
return "redirect:" + adminPath +"/ntc/website/httpList?functionId="+functionId;
@@ -553,22 +569,6 @@ public class WebsiteController extends BaseController{
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"
@@ -597,16 +597,7 @@ public class WebsiteController extends BaseController{
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);
+",userregion1,userregion2,userregion3,userregion4,userregion5,ir_type,group_name,";
List<BaseStringCfg> httpUrlList = new ArrayList<>();
List<ComplexkeywordCfg> httpReqHdrList = new ArrayList<>();
List<ComplexkeywordCfg> httpResHdrList = new ArrayList<>();
@@ -630,15 +621,43 @@ public class WebsiteController extends BaseController{
httpReqBodyList=BaseStringCfg.replaceBaseKeyList(httpReqBodyList);
httpResBodyList=BaseStringCfg.replaceBaseKeyList(httpResBodyList);
subscribeIdList=BaseStringCfg.baseHexList(subscribeIdList);
titleList.add(entity.getMenuNameCode());
classMap.put(entity.getMenuNameCode(), CfgIndexInfo.class);
noExportMap.put(entity.getMenuNameCode(),cfgIndexInfoNoExport);
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);
if(entity.getFunctionId()!=635){
titleList.add("NTC_HTTP_URL");
titleList.add("NTC_HTTP_REQ_HDR");
titleList.add("NTC_HTTP_RES_HDR");
classMap.put("NTC_HTTP_URL", HttpUrlCfg.class);
classMap.put("NTC_HTTP_REQ_HDR", HttpReqHeadCfg.class);
classMap.put("NTC_HTTP_RES_HDR", HttpResHeadCfg.class);
noExportMap.put("NTC_HTTP_URL", httpUrlCfgNoExport);
noExportMap.put("NTC_HTTP_REQ_HDR", httpReqHeadCfgNoExport);
noExportMap.put("NTC_HTTP_RES_HDR", httpResHeadCfgNoExport);
dataMap.put("NTC_HTTP_URL", httpUrlList);
dataMap.put("NTC_HTTP_REQ_HDR", httpReqHdrList);
dataMap.put("NTC_HTTP_RES_HDR", httpResHdrList);
}
titleList.add("NTC_HTTP_REQ_BODY");
titleList.add("NTC_HTTP_RES_BODY");
classMap.put("NTC_HTTP_REQ_BODY", HttpBodyCfg.class);
classMap.put("NTC_HTTP_RES_BODY", HttpBodyCfg.class);
noExportMap.put("NTC_HTTP_REQ_BODY", httpReqBodyCfgNoExport);
noExportMap.put("NTC_HTTP_RES_BODY", httpResBodyCfgNoExport);
dataMap.put("NTC_HTTP_REQ_BODY", httpReqBodyList);
dataMap.put("NTC_HTTP_RES_BODY", httpResBodyList);
if(entity.getFunctionId()!=635){
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) {