Authored by simba

Merge branch 'master' of http://git.yoho.cn/ops/monitor-ui

... ... @@ -55,13 +55,13 @@
var initDashBoard = function (data) {
var div_dash = $(".api_info_container");
$.each(data, function (idx, val) {
var api_info_item = $('<div class="api_info_item col-xs-4 ">');
var api_info_item = $('<div class="api_info_item col-xs-3 ">');
var api_info_item_panel = $(' <div class="panel panel-default">');
var api_info_item_panel_title = $('<div class="item_java_api_title panel-heading">' + val.typeName + '<span style="font-size: medium;float: right;padding-top: 15px"><span id="span_time_' + val.typeId + '"></span></span></div>');
var api_info_item_panel_body = $('<div class="panel-body">');
api_info_item_panel_body.append('<button class="btn_java_api btn btn-lg btn-default" id="btn_1_' + val.typeId + '">AWS &nbsp;<span class="badge"></span></button>');
api_info_item_panel_body.append('<button class="btn_java_api btn btn-lg btn-default" id="btn_2_' + val.typeId + '">QCloud &nbsp;<span class="badge"></span></button>');
api_info_item_panel_body.append('<button class="btn_java_api btn btn-lg btn-default" id="btn_3_' + val.typeId + '">其他 &nbsp;<span class="badge"></span></button>');
// api_info_item_panel_body.append('<button class="btn_java_api btn btn-lg btn-default" id="btn_3_' + val.typeId + '">其他 &nbsp;<span class="badge"></span></button>');
// api_info_item_panel_body.append('<h5 >更新时间:<span id="span_time_'+val.typeId+'"></span></h5>');
api_info_item_panel.append(api_info_item_panel_title)
.append(api_info_item_panel_body);
... ... @@ -112,6 +112,8 @@
$.each(data.data, function (idx, val) {
console.log($("#btn_" + val.cloudType + "_" + val.serviceType));
if(val.cloudType!=1&&val.cloudType!=2)//目前只有腾讯aws
return;
var btn = $("#btn_" + val.cloudType + "_" + val.serviceType);
if (val.updateTime != undefined && val.updateTime != "") {
... ...
... ... @@ -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');
}
... ...