Authored by FengRuwei

状态初始为unkown

... ... @@ -149,12 +149,12 @@
$.each(apps, function (idx, val) {
var span;
if (toggle == 1) {
span = $("<button class='btn btn-success btn-xs tag_javaapp has-popover' >").attr("id", "span_" + serviceId + "_" + val.moId).html(val.moHostIp);
span = $("<button class='btn btn-default btn-xs tag_javaapp has-popover' >").attr("id", "span_" + serviceId + "_" + val.moId).html(val.moHostIp);
span.attr("data-toggle", "popover");
span.attr("data-placement", "bottom");
span.attr("data-html", "true");
// span.attr("title", "message");
// span.attr("data-content", "message");
span.attr("data-content", "unkown");
} else {
span = $("<button class='btn btn-inverse btn-xs tag_javaapp' >").attr("id", "span_no_" + serviceId + "_" + val.moId).html(val.moHostIp);
}
... ... @@ -173,16 +173,16 @@
var content = "start: " + statusObj.startTime + " ";
content += "end: " + statusObj.endTime + " ";
content += "cost: " + statusObj.costTime + "ms<br>";
$("#" + id).removeClass('btn-default');
if (statusObj.status == 0) {
content += "exception: " + statusObj.exception;
if ($("#" + id).hasClass('btn-success')) {
if (!$("#" + id).hasClass('btn-danger')) {
$("#" + id).removeClass('btn-success');
$("#" + id).addClass('btn-danger');
}
}
else {
if ($("#" + id).hasClass('btn-danger')) {
if (!$("#" + id).hasClass('btn-success')) {
$("#" + id).removeClass('btn-danger');
$("#" + id).addClass('btn-success');
}
... ...