|
@@ -15,7 +15,7 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'treeTable' |
|
@@ -15,7 +15,7 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'treeTable' |
15
|
var domainId = '';//当前域Id
|
15
|
var domainId = '';//当前域Id
|
16
|
var curTreeNode = '';
|
16
|
var curTreeNode = '';
|
17
|
var curDomainResType = '';//当前域所在的资源类型
|
17
|
var curDomainResType = '';//当前域所在的资源类型
|
18
|
-
|
18
|
+ var parentId = 'null';
|
19
|
var sortKey = '';
|
19
|
var sortKey = '';
|
20
|
|
20
|
|
21
|
function autoHeight(el) {
|
21
|
function autoHeight(el) {
|
|
@@ -353,6 +353,8 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'treeTable' |
|
@@ -353,6 +353,8 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'treeTable' |
353
|
//集群选择事件
|
353
|
//集群选择事件
|
354
|
form.on('select(domain_res_cluster)', function (data) {
|
354
|
form.on('select(domain_res_cluster)', function (data) {
|
355
|
// renderList(busId, curBizResType);
|
355
|
// renderList(busId, curBizResType);
|
|
|
356
|
+ parentId = $('#domain_res_cluster').val();
|
|
|
357
|
+ renderParentList(curDomainResType);
|
356
|
reloadTable();
|
358
|
reloadTable();
|
357
|
});
|
359
|
});
|
358
|
//资源池选择事件
|
360
|
//资源池选择事件
|
|
@@ -431,214 +433,6 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'treeTable' |
|
@@ -431,214 +433,6 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'treeTable' |
431
|
|
433
|
|
432
|
form.render(null, 'domain-list-form');
|
434
|
form.render(null, 'domain-list-form');
|
433
|
setOpenStow();
|
435
|
setOpenStow();
|
434
|
-
|
|
|
435
|
- // var cols = [{type: 'numbers', title: '序号', align: 'center', fixed: 'left'}
|
|
|
436
|
- // , {
|
|
|
437
|
- // field: 'resName', title: '资源名称', minWidth: 210, align: 'center', sort: true,
|
|
|
438
|
- // templet: '<div><span data-zymc="{{ d.resId }}" data-restype="{{d.resType}}" data-name="{{d.resName}}" data-ip="{{ d.ip }}" data-resTypeName="{{ d.resTypeName }}" data-admin="{{ d.admin }}" data-pingenable="{{d.pingEnable}}" class="layui-table-link">{{ d.resName }}</span></div>'
|
|
|
439
|
- // }
|
|
|
440
|
- // , {field: 'ip', title: 'IP地址', minWidth: 150, align: 'center', sort: true}
|
|
|
441
|
- // , {field: 'admin', title: '负责人', minWidth: 100, align: 'center', sort: true}
|
|
|
442
|
- // , {field: 'resTypeName', title: '资源类型', minWidth: 150, align: 'center', sort: true}
|
|
|
443
|
- // , {
|
|
|
444
|
- // field: 'healthDesc',
|
|
|
445
|
- // title: '健康状态',
|
|
|
446
|
- // minWidth: 100,
|
|
|
447
|
- // align: 'center',
|
|
|
448
|
- // sort: true,
|
|
|
449
|
- // templet: '#domainhealthTpl'
|
|
|
450
|
- // }, {
|
|
|
451
|
- // field: 'state',
|
|
|
452
|
- // title: '资源状态',
|
|
|
453
|
- // minWidth: 100,
|
|
|
454
|
- // align: 'center',
|
|
|
455
|
- // sort: true,
|
|
|
456
|
- // templet:'#domainIndexResStateTpl'
|
|
|
457
|
- // }];
|
|
|
458
|
- // // , {
|
|
|
459
|
- // // field: 'state',
|
|
|
460
|
- // // title: '连接状态',
|
|
|
461
|
- // // minWidth: 100,
|
|
|
462
|
- // // align: 'center',
|
|
|
463
|
- // // templet: '#ljztDomainListTpl'
|
|
|
464
|
- // // }
|
|
|
465
|
- // if (resType && resType != 'PASSWORD_SERVER') {
|
|
|
466
|
- // cols.push({
|
|
|
467
|
- // field: 'linkState',
|
|
|
468
|
- // title: '连接状态',
|
|
|
469
|
- // align: 'center',
|
|
|
470
|
- // minWidth: 100,
|
|
|
471
|
- // templet: '#ljztDomainListTpl',
|
|
|
472
|
- // sort: true,
|
|
|
473
|
- // });
|
|
|
474
|
- // }
|
|
|
475
|
- // //数据库、中间件、动环相关不展示CPU使用率、内存使用率、防火墙、交换机
|
|
|
476
|
- // if (resType) {
|
|
|
477
|
- // if(resType.indexOf("HOST") >-1){
|
|
|
478
|
- // cols.push({
|
|
|
479
|
- // field: 'fileSysUseRate',
|
|
|
480
|
- // title: '最大文件系统使用率',
|
|
|
481
|
- // align: 'center',
|
|
|
482
|
- // minWidth: 200,
|
|
|
483
|
- // templet: '#domainFileUseRateTpl',
|
|
|
484
|
- // sort:true
|
|
|
485
|
- // });
|
|
|
486
|
- // }
|
|
|
487
|
- // //数据库、中间件、网络社保、动环相关不展示指标信息
|
|
|
488
|
- // if (resType.indexOf('MIDDLEWARE_') == -1 && resType.indexOf("GPDXT") == -1 && resType.indexOf("KQTJXT") == -1
|
|
|
489
|
- // && resType.indexOf("XFXT") == -1 && resType.indexOf("JFCDHJ") == -1 && resType.indexOf("DATABASE_") == -1
|
|
|
490
|
- // && resType.indexOf("STORAGE_") == '-1' && resType.indexOf("HUAWEI_CLOUD_COLONY") == -1
|
|
|
491
|
- // && resType.indexOf("HUAWEI_CLOUD_CLUSTER") == -1 && resType.indexOf("HOST_ONECOMPUTER") == -1
|
|
|
492
|
- // && resType.indexOf("VIRTUALIZATION_VMWARE_VHOST") == -1 && resType != 'ALI_CLOUD_SLB' && resType != 'ALI_CLOUD_OSS' && resType != 'ALI_ARMS_APP' && resType != 'PASSWORD_SERVER') {
|
|
|
493
|
- // cols.push({
|
|
|
494
|
- // field: 'cpuRate',
|
|
|
495
|
- // title: 'CPU使用率',
|
|
|
496
|
- // align: 'center',
|
|
|
497
|
- // minWidth: 120,
|
|
|
498
|
- // templet: '#sllDomainListTpl',
|
|
|
499
|
- // sort: true,
|
|
|
500
|
- // });
|
|
|
501
|
- // cols.push({
|
|
|
502
|
- // field: 'memoryRate',
|
|
|
503
|
- // title: '内存使用率',
|
|
|
504
|
- // align: 'center',
|
|
|
505
|
- // minWidth: 120,
|
|
|
506
|
- // templet: '#ncDomainListTpl',
|
|
|
507
|
- // sort: true,
|
|
|
508
|
- // });
|
|
|
509
|
- // } else {
|
|
|
510
|
- // //交换机、防火墙
|
|
|
511
|
- // // if (resType.indexOf("_SWITCHBOARD") != '-1' || resType.indexOf("_FIREWALL") != '-1') {
|
|
|
512
|
- // // cols.push({
|
|
|
513
|
- // // field: 'cpuRate',
|
|
|
514
|
- // // title: 'CPU平均使用率',
|
|
|
515
|
- // // align: 'center',
|
|
|
516
|
- // // minWidth: 120,
|
|
|
517
|
- // // templet: '#cpupjDomainListTpl'
|
|
|
518
|
- // // });
|
|
|
519
|
- // // cols.push({
|
|
|
520
|
- // // field: 'memoryRate',
|
|
|
521
|
- // // title: '内存平均使用率',
|
|
|
522
|
- // // align: 'center',
|
|
|
523
|
- // // minWidth: 120,
|
|
|
524
|
- // // templet: '#ncpjDomainListTpl'
|
|
|
525
|
- // // });
|
|
|
526
|
- // // }
|
|
|
527
|
- // //数据库
|
|
|
528
|
- // if (resType.indexOf("DATABASE") != -1) {
|
|
|
529
|
- // cols.push({
|
|
|
530
|
- // field: 'cpuRate',
|
|
|
531
|
- // title: '活动会话百分比',
|
|
|
532
|
- // align: 'center',
|
|
|
533
|
- // minWidth: 120,
|
|
|
534
|
- // templet: '#hhDomainListTpl',
|
|
|
535
|
- // sort: true,
|
|
|
536
|
- // });
|
|
|
537
|
- // cols.push({
|
|
|
538
|
- // field: 'tableSpaceUseRate',
|
|
|
539
|
- // title: '表空间使用率(最大)',
|
|
|
540
|
- // align: 'center',
|
|
|
541
|
- // minWidth: 180,
|
|
|
542
|
- // templet: '#domainTableSpaceUseRateTpl',
|
|
|
543
|
- // sort: true
|
|
|
544
|
- // });
|
|
|
545
|
- // cols.push({
|
|
|
546
|
- // field: 'lockNum',
|
|
|
547
|
- // title: '当前会话锁数量',
|
|
|
548
|
- // align: 'center',
|
|
|
549
|
- // minWidth: 120,
|
|
|
550
|
- // sort: true
|
|
|
551
|
- // });
|
|
|
552
|
- // }
|
|
|
553
|
- // //华为云资源池与华为云集群
|
|
|
554
|
- // if (resType.indexOf('HUAWEI_CLOUD_COLONY') != -1 || resType.indexOf('HUAWEI_CLOUD_CLUSTER') != -1) {
|
|
|
555
|
- // cols.push({field: 'cpuSetRate', title: 'CPU分配率', align: 'center', minWidth: 120, templet: '#cpusetrateDomainListTpl'});
|
|
|
556
|
- // cols.push({field: 'memorySetRate', title: '内存分配率', align: 'center', minWidth: 120, templet: '#memsetrateDomainListTpl'});
|
|
|
557
|
- // if (resType.indexOf('HUAWEI_CLOUD_COLONY') != -1) {
|
|
|
558
|
- // cols.push({field: 'storageSetRate', title: '存储分配率', align: 'center', minWidth: 120, templet: '#storagesetrateDomainListTpl'});
|
|
|
559
|
- // }
|
|
|
560
|
- // }
|
|
|
561
|
- // //vmware虚拟机 joke add 20200528
|
|
|
562
|
- // if (resType == 'VIRTUALIZATION_VMWARE_VHOST') {
|
|
|
563
|
- // cols.push({
|
|
|
564
|
- // field: 'cpuRate',
|
|
|
565
|
- // title: 'CPU使用率',
|
|
|
566
|
- // align: 'center',
|
|
|
567
|
- // minWidth: 120,
|
|
|
568
|
- // templet: '#sllresListTpl',
|
|
|
569
|
- // sort: true,
|
|
|
570
|
- // });
|
|
|
571
|
- // cols.push({
|
|
|
572
|
- // field: 'memoryRate',
|
|
|
573
|
- // title: '内存使用率',
|
|
|
574
|
- // align: 'center',
|
|
|
575
|
- // minWidth: 120,
|
|
|
576
|
- // templet: '#ncresListTpl',
|
|
|
577
|
- // sort: true,
|
|
|
578
|
- // });
|
|
|
579
|
- // cols.push({
|
|
|
580
|
- // field: 'platform',
|
|
|
581
|
- // title: '所属平台',
|
|
|
582
|
- // align: 'center',
|
|
|
583
|
- // minWidth: 120,
|
|
|
584
|
- // sort: true,
|
|
|
585
|
- // });
|
|
|
586
|
- // cols.push({
|
|
|
587
|
- // field: 'resRemark',
|
|
|
588
|
- // title: '资源备注',
|
|
|
589
|
- // align: 'center',
|
|
|
590
|
- // minWidth: 120,
|
|
|
591
|
- // sort: true,
|
|
|
592
|
- // });
|
|
|
593
|
- // // cols.push({
|
|
|
594
|
- // // field: 'cpuSize',
|
|
|
595
|
- // // title: 'CPU大小',
|
|
|
596
|
- // // align: 'center',
|
|
|
597
|
- // // minWidth: 120
|
|
|
598
|
- // // });
|
|
|
599
|
- // cols.push({
|
|
|
600
|
- // field: 'memorySize',
|
|
|
601
|
- // title: '内存大小(GB)',
|
|
|
602
|
- // align: 'center',
|
|
|
603
|
- // minWidth: 120,
|
|
|
604
|
- // sort: true,
|
|
|
605
|
- // });
|
|
|
606
|
- // cols.push({
|
|
|
607
|
- // field: 'diskSize',
|
|
|
608
|
- // title: '磁盘大小(GB)',
|
|
|
609
|
- // align: 'center',
|
|
|
610
|
- // minWidth: 120,
|
|
|
611
|
- // sort: true,
|
|
|
612
|
- // });
|
|
|
613
|
- // }
|
|
|
614
|
- // if (resType == 'ALI_ARMS_APP') {
|
|
|
615
|
- // cols.push({
|
|
|
616
|
- // field: 'createTimeStr',
|
|
|
617
|
- // title: '创建时间',
|
|
|
618
|
- // align: 'center',
|
|
|
619
|
- // minWidth: 180,
|
|
|
620
|
- // sort: true,
|
|
|
621
|
- // });
|
|
|
622
|
- // cols.push({
|
|
|
623
|
- // field: 'updateTimeStr',
|
|
|
624
|
- // title: '修改时间',
|
|
|
625
|
- // align: 'center',
|
|
|
626
|
- // minWidth: 180,
|
|
|
627
|
- // sort: true,
|
|
|
628
|
- // });
|
|
|
629
|
- // }
|
|
|
630
|
- // if (resType == 'PASSWORD_SERVER') {
|
|
|
631
|
- // cols.push({
|
|
|
632
|
- // field: 'pingStatus',
|
|
|
633
|
- // title: 'PING状态',
|
|
|
634
|
- // align: 'center',
|
|
|
635
|
- // minWidth: 120,
|
|
|
636
|
- // templet: '#domainpingTpl',
|
|
|
637
|
- // sort: true,
|
|
|
638
|
- // });
|
|
|
639
|
- // }
|
|
|
640
|
- // }
|
|
|
641
|
- // }
|
|
|
642
|
var domainName = '', addr = '';
|
436
|
var domainName = '', addr = '';
|
643
|
if (domainId.indexOf(',') > 0) {
|
437
|
if (domainId.indexOf(',') > 0) {
|
644
|
domainName = domainId.substring(0, domainId.indexOf(','));
|
438
|
domainName = domainId.substring(0, domainId.indexOf(','));
|
|
@@ -677,7 +471,7 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'treeTable' |
|
@@ -677,7 +471,7 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'treeTable' |
677
|
domainName: domainName,
|
471
|
domainName: domainName,
|
678
|
addr: addr,
|
472
|
addr: addr,
|
679
|
colonlyId: $("#domain_res_colony").val(),
|
473
|
colonlyId: $("#domain_res_colony").val(),
|
680
|
- parentId: $("#domain_res_cluster").val(),
|
474
|
+ parentId: parentId,
|
681
|
linkState: $("#domainlink_state").val(),
|
475
|
linkState: $("#domainlink_state").val(),
|
682
|
state: $("#domain_state").val(),
|
476
|
state: $("#domain_state").val(),
|
683
|
resCategory: 'resources'
|
477
|
resCategory: 'resources'
|
|
@@ -810,213 +604,6 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'treeTable' |
|
@@ -810,213 +604,6 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'treeTable' |
810
|
form.render(null, 'domain-list-form');
|
604
|
form.render(null, 'domain-list-form');
|
811
|
setOpenStow();
|
605
|
setOpenStow();
|
812
|
|
606
|
|
813
|
- // var cols = [{type: 'numbers', title: '序号', align: 'center', fixed: 'left'}
|
|
|
814
|
- // , {
|
|
|
815
|
- // field: 'resName', title: '资源名称', minWidth: 210, align: 'center', sort: true,
|
|
|
816
|
- // templet: '<div><span data-zymc="{{ d.resId }}" data-restype="{{d.resType}}" data-name="{{d.resName}}" data-ip="{{ d.ip }}" data-resTypeName="{{ d.resTypeName }}" data-admin="{{ d.admin }}" data-pingenable="{{d.pingEnable}}" class="layui-table-link">{{ d.resName }}</span></div>'
|
|
|
817
|
- // }
|
|
|
818
|
- // , {field: 'ip', title: 'IP地址', minWidth: 150, align: 'center', sort: true}
|
|
|
819
|
- // , {field: 'admin', title: '负责人', minWidth: 100, align: 'center', sort: true}
|
|
|
820
|
- // , {field: 'resTypeName', title: '资源类型', minWidth: 150, align: 'center', sort: true}
|
|
|
821
|
- // , {
|
|
|
822
|
- // field: 'healthDesc',
|
|
|
823
|
- // title: '健康状态',
|
|
|
824
|
- // minWidth: 100,
|
|
|
825
|
- // align: 'center',
|
|
|
826
|
- // sort: true,
|
|
|
827
|
- // templet: '#domainhealthTpl'
|
|
|
828
|
- // }, {
|
|
|
829
|
- // field: 'state',
|
|
|
830
|
- // title: '资源状态',
|
|
|
831
|
- // minWidth: 100,
|
|
|
832
|
- // align: 'center',
|
|
|
833
|
- // sort: true,
|
|
|
834
|
- // templet:'#domainIndexResStateTpl'
|
|
|
835
|
- // }];
|
|
|
836
|
- // // , {
|
|
|
837
|
- // // field: 'state',
|
|
|
838
|
- // // title: '连接状态',
|
|
|
839
|
- // // minWidth: 100,
|
|
|
840
|
- // // align: 'center',
|
|
|
841
|
- // // templet: '#ljztDomainListTpl'
|
|
|
842
|
- // // }
|
|
|
843
|
- // if (resType && resType != 'PASSWORD_SERVER') {
|
|
|
844
|
- // cols.push({
|
|
|
845
|
- // field: 'linkState',
|
|
|
846
|
- // title: '连接状态',
|
|
|
847
|
- // align: 'center',
|
|
|
848
|
- // minWidth: 100,
|
|
|
849
|
- // templet: '#ljztDomainListTpl',
|
|
|
850
|
- // sort: true,
|
|
|
851
|
- // });
|
|
|
852
|
- // }
|
|
|
853
|
- // //数据库、中间件、动环相关不展示CPU使用率、内存使用率、防火墙、交换机
|
|
|
854
|
- // if (resType) {
|
|
|
855
|
- // if(resType.indexOf("HOST") >-1){
|
|
|
856
|
- // cols.push({
|
|
|
857
|
- // field: 'fileSysUseRate',
|
|
|
858
|
- // title: '最大文件系统使用率',
|
|
|
859
|
- // align: 'center',
|
|
|
860
|
- // minWidth: 200,
|
|
|
861
|
- // templet: '#domainFileUseRateTpl',
|
|
|
862
|
- // sort:true
|
|
|
863
|
- // });
|
|
|
864
|
- // }
|
|
|
865
|
- // //数据库、中间件、网络社保、动环相关不展示指标信息
|
|
|
866
|
- // if (resType.indexOf('MIDDLEWARE_') == -1 && resType.indexOf("GPDXT") == -1 && resType.indexOf("KQTJXT") == -1
|
|
|
867
|
- // && resType.indexOf("XFXT") == -1 && resType.indexOf("JFCDHJ") == -1 && resType.indexOf("DATABASE_") == -1
|
|
|
868
|
- // && resType.indexOf("STORAGE_") == '-1' && resType.indexOf("HUAWEI_CLOUD_COLONY") == -1
|
|
|
869
|
- // && resType.indexOf("HUAWEI_CLOUD_CLUSTER") == -1 && resType.indexOf("HOST_ONECOMPUTER") == -1
|
|
|
870
|
- // && resType.indexOf("VIRTUALIZATION_VMWARE_VHOST") == -1 && resType != 'ALI_CLOUD_SLB' && resType != 'ALI_CLOUD_OSS' && resType != 'ALI_ARMS_APP' && resType != 'PASSWORD_SERVER') {
|
|
|
871
|
- // cols.push({
|
|
|
872
|
- // field: 'cpuRate',
|
|
|
873
|
- // title: 'CPU使用率',
|
|
|
874
|
- // align: 'center',
|
|
|
875
|
- // minWidth: 120,
|
|
|
876
|
- // templet: '#sllDomainListTpl',
|
|
|
877
|
- // sort: true,
|
|
|
878
|
- // });
|
|
|
879
|
- // cols.push({
|
|
|
880
|
- // field: 'memoryRate',
|
|
|
881
|
- // title: '内存使用率',
|
|
|
882
|
- // align: 'center',
|
|
|
883
|
- // minWidth: 120,
|
|
|
884
|
- // templet: '#ncDomainListTpl',
|
|
|
885
|
- // sort: true,
|
|
|
886
|
- // });
|
|
|
887
|
- // } else {
|
|
|
888
|
- // //交换机、防火墙
|
|
|
889
|
- // // if (resType.indexOf("_SWITCHBOARD") != '-1' || resType.indexOf("_FIREWALL") != '-1') {
|
|
|
890
|
- // // cols.push({
|
|
|
891
|
- // // field: 'cpuRate',
|
|
|
892
|
- // // title: 'CPU平均使用率',
|
|
|
893
|
- // // align: 'center',
|
|
|
894
|
- // // minWidth: 120,
|
|
|
895
|
- // // templet: '#cpupjDomainListTpl'
|
|
|
896
|
- // // });
|
|
|
897
|
- // // cols.push({
|
|
|
898
|
- // // field: 'memoryRate',
|
|
|
899
|
- // // title: '内存平均使用率',
|
|
|
900
|
- // // align: 'center',
|
|
|
901
|
- // // minWidth: 120,
|
|
|
902
|
- // // templet: '#ncpjDomainListTpl'
|
|
|
903
|
- // // });
|
|
|
904
|
- // // }
|
|
|
905
|
- // //数据库
|
|
|
906
|
- // if (resType.indexOf("DATABASE") != -1) {
|
|
|
907
|
- // cols.push({
|
|
|
908
|
- // field: 'cpuRate',
|
|
|
909
|
- // title: '活动会话百分比',
|
|
|
910
|
- // align: 'center',
|
|
|
911
|
- // minWidth: 120,
|
|
|
912
|
- // templet: '#hhDomainListTpl',
|
|
|
913
|
- // sort: true,
|
|
|
914
|
- // });
|
|
|
915
|
- // cols.push({
|
|
|
916
|
- // field: 'tableSpaceUseRate',
|
|
|
917
|
- // title: '表空间使用率(最大)',
|
|
|
918
|
- // align: 'center',
|
|
|
919
|
- // minWidth: 180,
|
|
|
920
|
- // templet: '#domainTableSpaceUseRateTpl',
|
|
|
921
|
- // sort: true
|
|
|
922
|
- // });
|
|
|
923
|
- // cols.push({
|
|
|
924
|
- // field: 'lockNum',
|
|
|
925
|
- // title: '当前会话锁数量',
|
|
|
926
|
- // align: 'center',
|
|
|
927
|
- // minWidth: 120,
|
|
|
928
|
- // sort: true
|
|
|
929
|
- // });
|
|
|
930
|
- // }
|
|
|
931
|
- // //华为云资源池与华为云集群
|
|
|
932
|
- // if (resType.indexOf('HUAWEI_CLOUD_COLONY') != -1 || resType.indexOf('HUAWEI_CLOUD_CLUSTER') != -1) {
|
|
|
933
|
- // cols.push({field: 'cpuSetRate', title: 'CPU分配率', align: 'center', minWidth: 120, templet: '#cpusetrateDomainListTpl'});
|
|
|
934
|
- // cols.push({field: 'memorySetRate', title: '内存分配率', align: 'center', minWidth: 120, templet: '#memsetrateDomainListTpl'});
|
|
|
935
|
- // if (resType.indexOf('HUAWEI_CLOUD_COLONY') != -1) {
|
|
|
936
|
- // cols.push({field: 'storageSetRate', title: '存储分配率', align: 'center', minWidth: 120, templet: '#storagesetrateDomainListTpl'});
|
|
|
937
|
- // }
|
|
|
938
|
- // }
|
|
|
939
|
- // //vmware虚拟机 joke add 20200528
|
|
|
940
|
- // if (resType == 'VIRTUALIZATION_VMWARE_VHOST') {
|
|
|
941
|
- // cols.push({
|
|
|
942
|
- // field: 'cpuRate',
|
|
|
943
|
- // title: 'CPU使用率',
|
|
|
944
|
- // align: 'center',
|
|
|
945
|
- // minWidth: 120,
|
|
|
946
|
- // templet: '#sllresListTpl',
|
|
|
947
|
- // sort: true,
|
|
|
948
|
- // });
|
|
|
949
|
- // cols.push({
|
|
|
950
|
- // field: 'memoryRate',
|
|
|
951
|
- // title: '内存使用率',
|
|
|
952
|
- // align: 'center',
|
|
|
953
|
- // minWidth: 120,
|
|
|
954
|
- // templet: '#ncresListTpl',
|
|
|
955
|
- // sort: true,
|
|
|
956
|
- // });
|
|
|
957
|
- // cols.push({
|
|
|
958
|
- // field: 'platform',
|
|
|
959
|
- // title: '所属平台',
|
|
|
960
|
- // align: 'center',
|
|
|
961
|
- // minWidth: 120,
|
|
|
962
|
- // sort: true,
|
|
|
963
|
- // });
|
|
|
964
|
- // cols.push({
|
|
|
965
|
- // field: 'resRemark',
|
|
|
966
|
- // title: '资源备注',
|
|
|
967
|
- // align: 'center',
|
|
|
968
|
- // minWidth: 120,
|
|
|
969
|
- // sort: true,
|
|
|
970
|
- // });
|
|
|
971
|
- // // cols.push({
|
|
|
972
|
- // // field: 'cpuSize',
|
|
|
973
|
- // // title: 'CPU大小',
|
|
|
974
|
- // // align: 'center',
|
|
|
975
|
- // // minWidth: 120
|
|
|
976
|
- // // });
|
|
|
977
|
- // cols.push({
|
|
|
978
|
- // field: 'memorySize',
|
|
|
979
|
- // title: '内存大小(GB)',
|
|
|
980
|
- // align: 'center',
|
|
|
981
|
- // minWidth: 120,
|
|
|
982
|
- // sort: true,
|
|
|
983
|
- // });
|
|
|
984
|
- // cols.push({
|
|
|
985
|
- // field: 'diskSize',
|
|
|
986
|
- // title: '磁盘大小(GB)',
|
|
|
987
|
- // align: 'center',
|
|
|
988
|
- // minWidth: 120,
|
|
|
989
|
- // sort: true,
|
|
|
990
|
- // });
|
|
|
991
|
- // }
|
|
|
992
|
- // if (resType == 'ALI_ARMS_APP') {
|
|
|
993
|
- // cols.push({
|
|
|
994
|
- // field: 'createTimeStr',
|
|
|
995
|
- // title: '创建时间',
|
|
|
996
|
- // align: 'center',
|
|
|
997
|
- // minWidth: 180,
|
|
|
998
|
- // sort: true,
|
|
|
999
|
- // });
|
|
|
1000
|
- // cols.push({
|
|
|
1001
|
- // field: 'updateTimeStr',
|
|
|
1002
|
- // title: '修改时间',
|
|
|
1003
|
- // align: 'center',
|
|
|
1004
|
- // minWidth: 180,
|
|
|
1005
|
- // sort: true,
|
|
|
1006
|
- // });
|
|
|
1007
|
- // }
|
|
|
1008
|
- // if (resType == 'PASSWORD_SERVER') {
|
|
|
1009
|
- // cols.push({
|
|
|
1010
|
- // field: 'pingStatus',
|
|
|
1011
|
- // title: 'PING状态',
|
|
|
1012
|
- // align: 'center',
|
|
|
1013
|
- // minWidth: 120,
|
|
|
1014
|
- // templet: '#domainpingTpl',
|
|
|
1015
|
- // sort: true,
|
|
|
1016
|
- // });
|
|
|
1017
|
- // }
|
|
|
1018
|
- // }
|
|
|
1019
|
- // }
|
|
|
1020
|
var domainName = '', addr = '';
|
607
|
var domainName = '', addr = '';
|
1021
|
if (domainId.indexOf(',') > 0) {
|
608
|
if (domainId.indexOf(',') > 0) {
|
1022
|
domainName = domainId.substring(0, domainId.indexOf(','));
|
609
|
domainName = domainId.substring(0, domainId.indexOf(','));
|
|
@@ -1024,8 +611,13 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'treeTable' |
|
@@ -1024,8 +611,13 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'treeTable' |
1024
|
} else {
|
611
|
} else {
|
1025
|
domainName = domainId.substring(1);
|
612
|
domainName = domainId.substring(1);
|
1026
|
}
|
613
|
}
|
|
|
614
|
+ let colResType = resType;
|
|
|
615
|
+ if (colResType == 'MIDDLEWARE_WEBLOGIC' && parentId == 'null') {
|
|
|
616
|
+ // 展示控制台的表头
|
|
|
617
|
+ colResType = 'MIDDLEWARE_WEBLOGICCONSOLE'
|
|
|
618
|
+ }
|
1027
|
//渲染表格
|
619
|
//渲染表格
|
1028
|
- var cols = commonCols.resTypeCls[resType];
|
620
|
+ var cols = commonCols.resTypeCls[colResType];
|
1029
|
//获取配置的列
|
621
|
//获取配置的列
|
1030
|
common.getTableCols({
|
622
|
common.getTableCols({
|
1031
|
domId: 'domainParentListTable',
|
623
|
domId: 'domainParentListTable',
|
|
@@ -1049,7 +641,7 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'treeTable' |
|
@@ -1049,7 +641,7 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'treeTable' |
1049
|
domainName: domainName,
|
641
|
domainName: domainName,
|
1050
|
addr: addr,
|
642
|
addr: addr,
|
1051
|
colonlyId: $("#domain_res_colony").val(),
|
643
|
colonlyId: $("#domain_res_colony").val(),
|
1052
|
- parentId: $("#domain_res_cluster").val(),
|
644
|
+ parentId: parentId,
|
1053
|
linkState: $("#domainlink_state").val(),
|
645
|
linkState: $("#domainlink_state").val(),
|
1054
|
state: $("#domain_state").val(),
|
646
|
state: $("#domain_state").val(),
|
1055
|
resCategory: 'resources'
|
647
|
resCategory: 'resources'
|
|
@@ -1465,7 +1057,8 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'treeTable' |
|
@@ -1465,7 +1057,8 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'treeTable' |
1465
|
targetId = "domain_res_cluster";
|
1057
|
targetId = "domain_res_cluster";
|
1466
|
$("#domain_res_cluster_id").show();
|
1058
|
$("#domain_res_cluster_id").show();
|
1467
|
} else if ("MIDDLEWARE_WEBLOGIC" == resType) {
|
1059
|
} else if ("MIDDLEWARE_WEBLOGIC" == resType) {
|
1468
|
- optons = "<option value=''>=所属控制台=</option>"
|
1060
|
+ optons = "<option value=''>=服务列表=</option>"
|
|
|
1061
|
+ optons += "<option value='null'>=控制台列表=</option>"
|
1469
|
searchType = "MIDDLEWARE_WEBLOGIC";
|
1062
|
searchType = "MIDDLEWARE_WEBLOGIC";
|
1470
|
targetId = 'domain_res_cluster'
|
1063
|
targetId = 'domain_res_cluster'
|
1471
|
$("#domain_res_cluster_id").show();
|
1064
|
$("#domain_res_cluster_id").show();
|
|
@@ -1512,6 +1105,7 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'treeTable' |
|
@@ -1512,6 +1105,7 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'treeTable' |
1512
|
};
|
1105
|
};
|
1513
|
if (searchType == 'MIDDLEWARE_WEBLOGIC') {
|
1106
|
if (searchType == 'MIDDLEWARE_WEBLOGIC') {
|
1514
|
conditon.parentId = 'null';
|
1107
|
conditon.parentId = 'null';
|
|
|
1108
|
+ conditon.parentType = 'parent';
|
1515
|
}
|
1109
|
}
|
1516
|
admin.req({
|
1110
|
admin.req({
|
1517
|
url: common.domainName + url,
|
1111
|
url: common.domainName + url,
|
|
@@ -1523,6 +1117,7 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'treeTable' |
|
@@ -1523,6 +1117,7 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'treeTable' |
1523
|
});
|
1117
|
});
|
1524
|
}
|
1118
|
}
|
1525
|
$('#' + targetId).html(optons);
|
1119
|
$('#' + targetId).html(optons);
|
|
|
1120
|
+ $('#domain_res_cluster').val(parentId);
|
1526
|
form.render("select");
|
1121
|
form.render("select");
|
1527
|
})
|
1122
|
})
|
1528
|
}
|
1123
|
}
|
|
@@ -1631,7 +1226,7 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'treeTable' |
|
@@ -1631,7 +1226,7 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'treeTable' |
1631
|
resHealth: $("#domain_resStatus").val(),
|
1226
|
resHealth: $("#domain_resStatus").val(),
|
1632
|
domainName: domainName,
|
1227
|
domainName: domainName,
|
1633
|
colonlyId: $("#domain_res_colony").val(),
|
1228
|
colonlyId: $("#domain_res_colony").val(),
|
1634
|
- parentId: $("#domain_res_cluster").val(),
|
1229
|
+ parentId: parentId,
|
1635
|
sortKey: sortKey,
|
1230
|
sortKey: sortKey,
|
1636
|
addr: addr,
|
1231
|
addr: addr,
|
1637
|
state: $("#domain_state").val(),
|
1232
|
state: $("#domain_state").val(),
|