ui: improve code-readability s/tapestore/tapeStore/

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2021-04-12 12:34:26 +02:00
parent a21f9852fd
commit fa29d7eb49
2 changed files with 8 additions and 8 deletions

View File

@ -126,15 +126,15 @@ Ext.define('PBS.view.main.NavigationTree', {
view.rstore.on('load', this.onLoad, this); view.rstore.on('load', this.onLoad, this);
view.on('destroy', view.rstore.stopUpdate); view.on('destroy', view.rstore.stopUpdate);
if (view.tapestore === undefined) { if (view.tapeStore === undefined) {
view.tapestore = Ext.create('Proxmox.data.UpdateStore', { view.tapeStore = Ext.create('Proxmox.data.UpdateStore', {
autoStart: true, autoStart: true,
interval: 60 * 1000, interval: 60 * 1000,
storeid: 'pbs-tape-drive-list', storeid: 'pbs-tape-drive-list',
model: 'pbs-tape-drive-list', model: 'pbs-tape-drive-list',
}); });
view.tapestore.on('load', this.onTapeDriveLoad, this); view.tapeStore.on('load', this.onTapeDriveLoad, this);
view.on('destroy', view.tapestore.stopUpdate); view.on('destroy', view.tapeStore.stopUpdate);
} }
}, },
@ -265,12 +265,12 @@ Ext.define('PBS.view.main.NavigationTree', {
reloadTapeStore: function() { reloadTapeStore: function() {
let me = this; let me = this;
me.tapestore.load(); me.tapeStore.load();
}, },
select: function(path, silent) { select: function(path, silent) {
var me = this; var me = this;
if (me.rstore.isLoaded() && me.tapestore.isLoaded()) { if (me.rstore.isLoaded() && me.tapeStore.isLoaded()) {
if (silent) { if (silent) {
me.suspendEvents(false); me.suspendEvents(false);
} }

View File

@ -168,7 +168,7 @@ Ext.define('PBS.TapeManagement.DriveStatus', {
init: function(view) { init: function(view) {
let me = this; let me = this;
me.mon(me.lookup('statusgrid').getStore().rstore, 'load', 'onLoad'); me.mon(me.lookup('statusgrid').getStore().rstore, 'load', 'onLoad');
let tapeStore = Ext.ComponentQuery.query('navigationtree')[0].tapestore; let tapeStore = Ext.ComponentQuery.query('navigationtree')[0].tapeStore;
me.mon(tapeStore, 'load', 'onStateLoad'); me.mon(tapeStore, 'load', 'onStateLoad');
if (tapeStore.isLoaded()) { if (tapeStore.isLoaded()) {
me.onStateLoad(tapeStore); me.onStateLoad(tapeStore);
@ -533,7 +533,7 @@ Ext.define('PBS.TapeManagement.DriveInfoPanel', {
me.callParent(); me.callParent();
let tapeStore = Ext.ComponentQuery.query('navigationtree')[0].tapestore; let tapeStore = Ext.ComponentQuery.query('navigationtree')[0].tapeStore;
me.mon(tapeStore, 'load', me.updateData, me); me.mon(tapeStore, 'load', me.updateData, me);
if (tapeStore.isLoaded()) { if (tapeStore.isLoaded()) {
me.updateData(tapeStore); me.updateData(tapeStore);