流量统计详情app,协议,活跃IP增加地域查询条件,域名详情趋势图改为client
IP,app详情改为link,packet,byte三中方式排序
This commit is contained in:
@@ -168,12 +168,15 @@ public class DashboardController extends BaseController{
|
||||
*/
|
||||
@RequestMapping(value="ipActiveMinuteList")
|
||||
@ResponseBody
|
||||
public List ipActiveMinuteList(String beginDate,String endDate){
|
||||
public List ipActiveMinuteList(String beginDate,String endDate,Integer entranceId){
|
||||
Map<String, Object> fromJsonList = new HashMap<String, Object>();
|
||||
List list = new ArrayList();
|
||||
try {
|
||||
String url=Constants.DASHBOARD_URL+Constants.TRAFFIC_IPACTIVE_FIVEMINUTE;
|
||||
url=urlAddDate(url, beginDate, endDate);
|
||||
if(entranceId!=null){
|
||||
url=url+"&entranceId="+entranceId;
|
||||
}
|
||||
String string = HttpClientUtil.get(url);
|
||||
Gson gson = new GsonBuilder().create();
|
||||
fromJsonList = gson.fromJson(string, new TypeToken<Map>(){}.getType());
|
||||
@@ -243,12 +246,15 @@ public class DashboardController extends BaseController{
|
||||
*/
|
||||
@RequestMapping(value="ajaxIpActiveList")
|
||||
@ResponseBody
|
||||
public List ajaxIpActiveList(String beginDate,String endDate){
|
||||
public List ajaxIpActiveList(String beginDate,String endDate,Integer entranceId){
|
||||
Map<String, Object> fromJsonList = new HashMap<String, Object>();
|
||||
List list = new ArrayList();
|
||||
try {
|
||||
String url=Constants.DASHBOARD_URL+Constants.TRAFFIC_IPACTIVE_ONEHOUR;
|
||||
url=urlAddDate(url, beginDate, endDate);
|
||||
if(entranceId!=null){
|
||||
url=url+"&entranceId="+entranceId;
|
||||
}
|
||||
String string = HttpClientUtil.get(url);
|
||||
Gson gson = getIntGson();
|
||||
fromJsonList = gson.fromJson(string, new TypeToken<Map<String, Object>>(){}.getType());
|
||||
|
||||
@@ -49,7 +49,7 @@ import com.nis.util.StringUtil;
|
||||
import com.nis.util.httpclient.HttpClientUtil;
|
||||
import com.nis.web.controller.BaseController;
|
||||
import com.nis.web.dao.dashboard.codedic.CodeResult;
|
||||
|
||||
@SuppressWarnings("all")
|
||||
@Controller
|
||||
@RequestMapping("${adminPath}/dashboard/traffic")
|
||||
public class TrafficStatisticsInfoController extends BaseController {
|
||||
@@ -300,7 +300,7 @@ public class TrafficStatisticsInfoController extends BaseController {
|
||||
*/
|
||||
@RequestMapping(value="protocolList")
|
||||
@ResponseBody
|
||||
public List protocolList(Model model,Integer[] protoType,@RequestParam(required=false)String beginDate,@RequestParam(required=false)String endDate){
|
||||
public List protocolList(Model model,Integer entranceId,Integer[] protoType,@RequestParam(required=false)String beginDate,@RequestParam(required=false)String endDate){
|
||||
Map<String, Object> fromJsonList = new HashMap<String, Object>();
|
||||
List list = new ArrayList();
|
||||
String url = Constants.DASHBOARD_URL+Constants.TRAFFIC_PROTOCOL_LIST;
|
||||
@@ -313,6 +313,9 @@ public class TrafficStatisticsInfoController extends BaseController {
|
||||
}
|
||||
}
|
||||
}
|
||||
if(entranceId!=null){
|
||||
url=url+"&entranceId="+entranceId;
|
||||
}
|
||||
String string = HttpClientUtil.get(url);
|
||||
Gson gson = new GsonBuilder().create();
|
||||
fromJsonList = gson.fromJson(string, new TypeToken<Map>(){}.getType());
|
||||
@@ -378,7 +381,7 @@ public class TrafficStatisticsInfoController extends BaseController {
|
||||
*/
|
||||
@RequestMapping(value="appList")
|
||||
@ResponseBody
|
||||
public List appList(@RequestParam(value="appType",required=false)Integer[] appType,@RequestParam(value="beginDate",required=false)String beginDate,@RequestParam(value="endDate",required=false)String endDate){
|
||||
public List appList(Integer entranceId,@RequestParam(value="appType",required=false)Integer[] appType,@RequestParam(value="beginDate",required=false)String beginDate,@RequestParam(value="endDate",required=false)String endDate){
|
||||
Map<String, Object> fromJsonList = new HashMap<String, Object>();
|
||||
List list = new ArrayList();
|
||||
String url = Constants.DASHBOARD_URL+Constants.TRAFFIC_APP_LIST;
|
||||
@@ -391,6 +394,9 @@ public class TrafficStatisticsInfoController extends BaseController {
|
||||
}
|
||||
}
|
||||
}
|
||||
if(entranceId!=null){
|
||||
url=url+"&entranceId="+entranceId;
|
||||
}
|
||||
String string = HttpClientUtil.get(url);
|
||||
Gson gson = new GsonBuilder().create();
|
||||
fromJsonList = gson.fromJson(string, new TypeToken<Map>(){}.getType());
|
||||
@@ -477,7 +483,7 @@ public class TrafficStatisticsInfoController extends BaseController {
|
||||
}
|
||||
@RequestMapping("ajaxAppTopList")
|
||||
@ResponseBody
|
||||
public List ajaxAppTopList(String beginDate,String endDate,Integer appType,Integer entranceId,Model model){
|
||||
public List ajaxAppTopList(String beginDate,String endDate,Integer appType,Integer entranceId,Integer searchQuota,Model model){
|
||||
Map<String, Object> fromJsonList = new HashMap<String, Object>();
|
||||
List list = new ArrayList();
|
||||
try {
|
||||
@@ -492,6 +498,11 @@ public class TrafficStatisticsInfoController extends BaseController {
|
||||
if(entranceId!=null){
|
||||
url=url+"&searchEntranceId="+entranceId;
|
||||
}
|
||||
if(searchQuota!=null){
|
||||
url=url+"&searchQuota="+searchQuota;
|
||||
}else{
|
||||
url=url+"&searchQuota="+1; // 默认是按照link 排序
|
||||
}
|
||||
String string = HttpClientUtil.get(url);
|
||||
Gson gson = new GsonBuilder().create();
|
||||
fromJsonList = gson.fromJson(string, new TypeToken<Map<String, Object>>(){}.getType());
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
</form:form>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div id="chart" style="width: 97%; height: 530px; margin-top: 20px"></div>
|
||||
<div id="chart" style="width: 97%; height: 450px; margin-top: 20px"></div>
|
||||
<input id="total" type="hidden" />
|
||||
<input id="sipData" type="hidden" />
|
||||
<input id="dipData" type="hidden" />
|
||||
@@ -91,8 +91,12 @@
|
||||
<input id="beginDateh" type="hidden" value="${beginDate}" />
|
||||
<input id="endDateh" type="hidden" value="${endDate}" />
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="btn-group pull-right">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="searchQuota active" value="1" onclick="changeOrderby(1)"><a href="javascript:void(0);"><spring:message code="link_num"/></a></li>
|
||||
<li class="searchQuota" value="2" onclick="changeOrderby(2)"><a href="javascript:void(0);"><spring:message code="packet"/></a></li>
|
||||
<li class="searchQuota" value="3" onclick="changeOrderby(3)"><a href="javascript:void(0);"><spring:message code="byte"/></a></li>
|
||||
</ul>
|
||||
<div class="btn-group pull-right" style="padding-top: 5px">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"><i class="fa fa-wrench"></i> <spring:message code="export"/>
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
@@ -104,20 +108,20 @@
|
||||
<button type="button" class="btn btn-default css-print" onClick="doPrint()"><i class="fa glyphicon glyphicon-print" style="top:3px;margin-right: 3px;"></i><spring:message code="print"/></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<br>
|
||||
<div class="row" style="padding-top: 5px">
|
||||
<div class="table-responsive">
|
||||
<table id="contentTable" style="width: 100%;"
|
||||
class="table table-striped table-bordered table-condensed text-nowrap">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><spring:message code="ip"/></th>
|
||||
<th><spring:message code="client_ip"/></th>
|
||||
<th><spring:message code="link_num"/></th>
|
||||
<th><spring:message code="percentage"/> (<spring:message code="link_num"/>)</th>
|
||||
<th><spring:message code="packets"/></th>
|
||||
<th><spring:message code="percentage"/> (<spring:message code="packets"/>)</th>
|
||||
<th><spring:message code="GByte"/></th>
|
||||
<th><spring:message code="percentage"/> (<spring:message code="GByte"/>)</th>
|
||||
<th><spring:message code="bytes"/></th>
|
||||
<th><spring:message code="percentage"/> (<spring:message code="bytes"/>)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="tableData"></tbody>
|
||||
@@ -144,8 +148,9 @@
|
||||
$("#endDate").val(endh);
|
||||
var appType=$("#appType").val();
|
||||
var entranceId=$("#entranceId").val();
|
||||
var searchQuota=$(".searchQuota[class~='active']").val();
|
||||
appTransAjax(starth,endh,appType,entranceId);
|
||||
appTop100List(starth,endh,appType,entranceId);
|
||||
appTop100List(starth,endh,appType,entranceId,searchQuota);
|
||||
//筛选功能初始化
|
||||
$("#resetBtn").on("click",function() {
|
||||
$("select.selectpicker").each(function() {
|
||||
@@ -156,8 +161,16 @@
|
||||
$(".Wdate").attr("value", '');
|
||||
$("#searchForm")[0].reset();
|
||||
});
|
||||
$(".searchQuota").on("click",function(){
|
||||
$(".searchQuota").removeClass("active");
|
||||
$(this).addClass("active");
|
||||
})
|
||||
$('.pageView').hide();
|
||||
});
|
||||
// 改变排序字段
|
||||
function changeOrderby(searchQuota) {
|
||||
appTop100List($("#beginDate").val(),$("#endDate").val(),$("#appType").val(),$("#entranceId").val(),searchQuota);
|
||||
}
|
||||
function searchList() {
|
||||
var start = $("#beginDate").val();
|
||||
var end = $("#endDate").val();
|
||||
@@ -168,12 +181,13 @@
|
||||
} else {
|
||||
var appType=$("#appType").val();
|
||||
var entranceId=$("#entranceId").val();
|
||||
var searchQuota=$(".searchQuota[class~='active']").val();
|
||||
appTransAjax(start,end,appType,entranceId);// 折线
|
||||
appTop100List(start,end,appType,entranceId);// 列表
|
||||
appTop100List(start,end,appType,entranceId,searchQuota);// 列表
|
||||
}
|
||||
}
|
||||
// 列表
|
||||
function appTop100List(start,end,appType,entranceId){
|
||||
function appTop100List(start,end,appType,entranceId,searchQuota){
|
||||
$.ajax({
|
||||
url : "${ctx}/dashboard/traffic/ajaxAppTopList",
|
||||
type : 'get',
|
||||
@@ -182,7 +196,8 @@
|
||||
"beginDate" : start,
|
||||
"endDate" : end,
|
||||
"appType" : appType,
|
||||
"entranceId" : entranceId
|
||||
"entranceId" : entranceId,
|
||||
"searchQuota":searchQuota
|
||||
},
|
||||
async : true,
|
||||
timeout : 50000,
|
||||
@@ -233,37 +248,25 @@
|
||||
})
|
||||
$.each(fileDataS, function(index, data) {
|
||||
if (data != null) {
|
||||
var uniqueper=0;
|
||||
var packper=0;
|
||||
var gbytper=0;
|
||||
if(totalunique!=null&&totalunique!=0 ){
|
||||
uniqueper=((data.logNum/totalunique)*100).toFixed(2);
|
||||
}
|
||||
if(totalpkt!=null&&totalpkt!=0 ){
|
||||
packper=((data.pktNum/totalpkt)*100).toFixed(2);
|
||||
}
|
||||
if(totalbyte!=null&&totalbyte!=0 ){
|
||||
gbytper=((data.byteNum/(totalbyte))*100).toFixed(2);
|
||||
}
|
||||
var html ="<tr>";
|
||||
html += "<td class='tc'>" + data.ipAddr + "</td>";
|
||||
html += "<td class='tc'>" + data.logNum + "</td>";
|
||||
html += "<td class='tc'>" + uniqueper + " %</td>";
|
||||
html += "<td class='tc'>" + data.logPercent + " %</td>";
|
||||
// html += "<td class='tc'>" + (((data.entranceId)==1) ? "Astana":"Alamty") + "</td>";
|
||||
html += "<td class='tc'>" + Math.round(data.pktNum*100)/100 + "</td>";
|
||||
html += "<td class='tc'>" + packper + " %</td>";
|
||||
html += "<td class='tc'>" + data.pktPercent + " %</td>";
|
||||
html += "<td class='tc'>" + Math.round(data.byteNum*100)/100 + "</td>";
|
||||
html += "<td class='tc'>" + gbytper + " %</td>";
|
||||
html += "<td class='tc'>" + data.bytePercent + " %</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'>" +"100%"+"</td>";
|
||||
html+= "<td class='tc'>" +"--"+"</td>";
|
||||
html+= "<td class='tc'>"+totalpkt+"</td>";
|
||||
html+= "<td class='tc'>"+"100%"+"</td>";
|
||||
html+= "<td class='tc'>"+"--"+"</td>";
|
||||
html+= "<td class='tc'>"+totalbyte+"</td>";
|
||||
html+= "<td class='tc'>"+"100%"+"</td>";
|
||||
html+= "<td class='tc'>"+"--"+"</td>";
|
||||
html+="</tr>"
|
||||
}
|
||||
}
|
||||
@@ -459,6 +462,7 @@
|
||||
var points = chart.series[0].points;
|
||||
chart.tooltip.refresh(points[points.length -1]);
|
||||
}
|
||||
var timer=null;
|
||||
// 局点信息
|
||||
function showActionTransChart(sipResult,dipResult) {
|
||||
var nowDate=new Date();
|
||||
@@ -526,7 +530,8 @@
|
||||
title : {
|
||||
text : null
|
||||
},
|
||||
min:0
|
||||
min:0,
|
||||
allowDecimals:false
|
||||
},
|
||||
tooltip: {
|
||||
dateTimeLabelFormats: {
|
||||
@@ -540,7 +545,7 @@
|
||||
year: '%Y-%m-%d %H:%M:%S'
|
||||
}
|
||||
},
|
||||
credits : {//是否有highcharts水印
|
||||
credits : {//是否有水印
|
||||
enabled : false
|
||||
},
|
||||
plotOptions : {
|
||||
@@ -555,13 +560,8 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
// legend: {
|
||||
// layout: 'vertical',
|
||||
// align: 'right',
|
||||
// verticalAlign: 'middle'
|
||||
// },
|
||||
series: [{
|
||||
name: 'Client IP',
|
||||
name: '<spring:message code="client_ip"/>',
|
||||
data: (function () {
|
||||
var data = [];
|
||||
if(sipResult!=null&&sipResult.length>0){
|
||||
@@ -584,7 +584,7 @@
|
||||
}())
|
||||
},
|
||||
{
|
||||
name: 'Server IP',
|
||||
name: '<spring:message code="server_ip"/>',
|
||||
data: (function () {
|
||||
var data = [];
|
||||
if(dipResult!=null&&dipResult.length>0){
|
||||
@@ -607,43 +607,28 @@
|
||||
}())
|
||||
}]
|
||||
});
|
||||
var timer=null;
|
||||
var series=[];
|
||||
var series1=[];
|
||||
series = chart.series[0];
|
||||
series1 = chart.series[1];
|
||||
|
||||
var series = chart.series[0];
|
||||
var series1 = chart.series[1];
|
||||
window.clearInterval(timer);
|
||||
if(sipResult!=null&&sipResult.length>0){
|
||||
}else{
|
||||
num=0;
|
||||
window.clearInterval(timer);
|
||||
}
|
||||
var temp =num;
|
||||
timer=setInterval(function() {
|
||||
var d =sipResult[num];
|
||||
if(typeof d!='undefined'&&d!=null){
|
||||
series.addPoint([d[0], d[1]], true, true);
|
||||
}else{
|
||||
num=0;
|
||||
window.clearInterval(timer);
|
||||
return
|
||||
}
|
||||
|
||||
var t =dipResult[num];
|
||||
if(typeof t!='undefined'&&t!=null){
|
||||
series1.addPoint([t[0], t[1]], true, true);
|
||||
}else{
|
||||
num=0;
|
||||
clearInterval(timer);
|
||||
return
|
||||
}
|
||||
num=num+1
|
||||
num=num+1;
|
||||
if(num==sipResult.length){
|
||||
num=0;
|
||||
clearInterval(timer);
|
||||
window.clearInterval(timer);
|
||||
return
|
||||
}
|
||||
},3000);
|
||||
}else{
|
||||
num=0;
|
||||
window.clearInterval(timer);
|
||||
}
|
||||
}
|
||||
(function(H) {
|
||||
H.Chart.prototype.downloadXLS = function() {
|
||||
|
||||
@@ -69,8 +69,20 @@
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
<div class="input-group">
|
||||
<div class="input-group-btn">
|
||||
<span class="selectpicker form-control" ><spring:message code="area_id"/></span>
|
||||
</div>
|
||||
<select id="entranceId" name="entranceId" class="selectpicker form-control" width="100px" data-live-search="true" data-live-search-placeholder="search">
|
||||
<option value=""><spring:message code="select"/></option>
|
||||
<c:forEach items="${fns:getDictList('ENTRANCE')}" var="dict" >
|
||||
<option value="${dict.itemCode}"><spring:message code="${dict.itemValue}"></spring:message></option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
<button type="button" class="btn blue" onClick="return searchList()"> <i class="fa fa-search"></i> <spring:message code="search"/> </button>
|
||||
<button type="button" class="btn btn-default" id="resetBtn" > <i class="fa fa-refresh"></i> <spring:message code="reset"/> </button>
|
||||
@@ -130,7 +142,8 @@ $(document).ready(function(){
|
||||
var endh=$("#endDateh").val();
|
||||
$("#beginDate").val(starth);
|
||||
$("#endDate").val(endh);
|
||||
ajaxAppList(starth,endh);
|
||||
var entranceId=$("#entranceId").val();
|
||||
ajaxAppList(starth,endh,entranceId);
|
||||
//筛选功能初始化
|
||||
$("#resetBtn").on("click",function(){
|
||||
$("select.selectpicker").each(function(){
|
||||
@@ -152,20 +165,21 @@ function searchList(){
|
||||
var end=$("#endDate").val();
|
||||
$("#beginDateh").val(start);
|
||||
$("#endDateh").val(end);
|
||||
var entranceId = $("#entranceId").val();
|
||||
if(start==''||end==''||end==null||start==null){
|
||||
window.location.reload();
|
||||
}else{
|
||||
ajaxAppList(start,end);
|
||||
ajaxAppList(start,end,entranceId);
|
||||
}
|
||||
}
|
||||
function ajaxAppList(start,end){
|
||||
function ajaxAppList(start,end,entranceId){
|
||||
var appType=$("#appType").val();
|
||||
loading();
|
||||
$.ajax({
|
||||
url: '${ctx}/dashboard/traffic/appList',
|
||||
type: 'get',
|
||||
dataType: "json",
|
||||
data:{"beginDate":start,"endDate":end,"appType":appType},
|
||||
data:{"beginDate":start,"endDate":end,"appType":appType,"entranceId":entranceId},
|
||||
async:true,
|
||||
timeout:50000,
|
||||
traditional:true,
|
||||
@@ -484,7 +498,7 @@ function protocolTypeChart(rs){
|
||||
},
|
||||
}
|
||||
},
|
||||
credits:{//是否有highcharts水印
|
||||
credits:{//是否有水印
|
||||
enabled:false
|
||||
},
|
||||
tooltip: {
|
||||
|
||||
@@ -72,7 +72,7 @@ $(document).ready(function(){
|
||||
})*/
|
||||
total=rs[0].sum;
|
||||
series.push({
|
||||
name: 'unique',
|
||||
name: '<spring:message code="client_ip"/>',
|
||||
data: rs[0].result,
|
||||
marker: {
|
||||
enabled: false
|
||||
@@ -80,7 +80,7 @@ $(document).ready(function(){
|
||||
});
|
||||
}else{
|
||||
series.push({
|
||||
name: 'unique',
|
||||
name: '<spring:message code="client_ip"/>',
|
||||
data: []
|
||||
});
|
||||
}
|
||||
|
||||
@@ -42,7 +42,19 @@
|
||||
value="" onclick="WdatePicker({onpicked:function(){this.onchange()},dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,maxDate:'#F{\'new Date()\'}'});" onchange="setEndTime('#beginDate','#endDate',7,'d','yyyy-MM-dd hh:mm:ss',false)"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="pull-left">
|
||||
<div class="input-group">
|
||||
<div class="input-group-btn">
|
||||
<span class="selectpicker form-control" ><spring:message code="area_id"/></span>
|
||||
</div>
|
||||
<select id="entranceId" name="entranceId" class="selectpicker form-control" width="100px" data-live-search="true" data-live-search-placeholder="search">
|
||||
<option value=""><spring:message code="select"/></option>
|
||||
<c:forEach items="${fns:getDictList('ENTRANCE')}" var="dict" >
|
||||
<option value="${dict.itemCode}" <c:if test="${dict.itemCode==1}">selected</c:if>><spring:message code="${dict.itemValue}"></spring:message></option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
<button type="button" class="btn blue" onClick="return searchList()"> <i class="fa fa-search"></i> <spring:message code="search"/> </button>
|
||||
<button type="button" class="btn btn-default" id="resetBtn" > <i class="fa fa-refresh"></i> <spring:message code="reset"/> </button>
|
||||
@@ -61,7 +73,6 @@
|
||||
<sys:message content="${message}" type="${messageType }"/>
|
||||
<h3 class="page-title">
|
||||
<spring:message code="traffic_ipactive_hour_max"></spring:message>
|
||||
</h3>
|
||||
<div class="btn-group pull-right">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"><i class="fa fa-wrench"></i> <spring:message code="export"/>
|
||||
<span class="caret"></span>
|
||||
@@ -74,8 +85,7 @@
|
||||
<button type="button" class="btn btn-default css-print" onClick="doPrint()"><i class="fa glyphicon glyphicon-print" style="top:3px;margin-right: 3px;"></i><spring:message code="print"/></button>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<br>
|
||||
</h3>
|
||||
<div class="" align="center">
|
||||
<table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap">
|
||||
<thead>
|
||||
@@ -124,8 +134,9 @@ $(document).ready(function(){
|
||||
var endh=$("#endDateh").val();
|
||||
$("#beginDate").val(starth);
|
||||
$("#endDate").val(endh);
|
||||
ipActiveMinuteList(starth,endh);
|
||||
ipActiveOneHourList(starth,endh);
|
||||
var entranceId=$("#entranceId").val();
|
||||
ipActiveMinuteList(starth,endh,entranceId);
|
||||
ipActiveOneHourList(starth,endh,entranceId);
|
||||
//筛选功能初始化
|
||||
$("#resetBtn").on("click",function(){
|
||||
$("select.selectpicker").each(function(){
|
||||
@@ -186,7 +197,7 @@ $(".export-btn").click(function(){
|
||||
if(!data[i]){
|
||||
data[i] = new Array();
|
||||
}
|
||||
data[i][j] = mytable.rows[i].cells[j].innerHTML;
|
||||
data[i][j] = mytable.rows[i].cells[j].innerText;
|
||||
}
|
||||
}
|
||||
var title= data.shift();
|
||||
@@ -204,12 +215,13 @@ function searchList(){
|
||||
var end=$("#endDate").val();
|
||||
$("#beginDateh").val(start);
|
||||
$("#endDateh").val(end);
|
||||
var entranceId=$("#entranceId").val();
|
||||
loading();
|
||||
if(start==''||end==''||end==null||start==null){
|
||||
window.location.reload();
|
||||
}else{
|
||||
ipActiveMinuteList(start,end);
|
||||
ipActiveOneHourList(start,end);
|
||||
ipActiveMinuteList(start,end,entranceId);
|
||||
ipActiveOneHourList(start,end,entranceId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -295,10 +307,10 @@ function showIpActiveChart(xData,series){
|
||||
},
|
||||
yAxis: {
|
||||
title: {
|
||||
text: 'Link Numbers'
|
||||
text: 'Link Times'
|
||||
}
|
||||
},
|
||||
credits:{//是否有highcharts水印
|
||||
credits:{//是否有水印
|
||||
enabled:false
|
||||
},
|
||||
legend: {
|
||||
@@ -310,13 +322,13 @@ function showIpActiveChart(xData,series){
|
||||
});
|
||||
}
|
||||
//活跃IP一小时间隔五分钟统计
|
||||
function ipActiveMinuteList(beginDate,endDate){
|
||||
function ipActiveMinuteList(beginDate,endDate,entranceId){
|
||||
loading();
|
||||
$.ajax({
|
||||
url: '${ctx}/dashboard/ipActiveMinuteList',
|
||||
type : "get",
|
||||
dataType:"json",
|
||||
data:{"beginDate":beginDate,"endDate":endDate},
|
||||
data:{"beginDate":beginDate,"endDate":endDate,"entranceId":entranceId},
|
||||
async:true,
|
||||
timeout:50000,
|
||||
success:function (rs) {
|
||||
@@ -355,14 +367,14 @@ function showIpActiveChart(xData,series){
|
||||
});
|
||||
}
|
||||
//活跃IP一小时统计
|
||||
function ipActiveOneHourList(beginDate,endDate){
|
||||
$("#tbodyData").html("");
|
||||
function ipActiveOneHourList(beginDate,endDate,entranceId){
|
||||
$("#tbodyData").html("");
|
||||
loading();
|
||||
$.ajax({
|
||||
url: '${ctx}/dashboard/ajaxIpActiveList',
|
||||
type : "get" ,
|
||||
dataType:"json",
|
||||
data:{"beginDate":beginDate,"endDate":endDate},
|
||||
data:{"beginDate":beginDate,"endDate":endDate,"entranceId":entranceId},
|
||||
async:true,
|
||||
timeout:50000,
|
||||
success:function (data) {
|
||||
|
||||
@@ -58,7 +58,19 @@
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="pull-left">
|
||||
<div class="input-group">
|
||||
<div class="input-group-btn">
|
||||
<span class="selectpicker form-control" ><spring:message code="area_id"/></span>
|
||||
</div>
|
||||
<select id="entranceId" name="entranceId" class="selectpicker form-control" width="100px" data-live-search="true" data-live-search-placeholder="search">
|
||||
<option value=""><spring:message code="select"/></option>
|
||||
<c:forEach items="${fns:getDictList('ENTRANCE')}" var="dict" >
|
||||
<option value="${dict.itemCode}"><spring:message code="${dict.itemValue}"></spring:message></option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
<button type="button" class="btn blue" onClick="return searchList()"> <i class="fa fa-search"></i> <spring:message code="search"/> </button>
|
||||
<button type="button" class="btn btn-default" id="resetBtn" > <i class="fa fa-refresh"></i> <spring:message code="reset"/> </button>
|
||||
@@ -117,7 +129,8 @@ $(document).ready(function(){
|
||||
var endh=$("#endDateh").val();
|
||||
$("#beginDate").val(starth);
|
||||
$("#endDate").val(endh);
|
||||
ajaxProtocolList(starth,endh);
|
||||
var entranceId=$("#entranceId").val();
|
||||
ajaxProtocolList(starth,endh,entranceId);
|
||||
//筛选功能初始化
|
||||
$("#resetBtn").on("click",function(){
|
||||
$("select.selectpicker").each(function(){
|
||||
@@ -138,22 +151,23 @@ function searchList(){
|
||||
loading();
|
||||
var start=$("#beginDate").val();
|
||||
var end=$("#endDate").val();
|
||||
var entranceId=$("#entranceId").val();
|
||||
$("#beginDateh").val(start);
|
||||
$("#endDateh").val(end);
|
||||
if(start==''||end==''||end==null||start==null){
|
||||
window.location.reload();
|
||||
}else{
|
||||
ajaxProtocolList(start,end);
|
||||
ajaxProtocolList(start,end,entranceId);
|
||||
}
|
||||
}
|
||||
function ajaxProtocolList(start,end){
|
||||
function ajaxProtocolList(start,end,entranceId){
|
||||
var protoType=$("#protoType").val();
|
||||
loading();
|
||||
$.ajax({
|
||||
url: '${ctx}/dashboard/traffic/protocolList',
|
||||
type: 'get',
|
||||
dataType: "json",
|
||||
data:{"beginDate":start,"endDate":end,"protoType":protoType},
|
||||
data:{"beginDate":start,"endDate":end,"protoType":protoType,"entranceId":entranceId},
|
||||
async:true,
|
||||
timeout:50000,
|
||||
traditional:true,
|
||||
@@ -469,7 +483,7 @@ function protocolTypeChart(rs){
|
||||
},
|
||||
}
|
||||
},
|
||||
credits:{//是否有highcharts水印
|
||||
credits:{//是否有水印
|
||||
enabled:false
|
||||
},
|
||||
tooltip: {
|
||||
|
||||
@@ -14,6 +14,9 @@
|
||||
</head>
|
||||
<style type="text/css">
|
||||
@page { size: landscape; }
|
||||
.input-medium {
|
||||
width: 170px !important;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
|
||||
@@ -77,7 +80,7 @@
|
||||
<div class="pull-left">
|
||||
<div class="input-group">
|
||||
<div class="input-group-btn">
|
||||
<span class="selectpicker form-control" ><spring:message code="entrance_id"/></span>
|
||||
<span class="selectpicker form-control" ><spring:message code="area_id"/></span>
|
||||
</div>
|
||||
<select id="entranceId" name="entranceId" class="selectpicker form-control" width="100px" data-live-search="true" data-live-search-placeholder="search">
|
||||
<option value=""><spring:message code="select"/></option>
|
||||
@@ -140,7 +143,7 @@
|
||||
<th><spring:message code="trend"/></th>
|
||||
<th><spring:message code="domain_name"/></th>
|
||||
<th><spring:message code="unique_num"/></th>
|
||||
<th><spring:message code="entrance_id"/></th>
|
||||
<th><spring:message code="area_id"/></th>
|
||||
<th><spring:message code="packets"/></th>
|
||||
<th><spring:message code="percentage"/> (<spring:message code="packets"/>)</th>
|
||||
<th><spring:message code="GByte"/></th>
|
||||
@@ -217,7 +220,7 @@
|
||||
"entranceId" : entranceId
|
||||
},
|
||||
async : true,
|
||||
timeout : 40000,
|
||||
timeout : 50000,
|
||||
traditional:true,
|
||||
success : function(data) {
|
||||
if (data != null && data.length > 0 && data[0].error != null) {
|
||||
|
||||
Reference in New Issue
Block a user