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===================================
21 Number of instances: {{this.nbInstances()}}
22 <button mat-icon-button (click)="createPolicyInstance(policyTypeSchema)">
23 <mat-icon matTooltip="Create instance">add_box</mat-icon>
25 <button mat-icon-button color="primary" (click)="refreshTable()">
26 <mat-icon>refresh</mat-icon>
30 <table #table mat-table class="instances-table mat-elevation-z8" [ngClass]="{'table-dark': darkMode}" matSort
31 multiTemplateDataRows [dataSource]="instanceDataSource">
33 <ng-container matColumnDef="instanceId">
34 <mat-header-cell mat-sort-header *matHeaderCellDef matTooltip="The ID of the policy instance">
35 <div (click)="stopSort($event)">
36 <form style="display: flex" [formGroup]="policyInstanceForm">
38 <input id="policyInstanceIdFilter" matInput formControlName="id">
39 <mat-placeholder>Instance</mat-placeholder>
44 <mat-cell *matCellDef="let element" (click)="modifyInstance(element)">{{element.policy_id}}
48 <ng-container matColumnDef="ric">
49 <mat-header-cell mat-sort-header *matHeaderCellDef
50 matTooltip="Element where the policy instance resides, e.g. a gNodeB or Near-RT RIC">
51 <div (click)="stopSort($event)">
52 <form style="display: flex" [formGroup]="policyInstanceForm">
54 <input id="policyInstanceTargetFilter" matInput formControlName="target">
55 <mat-placeholder>Target</mat-placeholder>
60 <mat-cell *matCellDef="let element" (click)="modifyInstance(element)">{{element.ric_id}}
64 <ng-container matColumnDef="service">
65 <mat-header-cell mat-sort-header *matHeaderCellDef
66 matTooltip="The service that created the policy instance, and is responsible for its lifecycle">
67 <div (click)="stopSort($event)">
68 <form style="display: flex" [formGroup]="policyInstanceForm">
70 <input id="policyInstanceOwnerFilter" matInput formControlName="owner">
71 <mat-placeholder>Owner</mat-placeholder>
76 <mat-cell *matCellDef="let element" (click)="modifyInstance(element)">{{element.service_id}}
80 <ng-container matColumnDef="lastModified">
81 <mat-header-cell mat-sort-header *matHeaderCellDef
82 matTooltip="The time of the last modification of the policy instance">
83 <div (click)="stopSort($event)">
84 <form style="display: flex" [formGroup]="policyInstanceForm">
86 <input id="policyInstanceLastModifiedFilter" matInput formControlName="lastModified">
87 <mat-placeholder>Last modified</mat-placeholder>
92 <mat-cell *matCellDef="let element" (click)="modifyInstance(element)">{{toLocalTime(element.lastModified)}}
96 <ng-container matColumnDef="action">
97 <mat-header-cell class="action-cell" *matHeaderCellDef>Action</mat-header-cell>
98 <mat-cell class="action-cell" *matCellDef="let instance">
99 <button mat-icon-button (click)="modifyInstance(instance)" matTooltip="Edit the policy instance">
100 <mat-icon>edit</mat-icon>
102 <button mat-icon-button color="warn" (click)="deleteInstance(instance)"
103 matTooltip="Delete the policy instance">
104 <mat-icon>delete</mat-icon>
109 <ng-container matColumnDef="noRecordsFound">
110 <mat-footer-cell *matFooterCellDef>No records found.</mat-footer-cell>
113 <mat-header-row *matHeaderRowDef="['instanceId', 'ric', 'service', 'lastModified', 'action']"
114 [ngClass]="{'display-none': !this.hasInstances()}">
116 <mat-row *matRowDef="let instance; columns: ['instanceId', 'ric', 'service', 'lastModified', 'action'];"></mat-row>
118 <mat-footer-row *matFooterRowDef="['noRecordsFound']" [ngClass]="{'display-none': this.hasInstances()}">