fix temp conversion
This commit is contained in:
parent
edcd445e59
commit
2f3b670c6c
@ -97,6 +97,7 @@ sub _get_temperature_sensors {
|
|||||||
fans => $config{lm_sensors}{enable_fan_speed} ? \1 : \0,
|
fans => $config{lm_sensors}{enable_fan_speed} ? \1 : \0,
|
||||||
hdd => $config{lm_sensors}{enable_hdd_temp} ? \1 : \0,
|
hdd => $config{lm_sensors}{enable_hdd_temp} ? \1 : \0,
|
||||||
other => $config{lm_sensors}{enable_other_temp} ? \1 : \0,
|
other => $config{lm_sensors}{enable_other_temp} ? \1 : \0,
|
||||||
|
temp_unit => $config{lm_sensors}{temp_unit},
|
||||||
data => { 'PVE MOD lm-sensors Enhanced' => $sensors_json },
|
data => { 'PVE MOD lm-sensors Enhanced' => $sensors_json },
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -284,8 +284,6 @@ Ext.define('PVE.node.StatusView', {
|
|||||||
iconCls: 'fa fa-fw fa-thermometer-half',
|
iconCls: 'fa fa-fw fa-thermometer-half',
|
||||||
textField: 'PveMod_JsonSensorInfo',
|
textField: 'PveMod_JsonSensorInfo',
|
||||||
renderer: function(value){
|
renderer: function(value){
|
||||||
// sensors configuration
|
|
||||||
const cpuTempHelper = Ext.create('PVE.mod.TempHelper', {srcUnit: PVE.mod.TempHelper.CELSIUS, dstUnit: PVE.mod.TempHelper.CELSIUS});
|
|
||||||
// display configuration
|
// display configuration
|
||||||
const itemsPerRow = 0;
|
const itemsPerRow = 0;
|
||||||
// ---
|
// ---
|
||||||
@ -303,6 +301,8 @@ Ext.define('PVE.node.StatusView', {
|
|||||||
} catch(e) {
|
} catch(e) {
|
||||||
objValue = {};
|
objValue = {};
|
||||||
}
|
}
|
||||||
|
// sensors configuration
|
||||||
|
const cpuTempHelper = Ext.create('PVE.mod.TempHelper', {srcUnit: PVE.mod.TempHelper.CELSIUS, dstUnit: objValue.temp_unit === 'F' ? PVE.mod.TempHelper.FAHRENHEIT : PVE.mod.TempHelper.CELSIUS});
|
||||||
|
|
||||||
const cpuKeysI = Object.keys(objValue).filter(item => String(item).startsWith('coretemp-isa-')).sort();
|
const cpuKeysI = Object.keys(objValue).filter(item => String(item).startsWith('coretemp-isa-')).sort();
|
||||||
const cpuKeysA = Object.keys(objValue).filter(item => String(item).startsWith('k10temp-pci-')).sort();
|
const cpuKeysA = Object.keys(objValue).filter(item => String(item).startsWith('k10temp-pci-')).sort();
|
||||||
@ -583,7 +583,6 @@ Ext.define('PVE.node.StatusView', {
|
|||||||
// sensors configuration
|
// sensors configuration
|
||||||
const addressPrefix = "drivetemp-scsi-";
|
const addressPrefix = "drivetemp-scsi-";
|
||||||
const sensorName = "temp1";
|
const sensorName = "temp1";
|
||||||
const tempHelper = Ext.create('PVE.mod.TempHelper', {srcUnit: PVE.mod.TempHelper.CELSIUS, dstUnit: PVE.mod.TempHelper.CELSIUS});
|
|
||||||
// ---
|
// ---
|
||||||
let objValue;
|
let objValue;
|
||||||
try {
|
try {
|
||||||
@ -599,6 +598,7 @@ Ext.define('PVE.node.StatusView', {
|
|||||||
} catch(e) {
|
} catch(e) {
|
||||||
objValue = {};
|
objValue = {};
|
||||||
}
|
}
|
||||||
|
const tempHelper = Ext.create('PVE.mod.TempHelper', {srcUnit: PVE.mod.TempHelper.CELSIUS, dstUnit: objValue.temp_unit === 'F' ? PVE.mod.TempHelper.FAHRENHEIT : PVE.mod.TempHelper.CELSIUS});
|
||||||
const drvKeys = Object.keys(objValue).filter(item => String(item).startsWith(addressPrefix)).sort((a, b) => a.localeCompare(b, undefined, { numeric: true, sensitivity: 'base' }));
|
const drvKeys = Object.keys(objValue).filter(item => String(item).startsWith(addressPrefix)).sort((a, b) => a.localeCompare(b, undefined, { numeric: true, sensitivity: 'base' }));
|
||||||
let drvData = [];
|
let drvData = [];
|
||||||
drvKeys.forEach((drvKey) => {
|
drvKeys.forEach((drvKey) => {
|
||||||
@ -661,7 +661,6 @@ Ext.define('PVE.node.StatusView', {
|
|||||||
// sensors configuration
|
// sensors configuration
|
||||||
const addressPrefix = "nvme-pci-";
|
const addressPrefix = "nvme-pci-";
|
||||||
const sensorName = "Composite";
|
const sensorName = "Composite";
|
||||||
const tempHelper = Ext.create('PVE.mod.TempHelper', {srcUnit: PVE.mod.TempHelper.CELSIUS, dstUnit: PVE.mod.TempHelper.CELSIUS});
|
|
||||||
// display configuration
|
// display configuration
|
||||||
const itemsPerRow = 0;
|
const itemsPerRow = 0;
|
||||||
// ---
|
// ---
|
||||||
@ -679,6 +678,7 @@ Ext.define('PVE.node.StatusView', {
|
|||||||
} catch(e) {
|
} catch(e) {
|
||||||
objValue = {};
|
objValue = {};
|
||||||
}
|
}
|
||||||
|
const tempHelper = Ext.create('PVE.mod.TempHelper', {srcUnit: PVE.mod.TempHelper.CELSIUS, dstUnit: objValue.temp_unit === 'F' ? PVE.mod.TempHelper.FAHRENHEIT : PVE.mod.TempHelper.CELSIUS});
|
||||||
const nvmeKeys = Object.keys(objValue).filter(item => String(item).startsWith(addressPrefix)).sort();
|
const nvmeKeys = Object.keys(objValue).filter(item => String(item).startsWith(addressPrefix)).sort();
|
||||||
let nvmeData = [];
|
let nvmeData = [];
|
||||||
nvmeKeys.forEach((nvmeKey, index) => {
|
nvmeKeys.forEach((nvmeKey, index) => {
|
||||||
@ -751,7 +751,6 @@ Ext.define('PVE.node.StatusView', {
|
|||||||
'drivetemp-',
|
'drivetemp-',
|
||||||
'spd5118-',
|
'spd5118-',
|
||||||
];
|
];
|
||||||
const tempHelper = Ext.create('PVE.mod.TempHelper', {srcUnit: PVE.mod.TempHelper.CELSIUS, dstUnit: PVE.mod.TempHelper.CELSIUS});
|
|
||||||
// ---
|
// ---
|
||||||
let objValue;
|
let objValue;
|
||||||
try {
|
try {
|
||||||
@ -767,6 +766,7 @@ Ext.define('PVE.node.StatusView', {
|
|||||||
} catch(e) {
|
} catch(e) {
|
||||||
objValue = {};
|
objValue = {};
|
||||||
}
|
}
|
||||||
|
const tempHelper = Ext.create('PVE.mod.TempHelper', {srcUnit: PVE.mod.TempHelper.CELSIUS, dstUnit: objValue.temp_unit === 'F' ? PVE.mod.TempHelper.FAHRENHEIT : PVE.mod.TempHelper.CELSIUS});
|
||||||
|
|
||||||
// Keep only keys that do not belong to known categories
|
// Keep only keys that do not belong to known categories
|
||||||
const otherKeys = Object.keys(objValue).filter(key =>
|
const otherKeys = Object.keys(objValue).filter(key =>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user