Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions shell/components/PaginatedResourceTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -116,15 +116,11 @@ export default defineComponent({
},

async fetch() {
const promises = [
this.$fetchType(this.resource, [], this.overrideInStore || this.inStore),
];

if (this.fetchSecondaryResources) {
promises.push(this.fetchSecondaryResources({ canPaginate: this.canPaginate }));
await this.fetchSecondaryResources({ canPaginate: this.canPaginate });
}

await Promise.all(promises);
await this.$fetchType(this.resource, [], this.overrideInStore || this.inStore);
},

computed: {
Expand Down
7 changes: 5 additions & 2 deletions shell/pages/home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -302,8 +302,11 @@ export default defineComponent({
return Promise.resolve({});
}

const promises = [];

if ( this.canViewMgmtClusters ) {
this.$store.dispatch('management/findAll', { type: MANAGEMENT.CLUSTER });
// This is the only one we need to block on (needed for the initial sort on mgmt name)
promises.push(this.$store.dispatch('management/findAll', { type: MANAGEMENT.CLUSTER }));
}

if ( this.canViewMachine ) {
Expand All @@ -323,7 +326,7 @@ export default defineComponent({
this.$store.dispatch('management/findAll', { type: MANAGEMENT.NODE_TEMPLATE });
}

return Promise.resolve({});
return Promise.all(promises);
},

async fetchPageSecondaryResources({
Expand Down
Loading