mirror of
git://git.proxmox.com/git/proxmox-backup.git
synced 2025-03-03 12:58:28 +03:00
ui: check that store is set before trying to select in GCJobView
otherwise users will get a `b.store is null` error in the console and a loading spinner is shown for a while. the issue in question seems to stem from the event handler that gets attached when the "Prune & GC Jobs" tab is opened for a specific datastore. however, that event handler should *not* be attached for the "Datastore" -> "Prune & GC Jobs" panel. it seems that the event handler does still get attached, and will fire in the "Datastore" view if it hasn't fired while opened in a specific datastore (it should only trigger a single time). that scenario seems to occur when a different tab was previously selected in a specific datastore and navigation is triggered via the side bar from the "Datastore" -> "Prune GC Jobs" to a specific datastore. that leads to the "Prune & GC Jobs" view for that specific datastore being opened very briefly in which the event handler gets attached, navigation then automatically moves to the previously selected tab. this will stop the store from updating ensuring that the event is never triggered. when we then move to the "Datastore" -> "Prune & GC Jobs" tab again the event handler will be triggered but the store of the view is null leading to the error. Signed-off-by: Shannon Sterz <s.sterz@proxmox.com> Tested-by: Fiona Ebner <f.ebner@proxmox.com> Tested-by: Fiona Ebner <f.ebner@proxmox.com>
This commit is contained in:
parent
1874857dc2
commit
7c570bac70
@ -33,7 +33,11 @@ Ext.define('PBS.config.GCJobView', {
|
||||
// after the store is loaded, select the row to enable the Edit,.. buttons
|
||||
store.rstore.proxy.on({
|
||||
'afterload': {
|
||||
fn: () => view.getSelectionModel().select(0),
|
||||
fn: () => {
|
||||
if (view.store) {
|
||||
view.getSelectionModel().select(0);
|
||||
}
|
||||
},
|
||||
single: true,
|
||||
},
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user