...
|
...
|
@@ -59,7 +59,7 @@ |
|
|
</div>
|
|
|
<div class="input-group" style="margin-left: 15px">
|
|
|
<span class="input-group-addon">IP:</span>
|
|
|
<select id="iPName" name="iPName" class="form-control" style="width: 200px">
|
|
|
<select id="iPName" name="iPName" class="form-control" style="width: 200px" onchange="getIpOnchange()">
|
|
|
</select>
|
|
|
</div>
|
|
|
</div>
|
...
|
...
|
@@ -116,6 +116,18 @@ |
|
|
getJavaAppType(cloudType);
|
|
|
}
|
|
|
|
|
|
//ip类型选择事件
|
|
|
function getIpOnchange() {
|
|
|
$("#infoTable").table("load", {
|
|
|
startTime : startTime,
|
|
|
endTime : endTime,
|
|
|
serviceType : serviceType,
|
|
|
serviceName : serviceName,
|
|
|
ip:$("#iPName").val(),
|
|
|
cloudType : $("#cloudType").val()
|
|
|
});
|
|
|
}
|
|
|
|
|
|
var getJavaAppType = function (cloudType) {
|
|
|
$.ajax({
|
|
|
url: contextPath + "/javaMonitor/queryIpList",
|
...
|
...
|
@@ -142,7 +154,13 @@ |
|
|
|
|
|
$("#infoTable").table({
|
|
|
columnAutoWidth: false,
|
|
|
url: contextPath + "/javaMonitor/query",
|
|
|
url: contextPath + "/javaMonitor/queryByServiceTypeAndIP",
|
|
|
queryParams : {
|
|
|
startTime : startTime,
|
|
|
endTime : endTime,
|
|
|
serviceType : serviceType,
|
|
|
serviceName : serviceName
|
|
|
},
|
|
|
striped: true,
|
|
|
title: "java服务监控信息列表",
|
|
|
dataType: "json",
|
...
|
...
|
@@ -153,6 +171,17 @@ |
|
|
},
|
|
|
onLoadSuccess: function (data) {
|
|
|
if(data != null){
|
|
|
//同步加载根据平均耗时排序的tab页列表
|
|
|
var costObj = new Array();
|
|
|
for(var j = 0;j<data.length;j++){
|
|
|
costObj.push(data[j]);
|
|
|
}
|
|
|
//按平均耗时从大到小排序ss
|
|
|
costObj.sort(function(a,b){
|
|
|
return b.avgCost-a.avgCost;
|
|
|
});
|
|
|
|
|
|
|
|
|
//同步加载根据异常次数排序的tab页列表
|
|
|
var errorObj = new Array();
|
|
|
for (var i = 0; i < data.length; i++) {
|
...
|
...
|
@@ -163,36 +192,38 @@ |
|
|
return b.errorCount - a.errorCount;
|
|
|
});
|
|
|
$("#infoTable1").table("loadLoaclData", errorObj);
|
|
|
|
|
|
return costObj;
|
|
|
}
|
|
|
},
|
|
|
columns: [{
|
|
|
title: "接口名",
|
|
|
field: "ip",
|
|
|
field: "apiName",
|
|
|
width: "10%",
|
|
|
sortable: true,
|
|
|
formatter: function (value, rowData, rowIndex) {
|
|
|
var div = $("<div>");
|
|
|
var editBtn = $("<button>").addClass("btn btn-xs btn-success").html(rowData.ip).appendTo(div);
|
|
|
editBtn.click(function () {
|
|
|
var dialog = $("<div>").appendTo($("body"));
|
|
|
dialog.dialog({
|
|
|
backdrop: "static",
|
|
|
title: "API详情",
|
|
|
href: contextPath + "jsp/javaMonitor/javaIpInfoList.jsp",
|
|
|
height: "80%",
|
|
|
width: "60%",
|
|
|
buttons: [{
|
|
|
text: "关闭",
|
|
|
className: "btn-info",
|
|
|
onclick: function () {
|
|
|
$(dialog).dialog("hide");
|
|
|
}
|
|
|
}]
|
|
|
});
|
|
|
|
|
|
});
|
|
|
return div;
|
|
|
}
|
|
|
sortable: true
|
|
|
// formatter: function (value, rowData, rowIndex) {
|
|
|
// var div = $("<div>");
|
|
|
// var editBtn = $("<button>").addClass("btn btn-xs btn-success").html(rowData.ip).appendTo(div);
|
|
|
// editBtn.click(function () {
|
|
|
// var dialog = $("<div>").appendTo($("body"));
|
|
|
// dialog.dialog({
|
|
|
// backdrop: "static",
|
|
|
// title: "API详情",
|
|
|
// href: contextPath + "jsp/javaMonitor/javaIpInfoList.jsp",
|
|
|
// height: "80%",
|
|
|
// width: "60%",
|
|
|
// buttons: [{
|
|
|
// text: "关闭",
|
|
|
// className: "btn-info",
|
|
|
// onclick: function () {
|
|
|
// $(dialog).dialog("hide");
|
|
|
// }
|
|
|
// }]
|
|
|
// });
|
|
|
//
|
|
|
// });
|
|
|
// return div;
|
|
|
// }
|
|
|
}, {
|
|
|
title: "总请求次数",
|
|
|
field: "totalCount",
|
...
|
...
|
@@ -282,14 +313,15 @@ |
|
|
sortable: true, //是否启用排序
|
|
|
sortOrder: "desc",
|
|
|
columns: [{
|
|
|
title: "IP",
|
|
|
field: "ip",
|
|
|
title: "接口名",
|
|
|
field: "apiName",
|
|
|
width: "10%",
|
|
|
sortable: true
|
|
|
}, {
|
|
|
title: "网络归属",
|
|
|
field: "type",
|
|
|
width: "10%"
|
|
|
title: "总请求次数",
|
|
|
field: "totalCount",
|
|
|
width: "10%",
|
|
|
sortable: true
|
|
|
}, {
|
|
|
title: "请求异常次数",
|
|
|
field: "errorCount",
|
...
|
...
|
|