业务配置导出首行增加标题和时间范围

This commit is contained in:
lihaochen
2018-12-21 15:13:48 +08:00
parent b553c27b15
commit 4147e52b73
52 changed files with 8333 additions and 7120 deletions

View File

@@ -64,6 +64,7 @@ import com.nis.web.security.UserUtils;
/** /**
* 特定协议相关配置控制类 * 特定协议相关配置控制类
*
* @author zhangwei * @author zhangwei
* *
*/ */
@@ -72,6 +73,7 @@ import com.nis.web.security.UserUtils;
public class AppFeatureCfgController extends BaseController { public class AppFeatureCfgController extends BaseController {
/** /**
* app协议复杂特征配置列表 * app协议复杂特征配置列表
*
* @param model * @param model
* @param cfg * @param cfg
* @param request * @param request
@@ -79,7 +81,8 @@ public class AppFeatureCfgController extends BaseController {
* @return * @return
*/ */
@RequestMapping(value = { "multiFeatureCfgList" }) @RequestMapping(value = { "multiFeatureCfgList" })
public String multiFeatureCfgList(Model model,@ModelAttribute("cfg")AppFeatureIndex cfg,HttpServletRequest request,HttpServletResponse response) { public String multiFeatureCfgList(Model model, @ModelAttribute("cfg") AppFeatureIndex cfg,
HttpServletRequest request, HttpServletResponse response) {
Page<AppFeatureIndex> searchPage = new Page<AppFeatureIndex>(request, response, "r"); Page<AppFeatureIndex> searchPage = new Page<AppFeatureIndex>(request, response, "r");
Page<AppFeatureIndex> page = appMultiFeatureCfgService.findAppFeatureIndexList(searchPage, cfg); Page<AppFeatureIndex> page = appMultiFeatureCfgService.findAppFeatureIndexList(searchPage, cfg);
for (AppFeatureIndex entity : page.getList()) { for (AppFeatureIndex entity : page.getList()) {
@@ -90,8 +93,10 @@ public class AppFeatureCfgController extends BaseController {
initPageCondition(model, cfg); initPageCondition(model, cfg);
return "/cfg/app/appMultiFeatureCfgList"; return "/cfg/app/appMultiFeatureCfgList";
} }
/** /**
* 特征配置表单 * 特征配置表单
*
* @param model * @param model
* @param ids * @param ids
* @param entity * @param entity
@@ -101,10 +106,14 @@ public class AppFeatureCfgController extends BaseController {
public String multiFeatureCfgForm(Model model, String ids, AppFeatureIndex entity) { public String multiFeatureCfgForm(Model model, String ids, AppFeatureIndex entity) {
if (StringUtils.isNotBlank(ids)) { if (StringUtils.isNotBlank(ids)) {
entity = appMultiFeatureCfgService.getAppFeatureIndex(Long.parseLong(ids)); entity = appMultiFeatureCfgService.getAppFeatureIndex(Long.parseLong(ids));
entity.setIpPortList(appMultiFeatureCfgService.getAppIpRangeCfg(entity.getCompileId(), entity.getFunctionId())); entity.setIpPortList(
entity.setStrList(appMultiFeatureCfgService.getAppStringFeatureCfg(entity.getCompileId(), entity.getFunctionId(),null)); appMultiFeatureCfgService.getAppIpRangeCfg(entity.getCompileId(), entity.getFunctionId()));
entity.setComplexList(appMultiFeatureCfgService.getAppComplexFeatureCfg(entity.getCompileId(), entity.getFunctionId(),null)); entity.setStrList(appMultiFeatureCfgService.getAppStringFeatureCfg(entity.getCompileId(),
entity.setNumCfgList(appMultiFeatureCfgService.getAppTcpCfg(entity.getCompileId(), entity.getFunctionId(),null)); entity.getFunctionId(), null));
entity.setComplexList(appMultiFeatureCfgService.getAppComplexFeatureCfg(entity.getCompileId(),
entity.getFunctionId(), null));
entity.setNumCfgList(
appMultiFeatureCfgService.getAppTcpCfg(entity.getCompileId(), entity.getFunctionId(), null));
initUpdateFormCondition(model, entity); initUpdateFormCondition(model, entity);
} else { } else {
initFormCondition(model, entity); initFormCondition(model, entity);
@@ -112,8 +121,10 @@ public class AppFeatureCfgController extends BaseController {
model.addAttribute("_cfg", entity); model.addAttribute("_cfg", entity);
return "/cfg/app/appMultiFeatureCfgForm"; return "/cfg/app/appMultiFeatureCfgForm";
} }
/** /**
* 特征配置新增修改 * 特征配置新增修改
*
* @param model * @param model
* @param request * @param request
* @param response * @param response
@@ -125,7 +136,8 @@ public class AppFeatureCfgController extends BaseController {
public String saveAppMultiFeatureCfg(Model model, HttpServletRequest request, HttpServletResponse response, public String saveAppMultiFeatureCfg(Model model, HttpServletRequest request, HttpServletResponse response,
AppFeatureIndex entity, RedirectAttributes redirectAttributes) { AppFeatureIndex entity, RedirectAttributes redirectAttributes) {
try { try {
SpecificServiceCfg specificService = specificServiceCfgService.getBySpecServiceId(entity.getSpecServiceId()); SpecificServiceCfg specificService = specificServiceCfgService
.getBySpecServiceId(entity.getSpecServiceId());
if (specificService != null) { if (specificService != null) {
entity.setAppCode(specificService.getSpecServiceCode()); entity.setAppCode(specificService.getSpecServiceCode());
} }
@@ -142,8 +154,10 @@ public class AppFeatureCfgController extends BaseController {
return "redirect:" + adminPath + "/app/feature/multiFeatureCfgList?functionId=" + entity.getFunctionId(); return "redirect:" + adminPath + "/app/feature/multiFeatureCfgList?functionId=" + entity.getFunctionId();
} }
/** /**
* 特征配置审核 * 特征配置审核
*
* @param isAudit * @param isAudit
* @param isValid * @param isValid
* @param ids * @param ids
@@ -152,14 +166,9 @@ public class AppFeatureCfgController extends BaseController {
* @return * @return
*/ */
@RequestMapping(value = { "auditAppFeatureCfg" }) @RequestMapping(value = { "auditAppFeatureCfg" })
public String auditAppFeatureCfg(Model model,@ModelAttribute("cfg")AppFeatureIndex cfg, public String auditAppFeatureCfg(Model model, @ModelAttribute("cfg") AppFeatureIndex cfg, Integer isValid,
Integer isValid, Integer isAudit, String ids, Integer functionId, RedirectAttributes redirectAttributes,
Integer isAudit, HttpServletResponse response, HttpServletRequest request) {
String ids,
Integer functionId,
RedirectAttributes redirectAttributes,
HttpServletResponse response,
HttpServletRequest request) {
if (!StringUtil.isEmpty(ids)) { if (!StringUtil.isEmpty(ids)) {
AppFeatureIndex entity = new AppFeatureIndex(); AppFeatureIndex entity = new AppFeatureIndex();
String[] idArray = ids.split(","); String[] idArray = ids.split(",");
@@ -206,8 +215,10 @@ public class AppFeatureCfgController extends BaseController {
return "redirect:" + adminPath + "/app/feature/multiFeatureCfgList?functionId=" + functionId; return "redirect:" + adminPath + "/app/feature/multiFeatureCfgList?functionId=" + functionId;
} }
/** /**
* 特征配置删除 * 特征配置删除
*
* @param isValid * @param isValid
* @param ids * @param ids
* @param functionId * @param functionId
@@ -221,6 +232,7 @@ public class AppFeatureCfgController extends BaseController {
/** /**
* 查询特征子配置 * 查询特征子配置
*
* @param model * @param model
* @param cfgId * @param cfgId
* @param index * @param index
@@ -243,15 +255,18 @@ public class AppFeatureCfgController extends BaseController {
map.put("ipRangeList", ipRangeList); map.put("ipRangeList", ipRangeList);
} }
if ("2".equals(cfgRegionType[i])) { if ("2".equals(cfgRegionType[i])) {
List<AppStringFeatureCfg> strList = appMultiFeatureCfgService.getAppStringFeatureCfg(compileId,functionId,Integer.valueOf(cfgRegionCode[i])); List<AppStringFeatureCfg> strList = appMultiFeatureCfgService.getAppStringFeatureCfg(compileId,
functionId, Integer.valueOf(cfgRegionCode[i]));
map.put("strList", strList); map.put("strList", strList);
} }
if ("3".equals(cfgRegionType[i])) { if ("3".equals(cfgRegionType[i])) {
List<AppComplexFeatureCfg> complexList = appMultiFeatureCfgService.getAppComplexFeatureCfg(compileId,functionId,Integer.valueOf(cfgRegionCode[i])); List<AppComplexFeatureCfg> complexList = appMultiFeatureCfgService
.getAppComplexFeatureCfg(compileId, functionId, Integer.valueOf(cfgRegionCode[i]));
map.put("complexList", complexList); map.put("complexList", complexList);
} }
if ("4".equals(cfgRegionType[i])) { if ("4".equals(cfgRegionType[i])) {
List<AppTcpCfg> numCfgList = appMultiFeatureCfgService.getAppTcpCfg(compileId,functionId,Integer.valueOf(cfgRegionCode[i])); List<AppTcpCfg> numCfgList = appMultiFeatureCfgService.getAppTcpCfg(compileId, functionId,
Integer.valueOf(cfgRegionCode[i]));
map.put("numCfgList", numCfgList); map.put("numCfgList", numCfgList);
} }
tabList.add(map); tabList.add(map);
@@ -263,34 +278,21 @@ public class AppFeatureCfgController extends BaseController {
tabList.add(map); tabList.add(map);
} }
/*if(ipRangeList!=null){ /*
String cfgType = null; * if(ipRangeList!=null){ String cfgType = null; for(AppIpCfg
for(AppIpCfg ip:ipRangeList){ * ip:ipRangeList){ if(!ip.getCfgType().equals(cfgType)){
if(!ip.getCfgType().equals(cfgType)){ * tabList.add(new String[]{"1",ip.getCfgType()}); cfgType =
tabList.add(new String[]{"1",ip.getCfgType()}); * ip.getCfgType(); } } } if(strList!=null){ String cfgType = null;
cfgType = ip.getCfgType(); * for(AppStringFeatureCfg cfg:strList){
} * if(!cfg.getCfgType().equals(cfgType)){ tabList.add(new
} * String[]{"2",cfg.getCfgType()}); cfgType = cfg.getCfgType(); } } }
} * if(complexList!=null){ String cfgType = null;
if(strList!=null){ * for(AppComplexFeatureCfg cfg:complexList){
String cfgType = null; * if(!cfg.getCfgType().equals(cfgType)){ tabList.add(new
for(AppStringFeatureCfg cfg:strList){ * String[]{"3",cfg.getCfgType()}); cfgType = cfg.getCfgType();0.
if(!cfg.getCfgType().equals(cfgType)){ *
tabList.add(new String[]{"2",cfg.getCfgType()}); * } } }
cfgType = cfg.getCfgType(); */
}
}
}
if(complexList!=null){
String cfgType = null;
for(AppComplexFeatureCfg cfg:complexList){
if(!cfg.getCfgType().equals(cfgType)){
tabList.add(new String[]{"3",cfg.getCfgType()});
cfgType = cfg.getCfgType();0.
}
}
}*/
model.addAttribute("index", index); model.addAttribute("index", index);
model.addAttribute("tabList", tabList); model.addAttribute("tabList", tabList);
return "/cfg/app/appSubFeatureList"; return "/cfg/app/appSubFeatureList";
@@ -331,6 +333,21 @@ public class AppFeatureCfgController extends BaseController {
+ ",config_time,editor,edit_time,auditor,audit_time" + ",config_time,editor,edit_time,auditor,audit_time"
+ ",letter,whether_area_block,classification,attribute,label" + ",letter,whether_area_block,classification,attribute,label"
+ ",userregion1,userregion2,userregion3,userregion4,userregion5,ir_type,group_name,"; + ",userregion1,userregion2,userregion3,userregion4,userregion5,ir_type,group_name,";
// 时间过滤
if (entity.getSearch_create_time_start() == null && entity.getSearch_create_time_end() == null) {
cfgIndexInfoNoExport = ",config_time" + cfgIndexInfoNoExport;
}
if (entity.getSearch_edit_time_start() == null && entity.getSearch_edit_time_end() == null) {
cfgIndexInfoNoExport = ",edit_time" + cfgIndexInfoNoExport;
}
if (entity.getSearch_audit_time_start() == null && entity.getSearch_audit_time_end() == null) {
cfgIndexInfoNoExport = ",audit_time" + cfgIndexInfoNoExport;
}
if (!StringUtil.isEmpty(entity.gethColumns())) {
cfgIndexInfoNoExport = "," + entity.gethColumns() + "," + cfgIndexInfoNoExport;
}
titleList.add(entity.getMenuNameCode()); titleList.add(entity.getMenuNameCode());
classMap.put(entity.getMenuNameCode(), AppFeatureIndex.class); classMap.put(entity.getMenuNameCode(), AppFeatureIndex.class);
noExportMap.put(entity.getMenuNameCode(), cfgIndexInfoNoExport); noExportMap.put(entity.getMenuNameCode(), cfgIndexInfoNoExport);
@@ -385,12 +402,22 @@ public class AppFeatureCfgController extends BaseController {
} }
/* } */ /* } */
this._export(model, request, response, redirectAttributes,entity.getMenuNameCode(),titleList,classMap,dataMap,noExportMap);
String timeRange = initTimeMap(entity);
noExportMap.put("timeRange", timeRange);
if ("csv".equals(entity.getExType())) {
this._exportCsv(model, request, response, redirectAttributes, entity.getMenuNameCode(), titleList,
classMap, dataMap, noExportMap);
} else {
this._export(model, request, response, redirectAttributes, entity.getMenuNameCode(), titleList,
classMap, dataMap, noExportMap);
}
} catch (Exception e) { } catch (Exception e) {
logger.error("Appfeature export failed", e); logger.error("Appfeature export failed", e);
addMessage(redirectAttributes, "error", "export_failed"); addMessage(redirectAttributes, "error", "export_failed");
} }
//return "redirect:" + adminPath +"/ntc/iplist/list?functionId="+entity.getFunctionId(); // return "redirect:" + adminPath
// +"/ntc/iplist/list?functionId="+entity.getFunctionId();
} }
public static List<AppComplexFeatureCfg> replaceKeyList(List<AppComplexFeatureCfg> list) { public static List<AppComplexFeatureCfg> replaceKeyList(List<AppComplexFeatureCfg> list) {
@@ -413,5 +440,4 @@ public class AppFeatureCfgController extends BaseController {
return list; return list;
} }
} }

View File

@@ -35,6 +35,7 @@ import com.nis.web.security.UserUtils;
/** /**
* 基础协议控制类 * 基础协议控制类
*
* @author wx * @author wx
* *
*/ */
@@ -43,6 +44,7 @@ import com.nis.web.security.UserUtils;
public class BasicProtocolController extends BaseController { public class BasicProtocolController extends BaseController {
/** /**
* app策略列表 * app策略列表
*
* @param model * @param model
* @param cfg * @param cfg
* @param request * @param request
@@ -50,11 +52,13 @@ public class BasicProtocolController extends BaseController {
* @return * @return
*/ */
@RequestMapping(value = { "list" }) @RequestMapping(value = { "list" })
public String policyCfgList(Model model,@ModelAttribute("cfg")AppPolicyCfg cfg,HttpServletRequest request,HttpServletResponse response) { public String policyCfgList(Model model, @ModelAttribute("cfg") AppPolicyCfg cfg, HttpServletRequest request,
HttpServletResponse response) {
Page<AppPolicyCfg> searchPage = new Page<AppPolicyCfg>(request, response, "r"); Page<AppPolicyCfg> searchPage = new Page<AppPolicyCfg>(request, response, "r");
Page<AppPolicyCfg> page = appCfgService.findAppPolicyList(searchPage, cfg); Page<AppPolicyCfg> page = appCfgService.findAppPolicyList(searchPage, cfg);
// for(AppPolicyCfg entity:page.getList()){ // for(AppPolicyCfg entity:page.getList()){
// SpecificServiceCfg app = specificServiceCfgService.getBySpecServiceId(entity.getSpecServiceId()); // SpecificServiceCfg app =
// specificServiceCfgService.getBySpecServiceId(entity.getSpecServiceId());
// if(app!=null) { // if(app!=null) {
// entity.setAppName(app.getSpecServiceName()); // entity.setAppName(app.getSpecServiceName());
// } // }
@@ -64,8 +68,10 @@ public class BasicProtocolController extends BaseController {
initPageCondition(model, cfg); initPageCondition(model, cfg);
return "/cfg/basicprotocol/list"; return "/cfg/basicprotocol/list";
} }
/** /**
* 查询APP策略IP子配置 * 查询APP策略IP子配置
*
* @param model * @param model
* @param cfgId * @param cfgId
* @param index * @param index
@@ -98,8 +104,10 @@ public class BasicProtocolController extends BaseController {
model.addAttribute("tabList", tabList); model.addAttribute("tabList", tabList);
return "/cfg/basicprotocol/basicProtocolSubList"; return "/cfg/basicprotocol/basicProtocolSubList";
} }
/** /**
* 策略配置表单 * 策略配置表单
*
* @param model * @param model
* @param ids * @param ids
* @param entity * @param entity
@@ -117,8 +125,10 @@ public class BasicProtocolController extends BaseController {
model.addAttribute("_cfg", entity); model.addAttribute("_cfg", entity);
return "/cfg/basicprotocol/form"; return "/cfg/basicprotocol/form";
} }
/** /**
* 策略配置新增修改 * 策略配置新增修改
*
* @param model * @param model
* @param request * @param request
* @param response * @param response
@@ -131,7 +141,8 @@ public class BasicProtocolController extends BaseController {
public String saveAppPolicyCfg(Model model, HttpServletRequest request, HttpServletResponse response, public String saveAppPolicyCfg(Model model, HttpServletRequest request, HttpServletResponse response,
AppPolicyCfg entity, RedirectAttributes redirectAttributes) { AppPolicyCfg entity, RedirectAttributes redirectAttributes) {
try { try {
SpecificServiceCfg specificService = specificServiceCfgService.getBySpecServiceId(entity.getSpecServiceId()); SpecificServiceCfg specificService = specificServiceCfgService
.getBySpecServiceId(entity.getSpecServiceId());
if (specificService != null) { if (specificService != null) {
entity.setAppCode(specificService.getSpecServiceCode()); entity.setAppCode(specificService.getSpecServiceCode());
} }
@@ -152,8 +163,10 @@ public class BasicProtocolController extends BaseController {
return "redirect:" + adminPath + "/basicprotocol/list?functionId=" + entity.getFunctionId(); return "redirect:" + adminPath + "/basicprotocol/list?functionId=" + entity.getFunctionId();
} }
/** /**
* 策略配置审核 * 策略配置审核
*
* @param isAudit * @param isAudit
* @param isValid * @param isValid
* @param ids * @param ids
@@ -163,14 +176,9 @@ public class BasicProtocolController extends BaseController {
*/ */
@RequestMapping(value = { "audit" }) @RequestMapping(value = { "audit" })
@RequiresPermissions(value = { "basicprotocol:confirm" }) @RequiresPermissions(value = { "basicprotocol:confirm" })
public String auditAppPolicyCfg(Model model,@ModelAttribute("cfg")AppPolicyCfg cfg, public String auditAppPolicyCfg(Model model, @ModelAttribute("cfg") AppPolicyCfg cfg, Integer isValid,
Integer isValid, Integer isAudit, String ids, Integer functionId, RedirectAttributes redirectAttributes,
Integer isAudit, HttpServletResponse response, HttpServletRequest request) {
String ids,
Integer functionId,
RedirectAttributes redirectAttributes,
HttpServletResponse response,
HttpServletRequest request) {
if (!StringUtil.isEmpty(ids)) { if (!StringUtil.isEmpty(ids)) {
AppPolicyCfg entity = new AppPolicyCfg(); AppPolicyCfg entity = new AppPolicyCfg();
String[] idArray = ids.split(","); String[] idArray = ids.split(",");
@@ -188,7 +196,8 @@ public class BasicProtocolController extends BaseController {
} catch (Exception e) { } catch (Exception e) {
if (e instanceof MaatConvertException) { if (e instanceof MaatConvertException) {
e.printStackTrace(); e.printStackTrace();
logger.info("app策略配置下发失败"+e.getMessage());; logger.info("app策略配置下发失败" + e.getMessage());
;
addMessage(redirectAttributes, "error", "request_service_failed"); addMessage(redirectAttributes, "error", "request_service_failed");
} else { } else {
e.printStackTrace(); e.printStackTrace();
@@ -220,8 +229,10 @@ public class BasicProtocolController extends BaseController {
} }
return "redirect:" + adminPath + "/basicprotocol/list?functionId=" + functionId; return "redirect:" + adminPath + "/basicprotocol/list?functionId=" + functionId;
} }
/** /**
* 策略配置删除 * 策略配置删除
*
* @param isValid * @param isValid
* @param ids * @param ids
* @param functionId * @param functionId
@@ -229,7 +240,8 @@ public class BasicProtocolController extends BaseController {
*/ */
@RequestMapping(value = { "updateValid" }) @RequestMapping(value = { "updateValid" })
@RequiresPermissions(value = { "basicprotocol:config" }) @RequiresPermissions(value = { "basicprotocol:config" })
public String updateAppPolicyCfgValid(Integer isValid,String ids,Integer functionId,RedirectAttributes redirectAttributes) { public String updateAppPolicyCfgValid(Integer isValid, String ids, Integer functionId,
RedirectAttributes redirectAttributes) {
try { try {
appCfgService.updateAppPolicyCfgValid(isValid, ids, functionId); appCfgService.updateAppPolicyCfgValid(isValid, ids, functionId);
addMessage(redirectAttributes, "success", "delete_success"); addMessage(redirectAttributes, "success", "delete_success");
@@ -265,7 +277,7 @@ public class BasicProtocolController extends BaseController {
ipLists = appCfgService.findAppByPolicyList(ids); ipLists = appCfgService.findAppByPolicyList(ids);
} else { } else {
entity.setTableName(IpPortCfg.getTablename()); entity.setTableName(IpPortCfg.getTablename());
Page<AppPolicyCfg> pageInfo=new Page<AppPolicyCfg>(request, response,"a"); Page<AppPolicyCfg> pageInfo = new Page<AppPolicyCfg>(request, response, "r");
pageInfo.setPageNo(1); pageInfo.setPageNo(1);
pageInfo.setPageSize(Constants.MAX_EXPORT_SIZE); pageInfo.setPageSize(Constants.MAX_EXPORT_SIZE);
Page<AppPolicyCfg> page = appCfgService.findAppPolicyList(pageInfo, entity); Page<AppPolicyCfg> page = appCfgService.findAppPolicyList(pageInfo, entity);
@@ -293,6 +305,21 @@ public class BasicProtocolController extends BaseController {
+ ",config_time,editor,edit_time,auditor,audit_time" + ",config_time,editor,edit_time,auditor,audit_time"
+ ",letter,whether_area_block,classification,attribute,label" + ",letter,whether_area_block,classification,attribute,label"
+ ",userregion1,userregion2,userregion3,userregion4,userregion5,ir_type,group_name,"; + ",userregion1,userregion2,userregion3,userregion4,userregion5,ir_type,group_name,";
// 时间过滤
if (entity.getSearch_create_time_start() == null && entity.getSearch_create_time_end() == null) {
cfgIndexInfoNoExport = ",config_time" + cfgIndexInfoNoExport;
}
if (entity.getSearch_edit_time_start() == null && entity.getSearch_edit_time_end() == null) {
cfgIndexInfoNoExport = ",edit_time" + cfgIndexInfoNoExport;
}
if (entity.getSearch_audit_time_start() == null && entity.getSearch_audit_time_end() == null) {
cfgIndexInfoNoExport = ",audit_time" + cfgIndexInfoNoExport;
}
if (!StringUtil.isEmpty(entity.gethColumns())) {
cfgIndexInfoNoExport = "," + entity.gethColumns() + "," + cfgIndexInfoNoExport;
}
noExportMap.put(entity.getMenuNameCode(), cfgIndexInfoNoExport); noExportMap.put(entity.getMenuNameCode(), cfgIndexInfoNoExport);
noExportMap.put("NTC_IP", ipPortInfoNoExport); noExportMap.put("NTC_IP", ipPortInfoNoExport);
noExportMap.put("NTC_SUBSCRIBE_ID", subscribeInfoNoExport); noExportMap.put("NTC_SUBSCRIBE_ID", subscribeInfoNoExport);
@@ -309,12 +336,22 @@ public class BasicProtocolController extends BaseController {
dataMap.put("NTC_SUBSCRIBE_ID", subscribeInfoList); dataMap.put("NTC_SUBSCRIBE_ID", subscribeInfoList);
/* } */ /* } */
this._export(model, request, response, redirectAttributes,entity.getMenuNameCode(),titleList,classMap,dataMap,noExportMap);
String timeRange = initTimeMap(entity);
noExportMap.put("timeRange", timeRange);
if ("csv".equals(entity.getExType())) {
this._exportCsv(model, request, response, redirectAttributes, entity.getMenuNameCode(), titleList,
classMap, dataMap, noExportMap);
} else {
this._export(model, request, response, redirectAttributes, entity.getMenuNameCode(), titleList,
classMap, dataMap, noExportMap);
}
} catch (Exception e) { } catch (Exception e) {
logger.error("ip addr export failed", e); logger.error("ip addr export failed", e);
addMessage(redirectAttributes, "error", "export_failed"); addMessage(redirectAttributes, "error", "export_failed");
} }
//return "redirect:" + adminPath +"/ntc/iplist/list?functionId="+entity.getFunctionId(); // return "redirect:" + adminPath
// +"/ntc/iplist/list?functionId="+entity.getFunctionId();
} }
} }

View File

@@ -37,6 +37,7 @@ import com.nis.web.security.UserUtils;
/** /**
* 加密隧道行为控制类 * 加密隧道行为控制类
*
* @author wx * @author wx
* *
*/ */
@@ -45,6 +46,7 @@ import com.nis.web.security.UserUtils;
public class EncryptedTunnelBehaviorController extends BaseController { public class EncryptedTunnelBehaviorController extends BaseController {
/** /**
* app策略列表 * app策略列表
*
* @param model * @param model
* @param cfg * @param cfg
* @param request * @param request
@@ -52,32 +54,39 @@ public class EncryptedTunnelBehaviorController extends BaseController {
* @return * @return
*/ */
@RequestMapping(value = { "list" }) @RequestMapping(value = { "list" })
public String policyCfgList(Model model,@ModelAttribute("cfg")AppPolicyCfg cfg,HttpServletRequest request,HttpServletResponse response) { public String policyCfgList(Model model, @ModelAttribute("cfg") AppPolicyCfg cfg, HttpServletRequest request,
HttpServletResponse response) {
Page<AppPolicyCfg> searchPage = new Page<AppPolicyCfg>(request, response, "r"); Page<AppPolicyCfg> searchPage = new Page<AppPolicyCfg>(request, response, "r");
Page<AppPolicyCfg> page = appCfgService.findAppPolicyList(searchPage, cfg); Page<AppPolicyCfg> page = appCfgService.findAppPolicyList(searchPage, cfg);
// for(AppPolicyCfg entity:page.getList()){ // for(AppPolicyCfg entity:page.getList()){
// SpecificServiceCfg app = specificServiceCfgService.getBySpecServiceId(entity.getSpecServiceId()); // SpecificServiceCfg app =
// specificServiceCfgService.getBySpecServiceId(entity.getSpecServiceId());
// if(app!=null) { // if(app!=null) {
// entity.setAppName(app.getSpecServiceName()); // entity.setAppName(app.getSpecServiceName());
// } // }
// } // }
// //查找社交应用的所有有效二级特定服务 // //查找社交应用的所有有效二级特定服务
// SpecificServiceCfg second=new SpecificServiceCfg(); // SpecificServiceCfg second=new SpecificServiceCfg();
// for(SysDataDictionaryItem dict:DictUtils.getDictList("SPECIFIC_SERVICE_CFG_TYPE")) { // for(SysDataDictionaryItem
// if(Constants.SPECIFIC_SERVICE_CFG_TYPE_ENCRYPTED_TUNNEL_BEHAVIOR.equals(dict.getItemValue())) { // dict:DictUtils.getDictList("SPECIFIC_SERVICE_CFG_TYPE")) {
// if(Constants.SPECIFIC_SERVICE_CFG_TYPE_ENCRYPTED_TUNNEL_BEHAVIOR.equals(dict.getItemValue()))
// {
// second.setCfgType(Integer.parseInt(dict.getItemCode())); // second.setCfgType(Integer.parseInt(dict.getItemCode()));
// break; // break;
// } // }
// } // }
// second.setIsValid(Constants.VALID_YES); // second.setIsValid(Constants.VALID_YES);
// second.setIsLeaf(1); // second.setIsLeaf(1);
// List<SpecificServiceCfg> secondList=specificServiceCfgService.findAllSpecificServiceCfg(second, null); // List<SpecificServiceCfg>
// secondList=specificServiceCfgService.findAllSpecificServiceCfg(second,
// null);
// //遍历,找到匹配项后将行为设置进去 // //遍历,找到匹配项后将行为设置进去
// for(AppPolicyCfg entity:page.getList()){ // for(AppPolicyCfg entity:page.getList()){
// if(entity.getBehavCode()==null) continue; // if(entity.getBehavCode()==null) continue;
// for(SpecificServiceCfg secondCfg:secondList) { // for(SpecificServiceCfg secondCfg:secondList) {
// if(secondCfg.getSpecServiceCode()==null) continue; // if(secondCfg.getSpecServiceCode()==null) continue;
// if(secondCfg.getSpecServiceCode().intValue()==entity.getBehavCode().intValue()) { // if(secondCfg.getSpecServiceCode().intValue()==entity.getBehavCode().intValue())
// {
// entity.setBehavName(secondCfg.getSpecServiceName()); // entity.setBehavName(secondCfg.getSpecServiceName());
// break; // break;
// } // }
@@ -87,8 +96,10 @@ public class EncryptedTunnelBehaviorController extends BaseController {
initPageCondition(model, cfg); initPageCondition(model, cfg);
return "/cfg/encryptedtunnelbehav/list"; return "/cfg/encryptedtunnelbehav/list";
} }
/** /**
* 查询APP策略IP子配置 * 查询APP策略IP子配置
*
* @param model * @param model
* @param cfgId * @param cfgId
* @param index * @param index
@@ -121,8 +132,10 @@ public class EncryptedTunnelBehaviorController extends BaseController {
model.addAttribute("tabList", tabList); model.addAttribute("tabList", tabList);
return "/cfg/encryptedtunnelbehav/encrypedTunnelSubList"; return "/cfg/encryptedtunnelbehav/encrypedTunnelSubList";
} }
/** /**
* 策略配置表单 * 策略配置表单
*
* @param model * @param model
* @param ids * @param ids
* @param entity * @param entity
@@ -140,8 +153,10 @@ public class EncryptedTunnelBehaviorController extends BaseController {
model.addAttribute("_cfg", entity); model.addAttribute("_cfg", entity);
return "/cfg/encryptedtunnelbehav/form"; return "/cfg/encryptedtunnelbehav/form";
} }
/** /**
* 策略配置新增修改 * 策略配置新增修改
*
* @param model * @param model
* @param request * @param request
* @param response * @param response
@@ -154,7 +169,8 @@ public class EncryptedTunnelBehaviorController extends BaseController {
public String saveAppPolicyCfg(Model model, HttpServletRequest request, HttpServletResponse response, public String saveAppPolicyCfg(Model model, HttpServletRequest request, HttpServletResponse response,
AppPolicyCfg entity, RedirectAttributes redirectAttributes) { AppPolicyCfg entity, RedirectAttributes redirectAttributes) {
try { try {
SpecificServiceCfg specificService = specificServiceCfgService.getBySpecServiceId(entity.getSpecServiceId()); SpecificServiceCfg specificService = specificServiceCfgService
.getBySpecServiceId(entity.getSpecServiceId());
if (specificService != null) { if (specificService != null) {
entity.setAppCode(specificService.getSpecServiceCode()); entity.setAppCode(specificService.getSpecServiceCode());
} }
@@ -174,8 +190,10 @@ public class EncryptedTunnelBehaviorController extends BaseController {
return "redirect:" + adminPath + "/encryptedtunnelbehav/list?functionId=" + entity.getFunctionId(); return "redirect:" + adminPath + "/encryptedtunnelbehav/list?functionId=" + entity.getFunctionId();
} }
/** /**
* 策略配置审核 * 策略配置审核
*
* @param isAudit * @param isAudit
* @param isValid * @param isValid
* @param ids * @param ids
@@ -185,14 +203,9 @@ public class EncryptedTunnelBehaviorController extends BaseController {
*/ */
@RequestMapping(value = { "audit" }) @RequestMapping(value = { "audit" })
@RequiresPermissions(value = { "encryptedtunnelbehav:confirm" }) @RequiresPermissions(value = { "encryptedtunnelbehav:confirm" })
public String auditAppPolicyCfg(Model model,@ModelAttribute("cfg")AppPolicyCfg cfg, public String auditAppPolicyCfg(Model model, @ModelAttribute("cfg") AppPolicyCfg cfg, Integer isValid,
Integer isValid, Integer isAudit, String ids, Integer functionId, RedirectAttributes redirectAttributes,
Integer isAudit, HttpServletResponse response, HttpServletRequest request) {
String ids,
Integer functionId,
RedirectAttributes redirectAttributes,
HttpServletResponse response,
HttpServletRequest request) {
if (!StringUtil.isEmpty(ids)) { if (!StringUtil.isEmpty(ids)) {
AppPolicyCfg entity = new AppPolicyCfg(); AppPolicyCfg entity = new AppPolicyCfg();
String[] idArray = ids.split(","); String[] idArray = ids.split(",");
@@ -210,7 +223,8 @@ public class EncryptedTunnelBehaviorController extends BaseController {
} catch (Exception e) { } catch (Exception e) {
if (e instanceof MaatConvertException) { if (e instanceof MaatConvertException) {
e.printStackTrace(); e.printStackTrace();
logger.info("加密隧道配置下发失败:"+e.getMessage());; logger.info("加密隧道配置下发失败:" + e.getMessage());
;
addMessage(redirectAttributes, "error", "request_service_failed"); addMessage(redirectAttributes, "error", "request_service_failed");
} else { } else {
e.printStackTrace(); e.printStackTrace();
@@ -243,8 +257,10 @@ public class EncryptedTunnelBehaviorController extends BaseController {
return "redirect:" + adminPath + "/encryptedtunnelbehav/list?functionId=" + functionId; return "redirect:" + adminPath + "/encryptedtunnelbehav/list?functionId=" + functionId;
} }
/** /**
* 策略配置删除 * 策略配置删除
*
* @param isValid * @param isValid
* @param ids * @param ids
* @param functionId * @param functionId
@@ -252,7 +268,8 @@ public class EncryptedTunnelBehaviorController extends BaseController {
*/ */
@RequestMapping(value = { "updateValid" }) @RequestMapping(value = { "updateValid" })
@RequiresPermissions(value = { "encryptedtunnelbehav:config" }) @RequiresPermissions(value = { "encryptedtunnelbehav:config" })
public String updateAppPolicyCfgValid(Integer isValid,String ids,Integer functionId,RedirectAttributes redirectAttributes) { public String updateAppPolicyCfgValid(Integer isValid, String ids, Integer functionId,
RedirectAttributes redirectAttributes) {
try { try {
appCfgService.updateAppPolicyCfgValid(isValid, ids, functionId); appCfgService.updateAppPolicyCfgValid(isValid, ids, functionId);
} catch (Exception e) { } catch (Exception e) {
@@ -284,7 +301,7 @@ public class EncryptedTunnelBehaviorController extends BaseController {
ipLists = appCfgService.findAppByPolicyList(ids); ipLists = appCfgService.findAppByPolicyList(ids);
} else { } else {
entity.setTableName(IpPortCfg.getTablename()); entity.setTableName(IpPortCfg.getTablename());
Page<AppPolicyCfg> pageInfo=new Page<AppPolicyCfg>(request, response,"a"); Page<AppPolicyCfg> pageInfo = new Page<AppPolicyCfg>(request, response, "r");
pageInfo.setPageNo(1); pageInfo.setPageNo(1);
pageInfo.setPageSize(Constants.MAX_EXPORT_SIZE); pageInfo.setPageSize(Constants.MAX_EXPORT_SIZE);
Page<AppPolicyCfg> page = appCfgService.findAppPolicyList(pageInfo, entity); Page<AppPolicyCfg> page = appCfgService.findAppPolicyList(pageInfo, entity);
@@ -309,9 +326,11 @@ public class EncryptedTunnelBehaviorController extends BaseController {
List<SpecificServiceCfg> secondList = specificServiceCfgService.findAllSpecificServiceCfg(second, null); List<SpecificServiceCfg> secondList = specificServiceCfgService.findAllSpecificServiceCfg(second, null);
// 遍历,找到匹配项后将行为设置进去 // 遍历,找到匹配项后将行为设置进去
for (AppPolicyCfg policy : ipLists) { for (AppPolicyCfg policy : ipLists) {
if(policy.getBehavCode()==null) continue; if (policy.getBehavCode() == null)
continue;
for (SpecificServiceCfg secondCfg : secondList) { for (SpecificServiceCfg secondCfg : secondList) {
if(secondCfg.getSpecServiceCode()==null) continue; if (secondCfg.getSpecServiceCode() == null)
continue;
if (secondCfg.getSpecServiceCode().intValue() == policy.getBehavCode().intValue()) { if (secondCfg.getSpecServiceCode().intValue() == policy.getBehavCode().intValue()) {
policy.setBehavName(secondCfg.getSpecServiceName()); policy.setBehavName(secondCfg.getSpecServiceName());
break; break;
@@ -333,6 +352,21 @@ public class EncryptedTunnelBehaviorController extends BaseController {
+ ",config_time,editor,edit_time,auditor,audit_time" + ",config_time,editor,edit_time,auditor,audit_time"
+ ",letter,whether_area_block,classification,attribute,label" + ",letter,whether_area_block,classification,attribute,label"
+ ",userregion1,userregion2,userregion3,userregion4,userregion5,ir_type,group_name,"; + ",userregion1,userregion2,userregion3,userregion4,userregion5,ir_type,group_name,";
// 时间过滤
if (entity.getSearch_create_time_start() == null && entity.getSearch_create_time_end() == null) {
cfgIndexInfoNoExport = ",config_time" + cfgIndexInfoNoExport;
}
if (entity.getSearch_edit_time_start() == null && entity.getSearch_edit_time_end() == null) {
cfgIndexInfoNoExport = ",edit_time" + cfgIndexInfoNoExport;
}
if (entity.getSearch_audit_time_start() == null && entity.getSearch_audit_time_end() == null) {
cfgIndexInfoNoExport = ",audit_time" + cfgIndexInfoNoExport;
}
if (!StringUtil.isEmpty(entity.gethColumns())) {
cfgIndexInfoNoExport = "," + entity.gethColumns() + "," + cfgIndexInfoNoExport;
}
noExportMap.put(entity.getMenuNameCode(), cfgIndexInfoNoExport); noExportMap.put(entity.getMenuNameCode(), cfgIndexInfoNoExport);
noExportMap.put("NTC_IP", ipPortInfoNoExport); noExportMap.put("NTC_IP", ipPortInfoNoExport);
noExportMap.put("NTC_SUBSCRIBE_ID", subscribeInfoNoExport); noExportMap.put("NTC_SUBSCRIBE_ID", subscribeInfoNoExport);
@@ -349,13 +383,22 @@ public class EncryptedTunnelBehaviorController extends BaseController {
dataMap.put("NTC_SUBSCRIBE_ID", subscribeInfoList); dataMap.put("NTC_SUBSCRIBE_ID", subscribeInfoList);
/* } */ /* } */
this._export(model, request, response, redirectAttributes,entity.getMenuNameCode(),titleList,classMap,dataMap,noExportMap);
String timeRange = initTimeMap(entity);
noExportMap.put("timeRange", timeRange);
if ("csv".equals(entity.getExType())) {
this._exportCsv(model, request, response, redirectAttributes, entity.getMenuNameCode(), titleList,
classMap, dataMap, noExportMap);
} else {
this._export(model, request, response, redirectAttributes, entity.getMenuNameCode(), titleList,
classMap, dataMap, noExportMap);
}
} catch (Exception e) { } catch (Exception e) {
logger.error("TunnelBehavior export failed", e); logger.error("TunnelBehavior export failed", e);
addMessage(redirectAttributes, "error", "export_failed"); addMessage(redirectAttributes, "error", "export_failed");
} }
//return "redirect:" + adminPath +"/ntc/iplist/list?functionId="+entity.getFunctionId(); // return "redirect:" + adminPath
// +"/ntc/iplist/list?functionId="+entity.getFunctionId();
} }
} }

View File

@@ -44,28 +44,29 @@ import com.nis.web.service.configuration.DnsIpCfgService;
public class DnsIpCfgController extends BaseController { public class DnsIpCfgController extends BaseController {
@RequestMapping(value = { "/list" }) @RequestMapping(value = { "/list" })
public String list(Model model,HttpServletRequest request public String list(Model model, HttpServletRequest request, HttpServletResponse response,
,HttpServletResponse response,@ModelAttribute("cfg")DnsIpCfg entity @ModelAttribute("cfg") DnsIpCfg entity, RedirectAttributes redirectAttributes) {
,RedirectAttributes redirectAttributes){
Page<DnsIpCfg> page = dnsIpCfgService.findPage(new Page<DnsIpCfg>(request, response, "r"), entity); Page<DnsIpCfg> page = dnsIpCfgService.findPage(new Page<DnsIpCfg>(request, response, "r"), entity);
model.addAttribute("page", page); model.addAttribute("page", page);
initPageCondition(model, entity); initPageCondition(model, entity);
return "/cfg/dnsIpCfgList"; return "/cfg/dnsIpCfgList";
} }
@RequestMapping(value = { "/form" }) @RequestMapping(value = { "/form" })
@RequiresPermissions(value = { "dns:fake:ip:config" }) @RequiresPermissions(value = { "dns:fake:ip:config" })
public String form(Model model,HttpServletRequest request public String form(Model model, HttpServletRequest request, HttpServletResponse response, String ids,
,HttpServletResponse response,String ids,@ModelAttribute("cfg")DnsIpCfg cfg @ModelAttribute("cfg") DnsIpCfg cfg, RedirectAttributes redirectAttributes) {
,RedirectAttributes redirectAttributes){
if (!StringUtil.isEmpty(ids)) { if (!StringUtil.isEmpty(ids)) {
cfg = dnsIpCfgService.getDnsIpCfg(Long.parseLong(ids)); cfg = dnsIpCfgService.getDnsIpCfg(Long.parseLong(ids));
initUpdateFormCondition(model, cfg); initUpdateFormCondition(model, cfg);
} else { } else {
initFormCondition(model, cfg); initFormCondition(model, cfg);
} }
/*//获取所有响应策略信息 /*
List<DnsResStrategy> resStrategys=dnsResStrategyService.findDnsResStrategys(null, 1,1); * //获取所有响应策略信息 List<DnsResStrategy>
model.addAttribute("dnsResStrategys", resStrategys);*/ * resStrategys=dnsResStrategyService.findDnsResStrategys(null, 1,1);
* model.addAttribute("dnsResStrategys", resStrategys);
*/
// 查询policyGroup列表供响应策略选择 2018-07-24 经确定IP欺骗只能选择非0号分组 // 查询policyGroup列表供响应策略选择 2018-07-24 经确定IP欺骗只能选择非0号分组
List<PolicyGroupInfo> policyGroups = policyGroupInfoService.findPolicyGroupInfosByType(1); List<PolicyGroupInfo> policyGroups = policyGroupInfoService.findPolicyGroupInfosByType(1);
model.addAttribute("policyGroups", policyGroups); model.addAttribute("policyGroups", policyGroups);
@@ -75,6 +76,7 @@ public class DnsIpCfgController extends BaseController {
/** /**
* 初始化一条dns fakeip配置 * 初始化一条dns fakeip配置
*
* @return * @return
*/ */
@ResponseBody @ResponseBody
@@ -101,12 +103,11 @@ public class DnsIpCfgController extends BaseController {
} }
return "success"; return "success";
} }
@RequestMapping(value = { "/saveOrUpdate" }) @RequestMapping(value = { "/saveOrUpdate" })
@RequiresPermissions(value = { "dns:fake:ip:config" }) @RequiresPermissions(value = { "dns:fake:ip:config" })
public String saveOrUpdate(Model model,HttpServletRequest request public String saveOrUpdate(Model model, HttpServletRequest request, HttpServletResponse response,
,HttpServletResponse response, @ModelAttribute("cfg") DnsIpCfg cfg, RedirectAttributes redirectAttributes) {
@ModelAttribute("cfg")DnsIpCfg cfg
,RedirectAttributes redirectAttributes){
try { try {
dnsIpCfgService.saveOrUpdate(cfg); dnsIpCfgService.saveOrUpdate(cfg);
addMessage(redirectAttributes, "success", "save_success"); addMessage(redirectAttributes, "success", "save_success");
@@ -125,21 +126,16 @@ public class DnsIpCfgController extends BaseController {
@RequestMapping(value = { "/delete" }) @RequestMapping(value = { "/delete" })
@RequiresPermissions(value = { "dns:fake:ip:config" }) @RequiresPermissions(value = { "dns:fake:ip:config" })
public String delete(Integer isAudit,Integer isValid public String delete(Integer isAudit, Integer isValid, String ids, Integer functionId,
,String ids,Integer functionId RedirectAttributes redirectAttributes) {
,RedirectAttributes redirectAttributes){
dnsIpCfgService.delete(isAudit, isValid, ids, functionId); dnsIpCfgService.delete(isAudit, isValid, ids, functionId);
return "redirect:" + adminPath + "/cfg/dnsIp/list?functionId=" + functionId; return "redirect:" + adminPath + "/cfg/dnsIp/list?functionId=" + functionId;
} }
@RequestMapping(value = { "/audit" }) @RequestMapping(value = { "/audit" })
@RequiresPermissions(value = { "dns:fake:ip:confirm" }) @RequiresPermissions(value = { "dns:fake:ip:confirm" })
public String audit(Model model,@ModelAttribute("cfg")DnsIpCfg cfg, public String audit(Model model, @ModelAttribute("cfg") DnsIpCfg cfg, Integer isValid, Integer isAudit, String ids,
Integer isValid, Integer functionId, RedirectAttributes redirectAttributes, HttpServletResponse response,
Integer isAudit,
String ids,
Integer functionId,
RedirectAttributes redirectAttributes,
HttpServletResponse response,
HttpServletRequest request) { HttpServletRequest request) {
if (!StringUtil.isEmpty(ids)) { if (!StringUtil.isEmpty(ids)) {
String[] idArray = ids.split(","); String[] idArray = ids.split(",");
@@ -185,6 +181,7 @@ public class DnsIpCfgController extends BaseController {
/** /**
* DNS阻断无策略时检验 * DNS阻断无策略时检验
*
* @param entity * @param entity
* @param request * @param request
* @param response * @param response
@@ -213,7 +210,6 @@ public class DnsIpCfgController extends BaseController {
Map<String, List> dataMap = new HashMap<String, List>(); Map<String, List> dataMap = new HashMap<String, List>();
Map<String, String> noExportMap = new HashMap<String, String>(); Map<String, String> noExportMap = new HashMap<String, String>();
List<DnsIpCfg> ipLists = new ArrayList<DnsIpCfg>(); List<DnsIpCfg> ipLists = new ArrayList<DnsIpCfg>();
// 导出选中记录 // 导出选中记录
if (!StringUtil.isEmpty(ids)) { if (!StringUtil.isEmpty(ids)) {
@@ -235,10 +231,33 @@ public class DnsIpCfgController extends BaseController {
titleList.add(entity.getMenuNameCode()); titleList.add(entity.getMenuNameCode());
classMap.put(entity.getMenuNameCode(), DnsIpCfg.class); 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,"; 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,";
// 时间过滤
if (entity.getSearch_create_time_start() == null && entity.getSearch_create_time_end() == null) {
cfgIndexInfoNoExport = ",config_time" + cfgIndexInfoNoExport;
}
if (entity.getSearch_edit_time_start() == null && entity.getSearch_edit_time_end() == null) {
cfgIndexInfoNoExport = ",edit_time" + cfgIndexInfoNoExport;
}
if (entity.getSearch_audit_time_start() == null && entity.getSearch_audit_time_end() == null) {
cfgIndexInfoNoExport = ",audit_time" + cfgIndexInfoNoExport;
}
if (!StringUtil.isEmpty(entity.gethColumns())) {
cfgIndexInfoNoExport = "," + entity.gethColumns() + "," + cfgIndexInfoNoExport;
}
noExportMap.put(entity.getMenuNameCode(), cfgIndexInfoNoExport); noExportMap.put(entity.getMenuNameCode(), cfgIndexInfoNoExport);
dataMap.put(entity.getMenuNameCode(), ipLists); dataMap.put(entity.getMenuNameCode(), ipLists);
/*}*/
this._export(model, request, response, redirectAttributes,entity.getMenuNameCode(),titleList,classMap,dataMap,noExportMap); String timeRange = initTimeMap(entity);
noExportMap.put("timeRange", timeRange);
if ("csv".equals(entity.getExType())) {
this._exportCsv(model, request, response, redirectAttributes, entity.getMenuNameCode(), titleList,
classMap, dataMap, noExportMap);
} else {
this._export(model, request, response, redirectAttributes, entity.getMenuNameCode(), titleList,
classMap, dataMap, noExportMap);
}
} catch (Exception e) { } catch (Exception e) {
logger.error("DnsIp export failed", e); logger.error("DnsIp export failed", e);
if (e instanceof MaatConvertException) { if (e instanceof MaatConvertException) {
@@ -247,6 +266,7 @@ public class DnsIpCfgController extends BaseController {
addMessage(redirectAttributes, "error", "export_failed"); addMessage(redirectAttributes, "error", "export_failed");
} }
} }
//return "redirect:" + adminPath +"/ntc/iplist/list?functionId="+entity.getFunctionId(); // return "redirect:" + adminPath
// +"/ntc/iplist/list?functionId="+entity.getFunctionId();
} }
} }

View File

@@ -33,6 +33,7 @@ import com.nis.web.controller.BaseController;
/** /**
* dns响应策略 * dns响应策略
*
* @author ddm * @author ddm
* *
*/ */
@@ -42,12 +43,8 @@ public class DnsResStrategyController extends BaseController {
@RequestMapping(value = { "/form" }) @RequestMapping(value = { "/form" })
@RequiresPermissions(value = { "dns:res:strategy:config" }) @RequiresPermissions(value = { "dns:res:strategy:config" })
public String from(Model model, public String from(Model model, HttpServletRequest request, HttpServletResponse response, String ids,
HttpServletRequest request, @ModelAttribute("cfg") DnsResStrategy cfg, RedirectAttributes redirectAttributes) {
HttpServletResponse response,
String ids,
@ModelAttribute("cfg")DnsResStrategy cfg
,RedirectAttributes redirectAttributes){
if (cfg == null) { if (cfg == null) {
cfg = new DnsResStrategy(); cfg = new DnsResStrategy();
} }
@@ -56,18 +53,18 @@ public class DnsResStrategyController extends BaseController {
initFormCondition(model, cfg); initFormCondition(model, cfg);
model.addAttribute("isAdd", false); model.addAttribute("isAdd", false);
} else { } else {
/*//不存在响应策略为0的配置则新策略时cfgId默认为0 /*
DnsResStrategy dns0=dnsResStrategyService.getDnsResStrategy(0l,null); * //不存在响应策略为0的配置则新策略时cfgId默认为0 DnsResStrategy
if(dns0 == null){ * dns0=dnsResStrategyService.getDnsResStrategy(0l,null); if(dns0 ==
cfg.setCfgId(0l); * null){ cfg.setCfgId(0l); cfg.setCfgDesc("无策略"); }
cfg.setCfgDesc("无策略"); */
}*/
initFormCondition(model, cfg); initFormCondition(model, cfg);
model.addAttribute("isAdd", true); model.addAttribute("isAdd", true);
} }
// 查询policyGroup列表供响应策略选择 // 查询policyGroup列表供响应策略选择
// List<PolicyGroupInfo> policyGroups=policyGroupInfoService.findPolicyGroupInfosByType(1); // List<PolicyGroupInfo>
// policyGroups=policyGroupInfoService.findPolicyGroupInfosByType(1);
List<PolicyGroupInfo> policyGroups = policyGroupInfoService.findHasIpPolicyGroupInfosByType(1); List<PolicyGroupInfo> policyGroups = policyGroupInfoService.findHasIpPolicyGroupInfosByType(1);
model.addAttribute("policyGroups", policyGroups); model.addAttribute("policyGroups", policyGroups);
@@ -78,8 +75,7 @@ public class DnsResStrategyController extends BaseController {
@RequestMapping(value = { "/saveOrUpdate" }) @RequestMapping(value = { "/saveOrUpdate" })
@RequiresPermissions(value = { "dns:res:strategy:config" }) @RequiresPermissions(value = { "dns:res:strategy:config" })
public String saveOrUpdate(Model model, HttpServletRequest request, HttpServletResponse response, public String saveOrUpdate(Model model, HttpServletRequest request, HttpServletResponse response,
@ModelAttribute("cfg")DnsResStrategy cfg @ModelAttribute("cfg") DnsResStrategy cfg, RedirectAttributes redirectAttributes) {
,RedirectAttributes redirectAttributes){
try { try {
dnsResStrategyService.saveOrUpdate(cfg); dnsResStrategyService.saveOrUpdate(cfg);
@@ -95,11 +91,11 @@ public class DnsResStrategyController extends BaseController {
} }
@RequestMapping(value = { "/list" }) @RequestMapping(value = { "/list" })
public String list(Model model,HttpServletRequest request,HttpServletResponse response public String list(Model model, HttpServletRequest request, HttpServletResponse response,
,@ModelAttribute("cfg")DnsResStrategy entity @ModelAttribute("cfg") DnsResStrategy entity, RedirectAttributes redirectAttributes) {
,RedirectAttributes redirectAttributes){
// 查询时left join policyGroup // 查询时left join policyGroup
Page<DnsResStrategy> page = dnsResStrategyService.findPage(new Page<DnsResStrategy>(request, response,"r"), entity); Page<DnsResStrategy> page = dnsResStrategyService.findPage(new Page<DnsResStrategy>(request, response, "r"),
entity);
model.addAttribute("page", page); model.addAttribute("page", page);
initPageCondition(model, entity); initPageCondition(model, entity);
return "/cfg/maintenance/dnsResStrategy/list"; return "/cfg/maintenance/dnsResStrategy/list";
@@ -107,10 +103,8 @@ public class DnsResStrategyController extends BaseController {
@RequestMapping(value = { "/delete" }) @RequestMapping(value = { "/delete" })
@RequiresPermissions(value = { "dns:res:strategy:config" }) @RequiresPermissions(value = { "dns:res:strategy:config" })
public String delete(Integer isAudit,Integer isValid,String ids,Integer functionId public String delete(Integer isAudit, Integer isValid, String ids, Integer functionId, Model model,
,Model model,HttpServletRequest request HttpServletRequest request, HttpServletResponse response, RedirectAttributes redirectAttributes) {
,HttpServletResponse response
,RedirectAttributes redirectAttributes){
if (!StringUtil.isEmpty(ids)) { if (!StringUtil.isEmpty(ids)) {
dnsResStrategyService.delete(isAudit, isValid, ids, functionId); dnsResStrategyService.delete(isAudit, isValid, ids, functionId);
} }
@@ -120,13 +114,8 @@ public class DnsResStrategyController extends BaseController {
@RequestMapping(value = { "/audit" }) @RequestMapping(value = { "/audit" })
@RequiresPermissions(value = { "dns:res:strategy:confirm" }) @RequiresPermissions(value = { "dns:res:strategy:confirm" })
public String audit(Model model,@ModelAttribute("cfg")DnsResStrategy cfg, public String audit(Model model, @ModelAttribute("cfg") DnsResStrategy cfg, Integer isValid, Integer isAudit,
Integer isValid, String ids, Integer functionId, RedirectAttributes redirectAttributes, HttpServletResponse response,
Integer isAudit,
String ids,
Integer functionId,
RedirectAttributes redirectAttributes,
HttpServletResponse response,
HttpServletRequest request) { HttpServletRequest request) {
if (!StringUtil.isEmpty(ids)) { if (!StringUtil.isEmpty(ids)) {
String[] idArray = ids.split(","); String[] idArray = ids.split(",");
@@ -164,6 +153,7 @@ public class DnsResStrategyController extends BaseController {
} }
return "redirect:" + adminPath + "/maintenance/dnsResStrategy/list?functionId=" + functionId; return "redirect:" + adminPath + "/maintenance/dnsResStrategy/list?functionId=" + functionId;
} }
@ResponseBody @ResponseBody
@RequestMapping(value = "/validCfgId") @RequestMapping(value = "/validCfgId")
public boolean validCfgId(Long cfgId) { public boolean validCfgId(Long cfgId) {
@@ -198,16 +188,42 @@ public class DnsResStrategyController extends BaseController {
} }
for (int i = 0; i < ipLists.size(); i++) { for (int i = 0; i < ipLists.size(); i++) {
ipLists.get(i).setMiTtlmax(String.valueOf(ipLists.get(i).getMinTtl())+"-"+String.valueOf(ipLists.get(i).getMaxTtl())); ipLists.get(i).setMiTtlmax(
String.valueOf(ipLists.get(i).getMinTtl()) + "-" + String.valueOf(ipLists.get(i).getMaxTtl()));
ipLists.get(i).setDnsId(String.valueOf(ipLists.get(i).getCfgId())); ipLists.get(i).setDnsId(String.valueOf(ipLists.get(i).getCfgId()));
} }
titleList.add(entity.getMenuNameCode()); titleList.add(entity.getMenuNameCode());
classMap.put(entity.getMenuNameCode(), DnsResStrategy.class); classMap.put(entity.getMenuNameCode(), DnsResStrategy.class);
String cfgIndexInfoNoExport=",cfg_id,valid_identifier,do_log,client_port,ir_type,group_name,userregion1,userregion2,userregion3,userregion4,userregion5,"; String cfgIndexInfoNoExport = ",cfg_id,valid_identifier,do_log,client_port,ir_type,group_name,userregion1,userregion2,userregion3,userregion4,userregion5,&config_describe:policy_name-";
// 时间过滤
if (entity.getSearch_create_time_start() == null && entity.getSearch_create_time_end() == null) {
cfgIndexInfoNoExport = ",config_time" + cfgIndexInfoNoExport;
}
if (entity.getSearch_edit_time_start() == null && entity.getSearch_edit_time_end() == null) {
cfgIndexInfoNoExport = ",edit_time" + cfgIndexInfoNoExport;
}
if (entity.getSearch_audit_time_start() == null && entity.getSearch_audit_time_end() == null) {
cfgIndexInfoNoExport = ",audit_time" + cfgIndexInfoNoExport;
}
if (!StringUtil.isEmpty(entity.gethColumns())) {
if (entity.gethColumns().contains("policy_name")) {
cfgIndexInfoNoExport = ",config_describe," + cfgIndexInfoNoExport;
}
cfgIndexInfoNoExport = "," + entity.gethColumns() + "," + cfgIndexInfoNoExport;
}
noExportMap.put(entity.getMenuNameCode(), cfgIndexInfoNoExport); noExportMap.put(entity.getMenuNameCode(), cfgIndexInfoNoExport);
dataMap.put(entity.getMenuNameCode(), ipLists); dataMap.put(entity.getMenuNameCode(), ipLists);
/*}*/
this._export(model, request, response, redirectAttributes,entity.getMenuNameCode(),titleList,classMap,dataMap,noExportMap); String timeRange = initTimeMap(entity);
noExportMap.put("timeRange", timeRange);
if ("csv".equals(entity.getExType())) {
this._exportCsv(model, request, response, redirectAttributes, entity.getMenuNameCode(), titleList,
classMap, dataMap, noExportMap);
} else {
this._export(model, request, response, redirectAttributes, entity.getMenuNameCode(), titleList,
classMap, dataMap, noExportMap);
}
} catch (Exception e) { } catch (Exception e) {
logger.error("Dns export failed", e); logger.error("Dns export failed", e);
if (e instanceof MaatConvertException) { if (e instanceof MaatConvertException) {
@@ -216,6 +232,7 @@ public class DnsResStrategyController extends BaseController {
addMessage(redirectAttributes, "error", "export_failed"); addMessage(redirectAttributes, "error", "export_failed");
} }
} }
//return "redirect:" + adminPath +"/ntc/iplist/list?functionId="+entity.getFunctionId(); // return "redirect:" + adminPath
// +"/ntc/iplist/list?functionId="+entity.getFunctionId();
} }
} }

View File

@@ -38,10 +38,7 @@ public class IpMultiplexPoolCfgController extends BaseController {
@RequestMapping(value = { "/form" }) @RequestMapping(value = { "/form" })
@RequiresPermissions(value = { "ip:mulitiplex:pool:config" }) @RequiresPermissions(value = { "ip:mulitiplex:pool:config" })
public String from(Model model, public String from(Model model, HttpServletRequest request, HttpServletResponse response, String ids,
HttpServletRequest request,
HttpServletResponse response,
String ids,
@ModelAttribute("cfg") IpMultiplexPoolCfg cfg) { @ModelAttribute("cfg") IpMultiplexPoolCfg cfg) {
if (cfg == null) { if (cfg == null) {
cfg = new IpMultiplexPoolCfg(); cfg = new IpMultiplexPoolCfg();
@@ -62,8 +59,8 @@ public class IpMultiplexPoolCfgController extends BaseController {
@RequestMapping(value = { "/saveOrUpdate" }) @RequestMapping(value = { "/saveOrUpdate" })
@RequiresPermissions(value = { "ip:mulitiplex:pool:config" }) @RequiresPermissions(value = { "ip:mulitiplex:pool:config" })
public String saveOrUpdate(Model model,HttpServletRequest request,HttpServletResponse response,RedirectAttributes redirectAttributes, public String saveOrUpdate(Model model, HttpServletRequest request, HttpServletResponse response,
@ModelAttribute("cfg")IpMultiplexPoolCfg cfg){ RedirectAttributes redirectAttributes, @ModelAttribute("cfg") IpMultiplexPoolCfg cfg) {
try { try {
// 设置省份信息 // 设置省份信息
groupAreaService.setAreaCodeByGroupId(cfg); groupAreaService.setAreaCodeByGroupId(cfg);
@@ -84,9 +81,11 @@ public class IpMultiplexPoolCfgController extends BaseController {
} }
@RequestMapping(value = { "/list" }) @RequestMapping(value = { "/list" })
public String list(Model model,HttpServletRequest request,HttpServletResponse response,@ModelAttribute("cfg")IpMultiplexPoolCfg entity){ public String list(Model model, HttpServletRequest request, HttpServletResponse response,
@ModelAttribute("cfg") IpMultiplexPoolCfg entity) {
// 查询时left join policyGroup // 查询时left join policyGroup
Page<IpMultiplexPoolCfg> page = ipMultiplexPoolCfgService.findPage(new Page<IpMultiplexPoolCfg>(request, response,"r"), entity); Page<IpMultiplexPoolCfg> page = ipMultiplexPoolCfgService
.findPage(new Page<IpMultiplexPoolCfg>(request, response, "r"), entity);
model.addAttribute("page", page); model.addAttribute("page", page);
initPageCondition(model, entity); initPageCondition(model, entity);
return "/cfg/maintenance/ipMultiplexPool/list"; return "/cfg/maintenance/ipMultiplexPool/list";
@@ -94,8 +93,8 @@ public class IpMultiplexPoolCfgController extends BaseController {
@RequestMapping(value = { "/delete" }) @RequestMapping(value = { "/delete" })
@RequiresPermissions(value = { "ip:mulitiplex:pool:config" }) @RequiresPermissions(value = { "ip:mulitiplex:pool:config" })
public String delete(Integer isAudit,Integer isValid,String ids,Integer functionId,Model model,RedirectAttributes redirectAttributes public String delete(Integer isAudit, Integer isValid, String ids, Integer functionId, Model model,
,HttpServletRequest request,HttpServletResponse response){ RedirectAttributes redirectAttributes, HttpServletRequest request, HttpServletResponse response) {
try { try {
if (!StringUtil.isEmpty(ids)) { if (!StringUtil.isEmpty(ids)) {
ipMultiplexPoolCfgService.delete(isAudit, isValid, ids, functionId); ipMultiplexPoolCfgService.delete(isAudit, isValid, ids, functionId);
@@ -110,7 +109,8 @@ public class IpMultiplexPoolCfgController extends BaseController {
@RequestMapping(value = { "/audit" }) @RequestMapping(value = { "/audit" })
@RequiresPermissions(value = { "ip:mulitiplex:pool:confirm" }) @RequiresPermissions(value = { "ip:mulitiplex:pool:confirm" })
public String audit(Integer isAudit,Integer isValid,String ids,Integer functionId,RedirectAttributes redirectAttributes) { public String audit(Integer isAudit, Integer isValid, String ids, Integer functionId,
RedirectAttributes redirectAttributes) {
if (!StringUtil.isEmpty(ids)) { if (!StringUtil.isEmpty(ids)) {
String[] idArray = ids.split(","); String[] idArray = ids.split(",");
Date auditTime = new Date(); Date auditTime = new Date();
@@ -132,6 +132,7 @@ public class IpMultiplexPoolCfgController extends BaseController {
} }
return "redirect:" + adminPath + "/maintenance/ipMultiplexPoolCfg/list?functionId=" + functionId; return "redirect:" + adminPath + "/maintenance/ipMultiplexPoolCfg/list?functionId=" + functionId;
} }
@ResponseBody @ResponseBody
@RequestMapping(value = "/validCfgId") @RequestMapping(value = "/validCfgId")
public boolean validCfgId(Long cfgId) { public boolean validCfgId(Long cfgId) {
@@ -143,104 +144,90 @@ public class IpMultiplexPoolCfgController extends BaseController {
} }
} }
/*@RequestMapping(value = {"/snatlist"}) /*
public String snatlist(Model model,HttpServletRequest request,HttpServletResponse response,@ModelAttribute("cfg")IpMultiplexPoolCfg entity){ * @RequestMapping(value = {"/snatlist"}) public String snatlist(Model
//查询时left join policyGroup * model,HttpServletRequest request,HttpServletResponse
Page<IpMultiplexPoolCfg> page = ipMultiplexPoolCfgService.findPage(new Page<IpMultiplexPoolCfg>(request, response,"r"), entity); * response,@ModelAttribute("cfg")IpMultiplexPoolCfg entity){ //查询时left join
model.addAttribute("page", page); * policyGroup Page<IpMultiplexPoolCfg> page =
initFormCondition(model,entity); * ipMultiplexPoolCfgService.findPage(new Page<IpMultiplexPoolCfg>(request,
return "/cfg/maintenance/ipMultiplexPool/snatlist"; * response,"r"), entity); model.addAttribute("page", page);
} * initFormCondition(model,entity); return
* "/cfg/maintenance/ipMultiplexPool/snatlist"; }
@RequestMapping(value = {"/snatform"}) *
@RequiresPermissions(value={"ip:mulitiplex:pool:config"}) * @RequestMapping(value = {"/snatform"})
public String snatfrom(Model model, *
HttpServletRequest request, * @RequiresPermissions(value={"ip:mulitiplex:pool:config"}) public String
HttpServletResponse response, * snatfrom(Model model, HttpServletRequest request, HttpServletResponse
String ids, * response, String ids,
@ModelAttribute("cfg")IpMultiplexPoolCfg cfg){ *
if(cfg == null){ * @ModelAttribute("cfg")IpMultiplexPoolCfg cfg){ if(cfg == null){ cfg=new
cfg=new IpMultiplexPoolCfg(); * IpMultiplexPoolCfg(); } if(!StringUtil.isEmpty(ids)){ cfg =
} * ipMultiplexPoolCfgService.getIpMultiplexPoolCfg(Long.valueOf(ids),null);
if(!StringUtil.isEmpty(ids)){ * initUpdateFormCondition(model, cfg); }else{ initFormCondition(model,
cfg = ipMultiplexPoolCfgService.getIpMultiplexPoolCfg(Long.valueOf(ids),null); * cfg); }
initUpdateFormCondition(model, cfg); *
}else{ * //查询ip复用地址池配置的policyGroup列表 List<PolicyGroupInfo>
initFormCondition(model, cfg); * policyGroups=policyGroupInfoService.getHasAreaPolicyGroups(2);
} * model.addAttribute("policyGroups", policyGroups);
* model.addAttribute("_cfg", cfg); return
//查询ip复用地址池配置的policyGroup列表 * "/cfg/maintenance/ipMultiplexPool/snatform"; }
List<PolicyGroupInfo> policyGroups=policyGroupInfoService.getHasAreaPolicyGroups(2); *
model.addAttribute("policyGroups", policyGroups); * @RequestMapping(value = {"/snatsaveOrUpdate"})
model.addAttribute("_cfg", cfg); *
return "/cfg/maintenance/ipMultiplexPool/snatform"; * @RequiresPermissions(value={"ip:mulitiplex:pool:config"}) public String
} * snatsaveOrUpdate(Model model,HttpServletRequest
* request,HttpServletResponse response,RedirectAttributes
@RequestMapping(value = {"/snatsaveOrUpdate"}) * redirectAttributes,
@RequiresPermissions(value={"ip:mulitiplex:pool:config"}) *
public String snatsaveOrUpdate(Model model,HttpServletRequest request,HttpServletResponse response,RedirectAttributes redirectAttributes, * @ModelAttribute("cfg")IpMultiplexPoolCfg cfg){ try{ // 设置省份信息
@ModelAttribute("cfg")IpMultiplexPoolCfg cfg){ * if(!StringUtil.isEmpty(cfg.getPolicyGroup())){
try{ * groupAreaService.setAreaCodeByGroupId(cfg); }
// 设置省份信息 * ipMultiplexPoolCfgService.saveOrUpdate(cfg);
if(!StringUtil.isEmpty(cfg.getPolicyGroup())){ *
groupAreaService.setAreaCodeByGroupId(cfg); * addMessage(redirectAttributes,"success","save_success"); }catch(Exception
} * e){ e.printStackTrace(); if(e instanceof MaatConvertException) {
ipMultiplexPoolCfgService.saveOrUpdate(cfg); * addMessage(redirectAttributes,"error", "request_service_failed"); }else {
* addMessage(redirectAttributes,"error", "save_failed"); } }
addMessage(redirectAttributes,"success","save_success"); *
}catch(Exception e){ * return "redirect:" + adminPath
e.printStackTrace(); * +"/maintenance/ipMultiplexPoolCfg/snatlist?functionId="+cfg.getFunctionId
if(e instanceof MaatConvertException) { * (); }
addMessage(redirectAttributes,"error", "request_service_failed"); *
}else { * @RequestMapping(value = {"/snataudit"})
addMessage(redirectAttributes,"error", "save_failed"); *
} * @RequiresPermissions(value={"ip:mulitiplex:pool:confirm"}) public String
} * snataudit(Integer isAudit,Integer isValid,String ids,Integer
* functionId,RedirectAttributes redirectAttributes) {
return "redirect:" + adminPath +"/maintenance/ipMultiplexPoolCfg/snatlist?functionId="+cfg.getFunctionId(); * if(!StringUtil.isEmpty(ids)){ String[] idArray = ids.split(","); Date
} * auditTime=new Date(); for(String id :idArray){ try {
* ipMultiplexPoolCfgService.audit(isAudit,isValid,functionId,id,auditTime);
@RequestMapping(value = {"/snataudit"}) * } catch (Exception e) { e.printStackTrace();
@RequiresPermissions(value={"ip:mulitiplex:pool:confirm"}) * logger.error("SNAT地址池管理配置下发失败"+e.getMessage()); if(e instanceof
public String snataudit(Integer isAudit,Integer isValid,String ids,Integer functionId,RedirectAttributes redirectAttributes) { * MaatConvertException) { addMessage(redirectAttributes,"error",
if(!StringUtil.isEmpty(ids)){ * "request_service_failed"); }else { addMessage(redirectAttributes,"error",
String[] idArray = ids.split(","); * "audit_failed"); } } }
Date auditTime=new Date(); *
for(String id :idArray){ * } return "redirect:" + adminPath
try { * +"/maintenance/ipMultiplexPoolCfg/snatlist?functionId="+functionId; }
ipMultiplexPoolCfgService.audit(isAudit,isValid,functionId,id,auditTime); *
} catch (Exception e) { * @RequestMapping(value = {"/snatdelete"})
e.printStackTrace(); *
logger.error("SNAT地址池管理配置下发失败"+e.getMessage()); * @RequiresPermissions(value={"ip:mulitiplex:pool:config"}) public String
if(e instanceof MaatConvertException) { * snatdelete(Integer isAudit,Integer isValid,String ids,Integer
addMessage(redirectAttributes,"error", "request_service_failed"); * functionId,Model model,RedirectAttributes redirectAttributes
}else { * ,HttpServletRequest request,HttpServletResponse response){ try{
addMessage(redirectAttributes,"error", "audit_failed"); * if(!StringUtil.isEmpty(ids)){
} * ipMultiplexPoolCfgService.delete(isAudit,isValid,ids,functionId); }
} * addMessage(redirectAttributes,"success","delete_success");
} * }catch(Exception e){ logger.error(e);
* addMessage(redirectAttributes,"error","delete_failed"); } return
} * "redirect:" + adminPath
return "redirect:" + adminPath +"/maintenance/ipMultiplexPoolCfg/snatlist?functionId="+functionId; * +"/maintenance/ipMultiplexPoolCfg/snatlist?functionId="+functionId; }
} */
@RequestMapping(value = {"/snatdelete"})
@RequiresPermissions(value={"ip:mulitiplex:pool:config"})
public String snatdelete(Integer isAudit,Integer isValid,String ids,Integer functionId,Model model,RedirectAttributes redirectAttributes
,HttpServletRequest request,HttpServletResponse response){
try{
if(!StringUtil.isEmpty(ids)){
ipMultiplexPoolCfgService.delete(isAudit,isValid,ids,functionId);
}
addMessage(redirectAttributes,"success","delete_success");
}catch(Exception e){
logger.error(e);
addMessage(redirectAttributes,"error","delete_failed");
}
return "redirect:" + adminPath +"/maintenance/ipMultiplexPoolCfg/snatlist?functionId="+functionId;
}*/
/** /**
* 校验IP是否已存在 * 校验IP是否已存在
*
* @param cfg * @param cfg
* @param redirectAttributes * @param redirectAttributes
* @param request * @param request
@@ -276,14 +263,12 @@ public class IpMultiplexPoolCfgController extends BaseController {
Map<String, List> dataMap = new HashMap<String, List>(); Map<String, List> dataMap = new HashMap<String, List>();
Map<String, String> noExportMap = new HashMap<String, String>(); Map<String, String> noExportMap = new HashMap<String, String>();
/*
/*//导出选中记录 * //导出选中记录 if(!StringUtil.isEmpty(ids)){ for(String
* if(!StringUtil.isEmpty(ids)){ * id:ids.split(",")){ Long.parseLong(id); } //List<CfgIndexInfo>
for(String id:ids.split(",")){ * list=ipCfgService.getListByCfgIdWithName(IpPortCfg.getTablename()
Long.parseLong(id); * , entity.getFunctionId(), ids); }else{
} */
//List<CfgIndexInfo> list=ipCfgService.getListByCfgIdWithName(IpPortCfg.getTablename(), entity.getFunctionId(), ids);
}else{*/
// 条件导出数据大于最大导出数,只导出最大导出条数 // 条件导出数据大于最大导出数,只导出最大导出条数
Page<IpMultiplexPoolCfg> pageInfo = new Page<IpMultiplexPoolCfg>(request, response, "r"); Page<IpMultiplexPoolCfg> pageInfo = new Page<IpMultiplexPoolCfg>(request, response, "r");
pageInfo.setPageNo(1); pageInfo.setPageNo(1);
@@ -293,15 +278,40 @@ public class IpMultiplexPoolCfgController extends BaseController {
titleList.add(entity.getMenuNameCode()); titleList.add(entity.getMenuNameCode());
classMap.put(entity.getMenuNameCode(), IpMultiplexPoolCfg.class); classMap.put(entity.getMenuNameCode(), IpMultiplexPoolCfg.class);
String snatNoExport = ",server_port,direction,protocol,do_log,whether_area_block,userregion1,userregion2,userregion3,userregion4,userregion5,group_name,"; String snatNoExport = ",server_port,direction,protocol,do_log,whether_area_block,userregion1,userregion2,userregion3,userregion4,userregion5,group_name,";
// 时间过滤
if (entity.getSearch_create_time_start() == null && entity.getSearch_create_time_end() == null) {
snatNoExport = ",config_time" + snatNoExport;
}
if (entity.getSearch_edit_time_start() == null && entity.getSearch_edit_time_end() == null) {
snatNoExport = ",edit_time" + snatNoExport;
}
if (entity.getSearch_audit_time_start() == null && entity.getSearch_audit_time_end() == null) {
snatNoExport = ",audit_time" + snatNoExport;
}
if (!StringUtil.isEmpty(entity.gethColumns())) {
snatNoExport = "," + entity.gethColumns() + "," + snatNoExport;
}
noExportMap.put(entity.getMenuNameCode(), snatNoExport); noExportMap.put(entity.getMenuNameCode(), snatNoExport);
dataMap.put(entity.getMenuNameCode(), page.getList()); dataMap.put(entity.getMenuNameCode(), page.getList());
/*}*/
this._export(model, request, response, redirectAttributes,entity.getMenuNameCode(),titleList,classMap,dataMap,noExportMap); String timeRange = initTimeMap(entity);
noExportMap.put("timeRange", timeRange);
if ("csv".equals(entity.getExType())) {
this._exportCsv(model, request, response, redirectAttributes, entity.getMenuNameCode(), titleList,
classMap, dataMap, noExportMap);
} else {
this._export(model, request, response, redirectAttributes, entity.getMenuNameCode(), titleList,
classMap, dataMap, noExportMap);
}
} catch (Exception e) { } catch (Exception e) {
logger.error("snat export failed", e); logger.error("snat export failed", e);
addMessage(redirectAttributes, "error", "export_failed"); addMessage(redirectAttributes, "error", "export_failed");
} }
//return "redirect:" + adminPath +"/ntc/iplist/list?functionId="+entity.getFunctionId(); // return "redirect:" + adminPath
// +"/ntc/iplist/list?functionId="+entity.getFunctionId();
} }
// dnat配置导出 // dnat配置导出
@@ -315,14 +325,12 @@ public class IpMultiplexPoolCfgController extends BaseController {
Map<String, List> dataMap = new HashMap<String, List>(); Map<String, List> dataMap = new HashMap<String, List>();
Map<String, String> noExportMap = new HashMap<String, String>(); Map<String, String> noExportMap = new HashMap<String, String>();
/*
/*//导出选中记录 * //导出选中记录 if(!StringUtil.isEmpty(ids)){ for(String
* if(!StringUtil.isEmpty(ids)){ * id:ids.split(",")){ Long.parseLong(id); } //List<CfgIndexInfo>
for(String id:ids.split(",")){ * list=ipCfgService.getListByCfgIdWithName(IpPortCfg.getTablename()
Long.parseLong(id); * , entity.getFunctionId(), ids); }else{
} */
//List<CfgIndexInfo> list=ipCfgService.getListByCfgIdWithName(IpPortCfg.getTablename(), entity.getFunctionId(), ids);
}else{*/
// 条件导出数据大于最大导出数,只导出最大导出条数 // 条件导出数据大于最大导出数,只导出最大导出条数
Page<IpMultiplexPoolCfg> pageInfo = new Page<IpMultiplexPoolCfg>(request, response, "r"); Page<IpMultiplexPoolCfg> pageInfo = new Page<IpMultiplexPoolCfg>(request, response, "r");
pageInfo.setPageNo(1); pageInfo.setPageNo(1);
@@ -331,14 +339,39 @@ public class IpMultiplexPoolCfgController extends BaseController {
titleList.add(entity.getMenuNameCode()); titleList.add(entity.getMenuNameCode());
classMap.put(entity.getMenuNameCode(), IpMultiplexPoolCfg.class); classMap.put(entity.getMenuNameCode(), IpMultiplexPoolCfg.class);
String snatNoExport = ",isp,do_log,whether_area_block,userregion1,userregion2,userregion3,userregion4,userregion5,group_name,"; String snatNoExport = ",isp,do_log,whether_area_block,userregion1,userregion2,userregion3,userregion4,userregion5,group_name,";
// 时间过滤
if (entity.getSearch_create_time_start() == null && entity.getSearch_create_time_end() == null) {
snatNoExport = ",config_time" + snatNoExport;
}
if (entity.getSearch_edit_time_start() == null && entity.getSearch_edit_time_end() == null) {
snatNoExport = ",edit_time" + snatNoExport;
}
if (entity.getSearch_audit_time_start() == null && entity.getSearch_audit_time_end() == null) {
snatNoExport = ",audit_time" + snatNoExport;
}
if (!StringUtil.isEmpty(entity.gethColumns())) {
snatNoExport = "," + entity.gethColumns() + "," + snatNoExport;
}
noExportMap.put(entity.getMenuNameCode(), snatNoExport); noExportMap.put(entity.getMenuNameCode(), snatNoExport);
dataMap.put(entity.getMenuNameCode(), page.getList()); dataMap.put(entity.getMenuNameCode(), page.getList());
/* } */ /* } */
this._export(model, request, response, redirectAttributes,entity.getMenuNameCode(),titleList,classMap,dataMap,noExportMap);
String timeRange = initTimeMap(entity);
noExportMap.put("timeRange", timeRange);
if ("csv".equals(entity.getExType())) {
this._exportCsv(model, request, response, redirectAttributes, entity.getMenuNameCode(), titleList,
classMap, dataMap, noExportMap);
} else {
this._export(model, request, response, redirectAttributes, entity.getMenuNameCode(), titleList,
classMap, dataMap, noExportMap);
}
} catch (Exception e) { } catch (Exception e) {
logger.error("dnat export failed", e); logger.error("dnat export failed", e);
addMessage(redirectAttributes, "error", "export_failed"); addMessage(redirectAttributes, "error", "export_failed");
} }
//return "redirect:" + adminPath +"/ntc/iplist/list?functionId="+entity.getFunctionId(); // return "redirect:" + adminPath
// +"/ntc/iplist/list?functionId="+entity.getFunctionId();
} }
} }

View File

@@ -41,15 +41,18 @@ import com.nis.web.security.UserUtils;
public class DdosCfgController extends BaseController { public class DdosCfgController extends BaseController {
@RequestMapping(value = { "/list" }) @RequestMapping(value = { "/list" })
public String list(Model model,HttpServletRequest request,HttpServletResponse response,@ModelAttribute("cfg")DdosIpCfg entity){ public String list(Model model, HttpServletRequest request, HttpServletResponse response,
@ModelAttribute("cfg") DdosIpCfg entity) {
Page<DdosIpCfg> page = ddosCfgService.findPage(new Page<DdosIpCfg>(request, response, "r"), entity); Page<DdosIpCfg> page = ddosCfgService.findPage(new Page<DdosIpCfg>(request, response, "r"), entity);
model.addAttribute("page", page); model.addAttribute("page", page);
initPageCondition(model, entity); initPageCondition(model, entity);
return "/cfg/ddosIpCfgList"; return "/cfg/ddosIpCfgList";
} }
@RequestMapping(value = { "/form" }) @RequestMapping(value = { "/form" })
@RequiresPermissions(value = { "ddos:ip:config" }) @RequiresPermissions(value = { "ddos:ip:config" })
public String form(Model model,HttpServletRequest request,HttpServletResponse response,String ids,@ModelAttribute("cfg")DdosIpCfg cfg){ public String form(Model model, HttpServletRequest request, HttpServletResponse response, String ids,
@ModelAttribute("cfg") DdosIpCfg cfg) {
if (!StringUtil.isEmpty(ids)) { if (!StringUtil.isEmpty(ids)) {
cfg = ddosCfgService.getDdosIpCfg(Long.parseLong(ids), null); cfg = ddosCfgService.getDdosIpCfg(Long.parseLong(ids), null);
initUpdateFormCondition(model, cfg); initUpdateFormCondition(model, cfg);
@@ -86,15 +89,11 @@ public class DdosCfgController extends BaseController {
ddosCfgService.delete(isAudit, isValid, ids, functionId); ddosCfgService.delete(isAudit, isValid, ids, functionId);
return "redirect:" + adminPath + "/manipulation/ddos/list?functionId=" + functionId; return "redirect:" + adminPath + "/manipulation/ddos/list?functionId=" + functionId;
} }
@RequestMapping(value = { "/audit" }) @RequestMapping(value = { "/audit" })
// @RequiresPermissions(value={"ddos:ip:confirm"}) // @RequiresPermissions(value={"ddos:ip:confirm"})
public String audit(Model model,@ModelAttribute("cfg")DdosIpCfg cfg, public String audit(Model model, @ModelAttribute("cfg") DdosIpCfg cfg, Integer isValid, Integer isAudit, String ids,
Integer isValid, Integer functionId, RedirectAttributes redirectAttributes, HttpServletResponse response,
Integer isAudit,
String ids,
Integer functionId,
RedirectAttributes redirectAttributes,
HttpServletResponse response,
HttpServletRequest request) { HttpServletRequest request) {
if (!StringUtil.isEmpty(ids)) { if (!StringUtil.isEmpty(ids)) {
String[] idArray = ids.split(","); String[] idArray = ids.split(",");
@@ -160,30 +159,55 @@ public class DdosCfgController extends BaseController {
Page<DdosIpCfg> page = ddosCfgService.findPage(pageInfo, entity); Page<DdosIpCfg> page = ddosCfgService.findPage(pageInfo, entity);
ipLists = page.getList(); ipLists = page.getList();
} }
/*//导出选中记录 /*
* if(!StringUtil.isEmpty(ids)){ * //导出选中记录 if(!StringUtil.isEmpty(ids)){ for(String
for(String id:ids.split(",")){ * id:ids.split(",")){ Long.parseLong(id); } //List<CfgIndexInfo>
Long.parseLong(id); * list=ipCfgService.getListByCfgIdWithName(IpPortCfg.getTablename()
} * , entity.getFunctionId(), ids); }else{
//List<CfgIndexInfo> list=ipCfgService.getListByCfgIdWithName(IpPortCfg.getTablename(), entity.getFunctionId(), ids); */
}else{*/
// 条件导出数据大于最大导出数,只导出最大导出条数 // 条件导出数据大于最大导出数,只导出最大导出条数
titleList.add(entity.getMenuNameCode()); titleList.add(entity.getMenuNameCode());
classMap.put(entity.getMenuNameCode(), DdosIpCfg.class); classMap.put(entity.getMenuNameCode(), DdosIpCfg.class);
String cfgIndexInfoNoExport = ",do_log,client_ip,client_port,ir_type,group_name,userregion1,userregion2,userregion3,userregion4,userregion5,"; String cfgIndexInfoNoExport = ",do_log,client_ip,client_port,ir_type,group_name,userregion1,userregion2,userregion3,userregion4,userregion5,";
// 时间过滤
if (entity.getSearch_create_time_start() == null && entity.getSearch_create_time_end() == null) {
cfgIndexInfoNoExport = ",config_time" + cfgIndexInfoNoExport;
}
if (entity.getSearch_edit_time_start() == null && entity.getSearch_edit_time_end() == null) {
cfgIndexInfoNoExport = ",edit_time" + cfgIndexInfoNoExport;
}
if (entity.getSearch_audit_time_start() == null && entity.getSearch_audit_time_end() == null) {
cfgIndexInfoNoExport = ",audit_time" + cfgIndexInfoNoExport;
}
if (!StringUtil.isEmpty(entity.gethColumns())) {
cfgIndexInfoNoExport = "," + entity.gethColumns() + "," + cfgIndexInfoNoExport;
}
noExportMap.put(entity.getMenuNameCode(), cfgIndexInfoNoExport); noExportMap.put(entity.getMenuNameCode(), cfgIndexInfoNoExport);
dataMap.put(entity.getMenuNameCode(), ipLists); dataMap.put(entity.getMenuNameCode(), ipLists);
/*}*/
this._export(model, request, response, redirectAttributes,entity.getMenuNameCode(),titleList,classMap,dataMap,noExportMap); String timeRange = initTimeMap(entity);
noExportMap.put("timeRange", timeRange);
if ("csv".equals(entity.getExType())) {
this._exportCsv(model, request, response, redirectAttributes, entity.getMenuNameCode(), titleList,
classMap, dataMap, noExportMap);
} else {
this._export(model, request, response, redirectAttributes, entity.getMenuNameCode(), titleList,
classMap, dataMap, noExportMap);
}
} catch (Exception e) { } catch (Exception e) {
logger.error("ddos export failed", e); logger.error("ddos export failed", e);
addMessage(redirectAttributes, "error", "export_failed"); addMessage(redirectAttributes, "error", "export_failed");
} }
//return "redirect:" + adminPath +"/ntc/iplist/list?functionId="+entity.getFunctionId(); // return "redirect:" + adminPath
// +"/ntc/iplist/list?functionId="+entity.getFunctionId();
} }
/** /**
* 根据索引表信息异步获取子表信息 * 根据索引表信息异步获取子表信息
*
* @return * @return
*/ */
@RequestMapping(value = { "/ajaxDdosInfo" }) @RequestMapping(value = { "/ajaxDdosInfo" })

View File

@@ -61,12 +61,14 @@ public class IpMultiplexController extends CommonController {
@RequestMapping(value = { "/list" }) @RequestMapping(value = { "/list" })
// @RequiresPermissions(value={"ip:mulitiplex:config","ip:mulitiplex:confirm"},logical=Logical.OR) // @RequiresPermissions(value={"ip:mulitiplex:config","ip:mulitiplex:confirm"},logical=Logical.OR)
public String ipList(String cfgName,Model model,@ModelAttribute("cfg")IpPortCfg cfg,HttpServletRequest request,HttpServletResponse response) { public String ipList(String cfgName, Model model, @ModelAttribute("cfg") IpPortCfg cfg, HttpServletRequest request,
HttpServletResponse response) {
this._ipList(cfgName, model, cfg, request, response); this._ipList(cfgName, model, cfg, request, response);
model.addAttribute("urlPrefix", "/manipulation/ipmulitiplex"); model.addAttribute("urlPrefix", "/manipulation/ipmulitiplex");
model.addAttribute("requiresPermissionPrefix", "ip:mulitiplex"); model.addAttribute("requiresPermissionPrefix", "ip:mulitiplex");
return "/cfg/common/ipList"; return "/cfg/common/ipList";
} }
@RequestMapping(value = { "/form" }) @RequestMapping(value = { "/form" })
@RequiresPermissions(value = { "ip:mulitiplex:config" }) @RequiresPermissions(value = { "ip:mulitiplex:config" })
public String ipForm(String cfgName, Model model, String ids, Integer functionId, BaseIpCfg entity) { public String ipForm(String cfgName, Model model, String ids, Integer functionId, BaseIpCfg entity) {
@@ -80,26 +82,31 @@ public class IpMultiplexController extends CommonController {
} }
} }
if (dict != null) { if (dict != null) {
List<PolicyGroupInfo> policyGroups=policyGroupInfoService.findPolicyGroupInfosByType(Integer.parseInt(dict.getItemCode())); List<PolicyGroupInfo> policyGroups = policyGroupInfoService
.findPolicyGroupInfosByType(Integer.parseInt(dict.getItemCode()));
model.addAttribute("policyGroups", policyGroups); model.addAttribute("policyGroups", policyGroups);
} }
model.addAttribute("urlPrefix", "/manipulation/ipmulitiplex"); model.addAttribute("urlPrefix", "/manipulation/ipmulitiplex");
model.addAttribute("requiresPermissionPrefix", "ip:mulitiplex"); model.addAttribute("requiresPermissionPrefix", "ip:mulitiplex");
return "/cfg/manipulation/ipmulitiplex/form"; return "/cfg/manipulation/ipmulitiplex/form";
} }
@RequestMapping(value = { "/saveOrUpdate" }) @RequestMapping(value = { "/saveOrUpdate" })
public String saveOrUpdateIp(String cfgName, RedirectAttributes model, IpPortCfg cfg) { public String saveOrUpdateIp(String cfgName, RedirectAttributes model, IpPortCfg cfg) {
this._saveOrUpdateIp(cfgName, model, cfg); this._saveOrUpdateIp(cfgName, model, cfg);
return "redirect:" + adminPath + "/manipulation/ipmulitiplex/list?functionId=" + cfg.getFunctionId(); return "redirect:" + adminPath + "/manipulation/ipmulitiplex/list?functionId=" + cfg.getFunctionId();
} }
@RequestMapping(value = { "/delete" }) @RequestMapping(value = { "/delete" })
@RequiresPermissions("ip:mulitiplex:config") @RequiresPermissions("ip:mulitiplex:config")
public String deleteIp(String cfgName,String ids,String compileIds,Integer functionId,RedirectAttributes model) { public String deleteIp(String cfgName, String ids, String compileIds, Integer functionId,
RedirectAttributes model) {
this._deleteIp(cfgName, ids, compileIds, functionId, model); this._deleteIp(cfgName, ids, compileIds, functionId, model);
model.addAttribute("urlPrefix", "/proxy/ipmulitiplex"); model.addAttribute("urlPrefix", "/proxy/ipmulitiplex");
model.addAttribute("requiresPermissionPrefix", "ip:mulitiplex"); model.addAttribute("requiresPermissionPrefix", "ip:mulitiplex");
return "redirect:" + adminPath + "/manipulation/ipmulitiplex/list?functionId=" + functionId; return "redirect:" + adminPath + "/manipulation/ipmulitiplex/list?functionId=" + functionId;
} }
@RequestMapping(value = { "/audit" }) @RequestMapping(value = { "/audit" })
@RequiresPermissions("ip:mulitiplex:confirm") @RequiresPermissions("ip:mulitiplex:confirm")
public String auditIp(String cfgName, String ids, IpPortCfg cfg, RedirectAttributes redirectAttributes) { public String auditIp(String cfgName, String ids, IpPortCfg cfg, RedirectAttributes redirectAttributes) {
@@ -108,21 +115,28 @@ public class IpMultiplexController extends CommonController {
redirectAttributes.addAttribute("requiresPermissionPrefix", "ip:mulitiplex"); redirectAttributes.addAttribute("requiresPermissionPrefix", "ip:mulitiplex");
return "redirect:" + adminPath + "/manipulation/ipmulitiplex/list?functionId=" + cfg.getFunctionId(); return "redirect:" + adminPath + "/manipulation/ipmulitiplex/list?functionId=" + cfg.getFunctionId();
} }
// ip配置导入 // ip配置导入
/*@RequestMapping(value = "/import", method=RequestMethod.POST) /*
public String importIp(String cfgName,RedirectAttributes redirectAttributes, * @RequestMapping(value = "/import", method=RequestMethod.POST) public
@RequestParam("file") MultipartFile file,IpPortCfg cfg) { * String importIp(String cfgName,RedirectAttributes redirectAttributes,
this._importIp(cfgName,redirectAttributes, file,cfg,IpMultiplexPolicyTemplate.class); *
redirectAttributes.addAttribute("urlPrefix","/manipulation/ipmulitiplex"); * @RequestParam("file") MultipartFile file,IpPortCfg cfg) {
redirectAttributes.addAttribute("requiresPermissionPrefix","ip:mulitiplex"); * this._importIp(cfgName,redirectAttributes,
return "redirect:" + adminPath +"/manipulation/ipmulitiplex/list?functionId="+cfg.getFunctionId(); * file,cfg,IpMultiplexPolicyTemplate.class);
}*/ * redirectAttributes.addAttribute("urlPrefix","/manipulation/ipmulitiplex")
* ; redirectAttributes.addAttribute("requiresPermissionPrefix",
* "ip:mulitiplex"); return "redirect:" + adminPath
* +"/manipulation/ipmulitiplex/list?functionId="+cfg.getFunctionId(); }
*/
// ip模板下载 // ip模板下载
@RequestMapping(value = "import/template") @RequestMapping(value = "import/template")
public void importFileTemplate(HttpServletRequest request, HttpServletResponse response, public void importFileTemplate(HttpServletRequest request, HttpServletResponse response,
RedirectAttributes redirectAttributes, Integer functionId, Integer cfgRegionCode) { RedirectAttributes redirectAttributes, Integer functionId, Integer cfgRegionCode) {
this._importFileTemplate(request, response, redirectAttributes, functionId, cfgRegionCode,IpMultiplexPolicyTemplate.class); this._importFileTemplate(request, response, redirectAttributes, functionId, cfgRegionCode,
IpMultiplexPolicyTemplate.class);
} }
// ip配置导出 // ip配置导出
@RequestMapping(value = "export") @RequestMapping(value = "export")
public void exportIp(String columns, Model model, HttpServletRequest request, HttpServletResponse response, public void exportIp(String columns, Model model, HttpServletRequest request, HttpServletResponse response,
@@ -134,10 +148,11 @@ public class IpMultiplexController extends CommonController {
* IP复用策略拆分为SNAT/DNAT复用策略 * IP复用策略拆分为SNAT/DNAT复用策略
*/ */
@RequestMapping(value = { "/snatPolicyList" }) @RequestMapping(value = { "/snatPolicyList" })
public String snatPolicyList(Model model,@ModelAttribute("cfg")IpReusePolicyCfg cfg, public String snatPolicyList(Model model, @ModelAttribute("cfg") IpReusePolicyCfg cfg, HttpServletRequest request,
HttpServletRequest request,HttpServletResponse response) { HttpServletResponse response) {
Page<IpReusePolicyCfg> page = ipMultiplexService.findPage(new Page<IpReusePolicyCfg>(request, response,"r"), cfg); Page<IpReusePolicyCfg> page = ipMultiplexService.findPage(new Page<IpReusePolicyCfg>(request, response, "r"),
cfg);
model.addAttribute("page", page); model.addAttribute("page", page);
initFormCondition(model, cfg); initFormCondition(model, cfg);
@@ -151,8 +166,8 @@ public class IpMultiplexController extends CommonController {
@RequestMapping(value = { "/snatPolicyForm" }) @RequestMapping(value = { "/snatPolicyForm" })
@RequiresPermissions(value = { "snat_policy:config" }) @RequiresPermissions(value = { "snat_policy:config" })
public String snatPolicyForm(Model model, String ids, IpReusePolicyCfg cfg, public String snatPolicyForm(Model model, String ids, IpReusePolicyCfg cfg, HttpServletRequest request,
HttpServletRequest request,HttpServletResponse response) { HttpServletResponse response) {
if (cfg == null) { if (cfg == null) {
cfg = new IpReusePolicyCfg(); cfg = new IpReusePolicyCfg();
} }
@@ -211,7 +226,8 @@ public class IpMultiplexController extends CommonController {
@RequestMapping(value = { "/auditSnat" }) @RequestMapping(value = { "/auditSnat" })
@RequiresPermissions("snat_policy:confirm") @RequiresPermissions("snat_policy:confirm")
public String auditSnat(String ids,Integer isAudit,Integer isValid,Integer functionId,RedirectAttributes redirectAttributes) { public String auditSnat(String ids, Integer isAudit, Integer isValid, Integer functionId,
RedirectAttributes redirectAttributes) {
if (!StringUtil.isEmpty(ids)) { if (!StringUtil.isEmpty(ids)) {
String[] idArray = ids.split(","); String[] idArray = ids.split(",");
@@ -235,7 +251,6 @@ public class IpMultiplexController extends CommonController {
return "redirect:" + adminPath + "/manipulation/ipmulitiplex/snatPolicyList?functionId=" + functionId; return "redirect:" + adminPath + "/manipulation/ipmulitiplex/snatPolicyList?functionId=" + functionId;
} }
@RequestMapping(value = { "/ajaxSnatInfo" }) @RequestMapping(value = { "/ajaxSnatInfo" })
public String ajaxSnatInfo(Model model, Long cfgId, Integer index, Integer compileId) { public String ajaxSnatInfo(Model model, Long cfgId, Integer index, Integer compileId) {
IpReusePolicyCfg cfg = ipMultiplexService.getSnatCfg(cfgId, compileId); IpReusePolicyCfg cfg = ipMultiplexService.getSnatCfg(cfgId, compileId);
@@ -256,8 +271,6 @@ public class IpMultiplexController extends CommonController {
return "/cfg/manipulation/ipmulitiplex/snatSubList"; return "/cfg/manipulation/ipmulitiplex/snatSubList";
} }
@RequestMapping(value = { "/ajaxDnatInfo" }) @RequestMapping(value = { "/ajaxDnatInfo" })
public String ajaxDnatInfo(Model model, Long cfgId, Integer index, Integer compileId) { public String ajaxDnatInfo(Model model, Long cfgId, Integer index, Integer compileId) {
IpReuseDnatPolicyCfg cfg = ipMultiplexService.getDnatCfg(cfgId, compileId); IpReuseDnatPolicyCfg cfg = ipMultiplexService.getDnatCfg(cfgId, compileId);
@@ -273,9 +286,9 @@ public class IpMultiplexController extends CommonController {
return "/cfg/manipulation/ipmulitiplex/dnatSubList"; return "/cfg/manipulation/ipmulitiplex/dnatSubList";
} }
/** /**
* 异步获取地址池信息 * 异步获取地址池信息
*
* @param request * @param request
* @param response * @param response
* @return * @return
@@ -290,8 +303,7 @@ public class IpMultiplexController extends CommonController {
params.put("addr_pool_id", addrPool.getCfgId()); params.put("addr_pool_id", addrPool.getCfgId());
String url = Constants.IP_REUSE_CALL_CGI_URL; String url = Constants.IP_REUSE_CALL_CGI_URL;
Map<String, Object> resultMap = ConfigServiceUtil.getCGIInfo(url, Constants.IP_NUM_GET, params); Map<String, Object> resultMap = ConfigServiceUtil.getCGIInfo(url, Constants.IP_NUM_GET, params);
if(!StringUtil.isEmpty(resultMap) if (!StringUtil.isEmpty(resultMap) && !StringUtil.isEmpty(resultMap.get("num"))
&& !StringUtil.isEmpty(resultMap.get("num"))
&& Integer.parseInt(resultMap.get("num").toString()) > 0) { && Integer.parseInt(resultMap.get("num").toString()) > 0) {
addrPoolsNew.add(addrPool); addrPoolsNew.add(addrPool);
} }
@@ -301,6 +313,7 @@ public class IpMultiplexController extends CommonController {
/** /**
* 校验地址池是否被策略引用 * 校验地址池是否被策略引用
*
* @param addrPoolIds * @param addrPoolIds
* @param request * @param request
* @param response * @param response
@@ -319,7 +332,6 @@ public class IpMultiplexController extends CommonController {
} }
@RequestMapping(value = { "/dnatPolicyList" }) @RequestMapping(value = { "/dnatPolicyList" })
public String dnatPolicyList(String cfgName, Model model, @ModelAttribute("cfg") IpReuseDnatPolicyCfg cfg, public String dnatPolicyList(String cfgName, Model model, @ModelAttribute("cfg") IpReuseDnatPolicyCfg cfg,
HttpServletRequest request, HttpServletResponse response) { HttpServletRequest request, HttpServletResponse response) {
@@ -334,7 +346,8 @@ public class IpMultiplexController extends CommonController {
@RequestMapping(value = { "/dnatPolicyForm" }) @RequestMapping(value = { "/dnatPolicyForm" })
@RequiresPermissions(value = { "dnat_policy:config" }) @RequiresPermissions(value = { "dnat_policy:config" })
public String dnatPolicyForm(String cfgName,Model model,String ids,Integer functionId,IpReuseDnatPolicyCfg cfg) { public String dnatPolicyForm(String cfgName, Model model, String ids, Integer functionId,
IpReuseDnatPolicyCfg cfg) {
// this._ipForm(cfgName,model, ids, functionId, entity); // this._ipForm(cfgName,model, ids, functionId, entity);
if (cfg == null) { if (cfg == null) {
@@ -388,7 +401,8 @@ public class IpMultiplexController extends CommonController {
@RequestMapping(value = { "/auditDnat" }) @RequestMapping(value = { "/auditDnat" })
@RequiresPermissions("dnat_policy:confirm") @RequiresPermissions("dnat_policy:confirm")
public String auditDnat(String ids,Integer isAudit,Integer isValid,Integer functionId,RedirectAttributes redirectAttributes) { public String auditDnat(String ids, Integer isAudit, Integer isValid, Integer functionId,
RedirectAttributes redirectAttributes) {
// this._auditIp(cfgName,ids, cfg, redirectAttributes); // this._auditIp(cfgName,ids, cfg, redirectAttributes);
if (!StringUtil.isEmpty(ids)) { if (!StringUtil.isEmpty(ids)) {
@@ -425,13 +439,12 @@ public class IpMultiplexController extends CommonController {
Map<String, String> noExportMap = new HashMap<String, String>(); Map<String, String> noExportMap = new HashMap<String, String>();
Properties msgProp = getMsgProp(); Properties msgProp = getMsgProp();
/*//导出选中记录 /*
* if(!StringUtil.isEmpty(ids)){ * //导出选中记录 if(!StringUtil.isEmpty(ids)){ for(String
for(String id:ids.split(",")){ * id:ids.split(",")){ Long.parseLong(id); } //List<CfgIndexInfo>
Long.parseLong(id); * list=ipCfgService.getListByCfgIdWithName(IpPortCfg.getTablename()
} * , entity.getFunctionId(), ids); }else{
//List<CfgIndexInfo> list=ipCfgService.getListByCfgIdWithName(IpPortCfg.getTablename(), entity.getFunctionId(), ids); */
}else{*/
// 条件导出数据大于最大导出数,只导出最大导出条数 // 条件导出数据大于最大导出数,只导出最大导出条数
entity.setTableName(IpPortCfg.getTablename()); entity.setTableName(IpPortCfg.getTablename());
Page<BaseIpCfg> pageInfo = new Page<BaseIpCfg>(request, response, "r"); Page<BaseIpCfg> pageInfo = new Page<BaseIpCfg>(request, response, "r");
@@ -446,18 +459,41 @@ public class IpMultiplexController extends CommonController {
titleList.add(entity.getMenuNameCode()); titleList.add(entity.getMenuNameCode());
classMap.put(entity.getMenuNameCode(), BaseIpCfg.class); classMap.put(entity.getMenuNameCode(), BaseIpCfg.class);
String snatNoExport = ",client_ip,group_name,server_ip,ip_type,ip_pattern,port_pattern,client_port,server_port,ir_type,direction,protocol,do_log,whether_area_block,userregion1,userregion2,userregion3,userregion4,userregion5,"; String snatNoExport = ",client_ip,group_name,server_ip,ip_type,ip_pattern,port_pattern,client_port,server_port,ir_type,direction,protocol,do_log,whether_area_block,userregion1,userregion2,userregion3,userregion4,userregion5,";
// 时间过滤
if (entity.getSearch_create_time_start() == null && entity.getSearch_create_time_end() == null) {
snatNoExport = ",config_time" + snatNoExport;
}
if (entity.getSearch_edit_time_start() == null && entity.getSearch_edit_time_end() == null) {
snatNoExport = ",edit_time" + snatNoExport;
}
if (entity.getSearch_audit_time_start() == null && entity.getSearch_audit_time_end() == null) {
snatNoExport = ",audit_time" + snatNoExport;
}
if (!StringUtil.isEmpty(entity.gethColumns())) {
snatNoExport = "," + entity.gethColumns() + "," + snatNoExport;
}
noExportMap.put(entity.getMenuNameCode(), snatNoExport); noExportMap.put(entity.getMenuNameCode(), snatNoExport);
dataMap.put(entity.getMenuNameCode(), page.getList()); dataMap.put(entity.getMenuNameCode(), page.getList());
/*}*/
this._export(model, request, response, redirectAttributes,entity.getMenuNameCode(),titleList,classMap,dataMap,noExportMap); String timeRange = initTimeMap(entity);
noExportMap.put("timeRange", timeRange);
if ("csv".equals(entity.getExType())) {
this._exportCsv(model, request, response, redirectAttributes, entity.getMenuNameCode(), titleList,
classMap, dataMap, noExportMap);
} else {
this._export(model, request, response, redirectAttributes, entity.getMenuNameCode(), titleList,
classMap, dataMap, noExportMap);
}
} catch (Exception e) { } catch (Exception e) {
logger.error("snat export failed", e); logger.error("snat export failed", e);
addMessage(redirectAttributes, "error", "export_failed"); addMessage(redirectAttributes, "error", "export_failed");
} }
//return "redirect:" + adminPath +"/ntc/iplist/list?functionId="+entity.getFunctionId(); // return "redirect:" + adminPath
// +"/ntc/iplist/list?functionId="+entity.getFunctionId();
} }
// dnat配置导出 // dnat配置导出
@RequestMapping(value = "exportDnat") @RequestMapping(value = "exportDnat")
public void exportDnat(Model model, HttpServletRequest request, HttpServletResponse response, public void exportDnat(Model model, HttpServletRequest request, HttpServletResponse response,
@@ -470,13 +506,12 @@ public class IpMultiplexController extends CommonController {
Map<String, String> noExportMap = new HashMap<String, String>(); Map<String, String> noExportMap = new HashMap<String, String>();
Properties msgProp = getMsgProp(); Properties msgProp = getMsgProp();
/*//导出选中记录 /*
* if(!StringUtil.isEmpty(ids)){ * //导出选中记录 if(!StringUtil.isEmpty(ids)){ for(String
for(String id:ids.split(",")){ * id:ids.split(",")){ Long.parseLong(id); } //List<CfgIndexInfo>
Long.parseLong(id); * list=ipCfgService.getListByCfgIdWithName(IpPortCfg.getTablename()
} * , entity.getFunctionId(), ids); }else{
//List<CfgIndexInfo> list=ipCfgService.getListByCfgIdWithName(IpPortCfg.getTablename(), entity.getFunctionId(), ids); */
}else{*/
// 条件导出数据大于最大导出数,只导出最大导出条数 // 条件导出数据大于最大导出数,只导出最大导出条数
entity.setTableName(IpPortCfg.getTablename()); entity.setTableName(IpPortCfg.getTablename());
Page<BaseIpCfg> pageInfo = new Page<BaseIpCfg>(request, response, "r"); Page<BaseIpCfg> pageInfo = new Page<BaseIpCfg>(request, response, "r");
@@ -491,14 +526,38 @@ public class IpMultiplexController extends CommonController {
titleList.add(entity.getMenuNameCode()); titleList.add(entity.getMenuNameCode());
classMap.put(entity.getMenuNameCode(), BaseIpCfg.class); classMap.put(entity.getMenuNameCode(), BaseIpCfg.class);
String snatNoExport = ",direction,client_ip,ip_type,ip_pattern,port_pattern,client_port,ir_type,do_log,whether_area_block,userregion1,userregion2,userregion3,userregion4,userregion5,"; String snatNoExport = ",direction,client_ip,ip_type,ip_pattern,port_pattern,client_port,ir_type,do_log,whether_area_block,userregion1,userregion2,userregion3,userregion4,userregion5,";
// 时间过滤
if (entity.getSearch_create_time_start() == null && entity.getSearch_create_time_end() == null) {
snatNoExport = ",config_time" + snatNoExport;
}
if (entity.getSearch_edit_time_start() == null && entity.getSearch_edit_time_end() == null) {
snatNoExport = ",edit_time" + snatNoExport;
}
if (entity.getSearch_audit_time_start() == null && entity.getSearch_audit_time_end() == null) {
snatNoExport = ",audit_time" + snatNoExport;
}
if (!StringUtil.isEmpty(entity.gethColumns())) {
snatNoExport = "," + entity.gethColumns() + "," + snatNoExport;
}
noExportMap.put(entity.getMenuNameCode(), snatNoExport); noExportMap.put(entity.getMenuNameCode(), snatNoExport);
dataMap.put(entity.getMenuNameCode(), page.getList()); dataMap.put(entity.getMenuNameCode(), page.getList());
/*}*/
this._export(model, request, response, redirectAttributes,entity.getMenuNameCode(),titleList,classMap,dataMap,noExportMap); String timeRange = initTimeMap(entity);
noExportMap.put("timeRange", timeRange);
if ("csv".equals(entity.getExType())) {
this._exportCsv(model, request, response, redirectAttributes, entity.getMenuNameCode(), titleList,
classMap, dataMap, noExportMap);
} else {
this._export(model, request, response, redirectAttributes, entity.getMenuNameCode(), titleList,
classMap, dataMap, noExportMap);
}
} catch (Exception e) { } catch (Exception e) {
logger.error("dnat export failed", e); logger.error("dnat export failed", e);
addMessage(redirectAttributes, "error", "export_failed"); addMessage(redirectAttributes, "error", "export_failed");
} }
//return "redirect:" + adminPath +"/ntc/iplist/list?functionId="+entity.getFunctionId(); // return "redirect:" + adminPath
// +"/ntc/iplist/list?functionId="+entity.getFunctionId();
} }
} }

View File

@@ -19,24 +19,24 @@ import com.nis.domain.specific.ConfigGroupInfo;
import com.nis.exceptions.MaatConvertException; import com.nis.exceptions.MaatConvertException;
import com.nis.util.StringUtil; import com.nis.util.StringUtil;
import com.nis.web.controller.BaseController; import com.nis.web.controller.BaseController;
@Controller @Controller
@RequestMapping("${adminPath}/cfg/asnPolicy") @RequestMapping("${adminPath}/cfg/asnPolicy")
@Deprecated @Deprecated
public class AsnPolicyCfgController extends BaseController { public class AsnPolicyCfgController extends BaseController {
@RequestMapping(value = { "/list" }) @RequestMapping(value = { "/list" })
public String list(Model model,HttpServletRequest request public String list(Model model, HttpServletRequest request, HttpServletResponse response,
,HttpServletResponse response,@ModelAttribute("cfg")CfgIndexInfo entity @ModelAttribute("cfg") CfgIndexInfo entity, RedirectAttributes redirectAttributes) {
,RedirectAttributes redirectAttributes){
Page<CfgIndexInfo> page = asnPolicyCfgService.findPage(new Page<CfgIndexInfo>(request, response, "r"), entity); Page<CfgIndexInfo> page = asnPolicyCfgService.findPage(new Page<CfgIndexInfo>(request, response, "r"), entity);
model.addAttribute("page", page); model.addAttribute("page", page);
initPageCondition(model, entity); initPageCondition(model, entity);
return "/cfg/asnPolicyCfgList"; return "/cfg/asnPolicyCfgList";
} }
@RequestMapping(value = { "/form" }) @RequestMapping(value = { "/form" })
@RequiresPermissions(value = { "asn:policy:config" }) @RequiresPermissions(value = { "asn:policy:config" })
public String form(Model model,HttpServletRequest request public String form(Model model, HttpServletRequest request, HttpServletResponse response, String ids,
,HttpServletResponse response,String ids,@ModelAttribute("cfg")CfgIndexInfo entity @ModelAttribute("cfg") CfgIndexInfo entity, RedirectAttributes redirectAttributes) {
,RedirectAttributes redirectAttributes){
if (!StringUtil.isEmpty(ids)) { if (!StringUtil.isEmpty(ids)) {
entity = asnPolicyCfgService.get(Long.parseLong(ids)); entity = asnPolicyCfgService.get(Long.parseLong(ids));
initUpdateFormCondition(model, entity); initUpdateFormCondition(model, entity);
@@ -48,12 +48,11 @@ public class AsnPolicyCfgController extends BaseController {
model.addAttribute("_cfg", entity); model.addAttribute("_cfg", entity);
return "/cfg/asnPolicyCfgForm"; return "/cfg/asnPolicyCfgForm";
} }
@RequestMapping(value = { "/saveOrUpdate" }) @RequestMapping(value = { "/saveOrUpdate" })
@RequiresPermissions(value = { "asn:policy:config" }) @RequiresPermissions(value = { "asn:policy:config" })
public String saveOrUpdate(Model model,HttpServletRequest request public String saveOrUpdate(Model model, HttpServletRequest request, HttpServletResponse response,
,HttpServletResponse response, @ModelAttribute("cfg") CfgIndexInfo cfg, RedirectAttributes redirectAttributes) {
@ModelAttribute("cfg")CfgIndexInfo cfg
,RedirectAttributes redirectAttributes){
try { try {
asnPolicyCfgService.saveOrUpdate(cfg); asnPolicyCfgService.saveOrUpdate(cfg);
addMessage(redirectAttributes, "success", "save_success"); addMessage(redirectAttributes, "success", "save_success");
@@ -69,11 +68,11 @@ public class AsnPolicyCfgController extends BaseController {
return "redirect:" + adminPath + "/cfg/asnPolicy/list?functionId=" + cfg.getFunctionId(); return "redirect:" + adminPath + "/cfg/asnPolicy/list?functionId=" + cfg.getFunctionId();
} }
@RequestMapping(value = { "/delete" }) @RequestMapping(value = { "/delete" })
@RequiresPermissions(value = { "asn:policy:config" }) @RequiresPermissions(value = { "asn:policy:config" })
public String delete(Integer isAudit,Integer isValid public String delete(Integer isAudit, Integer isValid, String ids, Integer functionId,
,String ids,Integer functionId RedirectAttributes redirectAttributes) {
,RedirectAttributes redirectAttributes){
asnPolicyCfgService.delete(functionId, isValid, ids); asnPolicyCfgService.delete(functionId, isValid, ids);
return "redirect:" + adminPath + "/cfg/asnPolicy/list?functionId=" + functionId; return "redirect:" + adminPath + "/cfg/asnPolicy/list?functionId=" + functionId;
} }
@@ -100,6 +99,7 @@ public class AsnPolicyCfgController extends BaseController {
// } // }
// //
// } // }
// return "redirect:" + adminPath +"/cfg/asnPolicy/list?functionId="+functionId; // return "redirect:" + adminPath
// +"/cfg/asnPolicy/list?functionId="+functionId;
// } // }
} }

View File

@@ -42,6 +42,7 @@ import com.nis.web.controller.BaseController;
/** /**
* 处理音视频文本业务 * 处理音视频文本业务
*
* @author ddm * @author ddm
* *
*/ */
@@ -52,8 +53,8 @@ public class AvContentController extends BaseController {
// 音视频VOIP IP配置新增界面 // 音视频VOIP IP配置新增界面
@RequestMapping(value = { "/voipForm" }) @RequestMapping(value = { "/voipForm" })
@RequiresPermissions(value = { "avVoip:config" }) @RequiresPermissions(value = { "avVoip:config" })
public String voipFrom(Model model,HttpServletRequest request ,HttpServletResponse response public String voipFrom(Model model, HttpServletRequest request, HttpServletResponse response, String compileIds,
,String compileIds,String ids, CfgIndexInfo cfg ,RedirectAttributes redirectAttributes){ String ids, CfgIndexInfo cfg, RedirectAttributes redirectAttributes) {
if (!StringUtil.isEmpty(ids)) { if (!StringUtil.isEmpty(ids)) {
cfg.setCfgId(Long.parseLong(ids)); cfg.setCfgId(Long.parseLong(ids));
cfg = avContentCfgService.getCfgIndexInfo(cfg); cfg = avContentCfgService.getCfgIndexInfo(cfg);
@@ -66,22 +67,20 @@ public class AvContentController extends BaseController {
return "/cfg/av/voip/voipForm"; return "/cfg/av/voip/voipForm";
} }
// 音视频VOIP Account配置新增界面 // 音视频VOIP Account配置新增界面
/* @RequestMapping(value = {"/voipAccountForm"}) /*
@RequiresPermissions(value={"avVoipAccount:config"}) * @RequestMapping(value = {"/voipAccountForm"})
public String voipAccountForm(Model model,HttpServletRequest request ,HttpServletResponse response *
,String compileIds,String ids, CfgIndexInfo cfg ,RedirectAttributes redirectAttributes){ * @RequiresPermissions(value={"avVoipAccount:config"}) public String
//修改 * voipAccountForm(Model model,HttpServletRequest request
if(!StringUtil.isEmpty(compileIds)){ * ,HttpServletResponse response ,String compileIds,String ids, CfgIndexInfo
cfg.setCompileId(Integer.parseInt(compileIds)); * cfg ,RedirectAttributes redirectAttributes){ //修改
cfg = avContentCfgService.getCfgIndexInfo2(cfg); * if(!StringUtil.isEmpty(compileIds)){
initUpdateFormCondition(model, cfg); * cfg.setCompileId(Integer.parseInt(compileIds)); cfg =
}else{ * avContentCfgService.getCfgIndexInfo2(cfg); initUpdateFormCondition(model,
initFormCondition(model,cfg);//新增 * cfg); }else{ initFormCondition(model,cfg);//新增 }
} *
* model.addAttribute("_cfg", cfg); return "/cfg/av/voip/voipAccountForm"; }
model.addAttribute("_cfg", cfg); */
return "/cfg/av/voip/voipAccountForm";
}*/
// 保存voip ip信息 // 保存voip ip信息
@RequestMapping(value = { "/saveVoip" }) @RequestMapping(value = { "/saveVoip" })
@@ -103,67 +102,56 @@ public class AvContentController extends BaseController {
} }
return "redirect:" + adminPath + "/ntc/av/voipList?functionId=" + cfg.getFunctionId(); return "redirect:" + adminPath + "/ntc/av/voipList?functionId=" + cfg.getFunctionId();
} }
// 保存voip Account信息 // 保存voip Account信息
/* @RequestMapping(value = {"/saveAccountVoip"}) /*
public String saveAccountVoip(Model model,HttpServletRequest request,HttpServletResponse response,String ids, * @RequestMapping(value = {"/saveAccountVoip"}) public String
CfgIndexInfo cfg ,RedirectAttributes redirectAttributes){ * saveAccountVoip(Model model,HttpServletRequest
try{ * request,HttpServletResponse response,String ids, CfgIndexInfo cfg
avContentCfgService.saveOrUpdateAvVoipAccount(cfg); * ,RedirectAttributes redirectAttributes){ try{
addMessage(redirectAttributes,"save_success"); * avContentCfgService.saveOrUpdateAvVoipAccount(cfg);
}catch(Exception e){ * addMessage(redirectAttributes,"save_success"); }catch(Exception e){ if(e
if(e instanceof MaatConvertException) { * instanceof MaatConvertException) { e.printStackTrace();
e.printStackTrace(); * logger.error("voip Account信息保存失败",e);
logger.error("voip Account信息保存失败",e); * addMessage(redirectAttributes,"request_service_failed"); }else {
addMessage(redirectAttributes,"request_service_failed"); * e.printStackTrace(); logger.error("voip Account信息保存失败",e);
}else { * addMessage(redirectAttributes,"save_failed"); } } return "redirect:" +
e.printStackTrace(); * adminPath +"/ntc/av/voipAccountList?functionId="+cfg.getFunctionId(); }
logger.error("voip Account信息保存失败",e); */
addMessage(redirectAttributes,"save_failed");
}
}
return "redirect:" + adminPath +"/ntc/av/voipAccountList?functionId="+cfg.getFunctionId();
}*/
// 视频文本VOIP 配置列表 // 视频文本VOIP 配置列表
@RequestMapping(value = { "/voipList" }) @RequestMapping(value = { "/voipList" })
public String voipCfgList(Model model,HttpServletRequest request ,HttpServletResponse response ,@ModelAttribute("cfg")CfgIndexInfo entity public String voipCfgList(Model model, HttpServletRequest request, HttpServletResponse response,
,RedirectAttributes redirectAttributes){ @ModelAttribute("cfg") CfgIndexInfo entity, RedirectAttributes redirectAttributes) {
/*if(entity.getIpPort()== null){ /*
entity.setIpPort(new IpPortCfg()); * if(entity.getIpPort()== null){ entity.setIpPort(new IpPortCfg()); }
} * if(entity.getVoipAccount()== null){ entity.setVoipAccount(new
if(entity.getVoipAccount()== null){ * AvVoipAccountCfg()); } if(entity.getNtcSubscribeIdCfg()==null){
entity.setVoipAccount(new AvVoipAccountCfg()); * entity.setNtcSubscribeIdCfg(new NtcSubscribeIdCfg()); }
} */
if(entity.getNtcSubscribeIdCfg()==null){
entity.setNtcSubscribeIdCfg(new NtcSubscribeIdCfg());
}*/
Page<CfgIndexInfo> page = avContentCfgService.findPage(new Page<CfgIndexInfo>(request, response, "r"), entity); Page<CfgIndexInfo> page = avContentCfgService.findPage(new Page<CfgIndexInfo>(request, response, "r"), entity);
model.addAttribute("page", page); model.addAttribute("page", page);
initPageCondition(model, entity); initPageCondition(model, entity);
return "/cfg/av/voip/voipList"; return "/cfg/av/voip/voipList";
} }
// 视频文本VOIP Account配置列表 // 视频文本VOIP Account配置列表
/* @RequestMapping(value = {"/voipAccountList"}) /*
public String voipCfgAccountList(Model model,HttpServletRequest request ,HttpServletResponse response * @RequestMapping(value = {"/voipAccountList"}) public String
,@ModelAttribute("cfg")CfgIndexInfo entity ,RedirectAttributes redirectAttributes){ * voipCfgAccountList(Model model,HttpServletRequest request
if(entity.getVoipAccount()== null){ * ,HttpServletResponse response ,@ModelAttribute("cfg")CfgIndexInfo entity
entity.setVoipAccount(new AvVoipAccountCfg()); * ,RedirectAttributes redirectAttributes){ if(entity.getVoipAccount()==
} * null){ entity.setVoipAccount(new AvVoipAccountCfg()); }
if(entity.getNtcSubscribeIdCfg()==null){ * if(entity.getNtcSubscribeIdCfg()==null){ entity.setNtcSubscribeIdCfg(new
entity.setNtcSubscribeIdCfg(new NtcSubscribeIdCfg()); * NtcSubscribeIdCfg()); } Page<CfgIndexInfo> page =
} * avContentCfgService.findAccountPage(new Page<CfgIndexInfo>(request,
Page<CfgIndexInfo> page = avContentCfgService.findAccountPage(new Page<CfgIndexInfo>(request, response,"r"), entity); * response,"r"), entity); model.addAttribute("page", page);
model.addAttribute("page", page); * initPageCondition(model,entity); return "/cfg/av/voip/voipAccountList"; }
initPageCondition(model,entity); */
return "/cfg/av/voip/voipAccountList";
}*/
// 修改VOIP IP配置状态 // 修改VOIP IP配置状态
@RequestMapping(value = { "/updateAvVoipValid" }) @RequestMapping(value = { "/updateAvVoipValid" })
@RequiresPermissions(value = { "avVoip:config" }) @RequiresPermissions(value = { "avVoip:config" })
public String updateVoipValid(Integer isAudit,String compileIds,Integer isValid,String ids,Integer functionId public String updateVoipValid(Integer isAudit, String compileIds, Integer isValid, String ids, Integer functionId,
,RedirectAttributes redirectAttributes RedirectAttributes redirectAttributes) {
) {
try { try {
avContentCfgService.updateAvVoipValid(isAudit, isValid, compileIds, functionId); avContentCfgService.updateAvVoipValid(isAudit, isValid, compileIds, functionId);
addMessage(redirectAttributes, "success", "delete_success"); addMessage(redirectAttributes, "success", "delete_success");
@@ -180,37 +168,29 @@ public class AvContentController extends BaseController {
} }
return "redirect:" + adminPath + "/ntc/av/voipList?functionId=" + functionId; return "redirect:" + adminPath + "/ntc/av/voipList?functionId=" + functionId;
} }
// 修改VOIP account配置状态 // 修改VOIP account配置状态
/* @RequestMapping(value = {"/updateAvVoipAccountValid"}) /*
@RequiresPermissions(value={"avVoipAccount:config"}) * @RequestMapping(value = {"/updateAvVoipAccountValid"})
public String updateVoipAccountValid(Integer isAudit,String compileIds,Integer isValid,String ids,Integer functionId *
,RedirectAttributes redirectAttributes * @RequiresPermissions(value={"avVoipAccount:config"}) public String
) { * updateVoipAccountValid(Integer isAudit,String compileIds,Integer
try { * isValid,String ids,Integer functionId ,RedirectAttributes
avContentCfgService.updateAvVoipAccountValid(isAudit,isValid,compileIds,functionId); * redirectAttributes ) { try {
} catch (Exception e) { * avContentCfgService.updateAvVoipAccountValid(isAudit,isValid,compileIds,
if(e instanceof MaatConvertException) { * functionId); } catch (Exception e) { if(e instanceof
e.printStackTrace(); * MaatConvertException) { e.printStackTrace();
logger.error("voip Account信息审核失败",e); * logger.error("voip Account信息审核失败",e);
addMessage(redirectAttributes,"request_service_failed"); * addMessage(redirectAttributes,"request_service_failed"); }else {
}else { * e.printStackTrace(); logger.error("voip Account信息审核失败",e);
e.printStackTrace(); * addMessage(redirectAttributes,"audit_failed"); } } return "redirect:" +
logger.error("voip Account信息审核失败",e); * adminPath +"/ntc/av/voipAccountList?functionId="+functionId; }
addMessage(redirectAttributes,"audit_failed"); */
}
}
return "redirect:" + adminPath +"/ntc/av/voipAccountList?functionId="+functionId;
}*/
// 修改VOIP IP配置审核状态 // 修改VOIP IP配置审核状态
@RequestMapping(value = { "/auditAvVoip" }) @RequestMapping(value = { "/auditAvVoip" })
@RequiresPermissions(value = { "avVoip:confirm" }) @RequiresPermissions(value = { "avVoip:confirm" })
public String auditVoip(Model model,@ModelAttribute("cfg")CfgIndexInfo cfg, public String auditVoip(Model model, @ModelAttribute("cfg") CfgIndexInfo cfg, Integer isValid, Integer isAudit,
Integer isValid, String ids, Integer functionId, RedirectAttributes redirectAttributes, HttpServletResponse response,
Integer isAudit,
String ids,
Integer functionId,
RedirectAttributes redirectAttributes,
HttpServletResponse response,
HttpServletRequest request) { HttpServletRequest request) {
if (!StringUtil.isEmpty(ids)) { if (!StringUtil.isEmpty(ids)) {
String[] idArray = ids.split(","); String[] idArray = ids.split(",");
@@ -222,7 +202,8 @@ public class AvContentController extends BaseController {
} catch (Exception e) { } catch (Exception e) {
if (e instanceof MaatConvertException) { if (e instanceof MaatConvertException) {
e.printStackTrace(); e.printStackTrace();
logger.error("VOIP配置下发失败"+e.getMessage());; logger.error("VOIP配置下发失败" + e.getMessage());
;
addMessage(redirectAttributes, "error", "request_service_failed"); addMessage(redirectAttributes, "error", "request_service_failed");
} else { } else {
e.printStackTrace(); e.printStackTrace();
@@ -255,55 +236,54 @@ public class AvContentController extends BaseController {
return "redirect:" + adminPath + "/ntc/av/voipList?functionId=" + functionId; return "redirect:" + adminPath + "/ntc/av/voipList?functionId=" + functionId;
} }
// 修改VOIP IP配置审核状态 // 修改VOIP IP配置审核状态
/* @RequestMapping(value = {"/auditAvVoipAccount"}) /*
@RequiresPermissions(value={"avVoipAccount:confirm"}) * @RequestMapping(value = {"/auditAvVoipAccount"})
public String auditVoipAccount(Integer isAudit,Integer isValid,String ids *
,String compileIds,Integer functionId * @RequiresPermissions(value={"avVoipAccount:confirm"}) public String
,RedirectAttributes redirectAttributes) { * auditVoipAccount(Integer isAudit,Integer isValid,String ids ,String
if(!StringUtil.isEmpty(compileIds)){ * compileIds,Integer functionId ,RedirectAttributes redirectAttributes) {
String[] idArray = compileIds.split(","); * if(!StringUtil.isEmpty(compileIds)){ String[] idArray =
Date auditTime=new Date(); * compileIds.split(","); Date auditTime=new Date(); for(String id
for(String id :idArray){ * :idArray){ try {
try { * avContentCfgService.auditAvVoipAccount(isAudit,isValid,functionId,id,
avContentCfgService.auditAvVoipAccount(isAudit,isValid,functionId,id,auditTime); * auditTime); } catch (MaatConvertException e) { if(e instanceof
} catch (MaatConvertException e) { * MaatConvertException) { e.printStackTrace();
if(e instanceof MaatConvertException) { * logger.info("VOIPAccount配置下发失败"+e.getMessage());;
e.printStackTrace(); * addMessage(redirectAttributes,"request_service_failed"); }else {
logger.info("VOIPAccount配置下发失败"+e.getMessage());; * e.printStackTrace(); logger.error("VOIPAccount配置下发失败",e);
addMessage(redirectAttributes,"request_service_failed"); * addMessage(redirectAttributes,"audit_failed"); } } }
}else { *
e.printStackTrace(); * } return "redirect:" + adminPath
logger.error("VOIPAccount配置下发失败",e); * +"/ntc/av/voipAccountList?functionId="+functionId; }
addMessage(redirectAttributes,"audit_failed"); */
}
}
}
}
return "redirect:" + adminPath +"/ntc/av/voipAccountList?functionId="+functionId;
}*/
/** /**
* 账号account * 账号account 根据索引表信息异步获取子表信息
* 根据索引表信息异步获取子表信息 *
* @return * @return
*/ */
/*@ResponseBody /*
@RequestMapping(value = "ajaxVoipAccountInfo") * @ResponseBody
public Map getVoipAccountInfo(CfgIndexInfo cfgIndexInfo) { *
Map<String, Object> voipAndAccountInfoMap=new HashMap<String, Object>(); * @RequestMapping(value = "ajaxVoipAccountInfo") public Map
List<AvVoipAccountCfg> voipAccountCfgList=new ArrayList<AvVoipAccountCfg>(); * getVoipAccountInfo(CfgIndexInfo cfgIndexInfo) { Map<String, Object>
List<NtcSubscribeIdCfg> ntcSubscribeIdCfgList=new ArrayList<NtcSubscribeIdCfg>(); * voipAndAccountInfoMap=new HashMap<String, Object>();
* List<AvVoipAccountCfg> voipAccountCfgList=new
voipAccountCfgList = avContentCfgService.getVoipAccountCfgList(cfgIndexInfo); * ArrayList<AvVoipAccountCfg>(); List<NtcSubscribeIdCfg>
ntcSubscribeIdCfgList=avContentCfgService.getSubscribeIdCfgList(cfgIndexInfo); * ntcSubscribeIdCfgList=new ArrayList<NtcSubscribeIdCfg>();
*
voipAndAccountInfoMap.put("account", voipAccountCfgList); * voipAccountCfgList =
voipAndAccountInfoMap.put("subscribe", ntcSubscribeIdCfgList); * avContentCfgService.getVoipAccountCfgList(cfgIndexInfo);
return voipAndAccountInfoMap; * ntcSubscribeIdCfgList=avContentCfgService.getSubscribeIdCfgList(
}*/ * cfgIndexInfo);
*
* voipAndAccountInfoMap.put("account", voipAccountCfgList);
* voipAndAccountInfoMap.put("subscribe", ntcSubscribeIdCfgList); return
* voipAndAccountInfoMap; }
*/
/** /**
* 根据索引表信息异步获取子表信息 * 根据索引表信息异步获取子表信息
*
* @return * @return
*/ */
@RequestMapping(value = { "/ajaxVoipIpInfo" }) @RequestMapping(value = { "/ajaxVoipIpInfo" })
@@ -314,15 +294,12 @@ public class AvContentController extends BaseController {
CfgIndexInfo cfg = avContentCfgService.getCfgIndexInfo(cfgIndexInfo); CfgIndexInfo cfg = avContentCfgService.getCfgIndexInfo(cfgIndexInfo);
List<String[]> tabList = new ArrayList(); List<String[]> tabList = new ArrayList();
// 获取voipIpCfg信息 // 获取voipIpCfg信息
/* if(cfg.getVoipIps()!=null){ /*
String cfgType = null; * if(cfg.getVoipIps()!=null){ String cfgType = null; for(AvVoipIpCfg
for(AvVoipIpCfg ip:cfg.getVoipIps()){ * ip:cfg.getVoipIps()){ if(!ip.getCfgType().equals(cfgType)){
if(!ip.getCfgType().equals(cfgType)){ * tabList.add(new String[]{"1",ip.getCfgType()}); cfgType =
tabList.add(new String[]{"1",ip.getCfgType()}); * ip.getCfgType(); } } }
cfgType = ip.getCfgType(); */
}
}
}*/
if (cfg.getIpPortList() != null) { if (cfg.getIpPortList() != null) {
String cfgType = null; String cfgType = null;
for (IpPortCfg ip : cfg.getIpPortList()) { for (IpPortCfg ip : cfg.getIpPortList()) {
@@ -357,27 +334,25 @@ public class AvContentController extends BaseController {
model.addAttribute("tabList", tabList); model.addAttribute("tabList", tabList);
return "/cfg/av/voip/voipSubList"; return "/cfg/av/voip/voipSubList";
} }
/***************************** voip业务 ***************/ /***************************** voip业务 ***************/
/***************************** contIp业务 ***************/ /***************************** contIp业务 ***************/
// 视频文本内容配置列表 // 视频文本内容配置列表
@RequestMapping(value = { "/contIpList" }) @RequestMapping(value = { "/contIpList" })
public String contIpList(Model model,HttpServletRequest request public String contIpList(Model model, HttpServletRequest request, HttpServletResponse response,
,HttpServletResponse response @ModelAttribute("cfg") BaseIpCfg entity, RedirectAttributes redirectAttributes) {
,@ModelAttribute("cfg")BaseIpCfg entity
,RedirectAttributes redirectAttributes){
Page<BaseIpCfg> page = avContentCfgService.findContIpPage(new Page<BaseIpCfg>(request, response, "r"), entity); Page<BaseIpCfg> page = avContentCfgService.findContIpPage(new Page<BaseIpCfg>(request, response, "r"), entity);
model.addAttribute("page", page); model.addAttribute("page", page);
initPageCondition(model, entity); initPageCondition(model, entity);
return "/cfg/av/contIp/contIpList"; return "/cfg/av/contIp/contIpList";
} }
// 音视频CONTIP新增界面 // 音视频CONTIP新增界面
@RequestMapping(value = { "/contIpForm" }) @RequestMapping(value = { "/contIpForm" })
@RequiresPermissions(value = { "avContIp:config" }) @RequiresPermissions(value = { "avContIp:config" })
public String contIpForm(Model model,HttpServletRequest request,HttpServletResponse response public String contIpForm(Model model, HttpServletRequest request, HttpServletResponse response, String ids,
,String ids,String compileIds String compileIds, BaseIpCfg cfg, RedirectAttributes redirectAttributes) {
,BaseIpCfg cfg
,RedirectAttributes redirectAttributes){
if (!StringUtil.isEmpty(compileIds)) { if (!StringUtil.isEmpty(compileIds)) {
cfg.setCompileId(Integer.parseInt(compileIds)); cfg.setCompileId(Integer.parseInt(compileIds));
cfg = avContentCfgService.getContIpCfgById(cfg); cfg = avContentCfgService.getContIpCfgById(cfg);
@@ -391,11 +366,9 @@ public class AvContentController extends BaseController {
// 保存CONTIP信息 // 保存CONTIP信息
@RequestMapping(value = { "/saveContIp" }) @RequestMapping(value = { "/saveContIp" })
public String saveContIp(Model model,HttpServletRequest request public String saveContIp(Model model, HttpServletRequest request, HttpServletResponse response,
,HttpServletResponse response, @ModelAttribute("cfg") BaseIpCfg cfg, @ModelAttribute("areaCfgIds") String areaCfgIds,
@ModelAttribute("cfg")BaseIpCfg cfg, RedirectAttributes redirectAttributes) {
@ModelAttribute("areaCfgIds")String areaCfgIds
,RedirectAttributes redirectAttributes){
try { try {
avContentCfgService.saveOrUpdateContIp(cfg, areaCfgIds); avContentCfgService.saveOrUpdateContIp(cfg, areaCfgIds);
addMessage(redirectAttributes, "success", "save_success"); addMessage(redirectAttributes, "success", "save_success");
@@ -415,18 +388,17 @@ public class AvContentController extends BaseController {
// 修改CONTIP例配置状态 // 修改CONTIP例配置状态
@RequestMapping(value = { "/updateAvContIpValid" }) @RequestMapping(value = { "/updateAvContIpValid" })
@RequiresPermissions(value = { "avContIp:config" }) @RequiresPermissions(value = { "avContIp:config" })
public String updateAvContIpValid(Integer isAudit,Integer isValid public String updateAvContIpValid(Integer isAudit, Integer isValid, String ids, Integer functionId,
,String ids,Integer functionId RedirectAttributes redirectAttributes) {
,RedirectAttributes redirectAttributes){
avContentCfgService.updateContIpValid(isAudit, isValid, ids, functionId); avContentCfgService.updateContIpValid(isAudit, isValid, ids, functionId);
return "redirect:" + adminPath + "/ntc/av/contIpList?functionId=" + functionId; return "redirect:" + adminPath + "/ntc/av/contIpList?functionId=" + functionId;
} }
// 修改CONTIP配置审核 // 修改CONTIP配置审核
@RequestMapping(value = { "/auditAvContIp" }) @RequestMapping(value = { "/auditAvContIp" })
@RequiresPermissions(value = { "avContIp:confirm" }) @RequiresPermissions(value = { "avContIp:confirm" })
public String auditContIp(Integer isAudit,Integer isValid public String auditContIp(Integer isAudit, Integer isValid, String ids, String compileIds, Integer functionId,
,String ids,String compileIds,Integer functionId RedirectAttributes redirectAttributes) {
, RedirectAttributes redirectAttributes) {
if (!StringUtil.isEmpty(compileIds)) { if (!StringUtil.isEmpty(compileIds)) {
String[] idArray = compileIds.split(","); String[] idArray = compileIds.split(",");
Date auditTime = new Date(); Date auditTime = new Date();
@@ -447,6 +419,7 @@ public class AvContentController extends BaseController {
} }
return "redirect:" + adminPath + "/ntc/av/contIpList?functionId=" + functionId; return "redirect:" + adminPath + "/ntc/av/contIpList?functionId=" + functionId;
} }
// 获取域配置信息 // 获取域配置信息
@RequestMapping(value = { "ajaxAvContIpList" }) @RequestMapping(value = { "ajaxAvContIpList" })
public String ajaxAvContIpList(Model model, Long cfgId, Integer index) { public String ajaxAvContIpList(Model model, Long cfgId, Integer index) {
@@ -470,27 +443,25 @@ public class AvContentController extends BaseController {
model.addAttribute("tabList", tabList); model.addAttribute("tabList", tabList);
return "/cfg/av/subList"; return "/cfg/av/subList";
} }
/***************************** contIp业务 ***************/ /***************************** contIp业务 ***************/
/***************************** picIp业务 ***************/ /***************************** picIp业务 ***************/
// 视频文本内容配置列表 // 视频文本内容配置列表
@RequestMapping(value = { "/picIpList" }) @RequestMapping(value = { "/picIpList" })
public String picIpList(Model model,HttpServletRequest request public String picIpList(Model model, HttpServletRequest request, HttpServletResponse response,
,HttpServletResponse response @ModelAttribute("cfg") BaseIpCfg entity, RedirectAttributes redirectAttributes) {
,@ModelAttribute("cfg")BaseIpCfg entity
,RedirectAttributes redirectAttributes){
Page<BaseIpCfg> page = avContentCfgService.findPicIpPage(new Page<BaseIpCfg>(request, response, "r"), entity); Page<BaseIpCfg> page = avContentCfgService.findPicIpPage(new Page<BaseIpCfg>(request, response, "r"), entity);
model.addAttribute("page", page); model.addAttribute("page", page);
initPageCondition(model, entity); initPageCondition(model, entity);
return "/cfg/av/picIp/picIpList"; return "/cfg/av/picIp/picIpList";
} }
// 音视频CONTIP新增界面 // 音视频CONTIP新增界面
@RequestMapping(value = { "/picIpForm" }) @RequestMapping(value = { "/picIpForm" })
@RequiresPermissions(value = { "avPicIp:config" }) @RequiresPermissions(value = { "avPicIp:config" })
public String picIpForm(Model model,HttpServletRequest request public String picIpForm(Model model, HttpServletRequest request, HttpServletResponse response, String ids,
,HttpServletResponse response,String ids String compileIds, BaseIpCfg cfg, RedirectAttributes redirectAttributes) {
,String compileIds,BaseIpCfg cfg
,RedirectAttributes redirectAttributes){
if (!StringUtil.isEmpty(compileIds)) { if (!StringUtil.isEmpty(compileIds)) {
cfg.setCompileId(Integer.parseInt(compileIds)); cfg.setCompileId(Integer.parseInt(compileIds));
cfg = avContentCfgService.getPicIpCfgById(cfg); cfg = avContentCfgService.getPicIpCfgById(cfg);
@@ -504,11 +475,9 @@ public class AvContentController extends BaseController {
// 保存CONTIP信息 // 保存CONTIP信息
@RequestMapping(value = { "/savePicIp" }) @RequestMapping(value = { "/savePicIp" })
public String savePicIp(Model model,HttpServletRequest request public String savePicIp(Model model, HttpServletRequest request, HttpServletResponse response,
,HttpServletResponse response, @ModelAttribute("cfg") BaseIpCfg cfg, @ModelAttribute("areaCfgIds") String areaCfgIds,
@ModelAttribute("cfg")BaseIpCfg cfg, RedirectAttributes redirectAttributes) {
@ModelAttribute("areaCfgIds")String areaCfgIds
,RedirectAttributes redirectAttributes){
try { try {
avContentCfgService.saveOrUpdatePicIp(cfg, areaCfgIds); avContentCfgService.saveOrUpdatePicIp(cfg, areaCfgIds);
addMessage(redirectAttributes, "success", "save_success"); addMessage(redirectAttributes, "success", "save_success");
@@ -528,18 +497,17 @@ public class AvContentController extends BaseController {
// 修改CONTIP例配置状态 // 修改CONTIP例配置状态
@RequestMapping(value = { "/updatePicIpValid" }) @RequestMapping(value = { "/updatePicIpValid" })
@RequiresPermissions(value = { "avPicIp:config" }) @RequiresPermissions(value = { "avPicIp:config" })
public String updateAvPicIpValid(Integer isAudit,Integer isValid public String updateAvPicIpValid(Integer isAudit, Integer isValid, String ids, Integer functionId,
,String ids,Integer functionId RedirectAttributes redirectAttributes) {
,RedirectAttributes redirectAttributes){
avContentCfgService.updatePicIpValid(isAudit, isValid, ids, functionId); avContentCfgService.updatePicIpValid(isAudit, isValid, ids, functionId);
return "redirect:" + adminPath + "/ntc/av/picIpList?functionId=" + functionId; return "redirect:" + adminPath + "/ntc/av/picIpList?functionId=" + functionId;
} }
// 修改CONTIP配置审核 // 修改CONTIP配置审核
@RequestMapping(value = { "/auditPicIp" }) @RequestMapping(value = { "/auditPicIp" })
@RequiresPermissions(value = { "avPicIp:confirm" }) @RequiresPermissions(value = { "avPicIp:confirm" })
public String auditPicIp(Integer isAudit,Integer isValid,String ids public String auditPicIp(Integer isAudit, Integer isValid, String ids, String compileIds, Integer functionId,
,String compileIds,Integer functionId RedirectAttributes redirectAttributes) {
, RedirectAttributes redirectAttributes) {
if (!StringUtil.isEmpty(compileIds)) { if (!StringUtil.isEmpty(compileIds)) {
String[] idArray = compileIds.split(","); String[] idArray = compileIds.split(",");
Date auditTime = new Date(); Date auditTime = new Date();
@@ -561,6 +529,7 @@ public class AvContentController extends BaseController {
} }
return "redirect:" + adminPath + "/ntc/av/picIpList?functionId=" + functionId; return "redirect:" + adminPath + "/ntc/av/picIpList?functionId=" + functionId;
} }
// 获取域配置信息 // 获取域配置信息
@RequestMapping(value = { "ajaxAvPicIpList" }) @RequestMapping(value = { "ajaxAvPicIpList" })
public String ajaxAvPicIpList(Model model, Long cfgId, Integer index) { public String ajaxAvPicIpList(Model model, Long cfgId, Integer index) {
@@ -584,35 +553,31 @@ public class AvContentController extends BaseController {
model.addAttribute("tabList", tabList); model.addAttribute("tabList", tabList);
return "/cfg/av/subList"; return "/cfg/av/subList";
} }
/*****************************picIp业务***************/
/***************************** picIp业务 ***************/
/***************************** contUrl业务 ***************/ /***************************** contUrl业务 ***************/
// 视频文本内容配置列表 // 视频文本内容配置列表
@RequestMapping(value = { "/contUrlList" }) @RequestMapping(value = { "/contUrlList" })
public String contUrlList(Model model,HttpServletRequest request public String contUrlList(Model model, HttpServletRequest request, HttpServletResponse response,
,HttpServletResponse response @ModelAttribute("cfg") CfgIndexInfo entity, RedirectAttributes redirectAttributes) {
,@ModelAttribute("cfg")CfgIndexInfo entity /*
,RedirectAttributes redirectAttributes){ * if(entity.getIpPort()== null){ entity.setIpPort(new IpPortCfg()); }
/*if(entity.getIpPort()== null){ * if(entity.getAvContUrlCfgList()== null){ entity.setAvContUrlCfg(new
entity.setIpPort(new IpPortCfg()); * AvContUrlCfg());; } if(entity.getNtcSubscribeIdCfg()==null){
} * entity.setNtcSubscribeIdCfg(new NtcSubscribeIdCfg()); }
if(entity.getAvContUrlCfgList()== null){ */
entity.setAvContUrlCfg(new AvContUrlCfg());;
}
if(entity.getNtcSubscribeIdCfg()==null){
entity.setNtcSubscribeIdCfg(new NtcSubscribeIdCfg());
}*/
Page<CfgIndexInfo> page = avContentCfgService.findPage(new Page<CfgIndexInfo>(request, response, "r"), entity); Page<CfgIndexInfo> page = avContentCfgService.findPage(new Page<CfgIndexInfo>(request, response, "r"), entity);
model.addAttribute("page", page); model.addAttribute("page", page);
initPageCondition(model, entity); initPageCondition(model, entity);
return "/cfg/av/contUrl/contUrlList"; return "/cfg/av/contUrl/contUrlList";
} }
// 音视频CONTUrl新增界面 // 音视频CONTUrl新增界面
@RequestMapping(value = { "/contUrlForm" }) @RequestMapping(value = { "/contUrlForm" })
@RequiresPermissions(value = { "avContUrl:config" }) @RequiresPermissions(value = { "avContUrl:config" })
public String contUrlForm(Model model,HttpServletRequest request ,HttpServletResponse response public String contUrlForm(Model model, HttpServletRequest request, HttpServletResponse response, String compileIds,
,String compileIds,String ids, CfgIndexInfo cfg ,RedirectAttributes redirectAttributes){ String ids, CfgIndexInfo cfg, RedirectAttributes redirectAttributes) {
if (!StringUtil.isEmpty(ids)) { if (!StringUtil.isEmpty(ids)) {
cfg.setCfgId(Long.parseLong(ids)); cfg.setCfgId(Long.parseLong(ids));
cfg = avContentCfgService.getUrlCfgIndexInfo(cfg); cfg = avContentCfgService.getUrlCfgIndexInfo(cfg);
@@ -660,22 +625,17 @@ public class AvContentController extends BaseController {
// 修改CONTUrl例配置状态 // 修改CONTUrl例配置状态
@RequestMapping(value = { "/updateAvContUrlValid" }) @RequestMapping(value = { "/updateAvContUrlValid" })
@RequiresPermissions(value = { "avContUrl:config" }) @RequiresPermissions(value = { "avContUrl:config" })
public String updateAvContUrlValid(Integer isAudit,Integer isValid public String updateAvContUrlValid(Integer isAudit, Integer isValid, String ids, Integer functionId,
,String ids,Integer functionId RedirectAttributes redirectAttributes) {
,RedirectAttributes redirectAttributes){
avContentCfgService.updateContUrlValid(isAudit, isValid, ids, functionId); avContentCfgService.updateContUrlValid(isAudit, isValid, ids, functionId);
return "redirect:" + adminPath + "/ntc/av/contUrlList?functionId=" + functionId; return "redirect:" + adminPath + "/ntc/av/contUrlList?functionId=" + functionId;
} }
// 修改CONTUrl配置审核 // 修改CONTUrl配置审核
@RequestMapping(value = { "/auditAvContUrl" }) @RequestMapping(value = { "/auditAvContUrl" })
@RequiresPermissions(value = { "avContUrl:confirm" }) @RequiresPermissions(value = { "avContUrl:confirm" })
public String auditContUrl(Model model,@ModelAttribute("cfg")CfgIndexInfo cfg, public String auditContUrl(Model model, @ModelAttribute("cfg") CfgIndexInfo cfg, Integer isValid, Integer isAudit,
Integer isValid, String ids, Integer functionId, RedirectAttributes redirectAttributes, HttpServletResponse response,
Integer isAudit,
String ids,
Integer functionId,
RedirectAttributes redirectAttributes,
HttpServletResponse response,
HttpServletRequest request) { HttpServletRequest request) {
if (!StringUtil.isEmpty(ids)) { if (!StringUtil.isEmpty(ids)) {
String[] idArray = ids.split(","); String[] idArray = ids.split(",");
@@ -716,6 +676,7 @@ public class AvContentController extends BaseController {
} }
return "redirect:" + adminPath + "/ntc/av/contUrlList?functionId=" + functionId; return "redirect:" + adminPath + "/ntc/av/contUrlList?functionId=" + functionId;
} }
// 获取域配置信息 // 获取域配置信息
@RequestMapping(value = { "ajaxAvContUrlList" }) @RequestMapping(value = { "ajaxAvContUrlList" })
public String ajaxAvContUrlList(Model model, Long cfgId, Integer index, Integer compileId) { public String ajaxAvContUrlList(Model model, Long cfgId, Integer index, Integer compileId) {
@@ -743,7 +704,6 @@ public class AvContentController extends BaseController {
} }
} }
// 查询关键字 // 查询关键字
if (cfg.getNtcSubscribeIdCfgList() != null) { if (cfg.getNtcSubscribeIdCfgList() != null) {
String cfgType = null; String cfgType = null;
@@ -759,28 +719,26 @@ public class AvContentController extends BaseController {
model.addAttribute("tabList", tabList); model.addAttribute("tabList", tabList);
return "/cfg/av/contUrl/contSubList"; return "/cfg/av/contUrl/contSubList";
} }
/*****************************contUrl业务***************/
/***************************** contUrl业务 ***************/
/***************************** picUrl业务 ***************/ /***************************** picUrl业务 ***************/
// 视频文本内容配置列表 // 视频文本内容配置列表
@RequestMapping(value = { "/picUrlList" }) @RequestMapping(value = { "/picUrlList" })
public String picUrlList(Model model,HttpServletRequest request public String picUrlList(Model model, HttpServletRequest request, HttpServletResponse response,
,HttpServletResponse response @ModelAttribute("cfg") BaseStringCfg entity, RedirectAttributes redirectAttributes) {
,@ModelAttribute("cfg")BaseStringCfg entity Page<BaseStringCfg> page = avContentCfgService.findPicUrlPage(new Page<BaseStringCfg>(request, response, "r"),
,RedirectAttributes redirectAttributes){ entity);
Page<BaseStringCfg> page = avContentCfgService.findPicUrlPage(new Page<BaseStringCfg>(request, response,"r"), entity);
model.addAttribute("page", page); model.addAttribute("page", page);
initPageCondition(model, entity); initPageCondition(model, entity);
return "/cfg/av/picUrl/picUrlList"; return "/cfg/av/picUrl/picUrlList";
} }
// 音视频CONTUrl新增界面 // 音视频CONTUrl新增界面
@RequestMapping(value = { "/picUrlForm" }) @RequestMapping(value = { "/picUrlForm" })
@RequiresPermissions(value = { "avPicUrl:config" }) @RequiresPermissions(value = { "avPicUrl:config" })
public String picUrlForm(Model model,HttpServletRequest request public String picUrlForm(Model model, HttpServletRequest request, HttpServletResponse response, String ids,
,HttpServletResponse response,String ids String compileIds, @ModelAttribute("cfg") BaseStringCfg cfg, RedirectAttributes redirectAttributes) {
,String compileIds,@ModelAttribute("cfg")BaseStringCfg cfg
,RedirectAttributes redirectAttributes){
if (!StringUtil.isEmpty(compileIds)) { if (!StringUtil.isEmpty(compileIds)) {
cfg.setCompileId(Integer.parseInt(compileIds)); cfg.setCompileId(Integer.parseInt(compileIds));
cfg = avContentCfgService.getPicUrlCfgById(cfg); cfg = avContentCfgService.getPicUrlCfgById(cfg);
@@ -794,11 +752,9 @@ public class AvContentController extends BaseController {
// 保存CONTUrl信息 // 保存CONTUrl信息
@RequestMapping(value = { "/savePicUrl" }) @RequestMapping(value = { "/savePicUrl" })
public String savePicUrl(Model model,HttpServletRequest request public String savePicUrl(Model model, HttpServletRequest request, HttpServletResponse response,
,HttpServletResponse response, @ModelAttribute("cfg") BaseStringCfg cfg, @ModelAttribute("areaCfgIds") String areaCfgIds,
@ModelAttribute("cfg")BaseStringCfg cfg, RedirectAttributes redirectAttributes) {
@ModelAttribute("areaCfgIds")String areaCfgIds
,RedirectAttributes redirectAttributes){
try { try {
avContentCfgService.saveOrUpdatePicUrl(cfg, areaCfgIds); avContentCfgService.saveOrUpdatePicUrl(cfg, areaCfgIds);
addMessage(redirectAttributes, "success", "save_success"); addMessage(redirectAttributes, "success", "save_success");
@@ -817,18 +773,17 @@ public class AvContentController extends BaseController {
// 修改CONTUrl例配置状态 // 修改CONTUrl例配置状态
@RequestMapping(value = { "/updateAvPicUrlValid" }) @RequestMapping(value = { "/updateAvPicUrlValid" })
@RequiresPermissions(value = { "avPicUrl:config" }) @RequiresPermissions(value = { "avPicUrl:config" })
public String updateAvPicUrlValid(Integer isAudit,Integer isValid public String updateAvPicUrlValid(Integer isAudit, Integer isValid, String ids, Integer functionId,
,String ids,Integer functionId RedirectAttributes redirectAttributes) {
,RedirectAttributes redirectAttributes){
avContentCfgService.updatePicUrlValid(isAudit, isValid, ids, functionId); avContentCfgService.updatePicUrlValid(isAudit, isValid, ids, functionId);
return "redirect:" + adminPath + "/ntc/av/picUrlList?functionId=" + functionId; return "redirect:" + adminPath + "/ntc/av/picUrlList?functionId=" + functionId;
} }
// 修改CONTUrl配置审核 // 修改CONTUrl配置审核
@RequestMapping(value = { "/auditAvPicUrl" }) @RequestMapping(value = { "/auditAvPicUrl" })
@RequiresPermissions(value = { "avPicUrl:confirm" }) @RequiresPermissions(value = { "avPicUrl:confirm" })
public String auditPicUrl(Integer isAudit,Integer isValid public String auditPicUrl(Integer isAudit, Integer isValid, String ids, String compileIds, Integer functionId,
,String ids,String compileIds,Integer functionId RedirectAttributes redirectAttributes) {
, RedirectAttributes redirectAttributes) {
if (!StringUtil.isEmpty(compileIds)) { if (!StringUtil.isEmpty(compileIds)) {
String[] idArray = compileIds.split(","); String[] idArray = compileIds.split(",");
Date auditTime = new Date(); Date auditTime = new Date();
@@ -850,6 +805,7 @@ public class AvContentController extends BaseController {
} }
return "redirect:" + adminPath + "/ntc/av/picUrlList?functionId=" + functionId; return "redirect:" + adminPath + "/ntc/av/picUrlList?functionId=" + functionId;
} }
// 获取域配置信息 // 获取域配置信息
@RequestMapping(value = { "ajaxAvPicUrlList" }) @RequestMapping(value = { "ajaxAvPicUrlList" })
public String ajaxAvPicUrlList(Model model, Long cfgId, Integer index) { public String ajaxAvPicUrlList(Model model, Long cfgId, Integer index) {
@@ -873,10 +829,10 @@ public class AvContentController extends BaseController {
model.addAttribute("tabList", tabList); model.addAttribute("tabList", tabList);
return "/cfg/av/subList"; return "/cfg/av/subList";
} }
/***************************** picUrl业务 ***************/ /***************************** picUrl业务 ***************/
/** /**
* 1、effectiveIds分组展示 * 1、effectiveIds分组展示 2、无effectiveIds查询area_ip根据compileId查询展示
* 2、无effectiveIds查询area_ip根据compileId查询展示
*/ */
@ResponseBody @ResponseBody
@RequestMapping(value = "/area/ajaxAreaEffictiveInfo") @RequestMapping(value = "/area/ajaxAreaEffictiveInfo")
@@ -901,14 +857,11 @@ public class AvContentController extends BaseController {
data.put("areaIps", areaIps); data.put("areaIps", areaIps);
return data; return data;
} }
// 视频文本VOIP配置列表导出 // 视频文本VOIP配置列表导出
@RequestMapping(value = { "/voipExport" }) @RequestMapping(value = { "/voipExport" })
public String voipExport(Model model, public String voipExport(Model model, HttpServletRequest request, HttpServletResponse response,
HttpServletRequest request, @ModelAttribute("cfg") CfgIndexInfo entity, String ids, RedirectAttributes redirectAttributes) {
HttpServletResponse response,
@ModelAttribute("cfg")CfgIndexInfo entity,
String ids,
RedirectAttributes redirectAttributes){
try { try {
// 获取国际化配置 // 获取国际化配置
Properties msgProp = getMsgProp(); Properties msgProp = getMsgProp();
@@ -945,7 +898,8 @@ public class AvContentController extends BaseController {
pageInfo.setPageSize(-1); pageInfo.setPageSize(-1);
} }
Page<CfgIndexInfo> page = avContentCfgService.findPage(pageInfo, entity); Page<CfgIndexInfo> page = avContentCfgService.findPage(pageInfo, entity);
new ExportExcel(msgProp,null, CfgIndexInfo.class,1).setDataList(msgProp,page.getList(),map).write(response, fileName).dispose(); new ExportExcel(msgProp, null, CfgIndexInfo.class, 1).setDataList(msgProp, page.getList(), map)
.write(response, fileName).dispose();
} }
return null; return null;
@@ -977,15 +931,6 @@ public class AvContentController extends BaseController {
Page<CfgIndexInfo> pageInfo = new Page<CfgIndexInfo>(request, response, "r"); Page<CfgIndexInfo> pageInfo = new Page<CfgIndexInfo>(request, response, "r");
pageInfo.setPageNo(1); pageInfo.setPageNo(1);
pageInfo.setPageSize(Constants.MAX_EXPORT_SIZE); pageInfo.setPageSize(Constants.MAX_EXPORT_SIZE);
if(entity.getIpPort()== null){
entity.setIpPort(new IpPortCfg());
}
if(entity.getAvContUrlCfgList()== null){
entity.setAvContUrlCfg(new AvContUrlCfg());;
}
if(entity.getNtcSubscribeIdCfg()==null){
entity.setNtcSubscribeIdCfg(new NtcSubscribeIdCfg());
}
Page<CfgIndexInfo> page = avContentCfgService.findPage(pageInfo, entity); Page<CfgIndexInfo> page = avContentCfgService.findPage(pageInfo, entity);
ipLists = page.getList(); ipLists = page.getList();
} }
@@ -1012,6 +957,20 @@ public class AvContentController extends BaseController {
+ ",letter,whether_area_block,classification,attribute,label" + ",letter,whether_area_block,classification,attribute,label"
+ ",userregion1,userregion2,userregion3,userregion4,userregion5,"; + ",userregion1,userregion2,userregion3,userregion4,userregion5,";
// 时间过滤
if (entity.getSearch_create_time_start() == null && entity.getSearch_create_time_end() == null) {
cfgIndexInfoNoExport = ",config_time" + cfgIndexInfoNoExport;
}
if (entity.getSearch_edit_time_start() == null && entity.getSearch_edit_time_end() == null) {
cfgIndexInfoNoExport = ",edit_time" + cfgIndexInfoNoExport;
}
if (entity.getSearch_audit_time_start() == null && entity.getSearch_audit_time_end() == null) {
cfgIndexInfoNoExport = ",audit_time" + cfgIndexInfoNoExport;
}
if (!StringUtil.isEmpty(entity.gethColumns())) {
cfgIndexInfoNoExport = "," + entity.gethColumns() + "," + cfgIndexInfoNoExport;
}
noExportMap.put(entity.getMenuNameCode(), cfgIndexInfoNoExport); noExportMap.put(entity.getMenuNameCode(), cfgIndexInfoNoExport);
noExportMap.put("NTC_UNIVERSAL_IP", ipPortInfoNoExport); noExportMap.put("NTC_UNIVERSAL_IP", ipPortInfoNoExport);
noExportMap.put("NTC_STREAMING_MEDIA_URL", regionCfgNoExport); noExportMap.put("NTC_STREAMING_MEDIA_URL", regionCfgNoExport);
@@ -1031,13 +990,22 @@ public class AvContentController extends BaseController {
dataMap.put("NTC_UNIVERSAL_IP", ipList); dataMap.put("NTC_UNIVERSAL_IP", ipList);
dataMap.put("NTC_STREAMING_MEDIA_URL", streamurlList); dataMap.put("NTC_STREAMING_MEDIA_URL", streamurlList);
dataMap.put("NTC_SUBSCRIBE_ID", subscribeInfoList); dataMap.put("NTC_SUBSCRIBE_ID", subscribeInfoList);
/*}*/
this._export(model, request, response, redirectAttributes,entity.getMenuNameCode(),titleList,classMap,dataMap,noExportMap); String timeRange = initTimeMap(entity);
noExportMap.put("timeRange", timeRange);
if ("csv".equals(entity.getExType())) {
this._exportCsv(model, request, response, redirectAttributes, entity.getMenuNameCode(), titleList,
classMap, dataMap, noExportMap);
} else {
this._export(model, request, response, redirectAttributes, entity.getMenuNameCode(), titleList,
classMap, dataMap, noExportMap);
}
} catch (Exception e) { } catch (Exception e) {
logger.error("stream export failed", e); logger.error("stream export failed", e);
addMessage(redirectAttributes, "error", "export_failed"); addMessage(redirectAttributes, "error", "export_failed");
} }
//return "redirect:" + adminPath +"/ntc/iplist/list?functionId="+entity.getFunctionId(); // return "redirect:" + adminPath
// +"/ntc/iplist/list?functionId="+entity.getFunctionId();
} }
// voip配置导出 // voip配置导出
@@ -1051,7 +1019,6 @@ public class AvContentController extends BaseController {
Map<String, List> dataMap = new HashMap<String, List>(); Map<String, List> dataMap = new HashMap<String, List>();
Map<String, String> noExportMap = new HashMap<String, String>(); Map<String, String> noExportMap = new HashMap<String, String>();
List<CfgIndexInfo> ipLists = new ArrayList<CfgIndexInfo>(); List<CfgIndexInfo> ipLists = new ArrayList<CfgIndexInfo>();
// 导出选中记录 // 导出选中记录
if (!StringUtil.isEmpty(ids)) { if (!StringUtil.isEmpty(ids)) {
@@ -1061,16 +1028,8 @@ public class AvContentController extends BaseController {
Page<CfgIndexInfo> pageInfo = new Page<CfgIndexInfo>(request, response, "r"); Page<CfgIndexInfo> pageInfo = new Page<CfgIndexInfo>(request, response, "r");
pageInfo.setPageNo(1); pageInfo.setPageNo(1);
pageInfo.setPageSize(Constants.MAX_EXPORT_SIZE); pageInfo.setPageSize(Constants.MAX_EXPORT_SIZE);
if(entity.getIpPort()== null){ Page<CfgIndexInfo> page = avContentCfgService.findPage(new Page<CfgIndexInfo>(request, response, "r"),
entity.setIpPort(new IpPortCfg()); entity);
}
if(entity.getVoipAccount()== null){
entity.setVoipAccount(new AvVoipAccountCfg());
}
if(entity.getNtcSubscribeIdCfg()==null){
entity.setNtcSubscribeIdCfg(new NtcSubscribeIdCfg());
}
Page<CfgIndexInfo> page = avContentCfgService.findPage(new Page<CfgIndexInfo>(request, response,"r"), entity);
ipLists = page.getList(); ipLists = page.getList();
} }
@@ -1097,6 +1056,20 @@ public class AvContentController extends BaseController {
+ ",letter,whether_area_block,classification,attribute,label" + ",letter,whether_area_block,classification,attribute,label"
+ ",userregion1,userregion2,userregion3,userregion4,userregion5,"; + ",userregion1,userregion2,userregion3,userregion4,userregion5,";
// 时间过滤
if (entity.getSearch_create_time_start() == null && entity.getSearch_create_time_end() == null) {
cfgIndexInfoNoExport = ",config_time" + cfgIndexInfoNoExport;
}
if (entity.getSearch_edit_time_start() == null && entity.getSearch_edit_time_end() == null) {
cfgIndexInfoNoExport = ",edit_time" + cfgIndexInfoNoExport;
}
if (entity.getSearch_audit_time_start() == null && entity.getSearch_audit_time_end() == null) {
cfgIndexInfoNoExport = ",audit_time" + cfgIndexInfoNoExport;
}
if (!StringUtil.isEmpty(entity.gethColumns())) {
cfgIndexInfoNoExport = "," + entity.gethColumns() + "," + cfgIndexInfoNoExport;
}
noExportMap.put(entity.getMenuNameCode(), cfgIndexInfoNoExport); noExportMap.put(entity.getMenuNameCode(), cfgIndexInfoNoExport);
noExportMap.put("NTC_UNIVERSAL_IP", ipPortInfoNoExport); noExportMap.put("NTC_UNIVERSAL_IP", ipPortInfoNoExport);
noExportMap.put("NTC_VOIP_ACCOUNT", regionCfgNoExport); noExportMap.put("NTC_VOIP_ACCOUNT", regionCfgNoExport);
@@ -1116,12 +1089,21 @@ public class AvContentController extends BaseController {
dataMap.put("NTC_UNIVERSAL_IP", ipList); dataMap.put("NTC_UNIVERSAL_IP", ipList);
dataMap.put("NTC_VOIP_ACCOUNT", countlList); dataMap.put("NTC_VOIP_ACCOUNT", countlList);
dataMap.put("NTC_SUBSCRIBE_ID", subscribeInfoList); dataMap.put("NTC_SUBSCRIBE_ID", subscribeInfoList);
/*}*/
this._export(model, request, response, redirectAttributes,entity.getMenuNameCode(),titleList,classMap,dataMap,noExportMap); String timeRange = initTimeMap(entity);
noExportMap.put("timeRange", timeRange);
if ("csv".equals(entity.getExType())) {
this._exportCsv(model, request, response, redirectAttributes, entity.getMenuNameCode(), titleList,
classMap, dataMap, noExportMap);
} else {
this._export(model, request, response, redirectAttributes, entity.getMenuNameCode(), titleList,
classMap, dataMap, noExportMap);
}
} catch (Exception e) { } catch (Exception e) {
logger.error("voip export failed", e); logger.error("voip export failed", e);
addMessage(redirectAttributes, "error", "export_failed"); addMessage(redirectAttributes, "error", "export_failed");
} }
//return "redirect:" + adminPath +"/ntc/iplist/list?functionId="+entity.getFunctionId(); // return "redirect:" + adminPath
// +"/ntc/iplist/list?functionId="+entity.getFunctionId();
} }
} }

View File

@@ -71,6 +71,7 @@ import it.sauronsoftware.jave.VideoInfo;
/** /**
* 处理音视频业务 * 处理音视频业务
*
* @author zhangwei * @author zhangwei
* *
*/ */
@@ -79,9 +80,12 @@ import it.sauronsoftware.jave.VideoInfo;
public class AvController extends BaseController { public class AvController extends BaseController {
// 音视频文件样例配置列表 // 音视频文件样例配置列表
@RequestMapping(value = {"/sample/fileSampleList","/sample/fileSampleSpeakerList","/sample/fileSampleLogoList","/sample/fileSampleFaceList"}) @RequestMapping(value = { "/sample/fileSampleList", "/sample/fileSampleSpeakerList", "/sample/fileSampleLogoList",
public String fileSampleList(Model model,HttpServletRequest request,HttpServletResponse response,@ModelAttribute("cfg")AvFileSampleCfg entity){ "/sample/fileSampleFaceList" })
Page<AvFileSampleCfg> page = avCfgService.getAvFileSampleList(new Page<AvFileSampleCfg>(request, response,"a"), entity); public String fileSampleList(Model model, HttpServletRequest request, HttpServletResponse response,
@ModelAttribute("cfg") AvFileSampleCfg entity) {
Page<AvFileSampleCfg> page = avCfgService.getAvFileSampleList(new Page<AvFileSampleCfg>(request, response, "a"),
entity);
model.addAttribute("page", page); model.addAttribute("page", page);
initPageCondition(model, entity); initPageCondition(model, entity);
List<FunctionRegionDict> regionList = DictUtils.getFunctionRegionDictList(entity.getFunctionId()); List<FunctionRegionDict> regionList = DictUtils.getFunctionRegionDictList(entity.getFunctionId());
@@ -91,10 +95,13 @@ public class AvController extends BaseController {
} }
return "/cfg/av/fileSampleList"; return "/cfg/av/fileSampleList";
} }
// 音视频标志样例配置列表 // 音视频标志样例配置列表
@RequestMapping(value = { "/sample/audioSignSampleList" }) @RequestMapping(value = { "/sample/audioSignSampleList" })
public String audioSignSampleList(Model model,HttpServletRequest request,HttpServletResponse response,@ModelAttribute("cfg")AvSignSampleCfg entity){ public String audioSignSampleList(Model model, HttpServletRequest request, HttpServletResponse response,
Page<AvSignSampleCfg> page = avCfgService.getAvSignSampleList(new Page<AvSignSampleCfg>(request, response,"a"), entity); @ModelAttribute("cfg") AvSignSampleCfg entity) {
Page<AvSignSampleCfg> page = avCfgService.getAvSignSampleList(new Page<AvSignSampleCfg>(request, response, "a"),
entity);
model.addAttribute("page", page); model.addAttribute("page", page);
initPageCondition(model, entity); initPageCondition(model, entity);
List<FunctionRegionDict> regionList = DictUtils.getFunctionRegionDictList(entity.getFunctionId()); List<FunctionRegionDict> regionList = DictUtils.getFunctionRegionDictList(entity.getFunctionId());
@@ -104,23 +111,28 @@ public class AvController extends BaseController {
} }
return "/cfg/av/signSampleList"; return "/cfg/av/signSampleList";
} }
// 视频标志样例配置列表 // 视频标志样例配置列表
@RequestMapping(value = { "/sample/signSampleList" }) @RequestMapping(value = { "/sample/signSampleList" })
public String signSampleList(Model model,HttpServletRequest request,HttpServletResponse response,@ModelAttribute("cfg")AvSignSampleCfg entity){ public String signSampleList(Model model, HttpServletRequest request, HttpServletResponse response,
@ModelAttribute("cfg") AvSignSampleCfg entity) {
List<AvSignSampleCfg> list = avCfgService.getSignSampleList(entity); List<AvSignSampleCfg> list = avCfgService.getSignSampleList(entity);
model.addAttribute("cfgs", list); model.addAttribute("cfgs", list);
model.addAttribute("functionId", entity.getFunctionId()); model.addAttribute("functionId", entity.getFunctionId());
initPageCondition(model, entity); initPageCondition(model, entity);
/*List<FunctionRegionDict> regionList = DictUtils.getFunctionRegionDictList(entity.getFunctionId()); /*
for(FunctionRegionDict region:regionList){ * List<FunctionRegionDict> regionList =
model.addAttribute("regionValue",region.getConfigRegionValue()); * DictUtils.getFunctionRegionDictList(entity.getFunctionId());
break; * for(FunctionRegionDict region:regionList){
}*/ * model.addAttribute("regionValue",region.getConfigRegionValue());
* break; }
*/
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(entity.getFunctionId()); List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(entity.getFunctionId());
model.addAttribute("serviceList", serviceList); model.addAttribute("serviceList", serviceList);
// return "/cfg/av/signSampleList"; // return "/cfg/av/signSampleList";
return "/cfg/av/switchSignSample"; return "/cfg/av/switchSignSample";
} }
// 日志获取样例获取域配置信息 // 日志获取样例获取域配置信息
@RequestMapping(value = { "ajaxSignSampleList" }) @RequestMapping(value = { "ajaxSignSampleList" })
public String ajaxSignSampleList(Model model, Long cfgId, Integer index, Integer compileId) { public String ajaxSignSampleList(Model model, Long cfgId, Integer index, Integer compileId) {
@@ -146,7 +158,8 @@ public class AvController extends BaseController {
// 文件样例配置界面 // 文件样例配置界面
@RequestMapping(value = { "/sample/fileSampleForm" }) @RequestMapping(value = { "/sample/fileSampleForm" })
public String fileSampleForm(Model model,HttpServletRequest request,HttpServletResponse response,String ids,AvFileSampleCfg entity){ public String fileSampleForm(Model model, HttpServletRequest request, HttpServletResponse response, String ids,
AvFileSampleCfg entity) {
if (!StringUtil.isEmpty(ids)) { if (!StringUtil.isEmpty(ids)) {
entity = avCfgService.getAvFileSampleById(Long.parseLong(ids), null); entity = avCfgService.getAvFileSampleById(Long.parseLong(ids), null);
} }
@@ -155,6 +168,7 @@ public class AvController extends BaseController {
model.addAttribute("_cfg", entity); model.addAttribute("_cfg", entity);
return "/cfg/av/fileSampleForm"; return "/cfg/av/fileSampleForm";
} }
// 日志获取样例获取域配置信息 // 日志获取样例获取域配置信息
@RequestMapping(value = { "ajaxfileSampleList" }) @RequestMapping(value = { "ajaxfileSampleList" })
public String ajaxAvContIpList(Model model, Long cfgId, Integer index, Integer compileId) { public String ajaxAvContIpList(Model model, Long cfgId, Integer index, Integer compileId) {
@@ -172,9 +186,11 @@ public class AvController extends BaseController {
model.addAttribute("tabList", tabList); model.addAttribute("tabList", tabList);
return "/cfg/av/fileSampleSubList"; return "/cfg/av/fileSampleSubList";
} }
// 标志样例配置界面 // 标志样例配置界面
@RequestMapping(value = { "/sample/audioSignSampleForm" }) @RequestMapping(value = { "/sample/audioSignSampleForm" })
public String audioSignSampleForm(Model model,HttpServletRequest request,HttpServletResponse response,String ids,AvSignSampleCfg entity){ public String audioSignSampleForm(Model model, HttpServletRequest request, HttpServletResponse response, String ids,
AvSignSampleCfg entity) {
if (!StringUtil.isEmpty(ids)) { if (!StringUtil.isEmpty(ids)) {
entity = avCfgService.getAvSignSampleById(Long.parseLong(ids)); entity = avCfgService.getAvSignSampleById(Long.parseLong(ids));
} }
@@ -182,10 +198,12 @@ public class AvController extends BaseController {
model.addAttribute("_cfg", entity); model.addAttribute("_cfg", entity);
return "/cfg/av/signSampleForm"; return "/cfg/av/signSampleForm";
} }
// 保存文件样例配置 // 保存文件样例配置
@RequestMapping(value = { "/sample/saveFileSample" }) @RequestMapping(value = { "/sample/saveFileSample" })
public String saveFileSample(Model model,HttpServletRequest request,HttpServletResponse response, RedirectAttributes redirectAttributes, public String saveFileSample(Model model, HttpServletRequest request, HttpServletResponse response,
String ids,AvFileSampleCfg entity,MultipartFile srcFile,MultipartFile sampleFile,String picPath,String videoToPicture){ RedirectAttributes redirectAttributes, String ids, AvFileSampleCfg entity, MultipartFile srcFile,
MultipartFile sampleFile, String picPath, String videoToPicture) {
try { try {
// if(srcFile!=null && sampleFile!=null && // if(srcFile!=null && sampleFile!=null &&
// srcFile.getSize()>0 && sampleFile.getSize()>0){ // srcFile.getSize()>0 && sampleFile.getSize()>0){
@@ -230,7 +248,8 @@ public class AvController extends BaseController {
if (StringUtil.isBlank(srcFile.getOriginalFilename())) { if (StringUtil.isBlank(srcFile.getOriginalFilename())) {
srcFileAllPath = srcFilePath + sep + fileName + FileUtils.getSuffix(srcFile.getName(), true); srcFileAllPath = srcFilePath + sep + fileName + FileUtils.getSuffix(srcFile.getName(), true);
} else { } else {
srcFileAllPath = srcFilePath+sep+fileName+FileUtils.getSuffix(srcFile.getOriginalFilename(), true); srcFileAllPath = srcFilePath + sep + fileName
+ FileUtils.getSuffix(srcFile.getOriginalFilename(), true);
} }
String sampleFileAllPath = sampleFilePath + sep + fileName + ".sample"; String sampleFileAllPath = sampleFilePath + sep + fileName + ".sample";
@@ -245,15 +264,21 @@ public class AvController extends BaseController {
} }
entity.setSrcUrl(""); entity.setSrcUrl("");
entity.setSampleUrl(""); entity.setSampleUrl("");
/*String host = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+request.getContextPath(); /*
String srcUrl = host+srcFilePath.substring(srcFilePath.indexOf(Constants.AV_FILE_PATH)+Constants.AV_FILE_PATH.length()-1)+sep+uploadSrcFile.getName(); * String host =
String sampleUrl = host+sampleFilePath.substring(sampleFilePath.indexOf(Constants.AV_FILE_PATH)+Constants.AV_FILE_PATH.length()-1)+sep+uploadSampleFile.getName(); * request.getScheme()+"://"+request.getServerName()+":"+request
srcUrl = srcUrl.replace("\\", "/"); * .getServerPort()+request.getContextPath(); String srcUrl =
sampleUrl = sampleUrl.replace("\\", "/"); * host+srcFilePath.substring(srcFilePath.indexOf(Constants.
logger.info("srcUrl:"+srcUrl); * AV_FILE_PATH)+Constants.AV_FILE_PATH.length()-1)+sep+
logger.info("sampleUrl:"+sampleUrl); * uploadSrcFile.getName(); String sampleUrl =
entity.setSrcUrl(srcUrl); * host+sampleFilePath.substring(sampleFilePath.indexOf(
entity.setSampleUrl(sampleUrl);*/ * Constants.AV_FILE_PATH)+Constants.AV_FILE_PATH.length()-1)+
* sep+uploadSampleFile.getName(); srcUrl =
* srcUrl.replace("\\", "/"); sampleUrl =
* sampleUrl.replace("\\", "/"); logger.info("srcUrl:"+srcUrl);
* logger.info("sampleUrl:"+sampleUrl);
* entity.setSrcUrl(srcUrl); entity.setSampleUrl(sampleUrl);
*/
// File uploadSrcFile = new File(srcFilePath); // File uploadSrcFile = new File(srcFilePath);
// FileCopyUtils.copy(srcFile.getBytes(), uploadSrcFile); // FileCopyUtils.copy(srcFile.getBytes(), uploadSrcFile);
@@ -268,11 +293,11 @@ public class AvController extends BaseController {
if (Constants.AUDIO_FILE_TYPE.contains(FileUtils.getSuffix(uploadSrcFile.getName(), false)) if (Constants.AUDIO_FILE_TYPE.contains(FileUtils.getSuffix(uploadSrcFile.getName(), false))
|| Constants.VIDEO_FILE_TYPE.contains(FileUtils.getSuffix(uploadSrcFile.getName(), false)) || Constants.VIDEO_FILE_TYPE.contains(FileUtils.getSuffix(uploadSrcFile.getName(), false))
|| Constants.VOIP_FILE_TYPE.contains(FileUtils.getSuffix(uploadSrcFile.getName(), false)) || Constants.VOIP_FILE_TYPE.contains(FileUtils.getSuffix(uploadSrcFile.getName(), false))
||Constants.SPEAKER_FILE_TYPE.contains(FileUtils.getSuffix(uploadSrcFile.getName(),false)) || Constants.SPEAKER_FILE_TYPE.contains(FileUtils.getSuffix(uploadSrcFile.getName(), false))) {
){
if (!validateAvDuration(uploadSrcFile)) { if (!validateAvDuration(uploadSrcFile)) {
addMessage(redirectAttributes, "error", "exceeds_duration_limit"); addMessage(redirectAttributes, "error", "exceeds_duration_limit");
logger.error("The duration of uploaded files exceeds the limit("+Constants.AV_DURATION_LIMIT+"s)."); logger.error("The duration of uploaded files exceeds the limit(" + Constants.AV_DURATION_LIMIT
+ "s).");
throw new MultiPartNewException(this.getMsgProp().getProperty("exceeds_duration_limit")); throw new MultiPartNewException(this.getMsgProp().getProperty("exceeds_duration_limit"));
} }
@@ -280,7 +305,6 @@ public class AvController extends BaseController {
} }
avCfgService.saveOrUpdateAvFileSample(entity, srcFile); avCfgService.saveOrUpdateAvFileSample(entity, srcFile);
addMessage(redirectAttributes, "success", "save_success"); addMessage(redirectAttributes, "success", "save_success");
} catch (Exception e) { } catch (Exception e) {
@@ -299,9 +323,11 @@ public class AvController extends BaseController {
return "redirect:" + adminPath + "/ntc/av/sample/fileSampleList?functionId=" + entity.getFunctionId(); return "redirect:" + adminPath + "/ntc/av/sample/fileSampleList?functionId=" + entity.getFunctionId();
} }
// 保存标志样例配置 // 保存标志样例配置
@RequestMapping(value = { "/sample/saveAudioSignSample" }) @RequestMapping(value = { "/sample/saveAudioSignSample" })
public String saveAudioSignSample(Model model,HttpServletRequest request,HttpServletResponse response, RedirectAttributes redirectAttributes,String ids,AvSignSampleCfg entity){ public String saveAudioSignSample(Model model, HttpServletRequest request, HttpServletResponse response,
RedirectAttributes redirectAttributes, String ids, AvSignSampleCfg entity) {
try { try {
avCfgService.saveOrUpdateAvSignSample(entity); avCfgService.saveOrUpdateAvSignSample(entity);
addMessage(redirectAttributes, "success", "save_success"); addMessage(redirectAttributes, "success", "save_success");
@@ -318,16 +344,20 @@ public class AvController extends BaseController {
} }
return "redirect:" + adminPath + "/ntc/av/sample/audioSignSampleList?functionId=" + entity.getFunctionId(); return "redirect:" + adminPath + "/ntc/av/sample/audioSignSampleList?functionId=" + entity.getFunctionId();
} }
// 修改文件样例配置状态 // 修改文件样例配置状态
@RequestMapping(value = { "/sample/updateAvFileSampleValid" }) @RequestMapping(value = { "/sample/updateAvFileSampleValid" })
public String updateAvFileSampleValid(Integer isAudit,Integer isValid,String ids,Integer functionId,RedirectAttributes redirectAttributes){ public String updateAvFileSampleValid(Integer isAudit, Integer isValid, String ids, Integer functionId,
RedirectAttributes redirectAttributes) {
avCfgService.updateAvFileSampleValid(isAudit, isValid, ids); avCfgService.updateAvFileSampleValid(isAudit, isValid, ids);
addMessage(redirectAttributes, "success", "delete_success"); addMessage(redirectAttributes, "success", "delete_success");
return "redirect:" + adminPath + "/ntc/av/sample/fileSampleList?functionId=" + functionId; return "redirect:" + adminPath + "/ntc/av/sample/fileSampleList?functionId=" + functionId;
} }
// 修改文件样例配置审核状态 // 修改文件样例配置审核状态
/** /**
* 审核配置下发,为了保证配置下发过程事务正确,一条配置提交一次 * 审核配置下发,为了保证配置下发过程事务正确,一条配置提交一次
*
* @param isAudit * @param isAudit
* @param isValid * @param isValid
* @param ids * @param ids
@@ -335,14 +365,9 @@ public class AvController extends BaseController {
* @return * @return
*/ */
@RequestMapping(value = { "/sample/auditAvFileSample" }) @RequestMapping(value = { "/sample/auditAvFileSample" })
public String auditAvFileSample(Model model,@ModelAttribute("cfg")AvFileSampleCfg cfg, public String auditAvFileSample(Model model, @ModelAttribute("cfg") AvFileSampleCfg cfg, Integer isValid,
Integer isValid, Integer isAudit, String ids, Integer functionId, RedirectAttributes redirectAttributes,
Integer isAudit, HttpServletResponse response, HttpServletRequest request) {
String ids,
Integer functionId,
RedirectAttributes redirectAttributes,
HttpServletResponse response,
HttpServletRequest request){
if (!StringUtil.isEmpty(ids)) { if (!StringUtil.isEmpty(ids)) {
// avCfgService.auditAvFileSample(isAudit,isValid,ids); // avCfgService.auditAvFileSample(isAudit,isValid,ids);
AvFileSampleCfg entity = new AvFileSampleCfg(); AvFileSampleCfg entity = new AvFileSampleCfg();
@@ -356,57 +381,55 @@ public class AvController extends BaseController {
// String oldSrcUrl = entity.getSrcPath(); // String oldSrcUrl = entity.getSrcPath();
// String oldSampleUrl = entity.getSamplePath(); // String oldSampleUrl = entity.getSamplePath();
try { try {
/*if(isAudit==1){ /*
Date creatTime = entity.getCreateTime(); * if(isAudit==1){ Date creatTime = entity.getCreateTime();
//音视频文件上传接口调用 * //音视频文件上传接口调用 File srcFile = new File(oldSrcUrl);
File srcFile = new File(oldSrcUrl); * Map<String,Object> srcMap = new HashMap();
Map<String,Object> srcMap = new HashMap(); * srcMap.put("filetype",
srcMap.put("filetype", FileUtils.getSuffix(srcFile.getName(), false)); * FileUtils.getSuffix(srcFile.getName(), false));
srcMap.put("datatype", "dbSystem");//源文件存入数据中心 * srcMap.put("datatype", "dbSystem");//源文件存入数据中心
*
srcMap.put("createTime",creatTime); * srcMap.put("createTime",creatTime);
srcMap.put("key",FileUtils.getPrefix(srcFile.getName(), false)); * srcMap.put("key",FileUtils.getPrefix(srcFile.getName(),
srcMap.put("fileName", srcFile.getName()); * false)); srcMap.put("fileName", srcFile.getName());
srcMap.put("checksum", entity.getSrcMd5()); * srcMap.put("checksum", entity.getSrcMd5()); ToMaatResult
ToMaatResult result1 = ConfigServiceUtil.postFileCfg(null, srcFile, JsonMapper.toJsonString(srcMap)); * result1 = ConfigServiceUtil.postFileCfg(null, srcFile,
logger.info("音视频源文件上传响应信息:"+result1); * JsonMapper.toJsonString(srcMap));
//获取文件上传响应信息(新的文件访问路径) * logger.info("音视频源文件上传响应信息:"+result1);
String srcAccessUrl = null; * //获取文件上传响应信息(新的文件访问路径) String srcAccessUrl = null;
if(!StringUtil.isEmpty(result1)){ * if(!StringUtil.isEmpty(result1)){ ResponseData data =
ResponseData data = result1.getData(); * result1.getData(); srcAccessUrl=data.getAccessUrl();
srcAccessUrl=data.getAccessUrl(); * entity.setSrcUrl(srcAccessUrl); // entity.setSrcPath("");
entity.setSrcUrl(srcAccessUrl); * } File sampleFile = new File(oldSampleUrl);
// entity.setSrcPath(""); * Map<String,Object> sampleMap = new HashMap();
} * sampleMap.put("filetype",
File sampleFile = new File(oldSampleUrl); * FileUtils.getSuffix(sampleFile.getName(), false));
Map<String,Object> sampleMap = new HashMap(); * sampleMap.put("datatype", "fileSystem");//样例文件存入fastdfs
sampleMap.put("filetype", FileUtils.getSuffix(sampleFile.getName(), false)); * sampleMap.put("createTime", creatTime);
sampleMap.put("datatype", "fileSystem");//样例文件存入fastdfs * sampleMap.put("key",FileUtils.getPrefix(sampleFile.
sampleMap.put("createTime", creatTime); * getName(), false)); sampleMap.put("fileName",
sampleMap.put("key",FileUtils.getPrefix(sampleFile.getName(), false)); * sampleFile.getName()); sampleMap.put("checksum",
sampleMap.put("fileName", sampleFile.getName()); * entity.getSampleMd5()); ToMaatResult result2 =
sampleMap.put("checksum", entity.getSampleMd5()); * ConfigServiceUtil.postFileCfg(null, sampleFile,
ToMaatResult result2 = ConfigServiceUtil.postFileCfg(null, sampleFile, JsonMapper.toJsonString(sampleMap)); * JsonMapper.toJsonString(sampleMap));
logger.info("音视频样例文件上传响应信息:"+result2); * logger.info("音视频样例文件上传响应信息:"+result2);
*
//获取文件上传响应信息(新的文件访问路径) * //获取文件上传响应信息(新的文件访问路径) String sampleAccessUrl = null;
String sampleAccessUrl = null; * if(!StringUtil.isEmpty(result2)){ ResponseData data =
if(!StringUtil.isEmpty(result2)){ * result2.getData(); sampleAccessUrl = data.getAccessUrl();
ResponseData data = result2.getData(); * entity.setSampleUrl(sampleAccessUrl); //
sampleAccessUrl = data.getAccessUrl(); * entity.setSamplePath("");
entity.setSampleUrl(sampleAccessUrl); *
// entity.setSamplePath(""); * } }
*/
}
}*/
avCfgService.auditAvFileSample(entity, isAudit); avCfgService.auditAvFileSample(entity, isAudit);
// 删除本地源文件和样例文件 // 删除本地源文件和样例文件
/*if(!oldSrcUrl.equals(entity.getSrcUrl())){ /*
FileUtils.deleteFile(oldSrcUrl); * if(!oldSrcUrl.equals(entity.getSrcUrl())){
} * FileUtils.deleteFile(oldSrcUrl); }
if(!oldSampleUrl.equals(entity.getSampleUrl())){ * if(!oldSampleUrl.equals(entity.getSampleUrl())){
FileUtils.deleteFile(oldSampleUrl); * FileUtils.deleteFile(oldSampleUrl); }
}*/ */
addMessage(redirectAttributes, "success", "audit_success"); addMessage(redirectAttributes, "success", "audit_success");
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
@@ -441,6 +464,7 @@ public class AvController extends BaseController {
} }
return "redirect:" + adminPath + "/ntc/av/sample/fileSampleList?functionId=" + functionId; return "redirect:" + adminPath + "/ntc/av/sample/fileSampleList?functionId=" + functionId;
} }
// 修改标志样例配置状态 // 修改标志样例配置状态
@RequestMapping(value = { "/sample/updateAvSignSampleValid" }) @RequestMapping(value = { "/sample/updateAvSignSampleValid" })
public String updateAvSignSampleValid(Integer isAudit, Integer isValid, String ids, Integer functionId) { public String updateAvSignSampleValid(Integer isAudit, Integer isValid, String ids, Integer functionId) {
@@ -451,6 +475,7 @@ public class AvController extends BaseController {
// 修改标志样例配置审核状态 // 修改标志样例配置审核状态
/** /**
* 审核配置下发,为了保证配置下发过程事务正确,一条配置提交一次 * 审核配置下发,为了保证配置下发过程事务正确,一条配置提交一次
*
* @param isAudit * @param isAudit
* @param isValid * @param isValid
* @param ids * @param ids
@@ -458,7 +483,8 @@ public class AvController extends BaseController {
* @return * @return
*/ */
@RequestMapping(value = { "/sample/auditAvAudioSignSample" }) @RequestMapping(value = { "/sample/auditAvAudioSignSample" })
public String auditAvAudioSignSample(Integer isAudit,Integer isValid,String ids,Integer functionId, RedirectAttributes redirectAttributes){ public String auditAvAudioSignSample(Integer isAudit, Integer isValid, String ids, Integer functionId,
RedirectAttributes redirectAttributes) {
// avCfgService.auditAvSignSample(isAudit,isValid,ids); // avCfgService.auditAvSignSample(isAudit,isValid,ids);
AvSignSampleCfg entity = new AvSignSampleCfg(); AvSignSampleCfg entity = new AvSignSampleCfg();
String[] idArray = ids.split(","); String[] idArray = ids.split(",");
@@ -484,9 +510,11 @@ public class AvController extends BaseController {
} }
return "redirect:" + adminPath + "/ntc/av/sample/signSampleList?functionId=" + functionId; return "redirect:" + adminPath + "/ntc/av/sample/signSampleList?functionId=" + functionId;
} }
// 修改标志样例配置审核状态 // 修改标志样例配置审核状态
/** /**
* 审核配置下发,为了保证配置下发过程事务正确,一条配置提交一次 * 审核配置下发,为了保证配置下发过程事务正确,一条配置提交一次
*
* @param isAudit * @param isAudit
* @param isValid * @param isValid
* @param ids * @param ids
@@ -494,7 +522,8 @@ public class AvController extends BaseController {
* @return * @return
*/ */
@RequestMapping(value = { "/sample/auditAvSignSample" }) @RequestMapping(value = { "/sample/auditAvSignSample" })
public String auditAvSignSample(Integer preset,AvSignSampleCfgModel cfg,Integer functionId,RedirectAttributes redirectAttributes){ public String auditAvSignSample(Integer preset, AvSignSampleCfgModel cfg, Integer functionId,
RedirectAttributes redirectAttributes) {
// 预置配置 // 预置配置
try { try {
if (preset != null && 1 == preset) {// 预置信息需要在数据库中插入一条记录 if (preset != null && 1 == preset) {// 预置信息需要在数据库中插入一条记录
@@ -516,9 +545,10 @@ public class AvController extends BaseController {
// 修改下发配置 // 修改下发配置
if (cfg != null && cfg.getCfgs() != null) { if (cfg != null && cfg.getCfgs() != null) {
for (AvSignSampleCfg avSignSampleCfg : cfg.getCfgs()) { for (AvSignSampleCfg avSignSampleCfg : cfg.getCfgs()) {
/*if(StringUtil.isEmpty(avSignSampleCfg.getIsValid())){ /*
avSignSampleCfg.setIsValid(0); * if(StringUtil.isEmpty(avSignSampleCfg.getIsValid())){
}*/ * avSignSampleCfg.setIsValid(0); }
*/
if (cfg.getAction() != null) { if (cfg.getAction() != null) {
avSignSampleCfg.setAction(cfg.getAction()); avSignSampleCfg.setAction(cfg.getAction());
} }
@@ -555,14 +585,12 @@ public class AvController extends BaseController {
Map<String, List> dataMap = new HashMap<String, List>(); Map<String, List> dataMap = new HashMap<String, List>();
Map<String, String> noExportMap = new HashMap<String, String>(); Map<String, String> noExportMap = new HashMap<String, String>();
/*
/*//导出选中记录 * //导出选中记录 if(!StringUtil.isEmpty(ids)){ for(String
* if(!StringUtil.isEmpty(ids)){ * id:ids.split(",")){ Long.parseLong(id); } //List<CfgIndexInfo>
for(String id:ids.split(",")){ * list=ipCfgService.getListByCfgIdWithName(IpPortCfg.getTablename()
Long.parseLong(id); * , entity.getFunctionId(), ids); }else{
} */
//List<CfgIndexInfo> list=ipCfgService.getListByCfgIdWithName(IpPortCfg.getTablename(), entity.getFunctionId(), ids);
}else{*/
// 条件导出数据大于最大导出数,只导出最大导出条数 // 条件导出数据大于最大导出数,只导出最大导出条数
entity.setTableName(IpPortCfg.getTablename()); entity.setTableName(IpPortCfg.getTablename());
Page<AvFileSampleCfg> pageInfo = new Page<AvFileSampleCfg>(request, response, "a"); Page<AvFileSampleCfg> pageInfo = new Page<AvFileSampleCfg>(request, response, "a");
@@ -572,19 +600,44 @@ public class AvController extends BaseController {
titleList.add(entity.getMenuNameCode()); titleList.add(entity.getMenuNameCode());
classMap.put(entity.getMenuNameCode(), AvFileSampleCfg.class); classMap.put(entity.getMenuNameCode(), AvFileSampleCfg.class);
String cfgIndexInfoNoExport = ",group_name,userregion1,userregion2,userregion3,userregion4,userregion5,"; String cfgIndexInfoNoExport = ",group_name,userregion1,userregion2,userregion3,userregion4,userregion5,";
// 时间过滤
if (entity.getSearch_create_time_start() == null && entity.getSearch_create_time_end() == null) {
cfgIndexInfoNoExport = ",config_time" + cfgIndexInfoNoExport;
}
if (entity.getSearch_edit_time_start() == null && entity.getSearch_edit_time_end() == null) {
cfgIndexInfoNoExport = ",edit_time" + cfgIndexInfoNoExport;
}
if (entity.getSearch_audit_time_start() == null && entity.getSearch_audit_time_end() == null) {
cfgIndexInfoNoExport = ",audit_time" + cfgIndexInfoNoExport;
}
if (!StringUtil.isEmpty(entity.gethColumns())) {
cfgIndexInfoNoExport = "," + entity.gethColumns() + "," + cfgIndexInfoNoExport;
}
noExportMap.put(entity.getMenuNameCode(), cfgIndexInfoNoExport); noExportMap.put(entity.getMenuNameCode(), cfgIndexInfoNoExport);
dataMap.put(entity.getMenuNameCode(), page.getList()); dataMap.put(entity.getMenuNameCode(), page.getList());
/*}*/
this._export(model, request, response, redirectAttributes,entity.getMenuNameCode(),titleList,classMap,dataMap,noExportMap); String timeRange = initTimeMap(entity);
noExportMap.put("timeRange", timeRange);
if ("csv".equals(entity.getExType())) {
this._exportCsv(model, request, response, redirectAttributes, entity.getMenuNameCode(), titleList,
classMap, dataMap, noExportMap);
} else {
this._export(model, request, response, redirectAttributes, entity.getMenuNameCode(), titleList,
classMap, dataMap, noExportMap);
}
} catch (Exception e) { } catch (Exception e) {
logger.error("ysp export failed", e); logger.error("ysp export failed", e);
addMessage(redirectAttributes, "error", "export_failed"); addMessage(redirectAttributes, "error", "export_failed");
} }
//return "redirect:" + adminPath +"/ntc/iplist/list?functionId="+entity.getFunctionId(); // return "redirect:" + adminPath
// +"/ntc/iplist/list?functionId="+entity.getFunctionId();
} }
/** /**
* 验证音视频时长 * 验证音视频时长
*
* @throws EncoderException * @throws EncoderException
* @throws InputFormatException * @throws InputFormatException
*/ */
@@ -605,8 +658,10 @@ public class AvController extends BaseController {
return true; return true;
} }
} }
/** /**
* 上传视频文件,调用脚本生成关键帧图片,返回图片保存路径 * 上传视频文件,调用脚本生成关键帧图片,返回图片保存路径
*
* @param cfg * @param cfg
* @param functionId * @param functionId
* @param redirectAttributes * @param redirectAttributes
@@ -632,7 +687,8 @@ public class AvController extends BaseController {
FileCopyUtils.copy(srcFile.getBytes(), uploadSrcFile);// 保存源文件 FileCopyUtils.copy(srcFile.getBytes(), uploadSrcFile);// 保存源文件
if (validateAvDuration(uploadSrcFile)) { if (validateAvDuration(uploadSrcFile)) {
String shellName = Constants.VEDIO_TO_PICTURE_PROC; String shellName = Constants.VEDIO_TO_PICTURE_PROC;
// String params = srcFileAllPath+" "+picFilePath+" 0.95 90.0 0.5"; // String params = srcFileAllPath+" "+picFilePath+" 0.95 90.0
// 0.5";
String[] params = new String[] { srcFileAllPath, picFilePath }; String[] params = new String[] { srcFileAllPath, picFilePath };
logger.info("调用视频转关键帧图片程序:" + shellName + " " + StringUtils.join(params, " ")); logger.info("调用视频转关键帧图片程序:" + shellName + " " + StringUtils.join(params, " "));
Map resultMap = avCfgService.execShell(shellName, params); Map resultMap = avCfgService.execShell(shellName, params);
@@ -662,7 +718,8 @@ public class AvController extends BaseController {
} else { } else {
if (StringUtil.isEmpty(resObject.getString("message"))) { if (StringUtil.isEmpty(resObject.getString("message"))) {
map.put("status", 0); map.put("status", 0);
map.put("msg", msgProp.getProperty("call_external_procedures_failed", "Call external procedures failed")); map.put("msg", msgProp.getProperty("call_external_procedures_failed",
"Call external procedures failed"));
} else { } else {
map.put("status", 0); map.put("status", 0);
map.put("msg", resObject.getString("message")); map.put("msg", resObject.getString("message"));
@@ -671,7 +728,8 @@ public class AvController extends BaseController {
} else { } else {
map.put("status", 0); map.put("status", 0);
map.put("msg", msgProp.getProperty("call_external_procedures_failed", "Call external procedures failed")); map.put("msg",
msgProp.getProperty("call_external_procedures_failed", "Call external procedures failed"));
} }
} else { } else {
map.put("status", 0); map.put("status", 0);
@@ -693,8 +751,10 @@ public class AvController extends BaseController {
} }
return map; return map;
} }
/** /**
* 上传图片文件,调用脚本压缩图片,返回图片保存路径 * 上传图片文件,调用脚本压缩图片,返回图片保存路径
*
* @param cfg * @param cfg
* @param functionId * @param functionId
* @param redirectAttributes * @param redirectAttributes
@@ -702,10 +762,12 @@ public class AvController extends BaseController {
*/ */
@ResponseBody @ResponseBody
@RequestMapping(value = { "/sample/faceToPicture" }) @RequestMapping(value = { "/sample/faceToPicture" })
public Map faceToPicture(Model model,@RequestParam("srcFile") CommonsMultipartFile[] srcFile,@RequestParam("faceFilePath")String faceFilePath){ public Map faceToPicture(Model model, @RequestParam("srcFile") CommonsMultipartFile[] srcFile,
@RequestParam("faceFilePath") String faceFilePath) {
String sep = System.getProperty("file.separator"); String sep = System.getProperty("file.separator");
String random = UUID.randomUUID() + ""; String random = UUID.randomUUID() + "";
// String srcFilePath = Constants.AV_FILE_PATH+"face"+random+sep+"srcFile";//视频源文件保存路径 // String srcFilePath =
// Constants.AV_FILE_PATH+"face"+random+sep+"srcFile";//视频源文件保存路径
String srcFilePath = ""; String srcFilePath = "";
if (StringUtil.isBlank(faceFilePath)) { if (StringUtil.isBlank(faceFilePath)) {
srcFilePath = StringUtils.getUserfilesBaseDir() + "face" + sep + "picFile" + sep + random + sep;// 视频生成的关键帧图片文件保存路径 srcFilePath = StringUtils.getUserfilesBaseDir() + "face" + sep + "picFile" + sep + random + sep;// 视频生成的关键帧图片文件保存路径
@@ -727,7 +789,6 @@ public class AvController extends BaseController {
} }
} }
Map map = new HashMap(); Map map = new HashMap();
map.put("picFilePath", srcFilePath); map.put("picFilePath", srcFilePath);
map.put("faceFilePath", faceFilePath); map.put("faceFilePath", faceFilePath);
@@ -749,11 +810,13 @@ public class AvController extends BaseController {
return map; return map;
} }
@RequestMapping(value = { "/sample/selectVedioPicture" }) @RequestMapping(value = { "/sample/selectVedioPicture" })
public String selectVedioPicture(Model model, HttpServletRequest request, String picFilePath, String srcPath) { public String selectVedioPicture(Model model, HttpServletRequest request, String picFilePath, String srcPath) {
Collection<File> files = FileUtils.listFiles(new File(picFilePath), null, true); Collection<File> files = FileUtils.listFiles(new File(picFilePath), null, true);
List<Map<String, String>> fileList = new ArrayList(); List<Map<String, String>> fileList = new ArrayList();
String picUrl = picFilePath.substring(picFilePath.indexOf(Configurations.getStringProperty("userfiles.basedir", "upload"))); String picUrl = picFilePath
.substring(picFilePath.indexOf(Configurations.getStringProperty("userfiles.basedir", "upload")));
String sep = System.getProperty("file.separator"); String sep = System.getProperty("file.separator");
String[] checkedPic = null; String[] checkedPic = null;
if (srcPath != null) { if (srcPath != null) {

View File

@@ -1,6 +1,5 @@
package com.nis.web.controller.configuration.ntc; package com.nis.web.controller.configuration.ntc;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
@@ -34,6 +33,7 @@ import com.nis.web.security.UserUtils;
/** /**
* BGP配置 * BGP配置
*
* @author dell * @author dell
* *
*/ */
@@ -43,8 +43,8 @@ public class BgpCfgController extends BaseController{
@RequestMapping(value = { "bgpList" }) @RequestMapping(value = { "bgpList" })
// @RequiresPermissions(value={"other:bgp:config"}) // @RequiresPermissions(value={"other:bgp:config"})
public String bgpList(Model model,@ModelAttribute("cfg")CfgIndexInfo cfg public String bgpList(Model model, @ModelAttribute("cfg") CfgIndexInfo cfg, HttpServletRequest request,
,HttpServletRequest request,HttpServletResponse response) { HttpServletResponse response) {
Page<CfgIndexInfo> searchPage = new Page<CfgIndexInfo>(request, response, "a"); Page<CfgIndexInfo> searchPage = new Page<CfgIndexInfo>(request, response, "a");
Page<CfgIndexInfo> page = bgpCfgService.getBgpList(searchPage, cfg); Page<CfgIndexInfo> page = bgpCfgService.getBgpList(searchPage, cfg);
model.addAttribute("page", page); model.addAttribute("page", page);
@@ -67,9 +67,8 @@ public class BgpCfgController extends BaseController{
@RequestMapping(value = { "saveBgpCfg" }) @RequestMapping(value = { "saveBgpCfg" })
@RequiresPermissions(value = { "other:bgp:config" }) @RequiresPermissions(value = { "other:bgp:config" })
public String saveBgpCfg(Model model,HttpServletRequest request,HttpServletResponse response public String saveBgpCfg(Model model, HttpServletRequest request, HttpServletResponse response, String ids,
,String ids,CfgIndexInfo entity CfgIndexInfo entity, RedirectAttributes redirectAttributes) {
,RedirectAttributes redirectAttributes) {
bgpCfgService.saveBgpCfg(entity); bgpCfgService.saveBgpCfg(entity);
return "redirect:" + adminPath + "/ntc/other/bgpList?functionId=" + entity.getFunctionId(); return "redirect:" + adminPath + "/ntc/other/bgpList?functionId=" + entity.getFunctionId();
} }
@@ -105,16 +104,13 @@ public class BgpCfgController extends BaseController{
} }
} }
} }
/*TODO /*
* if(cfg.getDomainList()!=null){ * TODO if(cfg.getDomainList()!=null){ String cfgType = null;
String cfgType = null; * for(ComplexkeywordCfg keyword:cfg.getDomainList()){
for(ComplexkeywordCfg keyword:cfg.getDomainList()){ * if(!keyword.getCfgType().equals(cfgType)){ tabList.add(new
if(!keyword.getCfgType().equals(cfgType)){ * String[]{"3",keyword.getCfgType()}); cfgType = keyword.getCfgType();
tabList.add(new String[]{"3",keyword.getCfgType()}); * } } }
cfgType = keyword.getCfgType(); */
}
}
}*/
model.addAttribute("_cfg", cfg); model.addAttribute("_cfg", cfg);
model.addAttribute("index", index); model.addAttribute("index", index);
model.addAttribute("tabList", tabList); model.addAttribute("tabList", tabList);
@@ -123,20 +119,16 @@ public class BgpCfgController extends BaseController{
@RequestMapping(value = { "updateBgpCfgValid" }) @RequestMapping(value = { "updateBgpCfgValid" })
@RequiresPermissions(value = { "other:bgp:config" }) @RequiresPermissions(value = { "other:bgp:config" })
public String updateBgpCfgValid(Integer isValid,String ids,Integer functionId,RedirectAttributes redirectAttributes) { public String updateBgpCfgValid(Integer isValid, String ids, Integer functionId,
RedirectAttributes redirectAttributes) {
bgpCfgService.updateBgpCfgValid(isValid, ids, functionId); bgpCfgService.updateBgpCfgValid(isValid, ids, functionId);
return "redirect:" + adminPath + "/ntc/other/bgpList?functionId=" + functionId; return "redirect:" + adminPath + "/ntc/other/bgpList?functionId=" + functionId;
} }
@RequestMapping(value = { "auditBgpCfg" }) @RequestMapping(value = { "auditBgpCfg" })
@RequiresPermissions(value = { "other:bgp:confirm" }) @RequiresPermissions(value = { "other:bgp:confirm" })
public String auditBgpCfg(Model model,@ModelAttribute("cfg")CfgIndexInfo cfg, public String auditBgpCfg(Model model, @ModelAttribute("cfg") CfgIndexInfo cfg, Integer isValid, Integer isAudit,
Integer isValid, String ids, Integer functionId, RedirectAttributes redirectAttributes, HttpServletResponse response,
Integer isAudit,
String ids,
Integer functionId,
RedirectAttributes redirectAttributes,
HttpServletResponse response,
HttpServletRequest request) { HttpServletRequest request) {
if (!StringUtil.isEmpty(ids)) { if (!StringUtil.isEmpty(ids)) {
CfgIndexInfo entity = new CfgIndexInfo(); CfgIndexInfo entity = new CfgIndexInfo();
@@ -194,7 +186,6 @@ public class BgpCfgController extends BaseController{
Map<String, List> dataMap = new HashMap<String, List>(); Map<String, List> dataMap = new HashMap<String, List>();
Map<String, String> noExportMap = new HashMap<String, String>(); Map<String, String> noExportMap = new HashMap<String, String>();
List<CfgIndexInfo> ipLists = new ArrayList<CfgIndexInfo>(); List<CfgIndexInfo> ipLists = new ArrayList<CfgIndexInfo>();
// 导出选中记录 // 导出选中记录
if (!StringUtil.isEmpty(ids)) { if (!StringUtil.isEmpty(ids)) {
@@ -228,12 +219,28 @@ public class BgpCfgController extends BaseController{
+ ",config_time,editor,edit_time,auditor,audit_time" + ",config_time,editor,edit_time,auditor,audit_time"
+ ",letter,whether_area_block,classification,attribute,label" + ",letter,whether_area_block,classification,attribute,label"
+ ",userregion1,userregion2,userregion3,userregion4,userregion5,"; + ",userregion1,userregion2,userregion3,userregion4,userregion5,";
// 时间过滤
if (entity.getSearch_create_time_start() == null && entity.getSearch_create_time_end() == null) {
cfgIndexInfoNoExport = ",config_time" + cfgIndexInfoNoExport;
}
if (entity.getSearch_edit_time_start() == null && entity.getSearch_edit_time_end() == null) {
cfgIndexInfoNoExport = ",edit_time" + cfgIndexInfoNoExport;
}
if (entity.getSearch_audit_time_start() == null && entity.getSearch_audit_time_end() == null) {
cfgIndexInfoNoExport = ",audit_time" + cfgIndexInfoNoExport;
}
if (!StringUtil.isEmpty(entity.gethColumns())) {
cfgIndexInfoNoExport = "," + entity.gethColumns() + "," + cfgIndexInfoNoExport;
}
noExportMap.put(entity.getMenuNameCode(), cfgIndexInfoNoExport); noExportMap.put(entity.getMenuNameCode(), cfgIndexInfoNoExport);
noExportMap.put("NTC_IP", ipPortInfoNoExport); noExportMap.put("NTC_IP", ipPortInfoNoExport);
noExportMap.put("NTC_BGP_AS", regionCfgNoExport); noExportMap.put("NTC_BGP_AS", regionCfgNoExport);
// noExportMap.put("NTC_SUBSCRIBE_ID", ntcSubscribeIdCfgNoExport); // noExportMap.put("NTC_SUBSCRIBE_ID", ntcSubscribeIdCfgNoExport);
List<IpPortCfg> ipList = new ArrayList<IpPortCfg>(); List<IpPortCfg> ipList = new ArrayList<IpPortCfg>();
// List<BaseStringCfg> subscribeInfoList=new ArrayList<BaseStringCfg>(); // List<BaseStringCfg> subscribeInfoList=new
// ArrayList<BaseStringCfg>();
List<BaseStringCfg> asInfoList = new ArrayList<BaseStringCfg>(); List<BaseStringCfg> asInfoList = new ArrayList<BaseStringCfg>();
for (CfgIndexInfo cfg : ipLists) { for (CfgIndexInfo cfg : ipLists) {
CfgIndexInfo cfgIndexInfo = bgpCfgService.exportbgp(cfg); CfgIndexInfo cfgIndexInfo = bgpCfgService.exportbgp(cfg);
@@ -249,12 +256,22 @@ public class BgpCfgController extends BaseController{
// dataMap.put("NTC_SUBSCRIBE_ID", subscribeInfoList); // dataMap.put("NTC_SUBSCRIBE_ID", subscribeInfoList);
/* } */ /* } */
this._export(model, request, response, redirectAttributes,entity.getMenuNameCode(),titleList,classMap,dataMap,noExportMap);
String timeRange = initTimeMap(entity);
noExportMap.put("timeRange", timeRange);
if ("csv".equals(entity.getExType())) {
this._exportCsv(model, request, response, redirectAttributes, entity.getMenuNameCode(), titleList,
classMap, dataMap, noExportMap);
} else {
this._export(model, request, response, redirectAttributes, entity.getMenuNameCode(), titleList,
classMap, dataMap, noExportMap);
}
} catch (Exception e) { } catch (Exception e) {
logger.error("bgp export failed", e); logger.error("bgp export failed", e);
addMessage(redirectAttributes, "error", "export_failed"); addMessage(redirectAttributes, "error", "export_failed");
} }
//return "redirect:" + adminPath +"/ntc/iplist/list?functionId="+entity.getFunctionId(); // return "redirect:" + adminPath
// +"/ntc/iplist/list?functionId="+entity.getFunctionId();
} }
} }

View File

@@ -48,6 +48,7 @@ import com.nis.web.security.UserUtils;
/** /**
* 文件传输相关配置控制类 * 文件传输相关配置控制类
*
* @author dell * @author dell
* *
*/ */
@@ -56,13 +57,15 @@ import com.nis.web.security.UserUtils;
public class FileTransferCfgController extends BaseController { public class FileTransferCfgController extends BaseController {
@RequestMapping(value = { "ftpList" }) @RequestMapping(value = { "ftpList" })
// @RequiresPermissions(value={"fileTransfer:ftp:config"}) // @RequiresPermissions(value={"fileTransfer:ftp:config"})
public String ftpList(Model model,@ModelAttribute("cfg")CfgIndexInfo cfg,HttpServletRequest request,HttpServletResponse response) { public String ftpList(Model model, @ModelAttribute("cfg") CfgIndexInfo cfg, HttpServletRequest request,
HttpServletResponse response) {
Page<CfgIndexInfo> searchPage = new Page<CfgIndexInfo>(request, response, "a"); Page<CfgIndexInfo> searchPage = new Page<CfgIndexInfo>(request, response, "a");
Page<CfgIndexInfo> page = fileTransferCfgService.getFtpList(searchPage, cfg); Page<CfgIndexInfo> page = fileTransferCfgService.getFtpList(searchPage, cfg);
model.addAttribute("page", page); model.addAttribute("page", page);
initPageCondition(model, cfg); initPageCondition(model, cfg);
return "/cfg/fileTransfer/ftpList"; return "/cfg/fileTransfer/ftpList";
} }
@RequestMapping(value = { "ftpForm" }) @RequestMapping(value = { "ftpForm" })
@RequiresPermissions(value = { "fileTransfer:ftp:config" }) @RequiresPermissions(value = { "fileTransfer:ftp:config" })
public String ftpForm(Model model, String compileIds, String ids, CfgIndexInfo entity) { public String ftpForm(Model model, String compileIds, String ids, CfgIndexInfo entity) {
@@ -75,6 +78,7 @@ public class FileTransferCfgController extends BaseController{
model.addAttribute("_cfg", entity); model.addAttribute("_cfg", entity);
return "/cfg/fileTransfer/ftpForm"; return "/cfg/fileTransfer/ftpForm";
} }
@RequestMapping(value = { "saveFtpCfg" }) @RequestMapping(value = { "saveFtpCfg" })
@RequiresPermissions(value = { "fileTransfer:ftp:config" }) @RequiresPermissions(value = { "fileTransfer:ftp:config" })
public String saveFtpCfg(Model model, HttpServletRequest request, HttpServletResponse response, String ids, public String saveFtpCfg(Model model, HttpServletRequest request, HttpServletResponse response, String ids,
@@ -95,6 +99,7 @@ public class FileTransferCfgController extends BaseController{
} }
return "redirect:" + adminPath + "/ntc/fileTransfer/ftpList?functionId=" + entity.getFunctionId(); return "redirect:" + adminPath + "/ntc/fileTransfer/ftpList?functionId=" + entity.getFunctionId();
} }
@RequestMapping(value = { "ajaxFtpSubList" }) @RequestMapping(value = { "ajaxFtpSubList" })
public String ajaxFtpSubList(Model model, Long cfgId, Integer index, Integer compileId) { public String ajaxFtpSubList(Model model, Long cfgId, Integer index, Integer compileId) {
CfgIndexInfo cfg = fileTransferCfgService.getFtpCfg(cfgId, compileId); CfgIndexInfo cfg = fileTransferCfgService.getFtpCfg(cfgId, compileId);
@@ -133,9 +138,9 @@ public class FileTransferCfgController extends BaseController{
return "/cfg/fileTransfer/ftpSubList"; return "/cfg/fileTransfer/ftpSubList";
} }
/** /**
* 做删除操作 * 做删除操作
*
* @param isValid * @param isValid
* @param ids * @param ids
* @param functionId * @param functionId
@@ -143,14 +148,16 @@ public class FileTransferCfgController extends BaseController{
*/ */
@RequestMapping(value = { "updateFtpCfgValid" }) @RequestMapping(value = { "updateFtpCfgValid" })
@RequiresPermissions(value = { "fileTransfer:ftp:config" }) @RequiresPermissions(value = { "fileTransfer:ftp:config" })
public String updateFtpCfgValid(Integer isValid,String ids,Integer functionId, RedirectAttributes redirectAttributes) { public String updateFtpCfgValid(Integer isValid, String ids, Integer functionId,
RedirectAttributes redirectAttributes) {
try { try {
fileTransferCfgService.updateFtpCfgValid(isValid, ids, functionId); fileTransferCfgService.updateFtpCfgValid(isValid, ids, functionId);
addMessage(redirectAttributes, "success", "delete_success"); addMessage(redirectAttributes, "success", "delete_success");
} catch (Exception e) { } catch (Exception e) {
if (e instanceof MaatConvertException) { if (e instanceof MaatConvertException) {
e.printStackTrace(); e.printStackTrace();
logger.info("ftp配置删除失败"+e.getMessage());; logger.info("ftp配置删除失败" + e.getMessage());
;
addMessage(redirectAttributes, "error", "request_service_failed"); addMessage(redirectAttributes, "error", "request_service_failed");
} else { } else {
e.printStackTrace(); e.printStackTrace();
@@ -160,15 +167,11 @@ public class FileTransferCfgController extends BaseController{
} }
return "redirect:" + adminPath + "/ntc/fileTransfer/ftpList?functionId=" + functionId; return "redirect:" + adminPath + "/ntc/fileTransfer/ftpList?functionId=" + functionId;
} }
@RequestMapping(value = { "auditFtpCfg" }) @RequestMapping(value = { "auditFtpCfg" })
@RequiresPermissions(value = { "fileTransfer:ftp:confirm" }) @RequiresPermissions(value = { "fileTransfer:ftp:confirm" })
public String auditFtpCfg(Model model,@ModelAttribute("cfg")CfgIndexInfo cfg, public String auditFtpCfg(Model model, @ModelAttribute("cfg") CfgIndexInfo cfg, Integer isValid, Integer isAudit,
Integer isValid, String ids, Integer functionId, RedirectAttributes redirectAttributes, HttpServletResponse response,
Integer isAudit,
String ids,
Integer functionId,
RedirectAttributes redirectAttributes,
HttpServletResponse response,
HttpServletRequest request) { HttpServletRequest request) {
if (!StringUtil.isEmpty(ids)) { if (!StringUtil.isEmpty(ids)) {
CfgIndexInfo entity = new CfgIndexInfo(); CfgIndexInfo entity = new CfgIndexInfo();
@@ -186,7 +189,8 @@ public class FileTransferCfgController extends BaseController{
} catch (Exception e) { } catch (Exception e) {
if (e instanceof MaatConvertException) { if (e instanceof MaatConvertException) {
e.printStackTrace(); e.printStackTrace();
logger.error("ftp配置下发失败"+e.getMessage());; logger.error("ftp配置下发失败" + e.getMessage());
;
addMessage(redirectAttributes, "error", "request_service_failed"); addMessage(redirectAttributes, "error", "request_service_failed");
} else { } else {
e.printStackTrace(); e.printStackTrace();
@@ -219,9 +223,8 @@ public class FileTransferCfgController extends BaseController{
@RequestMapping(value = { "fileDigestList" }) @RequestMapping(value = { "fileDigestList" })
// @RequiresPermissions(value={"fileTransfer:fileDigest:config"}) // @RequiresPermissions(value={"fileTransfer:fileDigest:config"})
public String fileDigestList(Model model,@ModelAttribute("cfg")FileDigestCfg cfg public String fileDigestList(Model model, @ModelAttribute("cfg") FileDigestCfg cfg, HttpServletRequest request,
,HttpServletRequest request,HttpServletResponse response HttpServletResponse response, RedirectAttributes redirectAttributes) {
,RedirectAttributes redirectAttributes) {
Page<FileDigestCfg> searchPage = new Page<FileDigestCfg>(request, response, "a"); Page<FileDigestCfg> searchPage = new Page<FileDigestCfg>(request, response, "a");
Page<FileDigestCfg> page = fileTransferCfgService.getFileDigestList(searchPage, cfg); Page<FileDigestCfg> page = fileTransferCfgService.getFileDigestList(searchPage, cfg);
model.addAttribute("page", page); model.addAttribute("page", page);
@@ -241,13 +244,12 @@ public class FileTransferCfgController extends BaseController{
model.addAttribute("_cfg", entity); model.addAttribute("_cfg", entity);
return "/cfg/fileTransfer/fileDigestForm"; return "/cfg/fileTransfer/fileDigestForm";
} }
@RequestMapping(value = { "saveFileDigestCfg" }) @RequestMapping(value = { "saveFileDigestCfg" })
@RequiresPermissions(value = { "fileTransfer:fileDigest:config" }) @RequiresPermissions(value = { "fileTransfer:fileDigest:config" })
public String saveFileDigestCfg(Model model,HttpServletRequest request public String saveFileDigestCfg(Model model, HttpServletRequest request, HttpServletResponse response, String ids,
,HttpServletResponse response,String ids, FileDigestCfg entity, MultipartFile file, @ModelAttribute("areaCfgIds") String areaCfgIds,
FileDigestCfg entity,MultipartFile file RedirectAttributes redirectAttributes) {
,@ModelAttribute("areaCfgIds")String areaCfgIds
,RedirectAttributes redirectAttributes) {
try { try {
Date fileTime = null; Date fileTime = null;
Date date = new Date(); Date date = new Date();
@@ -296,24 +298,20 @@ public class FileTransferCfgController extends BaseController{
} }
return "redirect:" + adminPath + "/ntc/fileTransfer/fileDigestList?functionId=" + entity.getFunctionId(); return "redirect:" + adminPath + "/ntc/fileTransfer/fileDigestList?functionId=" + entity.getFunctionId();
} }
@RequestMapping(value = { "updateFileDigestValid" }) @RequestMapping(value = { "updateFileDigestValid" })
@RequiresPermissions(value = { "fileTransfer:fileDigest:config" }) @RequiresPermissions(value = { "fileTransfer:fileDigest:config" })
public String updateFileDigestValid(Integer isValid,String ids,Integer functionId public String updateFileDigestValid(Integer isValid, String ids, Integer functionId,
,RedirectAttributes redirectAttributes) { RedirectAttributes redirectAttributes) {
fileTransferCfgService.updateFileDigestCfgValid(isValid, ids, functionId); fileTransferCfgService.updateFileDigestCfgValid(isValid, ids, functionId);
return "redirect:" + adminPath + "/ntc/fileTransfer/fileDigestList?functionId=" + functionId; return "redirect:" + adminPath + "/ntc/fileTransfer/fileDigestList?functionId=" + functionId;
} }
@RequestMapping(value = { "auditFileDigestCfg" }) @RequestMapping(value = { "auditFileDigestCfg" })
@RequiresPermissions(value = { "fileTransfer:fileDigest:confirm" }) @RequiresPermissions(value = { "fileTransfer:fileDigest:confirm" })
public String auditFileDigestCfg(Model model,@ModelAttribute("cfg")FileDigestCfg cfg, public String auditFileDigestCfg(Model model, @ModelAttribute("cfg") FileDigestCfg cfg, Integer isValid,
Integer isValid, Integer isAudit, String ids, Integer functionId, RedirectAttributes redirectAttributes,
Integer isAudit, HttpServletResponse response, HttpServletRequest request) {
String ids,
Integer functionId,
RedirectAttributes redirectAttributes,
HttpServletResponse response,
HttpServletRequest request) {
if (!StringUtil.isEmpty(ids)) { if (!StringUtil.isEmpty(ids)) {
String[] idArray = ids.split(","); String[] idArray = ids.split(",");
Date auditTime = new Date(); Date auditTime = new Date();
@@ -356,6 +354,7 @@ public class FileTransferCfgController extends BaseController{
} }
return "redirect:" + adminPath + "/ntc/fileTransfer/fileDigestList?functionId=" + functionId; return "redirect:" + adminPath + "/ntc/fileTransfer/fileDigestList?functionId=" + functionId;
} }
@RequestMapping(value = { "ajaxFileDigestSubIdList" }) @RequestMapping(value = { "ajaxFileDigestSubIdList" })
public String ajaxFileDigestSubIdList(Model model, Long cfgId, Integer index, Integer compileId) { public String ajaxFileDigestSubIdList(Model model, Long cfgId, Integer index, Integer compileId) {
FileDigestCfg cfg = fileTransferCfgService.getFileDigestSubIdCfg(cfgId, compileId); FileDigestCfg cfg = fileTransferCfgService.getFileDigestSubIdCfg(cfgId, compileId);
@@ -391,11 +390,9 @@ public class FileTransferCfgController extends BaseController{
return "/cfg/fileTransfer/fileDigestLogSubList"; return "/cfg/fileTransfer/fileDigestLogSubList";
} }
@RequestMapping(value = { "p2pList" }) @RequestMapping(value = { "p2pList" })
public String p2pList(Model model,@ModelAttribute("cfg")CfgIndexInfo cfg,HttpServletRequest request,HttpServletResponse response) { public String p2pList(Model model, @ModelAttribute("cfg") CfgIndexInfo cfg, HttpServletRequest request,
HttpServletResponse response) {
Page<CfgIndexInfo> searchPage = new Page<CfgIndexInfo>(request, response, "a"); Page<CfgIndexInfo> searchPage = new Page<CfgIndexInfo>(request, response, "a");
Page<CfgIndexInfo> page = fileTransferCfgService.getP2pList(searchPage, cfg); Page<CfgIndexInfo> page = fileTransferCfgService.getP2pList(searchPage, cfg);
model.addAttribute("page", page); model.addAttribute("page", page);
@@ -463,8 +460,8 @@ public class FileTransferCfgController extends BaseController{
@RequestMapping(value = { "saveP2pCfg" }) @RequestMapping(value = { "saveP2pCfg" })
@RequiresPermissions(value = { "fileTransfer:p2p:config" }) @RequiresPermissions(value = { "fileTransfer:p2p:config" })
public String saveP2pCfg(Model model,HttpServletRequest request,HttpServletResponse response, public String saveP2pCfg(Model model, HttpServletRequest request, HttpServletResponse response, String ids,
String ids,CfgIndexInfo entity,RedirectAttributes redirectAttributes) { CfgIndexInfo entity, RedirectAttributes redirectAttributes) {
try { try {
fileTransferCfgService.saveP2pCfg(entity); fileTransferCfgService.saveP2pCfg(entity);
addMessage(redirectAttributes, "success", "save_success"); addMessage(redirectAttributes, "success", "save_success");
@@ -484,14 +481,16 @@ public class FileTransferCfgController extends BaseController{
@RequestMapping(value = { "updateP2pCfgValid" }) @RequestMapping(value = { "updateP2pCfgValid" })
@RequiresPermissions(value = { "fileTransfer:p2p:config" }) @RequiresPermissions(value = { "fileTransfer:p2p:config" })
public String updateP2pCfgValid(Integer isValid,String ids,Integer functionId,RedirectAttributes redirectAttributes) { public String updateP2pCfgValid(Integer isValid, String ids, Integer functionId,
RedirectAttributes redirectAttributes) {
try { try {
fileTransferCfgService.updateP2pCfgValid(isValid, ids, functionId); fileTransferCfgService.updateP2pCfgValid(isValid, ids, functionId);
addMessage(redirectAttributes, "success", "delete_success"); addMessage(redirectAttributes, "success", "delete_success");
} catch (Exception e) { } catch (Exception e) {
if (e instanceof MaatConvertException) { if (e instanceof MaatConvertException) {
e.printStackTrace(); e.printStackTrace();
logger.info("P2P配置删除失败"+e.getMessage());; logger.info("P2P配置删除失败" + e.getMessage());
;
addMessage(redirectAttributes, "error", "request_service_failed"); addMessage(redirectAttributes, "error", "request_service_failed");
} else { } else {
e.printStackTrace(); e.printStackTrace();
@@ -550,13 +549,8 @@ public class FileTransferCfgController extends BaseController{
@RequestMapping(value = { "auditP2pCfg" }) @RequestMapping(value = { "auditP2pCfg" })
@RequiresPermissions(value = { "fileTransfer:p2p:confirm" }) @RequiresPermissions(value = { "fileTransfer:p2p:confirm" })
public String auditP2pCfg(Model model,@ModelAttribute("cfg")CfgIndexInfo cfg, public String auditP2pCfg(Model model, @ModelAttribute("cfg") CfgIndexInfo cfg, Integer isValid, Integer isAudit,
Integer isValid, String ids, Integer functionId, RedirectAttributes redirectAttributes, HttpServletResponse response,
Integer isAudit,
String ids,
Integer functionId,
RedirectAttributes redirectAttributes,
HttpServletResponse response,
HttpServletRequest request) { HttpServletRequest request) {
if (!StringUtil.isEmpty(ids)) { if (!StringUtil.isEmpty(ids)) {
CfgIndexInfo entity = new CfgIndexInfo(); CfgIndexInfo entity = new CfgIndexInfo();
@@ -655,6 +649,20 @@ public class FileTransferCfgController extends BaseController{
+ ",letter,whether_area_block,classification,attribute,label" + ",letter,whether_area_block,classification,attribute,label"
+ ",userregion1,userregion2,userregion3,userregion4,userregion5,"; + ",userregion1,userregion2,userregion3,userregion4,userregion5,";
// 时间过滤
if (entity.getSearch_create_time_start() == null && entity.getSearch_create_time_end() == null) {
cfgIndexInfoNoExport = ",config_time" + cfgIndexInfoNoExport;
}
if (entity.getSearch_edit_time_start() == null && entity.getSearch_edit_time_end() == null) {
cfgIndexInfoNoExport = ",edit_time" + cfgIndexInfoNoExport;
}
if (entity.getSearch_audit_time_start() == null && entity.getSearch_audit_time_end() == null) {
cfgIndexInfoNoExport = ",audit_time" + cfgIndexInfoNoExport;
}
if (!StringUtil.isEmpty(entity.gethColumns())) {
cfgIndexInfoNoExport = "," + entity.gethColumns() + "," + cfgIndexInfoNoExport;
}
noExportMap.put(entity.getMenuNameCode(), cfgIndexInfoNoExport); noExportMap.put(entity.getMenuNameCode(), cfgIndexInfoNoExport);
noExportMap.put("NTC_UNIVERSAL_IP", ipPortInfoNoExport); noExportMap.put("NTC_UNIVERSAL_IP", ipPortInfoNoExport);
noExportMap.put("NTC_FTP_URL", regionCfgNoExport); noExportMap.put("NTC_FTP_URL", regionCfgNoExport);
@@ -680,12 +688,22 @@ public class FileTransferCfgController extends BaseController{
dataMap.put("NTC_FTP_CONTENT", ftpkeyList); dataMap.put("NTC_FTP_CONTENT", ftpkeyList);
dataMap.put("NTC_SUBSCRIBE_ID", subscribeInfoList); dataMap.put("NTC_SUBSCRIBE_ID", subscribeInfoList);
/* } */ /* } */
this._export(model, request, response, redirectAttributes,entity.getMenuNameCode(),titleList,classMap,dataMap,noExportMap);
String timeRange = initTimeMap(entity);
noExportMap.put("timeRange", timeRange);
if ("csv".equals(entity.getExType())) {
this._exportCsv(model, request, response, redirectAttributes, entity.getMenuNameCode(), titleList,
classMap, dataMap, noExportMap);
} else {
this._export(model, request, response, redirectAttributes, entity.getMenuNameCode(), titleList,
classMap, dataMap, noExportMap);
}
} catch (Exception e) { } catch (Exception e) {
logger.error("ftp export failed", e); logger.error("ftp export failed", e);
addMessage(redirectAttributes, "error", "export_failed"); addMessage(redirectAttributes, "error", "export_failed");
} }
//return "redirect:" + adminPath +"/ntc/iplist/list?functionId="+entity.getFunctionId(); // return "redirect:" + adminPath
// +"/ntc/iplist/list?functionId="+entity.getFunctionId();
} }
// p2p配置导出 // p2p配置导出
@@ -699,7 +717,6 @@ public class FileTransferCfgController extends BaseController{
Map<String, List> dataMap = new HashMap<String, List>(); Map<String, List> dataMap = new HashMap<String, List>();
Map<String, String> noExportMap = new HashMap<String, String>(); Map<String, String> noExportMap = new HashMap<String, String>();
List<CfgIndexInfo> ipLists = new ArrayList<CfgIndexInfo>(); List<CfgIndexInfo> ipLists = new ArrayList<CfgIndexInfo>();
// 导出选中记录 // 导出选中记录
if (!StringUtil.isEmpty(ids)) { if (!StringUtil.isEmpty(ids)) {
@@ -713,7 +730,6 @@ public class FileTransferCfgController extends BaseController{
ipLists = page.getList(); ipLists = page.getList();
} }
titleList.add(entity.getMenuNameCode()); titleList.add(entity.getMenuNameCode());
titleList.add("NTC_UNIVERSAL_IP"); titleList.add("NTC_UNIVERSAL_IP");
titleList.add("NTC_P2P_KEYWORDS"); titleList.add("NTC_P2P_KEYWORDS");
@@ -743,6 +759,20 @@ public class FileTransferCfgController extends BaseController{
+ ",letter,whether_area_block,classification,attribute,label" + ",letter,whether_area_block,classification,attribute,label"
+ ",userregion1,userregion2,userregion3,userregion4,userregion5,"; + ",userregion1,userregion2,userregion3,userregion4,userregion5,";
// 时间过滤
if (entity.getSearch_create_time_start() == null && entity.getSearch_create_time_end() == null) {
cfgIndexInfoNoExport = ",config_time" + cfgIndexInfoNoExport;
}
if (entity.getSearch_edit_time_start() == null && entity.getSearch_edit_time_end() == null) {
cfgIndexInfoNoExport = ",edit_time" + cfgIndexInfoNoExport;
}
if (entity.getSearch_audit_time_start() == null && entity.getSearch_audit_time_end() == null) {
cfgIndexInfoNoExport = ",audit_time" + cfgIndexInfoNoExport;
}
if (!StringUtil.isEmpty(entity.gethColumns())) {
cfgIndexInfoNoExport = "," + entity.gethColumns() + "," + cfgIndexInfoNoExport;
}
noExportMap.put(entity.getMenuNameCode(), cfgIndexInfoNoExport); noExportMap.put(entity.getMenuNameCode(), cfgIndexInfoNoExport);
noExportMap.put("NTC_UNIVERSAL_IP", ipPortInfoNoExport); noExportMap.put("NTC_UNIVERSAL_IP", ipPortInfoNoExport);
noExportMap.put("NTC_P2P_KEYWORDS", keyCfgNoExport); noExportMap.put("NTC_P2P_KEYWORDS", keyCfgNoExport);
@@ -768,15 +798,24 @@ public class FileTransferCfgController extends BaseController{
dataMap.put("NTC_P2P_HASH_BIN", hashList); dataMap.put("NTC_P2P_HASH_BIN", hashList);
dataMap.put("NTC_SUBSCRIBE_ID", subscribeInfoList); dataMap.put("NTC_SUBSCRIBE_ID", subscribeInfoList);
/* } */ /* } */
this._export(model, request, response, redirectAttributes,entity.getMenuNameCode(),titleList,classMap,dataMap,noExportMap);
String timeRange = initTimeMap(entity);
noExportMap.put("timeRange", timeRange);
if ("csv".equals(entity.getExType())) {
this._exportCsv(model, request, response, redirectAttributes, entity.getMenuNameCode(), titleList,
classMap, dataMap, noExportMap);
} else {
this._export(model, request, response, redirectAttributes, entity.getMenuNameCode(), titleList,
classMap, dataMap, noExportMap);
}
} catch (Exception e) { } catch (Exception e) {
logger.error("p2p export failed", e); logger.error("p2p export failed", e);
addMessage(redirectAttributes, "error", "export_failed"); addMessage(redirectAttributes, "error", "export_failed");
} }
//return "redirect:" + adminPath +"/ntc/iplist/list?functionId="+entity.getFunctionId(); // return "redirect:" + adminPath
// +"/ntc/iplist/list?functionId="+entity.getFunctionId();
} }
// file配置导出 // file配置导出
@RequestMapping(value = "exportFile") @RequestMapping(value = "exportFile")
public void exportFile(Model model, HttpServletRequest request, HttpServletResponse response, public void exportFile(Model model, HttpServletRequest request, HttpServletResponse response,
@@ -788,14 +827,12 @@ public class FileTransferCfgController extends BaseController{
Map<String, List> dataMap = new HashMap<String, List>(); Map<String, List> dataMap = new HashMap<String, List>();
Map<String, String> noExportMap = new HashMap<String, String>(); Map<String, String> noExportMap = new HashMap<String, String>();
/*
/*//导出选中记录 * //导出选中记录 if(!StringUtil.isEmpty(ids)){ for(String
* if(!StringUtil.isEmpty(ids)){ * id:ids.split(",")){ Long.parseLong(id); } //List<CfgIndexInfo>
for(String id:ids.split(",")){ * list=ipCfgService.getListByCfgIdWithName(IpPortCfg.getTablename()
Long.parseLong(id); * , entity.getFunctionId(), ids); }else{
} */
//List<CfgIndexInfo> list=ipCfgService.getListByCfgIdWithName(IpPortCfg.getTablename(), entity.getFunctionId(), ids);
}else{*/
// 条件导出数据大于最大导出数,只导出最大导出条数 // 条件导出数据大于最大导出数,只导出最大导出条数
entity.setTableName(IpPortCfg.getTablename()); entity.setTableName(IpPortCfg.getTablename());
Page<FileDigestCfg> pageInfo = new Page<FileDigestCfg>(request, response, "a"); Page<FileDigestCfg> pageInfo = new Page<FileDigestCfg>(request, response, "a");
@@ -805,14 +842,39 @@ public class FileTransferCfgController extends BaseController{
titleList.add(entity.getMenuNameCode()); titleList.add(entity.getMenuNameCode());
classMap.put(entity.getMenuNameCode(), FileDigestCfg.class); classMap.put(entity.getMenuNameCode(), FileDigestCfg.class);
String cfgIndexInfoNoExport = ",policy_name,group_name,userregion1,userregion2,userregion3,userregion4,userregion5,"; String cfgIndexInfoNoExport = ",policy_name,group_name,userregion1,userregion2,userregion3,userregion4,userregion5,";
// 时间过滤
if (entity.getSearch_create_time_start() == null && entity.getSearch_create_time_end() == null) {
cfgIndexInfoNoExport = ",config_time" + cfgIndexInfoNoExport;
}
if (entity.getSearch_edit_time_start() == null && entity.getSearch_edit_time_end() == null) {
cfgIndexInfoNoExport = ",edit_time" + cfgIndexInfoNoExport;
}
if (entity.getSearch_audit_time_start() == null && entity.getSearch_audit_time_end() == null) {
cfgIndexInfoNoExport = ",audit_time" + cfgIndexInfoNoExport;
}
if (!StringUtil.isEmpty(entity.gethColumns())) {
cfgIndexInfoNoExport = "," + entity.gethColumns() + "," + cfgIndexInfoNoExport;
}
noExportMap.put(entity.getMenuNameCode(), cfgIndexInfoNoExport); noExportMap.put(entity.getMenuNameCode(), cfgIndexInfoNoExport);
dataMap.put(entity.getMenuNameCode(), page.getList()); dataMap.put(entity.getMenuNameCode(), page.getList());
/* } */ /* } */
this._export(model, request, response, redirectAttributes,entity.getMenuNameCode(),titleList,classMap,dataMap,noExportMap);
String timeRange = initTimeMap(entity);
noExportMap.put("timeRange", timeRange);
if ("csv".equals(entity.getExType())) {
this._exportCsv(model, request, response, redirectAttributes, entity.getMenuNameCode(), titleList,
classMap, dataMap, noExportMap);
} else {
this._export(model, request, response, redirectAttributes, entity.getMenuNameCode(), titleList,
classMap, dataMap, noExportMap);
}
} catch (Exception e) { } catch (Exception e) {
logger.error("file export failed", e); logger.error("file export failed", e);
addMessage(redirectAttributes, "error", "export_failed"); addMessage(redirectAttributes, "error", "export_failed");
} }
//return "redirect:" + adminPath +"/ntc/iplist/list?functionId="+entity.getFunctionId(); // return "redirect:" + adminPath
// +"/ntc/iplist/list?functionId="+entity.getFunctionId();
} }
} }

View File

@@ -467,6 +467,19 @@ public class IpController extends BaseController{
+",letter,whether_area_block,classification,attribute,label" +",letter,whether_area_block,classification,attribute,label"
+",userregion1,userregion2,userregion3,userregion4,userregion5,ir_type,group_name,"; +",userregion1,userregion2,userregion3,userregion4,userregion5,ir_type,group_name,";
String asnGroupInfoNoExport=""; String asnGroupInfoNoExport="";
// 时间过滤
if (entity.getSearch_create_time_start() == null && entity.getSearch_create_time_end() == null) {
cfgIndexInfoNoExport = ",config_time" + cfgIndexInfoNoExport;
}
if (entity.getSearch_edit_time_start() == null && entity.getSearch_edit_time_end() == null) {
cfgIndexInfoNoExport = ",edit_time" + cfgIndexInfoNoExport;
}
if (entity.getSearch_audit_time_start() == null && entity.getSearch_audit_time_end() == null) {
cfgIndexInfoNoExport = ",audit_time" + cfgIndexInfoNoExport;
}
if (!StringUtil.isEmpty(entity.gethColumns())) {
cfgIndexInfoNoExport = "," + entity.gethColumns() + "," + cfgIndexInfoNoExport;
}
noExportMap.put(entity.getMenuNameCode(),cfgIndexInfoNoExport); noExportMap.put(entity.getMenuNameCode(),cfgIndexInfoNoExport);
noExportMap.put("NTC_IP", ipPortInfoNoExport); noExportMap.put("NTC_IP", ipPortInfoNoExport);
noExportMap.put("asn_policy", asnGroupInfoNoExport); noExportMap.put("asn_policy", asnGroupInfoNoExport);
@@ -485,9 +498,16 @@ public class IpController extends BaseController{
dataMap.put(entity.getMenuNameCode(), ipLists); dataMap.put(entity.getMenuNameCode(), ipLists);
dataMap.put("NTC_IP", ipList); dataMap.put("NTC_IP", ipList);
dataMap.put("asn_policy", groupInfoList); dataMap.put("asn_policy", groupInfoList);
String timeRange = initTimeMap(entity);
noExportMap.put("timeRange", timeRange);
if ("csv".equals(entity.getExType())) {
this._exportCsv(model, request, response, redirectAttributes, entity.getMenuNameCode(), titleList,
classMap, dataMap, noExportMap);
} else {
this._export(model, request, response, redirectAttributes, entity.getMenuNameCode(), titleList,
classMap, dataMap, noExportMap);
}
/*}*/ /*}*/
this._export(model, request, response, redirectAttributes,entity.getMenuNameCode(),titleList,classMap,dataMap,noExportMap);
} catch (Exception e) { } catch (Exception e) {
logger.error("ip addr export failed",e); logger.error("ip addr export failed",e);
addMessage(redirectAttributes,"error", "export_failed"); addMessage(redirectAttributes,"error", "export_failed");

View File

@@ -44,6 +44,7 @@ import com.nis.web.security.UserUtils;
/** /**
* 邮件相关配置控制类 * 邮件相关配置控制类
*
* @author dell * @author dell
* *
*/ */
@@ -52,13 +53,15 @@ import com.nis.web.security.UserUtils;
public class MailCfgController extends BaseController { public class MailCfgController extends BaseController {
@RequestMapping(value = { "mailList" }) @RequestMapping(value = { "mailList" })
// @RequiresPermissions(value={"mail:config"}) // @RequiresPermissions(value={"mail:config"})
public String mailList(Model model,@ModelAttribute("cfg")CfgIndexInfo cfg,HttpServletRequest request,HttpServletResponse response) { public String mailList(Model model, @ModelAttribute("cfg") CfgIndexInfo cfg, HttpServletRequest request,
HttpServletResponse response) {
Page<CfgIndexInfo> searchPage = new Page<CfgIndexInfo>(request, response, "a"); Page<CfgIndexInfo> searchPage = new Page<CfgIndexInfo>(request, response, "a");
Page<CfgIndexInfo> page = mailCfgService.getMailList(searchPage, cfg); Page<CfgIndexInfo> page = mailCfgService.getMailList(searchPage, cfg);
model.addAttribute("page", page); model.addAttribute("page", page);
initPageCondition(model, cfg); initPageCondition(model, cfg);
return "/cfg/mail/mailList"; return "/cfg/mail/mailList";
} }
@RequestMapping(value = { "mailForm" }) @RequestMapping(value = { "mailForm" })
@RequiresPermissions(value = { "mail:config" }) @RequiresPermissions(value = { "mail:config" })
public String mailForm(Model model, String ids, CfgIndexInfo entity) { public String mailForm(Model model, String ids, CfgIndexInfo entity) {
@@ -71,14 +74,16 @@ public class MailCfgController extends BaseController{
model.addAttribute("_cfg", entity); model.addAttribute("_cfg", entity);
return "/cfg/mail/mailForm"; return "/cfg/mail/mailForm";
} }
@RequestMapping(value = { "saveMailCfg" }) @RequestMapping(value = { "saveMailCfg" })
@RequiresPermissions(value = { "mail:config" }) @RequiresPermissions(value = { "mail:config" })
public String saveMailCfg( RedirectAttributes redirectAttributes, Model model,HttpServletRequest request,HttpServletResponse response,String ids, public String saveMailCfg(RedirectAttributes redirectAttributes, Model model, HttpServletRequest request,
CfgIndexInfo entity,MultipartFile file) { HttpServletResponse response, String ids, CfgIndexInfo entity, MultipartFile file) {
try { try {
ToMaatResult result = null; ToMaatResult result = null;
if(file!=null && file.getSize()>0 && entity.getDigestList()!=null && entity.getDigestList().size()>0){ if (file != null && file.getSize() > 0 && entity.getDigestList() != null
&& entity.getDigestList().size() > 0) {
String sep = System.getProperty("file.separator"); String sep = System.getProperty("file.separator");
String digestFilePath = request.getRealPath("/") + "digestFile"; String digestFilePath = request.getRealPath("/") + "digestFile";
FileUtils.createDirectory(digestFilePath); FileUtils.createDirectory(digestFilePath);
@@ -114,6 +119,7 @@ public class MailCfgController extends BaseController{
return "redirect:" + adminPath + "/ntc/mail/mailList?functionId=" + entity.getFunctionId(); return "redirect:" + adminPath + "/ntc/mail/mailList?functionId=" + entity.getFunctionId();
} }
@RequestMapping(value = { "ajaxMailSubList" }) @RequestMapping(value = { "ajaxMailSubList" })
public String ajaxMailSubList(Model model, Long cfgId, Integer index, Integer compileId) { public String ajaxMailSubList(Model model, Long cfgId, Integer index, Integer compileId) {
CfgIndexInfo cfg = mailCfgService.getMailCfg(cfgId, compileId); CfgIndexInfo cfg = mailCfgService.getMailCfg(cfgId, compileId);
@@ -159,21 +165,18 @@ public class MailCfgController extends BaseController{
model.addAttribute("tabList", tabList); model.addAttribute("tabList", tabList);
return "/cfg/mail/mailSubList"; return "/cfg/mail/mailSubList";
} }
@RequestMapping(value = { "updateMailCfgValid" }) @RequestMapping(value = { "updateMailCfgValid" })
@RequiresPermissions(value = { "mail:config" }) @RequiresPermissions(value = { "mail:config" })
public String updateMailCfgValid(Integer isValid, String ids, Integer functionId) { public String updateMailCfgValid(Integer isValid, String ids, Integer functionId) {
mailCfgService.updateMailCfgValid(isValid, ids, functionId); mailCfgService.updateMailCfgValid(isValid, ids, functionId);
return "redirect:" + adminPath + "/ntc/mail/mailList?functionId=" + functionId; return "redirect:" + adminPath + "/ntc/mail/mailList?functionId=" + functionId;
} }
@RequestMapping(value = { "auditMailCfg" }) @RequestMapping(value = { "auditMailCfg" })
@RequiresPermissions(value = { "mail:confirm" }) @RequiresPermissions(value = { "mail:confirm" })
public String auditMailCfg(Model model,@ModelAttribute("cfg")CfgIndexInfo cfg, public String auditMailCfg(Model model, @ModelAttribute("cfg") CfgIndexInfo cfg, Integer isValid, Integer isAudit,
Integer isValid, String ids, Integer functionId, RedirectAttributes redirectAttributes, HttpServletResponse response,
Integer isAudit,
String ids,
Integer functionId,
RedirectAttributes redirectAttributes,
HttpServletResponse response,
HttpServletRequest request) { HttpServletRequest request) {
if (!StringUtil.isEmpty(ids)) { if (!StringUtil.isEmpty(ids)) {
CfgIndexInfo entity = new CfgIndexInfo(); CfgIndexInfo entity = new CfgIndexInfo();
@@ -261,6 +264,21 @@ public class MailCfgController extends BaseController{
+ ",config_time,editor,edit_time,auditor,audit_time" + ",config_time,editor,edit_time,auditor,audit_time"
+ ",letter,whether_area_block,classification,attribute,label" + ",letter,whether_area_block,classification,attribute,label"
+ ",userregion1,userregion2,userregion3,userregion4,userregion5,"; + ",userregion1,userregion2,userregion3,userregion4,userregion5,";
// 时间过滤
if (entity.getSearch_create_time_start() == null && entity.getSearch_create_time_end() == null) {
cfgIndexInfoNoExport = ",config_time" + cfgIndexInfoNoExport;
}
if (entity.getSearch_edit_time_start() == null && entity.getSearch_edit_time_end() == null) {
cfgIndexInfoNoExport = ",edit_time" + cfgIndexInfoNoExport;
}
if (entity.getSearch_audit_time_start() == null && entity.getSearch_audit_time_end() == null) {
cfgIndexInfoNoExport = ",audit_time" + cfgIndexInfoNoExport;
}
if (!StringUtil.isEmpty(entity.gethColumns())) {
cfgIndexInfoNoExport = "," + entity.gethColumns() + "," + cfgIndexInfoNoExport;
}
if (entity.getFunctionId() != null) { if (entity.getFunctionId() != null) {
if (entity.getFunctionId() != 37) { if (entity.getFunctionId() != 37) {
titleList.add("NTC_IP"); titleList.add("NTC_IP");
@@ -307,12 +325,22 @@ public class MailCfgController extends BaseController{
dataMap.put("NTC_MAIL_HDR", mailReqHdrList); dataMap.put("NTC_MAIL_HDR", mailReqHdrList);
dataMap.put("NTC_SUBSCRIBE_ID", subscribeInfoList); dataMap.put("NTC_SUBSCRIBE_ID", subscribeInfoList);
/* } */ /* } */
this._export(model, request, response, redirectAttributes,entity.getMenuNameCode(),titleList,classMap,dataMap,noExportMap);
String timeRange = initTimeMap(entity);
noExportMap.put("timeRange", timeRange);
if ("csv".equals(entity.getExType())) {
this._exportCsv(model, request, response, redirectAttributes, entity.getMenuNameCode(), titleList,
classMap, dataMap, noExportMap);
} else {
this._export(model, request, response, redirectAttributes, entity.getMenuNameCode(), titleList,
classMap, dataMap, noExportMap);
}
} catch (Exception e) { } catch (Exception e) {
logger.error("mail export failed", e); logger.error("mail export failed", e);
addMessage(redirectAttributes, "error", "export_failed"); addMessage(redirectAttributes, "error", "export_failed");
} }
//return "redirect:" + adminPath +"/ntc/iplist/list?functionId="+entity.getFunctionId(); // return "redirect:" + adminPath
// +"/ntc/iplist/list?functionId="+entity.getFunctionId();
} }
} }

View File

@@ -50,6 +50,7 @@ import com.nis.web.security.UserUtils;
/** /**
* 网站配置 * 网站配置
*
* @author dell * @author dell
* *
*/ */
@@ -59,16 +60,19 @@ public class WebsiteController extends BaseController{
@RequestMapping(value = { "httpList" }) @RequestMapping(value = { "httpList" })
// @RequiresPermissions(value={"website:http:config"}) // @RequiresPermissions(value={"website:http:config"})
public String httpList(Model model,@ModelAttribute("cfg")CfgIndexInfo cfg,HttpServletRequest request,HttpServletResponse response) { public String httpList(Model model, @ModelAttribute("cfg") CfgIndexInfo cfg, HttpServletRequest request,
HttpServletResponse response) {
Page<CfgIndexInfo> searchPage = new Page<CfgIndexInfo>(request, response, "a"); Page<CfgIndexInfo> searchPage = new Page<CfgIndexInfo>(request, response, "a");
Page<CfgIndexInfo> page = websiteCfgService.getWebsiteList(searchPage, cfg); Page<CfgIndexInfo> page = websiteCfgService.getWebsiteList(searchPage, cfg);
model.addAttribute("page", page); model.addAttribute("page", page);
initPageCondition(model, cfg); initPageCondition(model, cfg);
return "/cfg/website/httpList"; return "/cfg/website/httpList";
} }
@RequestMapping(value = { "dnsList" }) @RequestMapping(value = { "dnsList" })
// @RequiresPermissions(value={"website:dns:config"}) // @RequiresPermissions(value={"website:dns:config"})
public String dnsList(Model model,@ModelAttribute("cfg")CfgIndexInfo cfg,HttpServletRequest request,HttpServletResponse response) { public String dnsList(Model model, @ModelAttribute("cfg") CfgIndexInfo cfg, HttpServletRequest request,
HttpServletResponse response) {
Page<CfgIndexInfo> searchPage = new Page<CfgIndexInfo>(request, response, "a"); Page<CfgIndexInfo> searchPage = new Page<CfgIndexInfo>(request, response, "a");
Page<CfgIndexInfo> page = websiteCfgService.getWebsiteList(searchPage, cfg); Page<CfgIndexInfo> page = websiteCfgService.getWebsiteList(searchPage, cfg);
model.addAttribute("page", page); model.addAttribute("page", page);
@@ -105,12 +109,9 @@ public class WebsiteController extends BaseController{
subscribeId.setCfgType(Constants.NTC_SUBSCRIBE_ID); subscribeId.setCfgType(Constants.NTC_SUBSCRIBE_ID);
entity.setNtcSubscribeIdCfg(subscribeId); entity.setNtcSubscribeIdCfg(subscribeId);
int httpReqCfgNum = entity.getIpPortList().size()+ int httpReqCfgNum = entity.getIpPortList().size() + entity.getHttpUrlList().size()
entity.getHttpUrlList().size()+ + entity.getHttpReqBodyList().size() + entity.getHttpReqHdrList().size();
entity.getHttpReqBodyList().size()+ int httpResCfgNum = entity.getHttpResHdrList().size() + entity.getHttpResBodyList().size();
entity.getHttpReqHdrList().size();
int httpResCfgNum = entity.getHttpResHdrList().size()+
entity.getHttpResBodyList().size();
model.addAttribute("httpReqCfgNum", httpReqCfgNum); model.addAttribute("httpReqCfgNum", httpReqCfgNum);
model.addAttribute("httpResCfgNum", httpResCfgNum); model.addAttribute("httpResCfgNum", httpResCfgNum);
if (entity.getIpPortList().size() == 0) { if (entity.getIpPortList().size() == 0) {
@@ -189,10 +190,12 @@ public class WebsiteController extends BaseController{
@RequestMapping(value = { "saveHttpCfg" }) @RequestMapping(value = { "saveHttpCfg" })
@RequiresPermissions(value = { "website:http:config" }) @RequiresPermissions(value = { "website:http:config" })
public String saveHttpCfg(RedirectAttributes model,HttpServletRequest request,HttpServletResponse response,String ids,CfgIndexInfo entity) { public String saveHttpCfg(RedirectAttributes model, HttpServletRequest request, HttpServletResponse response,
String ids, CfgIndexInfo entity) {
websiteCfgService.saveHttpCfg(entity); websiteCfgService.saveHttpCfg(entity);
return "redirect:" + adminPath + "/ntc/website/httpList?functionId=" + entity.getFunctionId(); return "redirect:" + adminPath + "/ntc/website/httpList?functionId=" + entity.getFunctionId();
} }
@RequestMapping(value = { "ajaxHttpSubList" }) @RequestMapping(value = { "ajaxHttpSubList" })
public String ajaxHttpSubList(Model model, Long cfgId, Integer index, Integer compileId) { public String ajaxHttpSubList(Model model, Long cfgId, Integer index, Integer compileId) {
CfgIndexInfo cfg = websiteCfgService.getHttpCfg(cfgId, compileId); CfgIndexInfo cfg = websiteCfgService.getHttpCfg(cfgId, compileId);
@@ -200,21 +203,18 @@ public class WebsiteController extends BaseController{
model.addAttribute("index", index); model.addAttribute("index", index);
return "/cfg/website/httpSubList"; return "/cfg/website/httpSubList";
} }
@RequestMapping(value = { "updateHttpCfgValid" }) @RequestMapping(value = { "updateHttpCfgValid" })
@RequiresPermissions(value = { "website:http:config" }) @RequiresPermissions(value = { "website:http:config" })
public String updateHttpCfgValid(Integer isValid, String ids, Integer functionId) { public String updateHttpCfgValid(Integer isValid, String ids, Integer functionId) {
websiteCfgService.updateHttpCfgValid(isValid, ids, functionId); websiteCfgService.updateHttpCfgValid(isValid, ids, functionId);
return "redirect:" + adminPath + "/ntc/website/httpList?functionId=" + functionId; return "redirect:" + adminPath + "/ntc/website/httpList?functionId=" + functionId;
} }
@RequestMapping(value = { "auditHttpCfg" }) @RequestMapping(value = { "auditHttpCfg" })
@RequiresPermissions(value = { "website:http:confirm" }) @RequiresPermissions(value = { "website:http:confirm" })
public String auditHttpCfg(Model model,@ModelAttribute("cfg")CfgIndexInfo cfg, public String auditHttpCfg(Model model, @ModelAttribute("cfg") CfgIndexInfo cfg, Integer isValid, Integer isAudit,
Integer isValid, String ids, Integer functionId, RedirectAttributes redirectAttributes, HttpServletResponse response,
Integer isAudit,
String ids,
Integer functionId,
RedirectAttributes redirectAttributes,
HttpServletResponse response,
HttpServletRequest request) { HttpServletRequest request) {
if (!StringUtil.isEmpty(ids)) { if (!StringUtil.isEmpty(ids)) {
CfgIndexInfo entity = new CfgIndexInfo(); CfgIndexInfo entity = new CfgIndexInfo();
@@ -259,15 +259,18 @@ public class WebsiteController extends BaseController{
} }
return "redirect:" + adminPath + "/ntc/website/httpList?functionId=" + functionId; return "redirect:" + adminPath + "/ntc/website/httpList?functionId=" + functionId;
} }
@RequestMapping(value = { "sslList" }) @RequestMapping(value = { "sslList" })
// @RequiresPermissions(value={"website:ssl:config"}) // @RequiresPermissions(value={"website:ssl:config"})
public String sslList(Model model,@ModelAttribute("cfg")CfgIndexInfo cfg,HttpServletRequest request,HttpServletResponse response) { public String sslList(Model model, @ModelAttribute("cfg") CfgIndexInfo cfg, HttpServletRequest request,
HttpServletResponse response) {
Page<CfgIndexInfo> searchPage = new Page<CfgIndexInfo>(request, response, "a"); Page<CfgIndexInfo> searchPage = new Page<CfgIndexInfo>(request, response, "a");
Page<CfgIndexInfo> page = websiteCfgService.getWebsiteList(searchPage, cfg); Page<CfgIndexInfo> page = websiteCfgService.getWebsiteList(searchPage, cfg);
model.addAttribute("page", page); model.addAttribute("page", page);
initPageCondition(model, cfg); initPageCondition(model, cfg);
return "/cfg/website/sslList"; return "/cfg/website/sslList";
} }
@RequestMapping(value = { "sslForm" }) @RequestMapping(value = { "sslForm" })
@RequiresPermissions(value = { "website:ssl:config" }) @RequiresPermissions(value = { "website:ssl:config" })
public String sslForm(Model model, String ids, CfgIndexInfo entity) { public String sslForm(Model model, String ids, CfgIndexInfo entity) {
@@ -280,17 +283,23 @@ public class WebsiteController extends BaseController{
model.addAttribute("_cfg", entity); model.addAttribute("_cfg", entity);
return "/cfg/website/sslForm"; return "/cfg/website/sslForm";
} }
@RequestMapping(value = { "saveSslCfg" }) @RequestMapping(value = { "saveSslCfg" })
@RequiresPermissions(value = { "website:ssl:config" }) @RequiresPermissions(value = { "website:ssl:config" })
public String saveSslCfg(RedirectAttributes model,HttpServletRequest request,HttpServletResponse response,String ids,CfgIndexInfo entity) { public String saveSslCfg(RedirectAttributes model, HttpServletRequest request, HttpServletResponse response,
String ids, CfgIndexInfo entity) {
websiteCfgService.saveSslCfg(entity); websiteCfgService.saveSslCfg(entity);
return "redirect:" + adminPath + "/ntc/website/sslList?functionId=" + entity.getFunctionId(); return "redirect:" + adminPath + "/ntc/website/sslList?functionId=" + entity.getFunctionId();
} }
@RequestMapping(value = { "ajaxSslSubList" }) @RequestMapping(value = { "ajaxSslSubList" })
public String ajaxSslSubList(Model model, Long cfgId, Integer index, Integer compileId) { public String ajaxSslSubList(Model model, Long cfgId, Integer index, Integer compileId) {
CfgIndexInfo cfg = websiteCfgService.getSslCfg(cfgId, compileId); CfgIndexInfo cfg = websiteCfgService.getSslCfg(cfgId, compileId);
/*List<FunctionRegionDict> regionList = DictUtils.getFunctionRegionDictList(cfg.getFunctionId()); /*
model.addAttribute("regionList", regionList);*/ * List<FunctionRegionDict> regionList =
* DictUtils.getFunctionRegionDictList(cfg.getFunctionId());
* model.addAttribute("regionList", regionList);
*/
List<String[]> tabList = new ArrayList(); List<String[]> tabList = new ArrayList();
if (cfg.getIpPortList() != null) { if (cfg.getIpPortList() != null) {
String cfgType = null; String cfgType = null;
@@ -324,21 +333,18 @@ public class WebsiteController extends BaseController{
model.addAttribute("tabList", tabList); model.addAttribute("tabList", tabList);
return "/cfg/website/sslSubList"; return "/cfg/website/sslSubList";
} }
@RequestMapping(value = { "updateSslCfgValid" }) @RequestMapping(value = { "updateSslCfgValid" })
@RequiresPermissions(value = { "website:ssl:config" }) @RequiresPermissions(value = { "website:ssl:config" })
public String updateSslCfgValid(Integer isValid, String ids, Integer functionId) { public String updateSslCfgValid(Integer isValid, String ids, Integer functionId) {
websiteCfgService.updateSslCfgValid(isValid, ids, functionId); websiteCfgService.updateSslCfgValid(isValid, ids, functionId);
return "redirect:" + adminPath + "/ntc/website/sslList?functionId=" + functionId; return "redirect:" + adminPath + "/ntc/website/sslList?functionId=" + functionId;
} }
@RequestMapping(value = { "auditSslCfg" }) @RequestMapping(value = { "auditSslCfg" })
@RequiresPermissions(value = { "website:ssl:confirm" }) @RequiresPermissions(value = { "website:ssl:confirm" })
public String auditSslCfg(Model model,@ModelAttribute("cfg")CfgIndexInfo cfg, public String auditSslCfg(Model model, @ModelAttribute("cfg") CfgIndexInfo cfg, Integer isAudit, Integer isValid,
Integer isAudit, String ids, Integer functionId, RedirectAttributes redirectAttributes, HttpServletRequest request,
Integer isValid,
String ids,
Integer functionId,
RedirectAttributes redirectAttributes,
HttpServletRequest request,
HttpServletResponse response) { HttpServletResponse response) {
if (!StringUtil.isEmpty(ids)) { if (!StringUtil.isEmpty(ids)) {
CfgIndexInfo entity = new CfgIndexInfo(); CfgIndexInfo entity = new CfgIndexInfo();
@@ -404,12 +410,15 @@ public class WebsiteController extends BaseController{
model.addAttribute("_cfg", entity); model.addAttribute("_cfg", entity);
return "/cfg/website/dnsForm"; return "/cfg/website/dnsForm";
} }
@RequestMapping(value = { "saveDnsCfg" }) @RequestMapping(value = { "saveDnsCfg" })
@RequiresPermissions(value = { "website:dns:config" }) @RequiresPermissions(value = { "website:dns:config" })
public String saveDnsCfg(RedirectAttributes model,HttpServletRequest request,HttpServletResponse response,String ids,CfgIndexInfo entity) { public String saveDnsCfg(RedirectAttributes model, HttpServletRequest request, HttpServletResponse response,
String ids, CfgIndexInfo entity) {
websiteCfgService.saveDnsCfg(entity); websiteCfgService.saveDnsCfg(entity);
return "redirect:" + adminPath + "/ntc/website/dnsList?functionId=" + entity.getFunctionId(); return "redirect:" + adminPath + "/ntc/website/dnsList?functionId=" + entity.getFunctionId();
} }
@RequestMapping(value = { "ajaxDnsSubList" }) @RequestMapping(value = { "ajaxDnsSubList" })
public String ajaxDnsSubList(Model model, Long cfgId, Integer index, Integer compileId) { public String ajaxDnsSubList(Model model, Long cfgId, Integer index, Integer compileId) {
CfgIndexInfo cfg = websiteCfgService.getDnsCfg(cfgId, compileId); CfgIndexInfo cfg = websiteCfgService.getDnsCfg(cfgId, compileId);
@@ -446,21 +455,18 @@ public class WebsiteController extends BaseController{
model.addAttribute("tabList", tabList); model.addAttribute("tabList", tabList);
return "/cfg/website/dnsSubList"; return "/cfg/website/dnsSubList";
} }
@RequestMapping(value = { "updateDnsCfgValid" }) @RequestMapping(value = { "updateDnsCfgValid" })
@RequiresPermissions(value = { "website:dns:config" }) @RequiresPermissions(value = { "website:dns:config" })
public String updateDnsCfgValid(Integer isValid, String ids, Integer functionId) { public String updateDnsCfgValid(Integer isValid, String ids, Integer functionId) {
websiteCfgService.updateDnsCfgValid(isValid, ids, functionId); websiteCfgService.updateDnsCfgValid(isValid, ids, functionId);
return "redirect:" + adminPath + "/ntc/website/dnsList?functionId=" + functionId; return "redirect:" + adminPath + "/ntc/website/dnsList?functionId=" + functionId;
} }
@RequestMapping(value = { "auditDnsCfg" }) @RequestMapping(value = { "auditDnsCfg" })
@RequiresPermissions(value = { "website:dns:confirm" }) @RequiresPermissions(value = { "website:dns:confirm" })
public String auditDnsCfg(Model model,@ModelAttribute("cfg")CfgIndexInfo cfg, public String auditDnsCfg(Model model, @ModelAttribute("cfg") CfgIndexInfo cfg, Integer isAudit, Integer isValid,
Integer isAudit, String ids, Integer functionId, HttpServletRequest request, HttpServletResponse response,
Integer isValid,
String ids,
Integer functionId,
HttpServletRequest request,
HttpServletResponse response,
RedirectAttributes redirectAttributes) { RedirectAttributes redirectAttributes) {
if (!StringUtil.isEmpty(ids)) { if (!StringUtil.isEmpty(ids)) {
CfgIndexInfo entity = new CfgIndexInfo(); CfgIndexInfo entity = new CfgIndexInfo();
@@ -507,6 +513,7 @@ public class WebsiteController extends BaseController{
} }
return "redirect:" + adminPath + "/ntc/website/dnsList?functionId=" + functionId; return "redirect:" + adminPath + "/ntc/website/dnsList?functionId=" + functionId;
} }
@Deprecated @Deprecated
// 下载导入模板 // 下载导入模板
@RequestMapping(value = "import/template") @RequestMapping(value = "import/template")
@@ -515,115 +522,85 @@ public class WebsiteController extends BaseController{
this.importCfgTemplate(request, response, redirectAttributes, functionId, cfgRegionCode); this.importCfgTemplate(request, response, redirectAttributes, functionId, cfgRegionCode);
} }
// http配置导入 // http配置导入
/*@RequestMapping(value = "importHttp", method=RequestMethod.POST) /*
public String importHttpFile(HttpServletRequest request,Model model,HttpServletResponse response, RedirectAttributes redirectAttributes, * @RequestMapping(value = "importHttp", method=RequestMethod.POST) public
@RequestParam("file") MultipartFile file,CfgIndexInfo cfgIndex,Integer protocolId) { * String importHttpFile(HttpServletRequest request,Model
try { * model,HttpServletResponse response, RedirectAttributes
ImportExcel ei = new ImportExcel(file, 0, 0); * redirectAttributes,
if(cfgIndex.getCfgType().equals(Constants.HTTP_IP_REGION)){ *
List<IpCfgTemplate> list = ei.getDataList(IpCfgTemplate.class); * @RequestParam("file") MultipartFile file,CfgIndexInfo cfgIndex,Integer
for(IpCfgTemplate cfg : list){ * protocolId) { try { ImportExcel ei = new ImportExcel(file, 0, 0);
List<IpPortCfg> ipList = new ArrayList(); * if(cfgIndex.getCfgType().equals(Constants.HTTP_IP_REGION)){
BeanUtils.copyProperties(cfg, cfgIndex); * List<IpCfgTemplate> list = ei.getDataList(IpCfgTemplate.class);
IpPortCfg ip = new IpPortCfg(); * for(IpCfgTemplate cfg : list){ List<IpPortCfg> ipList = new ArrayList();
BeanUtils.copyProperties(cfg, ip); * BeanUtils.copyProperties(cfg, cfgIndex); IpPortCfg ip = new IpPortCfg();
ip.setProtocolId(protocolId); * BeanUtils.copyProperties(cfg, ip); ip.setProtocolId(protocolId);
ip.setCfgRegionCode(cfgIndex.getCfgRegionCode()); * ip.setCfgRegionCode(cfgIndex.getCfgRegionCode());
ip.setCfgType(cfgIndex.getCfgType()); * ip.setCfgType(cfgIndex.getCfgType()); ipList.add(ip);
ipList.add(ip); * cfgIndex.setIpPortList(ipList); cfgIndex.setIsAreaEffective(0);
cfgIndex.setIpPortList(ipList); * websiteCfgService.saveHttpCfg(cfgIndex); }
cfgIndex.setIsAreaEffective(0); *
websiteCfgService.saveHttpCfg(cfgIndex); * }else if(cfgIndex.getCfgType().equals(Constants.HTTP_URL_REGION)){
} * List<StringCfgTemplate> list = ei.getDataList(StringCfgTemplate.class);
* for(StringCfgTemplate cfg : list){ List<HttpUrlCfg> urlList = new
}else if(cfgIndex.getCfgType().equals(Constants.HTTP_URL_REGION)){ * ArrayList(); BeanUtils.copyProperties(cfg, cfgIndex); HttpUrlCfg url =
List<StringCfgTemplate> list = ei.getDataList(StringCfgTemplate.class); * new HttpUrlCfg(); BeanUtils.copyProperties(cfg, url);
for(StringCfgTemplate cfg : list){ * url.setCfgRegionCode(cfgIndex.getCfgRegionCode());
List<HttpUrlCfg> urlList = new ArrayList(); * url.setCfgType(cfgIndex.getCfgType()); urlList.add(url);
BeanUtils.copyProperties(cfg, cfgIndex); * cfgIndex.setHttpUrlList(urlList); cfgIndex.setIsAreaEffective(0);
HttpUrlCfg url = new HttpUrlCfg(); * websiteCfgService.saveHttpCfg(cfgIndex); }
BeanUtils.copyProperties(cfg, url); *
url.setCfgRegionCode(cfgIndex.getCfgRegionCode()); * }else if(cfgIndex.getCfgType().equals(Constants.HTTP_REQ_HEAD_REGION)){
url.setCfgType(cfgIndex.getCfgType()); * List<ComplexStringCfgTemplate> list =
urlList.add(url); * ei.getDataList(ComplexStringCfgTemplate.class);
cfgIndex.setHttpUrlList(urlList); * for(ComplexStringCfgTemplate cfg : list){ List<HttpReqHeadCfg> headList =
cfgIndex.setIsAreaEffective(0); * new ArrayList(); BeanUtils.copyProperties(cfg, cfgIndex); HttpReqHeadCfg
websiteCfgService.saveHttpCfg(cfgIndex); * head = new HttpReqHeadCfg(); BeanUtils.copyProperties(cfg, head);
} * head.setCfgRegionCode(cfgIndex.getCfgRegionCode());
* head.setCfgType(cfgIndex.getCfgType()); headList.add(head);
}else if(cfgIndex.getCfgType().equals(Constants.HTTP_REQ_HEAD_REGION)){ * cfgIndex.setHttpReqHdrList(headList); cfgIndex.setIsAreaEffective(0);
List<ComplexStringCfgTemplate> list = ei.getDataList(ComplexStringCfgTemplate.class); * websiteCfgService.saveHttpCfg(cfgIndex); }
for(ComplexStringCfgTemplate cfg : list){ *
List<HttpReqHeadCfg> headList = new ArrayList(); * }else if(cfgIndex.getCfgType().equals(Constants.HTTP_REQ_BODY_REGION)){
BeanUtils.copyProperties(cfg, cfgIndex); * List<StringCfgTemplate> list = ei.getDataList(StringCfgTemplate.class);
HttpReqHeadCfg head = new HttpReqHeadCfg(); * for(StringCfgTemplate cfg : list){ List<HttpBodyCfg> bodyList = new
BeanUtils.copyProperties(cfg, head); * ArrayList(); BeanUtils.copyProperties(cfg, cfgIndex); HttpBodyCfg body =
head.setCfgRegionCode(cfgIndex.getCfgRegionCode()); * new HttpBodyCfg(); BeanUtils.copyProperties(cfg, body);
head.setCfgType(cfgIndex.getCfgType()); * body.setCfgRegionCode(cfgIndex.getCfgRegionCode());
headList.add(head); * body.setCfgType(cfgIndex.getCfgType()); bodyList.add(body);
cfgIndex.setHttpReqHdrList(headList); * cfgIndex.setHttpReqBodyList(bodyList); cfgIndex.setIsAreaEffective(0);
cfgIndex.setIsAreaEffective(0); * websiteCfgService.saveHttpCfg(cfgIndex); }
websiteCfgService.saveHttpCfg(cfgIndex); *
} * }else if(cfgIndex.getCfgType().equals(Constants.HTTP_RES_HEAD_REGION)){
* List<ComplexStringCfgTemplate> list =
}else if(cfgIndex.getCfgType().equals(Constants.HTTP_REQ_BODY_REGION)){ * ei.getDataList(ComplexStringCfgTemplate.class);
List<StringCfgTemplate> list = ei.getDataList(StringCfgTemplate.class); * for(ComplexStringCfgTemplate cfg : list){ List<HttpResHeadCfg> headList =
for(StringCfgTemplate cfg : list){ * new ArrayList(); BeanUtils.copyProperties(cfg, cfgIndex); HttpResHeadCfg
List<HttpBodyCfg> bodyList = new ArrayList(); * head = new HttpResHeadCfg(); BeanUtils.copyProperties(cfg, head);
BeanUtils.copyProperties(cfg, cfgIndex); * head.setCfgRegionCode(cfgIndex.getCfgRegionCode());
HttpBodyCfg body = new HttpBodyCfg(); * head.setCfgType(cfgIndex.getCfgType()); headList.add(head);
BeanUtils.copyProperties(cfg, body); * cfgIndex.setHttpResHdrList(headList); cfgIndex.setIsAreaEffective(0);
body.setCfgRegionCode(cfgIndex.getCfgRegionCode()); * websiteCfgService.saveHttpCfg(cfgIndex); }
body.setCfgType(cfgIndex.getCfgType()); *
bodyList.add(body); * }else if(cfgIndex.getCfgType().equals(Constants.HTTP_RES_BODY_REGION)){
cfgIndex.setHttpReqBodyList(bodyList); * List<StringCfgTemplate> list = ei.getDataList(StringCfgTemplate.class);
cfgIndex.setIsAreaEffective(0); * for(StringCfgTemplate cfg : list){ List<HttpBodyCfg> bodyList = new
websiteCfgService.saveHttpCfg(cfgIndex); * ArrayList(); BeanUtils.copyProperties(cfg, cfgIndex); HttpBodyCfg body =
} * new HttpBodyCfg(); BeanUtils.copyProperties(cfg, body);
* body.setCfgRegionCode(cfgIndex.getCfgRegionCode());
}else if(cfgIndex.getCfgType().equals(Constants.HTTP_RES_HEAD_REGION)){ * body.setCfgType(cfgIndex.getCfgType()); bodyList.add(body);
List<ComplexStringCfgTemplate> list = ei.getDataList(ComplexStringCfgTemplate.class); * cfgIndex.setHttpResBodyList(bodyList); cfgIndex.setIsAreaEffective(0);
for(ComplexStringCfgTemplate cfg : list){ * websiteCfgService.saveHttpCfg(cfgIndex); }
List<HttpResHeadCfg> headList = new ArrayList(); *
BeanUtils.copyProperties(cfg, cfgIndex); * }
HttpResHeadCfg head = new HttpResHeadCfg(); *
BeanUtils.copyProperties(cfg, head); *
head.setCfgRegionCode(cfgIndex.getCfgRegionCode()); * } catch (Exception e) { addMessage(redirectAttributes, e.getMessage());
head.setCfgType(cfgIndex.getCfgType()); * e.printStackTrace(); } return "redirect:" + adminPath
headList.add(head); * +"/ntc/website/httpList?functionId="+cfgIndex.getFunctionId();
cfgIndex.setHttpResHdrList(headList); *
cfgIndex.setIsAreaEffective(0); * }
websiteCfgService.saveHttpCfg(cfgIndex); */
}
}else if(cfgIndex.getCfgType().equals(Constants.HTTP_RES_BODY_REGION)){
List<StringCfgTemplate> list = ei.getDataList(StringCfgTemplate.class);
for(StringCfgTemplate cfg : list){
List<HttpBodyCfg> bodyList = new ArrayList();
BeanUtils.copyProperties(cfg, cfgIndex);
HttpBodyCfg body = new HttpBodyCfg();
BeanUtils.copyProperties(cfg, body);
body.setCfgRegionCode(cfgIndex.getCfgRegionCode());
body.setCfgType(cfgIndex.getCfgType());
bodyList.add(body);
cfgIndex.setHttpResBodyList(bodyList);
cfgIndex.setIsAreaEffective(0);
websiteCfgService.saveHttpCfg(cfgIndex);
}
}
} catch (Exception e) {
addMessage(redirectAttributes, e.getMessage());
e.printStackTrace();
}
return "redirect:" + adminPath +"/ntc/website/httpList?functionId="+cfgIndex.getFunctionId();
}*/
// http配置导出 // http配置导出
@RequestMapping(value = "exportHttp") @RequestMapping(value = "exportHttp")
@@ -680,6 +657,21 @@ public class WebsiteController extends BaseController{
+ ",config_time,editor,edit_time,auditor,audit_time" + ",config_time,editor,edit_time,auditor,audit_time"
+ ",letter,whether_area_block,classification,attribute,label" + ",letter,whether_area_block,classification,attribute,label"
+ ",userregion1,userregion2,userregion3,userregion4,userregion5,ir_type,group_name,"; + ",userregion1,userregion2,userregion3,userregion4,userregion5,ir_type,group_name,";
// 时间过滤
if (entity.getSearch_create_time_start() == null && entity.getSearch_create_time_end() == null) {
cfgIndexInfoNoExport = ",config_time" + cfgIndexInfoNoExport;
}
if (entity.getSearch_edit_time_start() == null && entity.getSearch_edit_time_end() == null) {
cfgIndexInfoNoExport = ",edit_time" + cfgIndexInfoNoExport;
}
if (entity.getSearch_audit_time_start() == null && entity.getSearch_audit_time_end() == null) {
cfgIndexInfoNoExport = ",audit_time" + cfgIndexInfoNoExport;
}
if (!StringUtil.isEmpty(entity.gethColumns())) {
cfgIndexInfoNoExport = "," + entity.gethColumns() + "," + cfgIndexInfoNoExport;
}
List<BaseStringCfg> httpUrlList = new ArrayList<>(); List<BaseStringCfg> httpUrlList = new ArrayList<>();
List<ComplexkeywordCfg> httpReqHdrList = new ArrayList<>(); List<ComplexkeywordCfg> httpReqHdrList = new ArrayList<>();
List<ComplexkeywordCfg> httpResHdrList = new ArrayList<>(); List<ComplexkeywordCfg> httpResHdrList = new ArrayList<>();
@@ -741,12 +733,22 @@ public class WebsiteController extends BaseController{
dataMap.put("NTC_SUBSCRIBE_ID", subscribeIdList); dataMap.put("NTC_SUBSCRIBE_ID", subscribeIdList);
} }
/* } */ /* } */
this._export(model, request, response, redirectAttributes,entity.getMenuNameCode(),titleList,classMap,dataMap,noExportMap);
String timeRange = initTimeMap(entity);
noExportMap.put("timeRange", timeRange);
if ("csv".equals(entity.getExType())) {
this._exportCsv(model, request, response, redirectAttributes, entity.getMenuNameCode(), titleList,
classMap, dataMap, noExportMap);
} else {
this._export(model, request, response, redirectAttributes, entity.getMenuNameCode(), titleList,
classMap, dataMap, noExportMap);
}
} catch (Exception e) { } catch (Exception e) {
logger.error("http export failed", e); logger.error("http export failed", e);
addMessage(redirectAttributes, "error", "export_failed"); addMessage(redirectAttributes, "error", "export_failed");
} }
//return "redirect:" + adminPath +"/ntc/website/httpList?functionId="+entity.getFunctionId(); // return "redirect:" + adminPath
// +"/ntc/website/httpList?functionId="+entity.getFunctionId();
} }
// dns配置导出 // dns配置导出
@@ -775,7 +777,8 @@ public class WebsiteController extends BaseController{
for (int i = 0; i < ipLists.size(); i++) { for (int i = 0; i < ipLists.size(); i++) {
if (ipLists.get(i).getDnsStrategyId() != null && ipLists.get(i).getDnsStrategyId() != 0) { if (ipLists.get(i).getDnsStrategyId() != null && ipLists.get(i).getDnsStrategyId() != 0) {
List<DnsResStrategy> resStrategys=dnsResStrategyService.findDnsResStrategys(ipLists.get(i).getDnsStrategyId(), 1,1); List<DnsResStrategy> resStrategys = dnsResStrategyService
.findDnsResStrategys(ipLists.get(i).getDnsStrategyId(), 1, 1);
if (resStrategys != null && resStrategys.size() > 0) { if (resStrategys != null && resStrategys.size() > 0) {
String msg = msgProp.getProperty(resStrategys.get(0).getCfgDesc()); String msg = msgProp.getProperty(resStrategys.get(0).getCfgDesc());
if (!StringUtil.isEmpty(msg)) { if (!StringUtil.isEmpty(msg)) {
@@ -811,6 +814,21 @@ public class WebsiteController extends BaseController{
+ ",config_time,editor,edit_time,auditor,audit_time" + ",config_time,editor,edit_time,auditor,audit_time"
+ ",letter,whether_area_block,classification,attribute,label" + ",letter,whether_area_block,classification,attribute,label"
+ ",userregion1,userregion2,userregion3,userregion4,userregion5,"; + ",userregion1,userregion2,userregion3,userregion4,userregion5,";
// 时间过滤
if (entity.getSearch_create_time_start() == null && entity.getSearch_create_time_end() == null) {
cfgIndexInfoNoExport = ",config_time" + cfgIndexInfoNoExport;
}
if (entity.getSearch_edit_time_start() == null && entity.getSearch_edit_time_end() == null) {
cfgIndexInfoNoExport = ",edit_time" + cfgIndexInfoNoExport;
}
if (entity.getSearch_audit_time_start() == null && entity.getSearch_audit_time_end() == null) {
cfgIndexInfoNoExport = ",audit_time" + cfgIndexInfoNoExport;
}
if (!StringUtil.isEmpty(entity.gethColumns())) {
cfgIndexInfoNoExport = "," + entity.gethColumns() + "," + cfgIndexInfoNoExport;
}
noExportMap.put(entity.getMenuNameCode(), cfgIndexInfoNoExport); noExportMap.put(entity.getMenuNameCode(), cfgIndexInfoNoExport);
noExportMap.put("NTC_IP", ipPortInfoNoExport); noExportMap.put("NTC_IP", ipPortInfoNoExport);
noExportMap.put("NTC_DNS_REGION", regionCfgNoExport); noExportMap.put("NTC_DNS_REGION", regionCfgNoExport);
@@ -832,12 +850,22 @@ public class WebsiteController extends BaseController{
dataMap.put("NTC_SUBSCRIBE_ID", subscribeInfoList); dataMap.put("NTC_SUBSCRIBE_ID", subscribeInfoList);
/* } */ /* } */
this._export(model, request, response, redirectAttributes,entity.getMenuNameCode(),titleList,classMap,dataMap,noExportMap);
String timeRange = initTimeMap(entity);
noExportMap.put("timeRange", timeRange);
if ("csv".equals(entity.getExType())) {
this._exportCsv(model, request, response, redirectAttributes, entity.getMenuNameCode(), titleList,
classMap, dataMap, noExportMap);
} else {
this._export(model, request, response, redirectAttributes, entity.getMenuNameCode(), titleList,
classMap, dataMap, noExportMap);
}
} catch (Exception e) { } catch (Exception e) {
logger.error("dns export failed", e); logger.error("dns export failed", e);
addMessage(redirectAttributes, "error", "export_failed"); addMessage(redirectAttributes, "error", "export_failed");
} }
//return "redirect:" + adminPath +"/ntc/iplist/list?functionId="+entity.getFunctionId(); // return "redirect:" + adminPath
// +"/ntc/iplist/list?functionId="+entity.getFunctionId();
} }
// ssl配置导出 // ssl配置导出
@@ -890,6 +918,21 @@ public class WebsiteController extends BaseController{
+ ",config_time,editor,edit_time,auditor,audit_time" + ",config_time,editor,edit_time,auditor,audit_time"
+ ",letter,whether_area_block,classification,attribute,label" + ",letter,whether_area_block,classification,attribute,label"
+ ",userregion1,userregion2,userregion3,userregion4,userregion5,"; + ",userregion1,userregion2,userregion3,userregion4,userregion5,";
// 时间过滤
if (entity.getSearch_create_time_start() == null && entity.getSearch_create_time_end() == null) {
cfgIndexInfoNoExport = ",config_time" + cfgIndexInfoNoExport;
}
if (entity.getSearch_edit_time_start() == null && entity.getSearch_edit_time_end() == null) {
cfgIndexInfoNoExport = ",edit_time" + cfgIndexInfoNoExport;
}
if (entity.getSearch_audit_time_start() == null && entity.getSearch_audit_time_end() == null) {
cfgIndexInfoNoExport = ",audit_time" + cfgIndexInfoNoExport;
}
if (!StringUtil.isEmpty(entity.gethColumns())) {
cfgIndexInfoNoExport = "," + entity.gethColumns() + "," + cfgIndexInfoNoExport;
}
noExportMap.put(entity.getMenuNameCode(), cfgIndexInfoNoExport); noExportMap.put(entity.getMenuNameCode(), cfgIndexInfoNoExport);
noExportMap.put("NTC_UNIVERSAL_IP", ipPortCfgNoExport); noExportMap.put("NTC_UNIVERSAL_IP", ipPortCfgNoExport);
noExportMap.put("NTC_SSL_SNI", sslNoExport); noExportMap.put("NTC_SSL_SNI", sslNoExport);
@@ -921,11 +964,21 @@ public class WebsiteController extends BaseController{
dataMap.put("NTC_SSL_CN", sslCnList); dataMap.put("NTC_SSL_CN", sslCnList);
dataMap.put("NTC_SUBSCRIBE_ID", subscribeIdList); dataMap.put("NTC_SUBSCRIBE_ID", subscribeIdList);
/* } */ /* } */
this._export(model, request, response, redirectAttributes,entity.getMenuNameCode(),titleList,classMap,dataMap,noExportMap);
String timeRange = initTimeMap(entity);
noExportMap.put("timeRange", timeRange);
if ("csv".equals(entity.getExType())) {
this._exportCsv(model, request, response, redirectAttributes, entity.getMenuNameCode(), titleList,
classMap, dataMap, noExportMap);
} else {
this._export(model, request, response, redirectAttributes, entity.getMenuNameCode(), titleList,
classMap, dataMap, noExportMap);
}
} catch (Exception e) { } catch (Exception e) {
logger.error("http export failed", e); logger.error("http export failed", e);
addMessage(redirectAttributes, "error", "export_failed"); addMessage(redirectAttributes, "error", "export_failed");
} }
//return "redirect:" + adminPath +"/ntc/website/httpList?functionId="+entity.getFunctionId(); // return "redirect:" + adminPath
// +"/ntc/website/httpList?functionId="+entity.getFunctionId();
} }
} }

View File

@@ -33,6 +33,7 @@ import com.nis.web.security.UserUtils;
/** /**
* 白名单 * 白名单
*
* @author dell * @author dell
* *
*/ */
@@ -42,13 +43,15 @@ public class WhiteListController extends CommonController{
@RequestMapping(value = { "ip/list" }) @RequestMapping(value = { "ip/list" })
// @RequiresPermissions(value={"whitelist:ip:config","whitelist:ip:confirm","whitelist:ip:aduit"},logical=Logical.OR) // @RequiresPermissions(value={"whitelist:ip:config","whitelist:ip:confirm","whitelist:ip:aduit"},logical=Logical.OR)
public String ipList(Model model,@ModelAttribute("cfg")CfgIndexInfo cfg,HttpServletRequest request,HttpServletResponse response) { public String ipList(Model model, @ModelAttribute("cfg") CfgIndexInfo cfg, HttpServletRequest request,
HttpServletResponse response) {
Page<CfgIndexInfo> searchPage = new Page<CfgIndexInfo>(request, response, "a"); Page<CfgIndexInfo> searchPage = new Page<CfgIndexInfo>(request, response, "a");
Page<CfgIndexInfo> page = ipCfgService.getIpCfgList(searchPage, cfg); Page<CfgIndexInfo> page = ipCfgService.getIpCfgList(searchPage, cfg);
model.addAttribute("page", page); model.addAttribute("page", page);
initPageCondition(model, cfg); initPageCondition(model, cfg);
return "/cfg/whitelist/ipList"; return "/cfg/whitelist/ipList";
} }
@RequestMapping(value = { "ajaxIpSubList" }) @RequestMapping(value = { "ajaxIpSubList" })
public String ajaxIpSubList(Model model, Long cfgId, Integer index, Integer compileId) { public String ajaxIpSubList(Model model, Long cfgId, Integer index, Integer compileId) {
CfgIndexInfo cfg = ipCfgService.getIpPortCfg(cfgId, compileId); CfgIndexInfo cfg = ipCfgService.getIpPortCfg(cfgId, compileId);
@@ -76,6 +79,7 @@ public class WhiteListController extends CommonController{
model.addAttribute("tabList", tabList); model.addAttribute("tabList", tabList);
return "/cfg/whitelist/ipSubList"; return "/cfg/whitelist/ipSubList";
} }
@RequestMapping(value = { "ip/form" }) @RequestMapping(value = { "ip/form" })
@RequiresPermissions(value = { "whitelist:ip:config" }) @RequiresPermissions(value = { "whitelist:ip:config" })
public String ipForm(Model model, String ids, CfgIndexInfo entity) { public String ipForm(Model model, String ids, CfgIndexInfo entity) {
@@ -89,22 +93,19 @@ public class WhiteListController extends CommonController{
model.addAttribute("_cfg", entity); model.addAttribute("_cfg", entity);
return "/cfg/whitelist/ipForm"; return "/cfg/whitelist/ipForm";
} }
@RequestMapping(value = { "ip/save" }) @RequestMapping(value = { "ip/save" })
public String saveIpCfg(RedirectAttributes model,HttpServletRequest request,HttpServletResponse response,String ids,CfgIndexInfo entity) { public String saveIpCfg(RedirectAttributes model, HttpServletRequest request, HttpServletResponse response,
String ids, CfgIndexInfo entity) {
ipCfgService.saveIpCfg(entity); ipCfgService.saveIpCfg(entity);
return "redirect:" + adminPath + "/ntc/whitelist/ip/list?functionId=" + entity.getFunctionId(); return "redirect:" + adminPath + "/ntc/whitelist/ip/list?functionId=" + entity.getFunctionId();
} }
@RequestMapping(value = { "ip/audit" }) @RequestMapping(value = { "ip/audit" })
@RequiresPermissions("whitelist:ip:confirm") @RequiresPermissions("whitelist:ip:confirm")
public String auditIp(Model model,@ModelAttribute("cfg")CfgIndexInfo cfg, public String auditIp(Model model, @ModelAttribute("cfg") CfgIndexInfo cfg, Integer isValid, Integer isAudit,
Integer isValid, String ids, Integer functionId, RedirectAttributes redirectAttributes, HttpServletResponse response,
Integer isAudit, HttpServletRequest request) {
String ids,
Integer functionId,
RedirectAttributes redirectAttributes,
HttpServletResponse response,
HttpServletRequest request
) {
if (!StringUtil.isEmpty(ids)) { if (!StringUtil.isEmpty(ids)) {
CfgIndexInfo entity = new CfgIndexInfo(); CfgIndexInfo entity = new CfgIndexInfo();
String[] idArray = ids.split(","); String[] idArray = ids.split(",");
@@ -148,15 +149,18 @@ public class WhiteListController extends CommonController{
} }
return "redirect:" + adminPath + "/ntc/whitelist/ip/list?functionId=" + functionId; return "redirect:" + adminPath + "/ntc/whitelist/ip/list?functionId=" + functionId;
} }
@RequestMapping(value = { "updateIpValid" }) @RequestMapping(value = { "updateIpValid" })
@RequiresPermissions(value = { "whitelist:ip:config" }) @RequiresPermissions(value = { "whitelist:ip:config" })
public String updateIpCfgValid(Integer isValid, String ids, Integer functionId) { public String updateIpCfgValid(Integer isValid, String ids, Integer functionId) {
ipCfgService.updateIpCfgValid(isValid, ids, functionId); ipCfgService.updateIpCfgValid(isValid, ids, functionId);
return "redirect:" + adminPath + "/ntc/whitelist/ip/list?functionId=" + functionId; return "redirect:" + adminPath + "/ntc/whitelist/ip/list?functionId=" + functionId;
} }
@RequestMapping(value = { "domain/list" }) @RequestMapping(value = { "domain/list" })
// @RequiresPermissions(value={"whitelist:domain:config","whitelist:domain:confirm","whitelist:domain:aduit"},logical=Logical.OR) // @RequiresPermissions(value={"whitelist:domain:config","whitelist:domain:confirm","whitelist:domain:aduit"},logical=Logical.OR)
public String domainList(Model model,@ModelAttribute("cfg")CfgIndexInfo cfg,HttpServletRequest request,HttpServletResponse response) { public String domainList(Model model, @ModelAttribute("cfg") CfgIndexInfo cfg, HttpServletRequest request,
HttpServletResponse response) {
Page<CfgIndexInfo> searchPage = new Page<CfgIndexInfo>(request, response, "a"); Page<CfgIndexInfo> searchPage = new Page<CfgIndexInfo>(request, response, "a");
Page<CfgIndexInfo> page = domainService.getDomainList(searchPage, cfg); Page<CfgIndexInfo> page = domainService.getDomainList(searchPage, cfg);
model.addAttribute("page", page); model.addAttribute("page", page);
@@ -165,10 +169,12 @@ public class WhiteListController extends CommonController{
} }
@RequestMapping(value = { "saveHttpUrlCfgs" }) @RequestMapping(value = { "saveHttpUrlCfgs" })
public String saveHttpUrlCfgs(RedirectAttributes model,HttpServletRequest request,HttpServletResponse response,CfgIndexInfo entity) { public String saveHttpUrlCfgs(RedirectAttributes model, HttpServletRequest request, HttpServletResponse response,
CfgIndexInfo entity) {
if (!StringUtil.isEmpty(entity) && !StringUtil.isEmpty(entity.getHttpUrlList())) { if (!StringUtil.isEmpty(entity) && !StringUtil.isEmpty(entity.getHttpUrlList())) {
CfgIndexInfo sourceCfg=websiteCfgService.getCfgIndexInfo(entity.getHttpUrlList().get(0).getSourceCompileId()); CfgIndexInfo sourceCfg = websiteCfgService
.getCfgIndexInfo(entity.getHttpUrlList().get(0).getSourceCompileId());
for (HttpUrlCfg httpUrlCfg : entity.getHttpUrlList()) { for (HttpUrlCfg httpUrlCfg : entity.getHttpUrlList()) {
CfgIndexInfo cfg = new CfgIndexInfo(); CfgIndexInfo cfg = new CfgIndexInfo();
List httpList = new ArrayList<>(); List httpList = new ArrayList<>();
@@ -206,11 +212,14 @@ public class WhiteListController extends CommonController{
model.addAttribute("_cfg", entity); model.addAttribute("_cfg", entity);
return "/cfg/whitelist/domainForm"; return "/cfg/whitelist/domainForm";
} }
@RequestMapping(value = { "domain/save" }) @RequestMapping(value = { "domain/save" })
public String saveOrUpdateDomain(RedirectAttributes model,HttpServletRequest request,HttpServletResponse response,String ids,CfgIndexInfo entity) { public String saveOrUpdateDomain(RedirectAttributes model, HttpServletRequest request, HttpServletResponse response,
String ids, CfgIndexInfo entity) {
domainService.saveDomainCfg(entity); domainService.saveDomainCfg(entity);
return "redirect:" + adminPath + "/ntc/whitelist/domain/list?functionId=" + entity.getFunctionId(); return "redirect:" + adminPath + "/ntc/whitelist/domain/list?functionId=" + entity.getFunctionId();
} }
@RequestMapping(value = { "domain/ajaxSubList" }) @RequestMapping(value = { "domain/ajaxSubList" })
public String ajaxDomainSubList(Model model, Long cfgId, Integer index, Integer compileId) { public String ajaxDomainSubList(Model model, Long cfgId, Integer index, Integer compileId) {
CfgIndexInfo cfg = domainService.getDomainCfg(cfgId, compileId); CfgIndexInfo cfg = domainService.getDomainCfg(cfgId, compileId);
@@ -238,12 +247,14 @@ public class WhiteListController extends CommonController{
model.addAttribute("tabList", tabList); model.addAttribute("tabList", tabList);
return "/cfg/whitelist/domianSubList"; return "/cfg/whitelist/domianSubList";
} }
@RequestMapping(value = { "domain/updateValid" }) @RequestMapping(value = { "domain/updateValid" })
@RequiresPermissions(value = { "whitelist:domain:config" }) @RequiresPermissions(value = { "whitelist:domain:config" })
public String updateDomainValid(Integer isValid, String ids, Integer functionId) { public String updateDomainValid(Integer isValid, String ids, Integer functionId) {
domainService.updateDomainCfgValid(isValid, ids, functionId); domainService.updateDomainCfgValid(isValid, ids, functionId);
return "redirect:" + adminPath + "/ntc/whitelist/domain/list?functionId=" + functionId; return "redirect:" + adminPath + "/ntc/whitelist/domain/list?functionId=" + functionId;
} }
@RequestMapping(value = { "domain/delete" }) @RequestMapping(value = { "domain/delete" })
@RequiresPermissions("whitelist:domain:config") @RequiresPermissions("whitelist:domain:config")
public String deleteDomain(String ids, Integer functionId, RedirectAttributes model) { public String deleteDomain(String ids, Integer functionId, RedirectAttributes model) {
@@ -259,13 +270,8 @@ public class WhiteListController extends CommonController{
@RequestMapping(value = { "domain/audit" }) @RequestMapping(value = { "domain/audit" })
@RequiresPermissions("whitelist:domain:confirm") @RequiresPermissions("whitelist:domain:confirm")
public String auditDomain(Model model,@ModelAttribute("cfg")CfgIndexInfo cfg, public String auditDomain(Model model, @ModelAttribute("cfg") CfgIndexInfo cfg, Integer isValid, Integer isAudit,
Integer isValid, String ids, Integer functionId, RedirectAttributes redirectAttributes, HttpServletResponse response,
Integer isAudit,
String ids,
Integer functionId,
RedirectAttributes redirectAttributes,
HttpServletResponse response,
HttpServletRequest request) { HttpServletRequest request) {
if (!StringUtil.isEmpty(ids)) { if (!StringUtil.isEmpty(ids)) {
CfgIndexInfo entity = new CfgIndexInfo(); CfgIndexInfo entity = new CfgIndexInfo();
@@ -312,19 +318,25 @@ public class WhiteListController extends CommonController{
} }
return "redirect:" + adminPath + "/ntc/whitelist/domain/list?functionId=" + functionId; return "redirect:" + adminPath + "/ntc/whitelist/domain/list?functionId=" + functionId;
} }
// ip配置导入 // ip配置导入
/*@RequestMapping(value = "ip/import", method=RequestMethod.POST) /*
public String importIp(String cfgName,RedirectAttributes redirectAttributes, * @RequestMapping(value = "ip/import", method=RequestMethod.POST) public
@RequestParam("file") MultipartFile file,IpPortCfg cfg) { * String importIp(String cfgName,RedirectAttributes redirectAttributes,
this._importIp(cfgName,redirectAttributes, file,cfg,WhiteListIpTemplate.class); *
return "redirect:" + adminPath +"/ntc/whitelist/ip/list?functionId="+cfg.getFunctionId(); * @RequestParam("file") MultipartFile file,IpPortCfg cfg) {
}*/ * this._importIp(cfgName,redirectAttributes,
* file,cfg,WhiteListIpTemplate.class); return "redirect:" + adminPath
* +"/ntc/whitelist/ip/list?functionId="+cfg.getFunctionId(); }
*/
// ip模板下载 // ip模板下载
@RequestMapping(value = "ip/import/template") @RequestMapping(value = "ip/import/template")
public void importFileTemplate(HttpServletRequest request, HttpServletResponse response, public void importFileTemplate(HttpServletRequest request, HttpServletResponse response,
RedirectAttributes redirectAttributes, Integer functionId, Integer cfgRegionCode) { RedirectAttributes redirectAttributes, Integer functionId, Integer cfgRegionCode) {
this._importFileTemplate(request, response, redirectAttributes, functionId, cfgRegionCode,WhiteListIpTemplate.class); this._importFileTemplate(request, response, redirectAttributes, functionId, cfgRegionCode,
WhiteListIpTemplate.class);
} }
// ip配置导出 // ip配置导出
@RequestMapping(value = "ip/export") @RequestMapping(value = "ip/export")
public void exportIp(String columns, Model model, HttpServletRequest request, HttpServletResponse response, public void exportIp(String columns, Model model, HttpServletRequest request, HttpServletResponse response,
@@ -364,6 +376,21 @@ public class WhiteListController extends CommonController{
+ ",config_time,editor,edit_time,auditor,audit_time" + ",config_time,editor,edit_time,auditor,audit_time"
+ ",letter,whether_area_block,classification,attribute,label" + ",letter,whether_area_block,classification,attribute,label"
+ ",userregion1,userregion2,userregion3,userregion4,userregion5,ir_type,group_name,"; + ",userregion1,userregion2,userregion3,userregion4,userregion5,ir_type,group_name,";
// 时间过滤
if (entity.getSearch_create_time_start() == null && entity.getSearch_create_time_end() == null) {
cfgIndexInfoNoExport = ",config_time" + cfgIndexInfoNoExport;
}
if (entity.getSearch_edit_time_start() == null && entity.getSearch_edit_time_end() == null) {
cfgIndexInfoNoExport = ",edit_time" + cfgIndexInfoNoExport;
}
if (entity.getSearch_audit_time_start() == null && entity.getSearch_audit_time_end() == null) {
cfgIndexInfoNoExport = ",audit_time" + cfgIndexInfoNoExport;
}
if (!StringUtil.isEmpty(entity.gethColumns())) {
cfgIndexInfoNoExport = "," + entity.gethColumns() + "," + cfgIndexInfoNoExport;
}
noExportMap.put(entity.getMenuNameCode(), cfgIndexInfoNoExport); noExportMap.put(entity.getMenuNameCode(), cfgIndexInfoNoExport);
noExportMap.put("NTC_IP", ipPortInfoNoExport); noExportMap.put("NTC_IP", ipPortInfoNoExport);
List<IpPortCfg> ipList = new ArrayList<IpPortCfg>(); List<IpPortCfg> ipList = new ArrayList<IpPortCfg>();
@@ -374,13 +401,24 @@ public class WhiteListController extends CommonController{
dataMap.put(entity.getMenuNameCode(), ipLists); dataMap.put(entity.getMenuNameCode(), ipLists);
dataMap.put("NTC_IP", ipList); dataMap.put("NTC_IP", ipList);
/* } */ /* } */
this._export(model, request, response, redirectAttributes,entity.getMenuNameCode(),titleList,classMap,dataMap,noExportMap);
String timeRange = initTimeMap(entity);
noExportMap.put("timeRange", timeRange);
if ("csv".equals(entity.getExType())) {
this._exportCsv(model, request, response, redirectAttributes, entity.getMenuNameCode(), titleList,
classMap, dataMap, noExportMap);
} else {
this._export(model, request, response, redirectAttributes, entity.getMenuNameCode(), titleList,
classMap, dataMap, noExportMap);
}
} catch (Exception e) { } catch (Exception e) {
logger.error("ip white export failed", e); logger.error("ip white export failed", e);
addMessage(redirectAttributes, "error", "export_failed"); addMessage(redirectAttributes, "error", "export_failed");
} }
//return "redirect:" + adminPath +"/ntc/iplist/list?functionId="+entity.getFunctionId(); // return "redirect:" + adminPath
// +"/ntc/iplist/list?functionId="+entity.getFunctionId();
} }
// ip配置导出 // ip配置导出
@RequestMapping(value = "exportdomain") @RequestMapping(value = "exportdomain")
public void exportdomain(Model model, HttpServletRequest request, HttpServletResponse response, public void exportdomain(Model model, HttpServletRequest request, HttpServletResponse response,
@@ -414,6 +452,21 @@ public class WhiteListController extends CommonController{
+ ",config_time,editor,edit_time,auditor,audit_time" + ",config_time,editor,edit_time,auditor,audit_time"
+ ",letter,whether_area_block,classification,attribute,label" + ",letter,whether_area_block,classification,attribute,label"
+ ",userregion1,userregion2,userregion3,userregion4,userregion5,"; + ",userregion1,userregion2,userregion3,userregion4,userregion5,";
// 时间过滤
if (entity.getSearch_create_time_start() == null && entity.getSearch_create_time_end() == null) {
cfgIndexInfoNoExport = ",config_time" + cfgIndexInfoNoExport;
}
if (entity.getSearch_edit_time_start() == null && entity.getSearch_edit_time_end() == null) {
cfgIndexInfoNoExport = ",edit_time" + cfgIndexInfoNoExport;
}
if (entity.getSearch_audit_time_start() == null && entity.getSearch_audit_time_end() == null) {
cfgIndexInfoNoExport = ",audit_time" + cfgIndexInfoNoExport;
}
if (!StringUtil.isEmpty(entity.gethColumns())) {
cfgIndexInfoNoExport = "," + entity.gethColumns() + "," + cfgIndexInfoNoExport;
}
noExportMap.put(entity.getMenuNameCode(), cfgIndexInfoNoExport); noExportMap.put(entity.getMenuNameCode(), cfgIndexInfoNoExport);
noExportMap.put("NTC_HTTP_URL", httpUrlInfoNoExport); noExportMap.put("NTC_HTTP_URL", httpUrlInfoNoExport);
List<BaseStringCfg> httpurlList = new ArrayList<BaseStringCfg>(); List<BaseStringCfg> httpurlList = new ArrayList<BaseStringCfg>();
@@ -425,12 +478,22 @@ public class WhiteListController extends CommonController{
dataMap.put(entity.getMenuNameCode(), ipLists); dataMap.put(entity.getMenuNameCode(), ipLists);
dataMap.put("NTC_HTTP_URL", httpurlList); dataMap.put("NTC_HTTP_URL", httpurlList);
/* } */ /* } */
this._export(model, request, response, redirectAttributes,entity.getMenuNameCode(),titleList,classMap,dataMap,noExportMap);
String timeRange = initTimeMap(entity);
noExportMap.put("timeRange", timeRange);
if ("csv".equals(entity.getExType())) {
this._exportCsv(model, request, response, redirectAttributes, entity.getMenuNameCode(), titleList,
classMap, dataMap, noExportMap);
} else {
this._export(model, request, response, redirectAttributes, entity.getMenuNameCode(), titleList,
classMap, dataMap, noExportMap);
}
} catch (Exception e) { } catch (Exception e) {
logger.error("ip white export failed", e); logger.error("ip white export failed", e);
addMessage(redirectAttributes, "error", "export_failed"); addMessage(redirectAttributes, "error", "export_failed");
} }
//return "redirect:" + adminPath +"/ntc/iplist/list?functionId="+entity.getFunctionId(); // return "redirect:" + adminPath
// +"/ntc/iplist/list?functionId="+entity.getFunctionId();
} }
} }

View File

@@ -44,32 +44,34 @@ import jersey.repackaged.com.google.common.collect.Lists;
/** /**
* http重定向策略 * http重定向策略
*
* @author zhangwei * @author zhangwei
* *
*/ */
@Controller @Controller
@RequestMapping("${adminPath}/proxy/control/httpRedirect") @RequestMapping("${adminPath}/proxy/control/httpRedirect")
public class HttpRedirectPolicyController extends BaseController { public class HttpRedirectPolicyController extends BaseController {
@RequestMapping(value = {"httpRedirectList","httpBlockList","httpReplaceList","httpMonitList","httpWhitelistList"}) @RequestMapping(value = { "httpRedirectList", "httpBlockList", "httpReplaceList", "httpMonitList",
public String list(Model model,HttpServletRequest request,HttpServletResponse response,@ModelAttribute("cfg")CfgIndexInfo cfg){ "httpWhitelistList" })
public String list(Model model, HttpServletRequest request, HttpServletResponse response,
@ModelAttribute("cfg") CfgIndexInfo cfg) {
Page<CfgIndexInfo> searchPage = new Page<CfgIndexInfo>(request, response, "a"); Page<CfgIndexInfo> searchPage = new Page<CfgIndexInfo>(request, response, "a");
Page<CfgIndexInfo> page = httpRedirectCfgService.getHttpRedirectList(searchPage, cfg); Page<CfgIndexInfo> page = httpRedirectCfgService.getHttpRedirectList(searchPage, cfg);
model.addAttribute("page", page); model.addAttribute("page", page);
initPageCondition(model, cfg); initPageCondition(model, cfg);
// 获取所有的响应文件内容,阻断,或重定向时可以选择 // 获取所有的响应文件内容,阻断,或重定向时可以选择
List<ProxyFileStrategyCfg> allProxyFileStrategys = proxyFileStrategyService.getProxyFileStrategyCfgList(new ProxyFileStrategyCfg()); List<ProxyFileStrategyCfg> allProxyFileStrategys = proxyFileStrategyService
.getProxyFileStrategyCfgList(new ProxyFileStrategyCfg());
model.addAttribute("allProxyFileStrategys", allProxyFileStrategys); model.addAttribute("allProxyFileStrategys", allProxyFileStrategys);
return "/cfg/proxy/control/httpRedirectList"; return "/cfg/proxy/control/httpRedirectList";
} }
@RequestMapping(value = { "form" }) @RequestMapping(value = { "form" })
@RequiresPermissions(value={"control:httpBlock:config" @RequiresPermissions(value = { "control:httpBlock:config", "control:httpRedirect:config",
,"control:httpRedirect:config" "control:httpReplace:config", "control:httpMinit:config",
,"control:httpReplace:config" "control:httpWhitelist:config" }, logical = Logical.OR)
,"control:httpMinit:config" public String form(Model model, HttpServletRequest request, HttpServletResponse response, String ids,
,"control:httpWhitelist:config" @ModelAttribute("cfg") CfgIndexInfo entity) {
}
,logical=Logical.OR)
public String form(Model model,HttpServletRequest request,HttpServletResponse response,String ids,@ModelAttribute("cfg")CfgIndexInfo entity){
if (StringUtils.isNotBlank(ids)) { if (StringUtils.isNotBlank(ids)) {
entity = httpRedirectCfgService.getHttpCfg(Long.parseLong(ids), null); entity = httpRedirectCfgService.getHttpCfg(Long.parseLong(ids), null);
@@ -169,19 +171,17 @@ public class HttpRedirectPolicyController extends BaseController{
initFormCondition(model, entity); initFormCondition(model, entity);
} }
// 获取所有的响应文件内容,阻断,或重定向时可以选择 // 获取所有的响应文件内容,阻断,或重定向时可以选择
List<ProxyFileStrategyCfg> allProxyFileStrategys = proxyFileStrategyService.getProxyFileStrategyCfgList(new ProxyFileStrategyCfg()); List<ProxyFileStrategyCfg> allProxyFileStrategys = proxyFileStrategyService
.getProxyFileStrategyCfgList(new ProxyFileStrategyCfg());
model.addAttribute("_cfg", entity); model.addAttribute("_cfg", entity);
model.addAttribute("allProxyFileStrategys", allProxyFileStrategys); model.addAttribute("allProxyFileStrategys", allProxyFileStrategys);
return "/cfg/proxy/control/httpRedirectForm"; return "/cfg/proxy/control/httpRedirectForm";
} }
@RequestMapping(value = { "saveOrUpdate" }) @RequestMapping(value = { "saveOrUpdate" })
@RequiresPermissions(value={"control:httpBlock:config" @RequiresPermissions(value = { "control:httpBlock:config", "control:httpRedirect:config",
,"control:httpRedirect:config" "control:httpReplace:config", "control:httpMinit:config",
,"control:httpReplace:config" "control:httpWhitelist:config" }, logical = Logical.OR)
,"control:httpMinit:config"
,"control:httpWhitelist:config"}
,logical=Logical.OR)
public String saveOrUpdate(Model model, HttpServletRequest request, HttpServletResponse response, public String saveOrUpdate(Model model, HttpServletRequest request, HttpServletResponse response,
@ModelAttribute("cfg") CfgIndexInfo cfg, RedirectAttributes redirectAttributes) { @ModelAttribute("cfg") CfgIndexInfo cfg, RedirectAttributes redirectAttributes) {
try { try {
@@ -197,8 +197,10 @@ public class HttpRedirectPolicyController extends BaseController{
} }
} }
return "redirect:" + adminPath +"/proxy/control/httpRedirect/httpRedirectList?functionId="+cfg.getFunctionId(); return "redirect:" + adminPath + "/proxy/control/httpRedirect/httpRedirectList?functionId="
+ cfg.getFunctionId();
} }
@RequestMapping(value = { "ajaxHttpSubList" }) @RequestMapping(value = { "ajaxHttpSubList" })
public String ajaxHttpSubList(Model model, Long cfgId, Integer index, Integer compileId) { public String ajaxHttpSubList(Model model, Long cfgId, Integer index, Integer compileId) {
CfgIndexInfo cfg = httpRedirectCfgService.getHttpCfg(cfgId, compileId); CfgIndexInfo cfg = httpRedirectCfgService.getHttpCfg(cfgId, compileId);
@@ -206,31 +208,22 @@ public class HttpRedirectPolicyController extends BaseController{
model.addAttribute("index", index); model.addAttribute("index", index);
return "/cfg/proxy/control/httpRedirectSubList"; return "/cfg/proxy/control/httpRedirectSubList";
} }
@RequestMapping(value = { "delete" }) @RequestMapping(value = { "delete" })
@RequiresPermissions(value={"control:httpBlock:config" @RequiresPermissions(value = { "control:httpBlock:config", "control:httpRedirect:config",
,"control:httpRedirect:config" "control:httpReplace:config", "control:httpMinit:config",
,"control:httpReplace:config" "control:httpWhitelist:config" }, logical = Logical.OR)
,"control:httpMinit:config"
,"control:httpWhitelist:config"}
,logical=Logical.OR)
public String delete(Integer isAudit, Integer isValid, String ids, Integer functionId) { public String delete(Integer isAudit, Integer isValid, String ids, Integer functionId) {
httpRedirectCfgService.updateHttpCfgValid(isValid, ids, functionId); httpRedirectCfgService.updateHttpCfgValid(isValid, ids, functionId);
return "redirect:" + adminPath + "/proxy/control/httpRedirect/httpRedirectList?functionId=" + functionId; return "redirect:" + adminPath + "/proxy/control/httpRedirect/httpRedirectList?functionId=" + functionId;
} }
@RequestMapping(value = { "audit" }) @RequestMapping(value = { "audit" })
@RequiresPermissions(value={"control:httpBlock:confirm" @RequiresPermissions(value = { "control:httpBlock:confirm", "control:httpRedirect:confirm",
,"control:httpRedirect:confirm" "control:httpReplace:confirm", "control:httpMinit:confirm",
,"control:httpReplace:confirm" "control:httpWhitelist:confirm" }, logical = Logical.OR)
,"control:httpMinit:confirm" public String audit(Model model, @ModelAttribute("cfg") CfgIndexInfo cfg, Integer isValid, Integer isAudit,
,"control:httpWhitelist:confirm"} String ids, Integer functionId, RedirectAttributes redirectAttributes, HttpServletResponse response,
,logical=Logical.OR)
public String audit(Model model,@ModelAttribute("cfg")CfgIndexInfo cfg,
Integer isValid,
Integer isAudit,
String ids,
Integer functionId,
RedirectAttributes redirectAttributes,
HttpServletResponse response,
HttpServletRequest request) { HttpServletRequest request) {
if (!StringUtil.isEmpty(ids)) { if (!StringUtil.isEmpty(ids)) {
CfgIndexInfo entity = new CfgIndexInfo(); CfgIndexInfo entity = new CfgIndexInfo();
@@ -278,7 +271,6 @@ public class HttpRedirectPolicyController extends BaseController{
return "redirect:" + adminPath + "/proxy/control/httpRedirect/httpRedirectList?functionId=" + functionId; return "redirect:" + adminPath + "/proxy/control/httpRedirect/httpRedirectList?functionId=" + functionId;
} }
// http配置导出 // http配置导出
@RequestMapping(value = "exportHttp") @RequestMapping(value = "exportHttp")
public void exportHttp(Model model, HttpServletRequest request, HttpServletResponse response, public void exportHttp(Model model, HttpServletRequest request, HttpServletResponse response,
@@ -322,7 +314,8 @@ public class HttpRedirectPolicyController extends BaseController{
if (!StringUtil.isEmpty(str.getUserRegion3())) { if (!StringUtil.isEmpty(str.getUserRegion3())) {
ProxyFileStrategyCfg file = new ProxyFileStrategyCfg(); ProxyFileStrategyCfg file = new ProxyFileStrategyCfg();
file.setCompileId(Integer.valueOf(str.getUserRegion3())); file.setCompileId(Integer.valueOf(str.getUserRegion3()));
List<ProxyFileStrategyCfg> allProxyFileStrategys = proxyFileStrategyService.getProxyFileStrategyCfgList(file); List<ProxyFileStrategyCfg> allProxyFileStrategys = proxyFileStrategyService
.getProxyFileStrategyCfgList(file);
if (allProxyFileStrategys != null && allProxyFileStrategys.size() > 0) { if (allProxyFileStrategys != null && allProxyFileStrategys.size() > 0) {
str.setUserRegion2(allProxyFileStrategys.get(0).getCfgDesc()); str.setUserRegion2(allProxyFileStrategys.get(0).getCfgDesc());
} }
@@ -369,6 +362,21 @@ public class HttpRedirectPolicyController extends BaseController{
+ ",config_time,editor,edit_time,auditor,audit_time" + ",config_time,editor,edit_time,auditor,audit_time"
+ ",letter,whether_area_block,classification,attribute,label" + ",letter,whether_area_block,classification,attribute,label"
+ ",userregion1,userregion2,userregion3,userregion4,userregion5,"; + ",userregion1,userregion2,userregion3,userregion4,userregion5,";
// 时间过滤
if (entity.getSearch_create_time_start() == null && entity.getSearch_create_time_end() == null) {
cfgIndexInfoNoExport = ",config_time" + cfgIndexInfoNoExport;
}
if (entity.getSearch_edit_time_start() == null && entity.getSearch_edit_time_end() == null) {
cfgIndexInfoNoExport = ",edit_time" + cfgIndexInfoNoExport;
}
if (entity.getSearch_audit_time_start() == null && entity.getSearch_audit_time_end() == null) {
cfgIndexInfoNoExport = ",audit_time" + cfgIndexInfoNoExport;
}
if (!StringUtil.isEmpty(entity.gethColumns())) {
cfgIndexInfoNoExport = "," + entity.gethColumns() + "," + cfgIndexInfoNoExport;
}
List<BaseStringCfg> httpUrlList = new ArrayList<>(); List<BaseStringCfg> httpUrlList = new ArrayList<>();
List<ComplexkeywordCfg> httpReqHdrList = new ArrayList<>(); List<ComplexkeywordCfg> httpReqHdrList = new ArrayList<>();
List<ComplexkeywordCfg> httpResHdrList = new ArrayList<>(); List<ComplexkeywordCfg> httpResHdrList = new ArrayList<>();
@@ -429,11 +437,23 @@ public class HttpRedirectPolicyController extends BaseController{
dataMap.put("NTC_SUBSCRIBE_ID", subscribeIdList); dataMap.put("NTC_SUBSCRIBE_ID", subscribeIdList);
/* } */ /* } */
this._export(model, request, response, redirectAttributes,entity.getMenuNameCode(),titleList,classMap,dataMap,noExportMap);
String timeRange = initTimeMap(entity);
noExportMap.put("timeRange", timeRange);
if ("csv".equals(entity.getExType())) {
this._exportCsv(model, request, response, redirectAttributes, entity.getMenuNameCode(), titleList,
classMap, dataMap, noExportMap);
} else {
this._export(model, request, response, redirectAttributes, entity.getMenuNameCode(), titleList,
classMap, dataMap, noExportMap);
}
} catch (Exception e) { } catch (Exception e) {
logger.error("http export failed", e); logger.error("http export failed", e);
addMessage(redirectAttributes, "error", "export_failed"); addMessage(redirectAttributes, "error", "export_failed");
} }
/*return "redirect:" + adminPath +"/ntc/website/httpList?functionId="+entity.getFunctionId();*/ /*
* return "redirect:" + adminPath
* +"/ntc/website/httpList?functionId="+entity.getFunctionId();
*/
} }
} }

View File

@@ -18,7 +18,6 @@ import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.mvc.support.RedirectAttributes; import org.springframework.web.servlet.mvc.support.RedirectAttributes;
import com.nis.domain.Page; import com.nis.domain.Page;
import com.nis.domain.basics.PolicyGroupInfo; import com.nis.domain.basics.PolicyGroupInfo;
import com.nis.domain.configuration.BaseStringCfg; import com.nis.domain.configuration.BaseStringCfg;
@@ -36,6 +35,7 @@ import com.nis.web.security.UserUtils;
/** /**
* IP相关配置控制类 * IP相关配置控制类
*
* @author dell * @author dell
* *
*/ */
@@ -44,7 +44,8 @@ import com.nis.web.security.UserUtils;
public class InterceptController extends CommonController { public class InterceptController extends CommonController {
@RequestMapping(value = { "/ip/list", "/domain/list", "/ippayload/list" }) @RequestMapping(value = { "/ip/list", "/domain/list", "/ippayload/list" })
public String ipList(Model model,@ModelAttribute("cfg")CfgIndexInfo cfg,HttpServletRequest request,HttpServletResponse response) { public String ipList(Model model, @ModelAttribute("cfg") CfgIndexInfo cfg, HttpServletRequest request,
HttpServletResponse response) {
Page<CfgIndexInfo> searchPage = new Page<CfgIndexInfo>(request, response, "a"); Page<CfgIndexInfo> searchPage = new Page<CfgIndexInfo>(request, response, "a");
Page<CfgIndexInfo> page = websiteCfgService.getWebsiteList(searchPage, cfg); Page<CfgIndexInfo> page = websiteCfgService.getWebsiteList(searchPage, cfg);
model.addAttribute("page", page); model.addAttribute("page", page);
@@ -64,6 +65,7 @@ public class InterceptController extends CommonController{
model.addAttribute("policyGroups", policyGroups); model.addAttribute("policyGroups", policyGroups);
return "/cfg/intercept/interceptList"; return "/cfg/intercept/interceptList";
} }
@RequestMapping(value = { "/interceptIpForm", "interceptDomainForm", "interceptIpPayloadForm" }) @RequestMapping(value = { "/interceptIpForm", "interceptDomainForm", "interceptIpPayloadForm" })
public String interceptIpForm(Model model, String ids, CfgIndexInfo entity) { public String interceptIpForm(Model model, String ids, CfgIndexInfo entity) {
if (StringUtils.isNotBlank(ids)) { if (StringUtils.isNotBlank(ids)) {
@@ -89,8 +91,10 @@ public class InterceptController extends CommonController{
return "/cfg/intercept/interceptForm"; return "/cfg/intercept/interceptForm";
} }
@RequestMapping(value = { "/ip/saveOrUpdate", "/domain/saveOrUpdate", "/ippayload/SaveOrUpdate" }) @RequestMapping(value = { "/ip/saveOrUpdate", "/domain/saveOrUpdate", "/ippayload/SaveOrUpdate" })
public String saveInterceptIpCfg(RedirectAttributes redirectAttributes,Model model,HttpServletRequest request,HttpServletResponse response,String ids,CfgIndexInfo entity) { public String saveInterceptIpCfg(RedirectAttributes redirectAttributes, Model model, HttpServletRequest request,
HttpServletResponse response, String ids, CfgIndexInfo entity) {
try { try {
interceptCfgService.saveInterceptCfg(entity); interceptCfgService.saveInterceptCfg(entity);
addMessage(redirectAttributes, "success", "save_success"); addMessage(redirectAttributes, "success", "save_success");
@@ -105,7 +109,8 @@ public class InterceptController extends CommonController{
return "redirect:" + adminPath + "/proxy/intercept/ip/list?functionId=" + entity.getFunctionId(); return "redirect:" + adminPath + "/proxy/intercept/ip/list?functionId=" + entity.getFunctionId();
} }
@RequestMapping(value = {"/ajaxInterceptIpSubList","/ajaxInterceptDomainSubList","/ajaxInterceptIpPayloadSubList"}) @RequestMapping(value = { "/ajaxInterceptIpSubList", "/ajaxInterceptDomainSubList",
"/ajaxInterceptIpPayloadSubList" })
public String ajaxInterceptIpSubList(Model model, Long cfgId, Integer index, Integer compileId) { public String ajaxInterceptIpSubList(Model model, Long cfgId, Integer index, Integer compileId) {
CfgIndexInfo cfg = interceptCfgService.getInterceptCfg(cfgId, compileId); CfgIndexInfo cfg = interceptCfgService.getInterceptCfg(cfgId, compileId);
List<String[]> tabList = new ArrayList(); List<String[]> tabList = new ArrayList();
@@ -143,14 +148,9 @@ public class InterceptController extends CommonController{
} }
@RequestMapping(value = { "auditInterceptIpCfg", "auditInterceptDomainCfg", "auditInterceptIpPayloadCfg" }) @RequestMapping(value = { "auditInterceptIpCfg", "auditInterceptDomainCfg", "auditInterceptIpPayloadCfg" })
public String auditInterceptIpCfg(Model model,@ModelAttribute("cfg")CfgIndexInfo cfg, public String auditInterceptIpCfg(Model model, @ModelAttribute("cfg") CfgIndexInfo cfg, Integer isValid,
Integer isValid, Integer isAudit, String ids, Integer functionId, RedirectAttributes redirectAttributes,
Integer isAudit, HttpServletResponse response, HttpServletRequest request) {
String ids,
Integer functionId,
RedirectAttributes redirectAttributes,
HttpServletResponse response,
HttpServletRequest request) {
if (!StringUtil.isEmpty(ids)) { if (!StringUtil.isEmpty(ids)) {
CfgIndexInfo entity = new CfgIndexInfo(); CfgIndexInfo entity = new CfgIndexInfo();
String[] idArray = ids.split(","); String[] idArray = ids.split(",");
@@ -196,7 +196,8 @@ public class InterceptController extends CommonController{
} }
@RequestMapping(value = { "updateInterceptIpValid", "updateInterceptDomainValid", "updateInterceptIpPayloadValid" }) @RequestMapping(value = { "updateInterceptIpValid", "updateInterceptDomainValid", "updateInterceptIpPayloadValid" })
public String updateInterceptIpValid(Integer isValid,String ids,Integer functionId, RedirectAttributes redirectAttributes) { public String updateInterceptIpValid(Integer isValid, String ids, Integer functionId,
RedirectAttributes redirectAttributes) {
try { try {
interceptCfgService.updatInterceptValid(isValid, ids, functionId); interceptCfgService.updatInterceptValid(isValid, ids, functionId);
addMessage(redirectAttributes, "success", "delete_success"); addMessage(redirectAttributes, "success", "delete_success");
@@ -208,26 +209,34 @@ public class InterceptController extends CommonController{
} }
/* /*
//ip配置导入 * //ip配置导入
@RequestMapping(value = "/ip/import", method=RequestMethod.POST) *
public String importIp(String cfgName,RedirectAttributes redirectAttributes, * @RequestMapping(value = "/ip/import", method=RequestMethod.POST) public
@RequestParam("file") MultipartFile file,IpPortCfg cfg) { * String importIp(String cfgName,RedirectAttributes redirectAttributes,
this._importIp(cfgName,redirectAttributes, file,cfg,IpAddrTemplate.class); *
redirectAttributes.addAttribute("urlPrefix","/proxy/intercept/ip"); * @RequestParam("file") MultipartFile file,IpPortCfg cfg) {
redirectAttributes.addAttribute("requiresPermissionPrefix","intercept:ip"); * this._importIp(cfgName,redirectAttributes,
return "redirect:" + adminPath +"/proxy/intercept/ip/list?functionId="+cfg.getFunctionId(); * file,cfg,IpAddrTemplate.class);
} * redirectAttributes.addAttribute("urlPrefix","/proxy/intercept/ip");
@RequestMapping(value = "/ip/import/template") * redirectAttributes.addAttribute("requiresPermissionPrefix","intercept:ip"
public void importFileTemplate(HttpServletRequest request,HttpServletResponse response, * ); return "redirect:" + adminPath
RedirectAttributes redirectAttributes,Integer functionId,Integer cfgRegionCode) { * +"/proxy/intercept/ip/list?functionId="+cfg.getFunctionId(); }
this._importFileTemplate(request, response, redirectAttributes, functionId, cfgRegionCode,IpAddrTemplate.class); *
} * @RequestMapping(value = "/ip/import/template") public void
//ip配置导出 * importFileTemplate(HttpServletRequest request,HttpServletResponse
@RequestMapping(value = "/ip/export") * response, RedirectAttributes redirectAttributes,Integer
public void exportIp(String columns,Model model,HttpServletRequest request,HttpServletResponse response, * functionId,Integer cfgRegionCode) { this._importFileTemplate(request,
@ModelAttribute("cfg")IpPortCfg entity,String ids,RedirectAttributes redirectAttributes){ * response, redirectAttributes, functionId,
this._exportIp(columns,model, request, response, entity, ids, redirectAttributes); * cfgRegionCode,IpAddrTemplate.class); } //ip配置导出
}*/ *
* @RequestMapping(value = "/ip/export") public void exportIp(String
* columns,Model model,HttpServletRequest request,HttpServletResponse
* response,
*
* @ModelAttribute("cfg")IpPortCfg entity,String ids,RedirectAttributes
* redirectAttributes){ this._exportIp(columns,model, request, response,
* entity, ids, redirectAttributes); }
*/
// ip配置导出 // ip配置导出
@RequestMapping(value = "exportIpAddr") @RequestMapping(value = "exportIpAddr")
@@ -335,16 +344,38 @@ public class InterceptController extends CommonController{
classMap.put("NTC_HTTP_URL", HttpUrlCfg.class); classMap.put("NTC_HTTP_URL", HttpUrlCfg.class);
noExportMap.put("NTC_HTTP_URL", httpUrlCfgNoExport); noExportMap.put("NTC_HTTP_URL", httpUrlCfgNoExport);
dataMap.put("NTC_HTTP_URL", httpUrlList); dataMap.put("NTC_HTTP_URL", httpUrlList);
}else if(entity.getFunctionId()==214){
cfgIndexInfoNoExport=",policy_name,group_name,userregion3,userregion4,userregion5,&userregion2:With-userregion1:Spoofing-";
}
// 时间过滤
if (entity.getSearch_create_time_start() == null && entity.getSearch_create_time_end() == null) {
cfgIndexInfoNoExport = ",config_time" + cfgIndexInfoNoExport;
}
if (entity.getSearch_edit_time_start() == null && entity.getSearch_edit_time_end() == null) {
cfgIndexInfoNoExport = ",edit_time" + cfgIndexInfoNoExport;
}
if (entity.getSearch_audit_time_start() == null && entity.getSearch_audit_time_end() == null) {
cfgIndexInfoNoExport = ",audit_time" + cfgIndexInfoNoExport;
} }
noExportMap.put(entity.getMenuNameCode(), cfgIndexInfoNoExport); noExportMap.put(entity.getMenuNameCode(), cfgIndexInfoNoExport);
/* } */ /* } */
this._export(model, request, response, redirectAttributes,entity.getMenuNameCode(),titleList,classMap,dataMap,noExportMap);
String timeRange = initTimeMap(entity);
noExportMap.put("timeRange", timeRange);
if ("csv".equals(entity.getExType())) {
this._exportCsv(model, request, response, redirectAttributes, entity.getMenuNameCode(), titleList,
classMap, dataMap, noExportMap);
} else {
this._export(model, request, response, redirectAttributes, entity.getMenuNameCode(), titleList,
classMap, dataMap, noExportMap);
}
} catch (Exception e) { } catch (Exception e) {
logger.error("ip addr export failed", e); logger.error("ip addr export failed", e);
addMessage(redirectAttributes, "error", "export_failed"); addMessage(redirectAttributes, "error", "export_failed");
} }
//return "redirect:" + adminPath +"/ntc/iplist/list?functionId="+entity.getFunctionId(); // return "redirect:" + adminPath
// +"/ntc/iplist/list?functionId="+entity.getFunctionId();
} }
} }

View File

@@ -61,6 +61,7 @@ import com.nis.web.controller.BaseController;
/** /**
* 拦截策略 * 拦截策略
*
* @author ddm * @author ddm
* *
*/ */
@@ -72,12 +73,8 @@ public class PxyObjKeyringController extends BaseController {
@RequestMapping(value = { "/form" }) @RequestMapping(value = { "/form" })
@RequiresPermissions(value = { "proxy:intercept:config" }) @RequiresPermissions(value = { "proxy:intercept:config" })
public String from(Model model, public String from(Model model, HttpServletRequest request, HttpServletResponse response, String ids,
HttpServletRequest request, @ModelAttribute("cfg") PxyObjKeyring cfg, RedirectAttributes redirectAttributes) {
HttpServletResponse response,
String ids,
@ModelAttribute("cfg")PxyObjKeyring cfg
,RedirectAttributes redirectAttributes){
if (cfg == null) { if (cfg == null) {
cfg = new PxyObjKeyring(); cfg = new PxyObjKeyring();
} }
@@ -97,9 +94,7 @@ public class PxyObjKeyringController extends BaseController {
@RequestMapping(value = { "/saveOrUpdate" }) @RequestMapping(value = { "/saveOrUpdate" })
@RequiresPermissions(value = { "proxy:intercept:config" }) @RequiresPermissions(value = { "proxy:intercept:config" })
public String saveOrUpdate(Model model, HttpServletRequest request, HttpServletResponse response, public String saveOrUpdate(Model model, HttpServletRequest request, HttpServletResponse response,
@ModelAttribute("cfg")PxyObjKeyring cfg, @ModelAttribute("cfg") PxyObjKeyring cfg, MultipartFile privateKeyFileI, MultipartFile publicKeyFileI,
MultipartFile privateKeyFileI,
MultipartFile publicKeyFileI,
RedirectAttributes redirectAttributes) { RedirectAttributes redirectAttributes) {
File file = null; File file = null;
boolean validFlag = true; boolean validFlag = true;
@@ -109,10 +104,9 @@ public class PxyObjKeyringController extends BaseController {
boolean privateKeyFileflag = validCertFileContent(privateKeyFileI, "-inkey"); boolean privateKeyFileflag = validCertFileContent(privateKeyFileI, "-inkey");
if (!publicKeyFileflag && !privateKeyFileflag) { if (!publicKeyFileflag && !privateKeyFileflag) {
addMessage(redirectAttributes, "error", "save_failed"); addMessage(redirectAttributes, "error", "save_failed");
logger.error(publicKeyFileI.getOriginalFilename()+" and "+privateKeyFileI.getOriginalFilename()+" file non certificate file format "); logger.error(publicKeyFileI.getOriginalFilename() + " and " + privateKeyFileI.getOriginalFilename()
throw new MultiPartNewException( + " file non certificate file format ");
msgProp.getProperty("certificate_error") throw new MultiPartNewException(msgProp.getProperty("certificate_error"));
);
} else if (!publicKeyFileflag) { } else if (!publicKeyFileflag) {
addMessage(redirectAttributes, "error", "save_failed"); addMessage(redirectAttributes, "error", "save_failed");
logger.error(publicKeyFileI.getOriginalFilename() + " file non public key file format "); logger.error(publicKeyFileI.getOriginalFilename() + " file non public key file format ");
@@ -141,8 +135,10 @@ public class PxyObjKeyringController extends BaseController {
// 获取公钥信息 // 获取公钥信息
if (certInfoMap != null && certInfoMap.size() > 0) { if (certInfoMap != null && certInfoMap.size() > 0) {
String issuer=StringUtil.isEmpty(certInfoMap.get("ca issuer")) ? "":certInfoMap.get("ca issuer").toString();//颁发者 String issuer = StringUtil.isEmpty(certInfoMap.get("ca issuer")) ? ""
String subject=StringUtil.isEmpty(certInfoMap.get("ca subjectname")) ? "":certInfoMap.get("ca subjectname").toString();//颁发 : certInfoMap.get("ca issuer").toString();// 颁发
String subject = StringUtil.isEmpty(certInfoMap.get("ca subjectname")) ? ""
: certInfoMap.get("ca subjectname").toString();// 颁发给
String notBeforeStr = ""; String notBeforeStr = "";
if (!StringUtil.isEmpty(certInfoMap.get("ca notbefore"))) { if (!StringUtil.isEmpty(certInfoMap.get("ca notbefore"))) {
Date notBeforeTime = new Date(certInfoMap.get("ca notbefore").toString());// 开始时间 Date notBeforeTime = new Date(certInfoMap.get("ca notbefore").toString());// 开始时间
@@ -164,7 +160,8 @@ public class PxyObjKeyringController extends BaseController {
} }
} }
} }
String altName=StringUtil.isEmpty(certInfoMap.get("ca altname")) ? "":certInfoMap.get("ca altname").toString();//SAN String altName = StringUtil.isEmpty(certInfoMap.get("ca altname")) ? ""
: certInfoMap.get("ca altname").toString();// SAN
cfg.setIssuer(issuer); cfg.setIssuer(issuer);
cfg.setSubject(subject); cfg.setSubject(subject);
@@ -211,7 +208,8 @@ public class PxyObjKeyringController extends BaseController {
if (!StringUtil.isEmpty(result)) { if (!StringUtil.isEmpty(result)) {
ResponseData data = result.getData(); ResponseData data = result.getData();
publicKeyFileAccessUrl = data.getAccessUrl(); publicKeyFileAccessUrl = data.getAccessUrl();
cfg.setPublicKeyFile(publicKeyFileAccessUrl);; cfg.setPublicKeyFile(publicKeyFileAccessUrl);
;
} }
} }
if (privateKeyFileI != null) { if (privateKeyFileI != null) {
@@ -234,7 +232,8 @@ public class PxyObjKeyringController extends BaseController {
if (!StringUtil.isEmpty(result)) { if (!StringUtil.isEmpty(result)) {
ResponseData data = result.getData(); ResponseData data = result.getData();
privateKeyFileAccessUrl = data.getAccessUrl(); privateKeyFileAccessUrl = data.getAccessUrl();
cfg.setPrivateKeyFile(privateKeyFileAccessUrl);; cfg.setPrivateKeyFile(privateKeyFileAccessUrl);
;
} }
} }
pxyObjKeyringService.saveOrUpdate(cfg); pxyObjKeyringService.saveOrUpdate(cfg);
@@ -258,8 +257,10 @@ public class PxyObjKeyringController extends BaseController {
/** /**
* *
* @param file * @param file
* @param validateType --incert证书校验 --inkey 私钥 * @param validateType
* @param certType 证书类型 * --incert证书校验 --inkey 私钥
* @param certType
* 证书类型
* @return * @return
* @throws Exception * @throws Exception
*/ */
@@ -269,19 +270,13 @@ public class PxyObjKeyringController extends BaseController {
// 证书文件临时保存路径 // 证书文件临时保存路径
String certFilePath = Constants.CERT_FILE_PATH; String certFilePath = Constants.CERT_FILE_PATH;
FileUtils.createDirectory(certFilePath); FileUtils.createDirectory(certFilePath);
String filePath=certFilePath String filePath = certFilePath + File.separator + UUID.randomUUID()
+File.separator
+UUID.randomUUID()
+ FileUtils.getSuffix(file.getOriginalFilename(), true); + FileUtils.getSuffix(file.getOriginalFilename(), true);
File uploadFile = new File(filePath); File uploadFile = new File(filePath);
FileCopyUtils.copy(file.getBytes(), uploadFile); FileCopyUtils.copy(file.getBytes(), uploadFile);
// 加载x509脚本 // 加载x509脚本
String x509Shell=Thread.currentThread() String x509Shell = Thread.currentThread().getContextClassLoader()
.getContextClassLoader() .getResource(File.separator + "shell" + File.separator + Constants.CERT_VALIDATE_FILE).getPath();
.getResource(
File.separator+"shell"
+File.separator
+Constants.CERT_VALIDATE_FILE).getPath();
// x509脚本分配可执行权限 // x509脚本分配可执行权限
Map<String, Object> resultMap1 = this.execShell("", "chmod", "+x", x509Shell); Map<String, Object> resultMap1 = this.execShell("", "chmod", "+x", x509Shell);
logger.info("x509 chmod +x :" + resultMap1.get("out").toString()); logger.info("x509 chmod +x :" + resultMap1.get("out").toString());
@@ -296,15 +291,15 @@ public class PxyObjKeyringController extends BaseController {
FileUtils.deleteFile(filePath); FileUtils.deleteFile(filePath);
return false; return false;
} else { } else {
/*logger.info("x509 Out Info:"+resultMap.get("out").toString()); /*
Pattern p = Pattern.compile("\\s*|\t|\r|\n"); * logger.info("x509 Out Info:"+resultMap.get("out").toString())
Matcher m = p.matcher(resultMap.get("out").toString()); * ; Pattern p = Pattern.compile("\\s*|\t|\r|\n"); Matcher m =
logger.info(m.replaceAll("test"));*/ * p.matcher(resultMap.get("out").toString());
* logger.info(m.replaceAll("test"));
*/
} }
if(resultMap != null if (resultMap != null && !StringUtil.isEmpty(resultMap.get("out"))
&& !StringUtil.isEmpty(resultMap.get("out")) && (!(resultMap.get("out").toString().indexOf(Constants.CERT_VALIDATE_SUCCESS_INFO) > -1))) {
&& (!(resultMap.get("out").toString().indexOf(Constants.CERT_VALIDATE_SUCCESS_INFO) > -1))
){
logger.error("x509 Out Info:" + resultMap.get("out").toString()); logger.error("x509 Out Info:" + resultMap.get("out").toString());
// 临时文件删除 // 临时文件删除
logger.info("delete file" + filePath); logger.info("delete file" + filePath);
@@ -318,12 +313,13 @@ public class PxyObjKeyringController extends BaseController {
} }
return true; return true;
} }
@RequestMapping(value = { "/list" }) @RequestMapping(value = { "/list" })
public String list(Model model,HttpServletRequest request,HttpServletResponse response public String list(Model model, HttpServletRequest request, HttpServletResponse response,
,@ModelAttribute("cfg")PxyObjKeyring entity @ModelAttribute("cfg") PxyObjKeyring entity, RedirectAttributes redirectAttributes) {
,RedirectAttributes redirectAttributes){
// 查询时left join policyGroup // 查询时left join policyGroup
Page<PxyObjKeyring> page = pxyObjKeyringService.findPage(new Page<PxyObjKeyring>(request, response,"r"), entity); Page<PxyObjKeyring> page = pxyObjKeyringService.findPage(new Page<PxyObjKeyring>(request, response, "r"),
entity);
model.addAttribute("page", page); model.addAttribute("page", page);
initPageCondition(model, entity); initPageCondition(model, entity);
return "/cfg/intercept/strateagy/list"; return "/cfg/intercept/strateagy/list";
@@ -331,10 +327,8 @@ public class PxyObjKeyringController extends BaseController {
@RequestMapping(value = { "/delete" }) @RequestMapping(value = { "/delete" })
@RequiresPermissions(value = { "proxy:intercept:config" }) @RequiresPermissions(value = { "proxy:intercept:config" })
public String delete(Integer isAudit,Integer isValid,String ids,Integer functionId public String delete(Integer isAudit, Integer isValid, String ids, Integer functionId, Model model,
,Model model,HttpServletRequest request HttpServletRequest request, HttpServletResponse response, RedirectAttributes redirectAttributes) {
,HttpServletResponse response
,RedirectAttributes redirectAttributes){
if (!StringUtil.isEmpty(ids)) { if (!StringUtil.isEmpty(ids)) {
pxyObjKeyringService.delete(isAudit, isValid, ids, functionId); pxyObjKeyringService.delete(isAudit, isValid, ids, functionId);
} }
@@ -344,13 +338,8 @@ public class PxyObjKeyringController extends BaseController {
@RequestMapping(value = { "/audit" }) @RequestMapping(value = { "/audit" })
@RequiresPermissions(value = { "proxy:intercept:confirm" }) @RequiresPermissions(value = { "proxy:intercept:confirm" })
public String audit(Model model,@ModelAttribute("cfg")PxyObjKeyring cfg, public String audit(Model model, @ModelAttribute("cfg") PxyObjKeyring cfg, Integer isValid, Integer isAudit,
Integer isValid, String ids, Integer functionId, RedirectAttributes redirectAttributes, HttpServletResponse response,
Integer isAudit,
String ids,
Integer functionId,
RedirectAttributes redirectAttributes,
HttpServletResponse response,
HttpServletRequest request) { HttpServletRequest request) {
if (!StringUtil.isEmpty(ids)) { if (!StringUtil.isEmpty(ids)) {
String[] idArray = ids.split(","); String[] idArray = ids.split(",");
@@ -390,6 +379,7 @@ public class PxyObjKeyringController extends BaseController {
} }
return "redirect:" + adminPath + "/proxy/intercept/strateagy/list?functionId=" + functionId; return "redirect:" + adminPath + "/proxy/intercept/strateagy/list?functionId=" + functionId;
} }
@ResponseBody @ResponseBody
@RequestMapping(value = "/validCfgId") @RequestMapping(value = "/validCfgId")
public boolean validCfgId(Long cfgId) { public boolean validCfgId(Long cfgId) {
@@ -401,7 +391,6 @@ public class PxyObjKeyringController extends BaseController {
} }
} }
// pxyObjKeyring配置导出 // pxyObjKeyring配置导出
@RequestMapping(value = "exportPxy") @RequestMapping(value = "exportPxy")
public void exportPxy(Model model, HttpServletRequest request, HttpServletResponse response, public void exportPxy(Model model, HttpServletRequest request, HttpServletResponse response,
@@ -432,15 +421,40 @@ public class PxyObjKeyringController extends BaseController {
titleList.add(entity.getMenuNameCode()); titleList.add(entity.getMenuNameCode());
classMap.put(entity.getMenuNameCode(), PxyObjKeyring.class); 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,"; String cfgIndexInfoNoExport = ",config_describe,whether_area_block,block_type,valid_identifier,do_log,client_port,ir_type,group_name,userregion1,userregion2,userregion3,userregion4,userregion5,";
// 时间过滤
if (entity.getSearch_create_time_start() == null && entity.getSearch_create_time_end() == null) {
cfgIndexInfoNoExport = ",config_time" + cfgIndexInfoNoExport;
}
if (entity.getSearch_edit_time_start() == null && entity.getSearch_edit_time_end() == null) {
cfgIndexInfoNoExport = ",edit_time" + cfgIndexInfoNoExport;
}
if (entity.getSearch_audit_time_start() == null && entity.getSearch_audit_time_end() == null) {
cfgIndexInfoNoExport = ",audit_time" + cfgIndexInfoNoExport;
}
if (!StringUtil.isEmpty(entity.gethColumns())) {
cfgIndexInfoNoExport = "," + entity.gethColumns() + "," + cfgIndexInfoNoExport;
}
noExportMap.put(entity.getMenuNameCode(), cfgIndexInfoNoExport); noExportMap.put(entity.getMenuNameCode(), cfgIndexInfoNoExport);
dataMap.put(entity.getMenuNameCode(), ipLists); dataMap.put(entity.getMenuNameCode(), ipLists);
/* } */ /* } */
this._export(model, request, response, redirectAttributes,entity.getMenuNameCode(),titleList,classMap,dataMap,noExportMap);
String timeRange = initTimeMap(entity);
noExportMap.put("timeRange", timeRange);
if ("csv".equals(entity.getExType())) {
this._exportCsv(model, request, response, redirectAttributes, entity.getMenuNameCode(), titleList,
classMap, dataMap, noExportMap);
} else {
this._export(model, request, response, redirectAttributes, entity.getMenuNameCode(), titleList,
classMap, dataMap, noExportMap);
}
} catch (Exception e) { } catch (Exception e) {
logger.error("pxyObjKeyring export failed", e); logger.error("pxyObjKeyring export failed", e);
addMessage(redirectAttributes, "error", "export_failed"); addMessage(redirectAttributes, "error", "export_failed");
} }
//return "redirect:" + adminPath +"/ntc/iplist/list?functionId="+entity.getFunctionId(); // return "redirect:" + adminPath
// +"/ntc/iplist/list?functionId="+entity.getFunctionId();
} }
// pxyObjTrustedCert配置导出 // pxyObjTrustedCert配置导出
@@ -472,23 +486,47 @@ public class PxyObjKeyringController extends BaseController {
titleList.add(entity.getMenuNameCode()); titleList.add(entity.getMenuNameCode());
classMap.put(entity.getMenuNameCode(), PxyObjTrustedCaCert.class); 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-"; 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-";
// 时间过滤
if (entity.getSearch_create_time_start() == null && entity.getSearch_create_time_end() == null) {
cfgIndexInfoNoExport = ",config_time" + cfgIndexInfoNoExport;
}
if (entity.getSearch_edit_time_start() == null && entity.getSearch_edit_time_end() == null) {
cfgIndexInfoNoExport = ",edit_time" + cfgIndexInfoNoExport;
}
if (entity.getSearch_audit_time_start() == null && entity.getSearch_audit_time_end() == null) {
cfgIndexInfoNoExport = ",audit_time" + cfgIndexInfoNoExport;
}
if (!StringUtil.isEmpty(entity.gethColumns())) {
cfgIndexInfoNoExport = "," + entity.gethColumns() + "," + cfgIndexInfoNoExport;
}
noExportMap.put(entity.getMenuNameCode(), cfgIndexInfoNoExport); noExportMap.put(entity.getMenuNameCode(), cfgIndexInfoNoExport);
dataMap.put(entity.getMenuNameCode(), ipLists); dataMap.put(entity.getMenuNameCode(), ipLists);
/* } */ /* } */
this._export(model, request, response, redirectAttributes,entity.getMenuNameCode(),titleList,classMap,dataMap,noExportMap);
String timeRange = initTimeMap(entity);
noExportMap.put("timeRange", timeRange);
if ("csv".equals(entity.getExType())) {
this._exportCsv(model, request, response, redirectAttributes, entity.getMenuNameCode(), titleList,
classMap, dataMap, noExportMap);
} else {
this._export(model, request, response, redirectAttributes, entity.getMenuNameCode(), titleList,
classMap, dataMap, noExportMap);
}
} catch (Exception e) { } catch (Exception e) {
logger.error("pxyObjKeyring export failed", e); logger.error("pxyObjKeyring export failed", e);
addMessage(redirectAttributes, "error", "export_failed"); addMessage(redirectAttributes, "error", "export_failed");
} }
//return "redirect:" + adminPath +"/ntc/iplist/list?functionId="+entity.getFunctionId(); // return "redirect:" + adminPath
// +"/ntc/iplist/list?functionId="+entity.getFunctionId();
} }
@RequestMapping(value = { "/trustedCertList" }) @RequestMapping(value = { "/trustedCertList" })
public String trustedCertList(Model model,HttpServletRequest request,HttpServletResponse response public String trustedCertList(Model model, HttpServletRequest request, HttpServletResponse response,
,@ModelAttribute("cfg")PxyObjTrustedCaCert entity @ModelAttribute("cfg") PxyObjTrustedCaCert entity, RedirectAttributes redirectAttributes) {
,RedirectAttributes redirectAttributes){ Page<PxyObjTrustedCaCert> page = pxyObjKeyringService
Page<PxyObjTrustedCaCert> page = pxyObjKeyringService.findTrustedCertPage(new Page<PxyObjTrustedCaCert>(request, response,"r"), entity); .findTrustedCertPage(new Page<PxyObjTrustedCaCert>(request, response, "r"), entity);
model.addAttribute("page", page); model.addAttribute("page", page);
initPageCondition(model, entity); initPageCondition(model, entity);
return "/cfg/intercept/strateagy/trustedCertList"; return "/cfg/intercept/strateagy/trustedCertList";
@@ -496,12 +534,8 @@ public class PxyObjKeyringController extends BaseController {
@RequestMapping(value = { "/trustedCertForm" }) @RequestMapping(value = { "/trustedCertForm" })
@RequiresPermissions(value = { "proxy:trustedCert:config" }) @RequiresPermissions(value = { "proxy:trustedCert:config" })
public String trustedCertFrom(Model model, public String trustedCertFrom(Model model, HttpServletRequest request, HttpServletResponse response, String ids,
HttpServletRequest request, @ModelAttribute("cfg") PxyObjTrustedCaCert cfg, RedirectAttributes redirectAttributes) {
HttpServletResponse response,
String ids,
@ModelAttribute("cfg")PxyObjTrustedCaCert cfg
,RedirectAttributes redirectAttributes){
if (cfg == null) { if (cfg == null) {
cfg = new PxyObjTrustedCaCert(); cfg = new PxyObjTrustedCaCert();
} }
@@ -521,8 +555,7 @@ public class PxyObjKeyringController extends BaseController {
@RequestMapping(value = { "/trustedCertSaveOrUpdate" }) @RequestMapping(value = { "/trustedCertSaveOrUpdate" })
@RequiresPermissions(value = { "proxy:trustedCert:config" }) @RequiresPermissions(value = { "proxy:trustedCert:config" })
public String trustedCertSaveOrUpdate(Model model, HttpServletRequest request, HttpServletResponse response, public String trustedCertSaveOrUpdate(Model model, HttpServletRequest request, HttpServletResponse response,
@ModelAttribute("cfg")PxyObjTrustedCaCert cfg, @ModelAttribute("cfg") PxyObjTrustedCaCert cfg, MultipartFile certFileI,
MultipartFile certFileI,
RedirectAttributes redirectAttributes) { RedirectAttributes redirectAttributes) {
File file = null; File file = null;
boolean validFlag = true; boolean validFlag = true;
@@ -549,7 +582,8 @@ public class PxyObjKeyringController extends BaseController {
if (certFileI != null) { if (certFileI != null) {
// 获取公钥信息 // 获取公钥信息
if (certInfoMap != null && certInfoMap.size() > 0) { if (certInfoMap != null && certInfoMap.size() > 0) {
String issuer=StringUtil.isEmpty(certInfoMap.get("ca issuer")) ? "":certInfoMap.get("ca issuer").toString();//颁发者 String issuer = StringUtil.isEmpty(certInfoMap.get("ca issuer")) ? ""
: certInfoMap.get("ca issuer").toString();// 颁发者
logger.info("issuer" + issuer); logger.info("issuer" + issuer);
cfg.setIssuer(issuer); cfg.setIssuer(issuer);
} else { } else {
@@ -584,7 +618,8 @@ public class PxyObjKeyringController extends BaseController {
if (!StringUtil.isEmpty(result)) { if (!StringUtil.isEmpty(result)) {
ResponseData data = result.getData(); ResponseData data = result.getData();
certFileAccessUrl = data.getAccessUrl(); certFileAccessUrl = data.getAccessUrl();
cfg.setCertFile(certFileAccessUrl);; cfg.setCertFile(certFileAccessUrl);
;
} }
} }
pxyObjKeyringService.trustedCertsaveOrUpdate(cfg); pxyObjKeyringService.trustedCertsaveOrUpdate(cfg);
@@ -604,11 +639,14 @@ public class PxyObjKeyringController extends BaseController {
return "redirect:" + adminPath + "/proxy/intercept/strateagy/trustedCertList?functionId=" + cfg.getFunctionId(); return "redirect:" + adminPath + "/proxy/intercept/strateagy/trustedCertList?functionId=" + cfg.getFunctionId();
} }
@RequestMapping(value = { "/addOrAuditCrl" }) @RequestMapping(value = { "/addOrAuditCrl" })
/*@RequiresPermissions(value={"proxy:trustedCert:config","proxy:trustedCert:confirm"})*/ /*
* @RequiresPermissions(value={"proxy:trustedCert:config",
* "proxy:trustedCert:confirm"})
*/
public String trustedCrlSaveOrUpdate(Model model, HttpServletRequest request, HttpServletResponse response, public String trustedCrlSaveOrUpdate(Model model, HttpServletRequest request, HttpServletResponse response,
@ModelAttribute("cfg")PxyObjTrustedCaCrl cfg, @ModelAttribute("cfg") PxyObjTrustedCaCrl cfg, MultipartFile crlFileI,
MultipartFile crlFileI,
RedirectAttributes redirectAttributes) { RedirectAttributes redirectAttributes) {
File file = null; File file = null;
boolean validFlag = true; boolean validFlag = true;
@@ -639,7 +677,8 @@ public class PxyObjKeyringController extends BaseController {
if (crlFileI != null) { if (crlFileI != null) {
// 获取issuer // 获取issuer
if (certInfoMap != null && certInfoMap.size() > 0) { if (certInfoMap != null && certInfoMap.size() > 0) {
String issuer=StringUtil.isEmpty(certInfoMap.get("crl issuer")) ? "":certInfoMap.get("crl issuer").toString();//颁发者 String issuer = StringUtil.isEmpty(certInfoMap.get("crl issuer")) ? ""
: certInfoMap.get("crl issuer").toString();// 颁发者
if (cfg != null) { if (cfg != null) {
if ((cfg.getCertId() != null && cfg.getCertId() > 0) && (!cfg.getIssuer().equals(issuer))) { if ((cfg.getCertId() != null && cfg.getCertId() > 0) && (!cfg.getIssuer().equals(issuer))) {
logger.error("cert 和 crl的issuser不符合"); logger.error("cert 和 crl的issuser不符合");
@@ -715,8 +754,7 @@ public class PxyObjKeyringController extends BaseController {
* @param params * @param params
* @return * @return
*/ */
public Map<String, Object> execShell(String shellName, public Map<String, Object> execShell(String shellName, String... params) {
String... params) {
Map<String, Object> result = new HashMap<String, Object>(); Map<String, Object> result = new HashMap<String, Object>();
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append(shellName); sb.append(shellName);
@@ -741,16 +779,13 @@ public class PxyObjKeyringController extends BaseController {
try { try {
exec = Runtime.getRuntime().exec(cmdarray); exec = Runtime.getRuntime().exec(cmdarray);
exec.getInputStream(); exec.getInputStream();
br = new BufferedReader( br = new BufferedReader(new InputStreamReader(exec.getInputStream()));
new InputStreamReader(exec.getInputStream())); bre = new BufferedReader(new InputStreamReader(exec.getErrorStream()));
bre = new BufferedReader(new InputStreamReader(
exec.getErrorStream()));
String s = null; String s = null;
StringBuilder out = new StringBuilder(); StringBuilder out = new StringBuilder();
String key = ""; String key = "";
String value = ""; String value = "";
if((sb.toString().indexOf("inlist") > -1) if ((sb.toString().indexOf("inlist") > -1) || (sb.toString().indexOf("incrl") > -1)
|| ( sb.toString().indexOf("incrl") > -1 )
|| (sb.toString().indexOf("incert") > -1)) { || (sb.toString().indexOf("incert") > -1)) {
certInfoMap = new HashMap<>(); certInfoMap = new HashMap<>();
} }
@@ -821,13 +856,10 @@ public class PxyObjKeyringController extends BaseController {
return result; return result;
} }
@RequestMapping(value = { "/trustedCertDelete" }) @RequestMapping(value = { "/trustedCertDelete" })
@RequiresPermissions(value = { "proxy:trustedCert:config" }) @RequiresPermissions(value = { "proxy:trustedCert:config" })
public String trustedCertDelete(Integer isAudit,Integer isValid,String ids,Integer functionId public String trustedCertDelete(Integer isAudit, Integer isValid, String ids, Integer functionId, Model model,
,Model model,HttpServletRequest request HttpServletRequest request, HttpServletResponse response, RedirectAttributes redirectAttributes) {
,HttpServletResponse response
,RedirectAttributes redirectAttributes){
if (!StringUtil.isEmpty(ids)) { if (!StringUtil.isEmpty(ids)) {
pxyObjKeyringService.trustedCertDelete(isAudit, isValid, ids, functionId); pxyObjKeyringService.trustedCertDelete(isAudit, isValid, ids, functionId);
} }
@@ -837,14 +869,9 @@ public class PxyObjKeyringController extends BaseController {
@RequestMapping(value = { "/trustedCertAudit" }) @RequestMapping(value = { "/trustedCertAudit" })
@RequiresPermissions(value = { "proxy:trustedCert:confirm" }) @RequiresPermissions(value = { "proxy:trustedCert:confirm" })
public String trustedCertAudit(Model model,@ModelAttribute("cfg")PxyObjTrustedCaCert cfg, public String trustedCertAudit(Model model, @ModelAttribute("cfg") PxyObjTrustedCaCert cfg, Integer isValid,
Integer isValid, Integer isAudit, String ids, Integer functionId, RedirectAttributes redirectAttributes,
Integer isAudit, HttpServletResponse response, HttpServletRequest request) {
String ids,
Integer functionId,
RedirectAttributes redirectAttributes,
HttpServletResponse response,
HttpServletRequest request) {
if (!StringUtil.isEmpty(ids)) { if (!StringUtil.isEmpty(ids)) {
String[] idArray = ids.split(","); String[] idArray = ids.split(",");
Date auditTime = new Date(); Date auditTime = new Date();

View File

@@ -151,8 +151,20 @@
<shiro:hasPermission name="app:domain:config"> <shiro:hasPermission name="app:domain:config">
<sys:delRow url="${ctx}/app/domainCfgForm" id="contentTable" label="update"></sys:delRow> <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/updateAppDomainCfgValid?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
<sys:delRow url="${ctx}/app/exportDomain?functionId=${cfg.functionId }&specServiceId=${cfg.specServiceId}" searchUrl="${ctx}/app/domainCfgList?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="export"></sys:delRow> <%-- <sys:delRow url="${ctx}/app/exportDomain?functionId=${cfg.functionId }&specServiceId=${cfg.specServiceId}" searchUrl="${ctx}/app/domainCfgList?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="export"></sys:delRow> --%>
</shiro:hasPermission> </shiro:hasPermission>
<div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-wrench"></i> <spring:message code="export"></spring:message>
<i class="fa fa-angle-down"></i>
</button>
<ul class="dropdown-menu pull-right" style="min-width: 110px;" >
<li><sys:delRow url="${ctx}/app/exportDomain?functionId=${cfg.functionId }&specServiceId=${cfg.specServiceId}&exType=excel" searchUrl="${ctx}/app/domainCfgList?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="cfg_excel"></sys:delRow></li>
<li><sys:delRow url="${ctx}/app/exportDomain?functionId=${cfg.functionId }&specServiceId=${cfg.specServiceId}&exType=csv" searchUrl="${ctx}/app/domainCfgList?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="cfg_csv"></sys:delRow></li>
</ul>
</div>
<shiro:hasPermission name="app:domain:confirm"> <shiro:hasPermission name="app:domain:confirm">
<div class="btn-group"> <div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"> <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">

View File

@@ -152,8 +152,20 @@
<shiro:hasPermission name="app:http:config"> <shiro:hasPermission name="app:http:config">
<sys:delRow url="${ctx}/app/httpCfgForm" id="contentTable" label="update"></sys:delRow> <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/updateAppHttpCfgValid?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
<sys:delRow url="${ctx}/app/exportAppHttp?functionId=${cfg.functionId }&specServiceId=${cfg.specServiceId}" searchUrl="${ctx}/app/httpCfgList?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="export"></sys:delRow> <%-- <sys:delRow url="${ctx}/app/exportAppHttp?functionId=${cfg.functionId }&specServiceId=${cfg.specServiceId}" searchUrl="${ctx}/app/httpCfgList?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="export"></sys:delRow> --%>
</shiro:hasPermission> </shiro:hasPermission>
<div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-wrench"></i> <spring:message code="export"></spring:message>
<i class="fa fa-angle-down"></i>
</button>
<ul class="dropdown-menu pull-right" style="min-width: 110px;" >
<li><sys:delRow url="${ctx}/app/exportAppHttp?functionId=${cfg.functionId }&specServiceId=${cfg.specServiceId}&exType=excel" searchUrl="${ctx}/app/httpCfgList?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="cfg_excel"></sys:delRow></li>
<li><sys:delRow url="${ctx}/app/exportAppHttp?functionId=${cfg.functionId }&specServiceId=${cfg.specServiceId}&exType=csv" searchUrl="${ctx}/app/httpCfgList?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="cfg_csv"></sys:delRow></li>
</ul>
</div>
<shiro:hasPermission name="app:http:confirm"> <shiro:hasPermission name="app:http:confirm">
<div class="btn-group"> <div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"> <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">

View File

@@ -155,8 +155,20 @@
<shiro:hasPermission name="app:ip:config"> <shiro:hasPermission name="app:ip:config">
<sys:delRow url="${ctx}/app/ipCfgForm" id="contentTable" label="update"></sys:delRow> <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/updateAppIpCfgValid?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
<sys:delRow url="${ctx}/app/exportAppIp?functionId=${cfg.functionId }&specServiceId=${cfg.specServiceId}" searchUrl="${ctx}/app/ipCfgList?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="export"></sys:delRow> <%-- <sys:delRow url="${ctx}/app/exportAppIp?functionId=${cfg.functionId }&specServiceId=${cfg.specServiceId}" searchUrl="${ctx}/app/ipCfgList?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="export"></sys:delRow> --%>
</shiro:hasPermission> </shiro:hasPermission>
<div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-wrench"></i> <spring:message code="export"></spring:message>
<i class="fa fa-angle-down"></i>
</button>
<ul class="dropdown-menu pull-right" style="min-width: 110px;" >
<li><sys:delRow url="${ctx}/app/exportAppIp?functionId=${cfg.functionId }&specServiceId=${cfg.specServiceId}&exType=excel" searchUrl="${ctx}/app/ipCfgList?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="cfg_excel"></sys:delRow></li>
<li><sys:delRow url="${ctx}/app/exportAppIp?functionId=${cfg.functionId }&specServiceId=${cfg.specServiceId}&exType=csv" searchUrl="${ctx}/app/ipCfgList?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="cfg_csv"></sys:delRow></li>
</ul>
</div>
<shiro:hasPermission name="app:ip:confirm"> <shiro:hasPermission name="app:ip:confirm">
<div class="btn-group"> <div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"> <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">

View File

@@ -201,8 +201,20 @@
<shiro:hasPermission name="${configPermissionName }"> <shiro:hasPermission name="${configPermissionName }">
<sys:delRow url="${ctx}/app/feature/multiFeatureCfgForm" id="contentTable" label="update"></sys:delRow> <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/updateAppFeatureCfgValid?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
<sys:delRow url="${ctx}/app/feature/exportFeature?functionId=${cfg.functionId }&specServiceId=${cfg.specServiceId}" searchUrl="${ctx}/app/feature/multiFeatureCfgList?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="export"></sys:delRow> <%-- <sys:delRow url="${ctx}/app/feature/exportFeature?functionId=${cfg.functionId }&specServiceId=${cfg.specServiceId}" searchUrl="${ctx}/app/feature/multiFeatureCfgList?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="export"></sys:delRow> --%>
</shiro:hasPermission> </shiro:hasPermission>
<div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-wrench"></i> <spring:message code="export"></spring:message>
<i class="fa fa-angle-down"></i>
</button>
<ul class="dropdown-menu pull-right" style="min-width: 110px;" >
<li><sys:delRow url="${ctx}/app/feature/exportFeature?functionId=${cfg.functionId }&specServiceId=${cfg.specServiceId}&exType=excel" searchUrl="${ctx}/app/feature/multiFeatureCfgList?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="cfg_excel"></sys:delRow></li>
<li><sys:delRow url="${ctx}/app/feature/exportFeature?functionId=${cfg.functionId }&specServiceId=${cfg.specServiceId}&exType=csv" searchUrl="${ctx}/app/feature/multiFeatureCfgList?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="cfg_csv"></sys:delRow></li>
</ul>
</div>
<shiro:hasPermission name="${confirmPermissionName }"> <shiro:hasPermission name="${confirmPermissionName }">
<div class="btn-group"> <div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"> <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
@@ -354,18 +366,18 @@
<thead> <thead>
<tr> <tr>
<th><input type="checkbox" class="i-checks" id="checkAll"></th> <th><input type="checkbox" class="i-checks" id="checkAll"></th>
<th class="sort-column r.compile_id" style="display: none;"><spring:message code="cfg_id"/></th> <th class="sort-column r.compile_id" style="display: none;" column="cfg_id"><spring:message code="cfg_id"/></th>
<th class="sort-column r.cfg_desc cfgDesc"><spring:message code="config_describe"/></th> <th class="sort-column r.cfg_desc cfgDesc" column="config_describe"><spring:message code="config_describe"/></th>
<th><spring:message code="social_app"/></th> <th column="social_app"><spring:message code="social_app"/></th>
<th><spring:message code="is_audit"/></th> <th column="is_audit"><spring:message code="is_audit"/></th>
<th class="sort-column r.is_valid"><spring:message code="valid_identifier"/></th> <th class="sort-column r.is_valid" column="valid_identifier"><spring:message code="valid_identifier"/></th>
<%-- <th><spring:message code="log_total"/></th> --%> <%-- <th><spring:message code="log_total"/></th> --%>
<th><spring:message code="creator"/></th> <th column="creator"><spring:message code="creator"/></th>
<th class="sort-column r.create_time"><spring:message code="config_time"/></th> <th class="sort-column r.create_time" column="config_time"><spring:message code="config_time"/></th>
<th><spring:message code="editor"/></th> <th column="editor"><spring:message code="editor"/></th>
<th class="sort-column r.edit_time"><spring:message code="edit_time"/></th> <th class="sort-column r.edit_time" column="edit_time"><spring:message code="edit_time"/></th>
<th><spring:message code="auditor"/></th> <th column="auditor"><spring:message code="auditor"/></th>
<th class="sort-column r.audit_time"><spring:message code="audit_time"/></th> <th class="sort-column r.audit_time" column="audit_time"><spring:message code="audit_time"/></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>

View File

@@ -215,8 +215,20 @@
<shiro:hasPermission name="app:policy:config"> <shiro:hasPermission name="app:policy:config">
<sys:delRow url="${ctx}/app/policyCfgForm" id="contentTable" label="update"></sys:delRow> <sys:delRow url="${ctx}/app/policyCfgForm" id="contentTable" label="update"></sys:delRow>
<sys:delRow url="${ctx}/app/updateAppPolicyCfgValid?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow> <sys:delRow url="${ctx}/app/updateAppPolicyCfgValid?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
<sys:delRow url="${ctx}/app/exportIpAddr?functionId=${cfg.functionId }&specServiceId=${cfg.specServiceId}" searchUrl="${ctx}/app/policyCfgList?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="export"></sys:delRow> <%-- <sys:delRow url="${ctx}/app/exportIpAddr?functionId=${cfg.functionId }&specServiceId=${cfg.specServiceId}" searchUrl="${ctx}/app/policyCfgList?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="export"></sys:delRow> --%>
</shiro:hasPermission> </shiro:hasPermission>
<div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-wrench"></i> <spring:message code="export"></spring:message>
<i class="fa fa-angle-down"></i>
</button>
<ul class="dropdown-menu pull-right" style="min-width: 110px;" >
<li><sys:delRow url="${ctx}/app/exportIpAddr?functionId=${cfg.functionId }&specServiceId=${cfg.specServiceId}&exType=excel" searchUrl="${ctx}/app/policyCfgList?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="cfg_excel"></sys:delRow></li>
<li><sys:delRow url="${ctx}/app/exportIpAddr?functionId=${cfg.functionId }&specServiceId=${cfg.specServiceId}&exType=csv" searchUrl="${ctx}/app/policyCfgList?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="cfg_csv"></sys:delRow></li>
</ul>
</div>
<shiro:hasPermission name="app:policy:confirm"> <shiro:hasPermission name="app:policy:confirm">
<div class="btn-group"> <div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"> <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">

View File

@@ -134,8 +134,20 @@
<shiro:hasPermission name="app:ssl:config"> <shiro:hasPermission name="app:ssl:config">
<sys:delRow url="${ctx}/app/sslCfgForm" id="contentTable" label="update"></sys:delRow> <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/updateAppSslCfgValid?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
<sys:delRow url="${ctx}/app/exportAppSsl?functionId=${cfg.functionId }&specServiceId=${cfg.specServiceId}" searchUrl="${ctx}/app/sslCfgList?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="export"></sys:delRow> <%-- <sys:delRow url="${ctx}/app/exportAppSsl?functionId=${cfg.functionId }&specServiceId=${cfg.specServiceId}" searchUrl="${ctx}/app/sslCfgList?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="export"></sys:delRow> --%>
</shiro:hasPermission> </shiro:hasPermission>
<div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-wrench"></i> <spring:message code="export"></spring:message>
<i class="fa fa-angle-down"></i>
</button>
<ul class="dropdown-menu pull-right" style="min-width: 110px;" >
<li><sys:delRow url="${ctx}/app/exportAppSsl?functionId=${cfg.functionId }&specServiceId=${cfg.specServiceId}&exType=excel" searchUrl="${ctx}/app/sslCfgList?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="cfg_excel"></sys:delRow></li>
<li><sys:delRow url="${ctx}/app/exportAppSsl?functionId=${cfg.functionId }&specServiceId=${cfg.specServiceId}&exType=csv" searchUrl="${ctx}/app/sslCfgList?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="cfg_csv"></sys:delRow></li>
</ul>
</div>
<shiro:hasPermission name="app:ssl:confirm"> <shiro:hasPermission name="app:ssl:confirm">
<div class="btn-group"> <div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"> <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">

View File

@@ -132,8 +132,20 @@
<shiro:hasPermission name="app:topic:config"> <shiro:hasPermission name="app:topic:config">
<sys:delRow url="${ctx}/app/topicDomainCfgForm" id="contentTable" label="update"></sys:delRow> <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/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> <%-- <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>
<div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-wrench"></i> <spring:message code="export"></spring:message>
<i class="fa fa-angle-down"></i>
</button>
<ul class="dropdown-menu pull-right" style="min-width: 110px;" >
<li><sys:delRow url="${ctx}/app/exportTop?functionId=${cfg.functionId }&exType=excel" searchUrl="${ctx}/app/topicDomainCfgList?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="cfg_excel"></sys:delRow></li>
<li><sys:delRow url="${ctx}/app/exportTop?functionId=${cfg.functionId }&exType=csv" searchUrl="${ctx}/app/topicDomainCfgList?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="cfg_csv"></sys:delRow></li>
</ul>
</div>
<shiro:hasPermission name="app:domain:confirm"> <shiro:hasPermission name="app:domain:confirm">
<div class="btn-group"> <div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"> <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">

View File

@@ -213,8 +213,20 @@
<shiro:hasPermission name="avVoip:config"> <shiro:hasPermission name="avVoip:config">
<sys:delRow url="${ctx}/ntc/av/contUrlForm" id="contentTable" label="update"></sys:delRow> <sys:delRow url="${ctx}/ntc/av/contUrlForm" id="contentTable" label="update"></sys:delRow>
<sys:delRow url="${ctx}/ntc/av/updateAvContUrlValid?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow> <sys:delRow url="${ctx}/ntc/av/updateAvContUrlValid?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
<sys:delRow url="${ctx}/ntc/av/exportStream?functionId=${cfg.functionId }" searchUrl="${ctx}/ntc/av/contUrlList?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="export"></sys:delRow> <%-- <sys:delRow url="${ctx}/ntc/av/exportStream?functionId=${cfg.functionId }" searchUrl="${ctx}/ntc/av/contUrlList?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="export"></sys:delRow> --%>
</shiro:hasPermission> </shiro:hasPermission>
<div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-wrench"></i> <spring:message code="export"></spring:message>
<i class="fa fa-angle-down"></i>
</button>
<ul class="dropdown-menu pull-right" style="min-width: 110px;" >
<li><sys:delRow url="${ctx}/ntc/av/exportStream?functionId=${cfg.functionId }&exType=excel" searchUrl="${ctx}/ntc/av/contUrlList?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="cfg_excel"></sys:delRow></li>
<li><sys:delRow url="${ctx}/ntc/av/exportStream?functionId=${cfg.functionId }&exType=csv" searchUrl="${ctx}/ntc/av/contUrlList?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="cfg_csv"></sys:delRow></li>
</ul>
</div>
<%-- <sys:delRow url="${ctx}/ntc/av/voipExport?functionId=${cfg.functionId }" id="contentTable" label="export" maxRow="${page.maxExportSize }"></sys:delRow> --%> <%-- <sys:delRow url="${ctx}/ntc/av/voipExport?functionId=${cfg.functionId }" id="contentTable" label="export" maxRow="${page.maxExportSize }"></sys:delRow> --%>
<shiro:hasPermission name="avVoip:confirm"> <shiro:hasPermission name="avVoip:confirm">
<div class="btn-group"> <div class="btn-group">

View File

@@ -205,8 +205,20 @@
<shiro:hasPermission name="avVoip:config"> <shiro:hasPermission name="avVoip:config">
<sys:delRow url="${ctx}/ntc/av/voipForm" id="contentTable" label="update"></sys:delRow> <sys:delRow url="${ctx}/ntc/av/voipForm" id="contentTable" label="update"></sys:delRow>
<sys:delRow url="${ctx}/ntc/av/updateAvVoipValid?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow> <sys:delRow url="${ctx}/ntc/av/updateAvVoipValid?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
<sys:delRow url="${ctx}/ntc/av/exportVoip?functionId=${cfg.functionId }" searchUrl="${ctx}/ntc/av/voipList?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="export"></sys:delRow> <%-- <sys:delRow url="${ctx}/ntc/av/exportVoip?functionId=${cfg.functionId }" searchUrl="${ctx}/ntc/av/voipList?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="export"></sys:delRow> --%>
</shiro:hasPermission> </shiro:hasPermission>
<div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-wrench"></i> <spring:message code="export"></spring:message>
<i class="fa fa-angle-down"></i>
</button>
<ul class="dropdown-menu pull-right" style="min-width: 110px;" >
<li><sys:delRow url="${ctx}/ntc/av/exportVoip?functionId=${cfg.functionId }&exType=excel" searchUrl="${ctx}/ntc/av/voipList?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="cfg_excel"></sys:delRow></li>
<li><sys:delRow url="${ctx}/ntc/av/exportVoip?functionId=${cfg.functionId }&exType=csv" searchUrl="${ctx}/ntc/av/voipList?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="cfg_csv"></sys:delRow></li>
</ul>
</div>
<%-- <sys:delRow url="${ctx}/ntc/av/voipExport?functionId=${cfg.functionId }" id="contentTable" label="export" maxRow="${page.maxExportSize }"></sys:delRow> --%> <%-- <sys:delRow url="${ctx}/ntc/av/voipExport?functionId=${cfg.functionId }" id="contentTable" label="export" maxRow="${page.maxExportSize }"></sys:delRow> --%>
<shiro:hasPermission name="avVoip:confirm"> <shiro:hasPermission name="avVoip:confirm">
<div class="btn-group"> <div class="btn-group">
@@ -361,23 +373,23 @@
<tr> <tr>
<th><input type="checkbox" class="i-checks" id="checkAll"></th> <th><input type="checkbox" class="i-checks" id="checkAll"></th>
<th class="sort-column r.compile_id" style="display: none" column="cfg_id" ><spring:message code="cfg_id"/></th> <th class="sort-column r.compile_id" style="display: none" column="cfg_id" ><spring:message code="cfg_id"/></th>
<th class="sort-column r.cfg_desc cfgDesc" column="cfg_id" ><spring:message code="config_describe"/></th> <th class="sort-column r.cfg_desc cfgDesc" column="config_describe" ><spring:message code="config_describe"/></th>
<th class="sort-column r.action" column="cfg_id" ><spring:message code="block_type"/></th> <th class="sort-column r.action" column="block_type" ><spring:message code="block_type"/></th>
<th column="cfg_id" ><spring:message code="is_audit"/></th> <th column="is_audit" ><spring:message code="is_audit"/></th>
<th column="cfg_id" ><spring:message code="do_log"/></th> <th column="do_log" ><spring:message code="do_log"/></th>
<th column="cfg_id" ><spring:message code="log_total"/></th> <th column="log_total" ><spring:message code="log_total"/></th>
<th column="cfg_id" ><spring:message code="whether_area_block"/></th> <th column="whether_area_block" ><spring:message code="whether_area_block"/></th>
<th column="cfg_id" ><spring:message code="letter"/></th> <th column="letter" ><spring:message code="letter"/></th>
<th column="cfg_id" ><spring:message code="classification"/></th> <th column="classification" ><spring:message code="classification"/></th>
<th column="cfg_id" ><spring:message code="attribute"/></th> <th column="attribute" ><spring:message code="attribute"/></th>
<th column="cfg_id" ><spring:message code="label"/></th> <th column="label" ><spring:message code="label"/></th>
<th class="sort-column r.is_valid" column="cfg_id" ><spring:message code="valid_identifier"/></th> <th class="sort-column r.is_valid" column="valid_identifier" ><spring:message code="valid_identifier"/></th>
<th column="cfg_id" ><spring:message code="creator"/></th> <th column="creator" ><spring:message code="creator"/></th>
<th class="sort-column r.create_time" column="cfg_id" ><spring:message code="config_time"/></th> <th class="sort-column r.create_time" column="config_time" ><spring:message code="config_time"/></th>
<th column="cfg_id" ><spring:message code="editor"/></th> <th column="editor" ><spring:message code="editor"/></th>
<th class="sort-column r.edit_time" column="cfg_id" ><spring:message code="edit_time"/></th> <th class="sort-column r.edit_time" column="edit_time" ><spring:message code="edit_time"/></th>
<th column="cfg_id" ><spring:message code="auditor"/></th> <th column="auditor" ><spring:message code="auditor"/></th>
<th class="sort-column r.audit_time" column="cfg_id" ><spring:message code="audit_time"/></th> <th class="sort-column r.audit_time" column="audit_time" ><spring:message code="audit_time"/></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>

View File

@@ -218,8 +218,20 @@
<shiro:hasPermission name="basicprotocol:config"> <shiro:hasPermission name="basicprotocol:config">
<sys:delRow url="${ctx}/basicprotocol/form" id="contentTable" label="update"></sys:delRow> <sys:delRow url="${ctx}/basicprotocol/form" id="contentTable" label="update"></sys:delRow>
<sys:delRow url="${ctx}/basicprotocol/updateValid?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow> <sys:delRow url="${ctx}/basicprotocol/updateValid?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
<sys:delRow url="${ctx}/basicprotocol/exportIpAddr?functionId=${cfg.functionId }&specServiceId=${cfg.specServiceId}" searchUrl="${ctx}/basicprotocol/list?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="export"></sys:delRow> <%-- <sys:delRow url="${ctx}/basicprotocol/exportIpAddr?functionId=${cfg.functionId }&specServiceId=${cfg.specServiceId}" searchUrl="${ctx}/basicprotocol/list?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="export"></sys:delRow> --%>
</shiro:hasPermission> </shiro:hasPermission>
<div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-wrench"></i> <spring:message code="export"></spring:message>
<i class="fa fa-angle-down"></i>
</button>
<ul class="dropdown-menu pull-right" style="min-width: 110px;" >
<li><sys:delRow url="${ctx}/basicprotocol/exportIpAddr?functionId=${cfg.functionId }&specServiceId=${cfg.specServiceId}&exType=excel" searchUrl="${ctx}/basicprotocol/list?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="cfg_excel"></sys:delRow></li>
<li><sys:delRow url="${ctx}/basicprotocol/exportIpAddr?functionId=${cfg.functionId }&specServiceId=${cfg.specServiceId}&exType=csv" searchUrl="${ctx}/basicprotocol/list?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="cfg_csv"></sys:delRow></li>
</ul>
</div>
<shiro:hasPermission name="basicprotocol:confirm"> <shiro:hasPermission name="basicprotocol:confirm">
<div class="btn-group"> <div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"> <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">

View File

@@ -164,8 +164,20 @@
<shiro:hasPermission name="ddos:ip:config"> <shiro:hasPermission name="ddos:ip:config">
<sys:delRow url="${ctx}/manipulation/ddos/form" id="contentTable" label="update"></sys:delRow> <sys:delRow url="${ctx}/manipulation/ddos/form" id="contentTable" label="update"></sys:delRow>
<sys:delRow url="${ctx}/manipulation/ddos/delete?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow> <sys:delRow url="${ctx}/manipulation/ddos/delete?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
<sys:delRow url="${ctx}/manipulation/ddos/exportDdos?functionId=${cfg.functionId }" searchUrl="${ctx}/manipulation/ddos/list?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="export"></sys:delRow> <%-- <sys:delRow url="${ctx}/manipulation/ddos/exportDdos?functionId=${cfg.functionId }" searchUrl="${ctx}/manipulation/ddos/list?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="export"></sys:delRow> --%>
</shiro:hasPermission> </shiro:hasPermission>
<div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-wrench"></i> <spring:message code="export"></spring:message>
<i class="fa fa-angle-down"></i>
</button>
<ul class="dropdown-menu pull-right" style="min-width: 110px;" >
<li><sys:delRow url="${ctx}/manipulation/ddos/exportDdos?functionId=${cfg.functionId }&exType=excel" searchUrl="${ctx}/manipulation/ddos/list?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="cfg_excel"></sys:delRow></li>
<li><sys:delRow url="${ctx}/manipulation/ddos/exportDdos?functionId=${cfg.functionId }&exType=csv" searchUrl="${ctx}/manipulation/ddos/list?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="cfg_csv"></sys:delRow></li>
</ul>
</div>
<shiro:hasPermission name="ddos:ip:confirm"> <shiro:hasPermission name="ddos:ip:confirm">
<div class="btn-group"> <div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"> <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
@@ -318,41 +330,41 @@
<thead> <thead>
<tr> <tr>
<th><input type="checkbox" class="i-checks" id="checkAll"></th> <th><input type="checkbox" class="i-checks" id="checkAll"></th>
<%-- <th><spring:message code="seq"/></th> --%> <%-- <th column="seq" ><spring:message code="seq"/></th> --%>
<th class="sort-column r.compile_id" style="display: none"><spring:message code="cfg_id"/></th> <th column="cfg_id" class="sort-column r.compile_id" style="display: none"><spring:message code="cfg_id"/></th>
<th class="sort-column r.cfg_desc"><spring:message code="config_describe"/></th> <th column="config_describe" class="sort-column r.cfg_desc"><spring:message code="config_describe"/></th>
<th class="sort-column r.action"><spring:message code="block_type"/></th> <th column="block_type" class="sort-column r.action"><spring:message code="block_type"/></th>
<th><spring:message code="is_audit"/></th> <th column="is_audit" ><spring:message code="is_audit"/></th>
<th><spring:message code="do_log"/></th> <th column="do_log" ><spring:message code="do_log"/></th>
<th><spring:message code="log_total"/></th> <th column="log_total" ><spring:message code="log_total"/></th>
<th><spring:message code="whether_area_block"/></th> <th column="whether_area_block" ><spring:message code="whether_area_block"/></th>
<th><spring:message code="antiddos_protocol"/></th> <th column="antiddos_protocol" ><spring:message code="antiddos_protocol"/></th>
<th><spring:message code="bps_threadshold"/></th> <th column="bps_threadshold" ><spring:message code="bps_threadshold"/></th>
<th><spring:message code="pps_threadshold"/></th> <th column="pps_threadshold" ><spring:message code="pps_threadshold"/></th>
<th><spring:message code="ip_type"/></th> <th column="ip_type" ><spring:message code="ip_type"/></th>
<%-- <th><spring:message code="client_ip"/></th> <%-- <th column="client_ip" ><spring:message code="client_ip"/></th>
<th><spring:message code="client_port"/></th> --%> <th column="client_port" ><spring:message code="client_port"/></th> --%>
<th><spring:message code="ip_pattern"/></th> <th column="ip_pattern" ><spring:message code="ip_pattern"/></th>
<th><spring:message code="server_ip"/></th> <th column="server_ip" ><spring:message code="server_ip"/></th>
<th><spring:message code="port_pattern"/></th> <th column="port_pattern" ><spring:message code="port_pattern"/></th>
<th><spring:message code="server_port"/></th> <th column="server_port" ><spring:message code="server_port"/></th>
<th><spring:message code="direction"/></th> <th column="direction" ><spring:message code="direction"/></th>
<th><spring:message code="protocol"/></th> <th column="protocol" ><spring:message code="protocol"/></th>
<th><spring:message code="letter"/></th> <th column="letter" ><spring:message code="letter"/></th>
<th><spring:message code="classification"/></th> <th column="classification" ><spring:message code="classification"/></th>
<th><spring:message code="attribute"/></th> <th column="attribute" ><spring:message code="attribute"/></th>
<th><spring:message code="label"/></th> <th column="label" ><spring:message code="label"/></th>
<th class="sort-column r.is_valid"><spring:message code="valid_identifier"/></th> <th column="valid_identifier" class="sort-column r.is_valid"><spring:message code="valid_identifier"/></th>
<th><spring:message code="creator"/></th> <th column="creator" ><spring:message code="creator"/></th>
<th class="sort-column r.create_time"><spring:message code="config_time"/></th> <th column="config_time" class="sort-column r.create_time"><spring:message code="config_time"/></th>
<th><spring:message code="editor"/></th> <th column="editor" ><spring:message code="editor"/></th>
<th class="sort-column r.edit_time"><spring:message code="edit_time"/></th> <th column="edit_time" class="sort-column r.edit_time"><spring:message code="edit_time"/></th>
<th><spring:message code="auditor"/></th> <th column="auditor" ><spring:message code="auditor"/></th>
<th class="sort-column r.audit_time"><spring:message code="audit_time"/></th> <th column="audit_time" class="sort-column r.audit_time"><spring:message code="audit_time"/></th>
<%-- <th><spring:message code="operation"></spring:message></th> --%> <%-- <th column="operation" ><spring:message code="operation"></spring:message></th> --%>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>

View File

@@ -161,8 +161,20 @@
<shiro:hasPermission name="dns:fake:ip:config"> <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/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/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> <%-- <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>
<div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-wrench"></i> <spring:message code="export"></spring:message>
<i class="fa fa-angle-down"></i>
</button>
<ul class="dropdown-menu pull-right" style="min-width: 110px;" >
<li><sys:delRow url="${ctx}/cfg/dnsIp/exportDnsIp?functionId=${cfg.functionId }&exType=excel" searchUrl="${ctx}/cfg/dnsIp/list?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="cfg_excel"></sys:delRow></li>
<li><sys:delRow url="${ctx}/cfg/dnsIp/exportDnsIp?functionId=${cfg.functionId }&exType=csv" searchUrl="${ctx}/cfg/dnsIp/list?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="cfg_csv"></sys:delRow></li>
</ul>
</div>
<shiro:hasPermission name="dns:fake:ip:confirm"> <shiro:hasPermission name="dns:fake:ip:confirm">
<div class="btn-group"> <div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"> <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
@@ -315,30 +327,30 @@
<thead> <thead>
<tr> <tr>
<th><input type="checkbox" class="i-checks" id="checkAll"></th> <th><input type="checkbox" class="i-checks" id="checkAll"></th>
<%-- <th><spring:message code="seq"/></th> --%> <%-- <th column="seq" ><spring:message code="seq"/></th> --%>
<th class="sort-column r.compile_id" style="display: none;"><spring:message code="cfg_id"/></th> <th column="cfg_id" class="sort-column r.compile_id" style="display: none;"><spring:message code="cfg_id"/></th>
<th class="sort-column r.cfg_desc"><spring:message code="config_describe"/></th> <th column="config_describe" class="sort-column r.cfg_desc"><spring:message code="config_describe"/></th>
<th class="sort-column r.action"><spring:message code="block_type"/></th> <th column="block_type" class="sort-column r.action"><spring:message code="block_type"/></th>
<th><spring:message code="group"/></th> <th column="group" ><spring:message code="group"/></th>
<th><spring:message code="ip_type"/></th> <th column="ip_type" ><spring:message code="ip_type"/></th>
<th><spring:message code="IP"/></th> <th column="IP" ><spring:message code="IP"/></th>
<%-- <th><spring:message code="port"/></th> --%> <%-- <th column="port" ><spring:message code="port"/></th> --%>
<th><spring:message code="ip_pattern"/></th> <th column="ip_pattern" ><spring:message code="ip_pattern"/></th>
<%-- <th><spring:message code="port_pattern"/></th> --%> <%-- <th column="port_pattern" ><spring:message code="port_pattern"/></th> --%>
<th><spring:message code="is_audit"/></th> <th column="is_audit" ><spring:message code="is_audit"/></th>
<th><spring:message code="letter"/></th> <th column="letter" ><spring:message code="letter"/></th>
<th><spring:message code="classification"/></th> <th column="classification" ><spring:message code="classification"/></th>
<th><spring:message code="attribute"/></th> <th column="attribute" ><spring:message code="attribute"/></th>
<th><spring:message code="label"/></th> <th column="label" ><spring:message code="label"/></th>
<th class="sort-column r.is_valid"><spring:message code="valid_identifier"/></th> <th column="valid_identifier" class="sort-column r.is_valid"><spring:message code="valid_identifier"/></th>
<%-- <th><spring:message code="log_total"/></th> --%> <%-- <th column="log_total" ><spring:message code="log_total"/></th> --%>
<th><spring:message code="creator"/></th> <th column="creator" ><spring:message code="creator"/></th>
<th class="sort-column r.create_time"><spring:message code="config_time"/></th> <th column="config_time" class="sort-column r.create_time"><spring:message code="config_time"/></th>
<th><spring:message code="editor"/></th> <th column="editor" ><spring:message code="editor"/></th>
<th class="sort-column r.edit_time"><spring:message code="edit_time"/></th> <th column="edit_time" class="sort-column r.edit_time"><spring:message code="edit_time"/></th>
<th><spring:message code="auditor"/></th> <th column="auditor" ><spring:message code="auditor"/></th>
<th class="sort-column r.audit_time"><spring:message code="audit_time"/></th> <th column="audit_time" class="sort-column r.audit_time"><spring:message code="audit_time"/></th>
<%-- <th><spring:message code="operation"></spring:message></th> --%> <%-- <th column="operation" ><spring:message code="operation"></spring:message></th> --%>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>

View File

@@ -215,8 +215,20 @@
<shiro:hasPermission name="encryptedtunnelbehav:config"> <shiro:hasPermission name="encryptedtunnelbehav:config">
<sys:delRow url="${ctx}/encryptedtunnelbehav/form" id="contentTable" label="update"></sys:delRow> <sys:delRow url="${ctx}/encryptedtunnelbehav/form" id="contentTable" label="update"></sys:delRow>
<sys:delRow url="${ctx}/encryptedtunnelbehav/updateValid?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow> <sys:delRow url="${ctx}/encryptedtunnelbehav/updateValid?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
<sys:delRow url="${ctx}/encryptedtunnelbehav/exportIpAddr?functionId=${cfg.functionId }&specServiceId=${cfg.specServiceId}" searchUrl="${ctx}/encryptedtunnelbehav/list?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="export"></sys:delRow> <%-- <sys:delRow url="${ctx}/encryptedtunnelbehav/exportIpAddr?functionId=${cfg.functionId }&specServiceId=${cfg.specServiceId}" searchUrl="${ctx}/encryptedtunnelbehav/list?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="export"></sys:delRow> --%>
</shiro:hasPermission> </shiro:hasPermission>
<div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-wrench"></i> <spring:message code="export"></spring:message>
<i class="fa fa-angle-down"></i>
</button>
<ul class="dropdown-menu pull-right" style="min-width: 110px;" >
<li><sys:delRow url="${ctx}/encryptedtunnelbehav/exportIpAddr?functionId=${cfg.functionId }&specServiceId=${cfg.specServiceId}&exType=excel" searchUrl="${ctx}/encryptedtunnelbehav/list?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="cfg_excel"></sys:delRow></li>
<li><sys:delRow url="${ctx}/encryptedtunnelbehav/exportIpAddr?functionId=${cfg.functionId }&specServiceId=${cfg.specServiceId}&exType=csv" searchUrl="${ctx}/encryptedtunnelbehav/list?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="cfg_csv"></sys:delRow></li>
</ul>
</div>
<shiro:hasPermission name="encryptedtunnelbehav:confirm"> <shiro:hasPermission name="encryptedtunnelbehav:confirm">
<div class="btn-group"> <div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"> <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">

View File

@@ -186,8 +186,20 @@
<shiro:hasPermission name="fileTransfer:ftp:config"> <shiro:hasPermission name="fileTransfer:ftp:config">
<sys:delRow url="${ctx}/ntc/fileTransfer/ftpForm" id="contentTable" label="update"></sys:delRow> <sys:delRow url="${ctx}/ntc/fileTransfer/ftpForm" id="contentTable" label="update"></sys:delRow>
<sys:delRow url="${ctx}/ntc/fileTransfer/updateFtpCfgValid?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow> <sys:delRow url="${ctx}/ntc/fileTransfer/updateFtpCfgValid?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
<sys:delRow url="${ctx}/ntc/fileTransfer/exportftp?functionId=${cfg.functionId }" searchUrl="${ctx}/ntc/fileTransfer/ftpList?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="export"></sys:delRow> <%-- <sys:delRow url="${ctx}/ntc/fileTransfer/exportftp?functionId=${cfg.functionId }" searchUrl="${ctx}/ntc/fileTransfer/ftpList?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="export"></sys:delRow> --%>
</shiro:hasPermission> </shiro:hasPermission>
<div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-wrench"></i> <spring:message code="export"></spring:message>
<i class="fa fa-angle-down"></i>
</button>
<ul class="dropdown-menu pull-right" style="min-width: 110px;" >
<li><sys:delRow url="${ctx}/ntc/fileTransfer/exportftp?functionId=${cfg.functionId }&exType=excel" searchUrl="${ctx}/ntc/fileTransfer/ftpList?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="cfg_excel"></sys:delRow></li>
<li><sys:delRow url="${ctx}/ntc/fileTransfer/exportftp?functionId=${cfg.functionId }&exType=csv" searchUrl="${ctx}/ntc/fileTransfer/ftpList?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="cfg_csv"></sys:delRow></li>
</ul>
</div>
<shiro:hasPermission name="fileTransfer:ftp:confirm"> <shiro:hasPermission name="fileTransfer:ftp:confirm">
<div class="btn-group"> <div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"> <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">

View File

@@ -200,8 +200,20 @@
<shiro:hasPermission name="fileTransfer:p2p:config"> <shiro:hasPermission name="fileTransfer:p2p:config">
<sys:delRow url="${ctx}/ntc/fileTransfer/p2pForm" id="contentTable" label="update"></sys:delRow> <sys:delRow url="${ctx}/ntc/fileTransfer/p2pForm" id="contentTable" label="update"></sys:delRow>
<sys:delRow url="${ctx}/ntc/fileTransfer/updateP2pCfgValid?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow> <sys:delRow url="${ctx}/ntc/fileTransfer/updateP2pCfgValid?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
<sys:delRow url="${ctx}/ntc/fileTransfer/exportP2p?functionId=${cfg.functionId }" searchUrl="${ctx}/ntc/fileTransfer/p2pList?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="export"></sys:delRow> <%-- <sys:delRow url="${ctx}/ntc/fileTransfer/exportP2p?functionId=${cfg.functionId }" searchUrl="${ctx}/ntc/fileTransfer/p2pList?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="export"></sys:delRow> --%>
</shiro:hasPermission> </shiro:hasPermission>
<div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-wrench"></i> <spring:message code="export"></spring:message>
<i class="fa fa-angle-down"></i>
</button>
<ul class="dropdown-menu pull-right" style="min-width: 110px;" >
<li><sys:delRow url="${ctx}/ntc/fileTransfer/exportP2p?functionId=${cfg.functionId }&exType=excel" searchUrl="${ctx}/ntc/fileTransfer/p2pList?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="cfg_excel"></sys:delRow></li>
<li><sys:delRow url="${ctx}/ntc/fileTransfer/exportP2p?functionId=${cfg.functionId }&exType=csv" searchUrl="${ctx}/ntc/fileTransfer/p2pList?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="cfg_csv"></sys:delRow></li>
</ul>
</div>
<shiro:hasPermission name="fileTransfer:p2p:confirm"> <shiro:hasPermission name="fileTransfer:p2p:confirm">
<div class="btn-group"> <div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"> <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">

View File

@@ -213,8 +213,20 @@
<shiro:hasPermission name="intercept:${fn:toLowerCase(interceptType)}:config"> <shiro:hasPermission name="intercept:${fn:toLowerCase(interceptType)}:config">
<sys:delRow url="${ctx}/proxy/intercept/intercept${interceptType}Form" id="contentTable" label="update"></sys:delRow> <sys:delRow url="${ctx}/proxy/intercept/intercept${interceptType}Form" id="contentTable" label="update"></sys:delRow>
<sys:delRow url="${ctx}/proxy/intercept/updateIntercept${interceptType}Valid?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow> <sys:delRow url="${ctx}/proxy/intercept/updateIntercept${interceptType}Valid?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
<sys:delRow url="${ctx}/proxy/intercept/exportIpAddr?functionId=${cfg.functionId }" searchUrl="${ctx}/proxy/intercept/${fn:toLowerCase(interceptType)}/list?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="export"></sys:delRow> <%-- <sys:delRow url="${ctx}/proxy/intercept/exportIpAddr?functionId=${cfg.functionId }" searchUrl="${ctx}/proxy/intercept/${fn:toLowerCase(interceptType)}/list?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="export"></sys:delRow> --%>
</shiro:hasPermission> </shiro:hasPermission>
<div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-wrench"></i> <spring:message code="export"></spring:message>
<i class="fa fa-angle-down"></i>
</button>
<ul class="dropdown-menu pull-right" style="min-width: 110px;" >
<li><sys:delRow url="${ctx}/proxy/intercept/exportIpAddr?functionId=${cfg.functionId }&exType=excel" searchUrl="${ctx}/proxy/intercept/${fn:toLowerCase(interceptType)}/list?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="cfg_excel"></sys:delRow></li>
<li><sys:delRow url="${ctx}/proxy/intercept/exportIpAddr?functionId=${cfg.functionId }&exType=csv" searchUrl="${ctx}/proxy/intercept/${fn:toLowerCase(interceptType)}/list?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="cfg_csv"></sys:delRow></li>
</ul>
</div>
<shiro:hasPermission name="intercept:${fn:toLowerCase(interceptType)}:confirm"> <shiro:hasPermission name="intercept:${fn:toLowerCase(interceptType)}:confirm">
<div class="btn-group"> <div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"> <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
@@ -371,25 +383,25 @@
<th column="config_describe" class="sort-column a.cfg_desc cfgDesc"><spring:message code="config_describe"/></th> <th column="config_describe" class="sort-column a.cfg_desc cfgDesc"><spring:message code="config_describe"/></th>
<th column="block_type" class="sort-column a.action"><spring:message code="block_type"/></th> <th column="block_type" class="sort-column a.action"><spring:message code="block_type"/></th>
<c:if test="${cfg.functionId eq 201 }"> <c:if test="${cfg.functionId eq 201 }">
<th column="ratelimit" ><spring:message code="ratelimit"/></th> <th column="userregion2" ><spring:message code="ratelimit"/></th>
<%-- <th column="bandwith" ><spring:message code="bandwith"/></th> --%> <%-- <th column="bandwith" ><spring:message code="bandwith"/></th> --%>
<th column="intercept_file_strategy" ><spring:message code="intercept_file_strategy"/></th> <th column="userregion1" ><spring:message code="intercept_file_strategy"/></th>
</c:if> </c:if>
<c:if test="${cfg.functionId eq 200 }"> <c:if test="${cfg.functionId eq 200 }">
<%-- <th column="bandwith" ><spring:message code="bandwith"/></th> --%> <%-- <th column="bandwith" ><spring:message code="bandwith"/></th> --%>
<th column="intercept_file_strategy" ><spring:message code="intercept_file_strategy"/></th> <th column="userRegion1" ><spring:message code="intercept_file_strategy"/></th>
</c:if> </c:if>
<c:if test="${cfg.functionId eq 212 }"> <c:if test="${cfg.functionId eq 212 }">
<th column="replace_zone" ><spring:message code="replace_zone"/></th> <th column="userregion1" ><spring:message code="replace_zone"/></th>
<th column="replaced_content" ><spring:message code="replaced_content"/></th> <th column="userregion2" ><spring:message code="replaced_content"/></th>
<th column="replace_content" ><spring:message code="replace_content"/></th> <th column="userregion3" ><spring:message code="replace_content"/></th>
</c:if> </c:if>
<c:if test="${cfg.functionId eq 214 }"> <c:if test="${cfg.functionId eq 214 }">
<th column="Spoofing" ><spring:message code="Spoofing"/></th> <th column="userregion1" ><spring:message code="Spoofing"/></th>
<th column="With" ><spring:message code="With"/></th> <th column="userregion2" ><spring:message code="With"/></th>
</c:if> </c:if>
<c:if test="${cfg.functionId eq 201 }"> <c:if test="${cfg.functionId eq 201 }">
<th column="intercept_intensity" ><spring:message code="intercept_intensity"/></th> <th column="userregion1" ><spring:message code="intercept_intensity"/></th>
</c:if> </c:if>
<th column="is_audit" ><spring:message code="is_audit"/></th> <th column="is_audit" ><spring:message code="is_audit"/></th>
<%-- <th column="do_log" ><spring:message code="do_log"/></th> --%> <%-- <th column="do_log" ><spring:message code="do_log"/></th> --%>

View File

@@ -123,8 +123,20 @@
<shiro:hasPermission name="proxy:intercept:config"> <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/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/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> <%-- <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>
<div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-wrench"></i> <spring:message code="export"></spring:message>
<i class="fa fa-angle-down"></i>
</button>
<ul class="dropdown-menu pull-right" style="min-width: 110px;" >
<li><sys:delRow url="${ctx}/proxy/intercept/strateagy/exportPxy?functionId=${cfg.functionId }&exType=excel" searchUrl="${ctx}/proxy/intercept/strateagy/list?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="cfg_excel"></sys:delRow></li>
<li><sys:delRow url="${ctx}/proxy/intercept/strateagy/exportPxy?functionId=${cfg.functionId }&exType=csv" searchUrl="${ctx}/proxy/intercept/strateagy/list?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="cfg_csv"></sys:delRow></li>
</ul>
</div>
<shiro:hasPermission name="proxy:intercept:confirm"> <shiro:hasPermission name="proxy:intercept:confirm">
<div class="btn-group"> <div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"> <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">

View File

@@ -202,8 +202,20 @@
<shiro:hasPermission name="proxy:trustedCert:config"> <shiro:hasPermission name="proxy:trustedCert:config">
<sys:delRow url="${ctx}/proxy/intercept/strateagy/trustedCertForm" id="contentTable" label="update"></sys:delRow> <sys:delRow url="${ctx}/proxy/intercept/strateagy/trustedCertForm" id="contentTable" label="update"></sys:delRow>
<sys:delRow url="${ctx}/proxy/intercept/strateagy/trustedCertDelete?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow> <sys:delRow url="${ctx}/proxy/intercept/strateagy/trustedCertDelete?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
<sys:delRow url="${ctx}/proxy/intercept/strateagy/exportCert?functionId=${cfg.functionId }" searchUrl="${ctx}/proxy/intercept/strateagy/trustedCertList?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="export"></sys:delRow> <%-- <sys:delRow url="${ctx}/proxy/intercept/strateagy/exportCert?functionId=${cfg.functionId }" searchUrl="${ctx}/proxy/intercept/strateagy/trustedCertList?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="export"></sys:delRow> --%>
</shiro:hasPermission> </shiro:hasPermission>
<div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-wrench"></i> <spring:message code="export"></spring:message>
<i class="fa fa-angle-down"></i>
</button>
<ul class="dropdown-menu pull-right" style="min-width: 110px;" >
<li><sys:delRow url="${ctx}/proxy/intercept/strateagy/exportCert?functionId=${cfg.functionId }&exType=excel" searchUrl="${ctx}/proxy/intercept/strateagy/trustedCertList?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="cfg_excel"></sys:delRow></li>
<li><sys:delRow url="${ctx}/proxy/intercept/strateagy/exportCert?functionId=${cfg.functionId }&exType=csv" searchUrl="${ctx}/proxy/intercept/strateagy/trustedCertList?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="cfg_csv"></sys:delRow></li>
</ul>
</div>
<shiro:hasPermission name="proxy:trustedCert:confirm"> <shiro:hasPermission name="proxy:trustedCert:confirm">
<div class="btn-group"> <div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"> <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">

View File

@@ -198,8 +198,20 @@
<shiro:hasPermission name="iplist:config"> <shiro:hasPermission name="iplist:config">
<sys:delRow url="${ctx}/ntc/iplist/form" id="contentTable" label="update"></sys:delRow> <sys:delRow url="${ctx}/ntc/iplist/form" id="contentTable" label="update"></sys:delRow>
<sys:delRow url="${ctx}/ntc/iplist/updateValid?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow> <sys:delRow url="${ctx}/ntc/iplist/updateValid?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
<sys:delRow url="${ctx}/ntc/iplist/exportIpAddr?functionId=${cfg.functionId }" searchUrl="${ctx}/ntc/iplist/list?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="export"></sys:delRow> <%-- <sys:delRow url="${ctx}/ntc/iplist/exportIpAddr?functionId=${cfg.functionId }" searchUrl="${ctx}/ntc/iplist/list?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="export"></sys:delRow> --%>
</shiro:hasPermission> </shiro:hasPermission>
<div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-wrench"></i> <spring:message code="export"></spring:message>
<i class="fa fa-angle-down"></i>
</button>
<ul class="dropdown-menu pull-right" style="min-width: 110px;" >
<li><sys:delRow url="${ctx}/ntc/iplist/exportIpAddr?functionId=${cfg.functionId }&exType=excel" searchUrl="${ctx}/ntc/iplist/list?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="cfg_excel"></sys:delRow></li>
<li><sys:delRow url="${ctx}/ntc/iplist/exportIpAddr?functionId=${cfg.functionId }&exType=csv" searchUrl="${ctx}/ntc/iplist/list?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="cfg_csv"></sys:delRow></li>
</ul>
</div>
<shiro:hasPermission name="iplist:confirm"> <shiro:hasPermission name="iplist:confirm">
<div class="btn-group"> <div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"> <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">

View File

@@ -201,8 +201,20 @@
<shiro:hasPermission name="mail:config"> <shiro:hasPermission name="mail:config">
<sys:delRow url="${ctx}/ntc/mail/mailForm" id="contentTable" label="update"></sys:delRow> <sys:delRow url="${ctx}/ntc/mail/mailForm" id="contentTable" label="update"></sys:delRow>
<sys:delRow url="${ctx}/ntc/mail/updateMailCfgValid?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow> <sys:delRow url="${ctx}/ntc/mail/updateMailCfgValid?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
<sys:delRow url="${ctx}/ntc/mail/exportmail?functionId=${cfg.functionId }" searchUrl="${ctx}/ntc/mail/mailList?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="export"></sys:delRow> <%-- <sys:delRow url="${ctx}/ntc/mail/exportmail?functionId=${cfg.functionId }" searchUrl="${ctx}/ntc/mail/mailList?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="export"></sys:delRow> --%>
</shiro:hasPermission> </shiro:hasPermission>
<div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-wrench"></i> <spring:message code="export"></spring:message>
<i class="fa fa-angle-down"></i>
</button>
<ul class="dropdown-menu pull-right" style="min-width: 110px;" >
<li><sys:delRow url="${ctx}/ntc/mail/exportmail?functionId=${cfg.functionId }&exType=excel" searchUrl="${ctx}/ntc/mail/mailList?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="cfg_excel"></sys:delRow></li>
<li><sys:delRow url="${ctx}/ntc/mail/exportmail?functionId=${cfg.functionId }&exType=csv" searchUrl="${ctx}/ntc/mail/mailList?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="cfg_csv"></sys:delRow></li>
</ul>
</div>
<shiro:hasPermission name="mail:confirm"> <shiro:hasPermission name="mail:confirm">
<div class="btn-group"> <div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"> <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">

View File

@@ -145,8 +145,20 @@
<shiro:hasPermission name="dns:res:strategy:config"> <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/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/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> <%-- <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>
<div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-wrench"></i> <spring:message code="export"></spring:message>
<i class="fa fa-angle-down"></i>
</button>
<ul class="dropdown-menu pull-right" style="min-width: 110px;" >
<li><sys:delRow url="${ctx}/maintenance/dnsResStrategy/exportDns?functionId=${cfg.functionId }&exType=excel" searchUrl="${ctx}/maintenance/dnsResStrategy/list?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="cfg_excel"></sys:delRow></li>
<li><sys:delRow url="${ctx}/maintenance/dnsResStrategy/exportDns?functionId=${cfg.functionId }&exType=csv" searchUrl="${ctx}/maintenance/dnsResStrategy/list?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="cfg_csv"></sys:delRow></li>
</ul>
</div>
<shiro:hasPermission name="dns:res:strategy:confirm"> <shiro:hasPermission name="dns:res:strategy:confirm">
<div class="btn-group"> <div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"> <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">

View File

@@ -200,8 +200,20 @@
<shiro:hasPermission name="other:bgp:config"> <shiro:hasPermission name="other:bgp:config">
<sys:delRow url="${ctx}/ntc/other/bgpForm" id="contentTable" label="update"></sys:delRow> <sys:delRow url="${ctx}/ntc/other/bgpForm" id="contentTable" label="update"></sys:delRow>
<sys:delRow url="${ctx}/ntc/other/updateBgpCfgValid?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow> <sys:delRow url="${ctx}/ntc/other/updateBgpCfgValid?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
<sys:delRow url="${ctx}/ntc/other/exportbgp?functionId=${cfg.functionId }" searchUrl="${ctx}/ntc/other/bgpList?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="export"></sys:delRow> <%-- <sys:delRow url="${ctx}/ntc/other/exportbgp?functionId=${cfg.functionId }" searchUrl="${ctx}/ntc/other/bgpList?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="export"></sys:delRow> --%>
</shiro:hasPermission> </shiro:hasPermission>
<div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-wrench"></i> <spring:message code="export"></spring:message>
<i class="fa fa-angle-down"></i>
</button>
<ul class="dropdown-menu pull-right" style="min-width: 110px;" >
<li><sys:delRow url="${ctx}/ntc/other/exportbgp?functionId=${cfg.functionId }&exType=excel" searchUrl="${ctx}/ntc/other/bgpList?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="cfg_excel"></sys:delRow></li>
<li><sys:delRow url="${ctx}/ntc/other/exportbgp?functionId=${cfg.functionId }&exType=csv" searchUrl="${ctx}/ntc/other/bgpList?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="cfg_csv"></sys:delRow></li>
</ul>
</div>
<shiro:hasPermission name="other:bgp:confirm"> <shiro:hasPermission name="other:bgp:confirm">
<div class="btn-group"> <div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"> <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">

View File

@@ -180,8 +180,20 @@
<shiro:hasPermission name="${configPermissionName }"> <shiro:hasPermission name="${configPermissionName }">
<sys:delRow url="${ctx}/proxy/cache/form" id="contentTable" label="update"></sys:delRow> <sys:delRow url="${ctx}/proxy/cache/form" id="contentTable" label="update"></sys:delRow>
<sys:delRow url="${ctx}/proxy/cache/delete?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow> <sys:delRow url="${ctx}/proxy/cache/delete?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
<sys:delRow url="${ctx}/proxy/cache/exportHttp?functionId=${cfg.functionId }" id="contentTable" searchUrl="${actionPath }" label="export"></sys:delRow> <%-- <sys:delRow url="${ctx}/proxy/cache/exportHttp?functionId=${cfg.functionId }" id="contentTable" searchUrl="${actionPath }" label="export"></sys:delRow> --%>
</shiro:hasPermission> </shiro:hasPermission>
<!-- <div class="btn-group"> -->
<!-- <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"> -->
<%-- <i class="fa fa-wrench"></i> <spring:message code="export"></spring:message> --%>
<!-- <i class="fa fa-angle-down"></i> -->
<!-- </button> -->
<!-- <ul class="dropdown-menu pull-right" style="min-width: 110px;" > -->
<%-- <li><sys:delRow url="${ctx}/proxy/cache/exportHttp?functionId=${cfg.functionId }&exType=excel" id="contentTable" searchUrl="${actionPath }" label="cfg_excel"></sys:delRow></li> --%>
<%-- <li><sys:delRow url="${ctx}/proxy/cache/exportHttp?functionId=${cfg.functionId }&exType=csv" id="contentTable" searchUrl="${actionPath }" label="cfg_csv"></sys:delRow></li> --%>
<!-- </ul> -->
<!-- </div> -->
<shiro:hasPermission name="${confirmPermissionName }"> <shiro:hasPermission name="${confirmPermissionName }">
<div class="btn-group"> <div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"> <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">

View File

@@ -385,8 +385,20 @@
<shiro:hasPermission name="${configPermissionName }"> <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/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/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> <%-- <sys:delRow url="${ctx}/proxy/control/httpRedirect/exportHttp?functionId=${cfg.functionId }" id="contentTable" searchUrl="${actionPath }" label="export"></sys:delRow> --%>
</shiro:hasPermission> </shiro:hasPermission>
<div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-wrench"></i> <spring:message code="export"></spring:message>
<i class="fa fa-angle-down"></i>
</button>
<ul class="dropdown-menu pull-right" style="min-width: 110px;" >
<li><sys:delRow url="${ctx}/proxy/control/httpRedirect/exportHttp?functionId=${cfg.functionId }&exType=excel" id="contentTable" searchUrl="${actionPath }" label="cfg_excel"></sys:delRow></li>
<li><sys:delRow url="${ctx}/proxy/control/httpRedirect/exportHttp?functionId=${cfg.functionId }&exType=csv" id="contentTable" searchUrl="${actionPath }" label="cfg_csv"></sys:delRow></li>
</ul>
</div>
<shiro:hasPermission name="${confirmPermissionName }"> <shiro:hasPermission name="${confirmPermissionName }">
<div class="btn-group"> <div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"> <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
@@ -546,42 +558,42 @@
<thead> <thead>
<tr> <tr>
<th><input type="checkbox" class="i-checks" id="checkAll"></th> <th><input type="checkbox" class="i-checks" id="checkAll"></th>
<th class="sort-column a.compile_id" style="display: none"><spring:message code="cfg_id"/></th> <th column="cfg_id" class="sort-column a.compile_id" style="display: none"><spring:message code="cfg_id"/></th>
<th class="sort-column a.cfg_desc cfgDesc"><spring:message code="config_describe"/></th> <th column="config_describe" class="sort-column a.cfg_desc cfgDesc"><spring:message code="config_describe"/></th>
<th class="sort-column a.action"><spring:message code="block_type"/></th> <th column="block_type" class="sort-column a.action"><spring:message code="block_type"/></th>
<c:if test="${action == 16}"> <c:if test="${action == 16}">
<th><spring:message code="response_code"/></th> <th column="response_code" ><spring:message code="response_code"/></th>
<th><spring:message code="response_content"/></th> <th column="response_content" ><spring:message code="response_content"/></th>
</c:if> </c:if>
<c:if test="${action == 48}"> <c:if test="${action == 48}">
<th><spring:message code="redirect_response_code"/></th> <th column="redirect_response_code" ><spring:message code="redirect_response_code"/></th>
<th><spring:message code="redirect_url"/></th> <th column="redirect_url" ><spring:message code="redirect_url"/></th>
</c:if> </c:if>
<c:if test="${action == 80}"> <c:if test="${action == 80}">
<th><spring:message code="replace_zone"/></th> <th column="replace_zone" ><spring:message code="replace_zone"/></th>
<th><spring:message code="replaced_content"/></th> <th column="replaced_content" ><spring:message code="replaced_content"/></th>
<th><spring:message code="replace_content"/></th> <th column="replace_content" ><spring:message code="replace_content"/></th>
</c:if> </c:if>
<th><spring:message code="is_audit"/></th> <th column="is_audit" ><spring:message code="is_audit"/></th>
<c:if test="${action ne 128}"> <c:if test="${action ne 128}">
<th><spring:message code="do_log"/></th> <th column="do_log" ><spring:message code="do_log"/></th>
</c:if> </c:if>
<c:if test="${action ne 128}"> <c:if test="${action ne 128}">
<th><spring:message code="log_total"/></th> <th column="log_total" ><spring:message code="log_total"/></th>
</c:if> </c:if>
<th><spring:message code="whether_area_block"/></th> <th column="whether_area_block" ><spring:message code="whether_area_block"/></th>
<th><spring:message code="letter"/></th> <th column="letter" ><spring:message code="letter"/></th>
<th><spring:message code="classification"/></th> <th column="classification" ><spring:message code="classification"/></th>
<th><spring:message code="attribute"/></th> <th column="attribute" ><spring:message code="attribute"/></th>
<th><spring:message code="label"/></th> <th column="label" ><spring:message code="label"/></th>
<th class="sort-column a.is_valid"><spring:message code="valid_identifier"/></th> <th column="valid_identifier" class="sort-column a.is_valid"><spring:message code="valid_identifier"/></th>
<th><spring:message code="creator"/></th> <th column="creator" ><spring:message code="creator"/></th>
<th class="sort-column a.create_time"><spring:message code="config_time"/></th> <th column="config_time" class="sort-column a.create_time"><spring:message code="config_time"/></th>
<th><spring:message code="editor"/></th> <th column="editor" ><spring:message code="editor"/></th>
<th class="sort-column a.edit_time"><spring:message code="edit_time"/></th> <th column="edit_time" class="sort-column a.edit_time"><spring:message code="edit_time"/></th>
<th><spring:message code="auditor"/></th> <th column="auditor" ><spring:message code="auditor"/></th>
<th class="sort-column a.audit_time"><spring:message code="audit_time"/></th> <th column="audit_time" class="sort-column a.audit_time"><spring:message code="audit_time"/></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>

View File

@@ -298,26 +298,26 @@
<thead> <thead>
<tr> <tr>
<th><input type="checkbox" class="i-checks" id="checkAll"></th> <th><input type="checkbox" class="i-checks" id="checkAll"></th>
<%-- <th><spring:message code="seq"/></th> --%> <%-- <th column="seq" ><spring:message code="seq"/></th> --%>
<th class="sort-column r.compile_id" style="display: none;"><spring:message code="cfg_id"/></th> <th column="cfg_id" class="sort-column r.compile_id" style="display: none;"><spring:message code="cfg_id"/></th>
<th class="sort-column r.cfg_desc"><spring:message code="config_describe"/></th> <th column="config_describe" class="sort-column r.cfg_desc"><spring:message code="config_describe"/></th>
<th><spring:message code="group"/></th> <th column="group" ><spring:message code="group"/></th>
<th><spring:message code="ip_type"/></th> <th column="ip_type" ><spring:message code="ip_type"/></th>
<th><spring:message code="IP"/></th> <th column="IP" ><spring:message code="IP"/></th>
<th><spring:message code="is_audit"/></th> <th column="is_audit" ><spring:message code="is_audit"/></th>
<th><spring:message code="letter"/></th> <th column="letter" ><spring:message code="letter"/></th>
<th><spring:message code="classification"/></th> <th column="classification" ><spring:message code="classification"/></th>
<th><spring:message code="attribute"/></th> <th column="attribute" ><spring:message code="attribute"/></th>
<th><spring:message code="label"/></th> <th column="label" ><spring:message code="label"/></th>
<th class="sort-column r.is_valid"><spring:message code="valid_identifier"/></th> <th column="valid_identifier" class="sort-column r.is_valid"><spring:message code="valid_identifier"/></th>
<%-- <th><spring:message code="log_total"/></th> --%> <%-- <th column="log_total" ><spring:message code="log_total"/></th> --%>
<th><spring:message code="creator"/></th> <th column="creator" ><spring:message code="creator"/></th>
<th class="sort-column r.create_time"><spring:message code="config_time"/></th> <th column="config_time" class="sort-column r.create_time"><spring:message code="config_time"/></th>
<th><spring:message code="editor"/></th> <th column="editor" ><spring:message code="editor"/></th>
<th class="sort-column r.edit_time"><spring:message code="edit_time"/></th> <th column="edit_time" class="sort-column r.edit_time"><spring:message code="edit_time"/></th>
<th><spring:message code="auditor"/></th> <th column="auditor" ><spring:message code="auditor"/></th>
<th class="sort-column r.audit_time"><spring:message code="audit_time"/></th> <th column="audit_time" class="sort-column r.audit_time"><spring:message code="audit_time"/></th>
<%-- <th><spring:message code="operation"></spring:message></th> --%> <%-- <th column="operation" ><spring:message code="operation"></spring:message></th> --%>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>

View File

@@ -75,10 +75,22 @@
<button type="button" class="btn btn-default" onClick="edit(${requestInfo.functionId})"> <button type="button" class="btn btn-default" onClick="edit(${requestInfo.functionId})">
<i class="fa fa-edit"></i> <spring:message code="edit"></spring:message></button> <i class="fa fa-edit"></i> <spring:message code="edit"></spring:message></button>
<sys:delRow url="${ctx}/cfg/request/delete?functionId=${requestInfo.functionId}" id="contentTable" label="delete"></sys:delRow> <sys:delRow url="${ctx}/cfg/request/delete?functionId=${requestInfo.functionId}" id="contentTable" label="delete"></sys:delRow>
<sys:delRow url="${ctx}/cfg/request/exportRequestInfo?functionId=${requestInfo.functionId}" searchUrl="${ctx}/cfg/request/list?functionId=${requestInfo.functionId}" id="contentTable" maxRow="10000" label="export"></sys:delRow> <%-- <sys:delRow url="${ctx}/cfg/request/exportRequestInfo?functionId=${requestInfo.functionId}" searchUrl="${ctx}/cfg/request/list?functionId=${requestInfo.functionId}" id="contentTable" maxRow="10000" label="export"></sys:delRow> --%>
<!-- <button type="button" class="btn btn-default"> <!-- <button type="button" class="btn btn-default">
<i class="fa fa-download"></i> 导出</button> --> <i class="fa fa-download"></i> 导出</button> -->
</shiro:hasPermission> </shiro:hasPermission>
<div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-wrench"></i> <spring:message code="export"></spring:message>
<i class="fa fa-angle-down"></i>
</button>
<ul class="dropdown-menu pull-right" style="min-width: 110px;" >
<li><sys:delRow url="${ctx}/cfg/request/exportRequestInfo?functionId=${requestInfo.functionId}&exType=excel" searchUrl="${ctx}/cfg/request/list?functionId=${requestInfo.functionId}" id="contentTable" maxRow="10000" label="cfg_excel"></sys:delRow></li>
<li><sys:delRow url="${ctx}/cfg/request/exportRequestInfo?functionId=${requestInfo.functionId}&exType=csv" searchUrl="${ctx}/cfg/request/list?functionId=${requestInfo.functionId}" id="contentTable" maxRow="10000" label="cfg_csv"></sys:delRow></li>
</ul>
</div>
<shiro:hasPermission name="cfg:requestInfo:confirm"> <shiro:hasPermission name="cfg:requestInfo:confirm">
<div class="btn-group"> <div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"> <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
@@ -173,20 +185,20 @@
<thead> <thead>
<tr> <tr>
<th><input type="checkbox" class="i-checks" id="checkAll"></th> <th><input type="checkbox" class="i-checks" id="checkAll"></th>
<th><spring:message code="Id"></spring:message></th> <th column="Id" ><spring:message code="Id"></spring:message></th>
<th><spring:message code="title"></spring:message></th> <th column="title" ><spring:message code="title"></spring:message></th>
<th><spring:message code="request_organization"></spring:message></th> <th column="request_organization" ><spring:message code="request_organization"></spring:message></th>
<th><spring:message code="request_time"></spring:message></th> <th column="request_time" ><spring:message code="request_time"></spring:message></th>
<th><spring:message code="state"></spring:message></th> <th column="state" ><spring:message code="state"></spring:message></th>
<th><spring:message code="request_number"></spring:message></th> <th column="request_number" ><spring:message code="request_number"></spring:message></th>
<th><spring:message code="content"></spring:message></th> <th column="content" ><spring:message code="content"></spring:message></th>
<th><spring:message code="special_task"></spring:message></th> <th column="special_task" ><spring:message code="special_task"></spring:message></th>
<th><spring:message code="creator"/></th> <th column="creator" ><spring:message code="creator"/></th>
<th class="sort-column createTime"><spring:message code="create_time"/></th> <th column="create_time" class="sort-column createTime"><spring:message code="create_time"/></th>
<th><spring:message code="editor"/></th> <th column="editor" ><spring:message code="editor"/></th>
<th class="sort-column editTime"><spring:message code="edit_time"/></th> <th column="edit_time" class="sort-column editTime"><spring:message code="edit_time"/></th>
<th><spring:message code="auditor"></spring:message></th> <th column="auditor" ><spring:message code="auditor"></spring:message></th>
<th class="sort-column auditTime"><spring:message code="audit_time"></spring:message></th> <th column="audit_time" class="sort-column auditTime"><spring:message code="audit_time"></spring:message></th>
</tr> </tr>
</thead> </thead>

View File

@@ -198,8 +198,20 @@
<shiro:hasPermission name="website:dns:config"> <shiro:hasPermission name="website:dns:config">
<sys:delRow url="${ctx}/ntc/website/dnsForm" id="contentTable" label="update"></sys:delRow> <sys:delRow url="${ctx}/ntc/website/dnsForm" id="contentTable" label="update"></sys:delRow>
<sys:delRow url="${ctx}/ntc/website/updateDnsCfgValid?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow> <sys:delRow url="${ctx}/ntc/website/updateDnsCfgValid?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
<sys:delRow url="${ctx}/ntc/website/exportdns?functionId=${cfg.functionId }" searchUrl="${ctx}/ntc/website/dnsList?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="export"></sys:delRow> <%-- <sys:delRow url="${ctx}/ntc/website/exportdns?functionId=${cfg.functionId }" searchUrl="${ctx}/ntc/website/dnsList?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="export"></sys:delRow> --%>
</shiro:hasPermission> </shiro:hasPermission>
<div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-wrench"></i> <spring:message code="export"></spring:message>
<i class="fa fa-angle-down"></i>
</button>
<ul class="dropdown-menu pull-right" style="min-width: 110px;" >
<li><sys:delRow url="${ctx}/ntc/website/exportdns?functionId=${cfg.functionId }&exType=excel" searchUrl="${ctx}/ntc/website/dnsList?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="cfg_excel"></sys:delRow></li>
<li><sys:delRow url="${ctx}/ntc/website/exportdns?functionId=${cfg.functionId }&exType=csv" searchUrl="${ctx}/ntc/website/dnsList?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="cfg_csv"></sys:delRow></li>
</ul>
</div>
<shiro:hasPermission name="website:dns:confirm"> <shiro:hasPermission name="website:dns:confirm">
<div class="btn-group"> <div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"> <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
@@ -352,25 +364,25 @@
<thead> <thead>
<tr> <tr>
<th><input type="checkbox" class="i-checks" id="checkAll"></th> <th><input type="checkbox" class="i-checks" id="checkAll"></th>
<th class="sort-column a.compile_id" style="display: none"><spring:message code="cfg_id"/></th> <th column="cfg_id" class="sort-column a.compile_id" style="display: none"><spring:message code="cfg_id"/></th>
<th class="sort-column a.cfg_desc cfgDesc"><spring:message code="config_describe"/></th> <th column="config_describe" class="sort-column a.cfg_desc cfgDesc"><spring:message code="config_describe"/></th>
<th class="sort-column a.action"><spring:message code="block_type"/></th> <th column="block_type" class="sort-column a.action"><spring:message code="block_type"/></th>
<th><spring:message code="policy_name"/></th> <th column="policy_name" ><spring:message code="policy_name"/></th>
<th><spring:message code="is_audit"/></th> <th column="is_audit" ><spring:message code="is_audit"/></th>
<th><spring:message code="do_log"/></th> <th column="do_log" ><spring:message code="do_log"/></th>
<th><spring:message code="log_total"/></th> <th column="log_total" ><spring:message code="log_total"/></th>
<th><spring:message code="whether_area_block"/></th> <th column="whether_area_block" ><spring:message code="whether_area_block"/></th>
<th><spring:message code="letter"/></th> <th column="letter" ><spring:message code="letter"/></th>
<th><spring:message code="classification"/></th> <th column="classification" ><spring:message code="classification"/></th>
<th><spring:message code="attribute"/></th> <th column="attribute" ><spring:message code="attribute"/></th>
<th><spring:message code="label"/></th> <th column="label" ><spring:message code="label"/></th>
<th class="sort-column a.is_valid"><spring:message code="valid_identifier"/></th> <th column="valid_identifier" class="sort-column a.is_valid"><spring:message code="valid_identifier"/></th>
<th><spring:message code="creator"/></th> <th column="creator" ><spring:message code="creator"/></th>
<th class="sort-column a.create_time"><spring:message code="config_time"/></th> <th column="config_time" class="sort-column a.create_time"><spring:message code="config_time"/></th>
<th><spring:message code="editor"/></th> <th column="editor" ><spring:message code="editor"/></th>
<th class="sort-column a.edit_time"><spring:message code="edit_time"/></th> <th column="edit_time" class="sort-column a.edit_time"><spring:message code="edit_time"/></th>
<th><spring:message code="auditor"/></th> <th column="auditor" ><spring:message code="auditor"/></th>
<th class="sort-column a.audit_time"><spring:message code="audit_time"/></th> <th column="audit_time" class="sort-column a.audit_time"><spring:message code="audit_time"/></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>

View File

@@ -356,8 +356,20 @@
<shiro:hasPermission name="website:http:config"> <shiro:hasPermission name="website:http:config">
<sys:delRow url ="${ctx}/ntc/website/httpForm" id="contentTable" label="update"></sys:delRow> <sys:delRow url ="${ctx}/ntc/website/httpForm" id="contentTable" label="update"></sys:delRow>
<sys:delRow url="${ctx}/ntc/website/updateHttpCfgValid?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow> <sys:delRow url="${ctx}/ntc/website/updateHttpCfgValid?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
<sys:delRow url="${ctx}/ntc/website/exportHttp?functionId=${cfg.functionId }" id="contentTable" searchUrl="${ctx}/ntc/website/httpList?functionId=${cfg.functionId}" label="export"></sys:delRow> <%-- <sys:delRow url="${ctx}/ntc/website/exportHttp?functionId=${cfg.functionId }" id="contentTable" searchUrl="${ctx}/ntc/website/httpList?functionId=${cfg.functionId}" label="export"></sys:delRow> --%>
</shiro:hasPermission> </shiro:hasPermission>
<div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-wrench"></i> <spring:message code="export"></spring:message>
<i class="fa fa-angle-down"></i>
</button>
<ul class="dropdown-menu pull-right" style="min-width: 110px;" >
<li><sys:delRow url="${ctx}/ntc/website/exportHttp?functionId=${cfg.functionId }&exType=excel" id="contentTable" searchUrl="${ctx}/ntc/website/httpList?functionId=${cfg.functionId}" label="cfg_excel"></sys:delRow></li>
<li><sys:delRow url="${ctx}/ntc/website/exportHttp?functionId=${cfg.functionId }&exType=csv" id="contentTable" searchUrl="${ctx}/ntc/website/httpList?functionId=${cfg.functionId}" label="cfg_csv"></sys:delRow></li>
</ul>
</div>
<shiro:hasPermission name="website:http:confirm"> <shiro:hasPermission name="website:http:confirm">
<div class="btn-group"> <div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"> <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
@@ -510,24 +522,24 @@
<thead> <thead>
<tr> <tr>
<th><input type="checkbox" class="i-checks" id="checkAll"></th> <th><input type="checkbox" class="i-checks" id="checkAll"></th>
<th class="sort-column a.compile_id" style="display: none"><spring:message code="cfg_id"/></th> <th column="cfg_id" class="sort-column a.compile_id" style="display: none"><spring:message code="cfg_id"/></th>
<th class="sort-column a.cfg_desc cfgDesc"><spring:message code="config_describe"/></th> <th column="config_describe" class="sort-column a.cfg_desc cfgDesc"><spring:message code="config_describe"/></th>
<th class="sort-column a.action"><spring:message code="block_type"/></th> <th column="block_type" class="sort-column a.action"><spring:message code="block_type"/></th>
<th><spring:message code="is_audit"/></th> <th column="is_audit" ><spring:message code="is_audit"/></th>
<th><spring:message code="do_log"/></th> <th column="do_log" ><spring:message code="do_log"/></th>
<th><spring:message code="log_total"/></th> <th column="log_total" ><spring:message code="log_total"/></th>
<th><spring:message code="whether_area_block"/></th> <th column="whether_area_block" ><spring:message code="whether_area_block"/></th>
<th><spring:message code="letter"/></th> <th column="letter" ><spring:message code="letter"/></th>
<th><spring:message code="classification"/></th> <th column="classification" ><spring:message code="classification"/></th>
<th><spring:message code="attribute"/></th> <th column="attribute" ><spring:message code="attribute"/></th>
<th><spring:message code="label"/></th> <th column="label" ><spring:message code="label"/></th>
<th class="sort-column a.is_valid"><spring:message code="valid_identifier"/></th> <th column="valid_identifier" class="sort-column a.is_valid"><spring:message code="valid_identifier"/></th>
<th><spring:message code="creator"/></th> <th column="creator" ><spring:message code="creator"/></th>
<th class="sort-column a.create_time"><spring:message code="config_time"/></th> <th column="config_time" class="sort-column a.create_time"><spring:message code="config_time"/></th>
<th><spring:message code="editor"/></th> <th column="editor" ><spring:message code="editor"/></th>
<th class="sort-column a.edit_time"><spring:message code="edit_time"/></th> <th column="edit_time" class="sort-column a.edit_time"><spring:message code="edit_time"/></th>
<th><spring:message code="auditor"/></th> <th column="auditor" ><spring:message code="auditor"/></th>
<th class="sort-column a.audit_time"><spring:message code="audit_time"/></th> <th column="audit_time" class="sort-column a.audit_time"><spring:message code="audit_time"/></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>

View File

@@ -197,8 +197,20 @@
<shiro:hasPermission name="website:ssl:config"> <shiro:hasPermission name="website:ssl:config">
<sys:delRow url="${ctx}/ntc/website/sslForm" id="contentTable" label="update"></sys:delRow> <sys:delRow url="${ctx}/ntc/website/sslForm" id="contentTable" label="update"></sys:delRow>
<sys:delRow url="${ctx}/ntc/website/updateSslCfgValid?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow> <sys:delRow url="${ctx}/ntc/website/updateSslCfgValid?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
<sys:delRow url="${ctx}/ntc/website/exportSsl?functionId=${cfg.functionId }" searchUrl="${ctx}/ntc/website/sslLists?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="export"></sys:delRow> <%-- <sys:delRow url="${ctx}/ntc/website/exportSsl?functionId=${cfg.functionId }" searchUrl="${ctx}/ntc/website/sslLists?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="export"></sys:delRow> --%>
</shiro:hasPermission> </shiro:hasPermission>
<div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-wrench"></i> <spring:message code="export"></spring:message>
<i class="fa fa-angle-down"></i>
</button>
<ul class="dropdown-menu pull-right" style="min-width: 110px;" >
<li><sys:delRow url="${ctx}/ntc/website/exportSsl?functionId=${cfg.functionId }&exType=excel" searchUrl="${ctx}/ntc/website/sslLists?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="cfg_excel"></sys:delRow></li>
<li><sys:delRow url="${ctx}/ntc/website/exportSsl?functionId=${cfg.functionId }&exType=csv" searchUrl="${ctx}/ntc/website/sslLists?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="cfg_csv"></sys:delRow></li>
</ul>
</div>
<shiro:hasPermission name="website:ssl:confirm"> <shiro:hasPermission name="website:ssl:confirm">
<div class="btn-group"> <div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"> <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
@@ -351,24 +363,24 @@
<thead> <thead>
<tr> <tr>
<th><input type="checkbox" class="i-checks" id="checkAll"></th> <th><input type="checkbox" class="i-checks" id="checkAll"></th>
<th class="sort-column a.compile_id" style="display: none"><spring:message code="cfg_id"/></th> <th column="cfg_id" class="sort-column a.compile_id" style="display: none"><spring:message code="cfg_id"/></th>
<th class="sort-column a.cfg_desc cfgDesc"><spring:message code="config_describe"/></th> <th column="config_describe" class="sort-column a.cfg_desc cfgDesc"><spring:message code="config_describe"/></th>
<th class="sort-column a.action"><spring:message code="block_type"/></th> <th column="block_type" class="sort-column a.action"><spring:message code="block_type"/></th>
<th><spring:message code="is_audit"/></th> <th column="is_audit" ><spring:message code="is_audit"/></th>
<th><spring:message code="do_log"/></th> <th column="do_log" ><spring:message code="do_log"/></th>
<th><spring:message code="log_total"/></th> <th column="log_total" ><spring:message code="log_total"/></th>
<th><spring:message code="whether_area_block"/></th> <th column="whether_area_block" ><spring:message code="whether_area_block"/></th>
<th><spring:message code="letter"/></th> <th column="letter" ><spring:message code="letter"/></th>
<th><spring:message code="classification"/></th> <th column="classification" ><spring:message code="classification"/></th>
<th><spring:message code="attribute"/></th> <th column="attribute" ><spring:message code="attribute"/></th>
<th><spring:message code="label"/></th> <th column="label" ><spring:message code="label"/></th>
<th class="sort-column a.is_valid"><spring:message code="valid_identifier"/></th> <th column="valid_identifier" class="sort-column a.is_valid"><spring:message code="valid_identifier"/></th>
<th><spring:message code="creator"/></th> <th column="creator" ><spring:message code="creator"/></th>
<th class="sort-column a.create_time"><spring:message code="config_time"/></th> <th column="config_time" class="sort-column a.create_time"><spring:message code="config_time"/></th>
<th><spring:message code="editor"/></th> <th column="editor" ><spring:message code="editor"/></th>
<th class="sort-column a.edit_time"><spring:message code="edit_time"/></th> <th column="edit_time" class="sort-column a.edit_time"><spring:message code="edit_time"/></th>
<th><spring:message code="auditor"/></th> <th column="auditor" ><spring:message code="auditor"/></th>
<th class="sort-column a.audit_time"><spring:message code="audit_time"/></th> <th column="audit_time" class="sort-column a.audit_time"><spring:message code="audit_time"/></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>

View File

@@ -178,8 +178,20 @@
<shiro:hasPermission name="whitelist:domain:config"> <shiro:hasPermission name="whitelist:domain:config">
<sys:delRow url="${ctx}/ntc/whitelist/domain/form" id="contentTable" label="update"></sys:delRow> <sys:delRow url="${ctx}/ntc/whitelist/domain/form" id="contentTable" label="update"></sys:delRow>
<sys:delRow url="${ctx}/ntc/whitelist/domain/updateValid?isValid=-1&functionId=${cfg.functionId}" id="contentTable" label="delete"></sys:delRow> <sys:delRow url="${ctx}/ntc/whitelist/domain/updateValid?isValid=-1&functionId=${cfg.functionId}" id="contentTable" label="delete"></sys:delRow>
<sys:delRow url="${ctx}/ntc/whitelist/exportdomain?functionId=${cfg.functionId }" searchUrl="${ctx}/ntc/whitelist/domain/list?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="export"></sys:delRow> <%-- <sys:delRow url="${ctx}/ntc/whitelist/exportdomain?functionId=${cfg.functionId }" searchUrl="${ctx}/ntc/whitelist/domain/list?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="export"></sys:delRow> --%>
</shiro:hasPermission> </shiro:hasPermission>
<div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-wrench"></i> <spring:message code="export"></spring:message>
<i class="fa fa-angle-down"></i>
</button>
<ul class="dropdown-menu pull-right" style="min-width: 110px;" >
<li><sys:delRow url="${ctx}/ntc/whitelist/exportdomain?functionId=${cfg.functionId }&exType=excel" searchUrl="${ctx}/ntc/whitelist/domain/list?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="cfg_excel"></sys:delRow></li>
<li><sys:delRow url="${ctx}/ntc/whitelist/exportdomain?functionId=${cfg.functionId }&exType=csv" searchUrl="${ctx}/ntc/whitelist/domain/list?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="cfg_csv"></sys:delRow></li>
</ul>
</div>
<shiro:hasPermission name="whitelist:domain:confirm"> <shiro:hasPermission name="whitelist:domain:confirm">
<div class="btn-group"> <div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"> <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
@@ -332,25 +344,25 @@
<thead> <thead>
<tr> <tr>
<th><input type="checkbox" class="i-checks" id="checkAll"></th> <th><input type="checkbox" class="i-checks" id="checkAll"></th>
<th class="sort-column a.compile_id" style="display: none"><spring:message code="cfg_id"/></th> <th column="cfg_id" class="sort-column a.compile_id" style="display: none"><spring:message code="cfg_id"/></th>
<th class="sort-column a.cfg_desc cfgDesc"><spring:message code="config_describe"/></th> <th column="config_describe" class="sort-column a.cfg_desc cfgDesc"><spring:message code="config_describe"/></th>
<th class="sort-column a.action"><spring:message code="block_type"/></th> <th column="block_type" class="sort-column a.action"><spring:message code="block_type"/></th>
<th><spring:message code="is_audit"/></th> <th column="is_audit" ><spring:message code="is_audit"/></th>
<th><spring:message code="do_log"/></th> <th column="do_log" ><spring:message code="do_log"/></th>
<th><spring:message code="log_total"/></th> <th column="log_total" ><spring:message code="log_total"/></th>
<th><spring:message code="whether_area_block"/></th> <th column="whether_area_block" ><spring:message code="whether_area_block"/></th>
<th><spring:message code="letter"/></th> <th column="letter" ><spring:message code="letter"/></th>
<th><spring:message code="classification"/></th> <th column="classification" ><spring:message code="classification"/></th>
<th><spring:message code="attribute"/></th> <th column="attribute" ><spring:message code="attribute"/></th>
<th><spring:message code="label"/></th> <th column="label" ><spring:message code="label"/></th>
<th class="sort-column a.is_valid"><spring:message code="valid_identifier"/></th> <th column="valid_identifier" class="sort-column a.is_valid"><spring:message code="valid_identifier"/></th>
<th><spring:message code="creator"/></th> <th column="creator" ><spring:message code="creator"/></th>
<th class="sort-column a.create_time"><spring:message code="config_time"/></th> <th column="config_time" class="sort-column a.create_time"><spring:message code="config_time"/></th>
<th><spring:message code="editor"/></th> <th column="editor" ><spring:message code="editor"/></th>
<th class="sort-column a.edit_time"><spring:message code="edit_time"/></th> <th column="edit_time" class="sort-column a.edit_time"><spring:message code="edit_time"/></th>
<th><spring:message code="auditor"/></th> <th column="auditor" ><spring:message code="auditor"/></th>
<th class="sort-column a.audit_time"><spring:message code="audit_time"/></th> <th column="audit_time" class="sort-column a.audit_time"><spring:message code="audit_time"/></th>
<th><spring:message code="source_compile_id"/></th> <th column="source_compile_id" ><spring:message code="source_compile_id"/></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>

View File

@@ -198,8 +198,20 @@
<shiro:hasPermission name="whitelist:ip:config"> <shiro:hasPermission name="whitelist:ip:config">
<sys:delRow url="${ctx}/ntc/whitelist/ip/form" id="contentTable" label="update"></sys:delRow> <sys:delRow url="${ctx}/ntc/whitelist/ip/form" id="contentTable" label="update"></sys:delRow>
<sys:delRow url="${ctx}/ntc/whitelist/updateIpValid?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow> <sys:delRow url="${ctx}/ntc/whitelist/updateIpValid?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
<sys:delRow url="${ctx}/ntc/whitelist/exportIpAddr?functionId=${cfg.functionId }" searchUrl="${ctx}/ntc/whitelist/ip/list?functionId=${cfg.functionId}" id="contentTable" maxRow="5" label="export"></sys:delRow> <%-- <sys:delRow url="${ctx}/ntc/whitelist/exportIpAddr?functionId=${cfg.functionId }" searchUrl="${ctx}/ntc/whitelist/ip/list?functionId=${cfg.functionId}" id="contentTable" maxRow="5" label="export"></sys:delRow> --%>
</shiro:hasPermission> </shiro:hasPermission>
<div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-wrench"></i> <spring:message code="export"></spring:message>
<i class="fa fa-angle-down"></i>
</button>
<ul class="dropdown-menu pull-right" style="min-width: 110px;" >
<li><sys:delRow url="${ctx}/ntc/whitelist/exportIpAddr?functionId=${cfg.functionId }&exType=excel" searchUrl="${ctx}/ntc/whitelist/ip/list?functionId=${cfg.functionId}" id="contentTable" maxRow="5" label="cfg_excel"></sys:delRow></li>
<li><sys:delRow url="${ctx}/ntc/whitelist/exportIpAddr?functionId=${cfg.functionId }&exType=csv" searchUrl="${ctx}/ntc/whitelist/ip/list?functionId=${cfg.functionId}" id="contentTable" maxRow="5" label="cfg_csv"></sys:delRow></li>
</ul>
</div>
<shiro:hasPermission name="whitelist:ip:confirm"> <shiro:hasPermission name="whitelist:ip:confirm">
<div class="btn-group"> <div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"> <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
@@ -352,25 +364,25 @@
<thead> <thead>
<tr> <tr>
<th><input type="checkbox" class="i-checks" id="checkAll"></th> <th><input type="checkbox" class="i-checks" id="checkAll"></th>
<th class="sort-column a.compile_id" style="display: none"><spring:message code="cfg_id"/></th> <th column="cfg_id" class="sort-column a.compile_id" style="display: none"><spring:message code="cfg_id"/></th>
<th class="sort-column a.cfg_desc cfgDesc"><spring:message code="config_describe"/></th> <th column="config_describe" class="sort-column a.cfg_desc cfgDesc"><spring:message code="config_describe"/></th>
<th class="sort-column a.action"><spring:message code="block_type"/></th> <th column="block_type" class="sort-column a.action"><spring:message code="block_type"/></th>
<%-- <th><spring:message code="do_log"/></th> <%-- <th column="do_log" ><spring:message code="do_log"/></th>
<th><spring:message code="whether_area_block"/></th> <th column="whether_area_block" ><spring:message code="whether_area_block"/></th>
<th><spring:message code="letter"/></th> <th column="letter" ><spring:message code="letter"/></th>
<th><spring:message code="classification"/></th> <th column="classification" ><spring:message code="classification"/></th>
<th><spring:message code="attribute"/></th> <th column="attribute" ><spring:message code="attribute"/></th>
<th><spring:message code="label"/></th> --%> <th column="label" ><spring:message code="label"/></th> --%>
<th><spring:message code="is_audit"/></th> <th column="is_audit" ><spring:message code="is_audit"/></th>
<th class="sort-column a.is_valid"><spring:message code="valid_identifier"/></th> <th column="valid_identifier" class="sort-column a.is_valid"><spring:message code="valid_identifier"/></th>
<%-- <th><spring:message code="log_total"/></th> --%> <%-- <th column="log_total" ><spring:message code="log_total"/></th> --%>
<th><spring:message code="creator"/></th> <th column="creator" ><spring:message code="creator"/></th>
<th class="sort-column a.create_time"><spring:message code="config_time"/></th> <th column="config_time" class="sort-column a.create_time"><spring:message code="config_time"/></th>
<th><spring:message code="editor"/></th> <th column="editor" ><spring:message code="editor"/></th>
<th class="sort-column a.edit_time"><spring:message code="edit_time"/></th> <th column="edit_time" class="sort-column a.edit_time"><spring:message code="edit_time"/></th>
<th><spring:message code="auditor"/></th> <th column="auditor" ><spring:message code="auditor"/></th>
<th class="sort-column a.audit_time"><spring:message code="audit_time"/></th> <th column="audit_time" class="sort-column a.audit_time"><spring:message code="audit_time"/></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>