...
|
...
|
@@ -289,40 +289,15 @@ function nginxInitSwitch(cloudName) { |
|
|
data: param ,
|
|
|
success: function (data) {
|
|
|
console.log(data);
|
|
|
if(data==null||data.code != 200){
|
|
|
if(data.code != 200){
|
|
|
layer.close(layerMirror);
|
|
|
alert("lb switch error"+data.message);
|
|
|
alert(data.message);
|
|
|
}else{
|
|
|
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);
|
|
|
window.location.href = contextPath + "topoSwitch/toTopoSwitch";
|
|
|
}
|
|
|
},
|
|
|
error: function (e) {
|
|
|
console.log(e);
|
|
|
layer.close(layerMirror);
|
|
|
alert("切换lb请求返回异常");
|
|
|
alert("系统错误");
|
|
|
}
|
|
|
});
|
|
|
dialog.dialog("hide");
|
...
|
...
|
|