流量统计无数据增加提示信息

This commit is contained in:
zhanghongqing
2018-12-26 17:05:46 +08:00
parent b1a80e51de
commit c2a8335c41
9 changed files with 101 additions and 33 deletions

View File

@@ -80,6 +80,9 @@
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/offline-exporting.js"></script> <script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/offline-exporting.js"></script>
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/exporting-data.js"></script> <script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/exporting-data.js"></script>
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/standalone.js"></script> <script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/standalone.js"></script>
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/export-csv.js"></script>
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/no-data-to-display.js"></script>
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function() { $(document).ready(function() {
var starth = $("#beginDateh").val(); var starth = $("#beginDateh").val();
@@ -121,8 +124,15 @@
// type: 'area', // type: 'area',
zoomType : 'x' zoomType : 'x'
}, },
noData:{
style: {//设置字体颜色
color: '#413333',
fontFamily:'Microsoft YaHei',
fontWeight:"unset",
},
},
exporting : { exporting : {
filename : 'Action-Trans', filename : '<spring:message code="${searchAction}"></spring:message>'+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate(),
scale : 1, scale : 1,
sourceWidth : 1280, sourceWidth : 1280,
sourceHeight : 500, sourceHeight : 500,
@@ -247,7 +257,7 @@
var b = new Array(); var b = new Array();
b.push({ b.push({
type : 'string', type : 'string',
value : 'Action-Trans' value : '<spring:message code="${searchAction}"></spring:message>'
}) })
b.push({ b.push({
type : "string", type : "string",
@@ -258,7 +268,7 @@
var a = new Array(); var a = new Array();
a.push({ a.push({
type : 'string', type : 'string',
value : 'Total' value : '<spring:message code="total"></spring:message>'
}) })
var total = total = JSON.parse($("#total").val()); var total = total = JSON.parse($("#total").val());
a.push({ a.push({
@@ -267,13 +277,14 @@
}) })
xlsxRows.push(a) xlsxRows.push(a)
zipcelx({ zipcelx({
filename : 'Action-Trans', filename : '<spring:message code="${searchAction}"></spring:message>'+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate(),
sheet : { sheet : {
data : xlsxRows data : xlsxRows
} }
}); });
}; };
}(Highcharts)); }(Highcharts));
</script> </script>
</body> </body>
</html> </html>

View File

@@ -63,6 +63,8 @@
<%-- <script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/themes/grid.js"></script> --%> <%-- <script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/themes/grid.js"></script> --%>
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/exporting-data.js"></script> <script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/exporting-data.js"></script>
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/standalone.js"></script> <script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/standalone.js"></script>
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/no-data-to-display.js"></script>
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function(){ $(document).ready(function(){
var starth=$("#beginDateh").val(); var starth=$("#beginDateh").val();
@@ -103,7 +105,7 @@ function showActionTransChart(xData,series){
zoomType: 'x' zoomType: 'x'
}, },
exporting: { exporting: {
filename:'Action-Trans', filename:'<spring:message code="${searchAction}"></spring:message>',
scale:1, scale:1,
sourceWidth: 1280, sourceWidth: 1280,
sourceHeight: 500, sourceHeight: 500,
@@ -118,6 +120,13 @@ function showActionTransChart(xData,series){
} }
} }
}, },
noData:{
style: {//设置字体颜色
color: '#413333',
fontFamily:'Microsoft YaHei',
fontWeight:"unset",
},
},
title: { title: {
text: null text: null
}, },
@@ -188,13 +197,10 @@ function showActionTransChart(xData,series){
}) })
}else{ }else{
series.push({ series.push({
name: "Astana", name: " ",
data: []
});
series.push({
name: "Alamty",
data: [] data: []
}); });
} }
showActionTransChart(xData,series); showActionTransChart(xData,series);

View File

@@ -16,7 +16,7 @@
cursor: pointer; cursor: pointer;
} }
.Wdate { .Wdate {
width: 220px !important; width: 200px !important;
} }
</style> </style>
<body> <body>
@@ -114,6 +114,8 @@
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/exporting.js"></script> <script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/exporting.js"></script>
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/series-label.js"></script> <script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/series-label.js"></script>
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/offline-exporting.js"></script> <script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/offline-exporting.js"></script>
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/no-data-to-display.js"></script>
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function(){ $(document).ready(function(){
loading(); loading();
@@ -199,7 +201,7 @@ $(".export-btn").click(function(){
headings:true, headings:true,
footers:true, footers:true,
formats:[dataType], formats:[dataType],
fileName:"APP", fileName:"<spring:message code='App'></spring:message>",
bootstrap:false bootstrap:false
}); });
$("#myexport").click(); $("#myexport").click();
@@ -332,15 +334,17 @@ function protocolTypeChart(rs){
}, },
exporting: { exporting: {
allowHTML:true, allowHTML:true,
filename:"App", filename:"<spring:message code='App'></spring:message>",
scale:1, scale:1,
sourceWidth: 1280, sourceWidth: 1280,
sourceHeight: 500, sourceHeight: 500,
}, },
noData:{ noData:{
style: {//设置字体颜色 style: {//设置字体颜色
color: '#000', color: '#413333',
}, fontFamily:'Microsoft YaHei',
fontWeight:"unset",
},
}, },
// legend:{// 底部平鋪图例 // legend:{// 底部平鋪图例
// width:1280, // width:1280,

View File

@@ -85,6 +85,8 @@
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/offline-exporting.js"></script> <script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/offline-exporting.js"></script>
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/exporting-data.js"></script> <script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/exporting-data.js"></script>
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/standalone.js"></script> <script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/standalone.js"></script>
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/no-data-to-display.js"></script>
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function(){ $(document).ready(function(){
loading(); loading();
@@ -254,6 +256,13 @@ function showBandwidthChart(id,unitType,xdata,ydata,title){
x: 5 x: 5
} }
}, },
noData:{
style: {//设置字体颜色
color: '#413333',
fontFamily:'Microsoft YaHei',
fontWeight:"unset",
},
},
exporting: { exporting: {
filename:'Bandwidth', filename:'Bandwidth',
scale:1, scale:1,

View File

@@ -38,6 +38,8 @@
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/offline-exporting.js"></script> <script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/offline-exporting.js"></script>
<%-- <script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/themes/grid.js"></script> --%> <%-- <script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/themes/grid.js"></script> --%>
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/exporting-data.js"></script> <script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/exporting-data.js"></script>
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/no-data-to-display.js"></script>
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function(){ $(document).ready(function(){
domainTrans(); domainTrans();
@@ -107,6 +109,13 @@ function showDomainTrans(xData,series){
} }
} }
}, },
noData:{
style: {//设置字体颜色
color: '#413333',
fontFamily:'Microsoft YaHei',
fontWeight:"unset",
},
},
title: { title: {
text: domainName text: domainName
}, },

View File

@@ -93,7 +93,7 @@
</tbody> </tbody>
</table> </table>
<%-- <div class="page">${page}</div> --%> <div class="none-data" ><i class="fa fa-warning font-red-flamingo"></i>&nbsp;&nbsp;<spring:message code="noneData"/></div>
</div> </div>
</div> </div>
</div> </div>
@@ -109,6 +109,8 @@
<%-- <script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/themes/grid.js"></script> --%> <%-- <script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/themes/grid.js"></script> --%>
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/exporting-data.js"></script> <script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/exporting-data.js"></script>
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/standalone.js"></script> <script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/standalone.js"></script>
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/no-data-to-display.js"></script>
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function(){ $(document).ready(function(){
loading(); loading();
@@ -145,7 +147,7 @@ $(".export-btn").click(function(){
headings:true, headings:true,
footers:true, footers:true,
formats:[dataType], formats:[dataType],
fileName:"IP-Active-2", fileName:"<spring:message code='traffic_ipactive_hour_max'></spring:message>",
bootstrap:false bootstrap:false
}); });
$("#myexport").click(); $("#myexport").click();
@@ -172,7 +174,7 @@ function showIpActiveChart(xData,series){
zoomType: 'x' zoomType: 'x'
}, },
exporting: { exporting: {
filename:'IP-Active', filename:'<spring:message code="traffic_ipactive_hour_trend"></spring:message>',
scale:1, scale:1,
sourceWidth: 1280, sourceWidth: 1280,
sourceHeight: 500, sourceHeight: 500,
@@ -198,6 +200,13 @@ function showIpActiveChart(xData,series){
text: 'time', text: 'time',
align:'high', align:'high',
}, },
},
noData:{
style: {//设置字体颜色
color: '#413333',
fontFamily:'Microsoft YaHei',
fontWeight:"unset",
},
}, },
plotOptions: { plotOptions: {
series: { series: {
@@ -286,6 +295,7 @@ function showIpActiveChart(xData,series){
timeout:50000, timeout:50000,
success:function (data) { success:function (data) {
if(data!=null&&data.length>0){ if(data!=null&&data.length>0){
$('.none-data').hide();
var totalc2sByte= 0; var totalc2sByte= 0;
var totals2cByte= 0; var totals2cByte= 0;
var totalByte= 0; var totalByte= 0;
@@ -335,6 +345,8 @@ function showIpActiveChart(xData,series){
}) })
}else{
$('.none-data').show();
} }
closeTip(); closeTip();
}, },

View File

@@ -60,6 +60,8 @@
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/offline-exporting.js"></script> <script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/offline-exporting.js"></script>
<%-- <script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/themes/grid.js"></script> --%> <%-- <script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/themes/grid.js"></script> --%>
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/exporting-data.js"></script> <script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/exporting-data.js"></script>
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/no-data-to-display.js"></script>
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function(){ $(document).ready(function(){
var starth=$("#beginDateh").val(); var starth=$("#beginDateh").val();
@@ -112,7 +114,7 @@ function showPortActiveChart(xData,series){
zoomType: 'x' zoomType: 'x'
}, },
exporting: { exporting: {
filename:'Port-Active', filename:'<spring:message code="active_port"></spring:message>',
scale:1, scale:1,
sourceWidth: 1280, sourceWidth: 1280,
sourceHeight: 500, sourceHeight: 500,
@@ -127,6 +129,13 @@ function showPortActiveChart(xData,series){
} }
} }
}, },
noData:{
style: {//设置字体颜色
color: '#413333',
fontFamily:'Microsoft YaHei',
fontWeight:"unset",
},
},
plotOptions: { plotOptions: {
line: { line: {
marker: { marker: {

View File

@@ -104,6 +104,8 @@
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/exporting.js"></script> <script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/exporting.js"></script>
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/series-label.js"></script> <script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/series-label.js"></script>
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/offline-exporting.js"></script> <script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/offline-exporting.js"></script>
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/no-data-to-display.js"></script>
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function(){ $(document).ready(function(){
loading(); loading();
@@ -193,7 +195,7 @@ $(".export-btn").click(function(){
headings:true, headings:true,
footers:true, footers:true,
formats:[dataType], formats:[dataType],
fileName:"Protocol", fileName:"<spring:message code='protocol_type'></spring:message>",
bootstrap:false bootstrap:false
}); });
$("#myexport").click(); $("#myexport").click();
@@ -327,15 +329,17 @@ function protocolTypeChart(rs){
}, },
exporting: { exporting: {
allowHTML:true, allowHTML:true,
filename:"Protocol", filename:"<spring:message code='protocol_type'></spring:message>",
scale:1, scale:1,
sourceWidth: 1280, sourceWidth: 1280,
sourceHeight: 500, sourceHeight: 500,
}, },
noData:{ noData:{
style: {//设置字体颜色 style: {//设置字体颜色
color: '#000', color:'#413333',
}, fontWeight:"unset",
fontFamily:'Microsoft YaHei',
},
}, },
// legend:{// 底部平鋪图例 // legend:{// 底部平鋪图例
// width:1280, // width:1280,

View File

@@ -166,6 +166,8 @@
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/exporting.js"></script> <script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/exporting.js"></script>
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/series-label.js"></script> <script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/series-label.js"></script>
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/offline-exporting.js"></script> <script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/offline-exporting.js"></script>
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/no-data-to-display.js"></script>
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function(){ $(document).ready(function(){
loading(); loading();
@@ -261,7 +263,7 @@
headings:true, headings:true,
footers:true, footers:true,
formats:[dataType], formats:[dataType],
fileName:"Domain", fileName:"<spring:message code='domain_name'></spring:message>",
bootstrap:false bootstrap:false
}); });
$("#myexport").click(); $("#myexport").click();
@@ -416,15 +418,17 @@ function webTypeChart(rs){
}, },
exporting: { exporting: {
allowHTML:true, allowHTML:true,
filename:"Domain", filename:"<spring:message code='domain_name'></spring:message>",
scale:1, scale:1,
sourceWidth: 1280, sourceWidth: 1280,
sourceHeight: 500, sourceHeight: 500,
}, },
noData:{ noData:{
style: {//设置字体颜色 style: {//设置字体颜色
color: '#000', color: '#413333',
}, fontFamily:'Microsoft YaHei',
fontWeight:"unset",
},
}, },
// legend:{// 底部平鋪图例 // legend:{// 底部平鋪图例
// width:1280, // width:1280,