Skip to content

Commit

Permalink
[#1263] Loading for opening a new tab
Browse files Browse the repository at this point in the history
  • Loading branch information
fivitti committed Jan 24, 2024
1 parent b33b33e commit 9e0ae51
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,7 @@ export class SharedNetworksPageComponent implements OnInit, OnDestroy {
* @param sharedNetworkId Shared network ID.
*/
private createTab(sharedNetworkId: number): Promise<void> {
this.loading = true
return (
lastValueFrom(
// Fetch data from API.
Expand Down Expand Up @@ -407,6 +408,9 @@ export class SharedNetworksPageComponent implements OnInit, OnDestroy {
life: 10000,
})
})
.finally(() => {
this.loading = false
})
)
}

Expand Down
4 changes: 4 additions & 0 deletions webui/src/app/subnets-page/subnets-page.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,7 @@ export class SubnetsPageComponent implements OnInit, OnDestroy {
* @param subnetId Subnet Id.
*/
private createTab(subnetId: number): Promise<void> {
this.loading = true
return (
lastValueFrom(
// Fetch data from API.
Expand All @@ -521,6 +522,9 @@ export class SubnetsPageComponent implements OnInit, OnDestroy {
life: 10000,
})
})
.finally(() => {
this.loading = false
})
)
}

Expand Down

0 comments on commit 9e0ae51

Please sign in to comment.