Authored by lingmin

update

... ... @@ -76,7 +76,7 @@
onchange="getOnchange(1)">
<option value="1">1 minute</option>
<option value="5">5 minutes</option>
<option value="10">10 minutes</option>
<option value="120">10 minutes</option>
</select>
</div>
<div class="input-group" style="margin-left: 10px">
... ... @@ -346,7 +346,7 @@
var editBtn = $("<button>").addClass("btn btn-xs btn-success").css("height", "35px").html(rowData.apiName).appendTo(div);
editBtn.click(function () {
var dialog = $("<div>").appendTo($("body"));
var url = contextPath + "/javaApiMonitor/toJavaIpInfoList?serviceName=" + rowData.serviceName + "&apiName=" + rowData.apiName + "&cloudType=" + $("#cloudType").val()
var url = contextPath + "/javaApiMonitor/toJavaIpInfoList?serviceName=" + rowData.serviceName +"&serviceType="+$("#searchApiName").val()+ "&apiName=" + rowData.apiName + "&cloudType=" + $("#cloudType").val()
+ "&startTime1=" + start[0] + "&startTime2=" + start[1] + "&endTime1=" + end[0] + "&endTime2=" + end[1];
dialog.dialog({
backdrop: "static",
... ...
... ... @@ -12,6 +12,7 @@
String endTime2 = request.getParameter("endTime2");
String apiName = request.getParameter("apiName");
String cloudType = request.getParameter("cloudType");
String serviceType = request.getParameter("serviceType");
%>
<body>
<form class="form-horizontal" id="javaMonitorForm" name="javaMonitorForm" style="width: 800px;margin-left: 15px">
... ... @@ -73,6 +74,8 @@
var endTime = "<%=endTime1%>"+" "+"<%=endTime2%>";
var apiName = "<%=apiName%>";
var cloudType = "<%=cloudType%>";
var serviceType = "<%=serviceType%>";
$("#javaMonitorForm #serviceName").val(serviceName);
$("#javaMonitorForm #apiName").val(apiName);
... ... @@ -148,6 +151,10 @@
field: "ip",
width: "10%"
},{
title: "网络归属",
field: "cloudName",
width: "10%"
}, {
title: "压力(ms)",
field: "totalCost",
width: "10%"
... ... @@ -167,27 +174,55 @@
div.append("<br>");
var editBtn = $("<input type='button'>").val("详情").addClass("btn btn-xs btn-success").appendTo(div);
editBtn.click(function () {
var content = "";
if (rowData.errorInfo != null) {
for (var i = 0; i < rowData.errorInfo.length; i++) {
content = content + "<pre>"+ rowData.errorInfo[i]+"</pre>";
}
}
if(content != ""){
var dialog = $("<div>").appendTo($("body"));
dialog.dialog({
backdrop : "static",
title : "异常详情",
content : content,
height : "700px",
width : "1100px",
buttons : [{
text : "关闭",
className : "btn-danger",
onclick : function() {
$(dialog).dialog("hide");
// var content = "";
// if (rowData.errorInfo != null) {
// for (var i = 0; i < rowData.errorInfo.length; i++) {
// content = content + "<pre>"+ rowData.errorInfo[i]+"</pre>";
// }
// }
if (rowData.errorCount > 0) {
var content = "";
$.ajax({
url: contextPath + "/javaMonitor/queryErrorInfoListByApiName",
type: 'post',
data: {
serviceType: serviceType,
serviceName: serviceName,
apiName: apiName,
startTime: startTime,
endTime:endTime,
cloudType: rowData.cloudType,
ip: rowData.ip
},
dataType: 'json',
success: function (data) {
if (!data || data.code != 200) {
$.toaster('获取详情数据失败', '警告', 'warning');
return;
}
}]
if (data.data != null) {
for (var i = 0; i < data.data.length; i++) {
content = content + "<pre>"+ data.data[i]+"</pre>";
}
if (content != "") {
var dialog = $("<div>").appendTo($("body"));
dialog.dialog({
backdrop: "static",
title: "异常详情",
content: content,
height: "700px",
width: "1100px",
buttons: [{
text: "关闭",
className: "btn-danger",
onclick: function () {
$(dialog).dialog("hide");
}
}]
});
}
}
}
});
}
});
... ... @@ -204,36 +239,61 @@
div.append("<br>");
var editBtn = $("<input type='button'>").val("详情").addClass("btn btn-xs btn-success").appendTo(div);
editBtn.click(function () {
var contentDiv = $("<div>");
var content = "";
if(rowData.timeoutInfo != null){
for(var i = 0;i<rowData.timeoutInfo.length;i++){
// var temp = new Array();
// temp = rowData.timeoutInfo[i].split("+---");
// if(temp != null && temp.length>0){
// for(var j = 0;j<temp.length;j++){
// content= content + temp[j] + "<br>";
// }
// }
content = content + "<pre>"+ rowData.timeoutInfo[i]+"</pre>";
}
}
if(content != ""){
var dialog = $("<div>").appendTo($("body"));
dialog.dialog({
backdrop : "static",
title : "超时详情",
content : content,
height : "700px",
width : "1100px",
buttons : [{
text : "关闭",
className : "btn-danger",
onclick : function() {
$(dialog).dialog("hide");
// if(rowData.timeoutInfo != null){
// for(var i = 0;i<rowData.timeoutInfo.length;i++){
//// var temp = new Array();
//// temp = rowData.timeoutInfo[i].split("+---");
//// if(temp != null && temp.length>0){
//// for(var j = 0;j<temp.length;j++){
//// content= content + temp[j] + "<br>";
//// }
//// }
// content = content + "<pre>"+ rowData.timeoutInfo[i]+"</pre>";
// }
// }
if (rowData.timeoutCount > 0) {
var content = "";
$.ajax({
url: contextPath + "/javaMonitor/queryTimeoutInfoListByApiName",
type: 'post',
data: {
serviceType: serviceType,
serviceName: serviceName,
apiName: apiName,
startTime: startTime,
endTime:endTime,
cloudType: rowData.cloudType,
ip: rowData.ip
},
dataType: 'json',
success: function (data) {
if (!data || data.code != 200) {
$.toaster('获取详情数据失败', '警告', 'warning');
return;
}
}]
if (data.data != null) {
for (var i = 0; i < data.data.length; i++) {
content = content + "<pre>"+ data.data[i]+"</pre>";
}
if (content != "") {
var dialog = $("<div>").appendTo($("body"));
dialog.dialog({
backdrop: "static",
title: "超时详情",
content: content,
height: "700px",
width: "1100px",
buttons: [{
text: "关闭",
className: "btn-danger",
onclick: function () {
$(dialog).dialog("hide");
}
}]
});
}
}
}
});
}
});
... ... @@ -254,6 +314,10 @@
width: "10%",
sortable: true
},{
title: "网络归属",
field: "cloudName",
width: "10%"
}, {
title: "压力(ms)",
field: "totalCost",
width: "10%"
... ... @@ -273,27 +337,49 @@
div.append("<br>");
var editBtn = $("<input type='button'>").val("详情").addClass("btn btn-xs btn-success").appendTo(div);
editBtn.click(function () {
var content = "";
if (rowData.errorInfo != null) {
for (var i = 0; i < rowData.errorInfo.length; i++) {
content = content + "<pre>"+ rowData.errorInfo[i]+"</pre>";
}
}
if(content != ""){
var dialog = $("<div>").appendTo($("body"));
dialog.dialog({
backdrop : "static",
title : "异常详情",
content : content,
height : "700px",
width : "1100px",
buttons : [{
text : "关闭",
className : "btn-danger",
onclick : function() {
$(dialog).dialog("hide");
if (rowData.errorCount > 0) {
var content = "";
$.ajax({
url: contextPath + "/javaMonitor/queryErrorInfoListByApiName",
type: 'post',
data: {
serviceType: serviceType,
serviceName: serviceName,
apiName: apiName,
startTime: startTime,
endTime:endTime,
cloudType: rowData.cloudType,
ip: rowData.ip
},
dataType: 'json',
success: function (data) {
if (!data || data.code != 200) {
$.toaster('获取详情数据失败', '警告', 'warning');
return;
}
if (data.data != null) {
for (var i = 0; i < data.data.length; i++) {
content = content + "<pre>"+ data.data[i]+"</pre>";
}
if (content != "") {
var dialog = $("<div>").appendTo($("body"));
dialog.dialog({
backdrop: "static",
title: "异常详情",
content: content,
height: "700px",
width: "1100px",
buttons: [{
text: "关闭",
className: "btn-danger",
onclick: function () {
$(dialog).dialog("hide");
}
}]
});
}
}
}]
}
});
}
});
... ... @@ -310,27 +396,49 @@
div.append("<br>");
var editBtn = $("<input type='button'>").val("详情").addClass("btn btn-xs btn-success").appendTo(div);
editBtn.click(function () {
var content = "";
if(rowData.timeoutInfo != null){
for(var i = 0;i<rowData.timeoutInfo.length;i++){
content = content + "<pre>"+ rowData.timeoutInfo[i]+"</pre>";
}
}
if(content != ""){
var dialog = $("<div>").appendTo($("body"));
dialog.dialog({
backdrop : "static",
title : "超时详情",
content : content,
height : "700px",
width : "1100px",
buttons : [{
text : "关闭",
className : "btn-danger",
onclick : function() {
$(dialog).dialog("hide");
if (rowData.timeoutCount > 0) {
var content = "";
$.ajax({
url: contextPath + "/javaMonitor/queryTimeoutInfoListByApiName",
type: 'post',
data: {
serviceType: serviceType,
serviceName: serviceName,
apiName: apiName,
startTime: startTime,
endTime:endTime,
cloudType: rowData.cloudType,
ip: rowData.ip
},
dataType: 'json',
success: function (data) {
if (!data || data.code != 200) {
$.toaster('获取详情数据失败', '警告', 'warning');
return;
}
}]
if (data.data != null) {
for (var i = 0; i < data.data.length; i++) {
content = content + "<pre>"+ data.data[i]+"</pre>";
}
if (content != "") {
var dialog = $("<div>").appendTo($("body"));
dialog.dialog({
backdrop: "static",
title: "超时详情",
content: content,
height: "700px",
width: "1100px",
buttons: [{
text: "关闭",
className: "btn-danger",
onclick: function () {
$(dialog).dialog("hide");
}
}]
});
}
}
}
});
}
});
... ... @@ -351,6 +459,10 @@
width: "10%",
sortable: true
},{
title: "网络归属",
field: "cloudName",
width: "10%"
}, {
title: "压力(ms)",
field: "totalCost",
width: "10%"
... ... @@ -370,27 +482,49 @@
div.append("<br>");
var editBtn = $("<input type='button'>").val("详情").addClass("btn btn-xs btn-success").appendTo(div);
editBtn.click(function () {
var content = "";
if (rowData.errorInfo != null) {
for (var i = 0; i < rowData.errorInfo.length; i++) {
content = content + "<pre>"+ rowData.errorInfo[i]+"</pre>";
}
}
if(content != ""){
var dialog = $("<div>").appendTo($("body"));
dialog.dialog({
backdrop : "static",
title : "异常详情",
content : content,
height : "700px",
width : "1100px",
buttons : [{
text : "关闭",
className : "btn-danger",
onclick : function() {
$(dialog).dialog("hide");
if (rowData.errorCount > 0) {
var content = "";
$.ajax({
url: contextPath + "/javaMonitor/queryErrorInfoListByApiName",
type: 'post',
data: {
serviceType: serviceType,
serviceName: serviceName,
apiName: apiName,
startTime: startTime,
endTime:endTime,
cloudType: rowData.cloudType,
ip: rowData.ip
},
dataType: 'json',
success: function (data) {
if (!data || data.code != 200) {
$.toaster('获取详情数据失败', '警告', 'warning');
return;
}
}]
if (data.data != null) {
for (var i = 0; i < data.data.length; i++) {
content = content + "<pre>"+ data.data[i]+"</pre>";
}
if (content != "") {
var dialog = $("<div>").appendTo($("body"));
dialog.dialog({
backdrop: "static",
title: "异常详情",
content: content,
height: "700px",
width: "1100px",
buttons: [{
text: "关闭",
className: "btn-danger",
onclick: function () {
$(dialog).dialog("hide");
}
}]
});
}
}
}
});
}
});
... ... @@ -407,27 +541,49 @@
div.append("<br>");
var editBtn = $("<input type='button'>").val("详情").addClass("btn btn-xs btn-success").appendTo(div);
editBtn.click(function () {
var content = "";
if(rowData.timeoutInfo != null){
for(var i = 0;i<rowData.timeoutInfo.length;i++){
content = content + "<pre>"+ rowData.timeoutInfo[i]+"</pre>";
}
}
if(content != ""){
var dialog = $("<div>").appendTo($("body"));
dialog.dialog({
backdrop : "static",
title : "超时详情",
content : content,
height : "700px",
width : "1100px",
buttons : [{
text : "关闭",
className : "btn-danger",
onclick : function() {
$(dialog).dialog("hide");
if (rowData.timeoutCount > 0) {
var content = "";
$.ajax({
url: contextPath + "/javaMonitor/queryTimeoutInfoListByApiName",
type: 'post',
data: {
serviceType: serviceType,
serviceName: serviceName,
apiName: apiName,
startTime: startTime,
endTime:endTime,
cloudType: rowData.cloudType,
ip: rowData.ip
},
dataType: 'json',
success: function (data) {
if (!data || data.code != 200) {
$.toaster('获取详情数据失败', '警告', 'warning');
return;
}
if (data.data != null) {
for (var i = 0; i < data.data.length; i++) {
content = content + "<pre>"+ data.data[i]+"</pre>";
}
if (content != "") {
var dialog = $("<div>").appendTo($("body"));
dialog.dialog({
backdrop: "static",
title: "超时详情",
content: content,
height: "700px",
width: "1100px",
buttons: [{
text: "关闭",
className: "btn-danger",
onclick: function () {
$(dialog).dialog("hide");
}
}]
});
}
}
}]
}
});
}
});
... ... @@ -448,6 +604,10 @@
width: "10%",
sortable: true
},{
title: "网络归属",
field: "cloudName",
width: "10%"
}, {
title: "压力(ms)",
field: "totalCost",
width: "10%"
... ... @@ -467,27 +627,49 @@
div.append("<br>");
var editBtn = $("<input type='button'>").val("详情").addClass("btn btn-xs btn-success").appendTo(div);
editBtn.click(function () {
var content = "";
if (rowData.errorInfo != null) {
for (var i = 0; i < rowData.errorInfo.length; i++) {
content = content + "<pre>"+ rowData.errorInfo[i]+"</pre>";
}
}
if(content != ""){
var dialog = $("<div>").appendTo($("body"));
dialog.dialog({
backdrop : "static",
title : "异常详情",
content : content,
height : "700px",
width : "1100px",
buttons : [{
text : "关闭",
className : "btn-danger",
onclick : function() {
$(dialog).dialog("hide");
if (rowData.errorCount > 0) {
var content = "";
$.ajax({
url: contextPath + "/javaMonitor/queryErrorInfoListByApiName",
type: 'post',
data: {
serviceType: serviceType,
serviceName: serviceName,
apiName: apiName,
startTime: startTime,
endTime:endTime,
cloudType: rowData.cloudType,
ip: rowData.ip
},
dataType: 'json',
success: function (data) {
if (!data || data.code != 200) {
$.toaster('获取详情数据失败', '警告', 'warning');
return;
}
}]
if (data.data != null) {
for (var i = 0; i < data.data.length; i++) {
content = content + "<pre>"+ data.data[i]+"</pre>";
}
if (content != "") {
var dialog = $("<div>").appendTo($("body"));
dialog.dialog({
backdrop: "static",
title: "异常详情",
content: content,
height: "700px",
width: "1100px",
buttons: [{
text: "关闭",
className: "btn-danger",
onclick: function () {
$(dialog).dialog("hide");
}
}]
});
}
}
}
});
}
});
... ... @@ -504,27 +686,49 @@
div.append("<br>");
var editBtn = $("<input type='button'>").val("详情").addClass("btn btn-xs btn-success").appendTo(div);
editBtn.click(function () {
var content = "";
if(rowData.timeoutInfo != null){
for(var i = 0;i<rowData.timeoutInfo.length;i++){
content = content + "<pre>"+ rowData.timeoutInfo[i]+"</pre>";
}
}
if(content != ""){
var dialog = $("<div>").appendTo($("body"));
dialog.dialog({
backdrop : "static",
title : "超时详情",
content : content,
height : "700px",
width : "1100px",
buttons : [{
text : "关闭",
className : "btn-danger",
onclick : function() {
$(dialog).dialog("hide");
if (rowData.timeoutCount > 0) {
var content = "";
$.ajax({
url: contextPath + "/javaMonitor/queryTimeoutInfoListByApiName",
type: 'post',
data: {
serviceType: serviceType,
serviceName: serviceName,
apiName: apiName,
startTime: startTime,
endTime:endTime,
cloudType: rowData.cloudType,
ip: rowData.ip
},
dataType: 'json',
success: function (data) {
if (!data || data.code != 200) {
$.toaster('获取详情数据失败', '警告', 'warning');
return;
}
if (data.data != null) {
for (var i = 0; i < data.data.length; i++) {
content = content + "<pre>"+ data.data[i]+"</pre>";
}
if (content != "") {
var dialog = $("<div>").appendTo($("body"));
dialog.dialog({
backdrop: "static",
title: "超时详情",
content: content,
height: "700px",
width: "1100px",
buttons: [{
text: "关闭",
className: "btn-danger",
onclick: function () {
$(dialog).dialog("hide");
}
}]
});
}
}
}]
}
});
}
});
... ...