PatrikBuhr | a2bc79c | 2019-10-29 13:39:00 +0100 | [diff] [blame] | 1 | <!-- |
| 2 | ========================LICENSE_START================================= |
| 3 | O-RAN-SC |
| 4 | %% |
| 5 | Copyright (C) 2019 Nordix Foundation |
| 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 | --> |
PatrikBuhr | dbb8eba | 2019-11-15 14:12:11 +0100 | [diff] [blame^] | 20 | <table #table mat-table class="instances-table mat-elevation-z8" [ngClass]="{'table-dark': darkMode}" matSort |
| 21 | multiTemplateDataRows [dataSource]="instanceDataSource"> |
PatrikBuhr | a2bc79c | 2019-10-29 13:39:00 +0100 | [diff] [blame] | 22 | |
| 23 | <ng-container matColumnDef="instanceId"> |
PatrikBuhr | dbb8eba | 2019-11-15 14:12:11 +0100 | [diff] [blame^] | 24 | <mat-header-cell mat-sort-header *matHeaderCellDef>Instance</mat-header-cell> |
PatrikBuhr | a2bc79c | 2019-10-29 13:39:00 +0100 | [diff] [blame] | 25 | <mat-cell *matCellDef="let element" (click)="modifyInstance(element)">{{element.instanceId}} |
| 26 | </mat-cell> |
| 27 | </ng-container> |
| 28 | |
| 29 | <ng-container matColumnDef="action"> |
| 30 | <mat-header-cell class="action-cell" *matHeaderCellDef>Action</mat-header-cell> |
| 31 | <mat-cell class="action-cell" *matCellDef="let instance"> |
| 32 | <button mat-icon-button (click)="modifyInstance(instance)"> |
| 33 | <mat-icon>edit</mat-icon> |
| 34 | </button> |
| 35 | <button mat-icon-button color="warn" (click)="deleteInstance(instance)"> |
| 36 | <mat-icon>delete</mat-icon> |
| 37 | </button> |
| 38 | </mat-cell> |
| 39 | </ng-container> |
| 40 | |
| 41 | <ng-container matColumnDef="noRecordsFound"> |
| 42 | <mat-footer-cell *matFooterCellDef>No records found.</mat-footer-cell> |
| 43 | </ng-container> |
| 44 | |
PatrikBuhr | dbb8eba | 2019-11-15 14:12:11 +0100 | [diff] [blame^] | 45 | <mat-header-row *matHeaderRowDef="['instanceId', 'action']" [ngClass]="{'display-none': !this.hasInstances()}"> |
PatrikBuhr | a2bc79c | 2019-10-29 13:39:00 +0100 | [diff] [blame] | 46 | </mat-header-row> |
| 47 | <mat-row *matRowDef="let instance; columns: ['instanceId', 'action'];"></mat-row> |
| 48 | |
| 49 | <mat-footer-row *matFooterRowDef="['noRecordsFound']" [ngClass]="{'display-none': this.hasInstances()}"> |
| 50 | </mat-footer-row> |
| 51 | |
| 52 | </table> |
| 53 | |
PatrikBuhr | a2bc79c | 2019-10-29 13:39:00 +0100 | [diff] [blame] | 54 | <div class="spinner-container" *ngIf="instanceDataSource.loading$ | async"> |
| 55 | <mat-spinner diameter="50"></mat-spinner> |
| 56 | </div> |