Authored by 王涛

Merge branch 'master-yjp' into 'master'

问题 24,25 ,26,加载阿里云平台和采集协议



See merge request !106
@@ -35,6 +35,7 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'soulTable', 'sessions', 'comm @@ -35,6 +35,7 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'soulTable', 'sessions', 'comm
35 35
36 //绑定检索事件 36 //绑定检索事件
37 bindSearchEvent(); 37 bindSearchEvent();
  38 + var collProtocols = "";
38 39
39 form.render(null, 'biz-reslist-form'); 40 form.render(null, 'biz-reslist-form');
40 41
@@ -123,7 +124,8 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'soulTable', 'sessions', 'comm @@ -123,7 +124,8 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'soulTable', 'sessions', 'comm
123 linkState: $("#biz_reslist_link_state").val(), 124 linkState: $("#biz_reslist_link_state").val(),
124 state: $("#biz_reslist_state").val(), 125 state: $("#biz_reslist_state").val(),
125 // hostState: $("#biz_reslist_host_state").val(), 126 // hostState: $("#biz_reslist_host_state").val(),
126 - powerState: $("#biz_reslist_power_state").val() 127 + powerState: $("#biz_reslist_power_state").val(),
  128 + collProtocols: collProtocols
127 129
128 } 130 }
129 , height: 'full-165' 131 , height: 'full-165'
@@ -168,6 +170,7 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'soulTable', 'sessions', 'comm @@ -168,6 +170,7 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'soulTable', 'sessions', 'comm
168 170
169 } 171 }
170 172
  173 +
171 //树表格 174 //树表格
172 function renderTreeTable(bizId, resType, reloadFlag) { 175 function renderTreeTable(bizId, resType, reloadFlag) {
173 176
@@ -175,7 +178,10 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'soulTable', 'sessions', 'comm @@ -175,7 +178,10 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'soulTable', 'sessions', 'comm
175 $(".biz_reslist_treetable_search").show(); 178 $(".biz_reslist_treetable_search").show();
176 $("#bizResListTableContent").hide(); 179 $("#bizResListTableContent").hide();
177 $("#bizResTreeTableContent").show(); 180 $("#bizResTreeTableContent").show();
178 - 181 + if (collProtocols) {
  182 + xmSelect.get('#collProtocolSelect', true).setValue([]);
  183 + collProtocols = '';
  184 + }
179 // 如果是虚拟机或者物理主机,展示电源状态查询条件 185 // 如果是虚拟机或者物理主机,展示电源状态查询条件
180 if ((resType === 'VIRTUALIZATION_VMWARE_VHOST' || resType === 'VIRTUALIZATION_VMWARE_PHYSICSHOST') && !reloadFlag) { 186 if ((resType === 'VIRTUALIZATION_VMWARE_VHOST' || resType === 'VIRTUALIZATION_VMWARE_PHYSICSHOST') && !reloadFlag) {
181 $('#biz_reslist_treetable_power_state').val('poweredOn'); 187 $('#biz_reslist_treetable_power_state').val('poweredOn');
@@ -222,7 +228,8 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'soulTable', 'sessions', 'comm @@ -222,7 +228,8 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'soulTable', 'sessions', 'comm
222 state: $("#biz_reslist_treetable_state").val(), 228 state: $("#biz_reslist_treetable_state").val(),
223 linkState: $('#biz_reslist_treetable_link_state').val(), 229 linkState: $('#biz_reslist_treetable_link_state').val(),
224 powerState: $("#biz_reslist_treetable_power_state").val(), 230 powerState: $("#biz_reslist_treetable_power_state").val(),
225 - serverState: $("#biz_reslist_server_state").val() 231 + serverState: $("#biz_reslist_server_state").val(),
  232 + collProtocols: collProtocols
226 } 233 }
227 , done: function (res) { 234 , done: function (res) {
228 if (res.code == 0) { 235 if (res.code == 0) {
@@ -380,6 +387,10 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'soulTable', 'sessions', 'comm @@ -380,6 +387,10 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'soulTable', 'sessions', 'comm
380 form.on('select(biz_reslist_res_colony)', function (data) { 387 form.on('select(biz_reslist_res_colony)', function (data) {
381 reloadTable(); 388 reloadTable();
382 }); 389 });
  390 + //资源池选择事件
  391 + form.on('select(aliyun_plantform)', function (data) {
  392 + reloadTable();
  393 + });
383 394
384 //资源连接状态选择事件 395 //资源连接状态选择事件
385 form.on('select(biz_reslist_platform)', function (data) { 396 form.on('select(biz_reslist_platform)', function (data) {
@@ -409,11 +420,23 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'soulTable', 'sessions', 'comm @@ -409,11 +420,23 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'soulTable', 'sessions', 'comm
409 $('#biz_reslist_resStatus').val(''); 420 $('#biz_reslist_resStatus').val('');
410 $('#biz_reslist_res_colony').val(''); 421 $('#biz_reslist_res_colony').val('');
411 $('#biz_reslist_res_cluster').val(''); 422 $('#biz_reslist_res_cluster').val('');
  423 + $("#aliyun_plantform").val('');
  424 + if (collProtocols) {
  425 + xmSelect.get('#collProtocolSelect', true).setValue([]);
  426 + collProtocols = '';
  427 + }
412 form.render('select'); 428 form.render('select');
413 429
414 var targetId = ''; 430 var targetId = '';
415 var searchType = ""; 431 var searchType = "";
416 var optons = ""; 432 var optons = "";
  433 + //阿里云显示平台
  434 + if(/ALI_CLOUD/.test(resType)){
  435 + $("#aliyun_plantform").parent().parent().removeClass("hide");
  436 + form.render("select");
  437 + }else{
  438 + $("#aliyun_plantform").parent().parent().addClass("hide");
  439 + }
417 //华为云物理机,加载华为云集群查询条件 440 //华为云物理机,加载华为云集群查询条件
418 if (resType == 'HUAWEI_CLOUD_PHYSICSHOST') { 441 if (resType == 'HUAWEI_CLOUD_PHYSICSHOST') {
419 optons = "<option value=''>=所属集群=</option>" 442 optons = "<option value=''>=所属集群=</option>"
@@ -428,6 +451,54 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'soulTable', 'sessions', 'comm @@ -428,6 +451,54 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'soulTable', 'sessions', 'comm
428 } else { 451 } else {
429 $("#biz_reslist_res_cluster_id").hide(); 452 $("#biz_reslist_res_cluster_id").hide();
430 } 453 }
  454 + if(/HUAWEI_CLOUD_VIRTUALHOST/.test(resType) || /ALI_CLOUD_ECS/.test(resType) || /VIRTUALIZATION_VMWARE_VHOST/.test(resType)) {
  455 + //绑定采集协议
  456 + admin.req({
  457 + url: common.domainName + '/api-web/manage/protocol/page',
  458 + data: {
  459 + access_token: accessToken,
  460 + startTime: '',
  461 + endTime: '',
  462 + keyword: '',
  463 + hasParam: '',
  464 + limit: -1
  465 + }
  466 + }).done(function (res) {
  467 + xmSelect.render({
  468 + el: '#collProtocolSelect'
  469 + , filterable: true
  470 + , tips: '=采集协议='
  471 + , name: 'collProtocols'
  472 + , prop: {
  473 + name: 'protocolName',
  474 + value: 'protocolCode',
  475 + }
  476 + , model: {
  477 + label: {
  478 + type: 'block',
  479 + block: {
  480 + //最大显示数量, 0:不限制
  481 + showCount: 1,
  482 + //是否显示删除图标
  483 + showIcon: true,
  484 + }
  485 + }
  486 + }
  487 + , data: res.data
  488 + , hide: function () {
  489 + var selectValue = xmSelect.get('#collProtocolSelect', true).getValue('value');
  490 + collProtocols = selectValue.join(',');
  491 + form.render()
  492 + reloadTable();
  493 + if (collProtocols) {
  494 + xmSelect.get('#collProtocolSelect', true).setValue([]);
  495 + collProtocols = '';
  496 + form.render();
  497 + }
  498 + }
  499 + })
  500 + })
  501 + }
431 502
432 //华为云的集群、虚拟化物理机,查询条件绑定资源池 503 //华为云的集群、虚拟化物理机,查询条件绑定资源池
433 if (resType == 'HUAWEI_CLOUD_CLUSTER' || resType == 'VIRTUALIZATION_VMWARE_PHYSICSHOST') { 504 if (resType == 'HUAWEI_CLOUD_CLUSTER' || resType == 'VIRTUALIZATION_VMWARE_PHYSICSHOST') {
@@ -506,7 +577,9 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'soulTable', 'sessions', 'comm @@ -506,7 +577,9 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'soulTable', 'sessions', 'comm
506 platform: platform, 577 platform: platform,
507 subResType: $("#biz_reslist_sub_restype").val(), 578 subResType: $("#biz_reslist_sub_restype").val(),
508 powerState: $("#biz_reslist_power_state").val(), 579 powerState: $("#biz_reslist_power_state").val(),
509 - serverState: $("#biz_reslist_server_state").val() 580 + serverState: $("#biz_reslist_server_state").val(),
  581 + collProtocols: collProtocols,
  582 + platform: $("#aliyun_plantform").val()
510 } 583 }
511 }) 584 })
512 } 585 }
@@ -420,8 +420,8 @@ layui.define(['soulTable', 'commonDetail', 'common', 'laytpl', 'view', 'admin', @@ -420,8 +420,8 @@ layui.define(['soulTable', 'commonDetail', 'common', 'laytpl', 'view', 'admin',
420 templet: '#resindex_resName' 420 templet: '#resindex_resName'
421 }, 421 },
422 {field: 'ip', title: 'IP地址', width: 130, align: 'center', sort: true}, 422 {field: 'ip', title: 'IP地址', width: 130, align: 'center', sort: true},
423 - {field: 'cpuRate', title: 'CPU使用率', align: 'center', minWidth: x_130, templet: '#cpuRateTpl', sort: true},  
424 - {field: 'memoryRate', title: '内存使用率', align: 'center', minWidth: x_130, templet: '#memoryRateTpl', sort: true}, 423 + // {field: 'cpuRate', title: 'CPU使用率', align: 'center', minWidth: x_130, templet: '#cpuRateTpl', sort: true},
  424 + // {field: 'memoryRate', title: '内存使用率', align: 'center', minWidth: x_130, templet: '#memoryRateTpl', sort: true},
425 {field: 'resTypeName', title: '资源类型', width: 101, align: 'center'}, 425 {field: 'resTypeName', title: '资源类型', width: 101, align: 'center'},
426 {field: 'adminName', title: '负责人', width: 123, align: 'center', sort: true}, 426 {field: 'adminName', title: '负责人', width: 123, align: 'center', sort: true},
427 {field: 'adminPhone', title: '负责人电话', width: 118, align: 'center', sort: true}, 427 {field: 'adminPhone', title: '负责人电话', width: 118, align: 'center', sort: true},
@@ -437,8 +437,8 @@ layui.define(['soulTable', 'commonDetail', 'common', 'laytpl', 'view', 'admin', @@ -437,8 +437,8 @@ layui.define(['soulTable', 'commonDetail', 'common', 'laytpl', 'view', 'admin',
437 templet: '#resindex_resName' 437 templet: '#resindex_resName'
438 }, 438 },
439 {field: 'ip', title: 'IP地址', width: 130, align: 'center', sort: true}, 439 {field: 'ip', title: 'IP地址', width: 130, align: 'center', sort: true},
440 - {field: 'cpuRate', title: 'CPU使用率', align: 'center', minWidth: x_130, templet: '#cpuRateTpl', sort: true},  
441 - {field: 'memoryRate', title: '内存使用率', align: 'center', minWidth: x_130, templet: '#memoryRateTpl', sort: true}, 440 + // {field: 'cpuRate', title: 'CPU使用率', align: 'center', minWidth: x_130, templet: '#cpuRateTpl', sort: true},
  441 + // {field: 'memoryRate', title: '内存使用率', align: 'center', minWidth: x_130, templet: '#memoryRateTpl', sort: true},
442 {field: 'resTypeName', title: '资源类型', width: 101, align: 'center'}, 442 {field: 'resTypeName', title: '资源类型', width: 101, align: 'center'},
443 {field: 'adminName', title: '负责人', width: 123, align: 'center', sort: true}, 443 {field: 'adminName', title: '负责人', width: 123, align: 'center', sort: true},
444 {field: 'adminPhone', title: '负责人电话', width: 118, align: 'center', sort: true}, 444 {field: 'adminPhone', title: '负责人电话', width: 118, align: 'center', sort: true},
@@ -84,11 +84,11 @@ layui.define(['table', 'form', 'admin', 'layer', 'common','sessions', 'xmSelect' @@ -84,11 +84,11 @@ layui.define(['table', 'form', 'admin', 'layer', 'common','sessions', 'xmSelect'
84 return '测试通知' 84 return '测试通知'
85 break; 85 break;
86 default: 86 default:
87 - return '告警通知' 87 + return '系统通知'
88 break; 88 break;
89 } 89 }
90 }else { 90 }else {
91 - return '告警通知' 91 + return '系统通知'
92 } 92 }
93 }} 93 }}
94 , {field: 'way', title: '通知方式', align: 'center', sort: true, width:120, 94 , {field: 'way', title: '通知方式', align: 'center', sort: true, width:120,
@@ -39,9 +39,57 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'upload', 'admin', 'form', @@ -39,9 +39,57 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'upload', 'admin', 'form',
39 if(bizId!=''){ 39 if(bizId!=''){
40 bizId.substring(0,bizId.length-1); 40 bizId.substring(0,bizId.length-1);
41 } 41 }
  42 +
42 reloadTable(); 43 reloadTable();
43 } 44 }
44 }); 45 });
  46 + var collProtocols = '';
  47 + initProtocolSelect()
  48 + //获取全部协议
  49 + function initProtocolSelect() {
  50 + admin.req({
  51 + url: domainName + '/api-web/manage/protocol/page',
  52 + data: {
  53 + access_token: accessToken,
  54 + startTime: '',
  55 + endTime: '',
  56 + keyword: '',
  57 + hasParam: '',
  58 + limit: -1
  59 + }
  60 + }).done(function (res) {
  61 + xmSelect.render({
  62 + el: '#collProtocolSelect'
  63 + , filterable: true
  64 + , tips: '=采集协议='
  65 + , name: 'collProtocols'
  66 + , prop: {
  67 + name: 'protocolName',
  68 + value: 'protocolCode',
  69 + }
  70 + , model: {
  71 + label: {
  72 + type: 'block',
  73 + block: {
  74 + //最大显示数量, 0:不限制
  75 + showCount: 1,
  76 + //是否显示删除图标
  77 + showIcon: true,
  78 + }
  79 + }
  80 + }
  81 + , data: res.data
  82 + ,hide: function () {
  83 + var selectValue = xmSelect.get('#collProtocolSelect', true).getValue('value');
  84 + collProtocols = selectValue.join(',');
  85 + form.render()
  86 + reloadTable();
  87 +
  88 + }
  89 + })
  90 + })
  91 + }
  92 +
45 function autoHeight(el) { 93 function autoHeight(el) {
46 // var height = el.parents('.layui-card').height(); 94 // var height = el.parents('.layui-card').height();
47 // el.css('min-height', height - 75); 95 // el.css('min-height', height - 75);
@@ -794,6 +842,7 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'upload', 'admin', 'form', @@ -794,6 +842,7 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'upload', 'admin', 'form',
794 , id: 'resManageTable' 842 , id: 'resManageTable'
795 , url: common.domainName + '/api-web/home/res-list/' + resType 843 , url: common.domainName + '/api-web/home/res-list/' + resType
796 , where: { 844 , where: {
  845 +
797 access_token: accessToken, 846 access_token: accessToken,
798 editMode: 'true', 847 editMode: 'true',
799 resName: $("#resManageIndexForm").find("input[name='resName']").val() ? $("#resManageIndexForm").find("input[name='resName']").val() : searchId, 848 resName: $("#resManageIndexForm").find("input[name='resName']").val() ? $("#resManageIndexForm").find("input[name='resName']").val() : searchId,
@@ -803,7 +852,8 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'upload', 'admin', 'form', @@ -803,7 +852,8 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'upload', 'admin', 'form',
803 busId: $("#resManageIndexForm").find("input[name='busId']").val(), 852 busId: $("#resManageIndexForm").find("input[name='busId']").val(),
804 state: $("#resManageIndexForm").find("select[name='state']").val(), 853 state: $("#resManageIndexForm").find("select[name='state']").val(),
805 parentId: $("#resManageIndexForm").find("select[name='parentId']").val(), 854 parentId: $("#resManageIndexForm").find("select[name='parentId']").val(),
806 - collectionState: $("#resManageIndexForm").find("select[name='collectionState']").val() 855 + collectionState: $("#resManageIndexForm").find("select[name='collectionState']").val(),
  856 + collProtocols: collProtocols
807 } 857 }
808 , height: 'full-200' 858 , height: 'full-200'
809 , cellMinWidth: 80 859 , cellMinWidth: 80
@@ -33,7 +33,7 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' @@ -33,7 +33,7 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', '
33 var bizId=''; 33 var bizId='';
34 var busIdSelect; 34 var busIdSelect;
35 var busTypeList = []; 35 var busTypeList = [];
36 - 36 + var collProtocols = '';
37 37
38 var editFlag = false; 38 var editFlag = false;
39 if (data.choose == '1') { 39 if (data.choose == '1') {
@@ -68,7 +68,49 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' @@ -68,7 +68,49 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', '
68 $('#resindex-leftree-shrink').hide(); 68 $('#resindex-leftree-shrink').hide();
69 }); 69 });
70 }); 70 });
71 - 71 + //获取全部协议
  72 + function initProtocolSelect() {
  73 + admin.req({
  74 + url: common.domainName + '/api-web/manage/protocol/page',
  75 + data: {
  76 + access_token: accessToken,
  77 + startTime: '',
  78 + endTime: '',
  79 + keyword: '',
  80 + hasParam: '',
  81 + limit: -1
  82 + }
  83 + }).done(function (res) {
  84 + xmSelect.render({
  85 + el: '#collProtocolSelect'
  86 + , filterable: true
  87 + , tips: '=采集协议='
  88 + , name: 'collProtocols'
  89 + , prop: {
  90 + name: 'protocolName',
  91 + value: 'protocolCode',
  92 + }
  93 + , model: {
  94 + label: {
  95 + type: 'block',
  96 + block: {
  97 + //最大显示数量, 0:不限制
  98 + showCount: 1,
  99 + //是否显示删除图标
  100 + showIcon: true,
  101 + }
  102 + }
  103 + }
  104 + , data: res.data
  105 + ,hide: function () {
  106 + var selectValue = xmSelect.get('#collProtocolSelect', true).getValue('value');
  107 + collProtocols = selectValue.join(',');
  108 + form.render()
  109 + reloadTable();
  110 + }
  111 + })
  112 + })
  113 + }
72 //树展开事件 114 //树展开事件
73 $("#resindex-leftree_btn").on("click",function () { 115 $("#resindex-leftree_btn").on("click",function () {
74 $("#resindex-leftree_btn").hide(); 116 $("#resindex-leftree_btn").hide();
@@ -312,6 +354,52 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' @@ -312,6 +354,52 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', '
312 // form.render("select"); 354 // form.render("select");
313 // }); 355 // });
314 //$('#treetableBizTypes').val(''); 356 //$('#treetableBizTypes').val('');
  357 + //绑定采集协议
  358 + admin.req({
  359 + url: domainName + '/api-web/manage/protocol/page',
  360 + data: {
  361 + access_token: accessToken,
  362 + startTime: '',
  363 + endTime: '',
  364 + keyword: '',
  365 + hasParam: '',
  366 + limit: -1
  367 + }
  368 + }).done(function (res) {
  369 + xmSelect.render({
  370 + el: '#collProtocolSelect'
  371 + , filterable: true
  372 + , tips: '=采集协议='
  373 + , name: 'collProtocols'
  374 + , prop: {
  375 + name: 'protocolName',
  376 + value: 'protocolCode',
  377 + }
  378 + , model: {
  379 + label: {
  380 + type: 'block',
  381 + block: {
  382 + //最大显示数量, 0:不限制
  383 + showCount: 1,
  384 + //是否显示删除图标
  385 + showIcon: true,
  386 + }
  387 + }
  388 + }
  389 + , data: res.data
  390 + ,hide: function () {
  391 + var selectValue = xmSelect.get('#collProtocolSelect', true).getValue('value');
  392 + collProtocols = selectValue.join(',');
  393 + form.render()
  394 + reloadTable();
  395 + if (collProtocols) {
  396 + xmSelect.get('#collProtocolSelect', true).setValue([]);
  397 + collProtocols='';
  398 + form.render();
  399 + }
  400 + }
  401 + })
  402 + })
315 //绑定业务下拉选择数据 403 //绑定业务下拉选择数据
316 admin.req({ 404 admin.req({
317 url: domainName + '/api-web/home/business/findAllBusType', 405 url: domainName + '/api-web/home/business/findAllBusType',
@@ -566,6 +654,11 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' @@ -566,6 +654,11 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', '
566 // renderList(currentResType); 654 // renderList(currentResType);
567 reloadTable(); 655 reloadTable();
568 }); 656 });
  657 + //阿里云平台选择事件
  658 + form.on('select(aliyun_plantform)', function (data) {
  659 + // renderList(currentResType);
  660 + reloadTable();
  661 + });
569 //厂商选择事件 662 //厂商选择事件
570 form.on('select(res_vendor)', function (data) { 663 form.on('select(res_vendor)', function (data) {
571 // renderList(currentResType); 664 // renderList(currentResType);
@@ -645,7 +738,9 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' @@ -645,7 +738,9 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', '
645 keyWords: $("#treetable_keyword").val(), 738 keyWords: $("#treetable_keyword").val(),
646 health: $("#treetable_resStatus").val(), 739 health: $("#treetable_resStatus").val(),
647 state: $("#treetable_res_state").val(), 740 state: $("#treetable_res_state").val(),
648 - resCategory: 'resources' 741 + resCategory: 'resources',
  742 + collProtocols : collProtocols
  743 +
649 } 744 }
650 , done: function (res) { 745 , done: function (res) {
651 layer.close(index); 746 layer.close(index);
@@ -1123,11 +1218,12 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' @@ -1123,11 +1218,12 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', '
1123 if(xmSelect.get("#resListBizTypes") && xmSelect.get("#resListBizTypes")[0]){ 1218 if(xmSelect.get("#resListBizTypes") && xmSelect.get("#resListBizTypes")[0]){
1124 xmSelect.get("#resListBizTypes")[0].setValue([]); 1219 xmSelect.get("#resListBizTypes")[0].setValue([]);
1125 } 1220 }
1126 - 1221 + $("#aliyun_plantform").val('');
1127 $('#res_colony').val(''); 1222 $('#res_colony').val('');
1128 $('#res_cluster').val(''); 1223 $('#res_cluster').val('');
1129 $('#state').val(''); 1224 $('#state').val('');
1130 $('#link_state').val(''); 1225 $('#link_state').val('');
  1226 +
1131 //虚拟化查询条件清空 1227 //虚拟化查询条件清空
1132 $("#virtual_platForm_select").val(''); 1228 $("#virtual_platForm_select").val('');
1133 $("#treetable_resStatus").val(''); 1229 $("#treetable_resStatus").val('');
@@ -1135,6 +1231,9 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' @@ -1135,6 +1231,9 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', '
1135 if(xmSelect.get("#treetableBizTypes") && xmSelect.get("#treetableBizTypes")[0]){ 1231 if(xmSelect.get("#treetableBizTypes") && xmSelect.get("#treetableBizTypes")[0]){
1136 xmSelect.get("#treetableBizTypes")[0].setValue([]); 1232 xmSelect.get("#treetableBizTypes")[0].setValue([]);
1137 } 1233 }
  1234 + // if(xmSelect.get("#collProtocolSelect") && xmSelect.get("#collProtocolSelect")[0]){
  1235 + // xmSelect.get("#collProtocolSelect")[0].setValue([]);
  1236 + // }
1138 1237
1139 $("#treetable_keyword").val(''); 1238 $("#treetable_keyword").val('');
1140 $("#treetable_state").val(''); 1239 $("#treetable_state").val('');
@@ -1152,6 +1251,13 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' @@ -1152,6 +1251,13 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', '
1152 var targetId = ''; 1251 var targetId = '';
1153 var searchType = ""; 1252 var searchType = "";
1154 var optons = ""; 1253 var optons = "";
  1254 + //阿里云显示平台
  1255 + if(/ALI_CLOUD/.test(resType)){
  1256 + $("#aliyun_plantform").parent().parent().removeClass("hide");
  1257 + form.render("select");
  1258 + }else{
  1259 + $("#aliyun_plantform").parent().parent().addClass("hide");
  1260 + }
1155 //华为云物理机,加载华为云集群查询条件 1261 //华为云物理机,加载华为云集群查询条件
1156 if (resType == 'HUAWEI_CLOUD_PHYSICSHOST') { 1262 if (resType == 'HUAWEI_CLOUD_PHYSICSHOST') {
1157 optons = "<option value=''>=所属集群=</option>" 1263 optons = "<option value=''>=所属集群=</option>"
@@ -1218,7 +1324,54 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' @@ -1218,7 +1324,54 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', '
1218 } else { 1324 } else {
1219 $("#res_vendor").parent().parent().addClass("hide"); 1325 $("#res_vendor").parent().parent().addClass("hide");
1220 } 1326 }
1221 - 1327 + if(/HUAWEI_CLOUD_VIRTUALHOST/.test(resType) || /ALI_CLOUD_ECS/.test(resType) || /VIRTUALIZATION_VMWARE_VHOST/.test(resType)){
  1328 + //绑定采集协议
  1329 + admin.req({
  1330 + url: domainName + '/api-web/manage/protocol/page',
  1331 + data: {
  1332 + access_token: accessToken,
  1333 + startTime: '',
  1334 + endTime: '',
  1335 + keyword: '',
  1336 + hasParam: '',
  1337 + limit: -1
  1338 + }
  1339 + }).done(function (res) {
  1340 + xmSelect.render({
  1341 + el: '#collProtocolSelect'
  1342 + , filterable: true
  1343 + , tips: '=采集协议='
  1344 + , name: 'collProtocols'
  1345 + , prop: {
  1346 + name: 'protocolName',
  1347 + value: 'protocolCode',
  1348 + }
  1349 + , model: {
  1350 + label: {
  1351 + type: 'block',
  1352 + block: {
  1353 + //最大显示数量, 0:不限制
  1354 + showCount: 1,
  1355 + //是否显示删除图标
  1356 + showIcon: true,
  1357 + }
  1358 + }
  1359 + }
  1360 + , data: res.data
  1361 + , hide: function () {
  1362 + var selectValue = xmSelect.get('#collProtocolSelect', true).getValue('value');
  1363 + collProtocols = selectValue.join(',');
  1364 + form.render()
  1365 + reloadTable();
  1366 + if (collProtocols) {
  1367 + xmSelect.get('#collProtocolSelect', true).setValue([]);
  1368 + collProtocols = '';
  1369 + form.render();
  1370 + }
  1371 + }
  1372 + })
  1373 + })
  1374 + }
1222 if (resType === 'HOST_MINICOMPUTER_PARTITION') { 1375 if (resType === 'HOST_MINICOMPUTER_PARTITION') {
1223 $("#res_minicomputer").parent().parent().removeClass("hide"); 1376 $("#res_minicomputer").parent().parent().removeClass("hide");
1224 var minicomputerStr = ''; 1377 var minicomputerStr = '';
@@ -1260,9 +1413,11 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' @@ -1260,9 +1413,11 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', '
1260 form.render("select"); 1413 form.render("select");
1261 }) 1414 })
1262 } 1415 }
  1416 +
1263 if(subflag && !resTypeSelectExclude.includes(resType)){ 1417 if(subflag && !resTypeSelectExclude.includes(resType)){
1264 if(/ALI_CLOUD_/.test(resType) || /HUAWEI_CLOUD_/.test(resType)) { 1418 if(/ALI_CLOUD_/.test(resType) || /HUAWEI_CLOUD_/.test(resType)) {
1265 - return 1419 +
  1420 + return;
1266 } 1421 }
1267 $("#res_sub_restype").parent().parent().removeClass("hide"); 1422 $("#res_sub_restype").parent().parent().removeClass("hide");
1268 $(".top-head-info").removeClass("hide"); 1423 $(".top-head-info").removeClass("hide");
@@ -1380,7 +1535,9 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' @@ -1380,7 +1535,9 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', '
1380 ptId: $("#res_platform").val(), 1535 ptId: $("#res_platform").val(),
1381 subResType:$("#res_sub_restype").val(), 1536 subResType:$("#res_sub_restype").val(),
1382 provider: $("#res_vendor").val(), 1537 provider: $("#res_vendor").val(),
1383 - resCategory: 'resources' 1538 + resCategory: 'resources',
  1539 + collProtocols:collProtocols,
  1540 + platform: $("#aliyun_plantform").val(),
1384 } 1541 }
1385 }) 1542 })
1386 } 1543 }
@@ -52,6 +52,12 @@ @@ -52,6 +52,12 @@
52 </div> 52 </div>
53 </div> 53 </div>
54 <div class="layui-inline"> 54 <div class="layui-inline">
  55 + <div class="layui-input-inline layui-input-inline--long" style="width: 180px;">
  56 + <div id="collProtocolSelect" class="xm-select">
  57 + </div>
  58 + </div>
  59 + </div>
  60 + <div class="layui-inline">
55 <div class="layui-input-inline"> 61 <div class="layui-input-inline">
56 <select name="parentId" id="slt_res_manage_superior" lay-filter="slt_res_manage_superior"> 62 <select name="parentId" id="slt_res_manage_superior" lay-filter="slt_res_manage_superior">
57 63
@@ -94,6 +94,7 @@ @@ -94,6 +94,7 @@
94 </select> 94 </select>
95 </div> 95 </div>
96 </div> 96 </div>
  97 +
97 <div class="layui-inline"> 98 <div class="layui-inline">
98 <div class="layui-input-inline"> 99 <div class="layui-input-inline">
99 <select name="label" id="biz_reslist_state" lay-filter="biz_reslist_state"> 100 <select name="label" id="biz_reslist_state" lay-filter="biz_reslist_state">
@@ -105,6 +106,20 @@ @@ -105,6 +106,20 @@
105 </select> 106 </select>
106 </div> 107 </div>
107 </div> 108 </div>
  109 + <div class="layui-inline">
  110 + <div class="layui-input-inline layui-input-inline--long" style="width: 180px;">
  111 + <div id="collProtocolSelect" class="xm-select">
  112 + </div>
  113 + </div>
  114 + </div>
  115 + <div class="layui-inline hide">
  116 + <div class="layui-input-inline">
  117 + <select name="platform" id="aliyun_plantform" lay-filter="aliyun_plantform">
  118 + <option value="">=阿里回迁云平台=</option>
  119 + <option value="阿里云">=阿里云平台=</option>
  120 + </select>
  121 + </div>
  122 + </div>
108 </div> 123 </div>
109 124
110 <!--树表格的检索条件--> 125 <!--树表格的检索条件-->
@@ -153,6 +153,12 @@ @@ -153,6 +153,12 @@
153 </select> 153 </select>
154 </div> 154 </div>
155 </div> 155 </div>
  156 + <div class="layui-inline">
  157 + <div class="layui-input-inline layui-input-inline--long" style="width: 180px;">
  158 + <div id="collProtocolSelect" class="xm-select">
  159 + </div>
  160 + </div>
  161 + </div>
156 <div class="layui-inline hide" > 162 <div class="layui-inline hide" >
157 <div class="layui-input-inline"> 163 <div class="layui-input-inline">
158 <select name="label" id="res_sub_restype" lay-filter="sub_restype"> 164 <select name="label" id="res_sub_restype" lay-filter="sub_restype">
@@ -174,6 +180,14 @@ @@ -174,6 +180,14 @@
174 </select> 180 </select>
175 </div> 181 </div>
176 </div> 182 </div>
  183 + <div class="layui-inline hide">
  184 + <div class="layui-input-inline">
  185 + <select name="platform" id="aliyun_plantform" lay-filter="aliyun_plantform">
  186 + <option value="">=阿里回迁云平台=</option>
  187 + <option value="阿里云">=阿里云平台=</option>
  188 + </select>
  189 + </div>
  190 + </div>
177 </div> 191 </div>
178 </form> 192 </form>
179 </div> 193 </div>
@@ -228,15 +242,11 @@ @@ -228,15 +242,11 @@
228 </div> 242 </div>
229 </div> 243 </div>
230 <div class="layui-inline"> 244 <div class="layui-inline">
231 -<!-- <div class="layui-input-inline">-->  
232 -<!-- <select name="label" id="treetableBizTypes" lay-filter="treetableBizTypes">-->  
233 -<!-- <option value="">=所属业务=</option>-->  
234 -<!-- </select>-->  
235 -<!-- </div>-->  
236 <div class="layui-input-inline layui-input-inline--long"> 245 <div class="layui-input-inline layui-input-inline--long">
237 <div id="treetableBizTypes" class="xm-select-demo"></div> 246 <div id="treetableBizTypes" class="xm-select-demo"></div>
238 </div> 247 </div>
239 </div> 248 </div>
  249 +
240 <div class="layui-inline" id="virtual_platform_div_id"> 250 <div class="layui-inline" id="virtual_platform_div_id">
241 <div class="layui-input-inline"> 251 <div class="layui-input-inline">
242 <select name="label" id="virtual_platForm_select" lay-filter="virtual_platForm_select"> 252 <select name="label" id="virtual_platForm_select" lay-filter="virtual_platForm_select">
@@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
4 <div class="layui-tab layui-tab-card" lay-filter="detail-tab"> 4 <div class="layui-tab layui-tab-card" lay-filter="detail-tab">
5 <ul class="layui-tab-title"> 5 <ul class="layui-tab-title">
6 <li class="layui-this">数据库信息</li> 6 <li class="layui-this">数据库信息</li>
7 - <li>RAC信息</li> 7 + <!--<li>RAC信息</li>-->
8 </ul> 8 </ul>
9 <div class="layui-tab-content"> 9 <div class="layui-tab-content">
10 <div class="layui-tab-item layui-show"> 10 <div class="layui-tab-item layui-show">