...
|
...
|
@@ -97,12 +97,12 @@ |
|
|
<input type="text" id="hostIp" name="hostIp" class="form-control" placeholder="" style="width: 230px"/>
|
|
|
</div>
|
|
|
<div class="input-group" style="float: left;">
|
|
|
<span class="input-group-addon">云类型:</span>
|
|
|
<select id="cloudType" name="cloudType" class="form-control">
|
|
|
<option value="0">全部</option>
|
|
|
<span class="input-group-addon">云可用区:</span>
|
|
|
<select id="cloudDetailType" name="cloudDetailType" class="form-control">
|
|
|
<option value="">全部</option>
|
|
|
<option value="1">AWS</option>
|
|
|
<option value="2">腾讯云</option>
|
|
|
<option value="3">腾讯云az2</option>
|
|
|
<option value="21">腾讯云</option>
|
|
|
<option value="22">腾讯云az2</option>
|
|
|
<%--<option value="3">其他</option>--%>
|
|
|
</select>
|
|
|
</div>
|
...
|
...
|
@@ -214,15 +214,17 @@ |
|
|
field : "hostIp",
|
|
|
width : "10%"
|
|
|
}, {
|
|
|
title : "云类型",
|
|
|
field : "cloudType",
|
|
|
title : "云可用区",
|
|
|
field : "cloudDetailType",
|
|
|
formatter : function(value, rowData, rowIndex) {
|
|
|
if(value == 1){
|
|
|
return 'AWS';
|
|
|
} else if(value == 2){
|
|
|
} else if(value == 21){
|
|
|
return '腾讯云';
|
|
|
}else if(value == 22){
|
|
|
return '腾讯云az2';
|
|
|
}else{
|
|
|
return '其他';
|
|
|
return value;
|
|
|
}
|
|
|
},
|
|
|
width : "5%"
|
...
|
...
|
@@ -301,13 +303,13 @@ |
|
|
$("#searchHostInfoBtn").click(function () {
|
|
|
var alias = $("#alias").val();
|
|
|
var hostIp = $("#hostIp").val();
|
|
|
var cloudType = $("#cloudType").val();
|
|
|
var cloudDetailType = $("#cloudDetailType").val();
|
|
|
var tags=$("#tags").val();
|
|
|
var onlyShowTagsIsNull=$("#tagsIsNull").val();
|
|
|
$("#hostInfoTable").table("load", {
|
|
|
'alias': alias,
|
|
|
'hostIp': $.trim(hostIp),
|
|
|
'cloudType': cloudType,
|
|
|
'cloudDetailType': cloudDetailType,
|
|
|
'tags': JSON.stringify(tags),
|
|
|
'onlyShowTagsIsNull':onlyShowTagsIsNull
|
|
|
});
|
...
|
...
|
@@ -351,7 +353,21 @@ |
|
|
tags += $(this).attr('value')+',';
|
|
|
}
|
|
|
});
|
|
|
var cloudType = $("#hostInfoForm #cloudType").val();
|
|
|
var cloudDetailType = $("#hostInfoForm #cloudDetailType").val();
|
|
|
var cloudType=0;
|
|
|
if(cloudDetailType==1){
|
|
|
cloudType=1;
|
|
|
}else if(cloudDetailType==21||cloudDetailType==22){
|
|
|
cloudType= cloudDetailType - 20 ;
|
|
|
}
|
|
|
|
|
|
if(cloudType<=0){
|
|
|
$("#hostInfoForm #messageAlert").alerts({
|
|
|
content : "请选择正确的云可用区类型!",
|
|
|
type : "danger"
|
|
|
});
|
|
|
}
|
|
|
|
|
|
var alias = $("#hostInfoForm #alias").val();
|
|
|
|
|
|
|
...
|
...
|
@@ -366,6 +382,7 @@ |
|
|
tags:tags,
|
|
|
hostIp:hostIp,
|
|
|
cloudType:cloudType,
|
|
|
cloudDetailType:cloudDetailType,
|
|
|
alias:alias
|
|
|
};
|
|
|
|
...
|
...
|
|