...
|
...
|
@@ -175,8 +175,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");
|
...
|
...
|
@@ -260,8 +260,8 @@ |
|
|
}else{
|
|
|
switchWait.modal('hide');
|
|
|
|
|
|
//重启java
|
|
|
javaRestart(commond);
|
|
|
switchWait = toWait("正在切换(源DC),请耐心等候...");
|
|
|
doExeNext(array_next, 0, commond);
|
|
|
}
|
|
|
},
|
|
|
error: function () {
|
...
|
...
|
@@ -273,47 +273,6 @@ |
|
|
});
|
|
|
}
|
|
|
|
|
|
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");
|
...
|
...
|
@@ -337,9 +296,6 @@ |
|
|
doExeNext(array_next,i,commond);
|
|
|
}else{
|
|
|
switchWait.modal('hide');
|
|
|
|
|
|
//重启java
|
|
|
javaRestartNext(commond);
|
|
|
}
|
|
|
},
|
|
|
error: function () {
|
...
|
...
|
@@ -351,44 +307,6 @@ |
|
|
});
|
|
|
}
|
|
|
|
|
|
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("正在检查状态,请耐心等候...");
|
...
|
...
|
|