fix: viya deploy load data timing
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user