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 matTooltip="The ID of the policy instance">
27 <mat-cell *matCellDef="let element" (click)="modifyInstance(element)">{{element.policy_id}}
31 <ng-container matColumnDef="ric">
32 <mat-header-cell mat-sort-header *matHeaderCellDef
33 matTooltip="Element where the policy instance resides, e.g. a gNodeB or Near-RT RIC">
36 <mat-cell *matCellDef="let element" (click)="modifyInstance(element)">{{element.ric_id}}
40 <ng-container matColumnDef="service">
41 <mat-header-cell mat-sort-header *matHeaderCellDef
42 matTooltip="The service that created the policy instance, and is responsible for its lifecycle">
45 <mat-cell *matCellDef="let element" (click)="modifyInstance(element)">{{element.service_id}}
49 <ng-container matColumnDef="lastModified">
50 <mat-header-cell mat-sort-header *matHeaderCellDef
51 matTooltip="The time of the last modification of the policy instance">
54 <mat-cell *matCellDef="let element" (click)="modifyInstance(element)">{{toLocalTime(element.lastModified)}}
58 <ng-container matColumnDef="action">
59 <mat-header-cell class="action-cell" *matHeaderCellDef>Action</mat-header-cell>
60 <mat-cell class="action-cell" *matCellDef="let instance">
61 <button mat-icon-button (click)="modifyInstance(instance)" matTooltip="Edit the policy instance">
62 <mat-icon>edit</mat-icon>
64 <button mat-icon-button color="warn" (click)="deleteInstance(instance)"
65 matTooltip="Delete the policy instance">
66 <mat-icon>delete</mat-icon>
71 <ng-container matColumnDef="noRecordsFound">
72 <mat-footer-cell *matFooterCellDef>No records found.</mat-footer-cell>
75 <mat-header-row *matHeaderRowDef="['instanceId', 'ric', 'service', 'lastModified', 'action']"
76 [ngClass]="{'display-none': !this.hasInstances()}">
78 <mat-row *matRowDef="let instance; columns: ['instanceId', 'ric', 'service', 'lastModified', 'action'];"></mat-row>
80 <mat-footer-row *matFooterRowDef="['noRecordsFound']" [ngClass]="{'display-none': this.hasInstances()}">
85 <div class="spinner-container" *ngIf="instanceDataSource.loading$ | async">
86 <mat-spinner diameter="50"></mat-spinner>