Authored by FengRuwei

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

... ... @@ -69,11 +69,27 @@
<script type="text/javascript">
function clickMenuToPage(page){
var g = page.replace(/\//g,"").replace(".","");
$("#"+g).addClass("active").siblings().removeClass("active");
//加载左侧内容
$("#content").load(contextPath+page);
}
var g = page.replace(/\//g,"").replace(".","");
$("#"+g).addClass("active").siblings().removeClass("active");
//加载左侧内容
$("#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) {
$("#myModal").modal('hide');
$("#hostGroupTable").table("load");
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");
}
... ...