Authored by 赵鹏军

Merge branch 'master-joke' into 'master'

chore:commonDetail.js中renderText增加传参,满足浙江基本信息展示cmdb信息

chore:commonDetail.js中renderText增加传参,满足浙江基本信息展示cmdb信息

See merge request !1124
@@ -791,8 +791,14 @@ layui.define(['xmSelect', 'md5'], function (exports) { @@ -791,8 +791,14 @@ layui.define(['xmSelect', 'md5'], function (exports) {
791 if (resType.indexOf('HOST_X86SERVER') != -1) { 791 if (resType.indexOf('HOST_X86SERVER') != -1) {
792 if (bean.provider == 'HP' && bean.model.split('-')[0] == 'C7000') { 792 if (bean.provider == 'HP' && bean.model.split('-')[0] == 'C7000') {
793 resType = BMCMap.get('HP_knifeBox'); 793 resType = BMCMap.get('HP_knifeBox');
794 - } else if (bean.provider == 'H3C' && bean.model.split('-')[1] == 'R690') {  
795 - resType = BMCMap.get('HP'); 794 + } else if (bean.provider == 'H3C') {
  795 + if (bean.model.split('-')[1] == 'R690'){
  796 + resType = BMCMap.get('HP');
  797 + }else if (bean.model.indexOf('R4960') !=-1){
  798 + resType = "HOST_BMC_H3C_R4960";
  799 + }else {
  800 + resType = BMCMap.get(bean.provider)
  801 + }
796 } else if (bean.provider === 'HUAWEI' && bean.model === 'E9000') { 802 } else if (bean.provider === 'HUAWEI' && bean.model === 'E9000') {
797 resType = BMCMap.get('HUAWEI_KNIFEBOX'); 803 resType = BMCMap.get('HUAWEI_KNIFEBOX');
798 } else if (bean.resCode && bean.resCode.indexOf('华为Blade__') && bean.parentId) { 804 } else if (bean.resCode && bean.resCode.indexOf('华为Blade__') && bean.parentId) {
@@ -102,11 +102,13 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'echarts', 'sessions', 'xmSele @@ -102,11 +102,13 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'echarts', 'sessions', 'xmSele
102 * @param resId 资源id 102 * @param resId 资源id
103 * @param kpiId 指标id,多个指标逗号隔开 103 * @param kpiId 指标id,多个指标逗号隔开
104 * @param fn 104 * @param fn
  105 + * @param needCmdb 是否需要cmdb信息 (true/false,默认false)
  106 + * @param cmdbLable 需要获取的cmdb的lable,多个逗号隔开,前提是needCmdb必须为true,否则不生效
105 * 报文格式:{ "code": "0", 107 * 报文格式:{ "code": "0",
106 "data": [ {"flag": "base","name": "监控连接状态","id": "KPIE13DD9A3", "value": "连接成功", "status": "2"}, 108 "data": [ {"flag": "base","name": "监控连接状态","id": "KPIE13DD9A3", "value": "连接成功", "status": "2"},
107 {"flag": "base","name": "最近采集时间","id": "KPIF74D9D2B","value": "2019-12-16 10:04:54","status": "0" }]} 109 {"flag": "base","name": "最近采集时间","id": "KPIF74D9D2B","value": "2019-12-16 10:04:54","status": "0" }]}
108 */ 110 */
109 - renderText: function (targetId, resId, kpiId, fn, hasTotal,flag,isBasic) { 111 + renderText: function (targetId, resId, kpiId, fn, hasTotal,flag,isBasic,needCmdb,cmdbLable) {
110 //start lsq 状态信息的状态也增加下探 202-06-08 112 //start lsq 状态信息的状态也增加下探 202-06-08
111 let statusF=false;//是否为状态信息 113 let statusF=false;//是否为状态信息
112 //end lsq 2022-06-08 114 //end lsq 2022-06-08
@@ -117,6 +119,16 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'echarts', 'sessions', 'xmSele @@ -117,6 +119,16 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'echarts', 'sessions', 'xmSele
117 if (isBasic) { 119 if (isBasic) {
118 url += '&isBasic=' + isBasic; 120 url += '&isBasic=' + isBasic;
119 } 121 }
  122 + //增加cmdb信息展示传参 joke add 20230504 开始
  123 + //是否需要cmdb信息
  124 + if (needCmdb){
  125 + url += '&needCmdb=' + needCmdb;
  126 + //cmdbLable传入,表示过滤其中的部分数据
  127 + if (cmdbLable){
  128 + url += '&cmdbLable=' + cmdbLable
  129 + }
  130 + }
  131 + //增加cmdb信息展示传参 joke add 20230504 结束
120 admin.req({ 132 admin.req({
121 url: common.domainName + url 133 url: common.domainName + url
122 }).done(function (res) { 134 }).done(function (res) {
@@ -20,120 +20,52 @@ layui.define(['commonDetail','common', 'admin'], function (exports) { @@ -20,120 +20,52 @@ layui.define(['commonDetail','common', 'admin'], function (exports) {
20 os = data.os; 20 os = data.os;
21 } 21 }
22 22
23 - //基本信息:设备健康度、设备名称、序列号、电源功率  
24 - var jbxxKpi = "KPID3DD6605,KPI9F694F60,KPI4419E8A1,KPI74DB2138";  
25 - //设置信息  
26 - var deviceKpi = "KPI9F694F60,KPI4419E8A1,KPI74DB2138"; 23 + //基本信息
  24 + var jbxxKpi = "KPIE13DD9A3,KPIF74D9D2B,KPIF9BA6573,KPI9F694F60";
27 //cpu信息 25 //cpu信息
28 - var cpukpi = "KPI6232CA8F,KPI70AEFC6A,KPI0990CD44,KPIF4362E32,KPIBDB60856,KPI15358CE3"; 26 + var cpukpi = "KPI6232CA8F,KPIF4362E32,KPI899DBD7B,KPIDDBCCA5A";
29 //磁盘信息 27 //磁盘信息
30 - var diskkpi = "KPI9D22EAB6,KPI4419E8A1,KPI29D42042,KPI7B6A062F,KPI44C90B87,KPI32A0A858"; 28 + var diskkpi = "KPI9D22EAB6,KPI32A0A858,KPI8546BDCF";
  29 + //逻辑磁盘信息
  30 + var logicDiskKpi = "KPIE95E8B51,KPIB13D1D4A,KPIC98EA1B0,KPIC3ED81ED";
31 //内存信息 31 //内存信息
32 - var memkpi = "KPI4E7CD5C9,KPI70AEFC6A,KPIC8EAE5A2,KPI8ED105CD,KPI4419E8A1";  
33 - //风扇信息  
34 - var fanKpi = "KPI28C9A37D,KPI1A9360B6,KPIF5D53796"; 32 + var memkpi = "KPI4E7CD5C9,KPI8ED105CD,KPI1584BE1C,KPI0990CD44";
  33 + //内存容量信息
  34 + //var memSummarykpi = "KPID4D2A668,KPI1584BE1C,KPIDC7E789B,KPI0990CD44,KPIA2DC1868";
  35 + //传感器信息
  36 + //var sensorkpi = "KPI7DCEAE85,KPI7F80B0C4,KPIFF55D32A,KPIF2996845";
  37 + //电源
  38 + var powerkpi="KPI83E76634,KPI8BCBCA98";
  39 + //风扇
  40 + var fankpi="KPI28C9A37D,KPIF5D53796";
35 commonDetail.bindTips(); 41 commonDetail.bindTips();
36 42
37 renderPageInfo(); 43 renderPageInfo();
38 44
39 45
40 - //获取设备信息,左上角数据回填  
41 - function getDeviceInfo(resId) {  
42 - var url = "/api-web/detail/block?resId=" + resId + "&kpiId=" + jbxxKpi + "&hasTotal=null&isBasic=true";  
43 - admin.req({  
44 - url: common.domainName + url  
45 - }).done(function (res) {  
46 - $.each(res.data,function (i,e){  
47 - //设备名称  
48 - if (e.id == 'KPI9F694F60'){  
49 - $('#deviceName').html(e.value)  
50 - }  
51 - if (e.name == '设备型号'){  
52 - $('#deviceModel').html(e.value)  
53 - }  
54 - })  
55 - });  
56 - }  
57 -  
58 - /**  
59 - * 计算表格数据的总数及在位数  
60 - * */  
61 - function setSumaryByType(resId,targetId,kpiIds,flagPrifix) {  
62 - var url = "/api-web/detail/table/page?resId=" + resId + "&kpiId=" + kpiIds + "&page=1&size=1000";  
63 -  
64 - if (flagPrifix) {  
65 - url = url + "&flagPrifix="+flagPrifix;  
66 - }  
67 - admin.req({  
68 - url: common.domainName + url  
69 - }).done(function (res) {  
70 - var data = res.data[0];  
71 - var content = data.content;  
72 - var summaryCount = content.length;  
73 - var summaryIn = content.length;  
74 - $.each(content,function (ind,val) {  
75 - $.each(val,function (i,v) {  
76 - if (flagPrifix.indexOf('cpu') != -1){  
77 - if (v.kpiId === 'KPIF4362E32'){  
78 - var kpiValue = v.kpiValue.toString().toLowerCase().trim();  
79 - if (kpiValue === 'absence'){  
80 - summaryIn = summaryIn-1;  
81 - }  
82 - }  
83 - }else if (flagPrifix.indexOf('mem')!= -1){  
84 - if (v.kpiId === 'KPI8ED105CD'){  
85 - var kpiValue = v.kpiValue.toString().toLowerCase().trim();  
86 - if (kpiValue === 'absence'){  
87 - summaryIn = summaryIn-1;  
88 - }  
89 - }  
90 - }else if (flagPrifix.indexOf('disk')!= -1){  
91 - if (v.kpiId === 'KPI32A0A858'){  
92 - var kpiValue = v.kpiValue.toString().toLowerCase().trim();  
93 - if (kpiValue === 'absence'){  
94 - summaryIn = summaryIn-1;  
95 - }  
96 - }  
97 - }else if (flagPrifix.indexOf('fan')!= -1){  
98 - if (v.kpiId === 'KPIF5D53796'){  
99 - var kpiValue = v.kpiValue.toString().toLowerCase().trim();  
100 - if (kpiValue === 'absence'){  
101 - summaryIn = summaryIn-1;  
102 - }  
103 - }  
104 - }  
105 - })  
106 - })  
107 - $('#'+targetId).html('总数: '+summaryCount + '<br/><br/>在位: '+summaryIn)  
108 - });  
109 - }  
110 46
111 //渲染页面 47 //渲染页面
112 function renderPageInfo() { 48 function renderPageInfo() {
113 - //填充cpu总数及在位数  
114 - setSumaryByType(resId,'cpuSummaryInfo',cpukpi,'cpu-');  
115 - //填充内存总数及在位数  
116 - setSumaryByType(resId,'memSummaryInfo',memkpi,'mem-');  
117 - //填充磁盘总数及在位数  
118 - setSumaryByType(resId,'diskSummaryInfo',diskkpi,'disk-');  
119 - //填充风扇总数及在位数  
120 - setSumaryByType(resId,'fanSummaryInfo',fanKpi,'fan-');  
121 - //填充左上角设备信息  
122 - getDeviceInfo(resId,deviceKpi);  
123 //资源状态 49 //资源状态
124 - commonDetail.renderResHealthForH3cBmc("host_bmc_h3c_health_state",resId);  
125 - //基本信息,此处的kpiId传入一个,是因为左侧已经有其他信息,防止展示与左侧的重复  
126 - commonDetail.renderText("host_bmc_h3c_baseinfo",resId,'KPID3DD6605',null,null,null,"true");  
127 - //设备信息  
128 - commonDetail.renderText("host_bmc_h3c_device_info",resId,deviceKpi,null,null,null); 50 + commonDetail.renderResHealth("host_bmc_h3c_health_state",resId);
  51 + //基本信息
  52 + commonDetail.renderText("host_bmc_h3c_baseinfo",resId,jbxxKpi,null,null,null,"true");
129 //cpu信息 53 //cpu信息
130 - commonDetail.renderTableForH3cBmc("host_bmc_h3c_cpuinfo",false,resId,cpukpi,'CPU信息','cpu-','KPI6232CA8F','ASC');  
131 - //内存信息  
132 - commonDetail.renderTableForH3cBmc("host_bmc_h3c_meminfo",false,resId,memkpi,'内存信息','mem-','KPI4E7CD5C9','ASC'); 54 + commonDetail.renderTable("host_bmc_h3c_cpuinfo",false,resId,cpukpi,'CPU信息','bmccpu-','KPI6232CA8F','ASC');
133 //磁盘信息 55 //磁盘信息
134 - commonDetail.renderTableForH3cBmc("host_bmc_h3c_diskinfo",false,resId,diskkpi,'磁盘信息','disk-','KPI9D22EAB6','ASC'); 56 + commonDetail.renderTable("host_bmc_h3c_diskinfo",false,resId,diskkpi,'磁盘信息','bmcdisk-','KPI9D22EAB6','ASC');
  57 + //逻辑磁盘信息
  58 + commonDetail.renderTable("host_bmc_h3c_logic_diskinfo",false,resId,logicDiskKpi,'磁盘信息','raid-','KPIE95E8B51','ASC');
  59 + //内存信息
  60 + commonDetail.renderTable("host_bmc_h3c_meminfo",false,resId,memkpi,'内存信息','bmcmem-','KPI4E7CD5C9','ASC');
  61 + //电源信息
  62 + commonDetail.renderTable("host_bmc_h3c_powerinfo",false,resId,powerkpi,'电源信息','power','KPI83E76634','ASC');
135 //风扇信息 63 //风扇信息
136 - commonDetail.renderTableForH3cBmc("host_bmc_h3c_faninfo",false,resId,fanKpi,'风扇信息','fan-','KPI28C9A37D','ASC'); 64 + commonDetail.renderTable("host_bmc_h3c_faninfo",false,resId,fankpi,'风扇信息','fan','KPI28C9A37D','ASC');
  65 + //内存容量信息
  66 + //commonDetail.renderTable("host_bmc_h3c_memSummaryinfo",false,resId,memSummarykpi,'电源信息','memSummary');
  67 + //传感器信息
  68 + //commonDetail.renderTable("host_bmc_h3c_sensorinfo",false,resId,sensorkpi,'传感器信息','sensor');
137 //活动告警 69 //活动告警
138 commonDetail.renderActiveAlarms("host_bmc_h3c_active_alarm",resId); 70 commonDetail.renderActiveAlarms("host_bmc_h3c_active_alarm",resId);
139 } 71 }
  1 +// joke add 20210304 h3c bmc详情页
  2 +layui.define(['commonDetail','common', 'admin'], function (exports) {
  3 + var $ = layui.$;
  4 + var commonDetail = layui.commonDetail;
  5 + var common = layui.common;
  6 + var admin = layui.admin;
  7 + //对外暴露的接口
  8 + exports('host_bmc_h3c_r4960', function (data) {
  9 + var resId = '';
  10 + var resType = '';
  11 + var os = '';
  12 + var showFlag = common.getUrlParam("show");
  13 + if(showFlag && showFlag == '0'){
  14 + resId = common.getUrlParam("resId");
  15 + resType = common.getUrlParam("resType");
  16 + os = common.getUrlParam("os");
  17 + }else{
  18 + resId = data.resId;
  19 + resType = data.resType;
  20 + os = data.os;
  21 + }
  22 +
  23 + //基本信息:设备健康度、设备名称、序列号、电源功率
  24 + var jbxxKpi = "KPID3DD6605,KPI9F694F60,KPI4419E8A1,KPI74DB2138";
  25 + //设置信息
  26 + var deviceKpi = "KPI9F694F60,KPI4419E8A1,KPI74DB2138";
  27 + //cpu信息
  28 + var cpukpi = "KPI6232CA8F,KPI70AEFC6A,KPI0990CD44,KPIF4362E32,KPIBDB60856,KPI15358CE3";
  29 + //磁盘信息
  30 + var diskkpi = "KPI9D22EAB6,KPI4419E8A1,KPI29D42042,KPI7B6A062F,KPI44C90B87,KPI32A0A858";
  31 + //内存信息
  32 + var memkpi = "KPI4E7CD5C9,KPI70AEFC6A,KPIC8EAE5A2,KPI8ED105CD,KPI4419E8A1";
  33 + //风扇信息
  34 + var fanKpi = "KPI28C9A37D,KPI1A9360B6,KPIF5D53796";
  35 + commonDetail.bindTips();
  36 +
  37 + renderPageInfo();
  38 +
  39 +
  40 + //获取设备信息,左上角数据回填
  41 + function getDeviceInfo(resId) {
  42 + var url = "/api-web/detail/block?resId=" + resId + "&kpiId=" + jbxxKpi + "&hasTotal=null&isBasic=true";
  43 + admin.req({
  44 + url: common.domainName + url
  45 + }).done(function (res) {
  46 + $.each(res.data,function (i,e){
  47 + //设备名称
  48 + if (e.id == 'KPI9F694F60'){
  49 + $('#deviceName').html(e.value)
  50 + }
  51 + if (e.name == '设备型号'){
  52 + $('#deviceModel').html(e.value)
  53 + }
  54 + })
  55 + });
  56 + }
  57 +
  58 + /**
  59 + * 计算表格数据的总数及在位数
  60 + * */
  61 + function setSumaryByType(resId,targetId,kpiIds,flagPrifix) {
  62 + var url = "/api-web/detail/table/page?resId=" + resId + "&kpiId=" + kpiIds + "&page=1&size=1000";
  63 +
  64 + if (flagPrifix) {
  65 + url = url + "&flagPrifix="+flagPrifix;
  66 + }
  67 + admin.req({
  68 + url: common.domainName + url
  69 + }).done(function (res) {
  70 + var data = res.data[0];
  71 + var content = data.content;
  72 + var summaryCount = content.length;
  73 + var summaryIn = content.length;
  74 + $.each(content,function (ind,val) {
  75 + $.each(val,function (i,v) {
  76 + if (flagPrifix.indexOf('cpu') != -1){
  77 + if (v.kpiId === 'KPIF4362E32'){
  78 + var kpiValue = v.kpiValue.toString().toLowerCase().trim();
  79 + if (kpiValue === 'absence'){
  80 + summaryIn = summaryIn-1;
  81 + }
  82 + }
  83 + }else if (flagPrifix.indexOf('mem')!= -1){
  84 + if (v.kpiId === 'KPI8ED105CD'){
  85 + var kpiValue = v.kpiValue.toString().toLowerCase().trim();
  86 + if (kpiValue === 'absence'){
  87 + summaryIn = summaryIn-1;
  88 + }
  89 + }
  90 + }else if (flagPrifix.indexOf('disk')!= -1){
  91 + if (v.kpiId === 'KPI32A0A858'){
  92 + var kpiValue = v.kpiValue.toString().toLowerCase().trim();
  93 + if (kpiValue === 'absence'){
  94 + summaryIn = summaryIn-1;
  95 + }
  96 + }
  97 + }else if (flagPrifix.indexOf('fan')!= -1){
  98 + if (v.kpiId === 'KPIF5D53796'){
  99 + var kpiValue = v.kpiValue.toString().toLowerCase().trim();
  100 + if (kpiValue === 'absence'){
  101 + summaryIn = summaryIn-1;
  102 + }
  103 + }
  104 + }
  105 + })
  106 + })
  107 + $('#'+targetId).html('总数: '+summaryCount + '<br/><br/>在位: '+summaryIn)
  108 + });
  109 + }
  110 +
  111 + //渲染页面
  112 + function renderPageInfo() {
  113 + //填充cpu总数及在位数
  114 + setSumaryByType(resId,'cpuSummaryInfo',cpukpi,'cpu-');
  115 + //填充内存总数及在位数
  116 + setSumaryByType(resId,'memSummaryInfo',memkpi,'mem-');
  117 + //填充磁盘总数及在位数
  118 + setSumaryByType(resId,'diskSummaryInfo',diskkpi,'disk-');
  119 + //填充风扇总数及在位数
  120 + setSumaryByType(resId,'fanSummaryInfo',fanKpi,'fan-');
  121 + //填充左上角设备信息
  122 + getDeviceInfo(resId,deviceKpi);
  123 + //资源状态
  124 + commonDetail.renderResHealthForH3cBmc("host_bmc_h3c_r4960_health_state",resId);
  125 + //基本信息,此处的kpiId传入一个,是因为左侧已经有其他信息,防止展示与左侧的重复
  126 + commonDetail.renderText("host_bmc_h3c_r4960_baseinfo",resId,'KPID3DD6605',null,null,null,"true","true","所属机房,所属机柜编号,起始U位,结束U位,用途,所属域,资源归属");
  127 + //设备信息
  128 + commonDetail.renderText("host_bmc_h3c_r4960_device_info",resId,deviceKpi,null,null,null);
  129 + //cpu信息
  130 + commonDetail.renderTableForH3cBmc("host_bmc_h3c_r4960_cpuinfo",false,resId,cpukpi,'CPU信息','cpu-','KPI6232CA8F','ASC');
  131 + //内存信息
  132 + commonDetail.renderTableForH3cBmc("host_bmc_h3c_r4960_meminfo",false,resId,memkpi,'内存信息','mem-','KPI4E7CD5C9','ASC');
  133 + //磁盘信息
  134 + commonDetail.renderTableForH3cBmc("host_bmc_h3c_r4960_diskinfo",false,resId,diskkpi,'磁盘信息','disk-','KPI9D22EAB6','ASC');
  135 + //风扇信息
  136 + commonDetail.renderTableForH3cBmc("host_bmc_h3c_r4960_faninfo",false,resId,fanKpi,'风扇信息','fan-','KPI28C9A37D','ASC');
  137 + //活动告警
  138 + commonDetail.renderActiveAlarms("host_bmc_h3c_r4960_active_alarm",resId);
  139 + }
  140 +
  141 + //定时任务
  142 + var timer = setInterval(function () {
  143 + renderPageInfo()
  144 + },commonDetail.timerTime);
  145 + commonDetail.detailTimer.push(timer);
  146 + });
  147 +});
@@ -4,89 +4,63 @@ @@ -4,89 +4,63 @@
4 <div class="main"> 4 <div class="main">
5 <div class="layui-card template_detail_content"> 5 <div class="layui-card template_detail_content">
6 <div class="layui-card-body"> 6 <div class="layui-card-body">
7 - <div class="lay-row" style="height: 340px">  
8 - <div class="lay-row-item lay-row-item--auto-width">  
9 - <div style="height: 200px;" class="imgDiv">  
10 - <div style="float: left;width: 50%">  
11 - <div style="padding: 70px 10px;color: white">  
12 - <h1 style="margin-bottom: 15px;margin-left: 10px" id="deviceModel"></h1>  
13 - <label style="margin-left: 10px">主机名: <span id="deviceName"></span></label>  
14 - </div>  
15 - </div>  
16 - <div style="float: right;width: 50%">  
17 - <div style="margin: 60px 10px;">  
18 - <img class="h3c_bmc_img" src="src/style/img/detail/h3c_bmc.png">  
19 - </div>  
20 - </div>  
21 - </div>  
22 - <h5 class="lay-row-title">设备信息</h5>  
23 - <div class="info-table" id="host_bmc_h3c_device_info"></div> 7 + <div class="lay-row">
  8 + <div class="lay-row-item lay-row-item--small">
  9 + <h5 class="lay-row-title">资源状态</h5>
  10 + <div class="res-state" id="host_bmc_h3c_health_state"></div>
24 </div> 11 </div>
25 <div class="lay-row-item lay-row-item--small"> 12 <div class="lay-row-item lay-row-item--small">
26 <h5 class="lay-row-title">基本信息<i data-id="host_bmc_h3c_baseinfo" class="iconfont detail_base_info">&#xe61e;</i></h5> 13 <h5 class="lay-row-title">基本信息<i data-id="host_bmc_h3c_baseinfo" class="iconfont detail_base_info">&#xe61e;</i></h5>
27 <ul class="info-table" id="host_bmc_h3c_baseinfo"></ul> 14 <ul class="info-table" id="host_bmc_h3c_baseinfo"></ul>
28 </div> 15 </div>
29 - <div class="border1" style="width: 400px;margin: 5px">  
30 - <h5 class="lay-row-title">设备健康度</h5>  
31 - <div class="res-state" style="padding-top: 20px" id="host_bmc_h3c_health_state"></div> 16 + <!-- <div class="lay-row-item">-->
  17 + <!-- <h5 class="lay-row-title">内存容量信息<span id="host_bmc_h3c_memSummaryinfoDownload" class="layui-table-link" style="margin-left: 10px;">下载</span><span id="host_bmc_h3c_memSummaryinfoMore" class="layui-table-link">更多</span></h5>-->
  18 + <!-- <div id="host_bmc_h3c_memSummaryinfo"></div>-->
  19 + <!-- </div>-->
  20 + <div class="lay-row-item">
  21 + <h5 class="lay-row-title">电源信息<span id="host_bmc_h3c_powerinfoDownload" class="layui-table-link" style="margin-left: 10px;">下载</span><span id="host_bmc_h3c_powerinfoMore" class="layui-table-link">更多</span></h5>
  22 + <div id="host_bmc_h3c_powerinfo"></div>
32 </div> 23 </div>
33 </div> 24 </div>
34 <div class="lay-row"> 25 <div class="lay-row">
35 - <div class="border1 summaryDiv">  
36 - <div class="summaryDivImg">  
37 - <img src="src/style/img/detail/cpu.png">  
38 - </div>  
39 - <div>  
40 - <p id="cpuSummaryInfo">总数:2</p>  
41 - </div>  
42 - </div>  
43 - <div style="float: right" class="lay-row-item"> 26 + <div class="lay-row-item">
44 <h5 class="lay-row-title">CPU信息<span id="host_bmc_h3c_cpuinfoDownload" class="layui-table-link" style="margin-left: 10px;">下载</span><span id="host_bmc_h3c_cpuinfoMore" class="layui-table-link">更多</span></h5> 27 <h5 class="lay-row-title">CPU信息<span id="host_bmc_h3c_cpuinfoDownload" class="layui-table-link" style="margin-left: 10px;">下载</span><span id="host_bmc_h3c_cpuinfoMore" class="layui-table-link">更多</span></h5>
45 <div id="host_bmc_h3c_cpuinfo"></div> 28 <div id="host_bmc_h3c_cpuinfo"></div>
46 </div> 29 </div>
47 </div> 30 </div>
48 <div class="lay-row"> 31 <div class="lay-row">
49 - <div class="border1 summaryDiv">  
50 - <div class="summaryDivImg">  
51 - <img src="src/style/img/detail/mem.png">  
52 - </div>  
53 - <div>  
54 - <p id="memSummaryInfo"></p>  
55 - </div>  
56 - </div>  
57 - <div style="float: right" class="lay-row-item">  
58 - <h5 class="lay-row-title">内存信息<span id="host_bmc_h3c_meminfoDownload" class="layui-table-link" style="margin-left: 10px;">下载</span><span id="host_bmc_h3c_meminfoMore" class="layui-table-link">更多</span></h5>  
59 - <div id="host_bmc_h3c_meminfo"></div> 32 + <div class="lay-row-item">
  33 + <h5 class="lay-row-title">磁盘信息<span id="host_bmc_h3c_diskinfoDownload" class="layui-table-link" style="margin-left: 10px;">下载</span><span id="host_bmc_h3c_diskinfoMore" class="layui-table-link">更多</span></h5>
  34 + <div id="host_bmc_h3c_diskinfo"></div>
60 </div> 35 </div>
61 </div> 36 </div>
62 <div class="lay-row"> 37 <div class="lay-row">
63 - <div class="border1 summaryDiv">  
64 - <div class="summaryDivImg">  
65 - <img src="src/style/img/detail/disk.png">  
66 - </div>  
67 - <div>  
68 - <p id="diskSummaryInfo"></p>  
69 - </div>  
70 - </div>  
71 - <div style="float: right" class="lay-row-item">  
72 - <h5 class="lay-row-title">磁盘信息<span id="host_bmc_h3c_diskinfoDownload" class="layui-table-link" style="margin-left: 10px;">下载</span><span id="host_bmc_h3c_diskinfoMore" class="layui-table-link">更多</span></h5>  
73 - <div id="host_bmc_h3c_diskinfo"></div> 38 + <div class="lay-row-item">
  39 + <h5 class="lay-row-title">逻辑磁盘信息<span id="host_bmc_h3c_logic_diskinfoDownload" class="layui-table-link" style="margin-left: 10px;">下载</span><span id="host_bmc_h3c_logic_diskinfoMore" class="layui-table-link">更多</span></h5>
  40 + <div id="host_bmc_h3c_logic_diskinfo"></div>
74 </div> 41 </div>
75 </div> 42 </div>
76 <div class="lay-row"> 43 <div class="lay-row">
77 - <div class="border1 summaryDiv">  
78 - <div class="summaryDivImg">  
79 - <img src="src/style/img/detail/fan.png">  
80 - </div>  
81 - <div>  
82 - <p id="fanSummaryInfo"></p>  
83 - </div> 44 + <div class="lay-row-item">
  45 + <h5 class="lay-row-title">内存信息<span id="host_bmc_h3c_meminfoDownload" class="layui-table-link" style="margin-left: 10px;">下载</span><span id="host_bmc_h3c_meminfoMore" class="layui-table-link">更多</span></h5>
  46 + <div id="host_bmc_h3c_meminfo"></div>
84 </div> 47 </div>
85 - <div style="float: right" class="lay-row-item"> 48 + </div>
  49 + <div class="lay-row">
  50 + <div class="lay-row-item">
86 <h5 class="lay-row-title">风扇信息<span id="host_bmc_h3c_faninfoDownload" class="layui-table-link" style="margin-left: 10px;">下载</span><span id="host_bmc_h3c_faninfoMore" class="layui-table-link">更多</span></h5> 51 <h5 class="lay-row-title">风扇信息<span id="host_bmc_h3c_faninfoDownload" class="layui-table-link" style="margin-left: 10px;">下载</span><span id="host_bmc_h3c_faninfoMore" class="layui-table-link">更多</span></h5>
87 <div id="host_bmc_h3c_faninfo"></div> 52 <div id="host_bmc_h3c_faninfo"></div>
88 </div> 53 </div>
89 </div> 54 </div>
  55 + <!-- <div class="lay-row">-->
  56 + <!-- -->
  57 + <!-- </div>-->
  58 + <!-- <div class="lay-row">-->
  59 + <!-- <div class="lay-row-item">-->
  60 + <!-- <h5 class="lay-row-title">传感器信息<span id="host_bmc_h3c_sensorinfoDownload" class="layui-table-link" style="margin-left: 10px;">下载</span><span id="host_bmc_h3c_sensorinfoMore" class="layui-table-link">更多</span></h5>-->
  61 + <!-- <div id="host_bmc_h3c_sensorinfo"></div>-->
  62 + <!-- </div>-->
  63 + <!-- </div>-->
90 <div class="lay-row"> 64 <div class="lay-row">
91 <div class="lay-row-item"> 65 <div class="lay-row-item">
92 <h5 class="lay-row-title">实时告警动态</h5> 66 <h5 class="lay-row-title">实时告警动态</h5>
@@ -109,46 +83,4 @@ @@ -109,46 +83,4 @@
109 fn(JSON.parse(parm)); 83 fn(JSON.parse(parm));
110 } 84 }
111 }); 85 });
112 -</script>  
113 -<style>  
114 - .imgDiv{  
115 - background-color: #536ead;  
116 - }  
117 - .h3c_bmc_img{  
118 - max-width:99%;margin-right:auto;margin-left:auto;  
119 - }  
120 - .template .lay-row-item .info-table li span:nth-child(2), .template .lay-row-item .info-table li span:nth-child(4) {  
121 - text-align: right; !important;  
122 - }  
123 - .border1{  
124 - border: 1px solid rgba(151, 151, 151, 0.13);  
125 - }  
126 - .buttonUnknown{  
127 - background-color: #424242; !important;  
128 - }  
129 - .buttonOk{  
130 - background-color: #84cb3a; !important;  
131 - }  
132 - .buttonMlnor{  
133 - background-color: #4c9df8; !important;  
134 - }  
135 - .buttonMajor{  
136 - background-color: #e9a944; !important;  
137 - }  
138 - .buttonCritical{  
139 - background-color: #c63520; !important;  
140 - }  
141 - .buttonAbsence{  
142 - background-color: #c5c5c5; !important;  
143 - }  
144 - .summaryDiv{  
145 - justify-content: space-evenly;  
146 - align-items: center;  
147 - display: flex;  
148 - width: 200px;  
149 - margin: 5px;  
150 - }  
151 - .summaryDiv .summaryDivImg{  
152 - width: 50px;  
153 - }  
154 -</style>  
  86 +</script>
  1 +<!--华三 h3cbmc详细页面-->
  2 +<article class="page-container template">
  3 + <div class="page-panel">
  4 + <div class="main">
  5 + <div class="layui-card template_detail_content">
  6 + <div class="layui-card-body">
  7 + <div class="lay-row" style="height: 340px">
  8 + <div class="lay-row-item lay-row-item--auto-width">
  9 + <div style="height: 185px;" class="imgDiv">
  10 + <div style="float: left;width: 50%">
  11 + <div style="padding: 70px 10px;color: white">
  12 + <h1 style="margin-bottom: 15px;margin-left: 10px" id="deviceModel"></h1>
  13 + <label style="margin-left: 10px">主机名: <span id="deviceName"></span></label>
  14 + </div>
  15 + </div>
  16 + <div style="float: right;width: 50%">
  17 + <div style="margin: 55px 10px;">
  18 + <img class="h3c_bmc_img" src="src/style/img/detail/h3c_bmc.png">
  19 + </div>
  20 + </div>
  21 + </div>
  22 + <h5 class="lay-row-title">设备信息</h5>
  23 + <div class="info-table" id="host_bmc_h3c_r4960_device_info"></div>
  24 + </div>
  25 + <div class="lay-row-item lay-row-item--small">
  26 + <h5 class="lay-row-title">基本信息<i data-id="host_bmc_h3c_r4960_baseinfo" class="iconfont detail_base_info">&#xe61e;</i></h5>
  27 + <ul class="info-table" id="host_bmc_h3c_r4960_baseinfo"></ul>
  28 + </div>
  29 + <div class="border1" style="width: 400px;margin: 5px">
  30 + <h5 class="lay-row-title">设备健康度</h5>
  31 + <div class="res-state" style="padding-top: 20px" id="host_bmc_h3c_r4960_health_state"></div>
  32 + </div>
  33 + </div>
  34 + <div class="lay-row">
  35 + <div class="border1 summaryDiv">
  36 + <div class="summaryDivImg">
  37 + <img src="src/style/img/detail/cpu.png">
  38 + </div>
  39 + <div>
  40 + <p id="cpuSummaryInfo">总数:2</p>
  41 + </div>
  42 + </div>
  43 + <div style="float: right" class="lay-row-item">
  44 + <h5 class="lay-row-title">CPU信息<span id="host_bmc_h3c_r4960_cpuinfoDownload" class="layui-table-link" style="margin-left: 10px;">下载</span><span id="host_bmc_h3c_r4960_cpuinfoMore" class="layui-table-link">更多</span></h5>
  45 + <div id="host_bmc_h3c_r4960_cpuinfo"></div>
  46 + </div>
  47 + </div>
  48 + <div class="lay-row">
  49 + <div class="border1 summaryDiv">
  50 + <div class="summaryDivImg">
  51 + <img src="src/style/img/detail/mem.png">
  52 + </div>
  53 + <div>
  54 + <p id="memSummaryInfo"></p>
  55 + </div>
  56 + </div>
  57 + <div style="float: right" class="lay-row-item">
  58 + <h5 class="lay-row-title">内存信息<span id="host_bmc_h3c_r4960_meminfoDownload" class="layui-table-link" style="margin-left: 10px;">下载</span><span id="host_bmc_h3c_r4960_meminfoMore" class="layui-table-link">更多</span></h5>
  59 + <div id="host_bmc_h3c_r4960_meminfo"></div>
  60 + </div>
  61 + </div>
  62 + <div class="lay-row">
  63 + <div class="border1 summaryDiv">
  64 + <div class="summaryDivImg">
  65 + <img src="src/style/img/detail/disk.png">
  66 + </div>
  67 + <div>
  68 + <p id="diskSummaryInfo"></p>
  69 + </div>
  70 + </div>
  71 + <div style="float: right" class="lay-row-item">
  72 + <h5 class="lay-row-title">磁盘信息<span id="host_bmc_h3c_r4960_diskinfoDownload" class="layui-table-link" style="margin-left: 10px;">下载</span><span id="host_bmc_h3c_r4960_diskinfoMore" class="layui-table-link">更多</span></h5>
  73 + <div id="host_bmc_h3c_r4960_diskinfo"></div>
  74 + </div>
  75 + </div>
  76 + <div class="lay-row">
  77 + <div class="border1 summaryDiv">
  78 + <div class="summaryDivImg">
  79 + <img src="src/style/img/detail/fan.png">
  80 + </div>
  81 + <div>
  82 + <p id="fanSummaryInfo"></p>
  83 + </div>
  84 + </div>
  85 + <div style="float: right" class="lay-row-item">
  86 + <h5 class="lay-row-title">风扇信息<span id="host_bmc_h3c_r4960_faninfoDownload" class="layui-table-link" style="margin-left: 10px;">下载</span><span id="host_bmc_h3c_r4960_faninfoMore" class="layui-table-link">更多</span></h5>
  87 + <div id="host_bmc_h3c_r4960_faninfo"></div>
  88 + </div>
  89 + </div>
  90 + <div class="lay-row">
  91 + <div class="lay-row-item">
  92 + <h5 class="lay-row-title">实时告警动态</h5>
  93 + <div id="host_bmc_h3c_r4960_active_alarm"></div>
  94 + </div>
  95 + </div>
  96 + </div>
  97 + </div>
  98 + </div>
  99 + </div>
  100 +</article>
  101 +<textarea id="host_bmc_h3c_r4960_param_id" style="display: none;">{{d}}</textarea>
  102 +<script>
  103 + layui.use('host_bmc_h3c_r4960', function (fn) {
  104 + var $ = layui.$;
  105 + var parm = $("#host_bmc_h3c_r4960_param_id").val();
  106 + if(parm.indexOf('{{d') != -1){
  107 + fn();
  108 + }else{
  109 + fn(JSON.parse(parm));
  110 + }
  111 + });
  112 +</script>
  113 +<style>
  114 + .imgDiv{
  115 + background-color: #536ead;
  116 + }
  117 + .h3c_bmc_img{
  118 + max-width:99%;margin-right:auto;margin-left:auto;
  119 + }
  120 + .template .lay-row-item .info-table li span:nth-child(2), .template .lay-row-item .info-table li span:nth-child(4) {
  121 + text-align: right; !important;
  122 + }
  123 + .border1{
  124 + border: 1px solid rgba(151, 151, 151, 0.13);
  125 + }
  126 + .buttonUnknown{
  127 + background-color: #424242; !important;
  128 + }
  129 + .buttonOk{
  130 + background-color: #84cb3a; !important;
  131 + }
  132 + .buttonMlnor{
  133 + background-color: #4c9df8; !important;
  134 + }
  135 + .buttonMajor{
  136 + background-color: #e9a944; !important;
  137 + }
  138 + .buttonCritical{
  139 + background-color: #c63520; !important;
  140 + }
  141 + .buttonAbsence{
  142 + background-color: #c5c5c5; !important;
  143 + }
  144 + .summaryDiv{
  145 + justify-content: space-evenly;
  146 + align-items: center;
  147 + display: flex;
  148 + width: 200px;
  149 + margin: 5px;
  150 + }
  151 + .summaryDiv .summaryDivImg{
  152 + width: 50px;
  153 + }
  154 + .template .lay-row-item .info-table {
  155 + height: 280px;
  156 + overflow: hidden;
  157 + }
  158 +</style>