|
|
|
|
@@ -43,7 +43,7 @@
|
|
|
|
|
<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">
|
|
|
|
|
<select id="entranceId1" 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>
|
|
|
|
|
@@ -51,16 +51,29 @@
|
|
|
|
|
</select>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="pull-left">
|
|
|
|
|
<div class="input-group">
|
|
|
|
|
<div class="input-group-btn">
|
|
|
|
|
<span class="selectpicker form-control" ><spring:message code="isp"/></span>
|
|
|
|
|
</div>
|
|
|
|
|
<select id="isp1" name="isp" class="selectpicker form-control input-medium" data-max-options="10" data-selected-text-format="count > 3" multiple data-live-search="true" data-live-search-placeholder="search">
|
|
|
|
|
<%-- <option value=""><spring:message code="select"/></option> --%>
|
|
|
|
|
<c:forEach items="${fns:getIspDicList('ispCode')}" var="dict" >
|
|
|
|
|
<option value="${dict.ispKeyCode}"><spring:message code="${dict.ispKeyName}"></spring:message></option>
|
|
|
|
|
</c:forEach>
|
|
|
|
|
</select>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="pull-left">
|
|
|
|
|
<button type="button" class="btn blue"
|
|
|
|
|
onClick="return searchList1()">
|
|
|
|
|
<i class="fa fa-search"></i>
|
|
|
|
|
<spring:message code="search" />
|
|
|
|
|
</button>
|
|
|
|
|
<%-- <button type="button" class="btn btn-default" id="resetBtn">
|
|
|
|
|
<button type="button" class="btn btn-default" id="resetBtn1">
|
|
|
|
|
<i class="fa fa-refresh"></i>
|
|
|
|
|
<spring:message code="reset" />
|
|
|
|
|
</button> --%>
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 搜索内容与操作按钮栏 -->
|
|
|
|
|
@@ -95,7 +108,7 @@
|
|
|
|
|
<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">
|
|
|
|
|
<select id="entranceId2" 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>
|
|
|
|
|
@@ -103,16 +116,29 @@
|
|
|
|
|
</select>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="pull-left">
|
|
|
|
|
<div class="input-group">
|
|
|
|
|
<div class="input-group-btn">
|
|
|
|
|
<span class="selectpicker form-control" ><spring:message code="isp"/></span>
|
|
|
|
|
</div>
|
|
|
|
|
<select id="isp2" name="isp" class="selectpicker form-control input-medium" data-max-options="10" data-selected-text-format="count > 3" multiple data-live-search="true" data-live-search-placeholder="search">
|
|
|
|
|
<%-- <option value=""><spring:message code="select"/></option> --%>
|
|
|
|
|
<c:forEach items="${fns:getIspDicList('ispCode')}" var="dict" >
|
|
|
|
|
<option value="${dict.ispKeyCode}"><spring:message code="${dict.ispKeyName}"></spring:message></option>
|
|
|
|
|
</c:forEach>
|
|
|
|
|
</select>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="pull-left">
|
|
|
|
|
<button type="button" class="btn blue"
|
|
|
|
|
onClick="return searchList2()">
|
|
|
|
|
<i class="fa fa-search"></i>
|
|
|
|
|
<spring:message code="search" />
|
|
|
|
|
</button>
|
|
|
|
|
<%-- <button type="button" class="btn btn-default" id="resetBtn">
|
|
|
|
|
<button type="button" class="btn btn-default" id="resetBtn2">
|
|
|
|
|
<i class="fa fa-refresh"></i>
|
|
|
|
|
<spring:message code="reset" />
|
|
|
|
|
</button> --%>
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 搜索内容与操作按钮栏 -->
|
|
|
|
|
@@ -156,6 +182,7 @@
|
|
|
|
|
<thead>
|
|
|
|
|
<tr>
|
|
|
|
|
<th><spring:message code="client_ip"/></th>
|
|
|
|
|
<th><spring:message code="isp"/></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>
|
|
|
|
|
@@ -189,20 +216,32 @@
|
|
|
|
|
$("#beginDate").val(starth);
|
|
|
|
|
$("#endDate").val(endh);
|
|
|
|
|
var appType=$("#appType").val();
|
|
|
|
|
var entranceId=$("#entranceId").val();
|
|
|
|
|
var entranceId1=$("#entranceId1").val();
|
|
|
|
|
var entranceId2=$("#entranceId2").val();
|
|
|
|
|
var isp1=$("#isp1").val();
|
|
|
|
|
var isp2=$("#isp2").val();
|
|
|
|
|
var searchQuota=$(".searchQuota[class~='active']").val();
|
|
|
|
|
appTransAjax(starth,endh,appType,entranceId);
|
|
|
|
|
showRealTimeTransChart(appType,entranceId);// 实时折线
|
|
|
|
|
appTop100List(starth,endh,appType,entranceId,searchQuota);
|
|
|
|
|
showRealTimeTransChart(appType,entranceId1,isp1);// 实时折线
|
|
|
|
|
appTransAjax(starth,endh,appType,entranceId2,isp2);
|
|
|
|
|
appTop100List(starth,endh,appType,entranceId2,searchQuota,isp2);
|
|
|
|
|
//筛选功能初始化
|
|
|
|
|
$("#resetBtn").on("click",function() {
|
|
|
|
|
$("select.selectpicker").each(function() {
|
|
|
|
|
$(this).selectpicker('val',$(this).find('option:first').val());
|
|
|
|
|
$("#resetBtn1").on("click",function() {
|
|
|
|
|
$("#searchForm1 select.selectpicker").each(function() {
|
|
|
|
|
$(this).selectpicker('val',"");
|
|
|
|
|
$(this).find("option").attr("selected",false);
|
|
|
|
|
$(this).find("option:first").attr("selected",true);
|
|
|
|
|
// $(this).find("option:first").attr("selected",true);
|
|
|
|
|
});
|
|
|
|
|
$("#searchForm1")[0].reset();
|
|
|
|
|
});
|
|
|
|
|
//筛选功能初始化
|
|
|
|
|
$("#resetBtn2").on("click",function() {
|
|
|
|
|
$("#searchForm2 select.selectpicker").each(function() {
|
|
|
|
|
$(this).selectpicker('val',"");
|
|
|
|
|
$(this).find("option").attr("selected",false);
|
|
|
|
|
// $(this).find("option:first").attr("selected",true);
|
|
|
|
|
});
|
|
|
|
|
$(".Wdate").attr("value", '');
|
|
|
|
|
$("#searchForm")[0].reset();
|
|
|
|
|
$("#searchForm2")[0].reset();
|
|
|
|
|
});
|
|
|
|
|
$(".searchQuota").on("click",function(){
|
|
|
|
|
$(".searchQuota").removeClass("active");
|
|
|
|
|
@@ -226,12 +265,14 @@
|
|
|
|
|
// 改变排序字段
|
|
|
|
|
function changeOrderby(searchQuota) {
|
|
|
|
|
loading();
|
|
|
|
|
appTop100List($("#beginDate").val(),$("#endDate").val(),$("#appType").val(),$("#entranceId").val(),searchQuota);
|
|
|
|
|
appTop100List($("#beginDate").val(),$("#endDate").val(),$("#appType").val(),$("#entranceId2").val(),searchQuota,$("#isp2").val());
|
|
|
|
|
}
|
|
|
|
|
function searchList1() {
|
|
|
|
|
loading();
|
|
|
|
|
var appType=$("#appType").val();
|
|
|
|
|
var entranceId=$("#entranceId").val();
|
|
|
|
|
showRealTimeTransChart(appType,entranceId);// 折线
|
|
|
|
|
var entranceId1=$("#entranceId1").val();
|
|
|
|
|
var isp1=$("#isp1").val();
|
|
|
|
|
showRealTimeTransChart(appType,entranceId1,isp1);// 折线
|
|
|
|
|
}
|
|
|
|
|
function searchList2() {
|
|
|
|
|
var start = $("#beginDate").val();
|
|
|
|
|
@@ -242,14 +283,15 @@
|
|
|
|
|
window.location.reload();
|
|
|
|
|
} else {
|
|
|
|
|
var appType=$("#appType").val();
|
|
|
|
|
var entranceId=$("#entranceId").val();
|
|
|
|
|
var entranceId2=$("#entranceId2").val();
|
|
|
|
|
var isp2=$("#isp2").val();
|
|
|
|
|
var searchQuota=$(".searchQuota[class~='active']").val();
|
|
|
|
|
appTransAjax(start,end,appType,entranceId);// 折线
|
|
|
|
|
appTop100List(start,end,appType,entranceId,searchQuota);// 列表
|
|
|
|
|
appTransAjax(start,end,appType,entranceId2,isp2);// 折线
|
|
|
|
|
appTop100List(start,end,appType,entranceId2,searchQuota,isp2);// 列表
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// 列表
|
|
|
|
|
function appTop100List(start,end,appType,entranceId,searchQuota){
|
|
|
|
|
function appTop100List(start,end,appType,entranceId,searchQuota,isp){
|
|
|
|
|
$.ajax({
|
|
|
|
|
url : "${ctx}/dashboard/traffic/ajaxAppTopList",
|
|
|
|
|
type : 'get',
|
|
|
|
|
@@ -259,7 +301,8 @@
|
|
|
|
|
"endDate" : end,
|
|
|
|
|
"appType" : appType,
|
|
|
|
|
"entranceId" : entranceId,
|
|
|
|
|
"searchQuota":searchQuota
|
|
|
|
|
"searchQuota":searchQuota,
|
|
|
|
|
"searchIspCode":isp
|
|
|
|
|
},
|
|
|
|
|
async : true,
|
|
|
|
|
timeout : 50000,
|
|
|
|
|
@@ -312,9 +355,10 @@
|
|
|
|
|
if (data != null) {
|
|
|
|
|
var html ="<tr>";
|
|
|
|
|
html += "<td class='tc'>" + data.ipAddr + "</td>";
|
|
|
|
|
html += "<td class='tc'>" + data.ispName + "</td>";
|
|
|
|
|
html += "<td class='tc'>" + data.logNum + "</td>";
|
|
|
|
|
html += "<td class='tc'>" + data.logPercent + " %</td>";
|
|
|
|
|
// html += "<td class='tc'>" + (((data.entranceId)==1) ? "Astana":"Alamty") + "</td>";
|
|
|
|
|
// html += "<td class='tc'>" + (((data.entranceId)==1) ? "Astana":"Almaty") + "</td>";
|
|
|
|
|
html += "<td class='tc'>" + Math.round(data.pktNum*100)/100 + "</td>";
|
|
|
|
|
html += "<td class='tc'>" + data.pktPercent + " %</td>";
|
|
|
|
|
html += "<td class='tc'>" + Math.round(data.byteNum*100)/100 + "</td>";
|
|
|
|
|
@@ -325,6 +369,7 @@
|
|
|
|
|
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'>" +"--"+"</td>";
|
|
|
|
|
html+= "<td class='tc'>"+totalunique+"</td>";
|
|
|
|
|
html+= "<td class='tc'>" +"--"+"</td>";
|
|
|
|
|
html+= "<td class='tc'>"+totalpkt+"</td>";
|
|
|
|
|
@@ -333,7 +378,7 @@
|
|
|
|
|
html+= "<td class='tc'>"+"--"+"</td>";
|
|
|
|
|
html+= "<td class='tc'>"+"--"+"</td>";
|
|
|
|
|
html+= "<td class='tc'>"+"--"+"</td>";
|
|
|
|
|
html+="</tr>"
|
|
|
|
|
html+="</tr>"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
$("#tableData").append(html);
|
|
|
|
|
@@ -342,12 +387,20 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// app曲线图
|
|
|
|
|
function appTransAjax(beginDate, endDate,appType,entranceId) {
|
|
|
|
|
function appTransAjax(beginDate, endDate,appType,entranceId,isp) {
|
|
|
|
|
loading();
|
|
|
|
|
$.ajax({ url : "${ctx}/dashboard/traffic/ajaxAppTrend?appType="+appType+"&beginDate="+beginDate+"&endDate="+endDate+"&entranceId="+entranceId,
|
|
|
|
|
$.ajax({ url : "${ctx}/dashboard/traffic/ajaxAppTrend",
|
|
|
|
|
type : "get",
|
|
|
|
|
dataType : "json",
|
|
|
|
|
async : true,
|
|
|
|
|
data : {
|
|
|
|
|
"beginDate" : beginDate,
|
|
|
|
|
"endDate" : endDate,
|
|
|
|
|
"appType" : appType,
|
|
|
|
|
"entranceId" : entranceId,
|
|
|
|
|
"searchIspCode":isp
|
|
|
|
|
},
|
|
|
|
|
traditional:true,
|
|
|
|
|
success : function(rs) {
|
|
|
|
|
var series=new Array();
|
|
|
|
|
var sipResult=new Array();
|
|
|
|
|
@@ -502,13 +555,22 @@
|
|
|
|
|
$(".pageNum").text(Math.ceil(totalData/10));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
function realTimeTrendAjax(beginDate, endDate,appType,entranceId){
|
|
|
|
|
function realTimeTrendAjax(beginDate, endDate,appType,entranceId,isp){
|
|
|
|
|
console.log(isp)
|
|
|
|
|
var result={};
|
|
|
|
|
$.ajax({
|
|
|
|
|
url : "${ctx}/dashboard/traffic/ajaxAppTrend?appType="+appType+"&beginDate="+beginDate+"&endDate="+endDate+"&entranceId="+entranceId,
|
|
|
|
|
url : "${ctx}/dashboard/traffic/ajaxAppTrend",
|
|
|
|
|
type : "get",
|
|
|
|
|
dataType : "json",
|
|
|
|
|
data : {
|
|
|
|
|
"beginDate" : beginDate,
|
|
|
|
|
"endDate" : endDate,
|
|
|
|
|
"appType" : appType,
|
|
|
|
|
"entranceId" : entranceId,
|
|
|
|
|
"searchIspCode":isp
|
|
|
|
|
},
|
|
|
|
|
async : false,
|
|
|
|
|
traditional:true,
|
|
|
|
|
success : function(rs) {
|
|
|
|
|
result=rs;
|
|
|
|
|
closeTip();
|
|
|
|
|
@@ -524,14 +586,14 @@
|
|
|
|
|
}
|
|
|
|
|
var timer=null;
|
|
|
|
|
// 局点信息
|
|
|
|
|
function showRealTimeTransChart(appType,entranceId) {
|
|
|
|
|
function showRealTimeTransChart(appType,entranceId,isp) {
|
|
|
|
|
var time1=(new Date().getTime())-(1000 * 60 * 10+1000 * 60 * 5);
|
|
|
|
|
var time2=(new Date().getTime())-(1000 * 60 * 5);//推迟五分钟
|
|
|
|
|
var beginDate=dateFtt("yyyy-MM-dd hh:mm:ss",new Date(time1)); //获取十个点
|
|
|
|
|
var endDate=dateFtt("yyyy-MM-dd hh:mm:ss",new Date(time2)); // 少算一分钟
|
|
|
|
|
var sipResult=new Array();
|
|
|
|
|
var dipResult=new Array();
|
|
|
|
|
var intData = realTimeTrendAjax(beginDate, endDate,appType,entranceId); //初始化数据 为10个点
|
|
|
|
|
var intData = realTimeTrendAjax(beginDate, endDate,appType,entranceId,isp); //初始化数据 为10个点
|
|
|
|
|
sipResult=intData.sipResult;
|
|
|
|
|
dipResult=intData.dipResult;
|
|
|
|
|
var nowDate=new Date();
|
|
|
|
|
@@ -712,11 +774,19 @@
|
|
|
|
|
var begin=dateFtt("yyyy-MM-dd hh:mm:ss",new Date(time3)); //获取1个点少算一分钟
|
|
|
|
|
var end=dateFtt("yyyy-MM-dd hh:mm:ss",new Date(time4));
|
|
|
|
|
$.ajax({
|
|
|
|
|
url : "${ctx}/dashboard/traffic/ajaxAppTrend?appType="+appType+"&beginDate="+begin+"&endDate="+end+"&entranceId="+entranceId,
|
|
|
|
|
url : "${ctx}/dashboard/traffic/ajaxAppTrend",
|
|
|
|
|
type : "post",
|
|
|
|
|
dataType : "json",
|
|
|
|
|
cache:false,
|
|
|
|
|
data : {
|
|
|
|
|
"beginDate" : begin,
|
|
|
|
|
"endDate" : end,
|
|
|
|
|
"appType" : appType,
|
|
|
|
|
"entranceId" : entranceId,
|
|
|
|
|
"searchIspCode":isp
|
|
|
|
|
},
|
|
|
|
|
async : true,
|
|
|
|
|
traditional:true,
|
|
|
|
|
success : function(rs) {
|
|
|
|
|
var realTimeData=rs;
|
|
|
|
|
if(realTimeData!=null&&Object.keys(realTimeData).length>0){
|
|
|
|
|
|