2 ========================LICENSE_START=================================
5 Copyright (C) 2019 Nordix Foundation
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
11 http://www.apache.org/licenses/LICENSE-2.0
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===================================
20 <table #table mat-table class="instances-table mat-elevation-z8" [ngClass]="{'table-dark': darkMode}" matSort
21 multiTemplateDataRows [dataSource]="instanceDataSource">
23 <ng-container matColumnDef="instanceId">
24 <mat-header-cell mat-sort-header *matHeaderCellDef>Instance</mat-header-cell>
25 <mat-cell *matCellDef="let element" (click)="modifyInstance(element)">{{element.id}}
29 <ng-container matColumnDef="ric">
30 <mat-header-cell mat-sort-header *matHeaderCellDef>Near-RT RIC</mat-header-cell>
31 <mat-cell *matCellDef="let element" (click)="modifyInstance(element)">{{element.ric}}
35 <ng-container matColumnDef="service">
36 <mat-header-cell mat-sort-header *matHeaderCellDef>Owner</mat-header-cell>
37 <mat-cell *matCellDef="let element" (click)="modifyInstance(element)">{{element.service}}
41 <ng-container matColumnDef="lastModified">
42 <mat-header-cell mat-sort-header *matHeaderCellDef>Last modified</mat-header-cell>
43 <mat-cell *matCellDef="let element" (click)="modifyInstance(element)">{{toLocalTime(element.lastModified)}}
47 <ng-container matColumnDef="action">
48 <mat-header-cell class="action-cell" *matHeaderCellDef>Action</mat-header-cell>
49 <mat-cell class="action-cell" *matCellDef="let instance">
50 <button mat-icon-button (click)="modifyInstance(instance)">
51 <mat-icon>edit</mat-icon>
53 <button mat-icon-button color="warn" (click)="deleteInstance(instance)">
54 <mat-icon>delete</mat-icon>
59 <ng-container matColumnDef="noRecordsFound">
60 <mat-footer-cell *matFooterCellDef>No records found.</mat-footer-cell>
63 <mat-header-row *matHeaderRowDef="['instanceId', 'ric', 'service', 'lastModified', 'action']"
64 [ngClass]="{'display-none': !this.hasInstances()}">
66 <mat-row *matRowDef="let instance; columns: ['instanceId', 'ric', 'service', 'lastModified', 'action'];"></mat-row>
68 <mat-footer-row *matFooterRowDef="['noRecordsFound']" [ngClass]="{'display-none': this.hasInstances()}">
73 <div class="spinner-container" *ngIf="instanceDataSource.loading$ | async">
74 <mat-spinner diameter="50"></mat-spinner>