diff --git a/src/main/java/com/nis/web/controller/configuration/LogSearchController.java b/src/main/java/com/nis/web/controller/configuration/LogSearchController.java index 46075e331..9ceae9d5f 100644 --- a/src/main/java/com/nis/web/controller/configuration/LogSearchController.java +++ b/src/main/java/com/nis/web/controller/configuration/LogSearchController.java @@ -57,7 +57,7 @@ public class LogSearchController extends BaseController{ @RequestMapping(value = {"logTrend",""}) - public String logTrend(Model model,BaseLogEntity entity,String cfgId,RedirectAttributes attr, HttpServletRequest request, + public String logTrend(Model model,BaseLogEntity entity,String cfgId,String serviceId,RedirectAttributes attr, HttpServletRequest request, HttpServletResponse response) { Calendar cal = Calendar. getInstance (); cal.setTime(new Date()); @@ -67,16 +67,20 @@ public class LogSearchController extends BaseController{ model.addAttribute("beginDate", oneHoursAgo); model.addAttribute("endDate", now); model.addAttribute("cfgId", cfgId); + model.addAttribute("serviceId", serviceId); return "/cfg/logCfgTrendList"; } @RequestMapping(value="actionLogTrend") @ResponseBody - public List actionTrans(String cfgId,String beginDate,String endDate){ + public List actionTrans(String cfgId,String beginDate,String endDate,String serviceId){ Map fromJsonList = new HashMap(); List resultList = new ArrayList(); String url = Constants.LOG_BASE_URL+Constants.NTC_PZ_REPORT; url=url+"?searchBusinessType=2&searchCfgId="+cfgId; + if(!StringUtil.isEmpty(serviceId)){ + url=url+"&searchService="+serviceId; + } try { //String url="http://192.168.10.204:9999/galaxy-service/service/log/v1/ntcPzReport?searchBusinessType=2&searchReportStartTime=2018-12-29%2000:00:00&searchReportEndTime=2018-12-30%2000:00:00"; url = urlAddDate(url,beginDate,endDate); diff --git a/src/main/webapp/WEB-INF/views/cfg/logCfgTrendList.jsp b/src/main/webapp/WEB-INF/views/cfg/logCfgTrendList.jsp index 612c3d6bf..1f3719932 100644 --- a/src/main/webapp/WEB-INF/views/cfg/logCfgTrendList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/logCfgTrendList.jsp @@ -47,13 +47,14 @@ -
-
+ +
<%-- --%> + @@ -73,10 +74,11 @@ $(document).ready(function(){ var starth=$("#beginDateh").val(); var endh=$("#endDateh").val(); var cfgId=$("#cfgId").val(); + var serviceId=$("#serviceId").val(); excfgid=cfgId; $("#beginDate").val(starth); $("#endDate").val(endh); - actionTransAjax(logTltle,starth,endh,cfgId); + actionTransAjax(logTltle,starth,endh,cfgId,serviceId); //筛选功能初始化 $("#resetBtn").on("click",function(){ $("select.selectpicker").each(function(){ @@ -97,13 +99,13 @@ function searchList(){ var start=$("#beginDate").val(); var end=$("#endDate").val(); var cfgId=$("#cfgId").val(); - + var serviceId=$("#serviceId").val(); $("#beginDateh").val(start); $("#endDateh").val(end); if(start==''||end==''||end==null||start==null){ window.location.reload(); }else{ - actionTransAjax(logTltle,start,end,cfgId); + actionTransAjax(logTltle,start,end,cfgId,serviceId); } } // 局点信息 @@ -119,7 +121,7 @@ function showActionTransChart(xData,series){ filename:logTltle+"_"+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate()+nowDate.getHours()+nowDate.getMinutes()+nowDate.getSeconds(), scale:1, sourceWidth: 1280, - sourceHeight: 500, + sourceHeight: 600, buttons: { contextButton: { menuItems: [ @@ -204,10 +206,10 @@ function showActionTransChart(xData,series){ }); } // 动作一小时,间隔五分钟统计数据 - function actionTransAjax(searchAction,beginDate,endDate,cfgId){ + function actionTransAjax(searchAction,beginDate,endDate,cfgId,serviceId){ loading(); $.ajax({ - url: "${ctx}/toLogSearch/actionLogTrend?cfgId="+cfgId+"&searchAction="+searchAction+"&beginDate="+beginDate+"&endDate="+endDate, + url: "${ctx}/toLogSearch/actionLogTrend?cfgId="+cfgId+"&searchAction="+searchAction+"&beginDate="+beginDate+"&endDate="+endDate+"&serviceId="+serviceId, type : "get" , dataType:"json", async:true, diff --git a/src/main/webapp/static/global/scripts/pzLog.js b/src/main/webapp/static/global/scripts/pzLog.js index 1975b472d..677706e00 100644 --- a/src/main/webapp/static/global/scripts/pzLog.js +++ b/src/main/webapp/static/global/scripts/pzLog.js @@ -172,9 +172,10 @@ var GetLogTotal=function(_data){ var hasLog=false; for(var i=0;i"+data[i].sum+""); + $(this).html(""+data[i].sum+""); $(this).parent("tr").find("td:eq(1)").html(""+data[i].compileId+""); hasLog=true; } @@ -652,10 +653,10 @@ function setStartTimeByFormat(startTimeSelector,endTimeSelector,granule,unit,for $(endTimeSelector).val(dateFtt(formatParm,endTime)+endStr); } -function logSearch(cfgId){ +function logSearch(cfgId,serviceId){ var title=$.validator.messages.log_trend; var url=$("#jbox_cfg_url",parent.document).val(); - url=url+"?cfgId="+cfgId; + url=url+"?cfgId="+cfgId+"&serviceId="+serviceId; top.$.jBox("iframe:"+url, { title: title, width: $(document).width()*0.8,