背景
适配的RAID卡在web界面上不显示BBU温度,补充该项完善功能
关联ISSUE
[需求]: 支持RAID卡温度webui显示的北向接口-rackmount-AtomGit
[需求]: RAID卡web界面需要显示BBU温度-webui-AtomGit
整体方案
在webui组件下:webui/src/pages/System/Storage/models/raid/bbu.model.ts文件补充BBUModel中关于BBU模型的温度属性;webui/src/pages/System/Storage/components/raid/raid.service.ts中函数setbbuModel中添加BBU温度显示代码
在rackmount组件下:rackmount/interface_config/web_backend/mapping_config/System/Storage.json中的网页请求路径,即UI/Rest/System/Storage/:raidcontrollerid,其中Rspbody中BBU数组补充BBU温度获取路径。
评审点
补充RAID卡网页的BBU温度获取路径
详细描述
补充web上RAID卡BBU显示模块的温度属性及获取路径
--- a/interface_config/web_backend/mapping_config/System/Storage.json
+++ b/interface_config/web_backend/mapping_config/System/Storage.json
@@ -2906,7 +2906,8 @@
"BBU": {
"Name": "${ProcessingFlow[5]/Destination/Name}",
"Health": "${Statements/BBUHealth()}",
- "State": "${Statements/BBUState()}"
+ "State": "${Statements/BBUState()}",
+ "TemperatureCelsius": "${ProcessingFlow[5]/Destination/TemperatureCelsius}"
},
"Drives": "${Statements/GetControllerRefDrives()}",
"DriverInfo": {
@@ -3735,7 +3736,8 @@
"Interface": "bmc.kepler.Systems.Storage.Battery",
"Destination": {
"Health": "Health",
- "Name": "Name"
+ "Name": "Name",
+ "TemperatureCelsius": "TemperatureCelsius"
}
},
if (bodyData.BBU === null) {
return null;
}
- let bbuModel: BBUModel = new BBUModel('Absent', 'STORE_IN_POSITION', 'STORE_NORMAL');
+ let bbuModel: BBUModel = new BBUModel('Absent', 'STORE_IN_POSITION', 'STORE_NORMAL', empty);
let position = empty;
if (bodyData.BBU.State) {
position = (bodyData.BBU.State === 'Absent' || bodyData.BBU.State === 255) ?
@@ -68,7 +68,13 @@ function setbbuModel(bodyData: any): BBUModel | null {
const detail = bodyData.BBU.FaultDetails || empty;
bbuHealth = `${traduction('STORE_ABNORMAL')}(${detail})`;
}
- bbuModel = new BBUModel(bodyData.BBU.Name || empty, position, bbuHealth);
+ bbuModel = new BBUModel(bodyData.BBU.Name || empty, position, bbuHealth, temperature);
+ let temperature = bodyData.BBU.TemperatureCelsius;
+ if (temperature === null || temperature === undefined) {
+ temperature = empty;
+ } else {
+ temperature = `${temperature}°C`;
+ }
return bbuModel;
}
是否准备好AI预审
是