mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-13 15:49:24 +00:00
ui: cleanups and some s/var/let/ transformations
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
fde3e23dcd
commit
23f14fd929
@ -73,10 +73,11 @@ Ext.define('PVE.node.CephStatus', {
|
||||
stateful: true,
|
||||
stateId: 'ceph-status-warnings',
|
||||
xtype: 'grid',
|
||||
// since we load the store manually,
|
||||
// to show the emptytext, we have to
|
||||
// specify an empty store
|
||||
store: { data:[] },
|
||||
// since we load the store manually to show the emptytext,
|
||||
// we have to specify an empty one here
|
||||
store: {
|
||||
data: [],
|
||||
},
|
||||
emptyText: gettext('No Warnings/Errors'),
|
||||
columns: [
|
||||
{
|
||||
|
@ -80,7 +80,7 @@ Ext.define('PVE.node.Config', {
|
||||
})
|
||||
});
|
||||
|
||||
var restartBtn = Ext.create('Proxmox.button.Button', {
|
||||
let restartBtn = Ext.create('Proxmox.button.Button', {
|
||||
text: gettext('Reboot'),
|
||||
disabled: !caps.nodes['Sys.PowerMgmt'],
|
||||
dangerous: true,
|
||||
@ -114,7 +114,9 @@ Ext.define('PVE.node.Config', {
|
||||
Ext.apply(me, {
|
||||
title: gettext('Node') + " '" + nodename + "'",
|
||||
hstateid: 'nodetab',
|
||||
defaults: { statusStore: me.statusStore },
|
||||
defaults: {
|
||||
statusStore: me.statusStore
|
||||
},
|
||||
tbar: [ restartBtn, shutdownBtn, shellBtn, actionBtn]
|
||||
});
|
||||
|
||||
@ -400,9 +402,9 @@ Ext.define('PVE.node.Config', {
|
||||
|
||||
me.callParent();
|
||||
|
||||
me.mon(me.statusStore, 'load', function(s, records, success) {
|
||||
var uptimerec = s.data.get('uptime');
|
||||
var powermgmt = uptimerec ? uptimerec.data.value : false;
|
||||
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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user