Authored by fanzelei

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

... ... @@ -570,7 +570,7 @@
<input type="hidden" id="tx_type_action"/>
<input type="hidden" id="tx_type_id"/>
<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
<button type="button" id="btn4type" class="btn btn-primary">确认</button>
<button type="button" id="btn4type" class="btn btn-primary" onclick="btn_click()">确认</button>
</div>
</div>
</div>
... ...
... ... @@ -136,16 +136,20 @@
if (obj.nodeTo.indexOf("172") == 0) {
awsAcount = awsAcount + 1;
if (obj.isFailed == 1) {
awsIp += '<button title="' + obj.paramMonitor + '" onclick="displatyTetail(\'' + obj.nodeTo + '\')" class="btn_java_api btn btn-lg btn-default btn-primary" style="margin-top:5px;margin-left:5px;width: 160px;font-size: 12px;">' + obj.nodeTo + '</button>';
awsIp += '<button onclick="displatyTetail(\'' + obj.nodeTo + '\')" class="btn_java_api btn btn-lg btn-default btn-primary" style="margin-top:2px;margin-left:5px;width: 165px;text-align:left;font-size: 12px;">' + obj.nodeTo;
var cccc=obj.paramMonitor.split(";");
awsIp=awsIp+"<br/>"+cccc[1]+"<br/>"+cccc[2]+'</button>';
} else if (obj.isFailed == 0) {
awsIp += '<button class="btn_java_api btn btn-lg btn-default btn-danger" style="margin-top:5px;margin-left:5px;width: 160px;font-size: 12px;">' + obj.nodeTo + '</button>';
awsIp += '<button class="btn_java_api btn btn-lg btn-default btn-danger" style="margin-top:5px;margin-left:5px;width: 165px;text-align:left;font-size: 12px;">' + obj.nodeTo + '</button>';
}
} else if (obj.nodeTo.indexOf("10") == 0) {
qcloudAcount = qcloudAcount + 1;
if (obj.isFailed == 1) {
qcoloudIp += '<button title="' + obj.paramMonitor + '" onclick="displatyTetail(\'' + obj.nodeTo + '\')" class="btn_java_api btn btn-lg btn-default btn-primary" style="margin-top:5px;margin-left:5px;width: 160px;font-size: 12px;">' + obj.nodeTo + '</button>';
qcoloudIp += '<button onclick="displatyTetail(\'' + obj.nodeTo + '\')" class="btn_java_api btn btn-lg btn-default btn-primary" style="margin-top:2px;margin-left:5px;width: 165px;text-align:left;font-size: 12px;">' + obj.nodeTo;
var cccc=obj.paramMonitor.split(";");
qcoloudIp=qcoloudIp+"<br/>"+cccc[1]+"<br/>"+cccc[2]+'</button>';
} else if (obj.isFailed == 0) {
qcoloudIp += '<button class="btn_java_api btn btn-lg btn-default btn-danger" style="margin-top:5px;margin-left:5px;width: 160px;font-size: 12px;">' + obj.nodeTo + '</button>';
qcoloudIp += '<button class="btn_java_api btn btn-lg btn-default btn-danger" style="margin-top:5px;margin-left:5px;width: 165px;text-align:left;font-size: 12px;">' + obj.nodeTo + '</button>';
}
}
return true;
... ... @@ -165,7 +169,7 @@
'</div>' +
'<hr>' +
'<div class="clearfix mt15">' +
'<div style="width:350px; height: 130px;float: left; border: 1px solid white;word-break:break-all;">' +
'<div style="width:360px; height: 180px;float: left; border: 1px solid white;word-break:break-all;">' +
'<h4 class="modal-title" style="text-align: center;color: white;">AWS</h4>';
if (awsIp == "") {
contentHtml += "无";
... ... @@ -173,7 +177,7 @@
contentHtml += awsIp;
}
contentHtml += '</div>' +
'<div style="width:350px; height: 130px;float: right; border: 1px solid white;word-break:break-all;">' +
'<div style="width:360px; height: 180px;float: right; border: 1px solid white;word-break:break-all;">' +
'<h4 class="modal-title" style="text-align: center;color: white;" >QCloud</h4>';
if (qcoloudIp == "") {
contentHtml += "无";
... ...
... ... @@ -208,7 +208,7 @@ var doAddType = function () {
return;
}
var isleaf = $('#cb_new_type_isleaf').prop("checked") == true ? 1 : 0;
$.get("type/add", {"pid": pid, "name": name, "isleaf": isleaf},
$.get(contextPath+"/type/add", {"pid": pid, "name": name, "isleaf": isleaf},
function (data, state) {
var repjson = JSON.parse(data);
if (state == "success" && repjson.code == 200) {
... ... @@ -239,7 +239,7 @@ var doUpdateType = function () {
return;
}
console.log("update " + id + " name " + name);
$.get("type/update", {"id": id, "name": name},
$.get(contextPath+"/type/update", {"id": id, "name": name},
function (data, state) {
var repjson = JSON.parse(data);
if (state == "success" && repjson.code == 200) {
... ... @@ -256,7 +256,7 @@ var doUpdateType = function () {
var doDelType = function () {
var id = $('#tx_type_id').val();
console.log("delete " + id);
$.get("type/del", {"id": id},
$.get(contextPath+"/type/del", {"id": id},
function (data, state) {
var repjson = JSON.parse(data);
if (state == "success" && repjson.code == 200) {
... ... @@ -303,7 +303,7 @@ var checkIsLeaf = function (nodeid) {
}
$("#btn4type").click(function () {
function btn_click() {
console.log("frw");
if ($("#tx_type_action").val() == "add") {
doAddType();
... ... @@ -314,14 +314,14 @@ $("#btn4type").click(function () {
doDelType();
}
});
};
var refreshTypeTree = function () {
var basepath = getUrlBasePath();
console.log("refresh tree");
treeData = []; //重置
$.get(basepath+"/type/all", function (data, state) {
$.get(contextPath+"/type/all", function (data, state) {
console.log(state)
var jsonData = JSON.parse(data);
$.each(jsonData.data, function (n, val) {
... ...