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

View File

@ -168,7 +168,7 @@ Ext.define('PBS.TapeManagement.DriveStatus', {
init: function(view) {
let me = this;
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');
if (tapeStore.isLoaded()) {
me.onStateLoad(tapeStore);
@ -533,7 +533,7 @@ Ext.define('PBS.TapeManagement.DriveInfoPanel', {
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);
if (tapeStore.isLoaded()) {
me.updateData(tapeStore);