diff options
| author | 段冬梅 <[email protected]> | 2018-12-13 20:50:58 +0800 |
|---|---|---|
| committer | 段冬梅 <[email protected]> | 2018-12-13 20:50:58 +0800 |
| commit | dcf43a5366bcb440e39ffde118828abb99892e9c (patch) | |
| tree | 66119961460bca6cb9a2dbbf5b1375ee9f7bc59f /src | |
| parent | 28d8994e584249e0db751c8de204d8018162ca5d (diff) | |
asnIp 未下发可删除
asn组下无有效的asnip可删除,提示删除时需要删除asn组下的asnip
asn组无asn ip可删除
日志查看配置优化
用户名校验过滤已删除用户
所有addMessage处理增加messageType
流量统计-解决traffic详情时折线图最后时间点数据为0问题。解决用户行为统计中用户名跟ip可能为空无用户名登录时报错问题。app,协议,traffic详情时间查询条件格式化,默认时间显示为最近一小时,列表数据保留两位小数
Diffstat (limited to 'src')
101 files changed, 535 insertions, 265 deletions
diff --git a/src/main/java/com/nis/web/controller/basics/AsnIpController.java b/src/main/java/com/nis/web/controller/basics/AsnIpController.java index 4c93dbd..f7b3459 100644 --- a/src/main/java/com/nis/web/controller/basics/AsnIpController.java +++ b/src/main/java/com/nis/web/controller/basics/AsnIpController.java @@ -81,14 +81,14 @@ public class AsnIpController extends BaseController{ public String save(Model model,HttpServletRequest request,HttpServletResponse response,@ModelAttribute("cfg")CfgIndexInfo cfg,RedirectAttributes redirectAttributes){ try{ asnIpCfgService.saveAsnIpCfg(cfg); - addMessage(redirectAttributes,"save_success"); + addMessage(redirectAttributes,"success","save_success"); }catch(Exception e){ logger.error("信息保存失败",e); e.printStackTrace(); if(e instanceof MaatConvertException) { - addMessage(redirectAttributes,e.getMessage()); + addMessage(redirectAttributes,"error",e.getMessage()); }else { - addMessage(redirectAttributes,"save_failed"); + addMessage(redirectAttributes,"error","save_failed"); } } @@ -100,11 +100,11 @@ public class AsnIpController extends BaseController{ try{ asnIpCfgService.update(cfg); - addMessage(redirectAttributes,"save_success"); + addMessage(redirectAttributes,"success","save_success"); }catch(Exception e){ logger.error("信息保存失败",e); e.printStackTrace(); - addMessage(redirectAttributes,"save_failed"); + addMessage(redirectAttributes,"error","save_failed"); } return "redirect:" + adminPath +"/basics/asn/list?functionId="+cfg.getFunctionId(); @@ -116,18 +116,27 @@ public class AsnIpController extends BaseController{ ,RedirectAttributes redirectAttributes){ try{ asnIpCfgService.delete(isValid,ids); - addMessage(redirectAttributes,"delete_success"); + addMessage(redirectAttributes,"success","delete_success"); }catch(Exception e){ logger.error("Delete failed",e); if(e instanceof MaatConvertException) { - addMessage(redirectAttributes,e.getMessage()); + addMessage(redirectAttributes,"error",e.getMessage()); }else { - addMessage(redirectAttributes,"delete_failed"); + addMessage(redirectAttributes,"error","delete_failed"); } } return "redirect:" + adminPath +"/basics/asn/list?functionId="+functionId; } + + @RequestMapping(value = {"/ajaxDeleteAsnIp"}) + public void ajaxDeleteAsnIp(String ids, HttpServletRequest request, HttpServletResponse response){ + try{ + asnIpCfgService.ajaxDeleteAsnIp(ids); + }catch(Exception e){ + logger.error("Delete failed",e); + } + } /** * ajax设置Name * @param model @@ -206,7 +215,7 @@ public class AsnIpController extends BaseController{ this._export(model, request, response, redirectAttributes,entity.getMenuNameCode(),titleList,classMap,dataMap,noExportMap); } catch (Exception e) { logger.error("asnIp export failed",e); - addMessage(redirectAttributes, "export_failed"); + addMessage(redirectAttributes,"error","export_failed"); } //return "redirect:" + adminPath +"/ntc/iplist/list?functionId="+entity.getFunctionId(); } diff --git a/src/main/java/com/nis/web/controller/basics/IpReuseIpCfgController.java b/src/main/java/com/nis/web/controller/basics/IpReuseIpCfgController.java index 5f04bd4..1b478fd 100644 --- a/src/main/java/com/nis/web/controller/basics/IpReuseIpCfgController.java +++ b/src/main/java/com/nis/web/controller/basics/IpReuseIpCfgController.java @@ -70,11 +70,11 @@ public class IpReuseIpCfgController extends BaseController{ ,RedirectAttributes redirectAttributes) { try{ ipReuseIpCfgService.save(entity);; - addMessage(redirectAttributes,"save_success"); + addMessage(redirectAttributes,"success","save_success"); }catch(Exception e){ logger.error("信息保存失败",e); e.printStackTrace(); - addMessage(redirectAttributes,"save_failed"); + addMessage(redirectAttributes,"error","save_failed"); } return "redirect:" + adminPath +"/basics/vpn/list?functionId="+entity.getFunctionId(); } @@ -86,11 +86,11 @@ public class IpReuseIpCfgController extends BaseController{ public String update(Model model,HttpServletRequest request,HttpServletResponse response,@ModelAttribute("cfg")IpReuseIpCfg cfg,RedirectAttributes redirectAttributes){ try{ ipReuseIpCfgService.update(cfg); - addMessage(redirectAttributes,"save_success"); + addMessage(redirectAttributes,"success","save_success"); }catch(Exception e){ logger.error("信息保存失败",e); e.printStackTrace(); - addMessage(redirectAttributes,"save_failed"); + addMessage(redirectAttributes,"error","save_failed"); } return "redirect:" + adminPath +"/basics/vpn/list?functionId="+cfg.getFunctionId(); } @@ -101,13 +101,13 @@ public class IpReuseIpCfgController extends BaseController{ ,RedirectAttributes redirectAttributes){ try{ ipReuseIpCfgService.delete(isValid,ids); - addMessage(redirectAttributes,"delete_success"); + addMessage(redirectAttributes,"success","delete_success"); }catch(Exception e){ logger.error("Delete failed",e); if(e instanceof MaatConvertException) { - addMessage(redirectAttributes,e.getMessage()); + addMessage(redirectAttributes,"error",e.getMessage()); }else { - addMessage(redirectAttributes,"delete_failed"); + addMessage(redirectAttributes,"error","delete_failed"); } } diff --git a/src/main/java/com/nis/web/controller/basics/PolicyGroupController.java b/src/main/java/com/nis/web/controller/basics/PolicyGroupController.java index 753f65f..6079b6a 100644 --- a/src/main/java/com/nis/web/controller/basics/PolicyGroupController.java +++ b/src/main/java/com/nis/web/controller/basics/PolicyGroupController.java @@ -68,10 +68,10 @@ public class PolicyGroupController extends BaseController { try { policyGroupInfoService.saveOrUpdate(cfg); - addMessage(redirectAttributes, "save_success"); + addMessage(redirectAttributes,"success","save_success"); } catch (Exception e) { logger.error("新增失败",e); - addMessage(redirectAttributes, "save_failed"); + addMessage(redirectAttributes,"error","save_failed"); } return "redirect:" + adminPath + "/basics/policyGroup/policyGroupList"; @@ -89,10 +89,10 @@ public class PolicyGroupController extends BaseController { public String delete(RedirectAttributes redirectAttributes, String ids,int isValid) { try { policyGroupInfoService.deldete(ids,isValid); - addMessage(redirectAttributes, "delete_success"); + addMessage(redirectAttributes,"success","delete_success"); } catch (Exception e) { logger.error("删除失败",e); - addMessage(redirectAttributes, "delete_failed"); + addMessage(redirectAttributes,"error","delete_failed"); } return "redirect:" + adminPath + "/basics/policyGroup/policyGroupList"; } diff --git a/src/main/java/com/nis/web/controller/basics/ServiceDictInfoController.java b/src/main/java/com/nis/web/controller/basics/ServiceDictInfoController.java index c750689..90b46fc 100644 --- a/src/main/java/com/nis/web/controller/basics/ServiceDictInfoController.java +++ b/src/main/java/com/nis/web/controller/basics/ServiceDictInfoController.java @@ -213,10 +213,10 @@ public class ServiceDictInfoController extends BaseController { try { serviceDictInfoService.saveOrUpdate(serviceDictInfo); - addMessage(redirectAttributes, "save_success"); + addMessage(redirectAttributes,"success", "save_success"); } catch (Exception e) { e.printStackTrace(); - addMessage(redirectAttributes, "save_failed"); + addMessage(redirectAttributes,"error", "save_failed"); } return "redirect:" + adminPath + "/basics/serviceDictInfo/list?itType="+itType; @@ -236,10 +236,10 @@ public class ServiceDictInfoController extends BaseController { public String delete(ServiceDictInfo serviceDictInfo, RedirectAttributes redirectAttributes, String itType, String mulitId) { try { serviceDictInfoService.deleteDict(mulitId); - addMessage(redirectAttributes, "delete_success"); + addMessage(redirectAttributes,"success", "delete_success"); } catch (Exception e) { e.printStackTrace(); - addMessage(redirectAttributes, "delete_failed"); + addMessage(redirectAttributes,"error", "delete_failed"); } return "redirect:" + adminPath + "/basics/serviceDictInfo/list?itType="+itType; } diff --git a/src/main/java/com/nis/web/controller/basics/SysDictInfoController.java b/src/main/java/com/nis/web/controller/basics/SysDictInfoController.java index 5a9aa3e..5c46539 100644 --- a/src/main/java/com/nis/web/controller/basics/SysDictInfoController.java +++ b/src/main/java/com/nis/web/controller/basics/SysDictInfoController.java @@ -155,10 +155,10 @@ public class SysDictInfoController extends BaseController { try { sysDictInfoService.saveOrUpdate(sysDictInfo); - addMessage(redirectAttributes, "save_success"); + addMessage(redirectAttributes,"success", "save_success"); } catch (Exception e) { e.printStackTrace(); - addMessage(redirectAttributes, "save_failed"); + addMessage(redirectAttributes,"error", "save_failed"); } return "redirect:" + adminPath + "/basics/sysDictInfo/list?itType="+itType; @@ -175,10 +175,10 @@ public class SysDictInfoController extends BaseController { public String delete(SysDictInfo sysDictInfo, RedirectAttributes redirectAttributes, String itType, String mulitId) { try { sysDictInfoService.deleteDict(mulitId); - addMessage(redirectAttributes, "delete_success"); + addMessage(redirectAttributes,"success", "delete_success"); } catch (Exception e) { e.printStackTrace(); - addMessage(redirectAttributes, "delete_failed"); + addMessage(redirectAttributes,"error", "delete_failed"); } return "redirect:" + adminPath + "/basics/sysDictInfo/list?itType="+itType; } diff --git a/src/main/java/com/nis/web/controller/basics/TaskInfoController.java b/src/main/java/com/nis/web/controller/basics/TaskInfoController.java index 45b91b7..5e8fff6 100644 --- a/src/main/java/com/nis/web/controller/basics/TaskInfoController.java +++ b/src/main/java/com/nis/web/controller/basics/TaskInfoController.java @@ -59,22 +59,22 @@ public class TaskInfoController extends BaseController{ // 保存用户信息 logger.info(taskInfo.getId()+"修改成功"); taskInfoService.saveOrUpdate(taskInfo); - addMessage(redirectAttributes, "save_success"); + addMessage(redirectAttributes,"success", "save_success"); }else{ if (!"true".equals(checkTaskName(taskInfo.getTaskName()))){ logger.info(taskInfo.getTaskName()+"重复数据"); - addMessage(model, "save_failed"); + addMessage(redirectAttributes,"error", "save_failed"); return form(taskInfo, model); } // 保存用户信息 taskInfoService.saveOrUpdate(taskInfo); - addMessage(redirectAttributes, "save_success"); + addMessage(redirectAttributes,"success", "save_success"); logger.info(taskInfo.getId()+"保存成功"); } } catch (Exception e) { logger.error(e.getMessage()); e.printStackTrace(); - addMessage(redirectAttributes, "save_failed"); + addMessage(redirectAttributes,"error", "save_failed"); } return "redirect:" + adminPath + "/basics/taskInfo/list?repage"; } @@ -101,7 +101,7 @@ public class TaskInfoController extends BaseController{ public String taskExamine(String ids, Model model,RedirectAttributes redirectAttributes){ String[] exId = ids.split(","); taskInfoService.taskExamine(exId); - addMessage(redirectAttributes, "save_success"); + addMessage(redirectAttributes,"success", "save_success"); return "redirect:" + adminPath + "/basics/taskInfo/list?repage"; } @@ -115,7 +115,7 @@ public class TaskInfoController extends BaseController{ public String taskExamineNo(String ids, Model model,RedirectAttributes redirectAttributes){ String[] noId = ids.split(","); taskInfoService.taskExamineNo(noId); - addMessage(redirectAttributes, "save_success"); + addMessage(redirectAttributes,"success", "save_success"); return "redirect:" + adminPath + "/basics/taskInfo/list?repage"; } @@ -129,7 +129,7 @@ public class TaskInfoController extends BaseController{ public String taskCancelExamine(String ids, Model model,RedirectAttributes redirectAttributes){ String[] canclelId = ids.split(","); taskInfoService.taskCancelExamine(canclelId); - addMessage(redirectAttributes, "save_success"); + addMessage(redirectAttributes,"success", "save_success"); return "redirect:" + adminPath + "/basics/taskInfo/list?repage"; } @@ -143,7 +143,7 @@ public class TaskInfoController extends BaseController{ public String delete(String ids, Model model,RedirectAttributes redirectAttributes){ String[] delId = ids.split(","); taskInfoService.delete(delId); - addMessage(redirectAttributes, "delete_success"); + addMessage(redirectAttributes,"success", "delete_success"); return "redirect:" + adminPath + "/basics/taskInfo/list?repage"; } diff --git a/src/main/java/com/nis/web/controller/configuration/AppCfgController.java b/src/main/java/com/nis/web/controller/configuration/AppCfgController.java index ae8004d..61706fe 100644 --- a/src/main/java/com/nis/web/controller/configuration/AppCfgController.java +++ b/src/main/java/com/nis/web/controller/configuration/AppCfgController.java @@ -1077,7 +1077,7 @@ public class AppCfgController extends BaseController { if(e instanceof MaatConvertException) { addMessage(redirectAttributes,"error","request_service_failed"); }else { - addMessage(redirectAttributes,"save_failed"); + addMessage(redirectAttributes,"error","save_failed"); } } @@ -1202,7 +1202,7 @@ public class AppCfgController extends BaseController { if(e instanceof MaatConvertException) { addMessage(redirectAttributes,"error","request_service_failed"); }else { - addMessage(redirectAttributes,"save_failed"); + addMessage(redirectAttributes,"error","save_failed"); } } @@ -1346,7 +1346,7 @@ public class AppCfgController extends BaseController { websiteDomainTopic.setIsValid(Constants.VALID_YES); appCfgService.saveDomainDict(websiteDomainTopic); }else{ - addMessage(redirectAttributes,"save_failed"); + addMessage(redirectAttributes,"error","save_failed"); return "redirect:" + adminPath +"/app/topicDomainCfgList?functionId="+entity.getFunctionId(); } } diff --git a/src/main/java/com/nis/web/controller/configuration/ntc/AvController.java b/src/main/java/com/nis/web/controller/configuration/ntc/AvController.java index ab4c2e4..91631a5 100644 --- a/src/main/java/com/nis/web/controller/configuration/ntc/AvController.java +++ b/src/main/java/com/nis/web/controller/configuration/ntc/AvController.java @@ -270,7 +270,7 @@ public class AvController extends BaseController { ||Constants.SPEAKER_FILE_TYPE.contains(FileUtils.getSuffix(uploadSrcFile.getName(),false)) ){ if(!validateAvDuration(uploadSrcFile)){ - addMessage(redirectAttributes,"exceeds_duration_limit"); + addMessage(redirectAttributes,"error","exceeds_duration_limit"); logger.error("The duration of uploaded files exceeds the limit("+Constants.AV_DURATION_LIMIT+"s)."); throw new MultiPartNewException(this.getMsgProp().getProperty("exceeds_duration_limit")); } @@ -319,7 +319,7 @@ public class AvController extends BaseController { @RequestMapping(value = {"/sample/updateAvFileSampleValid"}) public String updateAvFileSampleValid(Integer isAudit,Integer isValid,String ids,Integer functionId,RedirectAttributes redirectAttributes){ avCfgService.updateAvFileSampleValid(isAudit,isValid,ids); - addMessage(redirectAttributes,"delete_success"); + addMessage(redirectAttributes,"success","delete_success"); return "redirect:" + adminPath +"/ntc/av/sample/fileSampleList?functionId="+functionId; } //修改文件样例配置审核状态 diff --git a/src/main/java/com/nis/web/controller/configuration/ntc/FileTransferCfgController.java b/src/main/java/com/nis/web/controller/configuration/ntc/FileTransferCfgController.java index c62bd2f..04ba6a4 100644 --- a/src/main/java/com/nis/web/controller/configuration/ntc/FileTransferCfgController.java +++ b/src/main/java/com/nis/web/controller/configuration/ntc/FileTransferCfgController.java @@ -132,6 +132,8 @@ public class FileTransferCfgController extends BaseController{ model.addAttribute("tabList", tabList); return "/cfg/fileTransfer/ftpSubList"; } + + /** * 做删除操作 * @param isValid @@ -144,7 +146,7 @@ public class FileTransferCfgController extends BaseController{ public String updateFtpCfgValid(Integer isValid,String ids,Integer functionId, RedirectAttributes redirectAttributes) { try { fileTransferCfgService.updateFtpCfgValid(isValid,ids,functionId); - addMessage(redirectAttributes,"delete_success"); + addMessage(redirectAttributes,"success","delete_success"); } catch (Exception e) { if(e instanceof MaatConvertException) { e.printStackTrace(); @@ -458,15 +460,42 @@ public class FileTransferCfgController extends BaseController{ @RequestMapping(value = {"saveP2pCfg"}) @RequiresPermissions(value={"fileTransfer:p2p:config"}) - public String saveP2pCfg(Model model,HttpServletRequest request,HttpServletResponse response,String ids,CfgIndexInfo entity) { - fileTransferCfgService.saveP2pCfg(entity); + public String saveP2pCfg(Model model,HttpServletRequest request,HttpServletResponse response, + String ids,CfgIndexInfo entity,RedirectAttributes redirectAttributes) { + try { + fileTransferCfgService.saveP2pCfg(entity); + addMessage(redirectAttributes,"success","save_success"); + } catch (Exception e) { + if(e instanceof MaatConvertException) { + e.printStackTrace(); + logger.error("P2P信息保存失败",e); + addMessage(redirectAttributes,"error","request_service_failed"); + }else { + e.printStackTrace(); + logger.error("P2P信息保存失败",e); + addMessage(redirectAttributes,"error","save_failed"); + } + } return "redirect:" + adminPath +"/ntc/fileTransfer/p2pList?functionId="+entity.getFunctionId(); } @RequestMapping(value = {"updateP2pCfgValid"}) @RequiresPermissions(value={"fileTransfer:p2p:config"}) - public String updateP2pCfgValid(Integer isValid,String ids,Integer functionId) { - fileTransferCfgService.updateP2pCfgValid(isValid,ids,functionId); + public String updateP2pCfgValid(Integer isValid,String ids,Integer functionId,RedirectAttributes redirectAttributes) { + try { + fileTransferCfgService.updateP2pCfgValid(isValid,ids,functionId); + addMessage(redirectAttributes,"success","delete_success"); + } catch (Exception e) { + if(e instanceof MaatConvertException) { + e.printStackTrace(); + logger.info("P2P配置删除失败:"+e.getMessage());; + addMessage(redirectAttributes,"error","request_service_failed"); + }else { + e.printStackTrace(); + logger.error("P2P配置删除失败",e); + addMessage(redirectAttributes,"error","delete_failed"); + } + } return "redirect:" + adminPath +"/ntc/fileTransfer/p2pList?functionId="+functionId; } @@ -538,6 +567,7 @@ public class FileTransferCfgController extends BaseController{ entity.setFunctionId(functionId); try { fileTransferCfgService.auditP2pCfg(entity,isAudit); + addMessage(redirectAttributes,"success","audit_success"); } catch ( Exception e) { e.printStackTrace(); logger.info("p2p配置下发失败:"+e.getMessage()); diff --git a/src/main/java/com/nis/web/controller/configuration/proxy/PxyObjKeyringController.java b/src/main/java/com/nis/web/controller/configuration/proxy/PxyObjKeyringController.java index 702b07e..9beb716 100644 --- a/src/main/java/com/nis/web/controller/configuration/proxy/PxyObjKeyringController.java +++ b/src/main/java/com/nis/web/controller/configuration/proxy/PxyObjKeyringController.java @@ -531,7 +531,7 @@ public class PxyObjKeyringController extends BaseController { try { boolean certFileflag=validCertFileContent(certFileI,"-incert"); if(!certFileflag){ - addMessage(redirectAttributes,"save_failed"); + addMessage(redirectAttributes,"error","save_failed"); logger.error(certFileI.getOriginalFilename()+" file non Certificate file format "); throw new MultiPartNewException(this.getMsgProp().getProperty("certificate_file_error")); } @@ -618,7 +618,7 @@ public class PxyObjKeyringController extends BaseController { if( crlFileI != null){ boolean certFileflag=validCertFileContent(crlFileI,"-incrl"); if(!certFileflag){ - addMessage(redirectAttributes,"save_failed"); + addMessage(redirectAttributes,"error","save_failed"); logger.error(crlFileI.getOriginalFilename()+" file non crl file format "); throw new MultiPartNewException(this.getMsgProp().getProperty("crl_file_error")); } diff --git a/src/main/java/com/nis/web/controller/dashboard/DashboardController.java b/src/main/java/com/nis/web/controller/dashboard/DashboardController.java index 51b24a5..fd9f6bd 100644 --- a/src/main/java/com/nis/web/controller/dashboard/DashboardController.java +++ b/src/main/java/com/nis/web/controller/dashboard/DashboardController.java @@ -168,7 +168,7 @@ public class DashboardController extends BaseController{ } catch (Exception e) { e.printStackTrace(); logger.error("活跃IP统计错误"+e); - addMessage(redirectAttributes,"request_service_failed"); + addMessage(redirectAttributes,"error","request_service_failed"); } model.addAttribute("ipActiveList", ipActiveList); diff --git a/src/main/java/com/nis/web/controller/dashboard/TrafficStatisticsInfoController.java b/src/main/java/com/nis/web/controller/dashboard/TrafficStatisticsInfoController.java index bd836ba..f1a8c6b 100644 --- a/src/main/java/com/nis/web/controller/dashboard/TrafficStatisticsInfoController.java +++ b/src/main/java/com/nis/web/controller/dashboard/TrafficStatisticsInfoController.java @@ -115,9 +115,9 @@ public class TrafficStatisticsInfoController extends BaseController { public String bandwidthList(Model model){ Calendar cal = Calendar. getInstance (); cal.setTime(new Date()); - String now = new SimpleDateFormat( "yyyy-MM-dd HH:mm:ss" ).format(cal.getTime());//获取到完整的时间 + String now = new SimpleDateFormat( "yyyy-MM-dd HH:mm:00" ).format(cal.getTime());//获取到完整的时间 cal.set(Calendar.HOUR_OF_DAY, cal.get(Calendar.HOUR_OF_DAY) - 1); - String oneHoursAgo = new SimpleDateFormat( "yyyy-MM-dd HH:mm:ss" ).format(cal.getTime()); + String oneHoursAgo = new SimpleDateFormat( "yyyy-MM-dd HH:mm:00" ).format(cal.getTime()); model.addAttribute("beginDate", oneHoursAgo); model.addAttribute("endDate", now); return "/dashboard/trafficBandwidthList"; @@ -126,7 +126,14 @@ public class TrafficStatisticsInfoController extends BaseController { * 流量统计滚动动作查看详情页面 */ @RequestMapping(value={"trafficBlockList","trafficMonitorList"}) - public String serviceBlockList(@RequestParam("searchAction")String searchAction,HttpServletRequest request, HttpServletResponse response, Model model){ + public String serviceBlockList(@RequestParam("searchAction")String searchAction,Model model){ + Calendar cal = Calendar. getInstance (); + cal.setTime(new Date()); + String now = new SimpleDateFormat( "yyyy-MM-dd HH:mm:00" ).format(cal.getTime());//获取到完整的时间 + cal.set(Calendar.HOUR_OF_DAY, cal.get(Calendar.HOUR_OF_DAY) - 1); + String oneHoursAgo = new SimpleDateFormat( "yyyy-MM-dd HH:mm:00" ).format(cal.getTime()); + model.addAttribute("beginDate", oneHoursAgo); + model.addAttribute("endDate", now); model.addAttribute("searchAction", searchAction); return "/dashboard/trafficActionTransList"; } @@ -135,12 +142,13 @@ public class TrafficStatisticsInfoController extends BaseController { */ @RequestMapping(value="actionEntranceTrans") @ResponseBody - public List actionTrans(@RequestParam("searchAction")String searchAction){ + public List actionTrans(String beginDate,String endDate,@RequestParam("searchAction")String searchAction){ Map<String, Object> fromJsonList = new HashMap<String, Object>(); List resultList = new ArrayList(); String url = Constants.DASHBOARD_URL+Constants.NTC_ACTION_ENTRANCE_REPORT; url=url+"?searchAction="+searchAction; try { + url = urlAddDate(url,beginDate,endDate); String string = HttpClientUtil.get(url); Gson gson = new GsonBuilder().create(); fromJsonList = gson.fromJson(string, new TypeToken<Map>(){}.getType()); @@ -153,13 +161,23 @@ public class TrafficStatisticsInfoController extends BaseController { } return resultList; } + /** + * + * + * url路径时间参数格式化 + * @param url + * @param beginDate + * @param endDate + * @return + * @throws URISyntaxException + */ public String urlAddDate(String url,String beginDate,String endDate) throws URISyntaxException{ if(StringUtil.isBlank(beginDate)||StringUtil.isBlank(endDate)){ Calendar cal = Calendar. getInstance (); cal.setTime(new Date()); - endDate = new SimpleDateFormat( "yyyy-MM-dd HH:mm:ss" ).format(cal.getTime());//获取到完整的时间 + endDate = new SimpleDateFormat( "yyyy-MM-dd HH:mm:00" ).format(cal.getTime());//获取到完整的时间 cal.set(Calendar.HOUR_OF_DAY, cal.get(Calendar.HOUR_OF_DAY) - 1); - beginDate = new SimpleDateFormat( "yyyy-MM-dd HH:mm:ss" ).format(cal.getTime()); + beginDate = new SimpleDateFormat( "yyyy-MM-dd HH:mm:00" ).format(cal.getTime()); } URIBuilder uriBuilder = new URIBuilder(url); uriBuilder.addParameter("beginDate",beginDate); @@ -239,11 +257,11 @@ public class TrafficStatisticsInfoController extends BaseController { public String protocolTypeList(Model model){ Calendar cal = Calendar. getInstance (); cal.setTime(new Date()); - String now = new SimpleDateFormat( "yyyy-MM-dd HH:mm:ss" ).format(cal.getTime());//获取到完整的时间 + String now = new SimpleDateFormat( "yyyy-MM-dd HH:mm:00" ).format(cal.getTime());//获取到完整的时间 cal.set(Calendar.HOUR_OF_DAY, cal.get(Calendar.HOUR_OF_DAY) - 1); - String oneHoursAgo = new SimpleDateFormat( "yyyy-MM-dd HH:mm:ss" ).format(cal.getTime()); - model.addAttribute("searchFoundStartTime", oneHoursAgo); - model.addAttribute("searchFoundEndTime", now); + String oneHoursAgo = new SimpleDateFormat( "yyyy-MM-dd HH:mm:00" ).format(cal.getTime()); + model.addAttribute("beginDate", oneHoursAgo); + model.addAttribute("endDate", now); return "/dashboard/trafficProtocolTypeList"; } /** @@ -251,16 +269,12 @@ public class TrafficStatisticsInfoController extends BaseController { */ @RequestMapping(value="protocolList") @ResponseBody - public List protocolList(Model model,@RequestParam(required=false)String searchFoundStartTime,@RequestParam(required=false)String searchFoundEndTime){ + public List protocolList(Model model,@RequestParam(required=false)String beginDate,@RequestParam(required=false)String endDate){ Map<String, Object> fromJsonList = new HashMap<String, Object>(); List list = new ArrayList(); String url = Constants.DASHBOARD_URL+Constants.TRAFFIC_PROTOCOL_LIST; try { - if(!StringUtil.isBlank(searchFoundStartTime)&&!StringUtil.isBlank(searchFoundEndTime)){ - searchFoundStartTime=URLEncoder.encode(searchFoundStartTime, "UTF-8"); - searchFoundEndTime=URLEncoder.encode(searchFoundEndTime, "UTF-8"); - url+="?searchFoundStartTime="+searchFoundStartTime+"&searchFoundEndTime="+searchFoundEndTime; - } + url=urlAddDate(url,beginDate,endDate); String string = HttpClientUtil.get(url); Gson gson = new GsonBuilder().create(); fromJsonList = gson.fromJson(string, new TypeToken<Map>(){}.getType()); @@ -311,7 +325,14 @@ public class TrafficStatisticsInfoController extends BaseController { * App类型详细列表 */ @RequestMapping(value="appTypeList") - public String appTypeList(){ + public String appTypeList(Model model){ + Calendar cal = Calendar. getInstance (); + cal.setTime(new Date()); + String now = new SimpleDateFormat( "yyyy-MM-dd HH:mm:00" ).format(cal.getTime());//获取到完整的时间 + cal.set(Calendar.HOUR_OF_DAY, cal.get(Calendar.HOUR_OF_DAY) - 1); + String oneHoursAgo = new SimpleDateFormat( "yyyy-MM-dd HH:mm:00" ).format(cal.getTime()); + model.addAttribute("beginDate", oneHoursAgo); + model.addAttribute("endDate", now); return "/dashboard/trafficAppTypeList"; } /** @@ -319,16 +340,12 @@ public class TrafficStatisticsInfoController extends BaseController { */ @RequestMapping(value="appList") @ResponseBody - public List appList(@RequestParam(value="searchFoundStartTime",required=false)String searchFoundStartTime,@RequestParam(value="searchFoundEndTime",required=false)String searchFoundEndTime){ + public List appList(@RequestParam(value="beginDate",required=false)String beginDate,@RequestParam(value="endDate",required=false)String endDate){ Map<String, Object> fromJsonList = new HashMap<String, Object>(); List list = new ArrayList(); String url = Constants.DASHBOARD_URL+Constants.TRAFFIC_APP_LIST; try { - if(!StringUtil.isBlank(searchFoundStartTime)&&!StringUtil.isBlank(searchFoundEndTime)){ - searchFoundStartTime=URLEncoder.encode(searchFoundStartTime, "UTF-8"); - searchFoundEndTime=URLEncoder.encode(searchFoundEndTime, "UTF-8"); - url+="?searchFoundStartTime="+searchFoundStartTime+"&searchFoundEndTime="+searchFoundEndTime; - } + url=urlAddDate(url,beginDate,endDate); String string = HttpClientUtil.get(url); Gson gson = new GsonBuilder().create(); fromJsonList = gson.fromJson(string, new TypeToken<Map>(){}.getType()); diff --git a/src/main/java/com/nis/web/controller/dashboard/TrafficStatisticsReportController.java b/src/main/java/com/nis/web/controller/dashboard/TrafficStatisticsReportController.java index e92d55d..6c747bf 100644 --- a/src/main/java/com/nis/web/controller/dashboard/TrafficStatisticsReportController.java +++ b/src/main/java/com/nis/web/controller/dashboard/TrafficStatisticsReportController.java @@ -94,23 +94,29 @@ public class TrafficStatisticsReportController extends BaseController { model.addAttribute("accountList", accountList); if(StringUtil.isBlank(account)&&accountList!=null&&accountList.size()>0&&!"3".equals(searchBusinessType)) { Map accountMap = (Map) accountList.get(0); - String firstAccount=(String) accountMap.get("account"); - String userString = HttpClientUtil.get(userUrl+"&searchAccount="+firstAccount); - // 指定用户 查询 - Gson usergson = new GsonBuilder().create(); - userJsonList = usergson.fromJson(userString, new TypeToken<Map>(){}.getType()); - userList = (ArrayList) userJsonList.get("data"); + String firstAccount=""; + if(accountMap!=null&&accountMap.get("account")!=null){ + firstAccount=(String) accountMap.get("account"); + String userString = HttpClientUtil.get(userUrl+"&searchAccount="+firstAccount); + // 指定用户 查询 + Gson usergson = new GsonBuilder().create(); + userJsonList = usergson.fromJson(userString, new TypeToken<Map>(){}.getType()); + userList = (ArrayList) userJsonList.get("data"); + } model.addAttribute("userList", userList); model.addAttribute("searchAccount", firstAccount); } if(StringUtil.isBlank(nasIp)&&nasIpList!=null&&nasIpList.size()>0&&!"2".equals(searchBusinessType)) { - Map IpMap = (Map) nasIpList.get(0); - String firstIp=(String) IpMap.get("nasIp"); - String ipString = HttpClientUtil.get(ipUrl+"&searchNasIp="+firstIp); - // 指定IP查询 - Gson ipgson = new GsonBuilder().create(); - ipJsonList = ipgson.fromJson(ipString, new TypeToken<Map>(){}.getType()); - ipList = (ArrayList) ipJsonList.get("data"); + Map ipMap = (Map) nasIpList.get(0); + String firstIp=""; + if(ipMap!=null&&ipMap.get("nasIp")!=null){ + firstIp=(String) ipMap.get("nasIp"); + String ipString = HttpClientUtil.get(ipUrl+"&searchNasIp="+firstIp); + // 指定IP查询 + Gson ipgson = new GsonBuilder().create(); + ipJsonList = ipgson.fromJson(ipString, new TypeToken<Map>(){}.getType()); + ipList = (ArrayList) ipJsonList.get("data"); + } model.addAttribute("ipList", ipList); model.addAttribute("searchNasIp", firstIp); diff --git a/src/main/java/com/nis/web/controller/specific/SpecificServiceCfgController.java b/src/main/java/com/nis/web/controller/specific/SpecificServiceCfgController.java index 32039ca..e897fac 100644 --- a/src/main/java/com/nis/web/controller/specific/SpecificServiceCfgController.java +++ b/src/main/java/com/nis/web/controller/specific/SpecificServiceCfgController.java @@ -159,10 +159,10 @@ public class SpecificServiceCfgController extends BaseController { RedirectAttributes redirectAttributes) { try { specificServiceCfgService.saveOrUpdate(specificServiceCfg); - addMessage(redirectAttributes, "save_success"); + addMessage(redirectAttributes,"success", "save_success"); } catch (Exception e) { e.printStackTrace(); - addMessage(redirectAttributes, "save_failed"); + addMessage(redirectAttributes,"error", "save_failed"); } return "redirect:" + adminPath + "/specific/specificServiceCfg/list?cfgType="+specificServiceCfg.getCfgType(); } @@ -179,10 +179,10 @@ public class SpecificServiceCfgController extends BaseController { public String delete(SpecificServiceCfg specificServiceCfg, RedirectAttributes redirectAttributes, String mulitId){ try{ specificServiceCfgService.delete(mulitId); - addMessage(redirectAttributes,"delete_success"); + addMessage(redirectAttributes,"success","delete_success"); }catch (Exception e){ e.printStackTrace(); - addMessage(redirectAttributes,"delete_failed"); + addMessage(redirectAttributes,"error","delete_failed"); } return "redirect:"+adminPath+"/specific/specificServiceCfg/list"; diff --git a/src/main/java/com/nis/web/controller/specific/SpecificServiceHostCfgController.java b/src/main/java/com/nis/web/controller/specific/SpecificServiceHostCfgController.java index dbbbbc6..b2f538c 100644 --- a/src/main/java/com/nis/web/controller/specific/SpecificServiceHostCfgController.java +++ b/src/main/java/com/nis/web/controller/specific/SpecificServiceHostCfgController.java @@ -95,10 +95,10 @@ public class SpecificServiceHostCfgController extends BaseController { public String saveOrUpdate(SpecificServiceHostCfg specificServiceHostCfg,Model model,RedirectAttributes redirectAttributes){ try { specificServiceHostCfgService.saveOrUpdate(specificServiceHostCfg); - addMessage(redirectAttributes, "save_success"); + addMessage(redirectAttributes,"success", "save_success"); } catch (Exception e) { e.printStackTrace(); - addMessage(redirectAttributes, "save_failed"); + addMessage(redirectAttributes,"error", "save_failed"); } return "redirect:"+adminPath+"/specific/specificServiceHostCfg/list"; } @@ -114,10 +114,10 @@ public class SpecificServiceHostCfgController extends BaseController { public String delete(SpecificServiceHostCfg specificServiceHostCfg, RedirectAttributes redirectAttributes, String mulitId){ try{ specificServiceHostCfgService.delete(mulitId); - addMessage(redirectAttributes,"delete_success"); + addMessage(redirectAttributes,"success","delete_success"); }catch (Exception e){ e.printStackTrace(); - addMessage(redirectAttributes,"delete_failed"); + addMessage(redirectAttributes,"error","delete_failed"); } return "redirect:"+adminPath+"/specific/specificServiceHostCfg/list"; @@ -148,7 +148,7 @@ public class SpecificServiceHostCfgController extends BaseController { write(request,response, fileName).dispose(); return null; } catch (Exception e) { - addMessage(redirectAttributes, msgProp.getProperty("import_template_failed")+e.getMessage()); + addMessage(redirectAttributes,"error", msgProp.getProperty("import_template_failed")+e.getMessage()); } return "redirect:"+adminPath+"/specific/specificServiceHostCfg/list"; } diff --git a/src/main/java/com/nis/web/controller/sys/AreaController.java b/src/main/java/com/nis/web/controller/sys/AreaController.java index 884bea0..9118388 100644 --- a/src/main/java/com/nis/web/controller/sys/AreaController.java +++ b/src/main/java/com/nis/web/controller/sys/AreaController.java @@ -70,7 +70,7 @@ public class AreaController extends BaseController { @RequestMapping(value = "saveOrUpdate") public String saveOrUpdate(SysArea sysArea, Model model, RedirectAttributes redirectAttributes) { areaService.saveOrUpdate(sysArea); - addMessage(redirectAttributes, "保存区域'" + sysArea.getName() + "'成功"); + addMessage(redirectAttributes,"success", "save_success"); String id = sysArea.getParentId().equals(0l) ? "" : String.valueOf(sysArea.getParentId()); return "redirect:" + adminPath + "/sys/area/list?id="+id+"&parentIds="+sysArea.getParent().getParentIds(); @@ -82,7 +82,7 @@ public class AreaController extends BaseController { public String delete(SysArea area, RedirectAttributes redirectAttributes) { areaService.delete(area); - addMessage(redirectAttributes, "删除区域成功"); + addMessage(redirectAttributes,"success", "delete_success"); return "redirect:" + adminPath + "/sys/area/list?id="+area.getParentId()+"&parentIds="+area.getParent().getParentIds(); } diff --git a/src/main/java/com/nis/web/controller/sys/DictController.java b/src/main/java/com/nis/web/controller/sys/DictController.java index d2ccd28..426639d 100644 --- a/src/main/java/com/nis/web/controller/sys/DictController.java +++ b/src/main/java/com/nis/web/controller/sys/DictController.java @@ -68,10 +68,10 @@ public class DictController extends BaseController { dictService.saveOrUpdate(sysDictName); //删除字典缓存 CacheUtils.remove(Constants.CACHE_DICT_MAP); - addMessage(redirectAttributes, "save_success"); + addMessage(redirectAttributes,"success", "save_success"); } catch (Exception e) { e.printStackTrace(); - addMessage(redirectAttributes, "save_failed"); + addMessage(redirectAttributes,"error", "save_failed"); } return "redirect:" + adminPath + "/sys/dict/list"; @@ -85,10 +85,10 @@ public class DictController extends BaseController { dictService.deleteDict(id); //删除字典缓存 CacheUtils.remove(Constants.CACHE_DICT_MAP); - addMessage(redirectAttributes, "delete_success"); + addMessage(redirectAttributes,"success", "delete_success"); } catch (Exception e) { e.printStackTrace(); - addMessage(redirectAttributes, "delete_failed"); + addMessage(redirectAttributes,"error", "delete_failed"); } diff --git a/src/main/java/com/nis/web/controller/sys/MenuController.java b/src/main/java/com/nis/web/controller/sys/MenuController.java index f104f0f..e262f02 100644 --- a/src/main/java/com/nis/web/controller/sys/MenuController.java +++ b/src/main/java/com/nis/web/controller/sys/MenuController.java @@ -71,12 +71,12 @@ public class MenuController extends BaseController { @RequestMapping(value = "saveOrUpdate") public String saveOrUpdate(SysMenu menu, Model model, RedirectAttributes redirectAttributes) { if(!UserUtils.getUser().isAdmin()){ - addMessage(redirectAttributes, "越权操作,只有超级管理员才能添加或修改数据!"); + addMessage(redirectAttributes,"error", "越权操作,只有超级管理员才能添加或修改数据!"); return "redirect:" + adminPath + "/sys/role/?repage"; } menuService.saveOrUpdateMenu(menu); - addMessage(redirectAttributes, "保存菜单'" + menu.getName() + "'成功"); + addMessage(redirectAttributes,"success", "保存菜单'" + menu.getName() + "'成功"); return "redirect:" + adminPath + "/sys/menu/"; } @@ -89,7 +89,7 @@ public class MenuController extends BaseController { // addMessage(redirectAttributes, "删除菜单失败, 不允许删除顶级菜单或编号为空"); // }else{ menuService.deleteMenu(menu); - addMessage(redirectAttributes, "删除菜单成功"); + addMessage(redirectAttributes,"success", "删除菜单成功"); // } return "redirect:" + adminPath + "/sys/menu/"; } diff --git a/src/main/java/com/nis/web/controller/sys/OfficeController.java b/src/main/java/com/nis/web/controller/sys/OfficeController.java index 4879033..c65b905 100644 --- a/src/main/java/com/nis/web/controller/sys/OfficeController.java +++ b/src/main/java/com/nis/web/controller/sys/OfficeController.java @@ -99,7 +99,7 @@ public class OfficeController extends BaseController { public String saveOrUpdate(SysOffice office, Model model, RedirectAttributes redirectAttributes) { officeService.saveOrUpdate(office); - addMessage(redirectAttributes, "save_success"); + addMessage(redirectAttributes,"success", "save_success"); String id = office.getParentId().equals(0l) ? "" : String.valueOf(office.getParentId()); return "redirect:" + adminPath + "/sys/office/list?id="+id+"&parentIds="+office.getParentIds(); @@ -114,7 +114,7 @@ public class OfficeController extends BaseController { // addMessage(redirectAttributes, "删除机构失败, 不允许删除顶级机构或编号空"); // }else{ officeService.delete(office); - addMessage(redirectAttributes, "delete_success"); + addMessage(redirectAttributes,"success", "delete_success"); // } String id = office.getParentId().equals(0l) ? "" : String.valueOf(office.getParentId()); diff --git a/src/main/java/com/nis/web/controller/sys/RoleController.java b/src/main/java/com/nis/web/controller/sys/RoleController.java index ca08868..1a7484f 100644 --- a/src/main/java/com/nis/web/controller/sys/RoleController.java +++ b/src/main/java/com/nis/web/controller/sys/RoleController.java @@ -143,11 +143,11 @@ public class RoleController extends BaseController { public String saveOrUpdate(SysRole role, Model model, RedirectAttributes redirectAttributes) { if (!"true".equals(checkName(role.getOldName(), role.getName()))){ - addMessage(model, "save_failed"); + addMessage(redirectAttributes,"error", "save_failed"); return form(role, model); } roleService.saveOrUpdate(role); - addMessage(redirectAttributes, "save_success"); + addMessage(redirectAttributes,"success", "save_success"); return "redirect:" + adminPath + "/sys/role/?repage"; } @@ -155,7 +155,7 @@ public class RoleController extends BaseController { @RequestMapping(value = "delete") public String delete(SysRole role, RedirectAttributes redirectAttributes) { roleService.deleteRole(role); - addMessage(redirectAttributes, "delete_success"); + addMessage(redirectAttributes,"success", "delete_success"); return "redirect:" + adminPath + "/sys/role/?repage"; } @@ -195,16 +195,16 @@ public class RoleController extends BaseController { if (UserUtils.getUser().getId().equals(userId)) { /*format(getMsgProp().get("single_file_upload_size_error").toString(), role.getName(),user.getName());*/ - addMessage(redirectAttributes, "无法从角色【" + role.getName() + "】中移除用户【" + user.getName() + "】自己!"); + addMessage(redirectAttributes,"error", "无法从角色【" + role.getName() + "】中移除用户【" + user.getName() + "】自己!"); }else { if (user.getUserRoleList().size() <= 1){ - addMessage(redirectAttributes, "用户【" + user.getName() + "】从角色【" + role.getName() + "】中移除失败!这已经是该用户的唯一角色,不能移除。"); + addMessage(redirectAttributes,"error", "用户【" + user.getName() + "】从角色【" + role.getName() + "】中移除失败!这已经是该用户的唯一角色,不能移除。"); }else{ Boolean flag = systemService.outUserInRole(role, user); if (!flag) { - addMessage(redirectAttributes, "用户【" + user.getName() + "】从角色【" + role.getName() + "】中移除失败!"); + addMessage(redirectAttributes,"error", "用户【" + user.getName() + "】从角色【" + role.getName() + "】中移除失败!"); }else { - addMessage(redirectAttributes, "用户【" + user.getName() + "】从角色【" + role.getName() + "】中移除成功!"); + addMessage(redirectAttributes,"success", "用户【" + user.getName() + "】从角色【" + role.getName() + "】中移除成功!"); } } } diff --git a/src/main/java/com/nis/web/controller/sys/UserController.java b/src/main/java/com/nis/web/controller/sys/UserController.java index 198b828..43399a2 100644 --- a/src/main/java/com/nis/web/controller/sys/UserController.java +++ b/src/main/java/com/nis/web/controller/sys/UserController.java @@ -1,12 +1,24 @@ package com.nis.web.controller.sys; +import java.util.Collection; import java.util.List; import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import org.apache.commons.beanutils.BeanUtils; +import org.apache.derby.tools.sysinfo; +import org.apache.shiro.SecurityUtils; +import org.apache.shiro.authc.AuthenticationInfo; import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.apache.shiro.cache.Cache; +import org.apache.shiro.mgt.RealmSecurityManager; +import org.apache.shiro.realm.Realm; +import org.apache.shiro.session.Session; +import org.apache.shiro.subject.PrincipalCollection; +import org.apache.shiro.subject.SimplePrincipalCollection; +import org.apache.shiro.subject.support.DefaultSubjectContext; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.ModelAttribute; @@ -22,11 +34,14 @@ import com.nis.domain.Page; import com.nis.domain.SysRole; import com.nis.domain.SysUser; import com.nis.util.DateUtils; +import com.nis.util.IpUtil; import com.nis.util.StringUtil; import com.nis.util.StringUtils; import com.nis.util.excel.ExportExcel; import com.nis.web.controller.BaseController; +import com.nis.web.security.SystemAuthorizingRealm; import com.nis.web.security.UserUtils; +import com.nis.web.security.UsernamePasswordToken; @Controller @RequestMapping("${adminPath}/sys/user") @@ -97,7 +112,7 @@ public class UserController extends BaseController{ return form(user, model); }*/ if (!"true".equals(checkLoginName(user.getOldLoginId(), user.getLoginId()))){ - addMessage(model, "save_failed"); + addMessage(model,"error", "save_failed"); return form(user, model); } // 角色数据有效性验证,过滤不在授权内的角色 @@ -115,7 +130,7 @@ public class UserController extends BaseController{ if (user.getLoginId().equals(UserUtils.getUser().getLoginId())){ UserUtils.clearCache(); } - addMessage(redirectAttributes, "save_success"); + addMessage(redirectAttributes,"success", "save_success"); return "redirect:" + adminPath + "/sys/user/list?repage"; } @@ -125,12 +140,12 @@ public class UserController extends BaseController{ public String delete(SysUser user, RedirectAttributes redirectAttributes) { if (UserUtils.getUser().getId().equals(user.getId())){ - addMessage(redirectAttributes, "delete_failed"); + addMessage(redirectAttributes,"error", "delete_failed"); }else if (user.isAdmin()){ - addMessage(redirectAttributes, "delete_failed_admin"); + addMessage(redirectAttributes,"error", "delete_failed_admin"); }else{ userService.deleteUser(user); - addMessage(redirectAttributes, "delete_success"); + addMessage(redirectAttributes,"success", "delete_success"); } return "redirect:" + adminPath + "/sys/user/list?repage"; } @@ -205,7 +220,7 @@ public class UserController extends BaseController{ new ExportExcel("用户数据", SysUser.class).setDataList(getMsgProp(),page.getList(),null).write(response, fileName).dispose(); return null; } catch (Exception e) { - addMessage(redirectAttributes, "导出用户失败!失败信息:"+e.getMessage()); + addMessage(redirectAttributes,"error", "导出用户失败!失败信息:"+e.getMessage()); } return "redirect:" + adminPath + "/sys/user/list?repage"; } @@ -277,6 +292,44 @@ public class UserController extends BaseController{ if (StringUtils.validatePassword(oldPassword, user.getPassword())){ userService.updatePasswordById(user.getId(), user.getLoginId(), newPassword); + systemService.deleteSession(UserUtils.getSession()); + RealmSecurityManager securityManager = + (RealmSecurityManager) SecurityUtils.getSecurityManager(); + Collection<Realm> realm=securityManager.getRealms(); + for (Realm realm2 : realm) { + SystemAuthorizingRealm userRealm = (SystemAuthorizingRealm) realm2; + userRealm.clearCachedAuthorizationInfo(UserUtils.getPrincipal()); + userRealm.clearCachedAuthenticationInfo(UserUtils.getPrincipal()); + + /* new UsernamePasswordToken(UserUtils.getUser(), UserUtils.getUser().getpas.toCharArray(), rememberMe, host, captcha, mobile);*/ + + Cache<Object, AuthenticationInfo> cache= userRealm.getAuthenticationCache(); + for (AuthenticationInfo auth : cache.values()) { + /*auth.getPrincipals().getPrimaryPrincipal()*/ + userRealm.getAuthenticationCache().remove(auth.getPrincipals().getPrimaryPrincipal()); + } + } + /*userRealm.clearCachedAuthorizationInfoC(SecurityUtils.getSubject().getPreviousPrincipals());*/ + + + + /*Cache<Object, AuthenticationInfo> cache=SecurityUtils.getSecurityManager() getAvailableAuthenticationCache();; + Object cacheKey=""; + for (Object cacheKey1 : cache.keys()) { + cacheKey=cacheKey1; + System.out.println(cacheKey); + System.out.println(userRealm.getAuthenticationCache().get(cacheKey)); + AuthenticationInfo auth=cache.get(cacheKey); + userRealm.clearCachedAuthorizationInfoC(auth.getPrincipals()); + }*/ + /*userRealm.getAuthenticationCache().remove(cacheKey); + userRealm.getAuthenticationCache().remove(cacheKey); + for (AuthenticationInfo auth : cache.values()) { + //userRealm.clearCachedAuthorizationInfoC(auth.getPrincipals()); + userRealm.getAuthenticationCache().remove(auth.getPrincipals()); + } + Cache<Object, AuthenticationInfo> cache2=userRealm.getAuthenticationCache();*/ + /*UserUtils.getSubject().logout();*/ model.addAttribute("message", "update_success"); }else{ model.addAttribute("message", "update_failed"); diff --git a/src/main/java/com/nis/web/dao/UserDao.xml b/src/main/java/com/nis/web/dao/UserDao.xml index c33c61d..61f2087 100644 --- a/src/main/java/com/nis/web/dao/UserDao.xml +++ b/src/main/java/com/nis/web/dao/UserDao.xml @@ -22,7 +22,7 @@ </select> <select id="getUserByLoginName" resultMap="userResultMap"> - select + SELECT id, login_id, name, @@ -31,7 +31,7 @@ email, create_time, status - from sys_user where login_id=#{loginName} + FROM sys_user WHERE login_id=#{loginName} AND status != 0 </select> <!-- map 转为对象 --> diff --git a/src/main/java/com/nis/web/dao/basics/AsnIpCfgDao.java b/src/main/java/com/nis/web/dao/basics/AsnIpCfgDao.java index de7729f..2d66112 100644 --- a/src/main/java/com/nis/web/dao/basics/AsnIpCfgDao.java +++ b/src/main/java/com/nis/web/dao/basics/AsnIpCfgDao.java @@ -25,4 +25,5 @@ public interface AsnIpCfgDao extends CrudDao<AsnIpCfg>{ public int deleteByAsnGroup(@Param("asnId")String asnNo); public int insertBatch(List<AsnIpCfg> list); public Varibles getVaribles(@Param("name")String name); + public void ajaxDeleteAsnIp(@Param("ids")String ids); } diff --git a/src/main/java/com/nis/web/dao/basics/AsnIpCfgDao.xml b/src/main/java/com/nis/web/dao/basics/AsnIpCfgDao.xml index 28b403c..2eed756 100644 --- a/src/main/java/com/nis/web/dao/basics/AsnIpCfgDao.xml +++ b/src/main/java/com/nis/web/dao/basics/AsnIpCfgDao.xml @@ -408,6 +408,9 @@ <update id="delete" parameterType="java.lang.String" > delete from asn_ip_cfg where cfg_id in (${ids}) </update> + <update id="ajaxDeleteAsnIp" parameterType="java.lang.String" > + delete from asn_ip_cfg where asn_ip_group in (${ids}) + </update> <select id="findOtherIps" resultType="java.lang.Integer" parameterType="java.lang.Integer"> select 1 from asn_ip_cfg where is_valid=1 and asn_ip_group=#{groupId} and cfg_id !=#{cfgId} limit 1 </select> diff --git a/src/main/java/com/nis/web/dao/configuration/IpAddrPoolCfgDao.xml b/src/main/java/com/nis/web/dao/configuration/IpAddrPoolCfgDao.xml index 1134253..859c119 100644 --- a/src/main/java/com/nis/web/dao/configuration/IpAddrPoolCfgDao.xml +++ b/src/main/java/com/nis/web/dao/configuration/IpAddrPoolCfgDao.xml @@ -450,9 +450,9 @@ <if test="isValid !=null">
AND r.is_valid = #{isValid,jdbcType=INTEGER}
</if>
- <!-- <if test="isValid == null">
+ <if test="isValid == null">
AND r.is_valid != -1
- </if> -->
+ </if>
<if test="functionId != null">
AND r.function_id = #{functionId,jdbcType=INTEGER}
</if>
diff --git a/src/main/java/com/nis/web/service/basics/AsnIpCfgService.java b/src/main/java/com/nis/web/service/basics/AsnIpCfgService.java index dde663d..2060961 100644 --- a/src/main/java/com/nis/web/service/basics/AsnIpCfgService.java +++ b/src/main/java/com/nis/web/service/basics/AsnIpCfgService.java @@ -353,9 +353,9 @@ public class AsnIpCfgService extends CrudService<CrudDao<AsnIpCfg>, AsnIpCfg> { } @Transactional(readOnly=false,rollbackFor=RuntimeException.class) public void delete(Integer isValid,String ids) { - for(String id:ids.split(",")) { + /*for(String id:ids.split(",")) { Long.parseLong(id); - } + }*/ List<AsnIpCfg> issuedList=new ArrayList<>(); List<AsnIpCfg> asnIpCfgList= asnIpCfgDao.getByIds(ids); @@ -373,7 +373,9 @@ public class AsnIpCfgService extends CrudService<CrudDao<AsnIpCfg>, AsnIpCfg> { asnIpCfgDao.delete(ids); //已经下发过的,调用分组复用配置删除接口 // splitAndSend(issuedList,Constants.VALID_NO); - asnIPRegionSendToMaat(issuedList,Constants.VALID_NO); + if(issuedList.size() > 0){ + asnIPRegionSendToMaat(issuedList,Constants.VALID_NO); + } } // public List<ConfigGroupInfo> findPolicyGroupInfosByType(Integer groupId) { @@ -463,4 +465,7 @@ public class AsnIpCfgService extends CrudService<CrudDao<AsnIpCfg>, AsnIpCfg> { asnNoList.clear(); } } + public void ajaxDeleteAsnIp(String ids) { + asnIpCfgDao.ajaxDeleteAsnIp(ids); + } } diff --git a/src/main/resources/messages/message_en.properties b/src/main/resources/messages/message_en.properties index 0cd93a9..d02eff9 100644 --- a/src/main/resources/messages/message_en.properties +++ b/src/main/resources/messages/message_en.properties @@ -1364,4 +1364,5 @@ message_type=Code nas_ip=NAS IP Address
framed_ip=Framed IP Address
log_user_name=User Name
-av_tips=The system does not support the index information of audio and video coding in the tail of the audio and video files. The system does not support video with resolution greater than 1080P.
\ No newline at end of file +av_tips=The system does not support the index information of audio and video coding in the tail of the audio and video files. The system does not support video with resolution greater than 1080P.
+asn_ip_group_delete=\uFF08IP configuration under this ASN group will also be deleted.)
\ No newline at end of file diff --git a/src/main/resources/messages/message_ru.properties b/src/main/resources/messages/message_ru.properties index 8ebe51f..f29b483 100644 --- a/src/main/resources/messages/message_ru.properties +++ b/src/main/resources/messages/message_ru.properties @@ -1368,4 +1368,5 @@ message_type=Code nas_ip=NAS IP Address
framed_ip=Framed IP Address
log_user_name=User Name
-av_tips=\u041A\u043E\u0433\u0434\u0430 \u0438\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u044F \u0438\u043D\u0434\u0435\u043A\u0441\u0430 \u043A\u043E\u0434\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u044F \u0430\u0443\u0434\u0438\u043E \u0438 \u0432\u0438\u0434\u0435\u043E \u043D\u0430\u0445\u043E\u0434\u0438\u0442\u0441\u044F \u0432 \u043A\u043E\u043D\u0446\u0435 \u0444\u0430\u0439\u043B\u0430 \u0438\u043B\u0438 \u0432\u0438\u0434\u0435\u043E \u0441 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043D\u0438\u0435\u043C \u0431\u043E\u043B\u0435\u0435 1080p., \u0441\u0438\u0441\u0442\u0435\u043C\u0430 \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044F.
\ No newline at end of file +av_tips=\u041A\u043E\u0433\u0434\u0430 \u0438\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u044F \u0438\u043D\u0434\u0435\u043A\u0441\u0430 \u043A\u043E\u0434\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u044F \u0430\u0443\u0434\u0438\u043E \u0438 \u0432\u0438\u0434\u0435\u043E \u043D\u0430\u0445\u043E\u0434\u0438\u0442\u0441\u044F \u0432 \u043A\u043E\u043D\u0446\u0435 \u0444\u0430\u0439\u043B\u0430 \u0438\u043B\u0438 \u0432\u0438\u0434\u0435\u043E \u0441 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043D\u0438\u0435\u043C \u0431\u043E\u043B\u0435\u0435 1080p., \u0441\u0438\u0441\u0442\u0435\u043C\u0430 \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044F.
+asn_ip_group_delete=\uFF08IP configuration under this ASN group will also be deleted.)
\ No newline at end of file diff --git a/src/main/resources/messages/message_zh_CN.properties b/src/main/resources/messages/message_zh_CN.properties index 217b025..3fe5c43 100644 --- a/src/main/resources/messages/message_zh_CN.properties +++ b/src/main/resources/messages/message_zh_CN.properties @@ -1364,4 +1364,5 @@ message_type=Code nas_ip=NAS IP Address
framed_ip=Framed IP Address
log_user_name=User Name
-av_tips=\u5BF9\u4E8E\u97F3\u89C6\u9891\u7F16\u7801\u7684\u7D22\u5F15\u4FE1\u606F\u5728\u97F3\u89C6\u9891\u6587\u4EF6\u5C3E\u90E8\u7684\u60C5\u51B5\uFF0C\u672C\u7CFB\u7EDF\u4E0D\u4E88\u652F\u6301\uFF0C\u5BF9\u4E8E\u5206\u8FA8\u7387\u5927\u4E8E4\u5146\u7684\u89C6\u9891\uFF0C\u672C\u7CFB\u7EDF\u4E0D\u4E88\u652F\u6301
\ No newline at end of file +av_tips=\u5BF9\u4E8E\u97F3\u89C6\u9891\u7F16\u7801\u7684\u7D22\u5F15\u4FE1\u606F\u5728\u97F3\u89C6\u9891\u6587\u4EF6\u5C3E\u90E8\u7684\u60C5\u51B5\uFF0C\u672C\u7CFB\u7EDF\u4E0D\u4E88\u652F\u6301\uFF0C\u5BF9\u4E8E\u5206\u8FA8\u7387\u5927\u4E8E4\u5146\u7684\u89C6\u9891\uFF0C\u672C\u7CFB\u7EDF\u4E0D\u4E88\u652F\u6301
+asn_ip_group_delete=(\u8BE5ASN\u7EC4\u4E0B\u7684IP\u914D\u7F6E\u4E5F\u4F1A\u88AB\u5220\u9664)
\ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/basics/policyGroupList.jsp b/src/main/webapp/WEB-INF/views/basics/policyGroupList.jsp index 94c2a2b..8f12f35 100644 --- a/src/main/webapp/WEB-INF/views/basics/policyGroupList.jsp +++ b/src/main/webapp/WEB-INF/views/basics/policyGroupList.jsp @@ -46,6 +46,7 @@ if(str.substr(str.length-1)== ','){ ids = str.substr(0,str.length-1); } + var canDel=true; var tip='<spring:message code="can_not_delete_issued_asn_group"/>'; if(serviceGroupIds.length>0){ @@ -60,7 +61,7 @@ } } }); - if(canDel){ + /* if(canDel){ // 不能删除包含ASN IP的 ASN组 $.ajax({ type:'post', url:'${ctx}/basics/policyGroup/ajaxHasAsnIPs', @@ -73,11 +74,35 @@ } } }); - } + } */ } if(canDel){ - window.location = url+"&ids="+ids; - }else{ + var added = ""; + if(serviceGroupIds.length != 0){ + added = "<spring:message code='asn_ip_group_delete'/>"; + } + top.$.jBox.confirm("<spring:message code='confirm_message'/>"+added,"<spring:message code='info'/>",function(v,h,f){ + if(v=="ok"){ + if(serviceGroupIds.length != 0){ + $.ajax({ + type:'post', + url:'${ctx}/basics/asn/ajaxDeleteAsnIp', + data:{"ids":serviceGroupIds.join(',')}, + async:false, + success:function(data,textStatus){ + if(textStatus == "success"){ + window.location = url+"&ids="+ids; + } + } + }); + }else{ + window.location = url+"&ids="+ids; + } + + } + },{buttonsFocus:1}); + top.$('.jbox-body .jbox-icon').css('top','55px'); + }else{ $.jBox.tip(tip); return false; } @@ -159,6 +184,7 @@ <a href="javascript:void(0);" class="btn btn-default" onclick="deletes('${ctx}/basics/policyGroup/delete?isValid=0')" data-toggle="tooltip" data-placement="top"> <i class="fa fa-trash"> <spring:message code="delete"/></i> </a> + <%-- <sys:delRow url="${ctx}/basics/asn/delete?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow> --%> <%-- </shiro:hasPermission> --%> <a class="btn btn-icon-only btn-default setfields tooltips" @@ -211,7 +237,7 @@ <!-- /筛选搜索内容栏 结束--> </form:form> </div> - <sys:message content="${message}" /> + <sys:message content="${message}" type="${messageType }"/> <div class="table-responsive"> <table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap"> <thead> diff --git a/src/main/webapp/WEB-INF/views/basics/serviceDictForm.jsp b/src/main/webapp/WEB-INF/views/basics/serviceDictForm.jsp index 407c786..88d39f6 100644 --- a/src/main/webapp/WEB-INF/views/basics/serviceDictForm.jsp +++ b/src/main/webapp/WEB-INF/views/basics/serviceDictForm.jsp @@ -199,7 +199,7 @@ label.errorShow { <!-- BEGIN FORM--> <form:form id="inputForm" modelAttribute="serviceDictInfo" action="${ctx}/basics/serviceDictInfo/saveOrUpdate?itType=${itType}" method="post" class="form-horizontal"> <form:hidden path="serviceDictId"/> - <sys:message content="${message}"/> + <sys:message content="${message}" type="${messageType }"/> <div class="form-group <c:if test="${itType==5 }"> hidden </c:if> " > <label class="col-md-3 control-label"><spring:message code="superior_config"/>:</label> <div class="col-md-4"> diff --git a/src/main/webapp/WEB-INF/views/basics/serviceDictInfo.jsp b/src/main/webapp/WEB-INF/views/basics/serviceDictInfo.jsp index 12ebb72..1f46f64 100644 --- a/src/main/webapp/WEB-INF/views/basics/serviceDictInfo.jsp +++ b/src/main/webapp/WEB-INF/views/basics/serviceDictInfo.jsp @@ -37,7 +37,7 @@ <!-- BEGIN FORM--> <form:form id="inputForm" modelAttribute="serviceDictInfo" action="${ctx}/basics/serviceDictInfo/saveOrUpdate" method="post" class="form-horizontal"> <form:hidden path="serviceDictId"/> - <sys:message content="${message}"/> + <sys:message content="${message}" type="${messageType }"/> <div class="form-group"> <label class="col-md-3 control-label"><font color="red">*</font><spring:message code="superior_config"/>:</label> <div class="col-md-4"> diff --git a/src/main/webapp/WEB-INF/views/basics/serviceDictList.jsp b/src/main/webapp/WEB-INF/views/basics/serviceDictList.jsp index 62e4054..8c28291 100644 --- a/src/main/webapp/WEB-INF/views/basics/serviceDictList.jsp +++ b/src/main/webapp/WEB-INF/views/basics/serviceDictList.jsp @@ -265,7 +265,7 @@ - <sys:message content="${message}"/> + <sys:message content="${message}" type="${messageType }"/> <div class="table-responsive"> <table id="treeTable" class="table table-striped table-bordered table-condensed text-nowrap"> diff --git a/src/main/webapp/WEB-INF/views/basics/sysDictForm.jsp b/src/main/webapp/WEB-INF/views/basics/sysDictForm.jsp index 476d218..1f2c429 100644 --- a/src/main/webapp/WEB-INF/views/basics/sysDictForm.jsp +++ b/src/main/webapp/WEB-INF/views/basics/sysDictForm.jsp @@ -143,7 +143,7 @@ <!-- BEGIN FORM--> <form:form id="inputForm" modelAttribute="sysDictInfo" action="${ctx}/basics/sysDictInfo/saveOrUpdate?itType=${itType}" method="post" class="form-horizontal"> <form:hidden path="sysDictId"/> - <sys:message content="${message}"/> + <sys:message content="${message}" type="${messageType }"/> <c:if test="${specType == null or specType!=3 }"> <div class="form-group"> <label class="col-md-3 control-label"><spring:message code="superior_config"/>:</label> diff --git a/src/main/webapp/WEB-INF/views/basics/sysDictInfo.jsp b/src/main/webapp/WEB-INF/views/basics/sysDictInfo.jsp index de02873..b33933a 100644 --- a/src/main/webapp/WEB-INF/views/basics/sysDictInfo.jsp +++ b/src/main/webapp/WEB-INF/views/basics/sysDictInfo.jsp @@ -37,7 +37,7 @@ <!-- BEGIN FORM--> <form:form id="inputForm" modelAttribute="sysDictInfo" action="${ctx}/basics/sysDictInfo/saveOrUpdate" method="post" class="form-horizontal"> <form:hidden path="sysDictId"/> - <sys:message content="${message}"/> + <sys:message content="${message}" type="${messageType }"/> <c:if test="${specType == null or specType!=3 }"> <div class="form-group"> <label class="col-md-3 control-label"><font color="red">*</font><spring:message code="superior_config"/>:</label> diff --git a/src/main/webapp/WEB-INF/views/basics/sysDictList.jsp b/src/main/webapp/WEB-INF/views/basics/sysDictList.jsp index d5ead09..c81d0d8 100644 --- a/src/main/webapp/WEB-INF/views/basics/sysDictList.jsp +++ b/src/main/webapp/WEB-INF/views/basics/sysDictList.jsp @@ -294,7 +294,7 @@ - <sys:message content="${message}"/> + <sys:message content="${message}" type="${messageType }"/> <div class="table-responsive"> <table id="treeTable" class="table table-striped table-bordered table-condensed text-nowrap"> diff --git a/src/main/webapp/WEB-INF/views/basics/taskInfoForm.jsp b/src/main/webapp/WEB-INF/views/basics/taskInfoForm.jsp index 8a97162..bdcc1a5 100644 --- a/src/main/webapp/WEB-INF/views/basics/taskInfoForm.jsp +++ b/src/main/webapp/WEB-INF/views/basics/taskInfoForm.jsp @@ -22,7 +22,7 @@ <div class="portlet-body form"> <!-- BEGIN FORM--> <form:form action="${ctx}/basics/taskInfo/saveOrUpdate" modelAttribute="taskInfo" class="form-horizontal" id="inputForm" method="post" > - <sys:message content="${message}"/> + <sys:message content="${message}" type="${messageType }"/> <input type="hidden" name="id" value="${taskInfo.id}"/> <div class="form-body"> <div class="form-group"> diff --git a/src/main/webapp/WEB-INF/views/basics/taskInfoList.jsp b/src/main/webapp/WEB-INF/views/basics/taskInfoList.jsp index cb27ef2..cca8c26 100644 --- a/src/main/webapp/WEB-INF/views/basics/taskInfoList.jsp +++ b/src/main/webapp/WEB-INF/views/basics/taskInfoList.jsp @@ -153,7 +153,7 @@ </form:form> </div> - <sys:message content="${message}"/> + <sys:message content="${message}" type="${messageType }"/> <div class="table-responsive"> <table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap"> diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appBuiltinFeatureFileList.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appBuiltinFeatureFileList.jsp index 91c8e5b..5b02467 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appBuiltinFeatureFileList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appBuiltinFeatureFileList.jsp @@ -240,7 +240,7 @@ <!-- /筛选搜索内容栏 结束--> </form:form> </div> - <sys:message content="${message}" /> + <sys:message content="${message}" type="${messageType }"/> <div class="table-responsive"> <table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap"> diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appIpCfgList.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appIpCfgList.jsp index f5ac99c..c01f377 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appIpCfgList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appIpCfgList.jsp @@ -302,7 +302,7 @@ <!-- /筛选搜索内容栏 结束--> </form:form> </div> - <sys:message content="${message}"/> + <sys:message content="${message}" type="${messageType }"/> <div class="table-responsive"> <table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap"> <thead> diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appMultiFeatureCfgList.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appMultiFeatureCfgList.jsp index b0f3ce1..23a5b22 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appMultiFeatureCfgList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appMultiFeatureCfgList.jsp @@ -348,7 +348,7 @@ <!-- /筛选搜索内容栏 结束--> </form:form> </div> - <sys:message content="${message}"/> + <sys:message content="${message}" type="${messageType }"/> <div class="table-responsive"> <table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap"> <thead> diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appTcpCfgList.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appTcpCfgList.jsp index afcc17d..373b78f 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appTcpCfgList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appTcpCfgList.jsp @@ -269,7 +269,7 @@ <!-- /筛选搜索内容栏 结束--> </form:form> </div> - <sys:message content="${message}"/> + <sys:message content="${message}" type="${messageType }"/> <div class="table-responsive"> <table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap"> <thead> diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appTopicDomainCfgList.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appTopicDomainCfgList.jsp index dc89479..58d1ed1 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appTopicDomainCfgList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appTopicDomainCfgList.jsp @@ -278,7 +278,7 @@ <!-- /筛选搜索内容栏 结束--> </form:form> </div> - <sys:message content="${message}"/> + <sys:message content="${message}" type="${messageType }"/> <div class="table-responsive"> <table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap"> <thead> diff --git a/src/main/webapp/WEB-INF/views/cfg/av/contIp/contIpList.jsp b/src/main/webapp/WEB-INF/views/cfg/av/contIp/contIpList.jsp index 6fa88f2..84151f4 100644 --- a/src/main/webapp/WEB-INF/views/cfg/av/contIp/contIpList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/av/contIp/contIpList.jsp @@ -330,7 +330,7 @@ <!-- /筛选搜索内容栏 结束--> </form:form> </div> - <sys:message content="${message}" /> + <sys:message content="${message}" type="${messageType }"/> <div class="table-responsive"> <table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap"> <thead> diff --git a/src/main/webapp/WEB-INF/views/cfg/av/contUrl/contUrlList.jsp b/src/main/webapp/WEB-INF/views/cfg/av/contUrl/contUrlList.jsp index 24b52cd..34dcada 100644 --- a/src/main/webapp/WEB-INF/views/cfg/av/contUrl/contUrlList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/av/contUrl/contUrlList.jsp @@ -362,7 +362,7 @@ <!-- /筛选搜索内容栏 结束--> </form:form> </div> - <sys:message content="${message}" /> + <sys:message content="${message}" type="${messageType }"/> <div class="table-responsive"> <table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap"> <thead> diff --git a/src/main/webapp/WEB-INF/views/cfg/av/fileSampleSubList.jsp b/src/main/webapp/WEB-INF/views/cfg/av/fileSampleSubList.jsp index ef46d3d..a6f920b 100644 --- a/src/main/webapp/WEB-INF/views/cfg/av/fileSampleSubList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/av/fileSampleSubList.jsp @@ -31,7 +31,7 @@ <label><spring:message code='src_file' />:</label> <a href="javascript:;" data-original-title="${cfg.srcUrl}" class="tooltips" data-flag="false" data-html="true" data-placement="top"> - ${fns:abbr(cfg.srcUrl,100)} + ${fns:abbr(cfg.srcUrl,40)} </a> </div> </div> @@ -42,7 +42,7 @@ <label><spring:message code='sample_file' />:</label> <a href="${cfg.sampleUrl }" target="_blank" data-original-title="${cfg.sampleUrl }" class="tooltips" data-flag="false" data-html="true" data-placement="top"> - ${fn:substring(cfg.sampleUrl,0,100) } + ${fn:substring(cfg.sampleUrl,0,40) } </a> </div> </div> diff --git a/src/main/webapp/WEB-INF/views/cfg/av/picIp/picIpList.jsp b/src/main/webapp/WEB-INF/views/cfg/av/picIp/picIpList.jsp index 49b89bc..03bef44 100644 --- a/src/main/webapp/WEB-INF/views/cfg/av/picIp/picIpList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/av/picIp/picIpList.jsp @@ -330,7 +330,7 @@ <!-- /筛选搜索内容栏 结束--> </form:form> </div> - <sys:message content="${message}" /> + <sys:message content="${message}" type="${messageType }"/> <div class="table-responsive"> <table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap"> diff --git a/src/main/webapp/WEB-INF/views/cfg/av/picUrl/picUrlList.jsp b/src/main/webapp/WEB-INF/views/cfg/av/picUrl/picUrlList.jsp index e1f878d..7e4a5df 100644 --- a/src/main/webapp/WEB-INF/views/cfg/av/picUrl/picUrlList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/av/picUrl/picUrlList.jsp @@ -328,7 +328,7 @@ <!-- /筛选搜索内容栏 结束--> </form:form> </div> - <sys:message content="${message}" /> + <sys:message content="${message}" type="${messageType }"/> <div class="table-responsive"> <table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap"> <thead> diff --git a/src/main/webapp/WEB-INF/views/cfg/av/signSampleList.jsp b/src/main/webapp/WEB-INF/views/cfg/av/signSampleList.jsp index 16b089a..905e0d6 100644 --- a/src/main/webapp/WEB-INF/views/cfg/av/signSampleList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/av/signSampleList.jsp @@ -285,7 +285,7 @@ <!-- /筛选搜索内容栏 结束--> </form:form> </div> - <sys:message content="${message}" /> + <sys:message content="${message}" type="${messageType }"/> <div class="table-responsive"> <table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap"> diff --git a/src/main/webapp/WEB-INF/views/cfg/av/switchSignSample.jsp b/src/main/webapp/WEB-INF/views/cfg/av/switchSignSample.jsp index 8fd0817..20da478 100644 --- a/src/main/webapp/WEB-INF/views/cfg/av/switchSignSample.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/av/switchSignSample.jsp @@ -87,7 +87,7 @@ $(function(){ </div> </div> <div class="portlet-body form"> - <sys:message content="${message}" /> + <sys:message content="${message}" type="${messageType }"/> <shiro:hasPermission name="avSignSample:preset"> <form id="presetFrom" action="${ctx}/ntc/av/sample/auditAvSignSample" method="get" class="form-horizontal"> <input type="hidden" name="functionId" value="${functionId }"> diff --git a/src/main/webapp/WEB-INF/views/cfg/av/voip/voipList.jsp b/src/main/webapp/WEB-INF/views/cfg/av/voip/voipList.jsp index 0c79725..e375a44 100644 --- a/src/main/webapp/WEB-INF/views/cfg/av/voip/voipList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/av/voip/voipList.jsp @@ -354,7 +354,7 @@ <!-- /筛选搜索内容栏 结束--> </form:form> </div> - <sys:message content="${message}" /> + <sys:message content="${message}" type="${messageType }"/> <div class="table-responsive"> <table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap"> <thead> diff --git a/src/main/webapp/WEB-INF/views/cfg/common/domainList.jsp b/src/main/webapp/WEB-INF/views/cfg/common/domainList.jsp index dfef6df..e7b04fb 100644 --- a/src/main/webapp/WEB-INF/views/cfg/common/domainList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/common/domainList.jsp @@ -267,7 +267,7 @@ <!-- /筛选搜索内容栏 结束--> </form:form> </div> - <sys:message content="${message}"/> + <sys:message content="${message}" type="${messageType }"/> <div class="table-responsive"> <table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap"> diff --git a/src/main/webapp/WEB-INF/views/cfg/common/ipList.jsp b/src/main/webapp/WEB-INF/views/cfg/common/ipList.jsp index 09ace55..d49c709 100644 --- a/src/main/webapp/WEB-INF/views/cfg/common/ipList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/common/ipList.jsp @@ -339,7 +339,7 @@ <!-- /筛选搜索内容栏 结束--> </form:form> </div> - <sys:message content="${message}"/> + <sys:message content="${message}" type="${messageType }"/> <div class="table-responsive"> <table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap"> diff --git a/src/main/webapp/WEB-INF/views/cfg/ddosIpCfgList.jsp b/src/main/webapp/WEB-INF/views/cfg/ddosIpCfgList.jsp index 4c6eb5c..1b421c5 100644 --- a/src/main/webapp/WEB-INF/views/cfg/ddosIpCfgList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/ddosIpCfgList.jsp @@ -312,7 +312,7 @@ <!-- /筛选搜索内容栏 结束--> </form:form> </div> - <sys:message content="${message}"/> + <sys:message content="${message}" type="${messageType }"/> <div class="table-responsive"> <table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap"> <thead> diff --git a/src/main/webapp/WEB-INF/views/cfg/dnsIpCfgList.jsp b/src/main/webapp/WEB-INF/views/cfg/dnsIpCfgList.jsp index 90ac09d..925abea 100644 --- a/src/main/webapp/WEB-INF/views/cfg/dnsIpCfgList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/dnsIpCfgList.jsp @@ -309,7 +309,7 @@ <!-- /筛选搜索内容栏 结束--> </form:form> </div> - <sys:message content="${message}" /> + <sys:message content="${message}" type="${messageType }"/> <div class="table-responsive"> <table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap"> <thead> diff --git a/src/main/webapp/WEB-INF/views/cfg/fileTransfer/fileDigestList.jsp b/src/main/webapp/WEB-INF/views/cfg/fileTransfer/fileDigestList.jsp index fc36a02..5a928e7 100644 --- a/src/main/webapp/WEB-INF/views/cfg/fileTransfer/fileDigestList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/fileTransfer/fileDigestList.jsp @@ -362,7 +362,7 @@ <!-- /筛选搜索内容栏 结束--> </form:form> </div> - <sys:message content="${message}" /> + <sys:message content="${message}" type="${messageType }"/> <div class="table-responsive"> <table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap"> diff --git a/src/main/webapp/WEB-INF/views/cfg/fileTransfer/fileDigestLogSubList.jsp b/src/main/webapp/WEB-INF/views/cfg/fileTransfer/fileDigestLogSubList.jsp index 5f39147..c9f4f40 100644 --- a/src/main/webapp/WEB-INF/views/cfg/fileTransfer/fileDigestLogSubList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/fileTransfer/fileDigestLogSubList.jsp @@ -2,6 +2,7 @@ <%@ include file="/WEB-INF/include/taglib.jsp"%>
<html>
<head>
+<script src="${pageContext.request.contextPath}/static/global/scripts/app.min.js" type="text/javascript"></script>
<script>
$(document).ready(function() {
//$("div[name='tabTitle"+index+"']").get(0).click();
@@ -10,6 +11,7 @@ <style type="text/css">
</style>
</head>
+
<c:forEach items="${tabList}" var="region" varStatus="regionStatus">
<div id="${region[1]}Title${index}" onclick="switchSubCfgTabInfo('${region[1]}',${index})"
class="col-md-1 tabInfo" name="tabTitle${index }">
@@ -23,24 +25,24 @@ <c:set value="${_cfg}" var="cfg"></c:set>
<c:if test="${region[1] eq cfg.cfgType }">
<div id="${region[1]}Info${index}" class="content" name="subCfg${index}">
- <div class="row" style="margin-top: 5px;">
+ <div class="row">
<div class="col-md-8">
<div class="form-group">
- <label><spring:message code='digest' />:</label>
- <a href="javascript:;" title="${cfg.digest}"
- class="tooltips" data-flag="false" data-html="true" data-placement="top">
- ${fns:abbr(cfg.digest,40)}
- </a>
+ <label><spring:message code='file_url' />:</label>
+ <a href="${cfg.fileUrl}" data-original-title="${cfg.fileUrl}"
+ class="tooltips" data-flag="false" data-html="true" data-placement="top">
+ ${fns:abbr(cfg.fileUrl,40)}
+ </a>
</div>
</div>
</div>
<div class="row">
<div class="col-md-8">
<div class="form-group">
- <label><spring:message code='file_url' />:</label>
- <a href="${cfg.fileUrl }" target="_blank" title="${cfg.fileUrl }"
+ <label><spring:message code='digest' />:</label>
+ <a href="javascript:;" target="_blank" data-original-title="${cfg.digest}"
class="tooltips" data-flag="false" data-html="true" data-placement="top">
- ${fn:substring(cfg.fileUrl,0,40) }
+ ${fn:substring(cfg.digest,0,40) }
</a>
</div>
</div>
@@ -69,7 +71,7 @@ </div>
</div>
</div>
- </c:if>
+ </c:if>
</c:if>
</c:forEach>
</html>
\ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/cfg/fileTransfer/ftpList.jsp b/src/main/webapp/WEB-INF/views/cfg/fileTransfer/ftpList.jsp index 3bf1df2..5234db1 100644 --- a/src/main/webapp/WEB-INF/views/cfg/fileTransfer/ftpList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/fileTransfer/ftpList.jsp @@ -334,7 +334,7 @@ <!-- /筛选搜索内容栏 结束--> </form:form> </div> - <sys:message content="${message}"/> + <sys:message content="${message}" type="${messageType }"/> <div class="table-responsive"> <table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap"> <thead> diff --git a/src/main/webapp/WEB-INF/views/cfg/fileTransfer/p2pList.jsp b/src/main/webapp/WEB-INF/views/cfg/fileTransfer/p2pList.jsp index 46a86f6..b2f6956 100644 --- a/src/main/webapp/WEB-INF/views/cfg/fileTransfer/p2pList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/fileTransfer/p2pList.jsp @@ -348,7 +348,7 @@ <!-- /筛选搜索内容栏 结束--> </form:form> </div> - <sys:message content="${message}"/> + <sys:message content="${message}" type="${messageType }"/> <div class="table-responsive"> <table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap"> <thead> diff --git a/src/main/webapp/WEB-INF/views/cfg/mail/mailList.jsp b/src/main/webapp/WEB-INF/views/cfg/mail/mailList.jsp index 20558da..4a136d9 100644 --- a/src/main/webapp/WEB-INF/views/cfg/mail/mailList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/mail/mailList.jsp @@ -349,7 +349,7 @@ <!-- /筛选搜索内容栏 结束--> </form:form> </div> - <sys:message content="${message}"/> + <sys:message content="${message}" type="${messageType }"/> <div class="table-responsive"> <table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap"> <thead> diff --git a/src/main/webapp/WEB-INF/views/cfg/mail/mailSubList.jsp b/src/main/webapp/WEB-INF/views/cfg/mail/mailSubList.jsp index be6ccf8..c0acd71 100644 --- a/src/main/webapp/WEB-INF/views/cfg/mail/mailSubList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/mail/mailSubList.jsp @@ -109,7 +109,6 @@ </div> </div> </div> - </div> </c:if> </c:forEach> </c:if> diff --git a/src/main/webapp/WEB-INF/views/cfg/maintenance/dnsResStrategy/list.jsp b/src/main/webapp/WEB-INF/views/cfg/maintenance/dnsResStrategy/list.jsp index e4b5577..859df59 100644 --- a/src/main/webapp/WEB-INF/views/cfg/maintenance/dnsResStrategy/list.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/maintenance/dnsResStrategy/list.jsp @@ -293,7 +293,7 @@ <!-- /筛选搜索内容栏 结束--> </form:form> </div> - <sys:message content="${message}" /> + <sys:message content="${message}" type="${messageType }"/> <div class="table-responsive"> <table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap"> diff --git a/src/main/webapp/WEB-INF/views/cfg/maintenance/ipMultiplexPool/list.jsp b/src/main/webapp/WEB-INF/views/cfg/maintenance/ipMultiplexPool/list.jsp index 159b9a4..578f811 100644 --- a/src/main/webapp/WEB-INF/views/cfg/maintenance/ipMultiplexPool/list.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/maintenance/ipMultiplexPool/list.jsp @@ -275,7 +275,7 @@ <!-- /筛选搜索内容栏 结束--> </form:form> </div> - <sys:message content="${message}"/> + <sys:message content="${message}" type="${messageType }"/> <div class="table-responsive"> <table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap"> <thead> diff --git a/src/main/webapp/WEB-INF/views/cfg/maintenance/ipMultiplexPool/snatlist.jsp b/src/main/webapp/WEB-INF/views/cfg/maintenance/ipMultiplexPool/snatlist.jsp index e29e50f..bafe889 100644 --- a/src/main/webapp/WEB-INF/views/cfg/maintenance/ipMultiplexPool/snatlist.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/maintenance/ipMultiplexPool/snatlist.jsp @@ -295,7 +295,7 @@ <!-- /筛选搜索内容栏 结束--> </form:form> </div> - <sys:message content="${message}"/> + <sys:message content="${message}" type="${messageType }"/> <div class="table-responsive"> <table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap"> <thead> diff --git a/src/main/webapp/WEB-INF/views/cfg/maintenance/userManage/list.jsp b/src/main/webapp/WEB-INF/views/cfg/maintenance/userManage/list.jsp index fd54b58..fe09162 100644 --- a/src/main/webapp/WEB-INF/views/cfg/maintenance/userManage/list.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/maintenance/userManage/list.jsp @@ -221,7 +221,7 @@ <!-- /筛选搜索内容栏 结束--> </form:form> </div> - <sys:message content="${message}"/> + <sys:message content="${message}" type="${messageType }"/> <div class="table-responsive"> <table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap"> <thead> diff --git a/src/main/webapp/WEB-INF/views/cfg/maintenance/userManage/userView.jsp b/src/main/webapp/WEB-INF/views/cfg/maintenance/userManage/userView.jsp index 0c94029..d52aab6 100644 --- a/src/main/webapp/WEB-INF/views/cfg/maintenance/userManage/userView.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/maintenance/userManage/userView.jsp @@ -31,7 +31,7 @@ <div class="form-body"> <!-- BEGIN FORM--> <form:form id="inputForm" modelAttribute="user" action="#" method="post" class="form-horizontal"> - <sys:message content="${message}"/> + <sys:message content="${message}" type="${messageType }"/> <div class="row"> <div class="col-md-6"> <div class="form-group"> diff --git a/src/main/webapp/WEB-INF/views/cfg/manipulation/ipmulitiplex/dnatSubList.jsp b/src/main/webapp/WEB-INF/views/cfg/manipulation/ipmulitiplex/dnatSubList.jsp index 3a9b96e..fe82f96 100644 --- a/src/main/webapp/WEB-INF/views/cfg/manipulation/ipmulitiplex/dnatSubList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/manipulation/ipmulitiplex/dnatSubList.jsp @@ -26,7 +26,7 @@ <c:if test="${region[1] eq cfg.cfgType }">
<div id="${region[1]}Info${index}" class="content" name="subCfg${index}">
<div class="row" style="margin-top: 5px;">
- <div class="col-md-4">
+ <div class="col-md-8">
<div class="form-group">
<label><spring:message code='original_dest_ip'/>:</label>
<label>
@@ -34,7 +34,9 @@ </label>
</div>
</div>
- <div class="col-md-4">
+ </div>
+ <div class="row">
+ <div class="col-md-8">
<div class="form-group">
<label><spring:message code='original_dest_port'/>:</label>
<label>
@@ -42,9 +44,9 @@ </label>
</div>
</div>
- </div>
+ </div>
<div class="row">
- <div class="col-md-4">
+ <div class="col-md-8">
<div class="form-group">
<label><spring:message code='translated_dest_ip'/>:</label>
<label>
@@ -52,14 +54,16 @@ </label>
</div>
</div>
- <div class="col-md-4">
+ </div>
+ <div class="row">
+ <div class="col-md-8">
<div class="form-group">
<label><spring:message code='translated_dest_port'/>:</label> <label> ${cfg.destPort }</label>
</div>
</div>
</div>
<div class="row">
- <div class="col-md-4">
+ <div class="col-md-8">
<div class="form-group">
<label><spring:message code='protocol'/>:</label>
<label>
diff --git a/src/main/webapp/WEB-INF/views/cfg/manipulation/ipmulitiplex/snatSubList.jsp b/src/main/webapp/WEB-INF/views/cfg/manipulation/ipmulitiplex/snatSubList.jsp index f444d04..5d775fe 100644 --- a/src/main/webapp/WEB-INF/views/cfg/manipulation/ipmulitiplex/snatSubList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/manipulation/ipmulitiplex/snatSubList.jsp @@ -26,7 +26,7 @@ <c:if test="${region[1] eq cfg.cfgType }">
<div id="${region[1]}Info${index}" class="content" name="subCfg${index}">
<div class="row" style="margin-top: 5px;">
- <div class="col-md-4">
+ <div class="col-md-10">
<div class="form-group">
<label><spring:message code='address_pool'/>:</label>
<label>
@@ -38,7 +38,9 @@ </label>
</div>
</div>
- <div class="col-md-4">
+ </div>
+ <div class="row">
+ <div class="col-md-10">
<div class="form-group">
<label><spring:message code='user_type'/>:</label>
<label>
@@ -54,6 +56,7 @@ </label>
</div>
</div>
+
</div>
<div class="row">
<div class="col-md-4">
diff --git a/src/main/webapp/WEB-INF/views/cfg/other/bgpList.jsp b/src/main/webapp/WEB-INF/views/cfg/other/bgpList.jsp index 604a723..14b6da3 100644 --- a/src/main/webapp/WEB-INF/views/cfg/other/bgpList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/other/bgpList.jsp @@ -348,7 +348,7 @@ <!-- /筛选搜索内容栏 结束--> </form:form> </div> - <sys:message content="${message}"/> + <sys:message content="${message}" type="${messageType }"/> <div class="table-responsive"> <table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap"> <thead> diff --git a/src/main/webapp/WEB-INF/views/cfg/proxy/cache/list.jsp b/src/main/webapp/WEB-INF/views/cfg/proxy/cache/list.jsp index 936f3aa..5174d23 100644 --- a/src/main/webapp/WEB-INF/views/cfg/proxy/cache/list.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/proxy/cache/list.jsp @@ -335,7 +335,7 @@ <!-- /筛选搜索内容栏 结束--> </form:form> </div> - <sys:message content="${message}"/> + <sys:message content="${message}" type="${messageType }"/> <div class="table-responsive"> <table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap"> <thead> diff --git a/src/main/webapp/WEB-INF/views/cfg/proxy/control/httpRedirectList.jsp b/src/main/webapp/WEB-INF/views/cfg/proxy/control/httpRedirectList.jsp index 6ca0082..08a5e9d 100644 --- a/src/main/webapp/WEB-INF/views/cfg/proxy/control/httpRedirectList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/proxy/control/httpRedirectList.jsp @@ -540,7 +540,7 @@ <!-- /筛选搜索内容栏 结束--> </form:form> </div> - <sys:message content="${message}"/> + <sys:message content="${message}" type="${messageType }"/> <div class="table-responsive"> <table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap"> <thead> diff --git a/src/main/webapp/WEB-INF/views/cfg/proxy/control/httpReqReplaceList.jsp b/src/main/webapp/WEB-INF/views/cfg/proxy/control/httpReqReplaceList.jsp index 2d9b8cf..9a9cdaa 100644 --- a/src/main/webapp/WEB-INF/views/cfg/proxy/control/httpReqReplaceList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/proxy/control/httpReqReplaceList.jsp @@ -262,7 +262,7 @@ <!-- /筛选搜索内容栏 结束--> </form:form> </div> - <sys:message content="${message}" /> + <sys:message content="${message}" type="${messageType }"/> <div class="table-responsive"> <table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap"> diff --git a/src/main/webapp/WEB-INF/views/cfg/proxy/fileStrategy/list.jsp b/src/main/webapp/WEB-INF/views/cfg/proxy/fileStrategy/list.jsp index 5643605..34375d0 100644 --- a/src/main/webapp/WEB-INF/views/cfg/proxy/fileStrategy/list.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/proxy/fileStrategy/list.jsp @@ -270,7 +270,7 @@ <!-- /筛选搜索内容栏 结束--> </form:form> </div> - <sys:message content="${message}"/> + <sys:message content="${message}" type="${messageType }"/> <div class="table-responsive"> <table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap"> <thead> diff --git a/src/main/webapp/WEB-INF/views/cfg/requestForm.jsp b/src/main/webapp/WEB-INF/views/cfg/requestForm.jsp index 8b753d6..ea1e959 100644 --- a/src/main/webapp/WEB-INF/views/cfg/requestForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/requestForm.jsp @@ -22,7 +22,7 @@ <div class="portlet-body form"> <!-- BEGIN FORM--> <form:form action="${ctx}/cfg/request/saveOrUpdate" modelAttribute="requestInfo" class="form-horizontal" id="inputForm" method="post" > - <sys:message content="${message}"/> + <sys:message content="${message}" type="${messageType }"/> <input type="hidden" name="id" value="${requestInfo.id}"/> <div class="form-body"> <div class="form-group"> diff --git a/src/main/webapp/WEB-INF/views/cfg/requestList.jsp b/src/main/webapp/WEB-INF/views/cfg/requestList.jsp index b0a86f4..25c1b47 100644 --- a/src/main/webapp/WEB-INF/views/cfg/requestList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/requestList.jsp @@ -165,7 +165,7 @@ </div> - <sys:message content="${message}"/> + <sys:message content="${message}" type="${messageType }"/> <div class="table-responsive"> <table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap"> diff --git a/src/main/webapp/WEB-INF/views/cfg/resultPage.jsp b/src/main/webapp/WEB-INF/views/cfg/resultPage.jsp index 004bd7b..d9ad401 100644 --- a/src/main/webapp/WEB-INF/views/cfg/resultPage.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/resultPage.jsp @@ -11,7 +11,7 @@ $(document).ready(function() { </head> <body> <div class="page-content"> -<sys:message content="${message}"/> +<sys:message content="${message}" type="${messageType }"/> </div> </body> </html>
\ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/cfg/website/dnsList.jsp b/src/main/webapp/WEB-INF/views/cfg/website/dnsList.jsp index 2853c5a..a601f3e 100644 --- a/src/main/webapp/WEB-INF/views/cfg/website/dnsList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/website/dnsList.jsp @@ -346,7 +346,7 @@ <!-- /筛选搜索内容栏 结束--> </form:form> </div> - <sys:message content="${message}"/> + <sys:message content="${message}" type="${messageType }"/> <div class="table-responsive"> <table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap"> <thead> diff --git a/src/main/webapp/WEB-INF/views/cfg/website/sslList.jsp b/src/main/webapp/WEB-INF/views/cfg/website/sslList.jsp index 44a9915..48769a0 100644 --- a/src/main/webapp/WEB-INF/views/cfg/website/sslList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/website/sslList.jsp @@ -345,7 +345,7 @@ <!-- /筛选搜索内容栏 结束--> </form:form> </div> - <sys:message content="${message}"/> + <sys:message content="${message}" type="${messageType }"/> <div class="table-responsive"> <table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap"> <thead> diff --git a/src/main/webapp/WEB-INF/views/cfg/whitelist/domainList.jsp b/src/main/webapp/WEB-INF/views/cfg/whitelist/domainList.jsp index 4e7765c..96acf63 100644 --- a/src/main/webapp/WEB-INF/views/cfg/whitelist/domainList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/whitelist/domainList.jsp @@ -326,7 +326,7 @@ <!-- /筛选搜索内容栏 结束--> </form:form> </div> - <sys:message content="${message}"/> + <sys:message content="${message}" type="${messageType }"/> <div class="table-responsive"> <table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap"> <thead> diff --git a/src/main/webapp/WEB-INF/views/dashboard/trafficActionTransList.jsp b/src/main/webapp/WEB-INF/views/dashboard/trafficActionTransList.jsp index 96c7dce..3776ae8 100644 --- a/src/main/webapp/WEB-INF/views/dashboard/trafficActionTransList.jsp +++ b/src/main/webapp/WEB-INF/views/dashboard/trafficActionTransList.jsp @@ -17,10 +17,42 @@ <h3 class="page-title">
<spring:message code="${searchAction}"></spring:message>
</h3>
-
+ <div class="row" >
+ <form:form id="searchForm" method="get" class="form-search">
+ <!-- 搜索内容与操作按钮栏 -->
+ <div class="col-md-12">
+ <div class="pull-left">
+ <div class="input-group">
+ <div class="input-group-btn">
+ <span class="selectpicker form-control" ><spring:message code="begin_date"/></span>
+ </div>
+ <input id="beginDate" name="beginDate" type="text" readonly="readonly" class="form-control Wdate input-medium"
+ value="" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:00',isShowClear:true,maxDate:'${endDate}'});"/>
+ </div>
+ </div>
+ <div class="pull-left">
+ <div class="input-group">
+ <div class="input-group-btn">
+ <span class="selectpicker form-control" ><spring:message code="end_date"/></span>
+ </div>
+ <input id="endDate" name="endDate" type="text" readonly="readonly" class="form-control Wdate input-medium"
+ value="" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:00',isShowClear:true,maxDate:'${endDate}'});"/>
+ </div>
+ </div>
+
+ <div class="pull-left">
+ <button type="button" class="btn blue" onClick="return searchList()"> <i class="fa fa-search"></i> <spring:message code="search"/> </button>
+ <button type="button" class="btn btn-default" id="resetBtn" > <i class="fa fa-refresh"></i> <spring:message code="reset"/> </button>
+ </div>
+ </div>
+ <!-- 搜索内容与操作按钮栏 -->
+ </form:form>
+ </div>
<div id="chart" style="width:97%;height:550px;"></div>
<input id="searchAction" name="searchAction" type="hidden" value="${searchAction}"/>
+ <input id="beginDateh" type="hidden" value="${beginDate}"/>
+ <input id="endDateh" type="hidden" value="${endDate}"/>
</div>
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/highcharts.js"></script>
@@ -30,8 +62,36 @@ <%-- <script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/themes/grid.js"></script> --%>
<script type="text/javascript">
$(document).ready(function(){
- actionTransAjax($("#searchAction").val());
+ var starth=$("#beginDateh").val();
+ var endh=$("#endDateh").val();
+ $("#beginDate").val(starth);
+ $("#endDate").val(endh);
+ actionTransAjax($("#searchAction").val(),starth,endh);
+ //筛选功能初始化
+ $("#resetBtn").on("click",function(){
+ $("select.selectpicker").each(function(){
+ $(this).selectpicker('val',$(this).find('option:first').val());
+ $(this).find("option").attr("selected",false);
+ $(this).find("option:first").attr("selected",true);
+ });
+ $(".Wdate").attr("value",'');
+ $("#searchForm")[0].reset();
+ });
+
+ setInterval(function(){
+ actionTransAjax($("#searchAction").val(),starth,new Date().Format("yyyy-MM-dd HH:mm:00"));
+ },500000);// 五分钟调用一次
});
+function searchList(){
+ loading();
+ var start=$("#beginDate").val();
+ var end=$("#endDate").val();
+ if(start==''||end==''||end==null||start==null){
+ window.location.reload();
+ }else{
+ actionTransAjax($("#searchAction").val(),start,end);
+ }
+}
// 局点信息
function showActionTransChart(rs){
var data=new Array();
@@ -52,9 +112,10 @@ function showActionTransChart(rs){ });
})
var chart = Highcharts.chart('chart', {
- /* chart:{
- type: 'area',
- }, */
+ chart:{
+// type: 'area',
+ zoomType: 'x'
+ },
exporting: {
filename:'Action-Trans',
scale:1,
@@ -71,6 +132,9 @@ function showActionTransChart(rs){ text: 'time',
align:'high',
},
+ labels: {
+ rotation: -45, //倾斜的角度
+ },
},
yAxis: {
title: {
@@ -100,10 +164,10 @@ function showActionTransChart(rs){ });
}
// 动作一小时,间隔五分钟统计数据
- function actionTransAjax(searchAction){
+ function actionTransAjax(searchAction,beginDate,endDate){
loading();
$.ajax({
- url: "${ctx}/dashboard/traffic/actionEntranceTrans?searchAction="+searchAction,
+ url: "${ctx}/dashboard/traffic/actionEntranceTrans?searchAction="+searchAction+"&beginDate="+beginDate+"&endDate="+endDate,
type : "get" ,
dataType:"json",
cache:false,
@@ -115,7 +179,9 @@ function showActionTransChart(rs){ error: function(data, textStatus, errorThrown){
closeTip();
},
-
+ complete:function(XMLHttpRequest,status){//超时设置
+ closeTip();
+ }
});
}
diff --git a/src/main/webapp/WEB-INF/views/dashboard/trafficAppTypeList.jsp b/src/main/webapp/WEB-INF/views/dashboard/trafficAppTypeList.jsp index a7ecb9e..8409199 100644 --- a/src/main/webapp/WEB-INF/views/dashboard/trafficAppTypeList.jsp +++ b/src/main/webapp/WEB-INF/views/dashboard/trafficAppTypeList.jsp @@ -33,6 +33,8 @@ <div class="row" >
<form:form id="searchForm" action="${ctx}/dashboard/traffic/appTypeList" method="get" class="form-search">
+ <input id="beginDateh" type="hidden" value="${beginDate}"/>
+ <input id="endDateh" type="hidden" value="${endDate}"/>
<!-- 搜索内容与操作按钮栏 -->
<div class="col-md-12">
<div class="pull-left">
@@ -40,8 +42,8 @@ <div class="input-group-btn">
<span class="selectpicker form-control" ><spring:message code="begin_date"/></span>
</div>
- <input id="searchFoundStartTime" name="searchFoundStartTime" type="text" readonly="readonly" class="form-control Wdate input-medium"
- value="${searchFoundStartTime}" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
+ <input id="beginDate" name="beginDate" type="text" readonly="readonly" class="form-control Wdate input-medium"
+ value="${beginDate}" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,maxDate:'${endDate}'});"/>
</div>
</div>
<div class="pull-left">
@@ -49,8 +51,8 @@ <div class="input-group-btn">
<span class="selectpicker form-control" ><spring:message code="end_date"/></span>
</div>
- <input id="searchFoundEndTime" name="searchFoundEndTime" type="text" readonly="readonly" class="form-control Wdate input-medium"
- value="${searchFoundStartTime}" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
+ <input id="endDate" name="endDate" type="text" readonly="readonly" class="form-control Wdate input-medium"
+ value="${endDate}" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,maxDate:'${endDate}'});"/>
</div>
</div>
@@ -95,7 +97,11 @@ <script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/offline-exporting.js"></script>
<script type="text/javascript">
$(document).ready(function(){
- ajaxProtocolList();
+ var starth=$("#beginDateh").val();
+ var endh=$("#endDateh").val();
+ $("#beginDate").val(starth);
+ $("#endDate").val(endh);
+ ajaxAppList(starth,endh);
//筛选功能初始化
$("#resetBtn").on("click",function(){
$("select.selectpicker").each(function(){
@@ -106,26 +112,27 @@ $(document).ready(function(){ $(".Wdate").attr("value",'');
$("#searchForm")[0].reset();
});
+ setInterval(function(){
+ ajaxAppList(starth,new Date().Format("yyyy-MM-dd HH:mm:00"));
+ },500000);// 五分钟调用一次
});
function searchList(){
loading();
- var start=$("#searchFoundStartTime").val();
- var end=$("#searchFoundEndTime").val();
+ var start=$("#beginDate").val();
+ var end=$("#endDate").val();
if(start==''||end==''||end==null||start==null){
- start="";
- end="";
- $("#searchFoundStartTime").val("");
- $("#searchFoundEndTime").val("");
+ window.location.reload();
+ }else{
+ ajaxAppList(start,end);
}
- ajaxProtocolList(start,end);
}
-function ajaxProtocolList(start,end){
+function ajaxAppList(start,end){
loading();
$.ajax({
url: '${ctx}/dashboard/traffic/appList',
type: 'get',
dataType: "json",
- data:{"searchFoundStartTime":start,"searchFoundEndTime":end},
+ data:{"beginDate":start,"endDate":end},
async:false,
timeout:10000,
success:function (data){
@@ -224,9 +231,9 @@ function htmlData(fileDataS){ html+= "<td class='tc'>"+data.appName+"</td>";
html+= "<td class='tc'>"+data.linkNum+"</td>";
html+= "<td class='tc'>"+linkper+"%"+"</td>";
- html+= "<td class='tc'>"+data.packets+"</td>";
+ html+= "<td class='tc'>"+Math.round(data.packets*100)/100+"</td>";
html+= "<td class='tc'>"+packper+"%"+"</td>";
- html+= "<td class='tc'>"+data.GByte+"</td>";
+ html+= "<td class='tc'>"+Math.round(data.GByte*100)/100+"</td>";
html+= "<td class='tc'>"+gbytper+"%"+"</td>";
html+="</tr>"
}
diff --git a/src/main/webapp/WEB-INF/views/dashboard/trafficBandwidthList.jsp b/src/main/webapp/WEB-INF/views/dashboard/trafficBandwidthList.jsp index 58dd5da..b5b3afc 100644 --- a/src/main/webapp/WEB-INF/views/dashboard/trafficBandwidthList.jsp +++ b/src/main/webapp/WEB-INF/views/dashboard/trafficBandwidthList.jsp @@ -21,7 +21,9 @@ </h3>
<h5 class="page-header"></h5>
<div class="row" >
- <form:form id="searchForm" action="${ctx}/dashboard/traffic/protocolTypeList" method="get" class="form-search">
+ <form:form id="searchForm" action="${ctx}/dashboard/traffic/bandwidthList" method="get" class="form-search">
+ <input id="beginDateh" type="hidden" value="${beginDate}"/>
+ <input id="endDateh" type="hidden" value="${endDate}"/>
<!-- 搜索内容与操作按钮栏 -->
<div class="col-md-12">
<div class="pull-left">
@@ -30,7 +32,7 @@ <span class="selectpicker form-control" ><spring:message code="begin_date"/></span>
</div>
<input id="beginDate" name="beginDate" type="text" readonly="readonly" class="form-control Wdate input-medium"
- value="" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
+ value="" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,maxDate:'${endDate}'});"/>
</div>
</div>
<div class="pull-left">
@@ -39,7 +41,7 @@ <span class="selectpicker form-control" ><spring:message code="end_date"/></span>
</div>
<input id="endDate" name="endDate" type="text" readonly="readonly" class="form-control Wdate input-medium"
- value="" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
+ value="" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,maxDate:'${endDate}'});"/>
</div>
</div>
@@ -83,22 +85,23 @@ <script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/offline-exporting.js"></script>
<script type="text/javascript">
$(document).ready(function(){
+ var starth=$("#beginDateh").val();
+ var endh=$("#endDateh").val();
+ $("#beginDate").val(starth);
+ $("#endDate").val(endh);
var unitType=$("#unitType").val();
- var start=$("#beginDate").val();
- var end=$("#endDate").val();
- changeBandwidth(unitType,start,end);
- changeBandwidth2(unitType,start,end);
+ changeBandwidth(unitType,starth,endh);
+ changeBandwidth2(unitType,starth,endh);
$("#unitType").on("change",function(){
changeBandwidth($("#unitType").val(),$("#beginDate").val(),$("#endDate").val());
changeBandwidth2($("#unitType").val(),$("#beginDate").val(),$("#endDate").val());
});
setInterval(function(){
- changeBandwidth($("#unitType").val(),$("#beginDate").val(),$("#endDate").val());
- changeBandwidth2($("#unitType").val(),$("#beginDate").val(),$("#endDate").val());
+ changeBandwidth($("#unitType").val(),$("#beginDate").val(),new Date().Format("yyyy-MM-dd HH:mm:00"));
+ changeBandwidth2($("#unitType").val(),$("#beginDate").val(),new Date().Format("yyyy-MM-dd HH:mm:00"));
},500000);// 五分钟调用一次
-
//筛选功能初始化
$("#resetBtn").on("click",function(){
$("select.selectpicker").each(function(){
@@ -115,8 +118,12 @@ function searchList(){ loading();
var start=$("#beginDate").val();
var end=$("#endDate").val();
+ if(start==''||end==''||end==null||start==null){
+ window.location.reload();
+ }else{
changeBandwidth($("#unitType").val(),start,end);
changeBandwidth2($("#unitType").val(),start,end);
+ }
}
// 默认显示四条线 ip46,tcp,udp
diff --git a/src/main/webapp/WEB-INF/views/dashboard/trafficIpActiveList.jsp b/src/main/webapp/WEB-INF/views/dashboard/trafficIpActiveList.jsp index 6594696..78f6e3e 100644 --- a/src/main/webapp/WEB-INF/views/dashboard/trafficIpActiveList.jsp +++ b/src/main/webapp/WEB-INF/views/dashboard/trafficIpActiveList.jsp @@ -29,7 +29,7 @@ <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
</form:form>
</div>
- <sys:message content="${message}"/>
+ <sys:message content="${message}" type="${messageType }"/>
<h3 class="page-title">
<spring:message code="traffic_ipactive_hour_max"></spring:message>
</h3>
diff --git a/src/main/webapp/WEB-INF/views/dashboard/trafficProtocolTypeList.jsp b/src/main/webapp/WEB-INF/views/dashboard/trafficProtocolTypeList.jsp index 7e9d719..392ff74 100644 --- a/src/main/webapp/WEB-INF/views/dashboard/trafficProtocolTypeList.jsp +++ b/src/main/webapp/WEB-INF/views/dashboard/trafficProtocolTypeList.jsp @@ -23,6 +23,8 @@ <h5 class="page-header"></h5>
<div class="row" >
<form:form id="searchForm" action="${ctx}/dashboard/traffic/protocolTypeList" method="get" class="form-search">
+ <input id="beginDateh" type="hidden" value="${beginDate}"/>
+ <input id="endDateh" type="hidden" value="${endDate}"/>
<!-- 搜索内容与操作按钮栏 -->
<div class="col-md-12">
<div class="pull-left">
@@ -30,17 +32,17 @@ <div class="input-group-btn">
<span class="selectpicker form-control" ><spring:message code="begin_date"/></span>
</div>
- <input id="searchFoundStartTime" name="searchFoundStartTime" type="text" readonly="readonly" class="form-control Wdate input-medium"
- value="${searchFoundStartTime}" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
+ <input id="beginDate" name="beginDate" type="text" readonly="readonly" class="form-control Wdate input-medium"
+ value="" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,maxDate:'${endDate}'});"/>
</div>
</div>
- <div class="pull-left">
+ <div class="pull-left">
<div class="input-group">
<div class="input-group-btn">
<span class="selectpicker form-control" ><spring:message code="end_date"/></span>
</div>
- <input id="searchFoundEndTime" name="searchFoundEndTime" type="text" readonly="readonly" class="form-control Wdate input-medium"
- value="${searchFoundEndTime}" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
+ <input id="endDate" name="endDate" type="text" readonly="readonly" class="form-control Wdate input-medium"
+ value="" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,maxDate:'${endDate}'});"/>
</div>
</div>
@@ -85,7 +87,11 @@ <script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/offline-exporting.js"></script>
<script type="text/javascript">
$(document).ready(function(){
- ajaxProtocolList();
+ var starth=$("#beginDateh").val();
+ var endh=$("#endDateh").val();
+ $("#beginDate").val(starth);
+ $("#endDate").val(endh);
+ ajaxProtocolList(starth,endh);
//筛选功能初始化
$("#resetBtn").on("click",function(){
$("select.selectpicker").each(function(){
@@ -96,18 +102,20 @@ $(document).ready(function(){ $(".Wdate").attr("value",'');
$("#searchForm")[0].reset();
});
+
+ setInterval(function(){
+ ajaxProtocolList(starth,new Date().Format("yyyy-MM-dd HH:mm:00"));
+ },500000);// 五分钟调用一次
});
function searchList(){
loading();
- var start=$("#searchFoundStartTime").val();
- var end=$("#searchFoundEndTime").val();
+ var start=$("#beginDate").val();
+ var end=$("#endDate").val();
if(start==''||end==''||end==null||start==null){
- start="";
- end="";
- $("#searchFoundStartTime").val("");
- $("#searchFoundEndTime").val("");
+ window.location.reload();
+ }else{
+ ajaxProtocolList(start,end);
}
- ajaxProtocolList(start,end);
}
function ajaxProtocolList(start,end){
loading();
@@ -115,7 +123,7 @@ function ajaxProtocolList(start,end){ url: '${ctx}/dashboard/traffic/protocolList',
type: 'get',
dataType: "json",
- data:{"searchFoundStartTime":start,"searchFoundEndTime":end},
+ data:{"beginDate":start,"endDate":end},
async:false,
timeout:10000,
success:function (data){
@@ -213,9 +221,9 @@ function htmlData(fileDataS){ html+= "<td class='tc'>"+data.protocolType+"</td>";
html+= "<td class='tc'>"+data.linkNum+"</td>";
html+= "<td class='tc'>"+linkper+"%"+"</td>";
- html+= "<td class='tc'>"+data.packets+"</td>";
+ html+= "<td class='tc'>"+Math.round(data.packets*100)/100+"</td>";
html+= "<td class='tc'>"+packper+"%"+"</td>";
- html+= "<td class='tc'>"+data.GByte+"</td>";
+ html+= "<td class='tc'>"+Math.round(data.GByte*100)/100+"</td>";
html+= "<td class='tc'>"+gbytper+"%"+"</td>";
html+="</tr>"
}
diff --git a/src/main/webapp/WEB-INF/views/dashboard/trafficUserBehavior.jsp b/src/main/webapp/WEB-INF/views/dashboard/trafficUserBehavior.jsp index c45f299..7e8503a 100644 --- a/src/main/webapp/WEB-INF/views/dashboard/trafficUserBehavior.jsp +++ b/src/main/webapp/WEB-INF/views/dashboard/trafficUserBehavior.jsp @@ -174,7 +174,7 @@ <div class="col-md-12"> <div class="portlet"> <div class="portlet-body"> - <sys:message content="${message}"/> + <sys:message content="${message}" type="${messageType }"/> <!-- top --> <%-- <div class="row"> <div class="col-md-6"> diff --git a/src/main/webapp/WEB-INF/views/dashboard/trafficWebTypeList.jsp b/src/main/webapp/WEB-INF/views/dashboard/trafficWebTypeList.jsp index a927356..bdbe444 100644 --- a/src/main/webapp/WEB-INF/views/dashboard/trafficWebTypeList.jsp +++ b/src/main/webapp/WEB-INF/views/dashboard/trafficWebTypeList.jsp @@ -80,7 +80,7 @@ }); }); </script> - <sys:message content="${message}"/> + <sys:message content="${message}" type="${messageType }"/> <div class="table-responsive show-two"> <table id="contentTable" style="width: 35%;" class="table table-hover table-striped table-bordered table-condensed text-nowrap"> <thead> diff --git a/src/main/webapp/WEB-INF/views/specific/specificServiceCfgList.jsp b/src/main/webapp/WEB-INF/views/specific/specificServiceCfgList.jsp index 1498218..54a24e7 100644 --- a/src/main/webapp/WEB-INF/views/specific/specificServiceCfgList.jsp +++ b/src/main/webapp/WEB-INF/views/specific/specificServiceCfgList.jsp @@ -276,7 +276,7 @@ - <sys:message content="${message}"/> + <sys:message content="${message}" type="${messageType }"/> <div class="table-responsive"> <table id="treeTable" class="table table-striped table-bordered table-condensed text-nowrap"> diff --git a/src/main/webapp/WEB-INF/views/specific/specificServiceHostCfgForm.jsp b/src/main/webapp/WEB-INF/views/specific/specificServiceHostCfgForm.jsp index 043ab87..cf3dc4b 100644 --- a/src/main/webapp/WEB-INF/views/specific/specificServiceHostCfgForm.jsp +++ b/src/main/webapp/WEB-INF/views/specific/specificServiceHostCfgForm.jsp @@ -107,7 +107,7 @@ function selectP(){ <form:form id="inputForm" modelAttribute="specificServiceHostCfg" action="${ctx}/specific/specificServiceHostCfg/saveOrUpdate" method="post" class="form-horizontal" > <div class="form-body row"> <form:hidden path="hostId" class="form-control" /> - <sys:message content="${message}" /> + <sys:message content="${message}" type="${messageType }"/> <div class="row"> <div class="col-md-6"> <div class="form-group"> diff --git a/src/main/webapp/WEB-INF/views/specific/specificServiceHostCfgList.jsp b/src/main/webapp/WEB-INF/views/specific/specificServiceHostCfgList.jsp index 17d8984..7695bb8 100644 --- a/src/main/webapp/WEB-INF/views/specific/specificServiceHostCfgList.jsp +++ b/src/main/webapp/WEB-INF/views/specific/specificServiceHostCfgList.jsp @@ -372,7 +372,7 @@ - <sys:message content="${message}"/> + <sys:message content="${message}" type="${messageType }"/> <div class="table-responsive"> <table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap"> <thead> diff --git a/src/main/webapp/WEB-INF/views/sys/areaForm.jsp b/src/main/webapp/WEB-INF/views/sys/areaForm.jsp index dd0fc0f..acb018d 100644 --- a/src/main/webapp/WEB-INF/views/sys/areaForm.jsp +++ b/src/main/webapp/WEB-INF/views/sys/areaForm.jsp @@ -31,7 +31,7 @@ </ul><br/> <form:form id="inputForm" modelAttribute="sysArea" action="${ctx}/sys/area/saveOrUpdate" method="post" class="form-horizontal"> <form:hidden path="id"/> - <sys:message content="${message}"/> + <sys:message content="${message}" type="${messageType }"/> <div class="control-group"> <label class="control-label">上级区域:</label> <div class="controls"> diff --git a/src/main/webapp/WEB-INF/views/sys/areaIndex.jsp b/src/main/webapp/WEB-INF/views/sys/areaIndex.jsp index 0c412be..9b92eda 100644 --- a/src/main/webapp/WEB-INF/views/sys/areaIndex.jsp +++ b/src/main/webapp/WEB-INF/views/sys/areaIndex.jsp @@ -11,7 +11,7 @@ <script src="${ctxStatic}/jquery-ztree/3.5.12/js/jquery.ztree.all-3.5.min.js" type="text/javascript"></script> </head> <body> - <sys:message content="${message}"/> + <sys:message content="${message}" type="${messageType }"/> <div id="content" class="row-fluid"> <div id="left" class="accordion-group"> <div class="accordion-heading"> diff --git a/src/main/webapp/WEB-INF/views/sys/areaList.jsp b/src/main/webapp/WEB-INF/views/sys/areaList.jsp index dd6bce1..2b68b2e 100644 --- a/src/main/webapp/WEB-INF/views/sys/areaList.jsp +++ b/src/main/webapp/WEB-INF/views/sys/areaList.jsp @@ -49,7 +49,7 @@ <li class="active"><a href="${ctx}/sys/area/list?id=${sysArea.id}&parentIds=${sysArea.parentIds}">区域列表</a></li> <shiro:hasPermission name="sys:area:edit"><li><a href="${ctx}/sys/area/form?parent.id=${sysArea.id}">区域添加</a></li></shiro:hasPermission> </ul> - <sys:message content="${message}"/> + <sys:message content="${message}" type="${messageType }"/> <table id="treeTable" class="table table-striped table-bordered table-condensed"> <thead><tr><th>区域名称</th><th>区域编码</th><th>区域类型</th><th>经度</th><th>纬度</th><th>备注</th><shiro:hasPermission name="sys:area:edit"><th>操作</th></shiro:hasPermission></tr></thead> <tbody id="treeTableList"></tbody> diff --git a/src/main/webapp/WEB-INF/views/sys/cfgOperationLogList.jsp b/src/main/webapp/WEB-INF/views/sys/cfgOperationLogList.jsp index df5ef4b..40d4828 100644 --- a/src/main/webapp/WEB-INF/views/sys/cfgOperationLogList.jsp +++ b/src/main/webapp/WEB-INF/views/sys/cfgOperationLogList.jsp @@ -85,7 +85,7 @@ </div> </form:form> </div> - <sys:message content="${message}" /> + <sys:message content="${message}" type="${messageType }"/> <div class=""> <br/> <table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap"> diff --git a/src/main/webapp/WEB-INF/views/sys/dictForm.jsp b/src/main/webapp/WEB-INF/views/sys/dictForm.jsp index a66f4c7..b2d6ff4 100644 --- a/src/main/webapp/WEB-INF/views/sys/dictForm.jsp +++ b/src/main/webapp/WEB-INF/views/sys/dictForm.jsp @@ -134,7 +134,7 @@ <form:hidden path="id"/> <form:hidden path="revision"/> - <sys:message content="${message}"/> + <sys:message content="${message}" type="${messageType }"/> <div class="alert alert-error hide"> diff --git a/src/main/webapp/WEB-INF/views/sys/dictList.jsp b/src/main/webapp/WEB-INF/views/sys/dictList.jsp index f52e54e..5a75cbf 100644 --- a/src/main/webapp/WEB-INF/views/sys/dictList.jsp +++ b/src/main/webapp/WEB-INF/views/sys/dictList.jsp @@ -272,7 +272,7 @@ </form:form> </div> - <sys:message content="${message}" /> + <sys:message content="${message}" type="${messageType }" /> <table id="contentTable1" class="table table-striped table-bordered table-condensed"> <thead> diff --git a/src/main/webapp/WEB-INF/views/sys/ipLocation.jsp b/src/main/webapp/WEB-INF/views/sys/ipLocation.jsp index a210dc2..cb45491 100644 --- a/src/main/webapp/WEB-INF/views/sys/ipLocation.jsp +++ b/src/main/webapp/WEB-INF/views/sys/ipLocation.jsp @@ -33,7 +33,7 @@ <body> <form:form id="inputForm" action="${ctx}/sys/ipLocation/search" method="post" class="form-horizontal"> - <sys:message content="${message}"/> + <sys:message content="${message}" type="${messageType }"/> <div class="control-group"> <label class="control-label">IP地址:</label> diff --git a/src/main/webapp/WEB-INF/views/sys/menuForm.jsp b/src/main/webapp/WEB-INF/views/sys/menuForm.jsp index 19b8caf..e6c7b98 100644 --- a/src/main/webapp/WEB-INF/views/sys/menuForm.jsp +++ b/src/main/webapp/WEB-INF/views/sys/menuForm.jsp @@ -57,7 +57,7 @@ <!-- BEGIN FORM--> <form:form id="inputForm" modelAttribute="menu" action="${ctx}/sys/menu/saveOrUpdate" method="post" class="form-horizontal"> <form:hidden path="id"/> - <sys:message content="${message}"/> + <sys:message content="${message}" type="${messageType }"/> <div class="form-group"> <label class="col-md-3 control-label"><spring:message code="parent_menu"></spring:message>:</label> <div class="col-md-4"> diff --git a/src/main/webapp/WEB-INF/views/sys/menuList.jsp b/src/main/webapp/WEB-INF/views/sys/menuList.jsp index d0cfd72..75f8842 100644 --- a/src/main/webapp/WEB-INF/views/sys/menuList.jsp +++ b/src/main/webapp/WEB-INF/views/sys/menuList.jsp @@ -84,7 +84,7 @@ <div class="col-md-12"> - <sys:message content="${message}" /> + <sys:message content="${message}" type="${messageType }"/> <form id="listForm" method="post"> <table id="treeTable" class="table table-striped table-bordered table-condensed"> diff --git a/src/main/webapp/WEB-INF/views/sys/officeIndex.jsp b/src/main/webapp/WEB-INF/views/sys/officeIndex.jsp index fe3591d..be95ba7 100644 --- a/src/main/webapp/WEB-INF/views/sys/officeIndex.jsp +++ b/src/main/webapp/WEB-INF/views/sys/officeIndex.jsp @@ -30,7 +30,7 @@ <h5 class="page-header"></h5> - <sys:message content="${message}"/> + <sys:message content="${message}" type="${messageType }"/> <div class="row"> diff --git a/src/main/webapp/WEB-INF/views/sys/officeList.jsp b/src/main/webapp/WEB-INF/views/sys/officeList.jsp index d75e083..b6b3c6e 100644 --- a/src/main/webapp/WEB-INF/views/sys/officeList.jsp +++ b/src/main/webapp/WEB-INF/views/sys/officeList.jsp @@ -63,7 +63,7 @@ <%-- <shiro:hasPermission name="sys:office:edit"><li><a href="${ctx}/sys/office/form?parent.id=${sysOffice.id}">机构添加</a></li></shiro:hasPermission> --%> <!-- </ul> --> <div class=""> - <sys:message content="${message}"/> + <sys:message content="${message}" type="${messageType }"/> <table id="treeTable" class="table table-striped table-bordered table-condensed"> <thead><tr><th><spring:message code="org_name"/></th><th><spring:message code="belong_area"/></th><th><spring:message code="org_coding"/></th><th><spring:message code="level"/></th><th><spring:message code="org_type"/></th><th><spring:message code="org_duty_type"/></th><th><spring:message code="remarks"/></th><shiro:hasPermission name="sys:office:edit"><th><spring:message code="operation"/></th></shiro:hasPermission></tr></thead> <tbody id="treeTableList"></tbody> diff --git a/src/main/webapp/static/pages/scripts/pageLogs.js b/src/main/webapp/static/pages/scripts/pageLogs.js index 90dadff..e2bda68 100644 --- a/src/main/webapp/static/pages/scripts/pageLogs.js +++ b/src/main/webapp/static/pages/scripts/pageLogs.js @@ -89,4 +89,25 @@ function back(){ var url = sessionStorage.getItem('cfgUrl'); switchMenu("86"); window.location.href = url; +} +//对Date的扩展,将 Date 转化为指定格式的String +//月(M)、日(d)、小时(h)、分(m)、秒(s)、季度(q) 可以用 1-2 个占位符, +//年(y)可以用 1-4 个占位符,毫秒(S)只能用 1 个占位符(是 1-3 位的数字) +//例子: +//(new Date()).Format("yyyy-MM-dd hh:mm:ss.S") ==> 2006-07-02 08:09:04.423 +//(new Date()).Format("yyyy-M-d h:m:s.S") ==> 2006-7-2 8:9:4.18 +Date.prototype.Format = function (fmt) { + var o = { + "M+": this.getMonth() + 1, //月份 + "d+": this.getDate(), //日 + "H+": this.getHours(), //小时 + "m+": this.getMinutes(), //分 + "s+": this.getSeconds(), //秒 + "q+": Math.floor((this.getMonth() + 3) / 3), //季度 + "S": this.getMilliseconds() //毫秒 + }; + if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length)); + for (var k in o) + if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length))); + return fmt; }
\ No newline at end of file |
