mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-13 15:02:22 +00:00
ui: node/config: use simply boolean expression for powermngt check
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
23f14fd929
commit
5643ac475c
@ -404,10 +404,8 @@ Ext.define('PVE.node.Config', {
|
||||
|
||||
me.mon(me.statusStore, 'load', function(store, records, success) {
|
||||
let uptimerec = store.data.get('uptime');
|
||||
let powermgmt = uptimerec ? uptimerec.data.value : false;
|
||||
if (!caps.nodes['Sys.PowerMgmt']) {
|
||||
powermgmt = false;
|
||||
}
|
||||
let powermgmt = caps.nodes['Sys.PowerMgmt'] && uptimerec && uptimerec.data.value;
|
||||
|
||||
restartBtn.setDisabled(!powermgmt);
|
||||
shutdownBtn.setDisabled(!powermgmt);
|
||||
shellBtn.setDisabled(!powermgmt);
|
||||
|
Loading…
Reference in New Issue
Block a user