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,
|
stateful: true,
|
||||||
stateId: 'ceph-status-warnings',
|
stateId: 'ceph-status-warnings',
|
||||||
xtype: 'grid',
|
xtype: 'grid',
|
||||||
// since we load the store manually,
|
// since we load the store manually to show the emptytext,
|
||||||
// to show the emptytext, we have to
|
// we have to specify an empty one here
|
||||||
// specify an empty store
|
store: {
|
||||||
store: { data:[] },
|
data: [],
|
||||||
|
},
|
||||||
emptyText: gettext('No Warnings/Errors'),
|
emptyText: gettext('No Warnings/Errors'),
|
||||||
columns: [
|
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'),
|
text: gettext('Reboot'),
|
||||||
disabled: !caps.nodes['Sys.PowerMgmt'],
|
disabled: !caps.nodes['Sys.PowerMgmt'],
|
||||||
dangerous: true,
|
dangerous: true,
|
||||||
@ -114,7 +114,9 @@ Ext.define('PVE.node.Config', {
|
|||||||
Ext.apply(me, {
|
Ext.apply(me, {
|
||||||
title: gettext('Node') + " '" + nodename + "'",
|
title: gettext('Node') + " '" + nodename + "'",
|
||||||
hstateid: 'nodetab',
|
hstateid: 'nodetab',
|
||||||
defaults: { statusStore: me.statusStore },
|
defaults: {
|
||||||
|
statusStore: me.statusStore
|
||||||
|
},
|
||||||
tbar: [ restartBtn, shutdownBtn, shellBtn, actionBtn]
|
tbar: [ restartBtn, shutdownBtn, shellBtn, actionBtn]
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -400,9 +402,9 @@ Ext.define('PVE.node.Config', {
|
|||||||
|
|
||||||
me.callParent();
|
me.callParent();
|
||||||
|
|
||||||
me.mon(me.statusStore, 'load', function(s, records, success) {
|
me.mon(me.statusStore, 'load', function(store, records, success) {
|
||||||
var uptimerec = s.data.get('uptime');
|
let uptimerec = store.data.get('uptime');
|
||||||
var powermgmt = uptimerec ? uptimerec.data.value : false;
|
let powermgmt = uptimerec ? uptimerec.data.value : false;
|
||||||
if (!caps.nodes['Sys.PowerMgmt']) {
|
if (!caps.nodes['Sys.PowerMgmt']) {
|
||||||
powermgmt = false;
|
powermgmt = false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user