diff options
Diffstat (limited to 'portal-FE-common/src/app/pages/admins')
-rw-r--r-- | portal-FE-common/src/app/pages/admins/new-admin/new-admin.component.html | 1 | ||||
-rw-r--r-- | portal-FE-common/src/app/pages/admins/new-admin/new-admin.component.ts | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/portal-FE-common/src/app/pages/admins/new-admin/new-admin.component.html b/portal-FE-common/src/app/pages/admins/new-admin/new-admin.component.html index c43e4ba1..ce721c46 100644 --- a/portal-FE-common/src/app/pages/admins/new-admin/new-admin.component.html +++ b/portal-FE-common/src/app/pages/admins/new-admin/new-admin.component.html @@ -69,6 +69,7 @@ ngbDropdownItem>{{app.appName}}</button> </div> </div> + <span class="onap-spinner" *ngIf="isLoading"></span> <!-- User admins list --> <div class="container adminApps" *ngIf="adminAppsRoles.length > 0"> <table mat-table [dataSource]="adminsAppsSource"> diff --git a/portal-FE-common/src/app/pages/admins/new-admin/new-admin.component.ts b/portal-FE-common/src/app/pages/admins/new-admin/new-admin.component.ts index 8f80138e..46a86d7d 100644 --- a/portal-FE-common/src/app/pages/admins/new-admin/new-admin.component.ts +++ b/portal-FE-common/src/app/pages/admins/new-admin/new-admin.component.ts @@ -119,6 +119,7 @@ export class NewAdminComponent implements OnInit { navigateBack() { this.dialogState = 1; + this.changedSelectedUser = null; } removeAdminApp(app: any) { @@ -204,6 +205,7 @@ export class NewAdminComponent implements OnInit { } updateAdminAppsRoles() { + this.isLoading = true; const modalRef = this.ngModal.open(InformationModalComponent); modalRef.componentInstance.title = "Admin Update"; modalRef.componentInstance.message = 'Are you sure you want to make these admin changes?'; @@ -212,7 +214,9 @@ export class NewAdminComponent implements OnInit { this.adminsService.updateAdminAppsRoles({ orgUserId: this.changedSelectedUser.orgUserId, appsRoles: this.adminAppsRoles }).subscribe(_data => { this.passBackNewAdminPopup.emit(_data); this.remindToAddUserIfNecessary(); + this.isLoading = false; }, (_err: HttpErrorResponse) => { + this.isLoading = false; this.passBackNewAdminPopup.emit(_err); const modalErrorRef = this.ngModal.open(ConfirmationModalComponent); modalErrorRef.componentInstance.title = "Error"; @@ -221,6 +225,7 @@ export class NewAdminComponent implements OnInit { } }); } + this.isLoading = false; }, (reason) => { return; }); |