Authored by qinchao

优化显示

... ... @@ -125,33 +125,36 @@
<div class="tab-content">
<div id="mytab_pane_az1" class="tab-pane in active">
<div class="ckbox ckbox-default" style="margin-top:30px;">
<input type="checkbox" name="az1_target_operate_nginx" id="az1_target_operate_nginx_az1" secondgroup="az1"
<%--<input type="checkbox" name="az1_target_operate_nginx" id="az1_target_operate_nginx_az1" secondgroup="az1"
value="az1" />
<label for="az1_target_operate_nginx_az1">az1</label>
<label for="az1_target_operate_nginx_az1">az1</label>--%>
az1
&nbsp;&nbsp;&nbsp;&nbsp;
<input id="az1_input_slider_az1" class="slider" type="text"
data-slider-min="0" data-slider-max="10" data-slider-step="1" data-slider-value="0" data-slider-tooltip="always"/>
</div>
<div class="ckbox ckbox-default" style="margin-top:30px;">
<input type="checkbox" name="az1_target_operate_nginx" id="az1_target_operate_nginx_az2" secondgroup="az1"
<%--<input type="checkbox" name="az1_target_operate_nginx" id="az1_target_operate_nginx_az2" secondgroup="az1"
value="az2" />
<label for="az1_target_operate_nginx_az2">az2</label>
<label for="az1_target_operate_nginx_az2">az2</label>--%>
az2
&nbsp;&nbsp;&nbsp;&nbsp;
<input id="az1_input_slider_az2" class="slider" type="text"
data-slider-min="0" data-slider-max="10" data-slider-step="1" data-slider-value="0" data-slider-tooltip="always"/>
</div>
<div class="ckbox ckbox-default" style="margin-top:30px;">
<input type="checkbox" name="az1_target_operate_nginx" id="az1_target_operate_nginx_az3" secondgroup="az1"
<%--<input type="checkbox" name="az1_target_operate_nginx" id="az1_target_operate_nginx_az3" secondgroup="az1"
value="az3" />
<label for="az1_target_operate_nginx_az3">az3</label>
<label for="az1_target_operate_nginx_az3">az3</label>--%>
az3
&nbsp;&nbsp;&nbsp;&nbsp;
<input id="az1_input_slider_az3" class="slider" type="text"
data-slider-min="0" data-slider-max="10" data-slider-step="1" data-slider-value="0" data-slider-tooltip="always"/>
</div>
<button class=" btn btn-sm btn-success"
<button class=" btn btn-sm btn-danger"
style="display:inline;margin-left:30px;margin-top:20px;"
onclick="nginxInitSwitch('az1')">
<em class="icon-cogs bigger-110"></em>
... ... @@ -160,33 +163,36 @@
</div>
<div id="mytab_pane_az2" class="tab-pane">
<div class="ckbox ckbox-default" style="margin-top:30px;">
<input type="checkbox" name="az2_target_operate_nginx" id="az2_target_operate_nginx_az1" secondgroup="az1"
<%--<input type="checkbox" name="az2_target_operate_nginx" id="az2_target_operate_nginx_az1" secondgroup="az1"
value="az1" />
<label for="az2_target_operate_nginx_az1">az1</label>
<label for="az2_target_operate_nginx_az1">az1</label>--%>
az1
&nbsp;&nbsp;&nbsp;&nbsp;
<input id="az2_input_slider_az1" class="slider" type="text"
data-slider-min="0" data-slider-max="10" data-slider-step="1" data-slider-value="0" data-slider-tooltip="always"/>
</div>
<div class="ckbox ckbox-default" style="margin-top:30px;">
<input type="checkbox" name="az2_target_operate_nginx" id="az2_target_operate_nginx_az2" secondgroup="az1"
<%--<input type="checkbox" name="az2_target_operate_nginx" id="az2_target_operate_nginx_az2" secondgroup="az1"
value="az2" />
<label for="az2_target_operate_nginx_az2">az2</label>
<label for="az2_target_operate_nginx_az2">az2</label>--%>
az2
&nbsp;&nbsp;&nbsp;&nbsp;
<input id="az2_input_slider_az2" class="slider" type="text"
data-slider-min="0" data-slider-max="10" data-slider-step="1" data-slider-value="0" data-slider-tooltip="always"/>
</div>
<div class="ckbox ckbox-default" style="margin-top:30px;">
<input type="checkbox" name="az2_target_operate_nginx" id="az2_target_operate_nginx_az3" secondgroup="az1"
<%--<input type="checkbox" name="az2_target_operate_nginx" id="az2_target_operate_nginx_az3" secondgroup="az1"
value="az3" />
<label for="az2_target_operate_nginx_az3">az3</label>
<label for="az2_target_operate_nginx_az3">az3</label>--%>
az3
&nbsp;&nbsp;&nbsp;&nbsp;
<input id="az2_input_slider_az3" class="slider" type="text"
data-slider-min="0" data-slider-max="10" data-slider-step="1" data-slider-value="0" data-slider-tooltip="always"/>
</div>
<button class=" btn btn-sm btn-success"
<button class=" btn btn-sm btn-danger"
style="display:inline;margin-left:30px;margin-top:20px;"
onclick="nginxInitSwitch('az2')">
<em class="icon-cogs bigger-110"></em>
... ... @@ -195,33 +201,36 @@
</div>
<div id="mytab_pane_az3" class="tab-pane">
<div class="ckbox ckbox-default" style="margin-top:30px;">
<input type="checkbox" name="az3_target_operate_nginx" id="az3_target_operate_nginx_az1" secondgroup="az1"
<%--<input type="checkbox" name="az3_target_operate_nginx" id="az3_target_operate_nginx_az1" secondgroup="az1"
value="az1" />
<label for="az3_target_operate_nginx_az1">az1</label>
<label for="az3_target_operate_nginx_az1">az1</label>--%>
az1
&nbsp;&nbsp;&nbsp;&nbsp;
<input id="az3_input_slider_az1" class="slider" type="text"
data-slider-min="0" data-slider-max="10" data-slider-step="1" data-slider-value="0" data-slider-tooltip="always"/>
</div>
<div class="ckbox ckbox-default" style="margin-top:30px;">
<input type="checkbox" name="az3_target_operate_nginx" id="az3_target_operate_nginx_az2" secondgroup="az1"
<%--<input type="checkbox" name="az3_target_operate_nginx" id="az3_target_operate_nginx_az2" secondgroup="az1"
value="az2" />
<label for="az3_target_operate_nginx_az2">az2</label>
<label for="az3_target_operate_nginx_az2">az2</label>--%>
az2
&nbsp;&nbsp;&nbsp;&nbsp;
<input id="az3_input_slider_az2" class="slider" type="text"
data-slider-min="0" data-slider-max="10" data-slider-step="1" data-slider-value="0" data-slider-tooltip="always"/>
</div>
<div class="ckbox ckbox-default" style="margin-top:30px;">
<input type="checkbox" name="az3_target_operate_nginx" id="az3_target_operate_nginx_az3" secondgroup="az1"
<%--<input type="checkbox" name="az3_target_operate_nginx" id="az3_target_operate_nginx_az3" secondgroup="az1"
value="az3" />
<label for="az3_target_operate_nginx_az3">az3</label>
<label for="az3_target_operate_nginx_az3">az3</label>--%>
az3
&nbsp;&nbsp;&nbsp;&nbsp;
<input id="az3_input_slider_az3" class="slider" type="text"
data-slider-min="0" data-slider-max="10" data-slider-step="1" data-slider-value="0" data-slider-tooltip="always"/>
</div>
<button class=" btn btn-sm btn-success"
<button class=" btn btn-sm btn-danger"
style="display:inline;margin-left:30px;margin-top:20px;"
onclick="nginxInitSwitch('az3')">
<em class="icon-cogs bigger-110"></em>
... ... @@ -245,7 +254,7 @@
</div>
<script src="<%=basePath %>script/common/genarate_left_panel.js?v=<%=ProjectConstant.MENU_VERSION %>"></script>
<script src="<%=basePath %>script/switch.js?v=20180531-100"></script>
<script src="<%=basePath %>script/switch.js?v=20180531-101"></script>
<script type="text/javascript">
$("#li_switch").addClass("active open");
... ...
... ... @@ -127,19 +127,19 @@ function drawData(resp) {
if(cloud.indexOf("az1")>=0){
var link = newLink(scene,tmpElbObj, az1Nginx,weight);
link.arrowsRadius = 10;
$("#"+tmpCloud+"_target_operate_nginx_az1").prop("checked",true);
//$("#"+tmpCloud+"_target_operate_nginx_az1").prop("checked",true);
$("#"+tmpCloud+"_input_slider_az1").slider("setValue",weight);
}
if(cloud.indexOf("az2")>=0){
var link = newLink(scene,tmpElbObj, az2Nginx,weight);
link.arrowsRadius = 10;
$("#"+tmpCloud+"_target_operate_nginx_az2").prop("checked",true);
//$("#"+tmpCloud+"_target_operate_nginx_az2").prop("checked",true);
$("#"+tmpCloud+"_input_slider_az2").slider("setValue",weight);
}
if(cloud.indexOf("az3")>=0){
var link = newLink(scene,tmpElbObj, az3Nginx,weight);
link.arrowsRadius = 10;
$("#"+tmpCloud+"_target_operate_nginx_az3").prop("checked",true);
//$("#"+tmpCloud+"_target_operate_nginx_az3").prop("checked",true);
$("#"+tmpCloud+"_input_slider_az3").slider("setValue",weight);
}
}
... ... @@ -230,25 +230,18 @@ function resetLbNodeIp(node,data) {
* @param onlineOrGray 切换:线上/灰度
*/
function nginxInitSwitch(cloudName) {
var operatorRadio=cloudName+"_target_operate_nginx";
/*var radioArray= ['az1_target_operate_nginx','az2_target_operate_nginx','az3_target_operate_nginx'];
for(var i= 0;i<radioArray.length;i++){
if(radioArray[i]!=operatorRadio){
$('input:radio[name='+radioArray[i]+']').prop("checked",false);
}
}*/
var target ="";
$('input:checkbox[name='+operatorRadio+']:checked').each(function () {
var inputSliderId=cloudName+"_input_slider_"+$(this).val();
var weight=$("#"+inputSliderId).slider("getValue");
if(weight>0){
if(target.length>0){
target += ",";
}
target += $(this).val()+":"+weight;
}
});
var arr = ["az1","az2","az3"];
for(var i= 0;i<arr.length;i++){
var inputSliderId=cloudName+"_input_slider_"+arr[i];
var weight=$("#"+inputSliderId).slider("getValue");
if(weight>0){
if(target.length>0){
target += ",";
}
target += arr[i]+":"+weight;
}
}
if(!target){
prompt("提示", "请选择<span style='color:red'>["+cloudName+"区]</span>目标nginx!");
... ... @@ -298,8 +291,9 @@ function nginxInitSwitch(cloudName) {
},
error: function (e) {
//alert("系统错误");
console.log(e);
layer.close(layerMirror);
alert("系统错误:等待超时");
alert("系统错误:请求异常");
window.location.href = contextPath + "topoSwitch/toTopoSwitch";
}
});
... ...