...
|
...
|
@@ -68,7 +68,6 @@ |
|
|
<a href="#" title="Go to Home" class="tip-bottom"><i
|
|
|
class="icon-home"></i> Home</a> <a href="#" class="current">双中心切换</a>
|
|
|
</div>
|
|
|
|
|
|
<div class="container-fluid">
|
|
|
<div class="widget-box">
|
|
|
<div class="widget-content nopadding">
|
...
|
...
|
@@ -91,13 +90,11 @@ |
|
|
<h4 style="display: inline">切换流程</h4>
|
|
|
</div>
|
|
|
<div class="panel-body">
|
|
|
<button class="btn btn-large" id="switch_mysql-btn">mysql</button>
|
|
|
<button class="btn btn-large" id="switch_mysql-btn" style="background-color: green">mysql</button>
|
|
|
===》
|
|
|
<button class="btn btn-large" id="switch_redis-btn">redis</button>
|
|
|
===》
|
|
|
<button class="btn btn-large" id="switch_internel_dns_aws-btn">aws内部DNS</button>
|
|
|
===》
|
|
|
<button class="btn btn-large" id="switch_internel_dns_qcloud-btn">qq内部DNS</button>
|
|
|
<button class="btn btn-large" id="switch_internel_dns-btn">内部DNS</button>
|
|
|
===》
|
|
|
<button class="btn btn-large" id="switch_cobar-btn">cobar</button>
|
|
|
===》
|
...
|
...
|
@@ -116,7 +113,6 @@ |
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
</div>
|
|
|
|
...
|
...
|
@@ -141,7 +137,6 @@ |
|
|
<input type="text" name="sms_name" class="form-control">
|
|
|
</div>
|
|
|
<br>
|
|
|
|
|
|
<div class="modal-footer">
|
|
|
<button class="btn btn-primary" onclick="submit()">确认</button>
|
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
|
...
|
...
|
@@ -161,58 +156,16 @@ |
|
|
</html>
|
|
|
|
|
|
<script>
|
|
|
|
|
|
|
|
|
//执行切换
|
|
|
function toDoExe(toCloud) {
|
|
|
|
|
|
$("input[name='cloud_name']").val(toCloud);
|
|
|
$("input[name='sms_name']").val('');
|
|
|
|
|
|
$.ajax({
|
|
|
type: 'post',
|
|
|
url: contextPath + "/centerSwitch/doExeAndCheckBefore",
|
|
|
dataType: 'json',
|
|
|
});
|
|
|
|
|
|
$('#confirmSubmitDivId').modal('show');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// var dialog = $("<div>").appendTo($("body"));
|
|
|
// dialog.dialog({
|
|
|
// title: "切换确定",
|
|
|
// backdrop: "static",
|
|
|
// content: "确定将所有流量切向:" + toCloud,
|
|
|
// buttons: [{
|
|
|
// text: "否",
|
|
|
// className: "btn-danger",
|
|
|
// onclick: function () {
|
|
|
// $(dialog).dialog("hide");
|
|
|
// }
|
|
|
// }, {
|
|
|
// text: "是",
|
|
|
// className: "btn-success",
|
|
|
// onclick: function () {
|
|
|
// $(dialog).dialog("hide");
|
|
|
// $("#detail-div").empty();
|
|
|
// var array = new Array();
|
|
|
// array.push("switch_mysql");
|
|
|
// array.push("switch_redis");
|
|
|
// array.push("switch_internel_dns_aws");
|
|
|
// array.push("switch_internel_dns_qcloud");
|
|
|
// array.push("switch_cobar");
|
|
|
// array.push("switch_lua");
|
|
|
// array.push("switch_dnspod");
|
|
|
// for(var i = 0; i <array.length; i++){
|
|
|
// $("#"+array[i]+"-btn").removeClass("btn-success");
|
|
|
// }
|
|
|
// doExe(array,0,toCloud);
|
|
|
// }
|
|
|
// }]
|
|
|
// });
|
|
|
|
|
|
}
|
|
|
|
|
|
function submit(){
|
...
|
...
|
@@ -221,9 +174,7 @@ |
|
|
alert("请填写短信验证码");
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
var toCloud = $("input[name='cloud_name']").val();
|
|
|
|
|
|
$.ajax({
|
|
|
type: 'post',
|
|
|
url: contextPath + "/centerSwitch/checkSmsCode",
|
...
|
...
|
@@ -236,10 +187,8 @@ |
|
|
$('#confirmSubmitDivId').modal('hide');
|
|
|
$("#detail-div").empty();
|
|
|
var array = new Array();
|
|
|
array.push("switch_mysql");
|
|
|
array.push("switch_redis");
|
|
|
array.push("switch_internel_dns_aws");
|
|
|
array.push("switch_internel_dns_qcloud");
|
|
|
array.push("switch_internel_dns");
|
|
|
array.push("switch_cobar");
|
|
|
array.push("switch_lua");
|
|
|
array.push("switch_dnspod");
|
...
|
...
|
@@ -257,10 +206,8 @@ |
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
//执行切换
|
|
|
function doExe(array, i,commond) {
|
|
|
|
|
|
var name = array[i];
|
|
|
$("#"+name+"-btn").addClass("btn-warning");
|
|
|
$.ajax({
|
...
|
...
|
@@ -272,15 +219,12 @@ |
|
|
},
|
|
|
dataType: 'json',
|
|
|
success: function (resp) {
|
|
|
|
|
|
$("#"+name+"-btn").removeClass("btn-warning");
|
|
|
$("#"+name+"-btn").addClass("btn-success");
|
|
|
|
|
|
var div = "<div class=\"alert alert-info alert-block\">";
|
|
|
div = div + "<h4 class=\"alert-heading\">" + name + "</h4>";
|
|
|
div = div + resp.data + "</div>";
|
|
|
$("#detail-div").append(div);
|
|
|
|
|
|
i++;
|
|
|
if(i < array.length){
|
|
|
doExe(array,i,commond);
|
...
|
...
|
@@ -289,8 +233,5 @@ |
|
|
error: function () {
|
|
|
}
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
</script> |
|
|
\ No newline at end of file |
|
|
|
|
|
\ No newline at end of file |
...
|
...
|
|