Commit cb34f901 authored by liuna's avatar liuna

2018年2月1日 --智能分析平台

--实体厅流量监测:页面性能调整
parent 8e809dce
...@@ -255,19 +255,6 @@ ...@@ -255,19 +255,6 @@
<script type="text/javascript" src="${ctx}/static/js/echarts.min.js"></script> <script type="text/javascript" src="${ctx}/static/js/echarts.min.js"></script>
<script type="text/javascript"> <script type="text/javascript">
seatsActiveness();
performanceStability();
catonUser();
seatAnalysisTop();
businessOffice();
seatsReceptionUser();
userIp();
ipBusiness();
ipTrend();
serverExample();
clientCompatibility();
httpInformation();
//格式化日期 //格式化日期
function Format(){ function Format(){
this.jsjava_class="jsjava.text.Format"; this.jsjava_class="jsjava.text.Format";
...@@ -394,10 +381,122 @@ ...@@ -394,10 +381,122 @@
var sd=new SimpleDateFormat(); var sd=new SimpleDateFormat();
sd.applyPattern("dd"); sd.applyPattern("dd");
</script>
function seatsActivenessChart(city,cityValue) { <script type="">
var myChart = echarts.init(document.getElementById('seatsActiveness')); function userIp() {
var option = { $.ajax({
type : "GET",
contentType : "application/json",
url: "${ctx}/MonitorOperation/FlowMonitor/userIp",
async: false,
success: function(data){
console.log("用户IP分析实时",data);
var tbody=$('<tbody></tbody>');
data.forEach(function(t) {
var tr = $('<tr></tr>');
tr.append('<td>'+t[0]+'</td>'+'<td>'+t[1]+'</td>'+'<td>'+t[2]+'</td>'+'<td>'+t[3]+'</td>'+'<td>'+t[4]+'</td>');
tbody.append(tr);
});
$('#userIpTable tbody').replaceWith(tbody);
}
});
}
function userIpMonth() {
$.ajax({
type : "GET",
contentType : "application/json",
url: "${ctx}/MonitorOperation/FlowMonitor/userIpMonth",
async: false,
success: function(data){
console.log("用户IP分析当月",data);
var tbody=$('<tbody></tbody>');
data.forEach(function(t) {
var tr = $('<tr></tr>');
tr.append('<td>'+t[0]+'</td>'+'<td>'+t[1]+'</td>'+'<td>'+t[2]+'</td>'+'<td>'+t[3]+'</td>'+'<td>'+t[4]+'</td>');
tbody.append(tr);
});
$('#userIpTable tbody').replaceWith(tbody);
}
});
}
function serverExample() {
$.ajax({
type : "GET",
contentType : "application/json",
url: "${ctx}/MonitorOperation/FlowMonitor/serverExample",
async: false,
success: function(data){
console.log("服务器实例实时",data);
var tbody=$('<tbody></tbody>');
data.forEach(function(t) {
var tr = $('<tr></tr>');
tr.append('<td>'+t[0]+'</td>'+'<td>'+t[1]+'</td>'+'<td>'+t[2]+'</td>'+'<td>'+t[3]+'</td>'+'<td>'+t[4]+'</td>');
tbody.append(tr);
});
$('#serverExampleTable tbody').replaceWith(tbody);
}
});
}
function serverExampleMonth() {
$.ajax({
type : "GET",
contentType : "application/json",
url: "${ctx}/MonitorOperation/FlowMonitor/serverExampleMonth",
async: false,
success: function(data){
console.log("服务器实例当月",data);
var tbody=$('<tbody></tbody>');
data.forEach(function(t) {
var tr = $('<tr></tr>');
tr.append('<td>'+t[0]+'</td>'+'<td>'+t[1]+'</td>'+'<td>'+t[2]+'</td>'+'<td>'+t[3]+'</td>'+'<td>'+t[4]+'</td>');
tbody.append(tr);
});
$('#serverExampleTable tbody').replaceWith(tbody);
}
});
}
function clientCompatibility() {
$.ajax({
type : "GET",
contentType : "application/json",
url: "${ctx}/MonitorOperation/FlowMonitor/clientCompatibility",
async: false,
success: function(data){
console.log("客户端兼容性实时",data);
var tbody=$('<tbody></tbody>');
data.forEach(function(t) {
var tr = $('<tr></tr>');
tr.append('<td>'+t[0]+'</td>'+'<td>'+t[1]+'</td>'+'<td>'+t[2]+'</td>'+'<td>'+t[3]+'</td>');
tbody.append(tr);
});
$('#browserInformationTable tbody').replaceWith(tbody);
}
});
}
function clientCompatibilityMonth() {
$.ajax({
type : "GET",
contentType : "application/json",
url: "${ctx}/MonitorOperation/FlowMonitor/clientCompatibilityMonth",
async: false,
success: function(data){
console.log("客户端兼容性当月",data);
var tbody=$('<tbody></tbody>');
data.forEach(function(t) {
var tr = $('<tr></tr>');
tr.append('<td>'+t[0]+'</td>'+'<td>'+t[1]+'</td>'+'<td>'+t[2]+'</td>'+'<td>'+t[3]+'</td>');
tbody.append(tr);
});
$('#browserInformationTable tbody').replaceWith(tbody);
}
});
}
userIp();serverExample();clientCompatibility()
</script>
<script type="">
var myChartSeatsActiveness = echarts.init(document.getElementById('seatsActiveness'));
var option1 = {
title:{ title:{
text:null, text:null,
subtext:null subtext:null
...@@ -417,13 +516,13 @@ ...@@ -417,13 +516,13 @@
yAxis:[ yAxis:[
{ {
type:'category', type:'category',
data:city data:[]
} }
], ],
series:[ series:[
{ {
type:'bar', type:'bar',
data:cityValue, data:[],
itemStyle: { itemStyle: {
normal: { normal: {
color:'#7ecbf2', color:'#7ecbf2',
...@@ -442,11 +541,58 @@ ...@@ -442,11 +541,58 @@
], ],
} }
myChart.setOption(option); myChartSeatsActiveness.setOption(option1);
function seatsActiveness() {
$.ajax({
type : "GET",
contentType : "application/json",
url: "${ctx}/MonitorOperation/FlowMonitor/seatsActiveness",
async: false,
success: function(data){
console.log("地市业务量占比实时",data);
var city = new Array();
var cityValue = new Array();
for(var i=0; i<data.length; i++){
city.push(data[i][0]);
cityValue.push(data[i][1]);
}
city.reverse();
cityValue.reverse();
option1.series[0].data=cityValue;
option1.yAxis[0].data=city;
myChartSeatsActiveness.setOption(option1);
}
});
}
function seatsActivenessMonth() {
$.ajax({
type : "GET",
contentType : "application/json",
url: "${ctx}/MonitorOperation/FlowMonitor/seatsActivenessMonth",
async: false,
success: function(data){
console.log("地市业务量占比当月",data);
var city = new Array();
var cityValue = new Array();
for(var i=0; i<data.length; i++){
city.push(data[i][0]);
cityValue.push(data[i][1]);
}
city.reverse();
cityValue.reverse();
option1.series[0].data=cityValue;
option1.yAxis.data=city;
myChartSeatsActiveness.setOption(option1);
}
});
} }
function performanceStabilityChart(city,boxValue,percent) { seatsActiveness()
var myChart = echarts.init(document.getElementById('performanceStability'));
var option = { </script>
<script type="">
var myChartPerformanceStability = echarts.init(document.getElementById('performanceStability'));
var option2 = {
title:{ title:{
text:null, text:null,
subtext:null subtext:null
...@@ -470,7 +616,7 @@ ...@@ -470,7 +616,7 @@
}, },
yAxis: { yAxis: {
type: 'category', type: 'category',
data: city, data: [],
boundaryGap: true, boundaryGap: true,
splitArea: { splitArea: {
show: false show: false
...@@ -482,7 +628,7 @@ ...@@ -482,7 +628,7 @@
series: [ series: [
{ {
type: 'boxplot', type: 'boxplot',
data: boxValue, data: [],
tooltip: { tooltip: {
formatter: function (param) { formatter: function (param) {
return [ return [
...@@ -498,7 +644,7 @@ ...@@ -498,7 +644,7 @@
{ {
type:'bar', type:'bar',
show:false, show:false,
data:percent, data:[],
itemStyle: { itemStyle: {
normal: { normal: {
color:'#7ecbf2', color:'#7ecbf2',
...@@ -516,11 +662,39 @@ ...@@ -516,11 +662,39 @@
} }
], ],
} }
myChart.setOption(option); myChartPerformanceStability.setOption(option2);
function performanceStability() {
$.ajax({
type : "GET",
contentType : "application/json",
url: "${ctx}/MonitorOperation/FlowMonitor/performanceStability",
async: false,
success: function(data){
console.log("地市性能稳定性实时",data);
var city = new Array();
var boxValue = [];
var percent = new Array();
for(var i=0; i<data.length; i++){
city.push(data[i][0]);
percent.push(data[i][6]);
boxValue.push([data[i][1],data[i][2],data[i][3],data[i][4],data[i][5]]);
}
city.reverse();
percent.reverse();
boxValue.reverse();
option2.yAxis.data=city;
option2.series[0].data=boxValue;
option2.series[1].data=percent;
myChartPerformanceStability.setOption(option2);
}
});
} }
function catonUserChart(time,time1Account,time2Account,time3Account) { performanceStability();
var myChart = echarts.init(document.getElementById('catonUser')); </script>
var option = {
<script>
var myChartCatonUser = echarts.init(document.getElementById('catonUser'));
var option3 = {
title:{ title:{
text:null, text:null,
subtext:null subtext:null
...@@ -540,7 +714,7 @@ ...@@ -540,7 +714,7 @@
xAxis:[ xAxis:[
{ {
type: 'category', type: 'category',
data: time, data: [],
splitLine: { splitLine: {
show: false show: false
}, },
...@@ -566,28 +740,57 @@ ...@@ -566,28 +740,57 @@
{ {
name:'无法使用', name:'无法使用',
type:'line', type:'line',
data:time1Account, data:[],
smooth: true smooth: true
}, },
{ {
name:'可容忍', name:'可容忍',
type:'line', type:'line',
data:time2Account, data:[],
smooth: true smooth: true
}, },
{ {
name:'不满意', name:'不满意',
type:'line', type:'line',
data:time3Account, data:[],
smooth: true smooth: true
} }
], ],
};
myChartCatonUser.setOption(option3);
function performanceStabilityMonth() {
$.ajax({
type : "GET",
contentType : "application/json",
url: "${ctx}/MonitorOperation/FlowMonitor/performanceStabilityMonth",
async: false,
success: function(data){
console.log("地市性能稳定性当月",data);
var city = new Array();
var boxValue = [];
var percent = new Array();
for(var i=0; i<data.length; i++){
city.push(data[i][0]);
percent.push(data[i][6]);
boxValue.push([data[i][1],data[i][2],data[i][3],data[i][4],data[i][5]]);
} }
myChart.setOption(option); city.reverse();
percent.reverse();
boxValue.reverse();
option2.yAxis.data=city;
option2.series[0].data=boxValue;
option2.series[1].data=percent;
myChartPerformanceStability.setOption(option2);
}
});
} }
function catonUserChartMonth(time,time1Account,time2Account,time3Account) { // performanceStabilityMonth()
var myChart = echarts.init(document.getElementById('catonUser'));
var option = { </script>
<script>
var myChartCatonUserMonth = echarts.init(document.getElementById('catonUser'));
var option4 = {
title:{ title:{
text:null, text:null,
subtext:null subtext:null
...@@ -607,7 +810,7 @@ ...@@ -607,7 +810,7 @@
xAxis:[ xAxis:[
{ {
type: 'category', type: 'category',
data: time, data: [],
splitLine: { splitLine: {
show: false show: false
}, },
...@@ -633,28 +836,82 @@ ...@@ -633,28 +836,82 @@
{ {
name:'无法使用', name:'无法使用',
type:'line', type:'line',
data:time1Account, data:[],
smooth: true smooth: true
}, },
{ {
name:'可容忍', name:'可容忍',
type:'line', type:'line',
data:time2Account, data:[],
smooth: true smooth: true
}, },
{ {
name:'不满意', name:'不满意',
type:'line', type:'line',
data:time3Account, data:[],
smooth: true smooth: true
} }
], ],
} }
myChart.setOption(option); myChartCatonUserMonth.setOption(option4);
function catonUser() {
$.ajax({
type : "GET",
contentType : "application/json",
url: "${ctx}/MonitorOperation/FlowMonitor/catonUser",
async: false,
success: function(data){
console.log("卡顿用户实时",data);
var time = new Array();
var time1Account = new Array();
var time2Account = new Array();
var time3Account = new Array();
for(var i=0; i<data.length; i++){
time.push(df.format(new Date(data[i][0])));
time1Account.push(data[i][1]);
time2Account.push(data[i][2]);
time3Account.push(data[i][3]);
}
option3.xAxis[0].data=time;
option3.series[0].data=time1Account;
option3.series[1].data=time2Account;
option3.series[2].data=time3Account;
myChartCatonUser.setOption(option3);
}
});
}
function catonUserMonth() {
$.ajax({
type : "GET",
contentType : "application/json",
url: "${ctx}/MonitorOperation/FlowMonitor/catonUserMonth",
async: false,
success: function(data){
console.log("卡顿用户当月",data);
var time = new Array();
var time1Account = new Array();
var time2Account = new Array();
var time3Account = new Array();
for(var i=0; i<data.length; i++){
time.push(df.format(new Date(data[i][0])));
time1Account.push(data[i][1]);
time2Account.push(data[i][2]);
time3Account.push(data[i][3]);
}
option4.xAxis[0].data=time;
option4.series[0].data=time1Account;
option4.series[1].data=time2Account;
option4.series[2].data=time3Account;
myChartCatonUserMonth.setOption(option4);
}
});
} }
function seatAnalysisChart(account,transCnt,transAvail,transTime) { catonUser()
var myChart = echarts.init(document.getElementById('seatAnalysis')); </script>
var option = {
<script>
var myChartSeatAnalysis = echarts.init(document.getElementById('seatAnalysis'));
var option5 = {
title:{ title:{
text:null, text:null,
subtext:null subtext:null
...@@ -693,38 +950,91 @@ ...@@ -693,38 +950,91 @@
{ {
name:'业务量', name:'业务量',
type:'bar', type:'bar',
data:transCnt data:[]
}, },
{ {
name:'成功量', name:'成功量',
type:'bar', type:'bar',
data:transAvail data:[]
}, },
{ {
name:'均时长', name:'均时长',
type:'line', type:'line',
yAxisIndex: 1, yAxisIndex: 1,
data:transTime data:[]
} }
] ]
} }
myChart.setOption(option); myChartSeatAnalysis.setOption(option5);
} function seatAnalysisTop() {
function businessOfficeChart(hallList,dataList,time){ $.ajax({
var myChart = echarts.init(document.getElementById('businessOffice')); type : "GET",
var option = { contentType : "application/json",
title:{ url: "${ctx}/MonitorOperation/FlowMonitor/seatAnalysisTop",
text:null, async: false,
subtext:null success: function(data){
}, data.sort(function(t1,t2){return t2[1]-t1[1]})
tooltip : { console.log("坐席分析前top10",data);
trigger: 'axis' var account = new Array();
}, var transCnt = new Array();
grid:{ var transAvail = new Array();
x:80, var transTime = new Array();
y:20, for(var i=0; i<data.length; i++){
x2:20, account.push(data[i][0]);
y2:20, transCnt.push(data[i][1]);
transAvail.push(data[i][2]);
transTime.push(data[i][3]);
}
option5.series[0].data=transCnt;
option5.series[1].data= transAvail;
option5.series[2].data=transTime;
myChartSeatAnalysis.setOption(option5);
}
});
}
function seatAnalysisLast() {
$.ajax({
type : "GET",
contentType : "application/json",
url: "${ctx}/MonitorOperation/FlowMonitor/seatAnalysisLast",
async: false,
success: function(data){
console.log("坐席分析后top10",data);
var account = new Array();
var transCnt = new Array();
var transAvail = new Array();
var transTime = new Array();
for(var i=0; i<data.length; i++){
account.push(data[i][0]);
transCnt.push(data[i][1]);
transAvail.push(data[i][2]);
transTime.push(data[i][3]);
}
option5.series[0].data=transCnt;
option5.series[0].data= transAvail;
option5.series[0].data=transTime;
myChartSeatAnalysis.setOption(option5);
}
});
}
seatAnalysisTop()
</script>
<script>
var myChartBusinessOffice = echarts.init(document.getElementById('businessOffice'));
var option6 = {
title:{
text:null,
subtext:null
},
tooltip : {
trigger: 'axis'
},
grid:{
x:80,
y:20,
x2:20,
y2:20,
}, },
legend: { legend: {
data:['营业厅1','营业厅2','营业厅3','营业厅4','营业厅5'] data:['营业厅1','营业厅2','营业厅3','营业厅4','营业厅5']
...@@ -732,7 +1042,7 @@ ...@@ -732,7 +1042,7 @@
xAxis:[ xAxis:[
{ {
type: 'category', type: 'category',
data: time, data: [],
splitLine: { splitLine: {
show: false show: false
}, },
...@@ -759,40 +1069,76 @@ ...@@ -759,40 +1069,76 @@
{ {
name:'营业厅1', name:'营业厅1',
type:'line', type:'line',
data:dataList[0], data:[],
smooth: true smooth: true
}, },
{ {
name:'营业厅2', name:'营业厅2',
type:'line', type:'line',
data:dataList[1], data:[],
smooth: true smooth: true
}, },
{ {
name:'营业厅3', name:'营业厅3',
type:'line', type:'line',
data:dataList[2], data:[],
smooth: true smooth: true
}, },
{ {
name:'营业厅4', name:'营业厅4',
type:'line', type:'line',
data:dataList[3], data:[],
smooth: true smooth: true
}, },
{ {
name:'营业厅5', name:'营业厅5',
type:'line', type:'line',
data:dataList[4], data:[],
smooth: true smooth: true
} }
], ],
} }
myChart.setOption(option); function businessOffice() {
$.ajax({
type : "GET",
contentType : "application/json",
url: "${ctx}/MonitorOperation/FlowMonitor/businessOffice",
async: false,
success: function(data){
console.log("营业厅业务量实时",data);
var hallList = [];
var time=[];
var dataList=[];
data.forEach(function(t,i){
if(i===0){
t.forEach(function(t1){
time.push(df.format(new Date(t1[2])))
})
}
dataList.push([]);
t.forEach(function(t1,j){
if(j===0){
hallList.push(t1[1])
}
dataList[i].push(t1[0])
})
})
option6.xAxis[0].data=time;
option6.series[0].data=dataList[0];
option6.series[1].data=dataList[1];
option6.series[2].data=dataList[2];
option6.series[3].data=dataList[3];
option6.series[4].data=dataList[4];
myChartBusinessOffice.setOption(option6);
}
});
} }
function businessOfficeChartMonth(hallList,dataList,time){ businessOffice()
var myChart = echarts.init(document.getElementById('businessOffice')); </script>
var option = {
<script>
var myChartBusinessOfficeMonth = echarts.init(document.getElementById('businessOffice'));
var option7 = {
title:{ title:{
text:null, text:null,
subtext:null subtext:null
...@@ -812,7 +1158,7 @@ ...@@ -812,7 +1158,7 @@
xAxis:[ xAxis:[
{ {
type: 'category', type: 'category',
data: time, data: [],
splitLine: { splitLine: {
show: false show: false
}, },
...@@ -839,40 +1185,76 @@ ...@@ -839,40 +1185,76 @@
{ {
name:'营业厅1', name:'营业厅1',
type:'line', type:'line',
data:dataList[0], data:[],
smooth: true smooth: true
}, },
{ {
name:'营业厅2', name:'营业厅2',
type:'line', type:'line',
data:dataList[1], data:[],
smooth: true smooth: true
}, },
{ {
name:'营业厅3', name:'营业厅3',
type:'line', type:'line',
data:dataList[2], data:[],
smooth: true smooth: true
}, },
{ {
name:'营业厅4', name:'营业厅4',
type:'line', type:'line',
data:dataList[3], data:[],
smooth: true smooth: true
}, },
{ {
name:'营业厅5', name:'营业厅5',
type:'line', type:'line',
data:dataList[4], data:[],
smooth: true smooth: true
} }
], ],
} }
myChart.setOption(option); function businessOfficeMonth() {
$.ajax({
type : "GET",
contentType : "application/json",
url: "${ctx}/MonitorOperation/FlowMonitor/businessOfficeMonth",
async: false,
success: function(data){
console.log("营业厅业务量当月",data);
var hallList = [];
var time=[];
var dataList=[];
data.forEach(function(t,i){
if(i===0){
t.forEach(function(t1){
time.push(df.format(new Date(t1[2])))
})
}
dataList.push([])
t.forEach(function(t1,j){
if(j===0){
hallList.push(t1[1])
}
dataList[i].push(t1[0])
})
})
option7.xAxis[0].data=time;
option7.series[0].data=dataList[0];
option7.series[1].data=dataList[1];
option7.series[2].data=dataList[2];
option7.series[3].data=dataList[3];
option7.series[4].data=dataList[4];
myChartBusinessOfficeMonth.setOption(option7);
}
});
} }
function seatsReceptionUserChart(time,time1Account,time2Account,time3Account){
var myChart = echarts.init(document.getElementById('seatsReceptionUser')); </script>
var option = {
<script>
var myChartSeatsReceptionUser = echarts.init(document.getElementById('seatsReceptionUser'));
var option8 = {
title:{ title:{
text:null, text:null,
subtext:null subtext:null
...@@ -890,7 +1272,7 @@ ...@@ -890,7 +1272,7 @@
xAxis:[ xAxis:[
{ {
type: 'category', type: 'category',
data: time, data: [],
splitLine: { splitLine: {
show: false show: false
}, },
...@@ -923,7 +1305,7 @@ ...@@ -923,7 +1305,7 @@
} }
} }
}, },
data:time1Account, data:[],
smooth: true smooth: true
}, },
{ {
...@@ -936,7 +1318,7 @@ ...@@ -936,7 +1318,7 @@
} }
} }
}, },
data:time2Account, data:[],
smooth: true smooth: true
}, },
{ {
...@@ -949,16 +1331,44 @@ ...@@ -949,16 +1331,44 @@
} }
} }
}, },
data:time3Account, data:[],
smooth: true smooth: true
} }
], ],
} }
myChart.setOption(option); function seatsReceptionUser() {
$.ajax({
type : "GET",
contentType : "application/json",
url: "${ctx}/MonitorOperation/FlowMonitor/seatsReceptionUser",
async: false,
success: function(data){
console.log("坐席接待客户实时",data);
var time = new Array();
var time1Account = new Array();
var time2Account = new Array();
var time3Account = new Array();
for(var i=0; i<data.length; i++){
time.push(df.format(new Date(data[i][0])));
time1Account.push(data[i][1]);
time2Account.push(data[i][2]);
time3Account.push(data[i][3]);
}
option8.xAxis[0].data=time;
option8.series[0].data=time1Account;
option8.series[1].data=time2Account;
option8.series[2].data=time3Account;
myChartSeatsReceptionUser.setOption(option8);
}
});
} }
function seatsReceptionUserChartMonth(time,time1Account,time2Account,time3Account){ seatsReceptionUser()
var myChart = echarts.init(document.getElementById('seatsReceptionUser')); </script>
var option = {
<script>
var myChartSeatsReceptionUserMonth = echarts.init(document.getElementById('seatsReceptionUser'));
var option9 = {
title:{ title:{
text:null, text:null,
subtext:null subtext:null
...@@ -976,7 +1386,7 @@ ...@@ -976,7 +1386,7 @@
xAxis:[ xAxis:[
{ {
type: 'category', type: 'category',
data: time, data: [],
splitLine: { splitLine: {
show: false show: false
}, },
...@@ -1009,7 +1419,7 @@ ...@@ -1009,7 +1419,7 @@
} }
} }
}, },
data:time1Account, data:[],
smooth: true smooth: true
}, },
{ {
...@@ -1022,7 +1432,7 @@ ...@@ -1022,7 +1432,7 @@
} }
} }
}, },
data:time2Account, data:[],
smooth: true smooth: true
}, },
{ {
...@@ -1035,16 +1445,43 @@ ...@@ -1035,16 +1445,43 @@
} }
} }
}, },
data:time3Account, data:[],
smooth: true smooth: true
} }
], ],
} }
myChart.setOption(option); function seatsReceptionUserMonth() {
$.ajax({
type : "GET",
contentType : "application/json",
url: "${ctx}/MonitorOperation/FlowMonitor/seatsReceptionUserMonth",
async: false,
success: function(data){
console.log("坐席接待客户当月",data);
var time = new Array();
var time1Account = new Array();
var time2Account = new Array();
var time3Account = new Array();
for(var i=0; i<data.length; i++){
time.push(df.format(new Date(data[i][0])));
time1Account.push(data[i][1]);
time2Account.push(data[i][2]);
time3Account.push(data[i][3]);
}
option9.xAxis[0].data=time;
option9.series[0].data=time1Account;
option9.series[1].data=time2Account;
option9.series[2].data=time3Account;
myChartSeatsReceptionUserMonth.setOption(option9);
} }
function ipBusinessChart(cnt1,cnt2,cnt3,cnt4,cnt5,cnt6,cnt7,cnt8,cnt9,cnt10,clientIp,cnt){ });
var myChart = echarts.init(document.getElementById('ipBusiness')); }
var option = { </script>
<script>
var myChartIpBusiness = echarts.init(document.getElementById('ipBusiness'));
var option10 = {
title: { title: {
text: null, text: null,
subtext: null subtext: null
...@@ -1070,7 +1507,7 @@ ...@@ -1070,7 +1507,7 @@
yAxis : [ yAxis : [
{ {
type : 'category', type : 'category',
data : clientIp, data : [],
splitLine:{ splitLine:{
show:false show:false
}, },
...@@ -1081,69 +1518,175 @@ ...@@ -1081,69 +1518,175 @@
name:'宽带开户', name:'宽带开户',
type:'bar', type:'bar',
stack: '总量', stack: '总量',
data:cnt1 data:[]
}, },
{ {
name:'资料变更', name:'资料变更',
type:'bar', type:'bar',
stack: '总量', stack: '总量',
data:cnt2 data:[]
}, },
{ {
name:'产品变更', name:'产品变更',
type:'bar', type:'bar',
stack: '总量', stack: '总量',
data:cnt3 data:[]
}, },
{ {
name:'套餐变更', name:'套餐变更',
type:'bar', type:'bar',
stack: '总量', stack: '总量',
data:cnt4 data:[]
}, },
{ {
name:'综合账单查询', name:'综合账单查询',
type:'bar', type:'bar',
stack: '总量', stack: '总量',
data:cnt5 data:[]
}, },
{ {
name:'充值缴费', name:'充值缴费',
type:'bar', type:'bar',
stack: '总量', stack: '总量',
data:cnt6 data:[]
}, },
{ {
name:'资金变化查询', name:'资金变化查询',
type:'bar', type:'bar',
stack: '总量', stack: '总量',
data:cnt7 data:[]
}, },
{ {
name:'详单查询', name:'详单查询',
type:'bar', type:'bar',
stack: '总量', stack: '总量',
data:cnt8 data:[]
}, },
{ {
name:'积分查询', name:'积分查询',
type:'bar', type:'bar',
stack: '总量', stack: '总量',
data:cnt9 data:[]
}, },
{ {
name:'其他', name:'其他',
type:'bar', type:'bar',
stack: '总量', stack: '总量',
data:cnt10 data:[]
} }
] ]
} }
myChart.setOption(option); function ipBusinessMonth() {
$.ajax({
type : "GET",
contentType : "application/json",
url: "${ctx}/MonitorOperation/FlowMonitor/ipBusinessMonth",
async: false,
success: function(data){
data[i].sort(function(t1,t2){return t1[2]-t2[2]});
console.log("用户IP业务当月",data);
var cnt1 = new Array();
var cnt2 = new Array();
var cnt3 = new Array();
var cnt4 = new Array();
var cnt5 = new Array();
var cnt6 = new Array();
var cnt7 = new Array();
var cnt8 = new Array();
var cnt9 = new Array();
var cnt10 = new Array();
var clientIp = new Array();
var cnt = new Array();
for(var i=0; i<data.length; i++){
cnt1.push(data[i][0]);
cnt2.push(data[i][1]);
cnt3.push(data[i][2]);
cnt4.push(data[i][3]);
cnt5.push(data[i][4]);
cnt6.push(data[i][5]);
cnt7.push(data[i][6]);
cnt8.push(data[i][7]);
cnt9.push(data[i][8]);
cnt10.push(data[i][9]);
clientIp.push(data[i][10]);
cnt.push(data[i][11]);
}
option10.yAxis[0].data=clientIp;
option10.series[0].data=cnt1;
option10.series[1].data=cnt2;
option10.series[2].data=cnt3;
option10.series[3].data=cnt4;
option10.series[4].data=cnt5;
option10.series[5].data=cnt6;
option10.series[6].data=cnt7;
option10.series[7].data=cnt8;
option10.series[8].data=cnt9;
option10.series[9].data=cnt10;
myChartIpBusiness.setOption(option10);
}
});
}
function ipBusiness() {
$.ajax({
type : "GET",
contentType : "application/json",
url: "${ctx}/MonitorOperation/FlowMonitor/ipBusiness",
async: false,
success: function(data){
console.log("用户IP业务实时",data);
var cnt1 = new Array();
var cnt2 = new Array();
var cnt3 = new Array();
var cnt4 = new Array();
var cnt5 = new Array();
var cnt6 = new Array();
var cnt7 = new Array();
var cnt8 = new Array();
var cnt9 = new Array();
var cnt10 = new Array();
var clientIp = new Array();
var cnt = new Array();
for(var i=0; i<data.length; i++){
data[i].sort(function(t1,t2){return t1[2]-t2[2]});
cnt1.push(data[i][0]);
cnt2.push(data[i][1]);
cnt3.push(data[i][2]);
cnt4.push(data[i][3]);
cnt5.push(data[i][4]);
cnt6.push(data[i][5]);
cnt7.push(data[i][6]);
cnt8.push(data[i][7]);
cnt9.push(data[i][8]);
cnt10.push(data[i][9]);
clientIp.push(data[i][10]);
cnt.push(data[i][11]);
}
option10.yAxis[0].data=clientIp;
option10.series[0].data=cnt1;
option10.series[1].data=cnt2;
option10.series[2].data=cnt3;
option10.series[3].data=cnt4;
option10.series[4].data=cnt5;
option10.series[5].data=cnt6;
option10.series[6].data=cnt7;
option10.series[7].data=cnt8;
option10.series[8].data=cnt9;
option10.series[9].data=cnt10;
myChartIpBusiness.setOption(option10);
} }
function httpInformationChart(serverIp,sotherCnt){ });
var myChart = echarts.init(document.getElementById('httpState')); }
var option = { ipBusiness()
</script>
<script>
var myChartHttpInformation = echarts.init(document.getElementById('httpState'));
var option11 = {
title: { title: {
text: null, text: null,
subtext: null subtext: null
...@@ -1160,7 +1703,7 @@ ...@@ -1160,7 +1703,7 @@
xAxis : [ xAxis : [
{ {
type : 'category', type : 'category',
data : serverIp, data : [],
splitLine:{ splitLine:{
show:false show:false
}, },
...@@ -1179,37 +1722,98 @@ ...@@ -1179,37 +1722,98 @@
name:'200', name:'200',
type:'bar', type:'bar',
stack: '总量', stack: '总量',
data:sotherCnt data:[]
}, },
{ {
name:'302', name:'302',
type:'bar', type:'bar',
stack: '总量', stack: '总量',
data:sotherCnt data:[]
}, },
{ {
name:'404', name:'404',
type:'bar', type:'bar',
stack: '总量', stack: '总量',
data:sotherCnt data:[]
}, },
{ {
name:'空白', name:'空白',
type:'bar', type:'bar',
stack: '总量', stack: '总量',
data:sotherCnt data:[]
}, },
], ],
} }
myChart.setOption(option); function httpInformation() {
$.ajax({
type : "GET",
contentType : "application/json",
url: "${ctx}/MonitorOperation/FlowMonitor/httpInformation",
async: false,
success: function(data){
console.log("HTTP状态码实时",data);
var serverIp = [];
var twoOtwo = [];
var threeOtwo = [];
var fourOfour = [];
var space = [];
for(var i=0; i<data.length; i++){
serverIp.push(data[i][0]);
twoOtwo.push(data[i][1]);
threeOtwo.push(data[i][2]);
fourOfour.push(data[i][3]);
space.push(data[i][4]);
}
option11.xAxis[0].data=serverIp;
option11.series[0].data=twoOtwo;
option11.series[1].data=threeOtwo;
option11.series[2].data=fourOfour;
option11.series[3].data=space;
myChartHttpInformation.setOption(option11);
} }
function ipTrendChart(time,dataList,ipList) { });
var myChart = echarts.init(document.getElementById('ipTrend')); }
var option = { function httpInformationMonth() {
title:{ $.ajax({
text:null, type : "GET",
subtext:null contentType : "application/json",
}, url: "${ctx}/MonitorOperation/FlowMonitor/httpInformationMonth",
async: false,
success: function(data){
console.log("HTTP状态码当月",data);
var serverIp = [];
var twoOtwo = [];
var threeOtwo = [];
var fourOfour = [];
var space = [];
for(var i=0; i<data.length; i++){
serverIp.push(data[i][0]);
twoOtwo.push(data[i][1]);
threeOtwo.push(data[i][2]);
fourOfour.push(data[i][3]);
space.push(data[i][4]);
}
option11.xAxis[0].data=serverIp;
option11.series[0].data=twoOtwo;
option11.series[1].data=threeOtwo;
option11.series[2].data=fourOfour;
option11.series[3].data=space;
myChartHttpInformation.setOption(option11);
}
});
}
httpInformation()
</script>
<script>
var myChartIpTrend = echarts.init(document.getElementById('ipTrend'));
var option12 = {
title:{
text:null,
subtext:null
},
tooltip : { tooltip : {
trigger: 'axis' trigger: 'axis'
}, },
...@@ -1220,12 +1824,12 @@ ...@@ -1220,12 +1824,12 @@
y2:30, y2:30,
}, },
legend: { legend: {
data:ipList, data:[],
}, },
xAxis:[ xAxis:[
{ {
type: 'category', type: 'category',
data: time, data: [],
splitLine: { splitLine: {
show: false show: false
}, },
...@@ -1250,48 +1854,127 @@ ...@@ -1250,48 +1854,127 @@
], ],
series:[ series:[
{ {
name:ipList[0], name:[],
type:'line',
data:[],
smooth: true
},
{
name:[],
type:'line',
data:[],
smooth: true
},
{
name:[],
type:'line',
data:[],
smooth: true
},
{
name:[],
type:'line',
data:[],
smooth: true
},
{
name:[],
type:'line', type:'line',
data:dataList[0], data:[],
smooth: true smooth: true
}, },
{ {
name:ipList[1], name:[],
type:'line', type:'line',
data:dataList[1], data:[],
smooth: true smooth: true
}, },
{ {
name:ipList[2], name:[],
type:'line', type:'line',
data:dataList[2], data:[],
smooth: true smooth: true
}, },
{ {
name:ipList[3], name:[],
type:'line', type:'line',
data:dataList[3], data:[],
smooth: true smooth: true
}, },
{ {
name:ipList[4], name:[],
type:'line', type:'line',
data:dataList[4], data:[],
smooth: true smooth: true
}, },
{ {
name:ipList[5], name:[],
type:'line', type:'line',
data:dataList[5], data:[],
smooth: true smooth: true
} }
], ],
} }
myChart.setOption(option);
function ipTrend() {
$.ajax({
type : "GET",
contentType : "application/json",
url: "${ctx}/MonitorOperation/FlowMonitor/ipTrend",
async: false,
success: function(data){
console.log("IP趋势图实时",data);
var dataList=[];
var time=[];
var ipList=[];
data.forEach(function(t,i){
t.sort(function(t1,t2){return t1[2]-t2[2]});
if(i===0){
t.forEach(function(t1){
time.push(df.format(new Date(t1[2])))
})
}
dataList.push([])
t.forEach(function(t1,j){
if(j===0){
ipList.push(t1[1])
}
dataList[i].push(t1[0])
})
});
option12.legend.data=ipList;
option12.xAxis[0].data=time;
option12.series[0].data=dataList[0];
option12.series[0].name=ipList[0];
option12.series[1].data=dataList[1];
option12.series[1].name=ipList[1];
option12.series[2].data=dataList[2];
option12.series[2].name=ipList[2];
option12.series[3].data=dataList[3];
option12.series[3].name=ipList[3];
option12.series[4].data=dataList[4];
option12.series[4].name=ipList[4];
option12.series[5].data=dataList[5];
option12.series[5].name=ipList[5];
option12.series[6].data=dataList[6];
option12.series[6].name=ipList[6];
option12.series[7].data=dataList[7];
option12.series[7].name=ipList[7];
option12.series[8].data=dataList[8];
option12.series[8].name=ipList[8];
option12.series[9].data=dataList[9];
option12.series[9].name=ipList[9];
myChartIpTrend.setOption(option12);
}
});
} }
function ipTrendChartMonth(time,dataList,ipList) { ipTrend()
var myChart = echarts.init(document.getElementById('ipTrend')); </script>
var option = {
<script>
var myChartIpTrendMonth = echarts.init(document.getElementById('ipTrend'));
var option13 = {
title:{ title:{
text:null, text:null,
subtext:null subtext:null
...@@ -1306,12 +1989,12 @@ ...@@ -1306,12 +1989,12 @@
y2:30, y2:30,
}, },
legend: { legend: {
data:ipList, data:[],
}, },
xAxis:[ xAxis:[
{ {
type: 'category', type: 'category',
data: time, data: [],
splitLine: { splitLine: {
show: false show: false
}, },
...@@ -1336,597 +2019,118 @@ ...@@ -1336,597 +2019,118 @@
], ],
series:[ series:[
{ {
name:ipList[0], name:[],
type:'line',
data:[],
smooth: true
},
{
name:[],
type:'line',
data:[],
smooth: true
},
{
name:[],
type:'line',
data:[],
smooth: true
},
{
name:[],
type:'line',
data:[],
smooth: true
},
{
name:[],
type:'line', type:'line',
data:dataList[0], data:[],
smooth: true smooth: true
}, },
{ {
name:ipList[1], name:[],
type:'line', type:'line',
data:dataList[1], data:[],
smooth: true smooth: true
}, },
{ {
name:ipList[2], name:[],
type:'line', type:'line',
data:dataList[2], data:[],
smooth: true smooth: true
}, },
{ {
name:ipList[3], name:[],
type:'line', type:'line',
data:dataList[3], data:[],
smooth: true smooth: true
}, },
{ {
name:ipList[4], name:[],
type:'line', type:'line',
data:dataList[4], data:[],
smooth: true smooth: true
}, },
{ {
name:ipList[5], name:[],
type:'line', type:'line',
data:dataList[5], data:[],
smooth: true smooth: true
} }
], ],
} }
myChart.setOption(option); function ipTrendMonth() {
}
function seatsActiveness() {
$.ajax({
type : "GET",
contentType : "application/json",
url: "${ctx}/MonitorOperation/FlowMonitor/seatsActiveness",
async: false,
success: function(data){
console.log("地市业务量占比实时",data);
var city = new Array();
var cityValue = new Array();
for(var i=0; i<data.length; i++){
city.push(data[i][0]);
cityValue.push(data[i][1]);
}
city.reverse();
cityValue.reverse();
seatsActivenessChart(city,cityValue);
}
});
}
function seatsActivenessMonth() {
$.ajax({
type : "GET",
contentType : "application/json",
url: "${ctx}/MonitorOperation/FlowMonitor/seatsActivenessMonth",
async: false,
success: function(data){
console.log("地市业务量占比当月",data);
var city = new Array();
var cityValue = new Array();
for(var i=0; i<data.length; i++){
city.push(data[i][0]);
cityValue.push(data[i][1]);
}
city.reverse();
cityValue.reverse();
seatsActivenessChart(city,cityValue);
}
});
}
function performanceStability() {
$.ajax({
type : "GET",
contentType : "application/json",
url: "${ctx}/MonitorOperation/FlowMonitor/performanceStability",
async: false,
success: function(data){
console.log("地市性能稳定性实时",data);
var city = new Array();
var boxValue = [];
var percent = new Array();
for(var i=0; i<data.length; i++){
city.push(data[i][0]);
percent.push(data[i][6]);
boxValue.push([data[i][1],data[i][2],data[i][3],data[i][4],data[i][5]]);
}
city.reverse();
percent.reverse();
boxValue.reverse();
performanceStabilityChart(city,boxValue,percent);
}
});
}
function performanceStabilityMonth() {
$.ajax({
type : "GET",
contentType : "application/json",
url: "${ctx}/MonitorOperation/FlowMonitor/performanceStabilityMonth",
async: false,
success: function(data){
console.log("地市性能稳定性当月",data);
var city = new Array();
var boxValue = [];
var percent = new Array();
for(var i=0; i<data.length; i++){
city.push(data[i][0]);
percent.push(data[i][6]);
boxValue.push([data[i][1],data[i][2],data[i][3],data[i][4],data[i][5]]);
}
city.reverse();
percent.reverse();
boxValue.reverse();
performanceStabilityChart(city,boxValue,percent);
}
});
}
function catonUser() {
$.ajax({
type : "GET",
contentType : "application/json",
url: "${ctx}/MonitorOperation/FlowMonitor/catonUser",
async: false,
success: function(data){
console.log("卡顿用户实时",data);
var time = new Array();
var time1Account = new Array();
var time2Account = new Array();
var time3Account = new Array();
for(var i=0; i<data.length; i++){
time.push(df.format(new Date(data[i][0])));
time1Account.push(data[i][1]);
time2Account.push(data[i][2]);
time3Account.push(data[i][3]);
}
catonUserChart(time,time1Account,time2Account,time3Account);
}
});
}
function catonUserMonth() {
$.ajax({
type : "GET",
contentType : "application/json",
url: "${ctx}/MonitorOperation/FlowMonitor/catonUserMonth",
async: false,
success: function(data){
console.log("卡顿用户当月",data);
var time = new Array();
var time1Account = new Array();
var time2Account = new Array();
var time3Account = new Array();
for(var i=0; i<data.length; i++){
time.push(df.format(new Date(data[i][0])));
time1Account.push(data[i][1]);
time2Account.push(data[i][2]);
time3Account.push(data[i][3]);
}
catonUserChartMonth(time,time1Account,time2Account,time3Account);
}
});
}
function seatAnalysisTop() {
$.ajax({ $.ajax({
type : "GET", type : "GET",
contentType : "application/json", contentType : "application/json",
url: "${ctx}/MonitorOperation/FlowMonitor/seatAnalysisTop", url: "${ctx}/MonitorOperation/FlowMonitor/ipTrendMonth",
async: false, async: false,
success: function(data){ success: function(data){
console.log("坐席分析前top10",data); console.log("IP趋势图当月",data);
var account = new Array(); var dataList=[];
var transCnt = new Array(); var time=[];
var transAvail = new Array(); var ipList=[];
var transTime = new Array(); data.forEach(function(t,i){
for(var i=0; i<data.length; i++){ t.sort(function(t1,t2){return t1[2]-t2[2]});
account.push(data[i][0]); if(i===0){
transCnt.push(data[i][1]); t.forEach(function(t1){
transAvail.push(data[i][2]); time.push(df.format(new Date(t1[2])))
transTime.push(data[i][3]); })
} }
seatAnalysisChart(account,transCnt,transAvail,transTime); dataList.push([])
t.forEach(function(t1,j){
if(j===0){
ipList.push(t1[1])
} }
dataList[i].push(t1[0])
})
}); });
} option13.legend.data=ipList;
function seatAnalysisLast() {
$.ajax({
type : "GET", option13.xAxis[0].data=time;
contentType : "application/json", option13.series[0].data=dataList[0];
url: "${ctx}/MonitorOperation/FlowMonitor/seatAnalysisLast", option13.series[0].name=ipList[0];
async: false, option13.series[1].data=dataList[1];
success: function(data){ option13.series[1].name=ipList[1];
console.log("坐席分析后top10",data); option13.series[2].data=dataList[2];
var account = new Array(); option13.series[2].name=ipList[2];
var transCnt = new Array(); option13.series[3].data=dataList[3];
var transAvail = new Array(); option13.series[3].name=ipList[3];
var transTime = new Array(); option13.series[4].data=dataList[4];
for(var i=0; i<data.length; i++){ option13.series[4].name=ipList[4];
account.push(data[i][0]); option13.series[5].data=dataList[5];
transCnt.push(data[i][1]); option13.series[5].name=ipList[5];
transAvail.push(data[i][2]); option12.series[6].data=dataList[6];
transTime.push(data[i][3]); option12.series[6].name=ipList[6];
} option12.series[7].data=dataList[7];
seatAnalysisChart(account,transCnt,transAvail,transTime); option12.series[7].name=ipList[7];
} option12.series[8].data=dataList[8];
}); option12.series[8].name=ipList[8];
} option12.series[9].data=dataList[9];
function businessOffice() { option12.series[9].name=ipList[9];
$.ajax({ myChartIpTrendMonth.setOption(option13);
type : "GET",
contentType : "application/json",
url: "${ctx}/MonitorOperation/FlowMonitor/businessOffice",
async: false,
success: function(data){
console.log("营业厅业务量实时",data);
var hallList = [];
var time=[];
var dataList=[];
data.forEach(function(t,i){
if(i===0){
t.forEach(function(t1){
time.push(df.format(new Date(t1[2])))
})
}
dataList.push([]);
t.forEach(function(t1,j){
if(j===0){
hallList.push(t1[1])
}
dataList[i].push(t1[0])
})
})
businessOfficeChart(hallList,dataList,time);
}
});
}
function businessOfficeMonth() {
$.ajax({
type : "GET",
contentType : "application/json",
url: "${ctx}/MonitorOperation/FlowMonitor/businessOfficeMonth",
async: false,
success: function(data){
console.log("营业厅业务量当月",data);
var hallList = [];
var time=[];
var dataList=[];
data.forEach(function(t,i){
if(i===0){
t.forEach(function(t1){
time.push(df.format(new Date(t1[2])))
})
}
dataList.push([])
t.forEach(function(t1,j){
if(j===0){
hallList.push(t1[1])
}
dataList[i].push(t1[0])
})
})
businessOfficeChartMonth(hallList,dataList,time);
}
});
}
function seatsReceptionUser() {
$.ajax({
type : "GET",
contentType : "application/json",
url: "${ctx}/MonitorOperation/FlowMonitor/seatsReceptionUser",
async: false,
success: function(data){
console.log("坐席接待客户实时",data);
var time = new Array();
var time1Account = new Array();
var time2Account = new Array();
var time3Account = new Array();
for(var i=0; i<data.length; i++){
time.push(df.format(new Date(data[i][0])));
time1Account.push(data[i][1]);
time2Account.push(data[i][2]);
time3Account.push(data[i][3]);
}
seatsReceptionUserChart(time,time1Account,time2Account,time3Account);
}
});
}
function seatsReceptionUserMonth() {
$.ajax({
type : "GET",
contentType : "application/json",
url: "${ctx}/MonitorOperation/FlowMonitor/seatsReceptionUserMonth",
async: false,
success: function(data){
console.log("坐席接待客户当月",data);
var time = new Array();
var time1Account = new Array();
var time2Account = new Array();
var time3Account = new Array();
for(var i=0; i<data.length; i++){
time.push(df.format(new Date(data[i][0])));
time1Account.push(data[i][1]);
time2Account.push(data[i][2]);
time3Account.push(data[i][3]);
}
seatsReceptionUserChartMonth(time,time1Account,time2Account,time3Account);
}
});
}
function userIp() {
$.ajax({
type : "GET",
contentType : "application/json",
url: "${ctx}/MonitorOperation/FlowMonitor/userIp",
async: false,
success: function(data){
console.log("用户IP分析实时",data);
var tbody=$('<tbody></tbody>');
data.forEach(function(t) {
var tr = $('<tr></tr>');
tr.append('<td>'+t[0]+'</td>'+'<td>'+t[1]+'</td>'+'<td>'+t[2]+'</td>'+'<td>'+t[3]+'</td>'+'<td>'+t[4]+'</td>');
tbody.append(tr);
});
$('#userIpTable tbody').replaceWith(tbody);
}
});
}
function userIpMonth() {
$.ajax({
type : "GET",
contentType : "application/json",
url: "${ctx}/MonitorOperation/FlowMonitor/userIpMonth",
async: false,
success: function(data){
console.log("用户IP分析当月",data);
var tbody=$('<tbody></tbody>');
data.forEach(function(t) {
var tr = $('<tr></tr>');
tr.append('<td>'+t[0]+'</td>'+'<td>'+t[1]+'</td>'+'<td>'+t[2]+'</td>'+'<td>'+t[3]+'</td>'+'<td>'+t[4]+'</td>');
tbody.append(tr);
});
$('#userIpTable tbody').replaceWith(tbody);
}
});
}
function ipBusiness() {
$.ajax({
type : "GET",
contentType : "application/json",
url: "${ctx}/MonitorOperation/FlowMonitor/ipBusiness",
async: false,
success: function(data){
console.log("用户IP业务实时",data);
var cnt1 = new Array();
var cnt2 = new Array();
var cnt3 = new Array();
var cnt4 = new Array();
var cnt5 = new Array();
var cnt6 = new Array();
var cnt7 = new Array();
var cnt8 = new Array();
var cnt9 = new Array();
var cnt10 = new Array();
var clientIp = new Array();
var cnt = new Array();
for(var i=0; i<data.length; i++){
cnt1.push(data[i][0]);
cnt2.push(data[i][1]);
cnt3.push(data[i][2]);
cnt4.push(data[i][3]);
cnt5.push(data[i][4]);
cnt6.push(data[i][5]);
cnt7.push(data[i][6]);
cnt8.push(data[i][7]);
cnt9.push(data[i][8]);
cnt10.push(data[i][9]);
clientIp.push(data[i][10]);
cnt.push(data[i][11]);
}
ipBusinessChart(cnt1,cnt2,cnt3,cnt4,cnt5,cnt6,cnt7,cnt8,cnt9,cnt10,clientIp,cnt);
}
});
}
function ipBusinessMonth() {
$.ajax({
type : "GET",
contentType : "application/json",
url: "${ctx}/MonitorOperation/FlowMonitor/ipBusinessMonth",
async: false,
success: function(data){
console.log("用户IP业务当月",data);
var cnt1 = new Array();
var cnt2 = new Array();
var cnt3 = new Array();
var cnt4 = new Array();
var cnt5 = new Array();
var cnt6 = new Array();
var cnt7 = new Array();
var cnt8 = new Array();
var cnt9 = new Array();
var cnt10 = new Array();
var clientIp = new Array();
var cnt = new Array();
for(var i=0; i<data.length; i++){
cnt1.push(data[i][0]);
cnt2.push(data[i][1]);
cnt3.push(data[i][2]);
cnt4.push(data[i][3]);
cnt5.push(data[i][4]);
cnt6.push(data[i][5]);
cnt7.push(data[i][6]);
cnt8.push(data[i][7]);
cnt9.push(data[i][8]);
cnt10.push(data[i][9]);
clientIp.push(data[i][10]);
cnt.push(data[i][11]);
}
ipBusinessChart(cnt1,cnt2,cnt3,cnt4,cnt5,cnt6,cnt7,cnt8,cnt9,cnt10,clientIp,cnt);
}
});
}
function ipTrend() {
$.ajax({
type : "GET",
contentType : "application/json",
url: "${ctx}/MonitorOperation/FlowMonitor/ipTrend",
async: false,
success: function(data){
console.log("IP趋势图实时",data);
var dataList=[];
var time=[];
var ipList=[];
data.forEach(function(t,i){
if(i===0){
t.forEach(function(t1){
time.push(df.format(new Date(t1[2])))
})
}
dataList.push([])
t.forEach(function(t1,j){
if(j===0){
ipList.push(t1[1])
}
dataList[i].push(t1[0])
})
})
ipTrendChart(time,dataList,ipList);
}
});
}
function ipTrendMonth() {
$.ajax({
type : "GET",
contentType : "application/json",
url: "${ctx}/MonitorOperation/FlowMonitor/ipTrendMonth",
async: false,
success: function(data){
console.log("IP趋势图当月",data);
var dataList=[];
var time=[];
var ipList=[];
data.forEach(function(t,i){
if(i===0){
t.forEach(function(t1){
time.push(df.format(new Date(t1[2])))
})
}
dataList.push([])
t.forEach(function(t1,j){
if(j===0){
ipList.push(t1[1])
}
dataList[i].push(t1[0])
})
});
ipTrendChartMonth(time,dataList,ipList);
}
});
}
function serverExample() {
$.ajax({
type : "GET",
contentType : "application/json",
url: "${ctx}/MonitorOperation/FlowMonitor/serverExample",
async: false,
success: function(data){
console.log("服务器实例实时",data);
var tbody=$('<tbody></tbody>');
data.forEach(function(t) {
var tr = $('<tr></tr>');
tr.append('<td>'+t[0]+'</td>'+'<td>'+t[1]+'</td>'+'<td>'+t[2]+'</td>'+'<td>'+t[3]+'</td>'+'<td>'+t[4]+'</td>');
tbody.append(tr);
});
$('#serverExampleTable tbody').replaceWith(tbody);
}
});
}
function serverExampleMonth() {
$.ajax({
type : "GET",
contentType : "application/json",
url: "${ctx}/MonitorOperation/FlowMonitor/serverExampleMonth",
async: false,
success: function(data){
console.log("服务器实例当月",data);
var tbody=$('<tbody></tbody>');
data.forEach(function(t) {
var tr = $('<tr></tr>');
tr.append('<td>'+t[0]+'</td>'+'<td>'+t[1]+'</td>'+'<td>'+t[2]+'</td>'+'<td>'+t[3]+'</td>'+'<td>'+t[4]+'</td>');
tbody.append(tr);
});
$('#serverExampleTable tbody').replaceWith(tbody);
}
});
}
function clientCompatibility() {
$.ajax({
type : "GET",
contentType : "application/json",
url: "${ctx}/MonitorOperation/FlowMonitor/clientCompatibility",
async: false,
success: function(data){
console.log("客户端兼容性实时",data);
var tbody=$('<tbody></tbody>');
data.forEach(function(t) {
var tr = $('<tr></tr>');
tr.append('<td>'+t[0]+'</td>'+'<td>'+t[1]+'</td>'+'<td>'+t[2]+'</td>'+'<td>'+t[3]+'</td>');
tbody.append(tr);
});
$('#browserInformationTable tbody').replaceWith(tbody);
}
});
}
function clientCompatibilityMonth() {
$.ajax({
type : "GET",
contentType : "application/json",
url: "${ctx}/MonitorOperation/FlowMonitor/clientCompatibilityMonth",
async: false,
success: function(data){
console.log("客户端兼容性当月",data);
var tbody=$('<tbody></tbody>');
data.forEach(function(t) {
var tr = $('<tr></tr>');
tr.append('<td>'+t[0]+'</td>'+'<td>'+t[1]+'</td>'+'<td>'+t[2]+'</td>'+'<td>'+t[3]+'</td>');
tbody.append(tr);
});
$('#browserInformationTable tbody').replaceWith(tbody);
}
});
}
function httpInformation() {
$.ajax({
type : "GET",
contentType : "application/json",
url: "${ctx}/MonitorOperation/FlowMonitor/httpInformation",
async: false,
success: function(data){
console.log("HTTP状态码实时",data);
var serverIp = new Array();
var sotherCnt = new Array();
for(var i=0; i<data.length; i++){
serverIp.push(data[i][0]);
sotherCnt.push(data[i][1]);
}
httpInformationChart(serverIp,sotherCnt)
}
});
}
function httpInformationMonth() {
$.ajax({
type : "GET",
contentType : "application/json",
url: "${ctx}/MonitorOperation/FlowMonitor/httpInformationMonth",
async: false,
success: function(data){
console.log("HTTP状态码当月",data);
var serverIp = new Array();
var sotherCnt = new Array();
for(var i=0; i<data.length; i++){
serverIp.push(data[i][0]);
sotherCnt.push(data[i][1]);
}
httpInformationChart(serverIp,sotherCnt)
} }
}); });
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment