implement system info
This commit is contained in:
parent
b9a43a41b6
commit
f6c1936ca3
@ -150,10 +150,6 @@ sub _load_graphics_data {
|
|||||||
# ============================================================================
|
# ============================================================================
|
||||||
|
|
||||||
sub get_graphic_info {
|
sub get_graphic_info {
|
||||||
if (!$config{gpu}{intel_enabled} && !$config{gpu}{nvidia_enabled} && !$config{gpu}{amd_enabled}) {
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
|
|
||||||
debug(__LINE__, "get_graphic_info called");
|
debug(__LINE__, "get_graphic_info called");
|
||||||
|
|
||||||
# Start PVE Mod
|
# Start PVE Mod
|
||||||
@ -168,10 +164,6 @@ sub get_graphic_info {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sub get_sensors_info {
|
sub get_sensors_info {
|
||||||
if (!$config{lm_sensors}{enabled}) {
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
|
|
||||||
debug(__LINE__, "get_sensors_info called");
|
debug(__LINE__, "get_sensors_info called");
|
||||||
|
|
||||||
# Start PVE Mod
|
# Start PVE Mod
|
||||||
@ -186,10 +178,6 @@ sub get_sensors_info {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sub get_ups_info {
|
sub get_ups_info {
|
||||||
if (!$config{ups}{enabled}) {
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
|
|
||||||
debug(__LINE__, "get_ups_info called");
|
debug(__LINE__, "get_ups_info called");
|
||||||
|
|
||||||
# Start PVE Mod
|
# Start PVE Mod
|
||||||
@ -215,10 +203,6 @@ sub get_pve_mod_version {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sub get_system_information {
|
sub get_system_information {
|
||||||
if (!$config{system_info}{enabled}) {
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
|
|
||||||
debug(__LINE__, "get_system_information called");
|
debug(__LINE__, "get_system_information called");
|
||||||
|
|
||||||
if (defined $system_info_cache) {
|
if (defined $system_info_cache) {
|
||||||
|
|||||||
@ -1000,7 +1000,21 @@ Ext.define('PVE.node.StatusView', {
|
|||||||
if (value === null || value === undefined) {
|
if (value === null || value === undefined) {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
return value;
|
|
||||||
|
const titleMap = {
|
||||||
|
manufacturer: 'Manufacturer',
|
||||||
|
product_name: 'Product Name',
|
||||||
|
serial_number: 'Serial Number',
|
||||||
|
};
|
||||||
|
|
||||||
|
let parts = [];
|
||||||
|
['manufacturer', 'product_name', 'serial_number'].forEach(function(key) {
|
||||||
|
if (value[key] !== undefined && value[key] !== null) {
|
||||||
|
parts.push(titleMap[key] + ': ' + value[key]);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return parts.length > 0 ? parts.join(' | ') : '';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user