From abdbb674713796e5308eb4272197a5c253868a85 Mon Sep 17 00:00:00 2001 From: Mihajlo Medjedovic Date: Thu, 5 Jun 2025 12:07:26 +0200 Subject: [PATCH] fix: viya deploy load data timing --- .../sections/automatic/automatic.component.ts | 26 +++++++++---------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/client/src/app/deploy/sections/automatic/automatic.component.ts b/client/src/app/deploy/sections/automatic/automatic.component.ts index c520d17..d741ff1 100644 --- a/client/src/app/deploy/sections/automatic/automatic.component.ts +++ b/client/src/app/deploy/sections/automatic/automatic.component.ts @@ -86,21 +86,19 @@ export class AutomaticComponent implements OnInit { ) {} ngOnInit(): void { - const promiseGetAadminGroups = this.getAdminGroups() - const getCurrentUser = this.getCurrentUser() - const getComputeContexts = this.getComputeContexts() + this.loadData() + } - Promise.all([ - promiseGetAadminGroups, - getCurrentUser, - getComputeContexts - ]).then(() => { - setTimeout(() => { - if (this.selectedComputeContext) { - this.onComputeContextChange(this.selectedComputeContext) - } - }, 500) - }) + public async loadData() { + await this.getAdminGroups() + await this.getComputeContexts() + await this.getCurrentUser() + + setTimeout(() => { + if (this.selectedComputeContext) { + this.onComputeContextChange(this.selectedComputeContext) + } + }, 500) } public async getComputeContexts() {