diff --git a/src/main/webapp/WEB-INF/views/dashboard/ntcTotalReportDetailList.jsp b/src/main/webapp/WEB-INF/views/dashboard/ntcTotalReportDetailList.jsp index a559ed833..8f2d485f6 100644 --- a/src/main/webapp/WEB-INF/views/dashboard/ntcTotalReportDetailList.jsp +++ b/src/main/webapp/WEB-INF/views/dashboard/ntcTotalReportDetailList.jsp @@ -132,7 +132,7 @@ }, }, exporting : { - filename : ''+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate(), + filename : ''+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate()+nowDate.getHours()+nowDate.getMinutes()+nowDate.getSeconds(), scale : 1, sourceWidth : 1280, sourceHeight : 500, @@ -278,7 +278,7 @@ }) xlsxRows.push(a) zipcelx({ - filename : ''+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate(), + filename : ''+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate()+nowDate.getHours()+nowDate.getMinutes()+nowDate.getSeconds(), sheet : { data : xlsxRows } @@ -332,7 +332,7 @@ var uri = 'data:text/csv;charset=utf-8,' + encodeURIComponent(str.join("")); var downloadLink = document.createElement("a"); downloadLink.href = uri; - downloadLink.download = ""+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate()+".csv"; + downloadLink.download = ""+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate()+nowDate.getHours()+nowDate.getMinutes()+nowDate.getSeconds()+".csv"; document.body.appendChild(downloadLink); downloadLink.click(); document.body.removeChild(downloadLink); diff --git a/src/main/webapp/WEB-INF/views/dashboard/trafficActionTransList.jsp b/src/main/webapp/WEB-INF/views/dashboard/trafficActionTransList.jsp index f6d66ed71..4ea77f05f 100644 --- a/src/main/webapp/WEB-INF/views/dashboard/trafficActionTransList.jsp +++ b/src/main/webapp/WEB-INF/views/dashboard/trafficActionTransList.jsp @@ -106,7 +106,7 @@ function showActionTransChart(xData,series){ zoomType: 'x' }, exporting: { - filename:''+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate(), + filename:''+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate()+nowDate.getHours()+nowDate.getMinutes()+nowDate.getSeconds(), scale:1, sourceWidth: 1280, sourceHeight: 500, @@ -276,7 +276,7 @@ function showActionTransChart(xData,series){ zipcelx({ - filename: ''+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate(), + filename: ''+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate()+nowDate.getHours()+nowDate.getMinutes()+nowDate.getSeconds(), sheet: { data: xlsxRows } @@ -332,7 +332,7 @@ function showActionTransChart(xData,series){ var uri = 'data:text/csv;charset=utf-8,' + encodeURIComponent(str.join("")); var downloadLink = document.createElement("a"); downloadLink.href = uri; - downloadLink.download = ""+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate()+".csv"; + downloadLink.download = ""+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate()+nowDate.getHours()+nowDate.getMinutes()+nowDate.getSeconds()+".csv"; document.body.appendChild(downloadLink); downloadLink.click(); document.body.removeChild(downloadLink); diff --git a/src/main/webapp/WEB-INF/views/dashboard/trafficAppTypeList.jsp b/src/main/webapp/WEB-INF/views/dashboard/trafficAppTypeList.jsp index b245096ed..c88eb4edc 100644 --- a/src/main/webapp/WEB-INF/views/dashboard/trafficAppTypeList.jsp +++ b/src/main/webapp/WEB-INF/views/dashboard/trafficAppTypeList.jsp @@ -202,7 +202,7 @@ $(".export-btn").click(function(){ headings:true, footers:true, formats:[dataType], - fileName:""+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate(), + fileName:""+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate()+nowDate.getHours()+nowDate.getMinutes()+nowDate.getSeconds(), bootstrap:false }); $("#myexport").click(); @@ -337,7 +337,7 @@ function protocolTypeChart(rs){ }, exporting: { allowHTML:true, - filename:""+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate(), + filename:""+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate()+nowDate.getHours()+nowDate.getMinutes()+nowDate.getSeconds(), scale:1, sourceWidth: 1280, sourceHeight: 500, diff --git a/src/main/webapp/WEB-INF/views/dashboard/trafficBandwidthList.jsp b/src/main/webapp/WEB-INF/views/dashboard/trafficBandwidthList.jsp index a604f2a70..ad0a22575 100644 --- a/src/main/webapp/WEB-INF/views/dashboard/trafficBandwidthList.jsp +++ b/src/main/webapp/WEB-INF/views/dashboard/trafficBandwidthList.jsp @@ -270,7 +270,7 @@ function showBandwidthChart(id,unitType,xdata,ydata,title){ }, }, exporting: { - filename:''+title+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate(), + filename:''+title+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate()+nowDate.getHours()+nowDate.getMinutes()+nowDate.getSeconds(), scale:1, sourceWidth: 1280, sourceHeight: 550, @@ -379,7 +379,7 @@ function showBandwidthChart(id,unitType,xdata,ydata,title){ zipcelx({ - filename: ''+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate(), + filename: ''+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate()+nowDate.getHours()+nowDate.getMinutes()+nowDate.getSeconds(), sheet: { data: xlsxRows } @@ -448,7 +448,7 @@ function showBandwidthChart(id,unitType,xdata,ydata,title){ var uri = 'data:text/csv;charset=utf-8,' + encodeURIComponent(str.join("")); var downloadLink = document.createElement("a"); downloadLink.href = uri; - downloadLink.download = ''+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate()+".csv"; + downloadLink.download = ''+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate()+nowDate.getHours()+nowDate.getMinutes()+nowDate.getSeconds()+".csv"; document.body.appendChild(downloadLink); downloadLink.click(); document.body.removeChild(downloadLink); diff --git a/src/main/webapp/WEB-INF/views/dashboard/trafficDomainTrans.jsp b/src/main/webapp/WEB-INF/views/dashboard/trafficDomainTrans.jsp index 3e53308d0..e6ac4867a 100644 --- a/src/main/webapp/WEB-INF/views/dashboard/trafficDomainTrans.jsp +++ b/src/main/webapp/WEB-INF/views/dashboard/trafficDomainTrans.jsp @@ -102,7 +102,7 @@ function showDomainTrans(xData,series){ zoomType: 'x' }, exporting: { - filename:''+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate(), + filename:''+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate()+nowDate.getHours()+nowDate.getMinutes()+nowDate.getSeconds(), scale:1, sourceWidth: 1280, sourceHeight: 500, @@ -202,7 +202,7 @@ function showDomainTrans(xData,series){ }) xlsxRows.push(a) zipcelx({ - filename : ''+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate(), + filename : ''+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate()+nowDate.getHours()+nowDate.getMinutes()+nowDate.getSeconds(), sheet : { data : xlsxRows } @@ -255,7 +255,7 @@ function exportCsv(obj){ var uri = 'data:text/csv;charset=utf-8,' + encodeURIComponent(str.join("")); var downloadLink = document.createElement("a"); downloadLink.href = uri; - downloadLink.download = ""+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate()+".csv"; + downloadLink.download = ""+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate()+nowDate.getHours()+nowDate.getMinutes()+nowDate.getSeconds()+".csv"; document.body.appendChild(downloadLink); downloadLink.click(); document.body.removeChild(downloadLink); diff --git a/src/main/webapp/WEB-INF/views/dashboard/trafficHttpStatisticList.jsp b/src/main/webapp/WEB-INF/views/dashboard/trafficHttpStatisticList.jsp index 9bebcbf8d..654665375 100644 --- a/src/main/webapp/WEB-INF/views/dashboard/trafficHttpStatisticList.jsp +++ b/src/main/webapp/WEB-INF/views/dashboard/trafficHttpStatisticList.jsp @@ -180,7 +180,7 @@ $(".export-btn").click(function(){ headings:true, footers:true, formats:[dataType], - fileName:"service"+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate(), + fileName:"service"+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate()+nowDate.getHours()+nowDate.getMinutes()+nowDate.getSeconds(), bootstrap:false }); $("#myexport").click(); diff --git a/src/main/webapp/WEB-INF/views/dashboard/trafficIpActiveList.jsp b/src/main/webapp/WEB-INF/views/dashboard/trafficIpActiveList.jsp index 03bf6680d..44e2ffa1c 100644 --- a/src/main/webapp/WEB-INF/views/dashboard/trafficIpActiveList.jsp +++ b/src/main/webapp/WEB-INF/views/dashboard/trafficIpActiveList.jsp @@ -174,7 +174,7 @@ function showIpActiveChart(xData,series){ zoomType: 'x' }, exporting: { - filename:''+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate(), + filename:''+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate()+nowDate.getHours()+nowDate.getMinutes()+nowDate.getSeconds(), scale:1, sourceWidth: 1280, sourceHeight: 500, @@ -404,7 +404,7 @@ function showIpActiveChart(xData,series){ }) xlsxRows.push(a) zipcelx({ - filename: ''+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate(), + filename: ''+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate()+nowDate.getHours()+nowDate.getMinutes()+nowDate.getSeconds(), sheet: { data: xlsxRows } @@ -456,7 +456,7 @@ function showIpActiveChart(xData,series){ var uri = 'data:text/csv;charset=utf-8,' + encodeURIComponent(str.join("")); var downloadLink = document.createElement("a"); downloadLink.href = uri; - downloadLink.download = ""+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate()+".csv"; + downloadLink.download = ""+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate()+nowDate.getHours()+nowDate.getMinutes()+nowDate.getSeconds()+".csv"; document.body.appendChild(downloadLink); downloadLink.click(); document.body.removeChild(downloadLink); diff --git a/src/main/webapp/WEB-INF/views/dashboard/trafficPortActiveList.jsp b/src/main/webapp/WEB-INF/views/dashboard/trafficPortActiveList.jsp index 6d24d8fdc..5ab6bb519 100644 --- a/src/main/webapp/WEB-INF/views/dashboard/trafficPortActiveList.jsp +++ b/src/main/webapp/WEB-INF/views/dashboard/trafficPortActiveList.jsp @@ -91,7 +91,7 @@ $(".export-btn").click(function(){ headings:true, footers:true, formats:[dataType], - fileName:""+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate(), + fileName:""+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate()+nowDate.getHours()+nowDate.getMinutes()+nowDate.getSeconds(), bootstrap:false }); $("#myexport").click(); @@ -117,7 +117,7 @@ function showPortActiveChart(xData,series){ zoomType: 'x' }, exporting: { - filename:''+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate(), + filename:''+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate()+nowDate.getHours()+nowDate.getMinutes()+nowDate.getSeconds(), scale:1, sourceWidth: 1280, sourceHeight: 500, @@ -350,7 +350,7 @@ function showPortActiveChart(xData,series){ }) xlsxRows.push(a) zipcelx({ - filename: ''+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate(), + filename: ''+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate()+nowDate.getHours()+nowDate.getMinutes()+nowDate.getSeconds(), sheet: { data: xlsxRows } @@ -402,7 +402,7 @@ function showPortActiveChart(xData,series){ var uri = 'data:text/csv;charset=utf-8,' + encodeURIComponent(str.join("")); var downloadLink = document.createElement("a"); downloadLink.href = uri; - downloadLink.download = ""+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate()+".csv"; + downloadLink.download = ""+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate()+nowDate.getHours()+nowDate.getMinutes()+nowDate.getSeconds()+".csv"; document.body.appendChild(downloadLink); downloadLink.click(); document.body.removeChild(downloadLink); diff --git a/src/main/webapp/WEB-INF/views/dashboard/trafficProtocolTypeList.jsp b/src/main/webapp/WEB-INF/views/dashboard/trafficProtocolTypeList.jsp index a01b5fbcd..988d525f1 100644 --- a/src/main/webapp/WEB-INF/views/dashboard/trafficProtocolTypeList.jsp +++ b/src/main/webapp/WEB-INF/views/dashboard/trafficProtocolTypeList.jsp @@ -196,7 +196,7 @@ $(".export-btn").click(function(){ headings:true, footers:true, formats:[dataType], - fileName:""+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate(), + fileName:""+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate()+nowDate.getHours()+nowDate.getMinutes()+nowDate.getSeconds(), bootstrap:false }); $("#myexport").click(); @@ -332,7 +332,7 @@ function protocolTypeChart(rs){ }, exporting: { allowHTML:true, - filename:""+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate(), + filename:""+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate()+nowDate.getHours()+nowDate.getMinutes()+nowDate.getSeconds(), scale:1, sourceWidth: 1280, sourceHeight: 500, diff --git a/src/main/webapp/WEB-INF/views/dashboard/trafficWebTypeList.jsp b/src/main/webapp/WEB-INF/views/dashboard/trafficWebTypeList.jsp index e7d1e0f37..51a02f508 100644 --- a/src/main/webapp/WEB-INF/views/dashboard/trafficWebTypeList.jsp +++ b/src/main/webapp/WEB-INF/views/dashboard/trafficWebTypeList.jsp @@ -264,7 +264,7 @@ headings:true, footers:true, formats:[dataType], - fileName:""+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate(), + fileName:""+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate()+nowDate.getHours()+nowDate.getMinutes()+nowDate.getSeconds(), bootstrap:false }); $("#myexport").click(); @@ -421,7 +421,7 @@ function webTypeChart(rs){ }, exporting: { allowHTML:true, - filename:""+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate(), + filename:""+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate()+nowDate.getHours()+nowDate.getMinutes()+nowDate.getSeconds(), scale:1, sourceWidth: 1280, sourceHeight: 500, diff --git a/src/main/webapp/static/pages/scripts/echart.js b/src/main/webapp/static/pages/scripts/echart.js index 553d3ff02..3a9404b94 100644 --- a/src/main/webapp/static/pages/scripts/echart.js +++ b/src/main/webapp/static/pages/scripts/echart.js @@ -21,15 +21,15 @@ var inoctetsNum=d.count; unit=changeUnit(inoctetsNum); inoctetsNum=changeNum(inoctetsNum); - var pktNum=new Array(); - var byteLen=new Array(); +// var pktNum=new Array(); +// var byteLen=new Array(); //协议图-操作系统 data.push({ name: d.protoType, y: parseFloat(inoctetsNum), // drilldown: d.protoType, }); - +/* pktNum[0]="pktNum"; pktNum[1]=parseInt(d.pktNum); byteLen[0]="byteLen"; @@ -41,7 +41,7 @@ type:'pie', innerSize: '70%', data: [pktNum,byteLen], - }); + });*/ }); var chart = Highcharts.chart('chart_1', { @@ -63,7 +63,7 @@ }, exporting: { allowHTML:true, - filename:'Protocol-Type', + filename:'Protocol-Type'+addDateName(), chartOptions: { plotOptions: { series: { @@ -257,7 +257,7 @@ //}, exporting: { allowHTML:true, - filename:'Active-IP', + filename:'Active-IP'+addDateName(), chartOptions: { plotOptions: { series: { @@ -482,7 +482,7 @@ },*/ exporting: { allowHTML:true, - filename:'App', + filename:'App'+addDateName(), buttons: exportingButton('#415262') }, noData:{ @@ -634,7 +634,7 @@ function echart_2(rs){ }, exporting: { allowHTML:true, - filename:'BS', + filename:'BS'+addDateName(), chartOptions: { plotOptions: { series: { @@ -787,7 +787,7 @@ function echart_5(rs){ },*/ exporting: { allowHTML:true, - filename:'BS', + filename:'BS'+addDateName(), chartOptions: { plotOptions: { series: { @@ -899,31 +899,31 @@ function echart_4(rs){ var data=new Array(); // var drillData=new Array(); var unit="bytes"; - $(rs).each(function(i, d) { - var inoctetsNum=d.count; - unit=changeUnit(inoctetsNum); - inoctetsNum=changeNum(inoctetsNum); -// var pktNum=new Array(); -// var byteLen=new Array(); - data.push({ - name: d.websiteService, - y: parseFloat(inoctetsNum), -// drilldown: d.websiteService, + $(rs).each(function(i, d) { + var inoctetsNum=d.count; + unit=changeUnit(inoctetsNum); + inoctetsNum=changeNum(inoctetsNum); + // var pktNum=new Array(); + // var byteLen=new Array(); + data.push({ + name: d.websiteService, + y: parseFloat(inoctetsNum), + // drilldown: d.websiteService, + }); + + /* pktNum[0]="pktNum"; + pktNum[1]=parseInt(d.pktNum); + byteLen[0]="byteLen"; + byteLen[1]=parseInt(d.byteLen); + + drillData.push({ + name: d.websiteService, + id: d.websiteService, + type:'pie', + data: [pktNum,byteLen], + });*/ + }); - -/* pktNum[0]="pktNum"; - pktNum[1]=parseInt(d.pktNum); - byteLen[0]="byteLen"; - byteLen[1]=parseInt(d.byteLen); - - drillData.push({ - name: d.websiteService, - id: d.websiteService, - type:'pie', - data: [pktNum,byteLen], - });*/ - - }); // 创建图例 var chart = Highcharts.chart('chart_4',{ chart: { @@ -935,7 +935,7 @@ function echart_4(rs){ }, exporting: { allowHTML:true, - filename:'Website', + filename:'Website'+addDateName(), chartOptions: { plotOptions: { series: { @@ -1082,7 +1082,7 @@ function echart_6(rs){ },*/ exporting: { allowHTML:true, - filename:'Website', + filename:'Website'+addDateName(), chartOptions: { plotOptions: { series: { @@ -1181,7 +1181,7 @@ function echart_topic_domain(rs){ var data=[{ 'id': '0.0', // 'parent': '', - 'name': 'TOPIC' + 'name': 'Service' }]; var unit="bytes"; $(rs).each(function(i,d){ @@ -1228,7 +1228,7 @@ function echart_topic_domain(rs){ },*/ exporting: { allowHTML:true, - filename:'Topic', + filename:'Service'+addDateName(), chartOptions: { plotOptions: { series: { @@ -1361,3 +1361,20 @@ function exportingButton(color) { }; return button; } +// 加时间后缀名 +function addDateName(){ + var nowDate=new Date(); + var myDate = new Date(); + //获取当前年 + var year=myDate.getFullYear(); + //获取当前月 + var month=myDate.getMonth()+1; + //获取当前日 + var date=myDate.getDate(); + var h=myDate.getHours(); //获取当前小时数(0-23) + var m=myDate.getMinutes(); //获取当前分钟数(0-59) + var s=myDate.getSeconds(); + + var now=year+""+month+""+date+""+h+""+m+""+s; + return now; +}