fix(node_info): re-show sensor widgets when data becomes valid again after being hidden

This commit is contained in:
Meliox 2026-08-22 17:55:26 +02:00
parent 8a9b7568a7
commit 2f3d2f9723

View File

@ -223,6 +223,7 @@ Ext.define('PVE.node.StatusView', {
} catch(e) { } catch(e) {
objValue = {}; objValue = {};
} }
this.show();
// sensors configuration // sensors configuration
const cpuTempHelper = Ext.create('PVE.mod.TempHelper', {srcUnit: PVE.mod.TempHelper.CELSIUS, dstUnit: value.temp_unit === 'F' ? PVE.mod.TempHelper.FAHRENHEIT : PVE.mod.TempHelper.CELSIUS}); const cpuTempHelper = Ext.create('PVE.mod.TempHelper', {srcUnit: PVE.mod.TempHelper.CELSIUS, dstUnit: value.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();
@ -543,6 +544,7 @@ Ext.define('PVE.node.StatusView', {
} catch(e) { } catch(e) {
objValue = {}; objValue = {};
} }
this.show();
const tempHelper = Ext.create('PVE.mod.TempHelper', {srcUnit: PVE.mod.TempHelper.CELSIUS, dstUnit: value.temp_unit === 'F' ? PVE.mod.TempHelper.FAHRENHEIT : PVE.mod.TempHelper.CELSIUS}); const tempHelper = Ext.create('PVE.mod.TempHelper', {srcUnit: PVE.mod.TempHelper.CELSIUS, dstUnit: value.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 = [];
@ -623,6 +625,7 @@ Ext.define('PVE.node.StatusView', {
} catch(e) { } catch(e) {
objValue = {}; objValue = {};
} }
this.show();
const tempHelper = Ext.create('PVE.mod.TempHelper', {srcUnit: PVE.mod.TempHelper.CELSIUS, dstUnit: value.temp_unit === 'F' ? PVE.mod.TempHelper.FAHRENHEIT : PVE.mod.TempHelper.CELSIUS}); const tempHelper = Ext.create('PVE.mod.TempHelper', {srcUnit: PVE.mod.TempHelper.CELSIUS, dstUnit: value.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 = [];
@ -711,6 +714,7 @@ Ext.define('PVE.node.StatusView', {
} catch(e) { } catch(e) {
objValue = {}; objValue = {};
} }
this.show();
const tempHelper = Ext.create('PVE.mod.TempHelper', {srcUnit: PVE.mod.TempHelper.CELSIUS, dstUnit: value.temp_unit === 'F' ? PVE.mod.TempHelper.FAHRENHEIT : PVE.mod.TempHelper.CELSIUS}); const tempHelper = Ext.create('PVE.mod.TempHelper', {srcUnit: PVE.mod.TempHelper.CELSIUS, dstUnit: value.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
@ -811,6 +815,7 @@ Ext.define('PVE.node.StatusView', {
} catch(e) { } catch(e) {
objValue = {}; objValue = {};
} }
this.show();
// Recursive function to find fan keys and values // Recursive function to find fan keys and values
function findFanKeys(obj, fanKeys, parentKey = null) { function findFanKeys(obj, fanKeys, parentKey = null) {
@ -926,6 +931,7 @@ Ext.define('PVE.node.StatusView', {
} else if (!objValue || Object.keys(objValue).length === 0) { } else if (!objValue || Object.keys(objValue).length === 0) {
return 'N/A'; return 'N/A';
} }
this.show();
// Helper function to get status color // Helper function to get status color
function getStatusColor(status) { function getStatusColor(status) {
@ -1158,6 +1164,7 @@ Ext.define('PVE.node.StatusView', {
this.hide(); this.hide();
return ''; return '';
} }
this.show();
const titleMap = { const titleMap = {
manufacturer: 'Manufacturer', manufacturer: 'Manufacturer',