diff --git a/src/node_info/files/PveMod_pvemanagerlib.js b/src/node_info/files/PveMod_pvemanagerlib.js
index d510585..a08e8a4 100644
--- a/src/node_info/files/PveMod_pvemanagerlib.js
+++ b/src/node_info/files/PveMod_pvemanagerlib.js
@@ -576,16 +576,14 @@ Ext.define('PVE.node.StatusView', {
itemId: 'thermalHdd',
colspan: 2,
printBar: false,
- title: gettext('HDD/SSD Thermal State'),
+ title: gettext('HDD/SSD Temperatures'),
iconCls: 'fa fa-fw fa-thermometer-half',
- textField: 'sensorsOutput',
+ textField: 'PveMod_JsonSensorInfo',
renderer: function(value) {
// sensors configuration
const addressPrefix = "drivetemp-scsi-";
const sensorName = "temp1";
const tempHelper = Ext.create('PVE.mod.TempHelper', {srcUnit: PVE.mod.TempHelper.CELSIUS, dstUnit: PVE.mod.TempHelper.CELSIUS});
- // display configuration
- const itemsPerRow = 1;
// ---
let objValue;
try {
@@ -600,20 +598,20 @@ Ext.define('PVE.node.StatusView', {
objValue = (parsed.data && parsed.data[Object.keys(parsed.data)[0]]) || {};
} catch(e) {
objValue = {};
- }
-
+ }
const drvKeys = Object.keys(objValue).filter(item => String(item).startsWith(addressPrefix)).sort((a, b) => a.localeCompare(b, undefined, { numeric: true, sensitivity: 'base' }));
- let temps = [];
- drvKeys.forEach((drvKey, index) => {
+ let drvData = [];
+ drvKeys.forEach((drvKey) => {
try {
+ const drv = objValue[drvKey];
let tempVal = NaN, tempMax = NaN, tempCrit = NaN;
- Object.keys(objValue[drvKey][sensorName]).forEach((secondLevelKey) => {
+ Object.keys(drv[sensorName]).forEach((secondLevelKey) => {
if (secondLevelKey.endsWith('_input')) {
- tempVal = tempHelper.getTemp(parseFloat(objValue[drvKey][sensorName][secondLevelKey]));
+ tempVal = tempHelper.getTemp(parseFloat(drv[sensorName][secondLevelKey]));
} else if (secondLevelKey.endsWith('_max')) {
- tempMax = tempHelper.getTemp(parseFloat(objValue[drvKey][sensorName][secondLevelKey]));
+ tempMax = tempHelper.getTemp(parseFloat(drv[sensorName][secondLevelKey]));
} else if (secondLevelKey.endsWith('_crit')) {
- tempCrit = tempHelper.getTemp(parseFloat(objValue[drvKey][sensorName][secondLevelKey]));
+ tempCrit = tempHelper.getTemp(parseFloat(drv[sensorName][secondLevelKey]));
}
});
if (!isNaN(tempVal)) {
@@ -624,15 +622,34 @@ Ext.define('PVE.node.StatusView', {
if (!isNaN(tempCrit) && tempVal >= tempCrit) {
tempStyle = 'color: red; font-weight: bold;';
}
- const tempStr = `Drive ${index + 1}: ${Ext.util.Format.number(tempVal, '0.0')}${tempHelper.getUnit()}`;
- temps.push(tempStr);
+ drvData.push({
+ model: drv['model'] || 'Unknown',
+ serial: drv['serial'] || '',
+ temp: tempVal,
+ tempStyle: tempStyle,
+ unit: tempHelper.getUnit()
+ });
}
} catch(e) { /*_*/ }
});
- const result = temps.map((strTemp, index, arr) => { return strTemp + (index + 1 < arr.length ? ((index + 1) % itemsPerRow === 0 ? '
' : ' | ') : ''); });
- return '
| ${deviceName} | `; + html += `${Ext.util.Format.number(data.temp, '0.0')}${data.unit} | `; + html += '