PatrikBuhr | a2bc79c | 2019-10-29 13:39:00 +0100 | [diff] [blame] | 1 | <!-- |
| 2 | ========================LICENSE_START================================= |
| 3 | O-RAN-SC |
| 4 | %% |
| 5 | Copyright (C) 2019 AT&T Intellectual Property |
| 6 | %% |
| 7 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 8 | you may not use this file except in compliance with the License. |
| 9 | You may obtain a copy of the License at |
| 10 | |
| 11 | http://www.apache.org/licenses/LICENSE-2.0 |
| 12 | |
| 13 | Unless required by applicable law or agreed to in writing, software |
| 14 | distributed under the License is distributed on an "AS IS" BASIS, |
| 15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 16 | See the License for the specific language governing permissions and |
| 17 | limitations under the License. |
| 18 | ========================LICENSE_END=================================== |
| 19 | --> |
| 20 | <div class="user__section"> |
| 21 | <h3 class="rd-global-page-title">Users</h3> |
| 22 | <button mat-raised-button (click)="addUser()">Add User</button> |
| 23 | <div class="spinner-container" *ngIf="dataSource.loading$ | async"> |
| 24 | <mat-spinner></mat-spinner> |
| 25 | </div> |
| 26 | <table mat-table [dataSource]="dataSource" matSort class="user-table mat-elevation-z8"> |
| 27 | |
| 28 | <ng-container matColumnDef="loginId"> |
| 29 | <mat-header-cell *matHeaderCellDef mat-sort-header> Login ID </mat-header-cell> |
| 30 | <mat-cell *matCellDef="let element"> {{element.loginId}} </mat-cell> |
| 31 | </ng-container> |
| 32 | |
| 33 | <ng-container matColumnDef="firstName"> |
| 34 | <mat-header-cell *matHeaderCellDef mat-sort-header> First Name </mat-header-cell> |
| 35 | <mat-cell *matCellDef="let element"> {{element.firstName}} </mat-cell> |
| 36 | </ng-container> |
| 37 | |
| 38 | <ng-container matColumnDef="lastName"> |
| 39 | <mat-header-cell *matHeaderCellDef mat-sort-header> Last Name </mat-header-cell> |
| 40 | <mat-cell *matCellDef="let element"> {{element.lastName}} </mat-cell> |
| 41 | </ng-container> |
| 42 | |
| 43 | <ng-container matColumnDef="active"> |
| 44 | <mat-header-cell *matHeaderCellDef mat-sort-header> Active? </mat-header-cell> |
| 45 | <mat-cell *matCellDef="let element"> {{element.active}} </mat-cell> |
| 46 | </ng-container> |
| 47 | |
| 48 | <ng-container matColumnDef="action"> |
| 49 | <mat-header-cell *matHeaderCellDef> Action </mat-header-cell> |
| 50 | <mat-cell *matCellDef="let element"> |
| 51 | <div class="user-button-row"> |
| 52 | <button mat-icon-button (click)="editUser(element)"> |
| 53 | <mat-icon matTooltip="Edit properties">edit</mat-icon> |
| 54 | </button> |
| 55 | <button mat-icon-button color="warn" (click)="deleteUser(element)"> |
| 56 | <mat-icon matTooltip="Delete user">delete</mat-icon> |
| 57 | </button> |
| 58 | </div> |
| 59 | </mat-cell> |
| 60 | </ng-container> |
| 61 | |
| 62 | <ng-container matColumnDef="noRecordsFound"> |
| 63 | <mat-footer-cell *matFooterCellDef>No records found.</mat-footer-cell> |
| 64 | </ng-container> |
| 65 | |
| 66 | <mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row> |
| 67 | <mat-row *matRowDef="let row; columns: displayedColumns;"></mat-row> |
| 68 | <mat-footer-row *matFooterRowDef="['noRecordsFound']" [ngClass]="{'display-none': dataSource.rowCount > 0}"></mat-footer-row> |
| 69 | |
| 70 | </table> |
| 71 | |
| 72 | <div class="spinner-container" *ngIf="dataSource.loading$ | async"> |
| 73 | <mat-spinner diameter=50></mat-spinner> |
| 74 | </div> |
| 75 | |
| 76 | </div> |