Authored by FengRuwei

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

... ... @@ -74,6 +74,22 @@
//加载左侧内容
$("#content").load(contextPath+page);
}
function localAlert(title,message){
var dialog = $("<div>").appendTo($("body"));
dialog.dialog({
title : title,
backdrop : "static",
content : message,
buttons : [{
text : "确定",
className : "btn-danger",
onclick : function() {
$(dialog).dialog("hide");
}
}]
});
}
</script>
</body>
</html>
\ No newline at end of file
... ...
... ... @@ -134,11 +134,15 @@
data: param,
dataType: 'json',
success: function (data) {
if (!data || data.code != 200) {
localAlert('删除失败',data.message);
}else{
$("#myModal").modal('hide');
$("#hostGroupTable").table("load");
}
},
error: function (data) {
layer.msg("系统异常", {icon: 2});
localAlert('系统异常',data.message);
}
});
}
... ... @@ -171,19 +175,7 @@
dataType : "json",
success : function(data) {
if (!data || data.code != 200) {
var dialog = $("<div>").appendTo($("body"));
dialog.dialog({
title : "删除失败",
backdrop : "static",
content : '系统异常',
buttons : [{
text : "确定",
className : "btn-danger",
onclick : function() {
$(dialog).dialog("hide");
}
}]
});
localAlert('删除失败',data.message);
}
$("#hostGroupTable").table("load");
}
... ...