...
|
...
|
@@ -289,15 +289,40 @@ function nginxInitSwitch(cloudName) { |
|
|
data: param ,
|
|
|
success: function (data) {
|
|
|
console.log(data);
|
|
|
if(data.code != 200){
|
|
|
if(data==null||data.code != 200){
|
|
|
layer.close(layerMirror);
|
|
|
alert(data.message);
|
|
|
alert("lb switch error"+data.message);
|
|
|
}else{
|
|
|
window.location.href = contextPath + "topoSwitch/toTopoSwitch";
|
|
|
var count = 0;
|
|
|
var intervalIndex = setInterval(function() {
|
|
|
$.ajax({
|
|
|
url: contextPath+'topoSwitch/getNgixnStatus',
|
|
|
type: 'POST',
|
|
|
data:{},
|
|
|
dataType: 'json',
|
|
|
timeout : 0,
|
|
|
success: function (queryData) {
|
|
|
count++;
|
|
|
if (count>5||(queryData && queryData.code == 200)) {
|
|
|
clearInterval(intervalIndex);
|
|
|
window.location.href = contextPath + "topoSwitch/toTopoSwitch";
|
|
|
}
|
|
|
},
|
|
|
error: function (e) {
|
|
|
count++;
|
|
|
if(count>8){
|
|
|
clearInterval(intervalIndex);
|
|
|
window.location.href = contextPath + "topoSwitch/toTopoSwitch";
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
}, 10000);
|
|
|
}
|
|
|
},
|
|
|
error: function (e) {
|
|
|
alert("系统错误");
|
|
|
console.log(e);
|
|
|
layer.close(layerMirror);
|
|
|
alert("切换lb请求返回异常");
|
|
|
}
|
|
|
});
|
|
|
dialog.dialog("hide");
|
...
|
...
|
|