Authored by xuhui

去除切向aws按钮

... ... @@ -172,8 +172,8 @@
array.push("switch_redis");
array.push("switch_internel_dns");
array.push("switch_cobar");
//array.push("switch_lua");
//array.push("switch_dnspod");
array.push("switch_lua");
array.push("switch_dnspod");
array_next.push("switch_redis_next");
array_next.push("switch_internel_dns_next");
... ... @@ -257,8 +257,8 @@
}else{
switchWait.modal('hide');
switchWait = toWait("正在切换(源DC),请耐心等候...");
doExeNext(array_next, 0, commond);
//重启java
javaRestart(commond);
}
},
error: function () {
... ... @@ -270,6 +270,47 @@
});
}
function javaRestart(toCloud){
var wait = toWait("正在重启java(目标DC),请耐心等候...");
var commond;
if(toCloud="toAws"){
commond="aws";
}else{
commond="qcloud";
}
$("#java-btn").addClass("btn-warning");
$.ajax({
type: 'post',
url: contextPath + "/javaRestart/stopOrRestart",
data: {
'exe': 'restart',
'cloud': commond,
'project': 'all'
},
dataType: 'json',
success: function (data) {
$("#java-btn").removeClass("btn-warning");
$("#java-btn").addClass("btn-success");
var div = "<div class=\"alert alert-info alert-block\">";
div = div + "<h4 class=\"alert-heading\">java重启(目标DC):</h4>";
div = div + "成功</div>";
$("#detail-div").append(div);
wait.modal('hide');
switchWait = toWait("正在切换(源DC),请耐心等候...");
doExeNext(array_next, 0, toCloud);
},
error: function () {
var div = "<div>java重启(目标DC)请求异常</div>";
$("#detail-div").append(div);
wait.modal('hide');
}
});
}
function doExeNext(array_next, i,commond) {
var name = array_next[i];
$("#"+name+"-btn").addClass("btn-warning");
... ... @@ -293,6 +334,9 @@
doExeNext(array_next,i,commond);
}else{
switchWait.modal('hide');
//重启java
javaRestartNext(commond);
}
},
error: function () {
... ... @@ -304,6 +348,44 @@
});
}
function javaRestartNext(toCloud){
var wait = toWait("正在重启java(源DC),请耐心等候...");
var commond;
if(toCloud="toAws"){
commond="qcloud";
}else{
commond="aws";
}
$("#java_next-btn").addClass("btn-warning");
$.ajax({
type: 'post',
url: contextPath + "/javaRestart/stopOrRestart",
data: {
'exe': 'restart',
'cloud': commond,
'project': 'all'
},
dataType: 'json',
success: function (data) {
$("#java_next-btn").removeClass("btn-warning");
$("#java_next-btn").addClass("btn-success");
var div = "<div class=\"alert alert-info alert-block\">";
div = div + "<h4 class=\"alert-heading\">java重启(源DC):</h4>";
div = div + "成功</div>";
$("#detail-div").append(div);
wait.modal('hide');
},
error: function () {
var div = "<div>java重启(源DC)请求异常</div>";
$("#detail-div").append(div);
wait.modal('hide');
}
});
}
var statusWait;
function checkStatus(){
statusWait = toWait("正在检查状态,请耐心等候...");
... ...