流量统计详情增加表格导出excel ,csv ,表格后增加total统计列,图片打印。
This commit is contained in:
@@ -67,10 +67,6 @@ public class TrafficStatisticsInfoController extends BaseController {
|
||||
HashMap<String, Object> m = new HashMap<String, Object>();
|
||||
List list = new ArrayList();
|
||||
try {
|
||||
String string = HttpClientUtil.get(Constants.DASHBOARD_URL+Constants.NTC_TOTAL_REPORT);
|
||||
Gson gson = new GsonBuilder().create();
|
||||
fromJsonList = gson.fromJson(string, new TypeToken<Map>(){}.getType());
|
||||
list = (ArrayList) fromJsonList.get("data");
|
||||
Random r = new Random();
|
||||
Double rejectNum=0d;
|
||||
Double dropConnNum=0d;
|
||||
@@ -81,7 +77,11 @@ public class TrafficStatisticsInfoController extends BaseController {
|
||||
Double inoctetsNum=0d;
|
||||
Double outoctetsNum=0d;
|
||||
Double bandwidth=0d;
|
||||
if(list!=null&&list.size()>0){
|
||||
String string = HttpClientUtil.get(Constants.DASHBOARD_URL+Constants.NTC_TOTAL_REPORT);
|
||||
Gson gson = new GsonBuilder().create();
|
||||
fromJsonList = gson.fromJson(string, new TypeToken<Map>(){}.getType());
|
||||
list = (ArrayList) fromJsonList.get("data");
|
||||
if(fromJsonList!=null&&list!=null&&list.size()>0){
|
||||
Map map = (Map) list.get(0);
|
||||
rejectNum = (Double) map.get("rejectNum") ;
|
||||
monitorNum = (Double) map.get("monitorNum");
|
||||
@@ -265,8 +265,6 @@ public class TrafficStatisticsInfoController extends BaseController {
|
||||
Map<String, Object> fromJsonList = new HashMap<String, Object>();
|
||||
Map map = new HashMap();
|
||||
//String url = Constants.DASHBOARD_URL+Constants.TRAFFIC_BANDWIDTH_TRANS_TWO;
|
||||
//String url="http://192.168.11.78:8080/galaxy/service/log/v1/"+Constants.TRAFFIC_BANDWIDTH_TRANS_THREE;
|
||||
//String url="http://192.168.11.78:8080/galaxy/service/log/v1/"+Constants.TRAFFIC_BANDWIDTH_TRANS_FOUR;
|
||||
String url=Constants.DASHBOARD_URL+Constants.TRAFFIC_BANDWIDTH_TRANS_THREE;
|
||||
//String url=Constants.DASHBOARD_URL+Constants.TRAFFIC_BANDWIDTH_TRANS_FOUR;
|
||||
try {
|
||||
@@ -502,9 +500,9 @@ public class TrafficStatisticsInfoController extends BaseController {
|
||||
logger.debug("website接口数据"+fromJsonList);
|
||||
list = (ArrayList) fromJsonList.get("data");
|
||||
BigDecimal divisor=new BigDecimal(1024*1024*1024);
|
||||
DecimalFormat df = new DecimalFormat("0.00");
|
||||
DecimalFormat df = new DecimalFormat("0.000000000");
|
||||
DecimalFormat dl = new DecimalFormat("0");
|
||||
DecimalFormat pf = new DecimalFormat("0.00%");
|
||||
DecimalFormat pf = new DecimalFormat("0.000000000");
|
||||
// Double totalLink=0d;
|
||||
Double totalGbyte=0d;
|
||||
Double totalPackets=0d;
|
||||
@@ -528,10 +526,10 @@ public class TrafficStatisticsInfoController extends BaseController {
|
||||
Map m=(Map)object;
|
||||
// Double perLink = ((Double)m.get("linkNum"))/totalLink;
|
||||
// m.put("perLink",pf.format(perLink));
|
||||
Double perPackets = ((Double)m.get("pktCount"))/totalPackets;
|
||||
m.put("perPackets", pf.format(perPackets));
|
||||
Double perGbyte = ((Double)m.get("byteCount"))/totalGbyte;
|
||||
m.put("perGbyte", pf.format(perGbyte));
|
||||
// Double perPackets = ((Double)m.get("pktCount"))/totalPackets;
|
||||
m.put("totalPackets", pf.format(totalPackets));
|
||||
// Double perGbyte = ((Double)m.get("byteCount"))/totalGbyte;
|
||||
m.put("totalGbyte", pf.format(totalGbyte/1024/1024/1024));
|
||||
if(map.containsKey(Long.parseLong(dl.format(m.get("webId"))))){
|
||||
m.put("website", map.get(Long.parseLong(dl.format(m.get("webId")))));
|
||||
}else{
|
||||
|
||||
@@ -80,8 +80,14 @@
|
||||
<div class="row">
|
||||
<div id="chart" style="width:98%;height: 510px; -moz-user-select: none; position: relative;"></div>
|
||||
</div>
|
||||
<div class="row pull-right">
|
||||
<button type="button" class="btn btn-default" id="export-btn"><i class="fa fa-download"> <spring:message code="export"/></i></button>
|
||||
<div class="btn-group pull-right">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"> <spring:message code="export"/>
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="menu" style="min-width: 81px;right: -9px;">
|
||||
<li><a class="btn export-btn" data-type="xlsx" id="export-btn"><i class="fa fa-download"> </i> excel </a><li>
|
||||
<li><a class="btn export-btn" data-type="csv" id="export-btn"><i class="fa fa-download"> </i> csv </a><li>
|
||||
</ul>
|
||||
</div>
|
||||
<br>
|
||||
<br>
|
||||
@@ -176,13 +182,14 @@ function ajaxAppList(start,end){
|
||||
});
|
||||
}
|
||||
// 导出列表
|
||||
$("#export-btn").click(function(){
|
||||
$(".export-btn").click(function(){
|
||||
var dataType = $(this).attr("data-type");
|
||||
getPageData(1,999999);// 设置导出页条数
|
||||
var te = $("#contentTable").tableExport({
|
||||
headings:true,
|
||||
footers:true,
|
||||
formats:["xlsx"],
|
||||
fileName:"App",
|
||||
formats:[dataType],
|
||||
fileName:"service",
|
||||
bootstrap:false
|
||||
});
|
||||
$("#myexport").click();
|
||||
@@ -224,6 +231,8 @@ function htmlData(fileDataS){
|
||||
}else{
|
||||
$('.none-data').hide();
|
||||
$('.M-box').show();
|
||||
var start=$("#beginDate").val();
|
||||
var end=$("#endDate").val();
|
||||
$.each(fileDataS,function (index,data){
|
||||
if(data!=null){
|
||||
var totalLink = data.totalLink;
|
||||
@@ -250,6 +259,17 @@ function htmlData(fileDataS){
|
||||
html+= "<td class='tc'>"+Math.round(data.GByte*100)/100+"</td>";
|
||||
html+= "<td class='tc'>"+gbytper+"%"+"</td>";
|
||||
html+="</tr>"
|
||||
if(index==fileDataS.length-1){
|
||||
html+="<tr class='tr-total hidden'>"
|
||||
html+= "<td class='tc'>"+"<spring:message code='report_total'/>"+"</td>";
|
||||
html+= "<td class='tc'>"+totalLink+"</td>";
|
||||
html+= "<td class='tc'>" +"100%"+"</td>";
|
||||
html+= "<td class='tc'>"+Math.round(totalPackets*100)/100+"</td>";
|
||||
html+= "<td class='tc'>"+"100%"+"</td>";
|
||||
html+= "<td class='tc'>"+Math.round(totalGByte*100)/100+"</td>";
|
||||
html+= "<td class='tc'>"+start+"--"+ end +"</td>";
|
||||
html+="</tr>"
|
||||
}
|
||||
}
|
||||
$("#tableData").append(html);
|
||||
});
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>
|
||||
<spring:message code="traffic_ip_active"></spring:message>
|
||||
<spring:message code="domain_name"></spring:message>
|
||||
</title>
|
||||
</head>
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
<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/themes/grid.js"></script> --%>
|
||||
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/exporting-data.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
domainTrans();
|
||||
|
||||
@@ -57,8 +57,14 @@
|
||||
<!-- <div class="row">
|
||||
<div id="chart" style="width:98%;height: 510px; -moz-user-select: none; position: relative;"></div>
|
||||
</div> -->
|
||||
<div class="row pull-right">
|
||||
<button type="button" class="btn btn-default" id="export-btn"><i class="fa fa-download"> <spring:message code="export"/></i></button>
|
||||
<div class="btn-group pull-right">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"> <spring:message code="export"/>
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="menu" style="min-width: 81px;right: -9px;">
|
||||
<li><a class="btn export-btn" data-type="xlsx" id="export-btn"><i class="fa fa-download"> </i> excel </a><li>
|
||||
<li><a class="btn export-btn" data-type="csv" id="export-btn"><i class="fa fa-download"> </i> csv </a><li>
|
||||
</ul>
|
||||
</div>
|
||||
<br>
|
||||
<br>
|
||||
@@ -108,7 +114,6 @@ $(document).ready(function(){
|
||||
},500000);// 五分钟调用一次
|
||||
});
|
||||
function searchList(){
|
||||
loading();
|
||||
var start=$("#beginDate").val();
|
||||
var end=$("#endDate").val();
|
||||
if(start==''||end==''||end==null||start==null){
|
||||
@@ -118,7 +123,6 @@ function searchList(){
|
||||
}
|
||||
}
|
||||
function ajaxProtocolList(start,end){
|
||||
loading();
|
||||
$.ajax({
|
||||
url: '${ctx}/dashboard/traffic/statisticList',
|
||||
type: 'get',
|
||||
@@ -126,6 +130,9 @@ function ajaxProtocolList(start,end){
|
||||
data:{"beginDate":start,"endDate":end},
|
||||
async:false,
|
||||
timeout:10000,
|
||||
beforeSend:function(){
|
||||
loading();
|
||||
},
|
||||
success:function (data){
|
||||
if(data!=null&&data.length>0&&data[0].error!=null){
|
||||
top.$.jBox.tip("<spring:message code='request_service_failed'/>", "<spring:message code='info'/>");
|
||||
@@ -156,12 +163,13 @@ function ajaxProtocolList(start,end){
|
||||
});
|
||||
}
|
||||
// 导出列表
|
||||
$("#export-btn").click(function(){
|
||||
$(".export-btn").click(function(){
|
||||
var dataType = $(this).attr("data-type");
|
||||
getPageData(1,999999);// 设置导出页条数
|
||||
var te = $("#contentTable").tableExport({
|
||||
headings:true,
|
||||
footers:true,
|
||||
formats:["xlsx"],
|
||||
formats:[dataType],
|
||||
fileName:"service",
|
||||
bootstrap:false
|
||||
});
|
||||
@@ -203,6 +211,8 @@ function htmlData(fileDataS){
|
||||
}else{
|
||||
$('.none-data').hide();
|
||||
$('.M-box').show();
|
||||
var start=$("#beginDate").val();
|
||||
var end=$("#endDate").val();
|
||||
$.each(fileDataS,function (index,data){
|
||||
if(data!=null){
|
||||
var html = "<tr>";
|
||||
@@ -214,6 +224,18 @@ function htmlData(fileDataS){
|
||||
html+= "<td class='tc'>"+(data.count/1073741824).toFixed(2)+"</td>";
|
||||
html+= "<td class='tc'>"+(data.count/data.allGByte*100).toFixed(2)+"%"+"</td>";
|
||||
html+="</tr>"
|
||||
if(index==fileDataS.length-1){
|
||||
html+="<tr class='tr-total hidden'>"
|
||||
html+= "<td class='tc'>"+"<spring:message code='report_total'/>"+"</td>";
|
||||
html+= "<td class='tc'>"+(data.allLink).toFixed(2)+"</td>";
|
||||
html+= "<td class='tc'>" +"100%"+"</td>";
|
||||
html+= "<td class='tc'>"+(data.allPackets).toFixed(2)+"</td>";
|
||||
html+= "<td class='tc'>"+"100%"+"</td>";
|
||||
html+= "<td class='tc'>"+(data.allGByte/1073741824).toFixed(2)+"</td>";
|
||||
html+= "<td class='tc'>"+"100%"+"</td>";
|
||||
html+= "<td class='tc'>"+start+"--"+ end +"</td>";
|
||||
html+="</tr>"
|
||||
}
|
||||
}
|
||||
$("#tableData").append(html);
|
||||
});
|
||||
|
||||
@@ -60,8 +60,14 @@
|
||||
<h3 class="page-title">
|
||||
<spring:message code="traffic_ipactive_hour_max"></spring:message>
|
||||
</h3>
|
||||
<div class="pull-right">
|
||||
<button type="button" onClick="return _export('${ctx}/dashboard/export');" class="btn btn-default"><i class="fa fa-download"> <spring:message code="export"/></i></button>
|
||||
<div class="btn-group pull-right">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"> <spring:message code="export"/>
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="menu" style="min-width: 81px;right: -9px;">
|
||||
<li><a class="btn export-btn" data-type="xlsx" id="export-btn"><i class="fa fa-download"> </i> excel </a><li>
|
||||
<li><a class="btn export-btn" data-type="csv" id="export-btn"><i class="fa fa-download"> </i> csv </a><li>
|
||||
</ul>
|
||||
</div>
|
||||
<br>
|
||||
<br>
|
||||
@@ -91,11 +97,15 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="${ctxStatic }/global/plugins/tableExport-3.3.13/xlsx.core.js"></script>
|
||||
<script src="${ctxStatic }/global/plugins/tableExport-3.3.13/FileSaver.js"></script>
|
||||
<script src="${ctxStatic }/global/plugins/tableExport-3.3.13/tableexport.js"></script>
|
||||
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/highcharts.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/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/js/exporting-data.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
var starth=$("#beginDateh").val();
|
||||
@@ -115,12 +125,22 @@ $(document).ready(function(){
|
||||
$("#searchForm")[0].reset();
|
||||
});
|
||||
});
|
||||
//导出列表
|
||||
$(".export-btn").click(function(){
|
||||
var dataType = $(this).attr("data-type");
|
||||
var te = $("#contentTable").tableExport({
|
||||
headings:true,
|
||||
footers:true,
|
||||
formats:[dataType],
|
||||
fileName:"IP-Active-2",
|
||||
bootstrap:false
|
||||
});
|
||||
$("#myexport").click();
|
||||
$("caption").remove();
|
||||
});
|
||||
function searchList(){
|
||||
var start=$("#beginDate").val();
|
||||
var end=$("#endDate").val();
|
||||
// IF(!CHECKDATE(START,END)){
|
||||
// RETURN FALSE
|
||||
// }
|
||||
loading();
|
||||
if(start==''||end==''||end==null||start==null){
|
||||
window.location.reload();
|
||||
@@ -130,26 +150,6 @@ function searchList(){
|
||||
}
|
||||
}
|
||||
|
||||
function checkDate(start,end){
|
||||
if(getDate(start)-getDate(end)>0){
|
||||
alert("结束时间不能小于开始时间!");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
function getDate(date){
|
||||
var dates = date.split("-");
|
||||
var dateReturn = '';
|
||||
for(var i=0; i<dates.length; i++){
|
||||
dateReturn+=dates[i];
|
||||
}
|
||||
return dateReturn;
|
||||
}
|
||||
function _export(url){
|
||||
window.location=url+"?beginDate="+$("#beginDateh").val()+"&endDate="+$("#endDateh").val();
|
||||
}
|
||||
|
||||
|
||||
|
||||
function showIpActiveChart(rs){
|
||||
var data=new Array();
|
||||
var xData=new Array();
|
||||
@@ -170,6 +170,16 @@ function showIpActiveChart(rs){
|
||||
scale:1,
|
||||
sourceWidth: 1280,
|
||||
sourceHeight: 500,
|
||||
buttons: {
|
||||
contextButton: {
|
||||
menuItems: [
|
||||
Highcharts.getOptions().exporting.buttons.contextButton.menuItems[0],// 打印
|
||||
Highcharts.getOptions().exporting.buttons.contextButton.menuItems[1],// jpeg
|
||||
Highcharts.getOptions().exporting.buttons.contextButton.menuItems[4],// excel
|
||||
Highcharts.getOptions().exporting.buttons.contextButton.menuItems[3],// cvs
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
title: {
|
||||
text: null
|
||||
@@ -181,27 +191,6 @@ function showIpActiveChart(rs){
|
||||
text: 'time',
|
||||
align:'high',
|
||||
},
|
||||
/* plotOptions: {
|
||||
area: {
|
||||
stacking: 'normal',
|
||||
lineColor: '#666666',
|
||||
lineWidth: 1,
|
||||
marker: {
|
||||
lineWidth: 1,
|
||||
lineColor: '#666666'
|
||||
}
|
||||
}
|
||||
}, */
|
||||
// labels:{
|
||||
// formatter:function(){
|
||||
// if(this.value.length>15){
|
||||
// return '<span>'+this.value.substring(10,20)+"..."+'</span>'
|
||||
// }else{
|
||||
// return this.value
|
||||
// }
|
||||
// },
|
||||
// }
|
||||
|
||||
},
|
||||
yAxis: {
|
||||
title: {
|
||||
@@ -261,9 +250,24 @@ function showIpActiveChart(rs){
|
||||
success:function (data) {
|
||||
$("#tbodyData").html("");
|
||||
if(data!=null&&data.length>0){
|
||||
var totalc2sByte= 0;
|
||||
var totals2cByte= 0;
|
||||
var totalByte= 0;
|
||||
var totalLink= 0;
|
||||
var totalc2sPkt= 0;
|
||||
var totals2cPkt= 0;
|
||||
var totalpacket= 0;
|
||||
$(data).each(function(i, rs) {
|
||||
var byteNum=rs.s2cByteLen+rs.c2sByteLen;
|
||||
var packetNum=rs.s2cPktNum+rs.c2sPktNum;
|
||||
totalc2sByte=totalc2sByte+(rs.c2sByteLen);
|
||||
totals2cByte=totals2cByte+(rs.s2cByteLen);
|
||||
totalByte=totalByte+(byteNum);
|
||||
totalLink=totalLink+(rs.linkNum);
|
||||
totalc2sPkt=totalc2sPkt+(rs.c2sPktNum);
|
||||
totals2cPkt=totals2cPkt+(rs.s2cPktNum);
|
||||
totalpacket=totalpacket+(packetNum);
|
||||
|
||||
var html = "<tr>";
|
||||
html+= "<td class='tc'>"+rs.ipAddr+"</td>";
|
||||
html+= "<td class='tc'>"+(rs.areaId==1? "Astana":"Alamty")+"</td>";
|
||||
@@ -276,6 +280,21 @@ function showIpActiveChart(rs){
|
||||
html+= "<td class='tc'>"+packetNum+"</td>";
|
||||
html+= "<td class='tc'>"+rs.statTime+"</td>";
|
||||
html+="</tr>"
|
||||
|
||||
if(i==data.length-1){
|
||||
html+="<tr class='tr-total hidden'>"
|
||||
html+= "<td class='tc'>"+"<spring:message code='report_total'/>"+"</td>";
|
||||
html+= "<td class='tc'>"+"--"+"</td>";
|
||||
html+= "<td class='tc'>"+totalc2sByte+"</td>";
|
||||
html+= "<td class='tc'>"+totals2cByte+"</td>";
|
||||
html+= "<td class='tc'>"+totalByte+"</td>";
|
||||
html+= "<td class='tc'>"+totalLink+"</td>";
|
||||
html+= "<td class='tc'>"+totalc2sPkt+"</td>";
|
||||
html+= "<td class='tc'>"+totals2cPkt+"</td>";
|
||||
html+= "<td class='tc'>"+totalpacket+"</td>";
|
||||
html+= "<td class='tc'>"+beginDate+"--"+ endDate +"</td>";
|
||||
html+="</tr>"
|
||||
}
|
||||
$("#tbodyData").append(html);
|
||||
|
||||
})
|
||||
|
||||
@@ -57,8 +57,14 @@
|
||||
<div class="row">
|
||||
<div id="chart" style="width:98%;height: 510px; -moz-user-select: none; position: relative;"></div>
|
||||
</div>
|
||||
<div class="row pull-right">
|
||||
<button type="button" class="btn btn-default" id="export-btn"><i class="fa fa-download"> <spring:message code="export"/></i></button>
|
||||
<div class="btn-group pull-right">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"> <spring:message code="export"/>
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="menu" style="min-width: 81px;right: -9px;">
|
||||
<li><a class="btn export-btn" data-type="xlsx" id="export-btn"><i class="fa fa-download"> </i> excel </a><li>
|
||||
<li><a class="btn export-btn" data-type="csv" id="export-btn"><i class="fa fa-download"> </i> csv </a><li>
|
||||
</ul>
|
||||
</div>
|
||||
<br>
|
||||
<br>
|
||||
@@ -108,7 +114,7 @@ $(document).ready(function(){
|
||||
},500000);// 五分钟调用一次
|
||||
});
|
||||
function searchList(){
|
||||
loading();
|
||||
// loading();
|
||||
var start=$("#beginDate").val();
|
||||
var end=$("#endDate").val();
|
||||
if(start==''||end==''||end==null||start==null){
|
||||
@@ -118,7 +124,7 @@ function searchList(){
|
||||
}
|
||||
}
|
||||
function ajaxProtocolList(start,end){
|
||||
loading();
|
||||
// loading();
|
||||
$.ajax({
|
||||
url: '${ctx}/dashboard/traffic/protocolList',
|
||||
type: 'get',
|
||||
@@ -126,6 +132,9 @@ function ajaxProtocolList(start,end){
|
||||
data:{"beginDate":start,"endDate":end},
|
||||
async:false,
|
||||
timeout:10000,
|
||||
beforeSend:function(){
|
||||
loading();
|
||||
},
|
||||
success:function (data){
|
||||
if(data!=null&&data.length>0&&data[0].error!=null){
|
||||
top.$.jBox.tip("<spring:message code='request_service_failed'/>", "<spring:message code='info'/>");
|
||||
@@ -153,13 +162,14 @@ function ajaxProtocolList(start,end){
|
||||
});
|
||||
}
|
||||
// 导出列表
|
||||
$("#export-btn").click(function(){
|
||||
$(".export-btn").click(function(){
|
||||
var dataType = $(this).attr("data-type");
|
||||
getPageData(1,999999);// 设置导出页条数
|
||||
var te = $("#contentTable").tableExport({
|
||||
headings:true,
|
||||
footers:true,
|
||||
formats:["xlsx"],
|
||||
fileName:"protocol",
|
||||
formats:[dataType],
|
||||
fileName:"Protocol",
|
||||
bootstrap:false
|
||||
});
|
||||
$("#myexport").click();
|
||||
@@ -200,6 +210,8 @@ function htmlData(fileDataS){
|
||||
}else{
|
||||
$('.none-data').hide();
|
||||
$('.M-box').show();
|
||||
var start=$("#beginDate").val();
|
||||
var end=$("#endDate").val();
|
||||
$.each(fileDataS,function (index,data){
|
||||
if(data!=null){
|
||||
var totalLink = data.totalLink;
|
||||
@@ -226,6 +238,17 @@ function htmlData(fileDataS){
|
||||
html+= "<td class='tc'>"+Math.round(data.GByte*100)/100+"</td>";
|
||||
html+= "<td class='tc'>"+gbytper+"%"+"</td>";
|
||||
html+="</tr>"
|
||||
if(index==fileDataS.length-1){
|
||||
html+="<tr class='tr-total hidden'>"
|
||||
html+= "<td class='tc'>"+"<spring:message code='report_total'/>"+"</td>";
|
||||
html+= "<td class='tc'>"+totalLink+"</td>";
|
||||
html+= "<td class='tc'>" +"100%"+"</td>";
|
||||
html+= "<td class='tc'>"+Math.round(totalPackets*100)/100+"</td>";
|
||||
html+= "<td class='tc'>"+"100%"+"</td>";
|
||||
html+= "<td class='tc'>"+Math.round(totalGByte*100)/100+"</td>";
|
||||
html+= "<td class='tc'>"+start+"--"+ end +"</td>";
|
||||
html+="</tr>"
|
||||
}
|
||||
}
|
||||
$("#tableData").append(html);
|
||||
});
|
||||
@@ -265,6 +288,7 @@ function protocolTypeChart(rs){
|
||||
});
|
||||
// 创建图例
|
||||
var chart = Highcharts.chart('chart',{
|
||||
|
||||
chart: {
|
||||
plotBackgroundColor:null,
|
||||
plotBorderWidth:null,
|
||||
|
||||
@@ -120,59 +120,21 @@
|
||||
<div class="col-md-12">
|
||||
<div class="portlet">
|
||||
<div class="portlet-body">
|
||||
|
||||
<div class="row">
|
||||
<form:form id="searchForm" modelAttribute="entry"
|
||||
action="${ctx}/dashboard/websiteList" method="post"
|
||||
class="form-search">
|
||||
<input id="pageNo" name="pageNo" type="hidden"
|
||||
value="${page.pageNo}" />
|
||||
<input id="pageSize" name="pageSize" type="hidden"
|
||||
value="${page.pageSize}" />
|
||||
</form:form>
|
||||
</div>
|
||||
<style>
|
||||
.show-two {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.title-num {
|
||||
margin-right: 8px;
|
||||
border-radius: 40px !important;
|
||||
background-color: #f34b60;
|
||||
color: #fff;
|
||||
width: 40px;
|
||||
text-align: center;
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.tbody .tr:active {
|
||||
background: rgb(210, 232, 251, 0.8);
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("#contentTable tbody tr").bind(
|
||||
'click',
|
||||
function() {
|
||||
$("tbody tr").removeClass("active");
|
||||
$(this).addClass("active");
|
||||
$("span[class='title-num']").html(
|
||||
' '
|
||||
+ ($(this).index() + 1)
|
||||
+ ' ')
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<sys:message content="${message}" type="${messageType }" />
|
||||
<div class="row">
|
||||
<div class="pull-right">
|
||||
<button type="button" class="btn btn-default" id="print-btn" >
|
||||
<i class="fa fa-download"> <spring:message code="print" /></i>
|
||||
</button>
|
||||
<button type="button" class="btn btn-default" id="export-btn" >
|
||||
<i class="fa fa-download"> <spring:message code="export" /></i>
|
||||
</button>
|
||||
<div class="btn-group pull-right">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"> <spring:message code="export"/>
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="menu" style="min-width: 81px;right: -9px;">
|
||||
<li><a class="btn export-btn" data-type="xlsx" id="export-btn"><i class="fa fa-download"> </i> excel </a><li>
|
||||
<li><a class="btn export-btn" data-type="csv" id="export-btn"><i class="fa fa-download"> </i> csv </a><li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
@@ -235,7 +197,6 @@
|
||||
}, 500000);// 五分钟调用一次
|
||||
});
|
||||
function searchList() {
|
||||
loading();
|
||||
var start = $("#beginDate").val();
|
||||
var end = $("#endDate").val();
|
||||
if (start == '' || end == '' || end == null || start == null) {
|
||||
@@ -291,14 +252,15 @@
|
||||
});
|
||||
}
|
||||
// 导出列表
|
||||
$("#export-btn").click(function() {
|
||||
getPageData(1, 999999);// 设置导出页条数
|
||||
$(".export-btn").click(function(){
|
||||
var dataType = $(this).attr("data-type");
|
||||
getPageData(1,999999);// 设置导出页条数
|
||||
var te = $("#contentTable").tableExport({
|
||||
headings : true,
|
||||
footers : true,
|
||||
formats : [ "xlsx" ],
|
||||
fileName : "Domain",
|
||||
bootstrap : false
|
||||
headings:true,
|
||||
footers:true,
|
||||
formats:[dataType],
|
||||
fileName:"Domain",
|
||||
bootstrap:false
|
||||
});
|
||||
$("#myexport").click();
|
||||
$("caption").remove();
|
||||
@@ -341,18 +303,45 @@
|
||||
} else {
|
||||
$('.none-data').hide();
|
||||
$('.M-box').show();
|
||||
var start=$("#beginDate").val();
|
||||
var end=$("#endDate").val();
|
||||
var totalunique=0;
|
||||
var totalpkt=0;
|
||||
var totalGbyte=0;
|
||||
$.each(fileDataS, function(index, data) {
|
||||
if (data != null) {
|
||||
|
||||
var packper=0;
|
||||
var gbytper=0;
|
||||
totalunique=totalunique+(data.uniqueNum);
|
||||
var totalPackets= data.totalPackets;
|
||||
var totalGbyte= data.totalGbyte;
|
||||
if(totalPackets!=null&&totalPackets!=0 ){
|
||||
packper=((data.pktCount/totalPackets)*100).toFixed(2);
|
||||
}
|
||||
if(totalGbyte!=null&&totalGbyte!=0 ){
|
||||
gbytper=((data.Gbyte/(totalGbyte))*100).toFixed(2);
|
||||
}
|
||||
var html = '<tr onclick="searchByDomain(\''+data.webId+'\',\''+data.website+'\')">';
|
||||
html += "<td class='tc'>" + data.website + "</td>";
|
||||
html += "<td class='tc'>" + data.uniqueNum + "</td>";
|
||||
html += "<td class='tc'>" + (((data.entranceId)==1) ? "Astana":"Alamty") + "</td>";
|
||||
html += "<td class='tc'>" + data.pktCount + "</td>";
|
||||
html += "<td class='tc'>" + data.perPackets + "</td>";
|
||||
html += "<td class='tc'>" + data.Gbyte + "</td>";
|
||||
html += "<td class='tc'>" + data.perGbyte + "</td>";
|
||||
html += "<td class='tc'>" + Math.round(data.pktCount*100)/100 + "</td>";
|
||||
html += "<td class='tc'>" + packper + " %</td>";
|
||||
html += "<td class='tc'>" + Math.round(data.Gbyte*100)/100 + "</td>";
|
||||
html += "<td class='tc'>" + gbytper + " %</td>";
|
||||
html += "</tr>"
|
||||
if(index==fileDataS.length-1){
|
||||
html+="<tr class='tr-total hidden'>"
|
||||
html+= "<td class='tc'>"+"<spring:message code='report_total'/>"+"</td>";
|
||||
html+= "<td class='tc'>"+totalunique+"</td>";
|
||||
html+= "<td class='tc'>" +"--"+"</td>";
|
||||
html+= "<td class='tc'>"+totalPackets+"</td>";
|
||||
html+= "<td class='tc'>"+"100%"+"</td>";
|
||||
html+= "<td class='tc'>"+totalGbyte+"</td>";
|
||||
html+= "<td class='tc'>"+"100%"+"</td>";
|
||||
html+= "<td class='tc'>"+start+"--"+ end +"</td>";
|
||||
html+="</tr>"
|
||||
}
|
||||
}
|
||||
$("#tableData").append(html);
|
||||
});
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
Highcharts JS v7.0.0 (2018-12-11)
|
||||
Exporting module
|
||||
|
||||
(c) 2010-2018 Torstein Honsi
|
||||
|
||||
License: www.highcharts.com/license
|
||||
*/
|
||||
(function(m){"object"===typeof module&&module.exports?module.exports=m:"function"===typeof define&&define.amd?define(function(){return m}):m("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(m){(function(a){a.ajax=function(f){var b=a.merge(!0,{url:!1,type:"GET",dataType:"json",success:!1,error:!1,data:!1,headers:{}},f);f={json:"application/json",xml:"application/xml",text:"text/plain",octet:"application/octet-stream"};var c=new XMLHttpRequest;if(!b.url)return!1;c.open(b.type.toUpperCase(),
|
||||
b.url,!0);c.setRequestHeader("Content-Type",f[b.dataType]||f.text);a.objectEach(b.headers,function(a,f){c.setRequestHeader(f,a)});c.onreadystatechange=function(){var a;if(4===c.readyState){if(200===c.status){a=c.responseText;if("json"===b.dataType)try{a=JSON.parse(a)}catch(v){b.error&&b.error(c,v);return}return b.success&&b.success(a)}b.error&&b.error(c,c.responseText)}};try{b.data=JSON.stringify(b.data)}catch(k){}c.send(b.data||!0)}})(m);(function(a){var f=a.win,b=f.navigator,c=f.document,k=f.URL||
|
||||
f.webkitURL||f,v=/Edge\/\d+/.test(b.userAgent);a.dataURLtoBlob=function(a){if((a=a.match(/data:([^;]*)(;base64)?,([0-9A-Za-z+/]+)/))&&3<a.length&&f.atob&&f.ArrayBuffer&&f.Uint8Array&&f.Blob&&k.createObjectURL){for(var c=f.atob(a[3]),b=new f.ArrayBuffer(c.length),b=new f.Uint8Array(b),g=0;g<b.length;++g)b[g]=c.charCodeAt(g);a=new f.Blob([b],{type:a[1]});return k.createObjectURL(a)}};a.downloadURL=function(e,k){var q=c.createElement("a"),g;if("string"===typeof e||e instanceof String||!b.msSaveOrOpenBlob){if(v||
|
||||
2E6<e.length)if(e=a.dataURLtoBlob(e),!e)throw"Failed to convert to blob";if(void 0!==q.download)q.href=e,q.download=k,c.body.appendChild(q),q.click(),c.body.removeChild(q);else try{if(g=f.open(e,"chart"),void 0===g||null===g)throw"Failed to open window";}catch(B){f.location.href=e}}else b.msSaveOrOpenBlob(e,k)}})(m);(function(a){function f(a,b){if(k.Blob&&k.navigator.msSaveOrOpenBlob)return new k.Blob(["\ufeff"+a],{type:b})}var b=a.defined,c=a.pick,k=a.win,v=k.document,e=a.seriesTypes,m=a.downloadURL;
|
||||
a.setOptions({exporting:{csv:{columnHeaderFormatter:null,dateFormat:"%Y-%m-%d %H:%M:%S",decimalPoint:null,itemDelimiter:null,lineDelimiter:"\n"},showTable:!1,useMultiLevelHeaders:!0,useRowspanHeaders:!0},lang:{downloadCSV:"Download CSV",downloadXLS:"Download XLS",openInCloud:"Open in Highcharts Cloud",viewData:"View data table"}});a.addEvent(a.Chart,"render",function(){this.options&&this.options.exporting&&this.options.exporting.showTable&&this.viewData()});a.Chart.prototype.setUpKeyToAxis=function(){e.arearange&&
|
||||
(e.arearange.prototype.keyToAxis={low:"y",high:"y"});e.gantt&&(e.gantt.prototype.keyToAxis={start:"x",end:"x"})};a.Chart.prototype.getDataRows=function(g){var f=this.time,e=this.options.exporting&&this.options.exporting.csv||{},h,l=this.xAxis,t={},k=[],n,m=[],p=[],y,w,u,C=function(d,b,h){if(e.columnHeaderFormatter){var u=e.columnHeaderFormatter(d,b,h);if(!1!==u)return u}return d?d instanceof a.Axis?d.options.title&&d.options.title.text||(d.isDatetimeAxis?"DateTime":"Category"):g?{columnTitle:1<h?
|
||||
b:d.name,topLevelColumnTitle:d.name}:d.name+(1<h?" ("+b+")":""):"Category"},z=[];w=0;this.setUpKeyToAxis();this.series.forEach(function(d){var b=d.options.keys||d.pointArrayMap||["y"],h=b.length,u=!d.requireSorting&&{},x={},B={},n=l.indexOf(d.xAxis),k,r;b.forEach(function(a){var b=(d.keyToAxis&&d.keyToAxis[a]||a)+"Axis";x[a]=d[b]&&d[b].categories||[];B[a]=d[b]&&d[b].isDatetimeAxis});if(!1!==d.options.includeInCSVExport&&!d.options.isInternal&&!1!==d.visible){a.find(z,function(d){return d[0]===n})||
|
||||
z.push([n,w]);for(r=0;r<h;)y=C(d,b[r],b.length),p.push(y.columnTitle||y),g&&m.push(y.topLevelColumnTitle||y),r++;k={chart:d.chart,autoIncrement:d.autoIncrement,options:d.options,pointArrayMap:d.pointArrayMap};d.options.data.forEach(function(a,g){var l,p;p={series:k};d.pointClass.prototype.applyOptions.apply(p,[a]);a=p.x;l=d.data[g]&&d.data[g].name;u&&(u[a]&&(a+="|"+g),u[a]=!0);r=0;d.xAxis&&"name"!==d.exportKey||(a=l);t[a]||(t[a]=[],t[a].xValues=[]);t[a].x=p.x;t[a].name=l;for(t[a].xValues[n]=p.x;r<
|
||||
h;)g=b[r],l=p[g],t[a][w+r]=c(x[g][l],B[g]?f.dateFormat(e.dateFormat,l):null,l),r++});w+=r}});for(n in t)t.hasOwnProperty(n)&&k.push(t[n]);var x,A;n=g?[m,p]:[p];for(w=z.length;w--;)x=z[w][0],A=z[w][1],h=l[x],k.sort(function(a,b){return a.xValues[x]-b.xValues[x]}),u=C(h),n[0].splice(A,0,u),g&&n[1]&&n[1].splice(A,0,u),k.forEach(function(a){var d=a.name;h&&!b(d)&&(h.isDatetimeAxis?(a.x instanceof Date&&(a.x=a.x.getTime()),d=f.dateFormat(e.dateFormat,a.x)):d=h.categories?c(h.names[a.x],h.categories[a.x],
|
||||
a.x):a.x);a.splice(A,0,d)});n=n.concat(k);a.fireEvent(this,"exportData",{dataRows:n});return n};a.Chart.prototype.getCSV=function(a){var b="",g=this.getDataRows(),h=this.options.exporting.csv,f=c(h.decimalPoint,","!==h.itemDelimiter&&a?(1.1).toLocaleString()[1]:"."),e=c(h.itemDelimiter,","===f?";":","),k=h.lineDelimiter;g.forEach(function(a,h){for(var c,l=a.length;l--;)c=a[l],"string"===typeof c&&(c='"'+c+'"'),"number"===typeof c&&"."!==f&&(c=c.toString().replace(".",f)),a[l]=c;b+=a.join(e);h<g.length-
|
||||
1&&(b+=k)});return b};a.Chart.prototype.getTable=function(a){var b="\x3ctable\x3e",g=this.options,h=a?(1.1).toLocaleString()[1]:".",f=c(g.exporting.useMultiLevelHeaders,!0);a=this.getDataRows(f);var e=0,k=f?a.shift():null,n=a.shift(),m=function(a,b,g,f){var e=c(f,"");b="text"+(b?" "+b:"");"number"===typeof e?(e=e.toString(),","===h&&(e=e.replace(".",h)),b="number"):f||(b="empty");return"\x3c"+a+(g?" "+g:"")+' class\x3d"'+b+'"\x3e'+e+"\x3c/"+a+"\x3e"};!1!==g.exporting.tableCaption&&(b+='\x3ccaption class\x3d"highcharts-table-caption"\x3e'+
|
||||
c(g.exporting.tableCaption,g.title.text?g.title.text.replace(/&/g,"\x26amp;").replace(/</g,"\x26lt;").replace(/>/g,"\x26gt;").replace(/"/g,"\x26quot;").replace(/'/g,"\x26#x27;").replace(/\//g,"\x26#x2F;"):"Chart")+"\x3c/caption\x3e");for(var p=0,q=a.length;p<q;++p)a[p].length>e&&(e=a[p].length);b+=function(a,b,e){var h="\x3cthead\x3e",c=0;e=e||b&&b.length;var k,d,l=0;if(d=f&&a&&b){a:if(d=a.length,b.length===d){for(;d--;)if(a[d]!==b[d]){d=!1;break a}d=!0}else d=!1;d=!d}if(d){for(h+="\x3ctr\x3e";c<
|
||||
e;++c)d=a[c],k=a[c+1],d===k?++l:l?(h+=m("th","highcharts-table-topheading",'scope\x3d"col" colspan\x3d"'+(l+1)+'"',d),l=0):(d===b[c]?g.exporting.useRowspanHeaders?(k=2,delete b[c]):(k=1,b[c]=""):k=1,h+=m("th","highcharts-table-topheading",'scope\x3d"col"'+(1<k?' valign\x3d"top" rowspan\x3d"'+k+'"':""),d));h+="\x3c/tr\x3e"}if(b){h+="\x3ctr\x3e";c=0;for(e=b.length;c<e;++c)void 0!==b[c]&&(h+=m("th",null,'scope\x3d"col"',b[c]));h+="\x3c/tr\x3e"}return h+"\x3c/thead\x3e"}(k,n,Math.max(e,n.length));b+=
|
||||
"\x3ctbody\x3e";a.forEach(function(a){b+="\x3ctr\x3e";for(var c=0;c<e;c++)b+=m(c?"td":"th",null,c?"":'scope\x3d"row"',a[c]);b+="\x3c/tr\x3e"});return b+="\x3c/tbody\x3e\x3c/table\x3e"};a.Chart.prototype.downloadCSV=function(){var a=this.getCSV(!0);m(f(a,"text/csv")||"data:text/csv,\ufeff"+encodeURIComponent(a),this.getFilename()+".csv")};a.Chart.prototype.downloadXLS=function(){var a='\x3chtml xmlns:o\x3d"urn:schemas-microsoft-com:office:office" xmlns:x\x3d"urn:schemas-microsoft-com:office:excel" xmlns\x3d"http://www.w3.org/TR/REC-html40"\x3e\x3chead\x3e\x3c!--[if gte mso 9]\x3e\x3cxml\x3e\x3cx:ExcelWorkbook\x3e\x3cx:ExcelWorksheets\x3e\x3cx:ExcelWorksheet\x3e\x3cx:Name\x3eArk1\x3c/x:Name\x3e\x3cx:WorksheetOptions\x3e\x3cx:DisplayGridlines/\x3e\x3c/x:WorksheetOptions\x3e\x3c/x:ExcelWorksheet\x3e\x3c/x:ExcelWorksheets\x3e\x3c/x:ExcelWorkbook\x3e\x3c/xml\x3e\x3c![endif]--\x3e\x3cstyle\x3etd{border:none;font-family: Calibri, sans-serif;} .number{mso-number-format:"0.00";} .text{ mso-number-format:"@";}\x3c/style\x3e\x3cmeta name\x3dProgId content\x3dExcel.Sheet\x3e\x3cmeta charset\x3dUTF-8\x3e\x3c/head\x3e\x3cbody\x3e'+
|
||||
this.getTable(!0)+"\x3c/body\x3e\x3c/html\x3e";m(f(a,"application/vnd.ms-excel")||"data:application/vnd.ms-excel;base64,"+k.btoa(unescape(encodeURIComponent(a))),this.getFilename()+".xls")};a.Chart.prototype.viewData=function(){this.dataTableDiv||(this.dataTableDiv=v.createElement("div"),this.dataTableDiv.className="highcharts-data-table",this.renderTo.parentNode.insertBefore(this.dataTableDiv,this.renderTo.nextSibling));this.dataTableDiv.innerHTML=this.getTable()};a.Chart.prototype.openInCloud=function(){function b(c){Object.keys(c).forEach(function(e){"function"===
|
||||
typeof c[e]&&delete c[e];a.isObject(c[e])&&b(c[e])})}var c,e;c=a.merge(this.userOptions);b(c);c={name:c.title&&c.title.text||"Chart title",options:c,settings:{constructor:"Chart",dataProvider:{csv:this.getCSV()}}};e=JSON.stringify(c);(function(){var a=v.createElement("form");v.body.appendChild(a);a.method="post";a.action="https://cloud-api.highcharts.com/openincloud";a.target="_blank";var b=v.createElement("input");b.type="hidden";b.name="chart";b.value=e;a.appendChild(b);a.submit();v.body.removeChild(a)})()};
|
||||
var q=a.getOptions().exporting;q&&(a.extend(q.menuItemDefinitions,{downloadCSV:{textKey:"downloadCSV",onclick:function(){this.downloadCSV()}},downloadXLS:{textKey:"downloadXLS",onclick:function(){this.downloadXLS()}},viewData:{textKey:"viewData",onclick:function(){this.viewData()}},openInCloud:{textKey:"openInCloud",onclick:function(){this.openInCloud()}}}),q.buttons.contextButton.menuItems.push("separator","downloadCSV","downloadXLS","viewData","openInCloud"));e.map&&(e.map.prototype.exportKey="name");
|
||||
e.mapbubble&&(e.mapbubble.prototype.exportKey="name");e.treemap&&(e.treemap.prototype.exportKey="name")})(m)});
|
||||
//# sourceMappingURL=export-data.js.map
|
||||
@@ -1,26 +1,34 @@
|
||||
/*
|
||||
Highcharts JS v6.1.0 (2018-04-13)
|
||||
Exporting module
|
||||
|
||||
(c) 2010-2017 Torstein Honsi
|
||||
|
||||
License: www.highcharts.com/license
|
||||
*/
|
||||
(function(h){"object"===typeof module&&module.exports?module.exports=h:h(Highcharts)})(function(h){(function(f){var h=f.defaultOptions,z=f.doc,A=f.Chart,w=f.addEvent,H=f.removeEvent,D=f.fireEvent,q=f.createElement,B=f.discardElement,u=f.css,p=f.merge,r=f.pick,k=f.each,E=f.objectEach,t=f.extend,I=f.isTouchDevice,C=f.win,F=C.navigator.userAgent,J=f.Renderer.prototype.symbols;/Edge\/|Trident\/|MSIE /.test(F);/firefox/i.test(F);t(h.lang,{/*printChart:"Print chart",*//*downloadPNG:"Download PNG image",*/downloadJPEG:"Download JPEG image",
|
||||
/*downloadPDF:"Download PDF document",*//*downloadSVG:"Download SVG vector image",*/contextButtonTitle:"download"});h.navigation={buttonOptions:{theme:{},symbolSize:14,symbolX:12.5,symbolY:10.5,align:"right",buttonSpacing:3,height:22,verticalAlign:"top",width:24}};p(!0,h.navigation,{menuStyle:{border:"1px solid #999999",background:"#ffffff",padding:"5px 0"},menuItemStyle:{padding:"0.5em 1em",background:"none",color:"#333333",fontSize:I?"14px":"11px",transition:"background 250ms, color 250ms"},menuItemHoverStyle:{background:"#335cad",
|
||||
color:"#ffffff"},buttonOptions:{symbolFill:"#666666",symbolStroke:"#666666",symbolStrokeWidth:3,theme:{fill:"#ffffff",stroke:"none",padding:5}}});h.exporting={type:"image/jpeg",url:"${pageContext.request.contextPath}/",printMaxWidth:780,scale:2,buttons:{contextButton:{className:"highcharts-contextbutton",menuClassName:"highcharts-contextmenu",symbol:"menu",_titleKey:"contextButtonTitle",menuItems:"downloadJPEG".split(" ")}},menuItemDefinitions:{/*printChart:{textKey:"printChart",
|
||||
onclick:function(){this.print()}},*//*separator:{separator:!0},*//*downloadPNG:{textKey:"downloadPNG",onclick:function(){this.exportChart()}},*/downloadJPEG:{textKey:"downloadJPEG",onclick:function(){this.exportChart({type:"image/jpeg"})}},/*downloadPDF:{textKey:"downloadPDF",onclick:function(){this.exportChart({type:"application/pdf"})}},*//*downloadSVG:{textKey:"downloadSVG",onclick:function(){this.exportChart({type:"image/svg+xml"})}}*/}};f.post=function(a,b,e){var c=q("form",p({method:"post",action:a,enctype:"multipart/form-data"},
|
||||
e),{display:"none"},z.body);E(b,function(a,b){q("input",{type:"hidden",name:b,value:a},null,c)});c.submit();B(c)};t(A.prototype,{sanitizeSVG:function(a,b){if(b&&b.exporting&&b.exporting.allowHTML){var e=a.match(/<\/svg>(.*?$)/);e&&e[1]&&(e='\x3cforeignObject x\x3d"0" y\x3d"0" width\x3d"'+b.chart.width+'" height\x3d"'+b.chart.height+'"\x3e\x3cbody xmlns\x3d"http://www.w3.org/1999/xhtml"\x3e'+e[1]+"\x3c/body\x3e\x3c/foreignObject\x3e",a=a.replace("\x3c/svg\x3e",e+"\x3c/svg\x3e"))}a=a.replace(/zIndex="[^"]+"/g,
|
||||
"").replace(/isShadow="[^"]+"/g,"").replace(/symbolName="[^"]+"/g,"").replace(/jQuery[0-9]+="[^"]+"/g,"").replace(/url\(("|")(\S+)("|")\)/g,"url($2)").replace(/url\([^#]+#/g,"url(#").replace(/<svg /,'\x3csvg xmlns:xlink\x3d"http://www.w3.org/1999/xlink" ').replace(/ (|NS[0-9]+\:)href=/g," xlink:href\x3d").replace(/\n/," ").replace(/<\/svg>.*?$/,"\x3c/svg\x3e").replace(/(fill|stroke)="rgba\(([ 0-9]+,[ 0-9]+,[ 0-9]+),([ 0-9\.]+)\)"/g,'$1\x3d"rgb($2)" $1-opacity\x3d"$3"').replace(/ /g,
|
||||
"\u00a0").replace(/­/g,"\u00ad");this.ieSanitizeSVG&&(a=this.ieSanitizeSVG(a));return a},getChartHTML:function(){return this.container.innerHTML},getSVG:function(a){var b,e,c,v,m,g=p(this.options,a);e=q("div",null,{position:"absolute",top:"-9999em",width:this.chartWidth+"px",height:this.chartHeight+"px"},z.body);c=this.renderTo.style.width;m=this.renderTo.style.height;c=g.exporting.sourceWidth||g.chart.width||/px$/.test(c)&&parseInt(c,10)||600;m=g.exporting.sourceHeight||g.chart.height||/px$/.test(m)&&
|
||||
parseInt(m,10)||400;t(g.chart,{animation:!1,renderTo:e,forExport:!0,renderer:"SVGRenderer",width:c,height:m});g.exporting.enabled=!1;delete g.data;g.series=[];k(this.series,function(a){v=p(a.userOptions,{animation:!1,enableMouseTracking:!1,showCheckbox:!1,visible:a.visible});v.isInternal||g.series.push(v)});k(this.axes,function(a){a.userOptions.internalKey||(a.userOptions.internalKey=f.uniqueKey())});b=new f.Chart(g,this.callback);a&&k(["xAxis","yAxis","series"],function(c){var d={};a[c]&&(d[c]=a[c],
|
||||
b.update(d))});k(this.axes,function(a){var c=f.find(b.axes,function(b){return b.options.internalKey===a.userOptions.internalKey}),d=a.getExtremes(),e=d.userMin,d=d.userMax;!c||void 0===e&&void 0===d||c.setExtremes(e,d,!0,!1)});c=b.getChartHTML();c=this.sanitizeSVG(c,g);g=null;b.destroy();B(e);return c},getSVGForExport:function(a,b){var e=this.options.exporting;return this.getSVG(p({chart:{borderRadius:0}},e.chartOptions,b,{exporting:{sourceWidth:a&&a.sourceWidth||e.sourceWidth,sourceHeight:a&&a.sourceHeight||
|
||||
e.sourceHeight}}))},exportChart:function(a,b){b=this.getSVGForExport(a,b);a=p(this.options.exporting,a);f.post(a.url,{filename:a.filename||"chart",type:a.type,width:a.width||0,scale:a.scale,svg:b},a.formAttributes)},print:function(){var a=this,b=a.container,e=[],c=b.parentNode,f=z.body,m=f.childNodes,g=a.options.exporting.printMaxWidth,d,n;if(!a.isPrinting){a.isPrinting=!0;a.pointer.reset(null,0);D(a,"beforePrint");if(n=g&&a.chartWidth>g)d=[a.options.chart.width,void 0,!1],a.setSize(g,void 0,!1);
|
||||
k(m,function(a,b){1===a.nodeType&&(e[b]=a.style.display,a.style.display="none")});f.appendChild(b);C.focus();C.print();setTimeout(function(){c.appendChild(b);k(m,function(a,b){1===a.nodeType&&(a.style.display=e[b])});a.isPrinting=!1;n&&a.setSize.apply(a,d);D(a,"afterPrint")},1E3)}},contextMenu:function(a,b,e,c,v,m,g){var d=this,n=d.options.navigation,h=d.chartWidth,G=d.chartHeight,p="cache-"+a,l=d[p],x=Math.max(v,m),y,r;l||(d[p]=l=q("div",{className:a},{position:"absolute",zIndex:1E3,padding:x+"px"},
|
||||
d.container),y=q("div",{className:"highcharts-menu"},null,l),u(y,t({MozBoxShadow:"3px 3px 10px #888",WebkitBoxShadow:"3px 3px 10px #888",boxShadow:"3px 3px 10px #888"},n.menuStyle)),r=function(){u(l,{display:"none"});g&&g.setState(0);d.openMenu=!1},d.exportEvents.push(w(l,"mouseleave",function(){l.hideTimer=setTimeout(r,500)}),w(l,"mouseenter",function(){f.clearTimeout(l.hideTimer)}),w(z,"mouseup",function(b){d.pointer.inClass(b.target,a)||r()})),k(b,function(a){"string"===typeof a&&(a=d.options.exporting.menuItemDefinitions[a]);
|
||||
if(f.isObject(a,!0)){var b;a.separator?b=q("hr",null,null,y):(b=q("div",{className:"highcharts-menu-item",onclick:function(b){b&&b.stopPropagation();r();a.onclick&&a.onclick.apply(d,arguments)},innerHTML:a.text||d.options.lang[a.textKey]},null,y),b.onmouseover=function(){u(this,n.menuItemHoverStyle)},b.onmouseout=function(){u(this,n.menuItemStyle)},u(b,t({cursor:"pointer"},n.menuItemStyle)));d.exportDivElements.push(b)}}),d.exportDivElements.push(y,l),d.exportMenuWidth=l.offsetWidth,d.exportMenuHeight=
|
||||
l.offsetHeight);b={display:"block"};e+d.exportMenuWidth>h?b.right=h-e-v-x+"px":b.left=e-x+"px";c+m+d.exportMenuHeight>G&&"top"!==g.alignOptions.verticalAlign?b.bottom=G-c-x+"px":b.top=c+m-x+"px";u(l,b);d.openMenu=!0},addButton:function(a){var b=this,e=b.renderer,c=p(b.options.navigation.buttonOptions,a),f=c.onclick,m=c.menuItems,g,d,n=c.symbolSize||12;b.btnCount||(b.btnCount=0);b.exportDivElements||(b.exportDivElements=[],b.exportSVGElements=[]);if(!1!==c.enabled){var h=c.theme,k=h.states,q=k&&k.hover,
|
||||
k=k&&k.select,l;delete h.states;f?l=function(a){a.stopPropagation();f.call(b,a)}:m&&(l=function(){b.contextMenu(d.menuClassName,m,d.translateX,d.translateY,d.width,d.height,d);d.setState(2)});c.text&&c.symbol?h.paddingLeft=r(h.paddingLeft,25):c.text||t(h,{width:c.width,height:c.height,padding:0});d=e.button(c.text,0,0,l,h,q,k).addClass(a.className).attr({"stroke-linecap":"round",title:r(b.options.lang[c._titleKey],""),zIndex:3});d.menuClassName=a.menuClassName||"highcharts-menu-"+b.btnCount++;c.symbol&&
|
||||
(g=e.symbol(c.symbol,c.symbolX-n/2,c.symbolY-n/2,n,n,{width:n,height:n}).addClass("highcharts-button-symbol").attr({zIndex:1}).add(d),g.attr({stroke:c.symbolStroke,fill:c.symbolFill,"stroke-width":c.symbolStrokeWidth||1}));d.add().align(t(c,{width:d.width,x:r(c.x,b.buttonOffset)}),!0,"spacingBox");b.buttonOffset+=(d.width+c.buttonSpacing)*("right"===c.align?-1:1);b.exportSVGElements.push(d,g)}},destroyExport:function(a){var b=a?a.target:this;a=b.exportSVGElements;var e=b.exportDivElements,c=b.exportEvents,
|
||||
h;a&&(k(a,function(a,c){a&&(a.onclick=a.ontouchstart=null,h="cache-"+a.menuClassName,b[h]&&delete b[h],b.exportSVGElements[c]=a.destroy())}),a.length=0);e&&(k(e,function(a,c){f.clearTimeout(a.hideTimer);H(a,"mouseleave");b.exportDivElements[c]=a.onmouseout=a.onmouseover=a.ontouchstart=a.onclick=null;B(a)}),e.length=0);c&&(k(c,function(a){a()}),c.length=0)}});J.menu=function(a,b,e,c){return["M",a,b+2.5,"L",a+e,b+2.5,"M",a,b+c/2+.5,"L",a+e,b+c/2+.5,"M",a,b+c-1.5,"L",a+e,b+c-1.5]};A.prototype.renderExporting=
|
||||
function(){var a=this,b=a.options.exporting,e=b.buttons,c=a.isDirtyExporting||!a.exportSVGElements;a.buttonOffset=0;a.isDirtyExporting&&a.destroyExport();c&&!1!==b.enabled&&(a.exportEvents=[],E(e,function(b){a.addButton(b)}),a.isDirtyExporting=!1);w(a,"destroy",a.destroyExport)};A.prototype.callbacks.push(function(a){a.renderExporting();w(a,"redraw",a.renderExporting);k(["exporting","navigation"],function(b){a[b]={update:function(e,c){a.isDirtyExporting=!0;p(!0,a.options[b],e);r(c,!0)&&a.redraw()}}})})})(h)});
|
||||
/*
|
||||
Highcharts JS v7.0.0 (2018-12-11)
|
||||
Exporting module
|
||||
|
||||
(c) 2010-2018 Torstein Honsi
|
||||
|
||||
License: www.highcharts.com/license
|
||||
*/
|
||||
(function(l){"object"===typeof module&&module.exports?module.exports=l:"function"===typeof define&&define.amd?define(function(){return l}):l("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(l){(function(g){var y=g.defaultOptions,z=g.doc,l=g.Chart,q=g.addEvent,I=g.removeEvent,C=g.fireEvent,t=g.createElement,D=g.discardElement,r=g.css,p=g.merge,u=g.pick,E=g.objectEach,x=g.extend,J=g.isTouchDevice,A=g.win,G=A.navigator.userAgent,F=g.SVGRenderer,H=g.Renderer.prototype.symbols,K=/Edge\/|Trident\/|MSIE /.test(G),
|
||||
L=/firefox/i.test(G);x(y.lang,{printChart:"Print chart"/*,downloadPNG:"Download PNG image"*/,downloadJPEG:"Download image"/*,downloadPDF:"Download PDF document",downloadSVG:"Download SVG vector image"*/,contextButtonTitle:"Chart context menu"});y.navigation||(y.navigation={});p(!0,y.navigation,{buttonOptions:{theme:{},symbolSize:14,symbolX:12.5,symbolY:10.5,align:"right",buttonSpacing:3,height:22,verticalAlign:"top",width:24}});p(!0,y.navigation,{menuStyle:{border:"1px solid #999999",background:"#ffffff",
|
||||
padding:"5px 0"},menuItemStyle:{padding:"0.5em 1em",color:"#333333",background:"none",fontSize:J?"14px":"11px",transition:"background 250ms, color 250ms"},menuItemHoverStyle:{background:"#335cad",color:"#ffffff"},buttonOptions:{symbolFill:"#666666",symbolStroke:"#666666",symbolStrokeWidth:3,theme:{padding:5}}});y.exporting={type:"image/png",url:"https://export.highcharts.com/",printMaxWidth:780,scale:2,buttons:{contextButton:{className:"highcharts-contextbutton",menuClassName:"highcharts-contextmenu",
|
||||
symbol:"menu",titleKey:"contextButtonTitle",menuItems:"printChart downloadJPEG".split(" ")}},menuItemDefinitions:{printChart:{textKey:"printChart",onclick:function(){this.print()}}/*,separator:{separator:!0},downloadPNG:{textKey:"downloadPNG",onclick:function(){this.exportChart()}}*/,downloadJPEG:{textKey:"downloadJPEG",onclick:function(){this.exportChart({type:"image/jpeg"})}},/*downloadPDF:{textKey:"downloadPDF",onclick:function(){this.exportChart({type:"application/pdf"})}},*/
|
||||
/*downloadSVG:{textKey:"downloadSVG",onclick:function(){this.exportChart({type:"image/svg+xml"})}}*/}};g.post=function(b,a,d){var c=t("form",p({method:"post",action:b,enctype:"multipart/form-data"},d),{display:"none"},z.body);E(a,function(a,b){t("input",{type:"hidden",name:b,value:a},null,c)});c.submit();D(c)};x(l.prototype,{sanitizeSVG:function(b,a){if(a&&a.exporting&&a.exporting.allowHTML){var d=b.match(/<\/svg>(.*?$)/);d&&d[1]&&(d='\x3cforeignObject x\x3d"0" y\x3d"0" width\x3d"'+a.chart.width+'" height\x3d"'+
|
||||
a.chart.height+'"\x3e\x3cbody xmlns\x3d"http://www.w3.org/1999/xhtml"\x3e'+d[1]+"\x3c/body\x3e\x3c/foreignObject\x3e",b=b.replace("\x3c/svg\x3e",d+"\x3c/svg\x3e"))}b=b.replace(/zIndex="[^"]+"/g,"").replace(/symbolName="[^"]+"/g,"").replace(/jQuery[0-9]+="[^"]+"/g,"").replace(/url\(("|")(\S+)("|")\)/g,"url($2)").replace(/url\([^#]+#/g,"url(#").replace(/<svg /,'\x3csvg xmlns:xlink\x3d"http://www.w3.org/1999/xlink" ').replace(/ (|NS[0-9]+\:)href=/g," xlink:href\x3d").replace(/\n/," ").replace(/<\/svg>.*?$/,
|
||||
"\x3c/svg\x3e").replace(/(fill|stroke)="rgba\(([ 0-9]+,[ 0-9]+,[ 0-9]+),([ 0-9\.]+)\)"/g,'$1\x3d"rgb($2)" $1-opacity\x3d"$3"').replace(/ /g,"\u00a0").replace(/­/g,"\u00ad");this.ieSanitizeSVG&&(b=this.ieSanitizeSVG(b));return b},getChartHTML:function(){this.styledMode&&this.inlineStyles();return this.container.innerHTML},getSVG:function(b){var a,d,c,w,m,h=p(this.options,b);d=t("div",null,{position:"absolute",top:"-9999em",width:this.chartWidth+"px",height:this.chartHeight+"px"},z.body);c=
|
||||
this.renderTo.style.width;m=this.renderTo.style.height;c=h.exporting.sourceWidth||h.chart.width||/px$/.test(c)&&parseInt(c,10)||(h.isGantt?800:600);m=h.exporting.sourceHeight||h.chart.height||/px$/.test(m)&&parseInt(m,10)||400;x(h.chart,{animation:!1,renderTo:d,forExport:!0,renderer:"SVGRenderer",width:c,height:m});h.exporting.enabled=!1;delete h.data;h.series=[];this.series.forEach(function(a){w=p(a.userOptions,{animation:!1,enableMouseTracking:!1,showCheckbox:!1,visible:a.visible});w.isInternal||
|
||||
h.series.push(w)});this.axes.forEach(function(a){a.userOptions.internalKey||(a.userOptions.internalKey=g.uniqueKey())});a=new g.Chart(h,this.callback);b&&["xAxis","yAxis","series"].forEach(function(c){var d={};b[c]&&(d[c]=b[c],a.update(d))});this.axes.forEach(function(b){var c=g.find(a.axes,function(a){return a.options.internalKey===b.userOptions.internalKey}),d=b.getExtremes(),e=d.userMin,d=d.userMax;c&&(void 0!==e&&e!==c.min||void 0!==d&&d!==c.max)&&c.setExtremes(e,d,!0,!1)});c=a.getChartHTML();
|
||||
C(this,"getSVG",{chartCopy:a});c=this.sanitizeSVG(c,h);h=null;a.destroy();D(d);return c},getSVGForExport:function(b,a){var d=this.options.exporting;return this.getSVG(p({chart:{borderRadius:0}},d.chartOptions,a,{exporting:{sourceWidth:b&&b.sourceWidth||d.sourceWidth,sourceHeight:b&&b.sourceHeight||d.sourceHeight}}))},getFilename:function(){var b=this.userOptions.title&&this.userOptions.title.text,a=this.options.exporting.filename;if(a)return a;"string"===typeof b&&(a=b.toLowerCase().replace(/<\/?[^>]+(>|$)/g,
|
||||
"").replace(/[\s_]+/g,"-").replace(/[^a-z0-9\-]/g,"").replace(/^[\-]+/g,"").replace(/[\-]+/g,"-").substr(0,24).replace(/[\-]+$/g,""));if(!a||5>a.length)a="chart";return a},exportChart:function(b,a){a=this.getSVGForExport(b,a);b=p(this.options.exporting,b);g.post(b.url,{filename:b.filename||this.getFilename(),type:b.type,width:b.width||0,scale:b.scale,svg:a},b.formAttributes)},print:function(){function b(b){(a.fixedDiv?[a.fixedDiv,a.scrollingContainer]:[a.container]).forEach(function(a){b.appendChild(a)})}
|
||||
var a=this,d=[],c=z.body,g=c.childNodes,m=a.options.exporting.printMaxWidth,h,e;if(!a.isPrinting){a.isPrinting=!0;a.pointer.reset(null,0);C(a,"beforePrint");if(e=m&&a.chartWidth>m)h=[a.options.chart.width,void 0,!1],a.setSize(m,void 0,!1);g.forEach(function(a,b){1===a.nodeType&&(d[b]=a.style.display,a.style.display="none")});b(c);setTimeout(function(){A.focus();A.print();setTimeout(function(){b(a.renderTo);g.forEach(function(a,b){1===a.nodeType&&(a.style.display=d[b])});a.isPrinting=!1;e&&a.setSize.apply(a,
|
||||
h);C(a,"afterPrint")},1E3)},1)}},contextMenu:function(b,a,d,c,w,m,h){var e=this,n=e.options.navigation,k=e.chartWidth,v=e.chartHeight,l="cache-"+b,f=e[l],B=Math.max(w,m),p;f||(e.exportContextMenu=e[l]=f=t("div",{className:b},{position:"absolute",zIndex:1E3,padding:B+"px",pointerEvents:"auto"},e.fixedDiv||e.container),p=t("div",{className:"highcharts-menu"},null,f),e.styledMode||r(p,x({MozBoxShadow:"3px 3px 10px #888",WebkitBoxShadow:"3px 3px 10px #888",boxShadow:"3px 3px 10px #888"},n.menuStyle)),
|
||||
f.hideMenu=function(){r(f,{display:"none"});h&&h.setState(0);e.openMenu=!1;g.clearTimeout(f.hideTimer)},e.exportEvents.push(q(f,"mouseleave",function(){f.hideTimer=setTimeout(f.hideMenu,500)}),q(f,"mouseenter",function(){g.clearTimeout(f.hideTimer)}),q(z,"mouseup",function(a){e.pointer.inClass(a.target,b)||f.hideMenu()}),q(f,"click",function(){e.openMenu&&f.hideMenu()})),a.forEach(function(a){"string"===typeof a&&(a=e.options.exporting.menuItemDefinitions[a]);if(g.isObject(a,!0)){var b;a.separator?
|
||||
b=t("hr",null,null,p):(b=t("div",{className:"highcharts-menu-item",onclick:function(b){b&&b.stopPropagation();f.hideMenu();a.onclick&&a.onclick.apply(e,arguments)},innerHTML:a.text||e.options.lang[a.textKey]},null,p),e.styledMode||(b.onmouseover=function(){r(this,n.menuItemHoverStyle)},b.onmouseout=function(){r(this,n.menuItemStyle)},r(b,x({cursor:"pointer"},n.menuItemStyle))));e.exportDivElements.push(b)}}),e.exportDivElements.push(p,f),e.exportMenuWidth=f.offsetWidth,e.exportMenuHeight=f.offsetHeight);
|
||||
a={display:"block"};d+e.exportMenuWidth>k?a.right=k-d-w-B+"px":a.left=d-B+"px";c+m+e.exportMenuHeight>v&&"top"!==h.alignOptions.verticalAlign?a.bottom=v-c-B+"px":a.top=c+m-B+"px";r(f,a);e.openMenu=!0},addButton:function(b){var a=this,d=a.renderer,c=p(a.options.navigation.buttonOptions,b),g=c.onclick,m=c.menuItems,h,e,n=c.symbolSize||12;a.btnCount||(a.btnCount=0);a.exportDivElements||(a.exportDivElements=[],a.exportSVGElements=[]);if(!1!==c.enabled){var k=c.theme,v=k.states,l=v&&v.hover,v=v&&v.select,
|
||||
f;a.styledMode||(k.fill=u(k.fill,"#ffffff"),k.stroke=u(k.stroke,"none"));delete k.states;g?f=function(b){b&&b.stopPropagation();g.call(a,b)}:m&&(f=function(b){b&&b.stopPropagation();a.contextMenu(e.menuClassName,m,e.translateX,e.translateY,e.width,e.height,e);e.setState(2)});c.text&&c.symbol?k.paddingLeft=u(k.paddingLeft,25):c.text||x(k,{width:c.width,height:c.height,padding:0});a.styledMode||(k["stroke-linecap"]="round",k.fill=u(k.fill,"#ffffff"),k.stroke=u(k.stroke,"none"));e=d.button(c.text,0,
|
||||
0,f,k,l,v).addClass(b.className).attr({title:u(a.options.lang[c._titleKey||c.titleKey],"")});e.menuClassName=b.menuClassName||"highcharts-menu-"+a.btnCount++;c.symbol&&(h=d.symbol(c.symbol,c.symbolX-n/2,c.symbolY-n/2,n,n,{width:n,height:n}).addClass("highcharts-button-symbol").attr({zIndex:1}).add(e),a.styledMode||h.attr({stroke:c.symbolStroke,fill:c.symbolFill,"stroke-width":c.symbolStrokeWidth||1}));e.add(a.exportingGroup).align(x(c,{width:e.width,x:u(c.x,a.buttonOffset)}),!0,"spacingBox");a.buttonOffset+=
|
||||
(e.width+c.buttonSpacing)*("right"===c.align?-1:1);a.exportSVGElements.push(e,h)}},destroyExport:function(b){var a=b?b.target:this;b=a.exportSVGElements;var d=a.exportDivElements,c=a.exportEvents,l;b&&(b.forEach(function(b,c){b&&(b.onclick=b.ontouchstart=null,l="cache-"+b.menuClassName,a[l]&&delete a[l],a.exportSVGElements[c]=b.destroy())}),b.length=0);a.exportingGroup&&(a.exportingGroup.destroy(),delete a.exportingGroup);d&&(d.forEach(function(b,c){g.clearTimeout(b.hideTimer);I(b,"mouseleave");a.exportDivElements[c]=
|
||||
b.onmouseout=b.onmouseover=b.ontouchstart=b.onclick=null;D(b)}),d.length=0);c&&(c.forEach(function(a){a()}),c.length=0)}});F.prototype.inlineToAttributes="fill stroke strokeLinecap strokeLinejoin strokeWidth textAnchor x y".split(" ");F.prototype.inlineBlacklist=[/-/,/^(clipPath|cssText|d|height|width)$/,/^font$/,/[lL]ogical(Width|Height)$/,/perspective/,/TapHighlightColor/,/^transition/,/^length$/];F.prototype.unstyledElements=["clipPath","defs","desc"];l.prototype.inlineStyles=function(){function b(a){return a.replace(/([A-Z])/g,
|
||||
function(a,b){return"-"+b.toLowerCase()})}function a(d){function m(a,f){q=t=!1;if(l){for(r=l.length;r--&&!t;)t=l[r].test(f);q=!t}"transform"===f&&"none"===a&&(q=!0);for(r=g.length;r--&&!q;)q=g[r].test(f)||"function"===typeof a;q||v[f]===a&&"svg"!==d.nodeName||e[d.nodeName][f]===a||(-1!==c.indexOf(f)?d.setAttribute(b(f),a):u+=b(f)+":"+a+";")}var f,v,u="",w,q,t,r;if(1===d.nodeType&&-1===h.indexOf(d.nodeName)){f=A.getComputedStyle(d,null);v="svg"===d.nodeName?{}:A.getComputedStyle(d.parentNode,null);
|
||||
e[d.nodeName]||(n=k.getElementsByTagName("svg")[0],w=k.createElementNS(d.namespaceURI,d.nodeName),n.appendChild(w),e[d.nodeName]=p(A.getComputedStyle(w,null)),"text"===d.nodeName&&delete e.text.fill,n.removeChild(w));if(L||K)for(var x in f)m(f[x],x);else E(f,m);u&&(f=d.getAttribute("style"),d.setAttribute("style",(f?f+";":"")+u));"svg"===d.nodeName&&d.setAttribute("stroke-width","1px");"text"!==d.nodeName&&[].forEach.call(d.children||d.childNodes,a)}}var d=this.renderer,c=d.inlineToAttributes,g=d.inlineBlacklist,
|
||||
l=d.inlineWhitelist,h=d.unstyledElements,e={},n,k,d=z.createElement("iframe");r(d,{width:"1px",height:"1px",visibility:"hidden"});z.body.appendChild(d);k=d.contentWindow.document;k.open();k.write('\x3csvg xmlns\x3d"http://www.w3.org/2000/svg"\x3e\x3c/svg\x3e');k.close();a(this.container.querySelector("svg"));n.parentNode.removeChild(n)};H.menu=function(b,a,d,c){return["M",b,a+2.5,"L",b+d,a+2.5,"M",b,a+c/2+.5,"L",b+d,a+c/2+.5,"M",b,a+c-1.5,"L",b+d,a+c-1.5]};H.menuball=function(b,a,d,c){b=[];c=c/3-
|
||||
2;return b=b.concat(this.circle(d-c,a,c,c),this.circle(d-c,a+c+4,c,c),this.circle(d-c,a+2*(c+4),c,c))};l.prototype.renderExporting=function(){var b=this,a=b.options.exporting,d=a.buttons,c=b.isDirtyExporting||!b.exportSVGElements;b.buttonOffset=0;b.isDirtyExporting&&b.destroyExport();c&&!1!==a.enabled&&(b.exportEvents=[],b.exportingGroup=b.exportingGroup||b.renderer.g("exporting-group").attr({zIndex:3}).add(),E(d,function(a){b.addButton(a)}),b.isDirtyExporting=!1);q(b,"destroy",b.destroyExport)};
|
||||
q(l,"init",function(){var b=this;["exporting","navigation"].forEach(function(a){b[a]={update:function(d,c){b.isDirtyExporting=!0;p(!0,b.options[a],d);u(c,!0)&&b.redraw()}}})});l.prototype.callbacks.push(function(b){b.renderExporting();q(b,"redraw",b.renderExporting)})})(l)});
|
||||
//# sourceMappingURL=exporting.js.map
|
||||
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
Highcharts JS v6.1.0 (2018-04-13)
|
||||
Exporting module
|
||||
|
||||
(c) 2010-2017 Torstein Honsi
|
||||
|
||||
License: www.highcharts.com/license
|
||||
*/
|
||||
(function(h){"object"===typeof module&&module.exports?module.exports=h:h(Highcharts)})(function(h){(function(f){var h=f.defaultOptions,z=f.doc,A=f.Chart,w=f.addEvent,H=f.removeEvent,D=f.fireEvent,q=f.createElement,B=f.discardElement,u=f.css,p=f.merge,r=f.pick,k=f.each,E=f.objectEach,t=f.extend,I=f.isTouchDevice,C=f.win,F=C.navigator.userAgent,J=f.Renderer.prototype.symbols;/Edge\/|Trident\/|MSIE /.test(F);/firefox/i.test(F);t(h.lang,{/*printChart:"Print chart",*//*downloadPNG:"Download PNG image",*/downloadJPEG:"Download JPEG image",
|
||||
/*downloadPDF:"Download PDF document",*//*downloadSVG:"Download SVG vector image",*/contextButtonTitle:"download"});h.navigation={buttonOptions:{theme:{},symbolSize:14,symbolX:12.5,symbolY:10.5,align:"right",buttonSpacing:3,height:22,verticalAlign:"top",width:24}};p(!0,h.navigation,{menuStyle:{border:"1px solid #999999",background:"#ffffff",padding:"5px 0"},menuItemStyle:{padding:"0.5em 1em",background:"none",color:"#333333",fontSize:I?"14px":"11px",transition:"background 250ms, color 250ms"},menuItemHoverStyle:{background:"#335cad",
|
||||
color:"#ffffff"},buttonOptions:{symbolFill:"#666666",symbolStroke:"#666666",symbolStrokeWidth:3,theme:{fill:"#ffffff",stroke:"none",padding:5}}});h.exporting={type:"image/jpeg",url:"${pageContext.request.contextPath}/",printMaxWidth:780,scale:2,buttons:{contextButton:{className:"highcharts-contextbutton",menuClassName:"highcharts-contextmenu",symbol:"menu",_titleKey:"contextButtonTitle",menuItems:"downloadJPEG".split(" ")}},menuItemDefinitions:{/*printChart:{textKey:"printChart",
|
||||
onclick:function(){this.print()}},*//*separator:{separator:!0},*//*downloadPNG:{textKey:"downloadPNG",onclick:function(){this.exportChart()}},*/downloadJPEG:{textKey:"downloadJPEG",onclick:function(){this.exportChart({type:"image/jpeg"})}},/*downloadPDF:{textKey:"downloadPDF",onclick:function(){this.exportChart({type:"application/pdf"})}},*//*downloadSVG:{textKey:"downloadSVG",onclick:function(){this.exportChart({type:"image/svg+xml"})}}*/}};f.post=function(a,b,e){var c=q("form",p({method:"post",action:a,enctype:"multipart/form-data"},
|
||||
e),{display:"none"},z.body);E(b,function(a,b){q("input",{type:"hidden",name:b,value:a},null,c)});c.submit();B(c)};t(A.prototype,{sanitizeSVG:function(a,b){if(b&&b.exporting&&b.exporting.allowHTML){var e=a.match(/<\/svg>(.*?$)/);e&&e[1]&&(e='\x3cforeignObject x\x3d"0" y\x3d"0" width\x3d"'+b.chart.width+'" height\x3d"'+b.chart.height+'"\x3e\x3cbody xmlns\x3d"http://www.w3.org/1999/xhtml"\x3e'+e[1]+"\x3c/body\x3e\x3c/foreignObject\x3e",a=a.replace("\x3c/svg\x3e",e+"\x3c/svg\x3e"))}a=a.replace(/zIndex="[^"]+"/g,
|
||||
"").replace(/isShadow="[^"]+"/g,"").replace(/symbolName="[^"]+"/g,"").replace(/jQuery[0-9]+="[^"]+"/g,"").replace(/url\(("|")(\S+)("|")\)/g,"url($2)").replace(/url\([^#]+#/g,"url(#").replace(/<svg /,'\x3csvg xmlns:xlink\x3d"http://www.w3.org/1999/xlink" ').replace(/ (|NS[0-9]+\:)href=/g," xlink:href\x3d").replace(/\n/," ").replace(/<\/svg>.*?$/,"\x3c/svg\x3e").replace(/(fill|stroke)="rgba\(([ 0-9]+,[ 0-9]+,[ 0-9]+),([ 0-9\.]+)\)"/g,'$1\x3d"rgb($2)" $1-opacity\x3d"$3"').replace(/ /g,
|
||||
"\u00a0").replace(/­/g,"\u00ad");this.ieSanitizeSVG&&(a=this.ieSanitizeSVG(a));return a},getChartHTML:function(){return this.container.innerHTML},getSVG:function(a){var b,e,c,v,m,g=p(this.options,a);e=q("div",null,{position:"absolute",top:"-9999em",width:this.chartWidth+"px",height:this.chartHeight+"px"},z.body);c=this.renderTo.style.width;m=this.renderTo.style.height;c=g.exporting.sourceWidth||g.chart.width||/px$/.test(c)&&parseInt(c,10)||600;m=g.exporting.sourceHeight||g.chart.height||/px$/.test(m)&&
|
||||
parseInt(m,10)||400;t(g.chart,{animation:!1,renderTo:e,forExport:!0,renderer:"SVGRenderer",width:c,height:m});g.exporting.enabled=!1;delete g.data;g.series=[];k(this.series,function(a){v=p(a.userOptions,{animation:!1,enableMouseTracking:!1,showCheckbox:!1,visible:a.visible});v.isInternal||g.series.push(v)});k(this.axes,function(a){a.userOptions.internalKey||(a.userOptions.internalKey=f.uniqueKey())});b=new f.Chart(g,this.callback);a&&k(["xAxis","yAxis","series"],function(c){var d={};a[c]&&(d[c]=a[c],
|
||||
b.update(d))});k(this.axes,function(a){var c=f.find(b.axes,function(b){return b.options.internalKey===a.userOptions.internalKey}),d=a.getExtremes(),e=d.userMin,d=d.userMax;!c||void 0===e&&void 0===d||c.setExtremes(e,d,!0,!1)});c=b.getChartHTML();c=this.sanitizeSVG(c,g);g=null;b.destroy();B(e);return c},getSVGForExport:function(a,b){var e=this.options.exporting;return this.getSVG(p({chart:{borderRadius:0}},e.chartOptions,b,{exporting:{sourceWidth:a&&a.sourceWidth||e.sourceWidth,sourceHeight:a&&a.sourceHeight||
|
||||
e.sourceHeight}}))},exportChart:function(a,b){b=this.getSVGForExport(a,b);a=p(this.options.exporting,a);f.post(a.url,{filename:a.filename||"chart",type:a.type,width:a.width||0,scale:a.scale,svg:b},a.formAttributes)},print:function(){var a=this,b=a.container,e=[],c=b.parentNode,f=z.body,m=f.childNodes,g=a.options.exporting.printMaxWidth,d,n;if(!a.isPrinting){a.isPrinting=!0;a.pointer.reset(null,0);D(a,"beforePrint");if(n=g&&a.chartWidth>g)d=[a.options.chart.width,void 0,!1],a.setSize(g,void 0,!1);
|
||||
k(m,function(a,b){1===a.nodeType&&(e[b]=a.style.display,a.style.display="none")});f.appendChild(b);C.focus();C.print();setTimeout(function(){c.appendChild(b);k(m,function(a,b){1===a.nodeType&&(a.style.display=e[b])});a.isPrinting=!1;n&&a.setSize.apply(a,d);D(a,"afterPrint")},1E3)}},contextMenu:function(a,b,e,c,v,m,g){var d=this,n=d.options.navigation,h=d.chartWidth,G=d.chartHeight,p="cache-"+a,l=d[p],x=Math.max(v,m),y,r;l||(d[p]=l=q("div",{className:a},{position:"absolute",zIndex:1E3,padding:x+"px"},
|
||||
d.container),y=q("div",{className:"highcharts-menu"},null,l),u(y,t({MozBoxShadow:"3px 3px 10px #888",WebkitBoxShadow:"3px 3px 10px #888",boxShadow:"3px 3px 10px #888"},n.menuStyle)),r=function(){u(l,{display:"none"});g&&g.setState(0);d.openMenu=!1},d.exportEvents.push(w(l,"mouseleave",function(){l.hideTimer=setTimeout(r,500)}),w(l,"mouseenter",function(){f.clearTimeout(l.hideTimer)}),w(z,"mouseup",function(b){d.pointer.inClass(b.target,a)||r()})),k(b,function(a){"string"===typeof a&&(a=d.options.exporting.menuItemDefinitions[a]);
|
||||
if(f.isObject(a,!0)){var b;a.separator?b=q("hr",null,null,y):(b=q("div",{className:"highcharts-menu-item",onclick:function(b){b&&b.stopPropagation();r();a.onclick&&a.onclick.apply(d,arguments)},innerHTML:a.text||d.options.lang[a.textKey]},null,y),b.onmouseover=function(){u(this,n.menuItemHoverStyle)},b.onmouseout=function(){u(this,n.menuItemStyle)},u(b,t({cursor:"pointer"},n.menuItemStyle)));d.exportDivElements.push(b)}}),d.exportDivElements.push(y,l),d.exportMenuWidth=l.offsetWidth,d.exportMenuHeight=
|
||||
l.offsetHeight);b={display:"block"};e+d.exportMenuWidth>h?b.right=h-e-v-x+"px":b.left=e-x+"px";c+m+d.exportMenuHeight>G&&"top"!==g.alignOptions.verticalAlign?b.bottom=G-c-x+"px":b.top=c+m-x+"px";u(l,b);d.openMenu=!0},addButton:function(a){var b=this,e=b.renderer,c=p(b.options.navigation.buttonOptions,a),f=c.onclick,m=c.menuItems,g,d,n=c.symbolSize||12;b.btnCount||(b.btnCount=0);b.exportDivElements||(b.exportDivElements=[],b.exportSVGElements=[]);if(!1!==c.enabled){var h=c.theme,k=h.states,q=k&&k.hover,
|
||||
k=k&&k.select,l;delete h.states;f?l=function(a){a.stopPropagation();f.call(b,a)}:m&&(l=function(){b.contextMenu(d.menuClassName,m,d.translateX,d.translateY,d.width,d.height,d);d.setState(2)});c.text&&c.symbol?h.paddingLeft=r(h.paddingLeft,25):c.text||t(h,{width:c.width,height:c.height,padding:0});d=e.button(c.text,0,0,l,h,q,k).addClass(a.className).attr({"stroke-linecap":"round",title:r(b.options.lang[c._titleKey],""),zIndex:3});d.menuClassName=a.menuClassName||"highcharts-menu-"+b.btnCount++;c.symbol&&
|
||||
(g=e.symbol(c.symbol,c.symbolX-n/2,c.symbolY-n/2,n,n,{width:n,height:n}).addClass("highcharts-button-symbol").attr({zIndex:1}).add(d),g.attr({stroke:c.symbolStroke,fill:c.symbolFill,"stroke-width":c.symbolStrokeWidth||1}));d.add().align(t(c,{width:d.width,x:r(c.x,b.buttonOffset)}),!0,"spacingBox");b.buttonOffset+=(d.width+c.buttonSpacing)*("right"===c.align?-1:1);b.exportSVGElements.push(d,g)}},destroyExport:function(a){var b=a?a.target:this;a=b.exportSVGElements;var e=b.exportDivElements,c=b.exportEvents,
|
||||
h;a&&(k(a,function(a,c){a&&(a.onclick=a.ontouchstart=null,h="cache-"+a.menuClassName,b[h]&&delete b[h],b.exportSVGElements[c]=a.destroy())}),a.length=0);e&&(k(e,function(a,c){f.clearTimeout(a.hideTimer);H(a,"mouseleave");b.exportDivElements[c]=a.onmouseout=a.onmouseover=a.ontouchstart=a.onclick=null;B(a)}),e.length=0);c&&(k(c,function(a){a()}),c.length=0)}});J.menu=function(a,b,e,c){return["M",a,b+2.5,"L",a+e,b+2.5,"M",a,b+c/2+.5,"L",a+e,b+c/2+.5,"M",a,b+c-1.5,"L",a+e,b+c-1.5]};A.prototype.renderExporting=
|
||||
function(){var a=this,b=a.options.exporting,e=b.buttons,c=a.isDirtyExporting||!a.exportSVGElements;a.buttonOffset=0;a.isDirtyExporting&&a.destroyExport();c&&!1!==b.enabled&&(a.exportEvents=[],E(e,function(b){a.addButton(b)}),a.isDirtyExporting=!1);w(a,"destroy",a.destroyExport)};A.prototype.callbacks.push(function(a){a.renderExporting();w(a,"redraw",a.renderExporting);k(["exporting","navigation"],function(b){a[b]={update:function(e,c){a.isDirtyExporting=!0;p(!0,a.options[b],e);r(c,!0)&&a.redraw()}}})})})(h)});
|
||||
@@ -236,13 +236,18 @@
|
||||
}
|
||||
var $cols = $(val).find('th, td');
|
||||
return $cols.map(function (i, val) {
|
||||
// 当文字过长有省略时取title导出
|
||||
var titleText=$(val).text();
|
||||
if($(val).attr("title")!=null&&$(val).attr("title")!=""){
|
||||
titleText=$(val).attr("title");
|
||||
}
|
||||
if (!!~ignoreCols.indexOf(i) || $(val).is(ignoreCSS)) {
|
||||
return;
|
||||
}
|
||||
if ($(val).is(emptyCSS)) {
|
||||
return " "
|
||||
}
|
||||
return '"' + TableExport.prototype.formatValue(isTrimWhitespace, $(val).text().replace(/"/g, '""')) + '"';
|
||||
return '"' + TableExport.prototype.formatValue(isTrimWhitespace, titleText.replace(/"/g, '""')) + '"';
|
||||
}).get().join(colD);
|
||||
}).get().join(rdel),
|
||||
dataObject = TableExport.prototype.escapeHtml(
|
||||
|
||||
@@ -1,6 +1,17 @@
|
||||
//蓝色系 colors:['#0026af', '#0032bc', '#004bbc', '#015bb1', '#2f74b5', '#4186c1', '#5597cd', '#67a7de', '#77b5dc', '#98cde7', '#b9e7f4', '#d9ffff'],
|
||||
//彩色系colors:[ '#fe392e','#fe7d2e','#febb1d', '#feff1d','#51d569','#51d5d5','#0032bc','#1d7cf9' ,'#77b5dc','#b9e7f4'],
|
||||
|
||||
Highcharts.setOptions({ // Apply to all charts
|
||||
chart: {
|
||||
events: {
|
||||
beforePrint: function () {
|
||||
$(".highcharts-background").attr("fill","rgba(48,48,48,1)")
|
||||
},
|
||||
afterPrint: function () {
|
||||
$(".highcharts-background").attr("fill","rgba(255, 255, 255, 0)")
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
//协议统计分析
|
||||
function echart_1(rs) {
|
||||
var data=new Array();
|
||||
|
||||
Reference in New Issue
Block a user