...
|
...
|
@@ -680,6 +680,10 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' |
|
|
form.on('select(res_minicomputer)', function (data) {
|
|
|
reloadTable();
|
|
|
});
|
|
|
// 腾讯云租户
|
|
|
form.on('select(tenant)', function (data) {
|
|
|
reloadTable();
|
|
|
});
|
|
|
//资源池选择事件
|
|
|
form.on('select(sub_restype)', function (data) {
|
|
|
if(data.value){
|
...
|
...
|
@@ -1298,6 +1302,26 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' |
|
|
} else {
|
|
|
$("#res_vendor").parent().parent().addClass("hide");
|
|
|
}
|
|
|
if (resType == 'TENCENT_CLOUD_PLAT_VIRTUALHOST' || resType.includes('TENCENT_CLOUD_PLAT_RES_')){
|
|
|
$("#tenant").parent().parent().removeClass("hide");
|
|
|
var providerStr = '';
|
|
|
$.ajax({
|
|
|
url: `${common.domainName}/api-web/bResource/tencentTenant?access_token=${accessToken}`,
|
|
|
method: 'get',
|
|
|
success: function (res) {
|
|
|
if (res && res.data) {
|
|
|
var ddiclist = res.data;
|
|
|
$.each(ddiclist, function (i, v) {
|
|
|
providerStr += '<option value="' + v.resId + '">' + v.resName + '</option>';
|
|
|
});
|
|
|
$("#tenant").append(providerStr)
|
|
|
form.render("select");
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
}else {
|
|
|
$("#tenant").parent().parent().addClass("hide");
|
|
|
}
|
|
|
if(/HUAWEI_CLOUD_VIRTUALHOST/.test(resType) || /ALI_CLOUD_ECS/.test(resType) || /VIRTUALIZATION_VMWARE_VHOST/.test(resType)){
|
|
|
//绑定采集协议
|
|
|
admin.req({
|
...
|
...
|
@@ -1496,6 +1520,7 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' |
|
|
resCategory: 'resources',
|
|
|
collProtocols:collProtocols,
|
|
|
platform: $("#aliyun_plantform").val(),
|
|
|
tenantId: $("#tenant").val(),
|
|
|
}
|
|
|
})
|
|
|
}
|
...
|
...
|
|