blob: e1a67dd54ee05ee1eeaaf6814aa7a77903ccb42e [file] [log] [blame]
PatrikBuhra2bc79c2019-10-29 13:39:00 +01001<!--
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 -->
PatrikBuhrdbb8eba2019-11-15 14:12:11 +010020<table #table mat-table class="instances-table mat-elevation-z8" [ngClass]="{'table-dark': darkMode}" matSort
21 multiTemplateDataRows [dataSource]="instanceDataSource">
PatrikBuhra2bc79c2019-10-29 13:39:00 +010022
23 <ng-container matColumnDef="instanceId">
PatrikBuhrdbb8eba2019-11-15 14:12:11 +010024 <mat-header-cell mat-sort-header *matHeaderCellDef>Instance</mat-header-cell>
PatrikBuhra2bc79c2019-10-29 13:39:00 +010025 <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
PatrikBuhrdbb8eba2019-11-15 14:12:11 +010045 <mat-header-row *matHeaderRowDef="['instanceId', 'action']" [ngClass]="{'display-none': !this.hasInstances()}">
PatrikBuhra2bc79c2019-10-29 13:39:00 +010046 </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
PatrikBuhra2bc79c2019-10-29 13:39:00 +010054<div class="spinner-container" *ngIf="instanceDataSource.loading$ | async">
55 <mat-spinner diameter="50"></mat-spinner>
56</div>