limitations under the License.
========================LICENSE_END===================================
-->
+<div>
+ Number of instances: {{this.nbInstances()}}
+ <button mat-icon-button (click)="createPolicyInstance(policyTypeSchema)">
+ <mat-icon matTooltip="Create instance">add_box</mat-icon>
+ </button>
+ <button mat-icon-button color="primary" (click)="refreshTable()">
+ <mat-icon>refresh</mat-icon>
+ </button>
+</div>
+
<table #table mat-table class="instances-table mat-elevation-z8" [ngClass]="{'table-dark': darkMode}" matSort
multiTemplateDataRows [dataSource]="instanceDataSource">
<ng-container matColumnDef="instanceId">
<mat-header-cell mat-sort-header *matHeaderCellDef matTooltip="The ID of the policy instance">
- Instance
+ <div (click)="stopSort($event)">
+ <form style="display: flex" [formGroup]="policyInstanceForm">
+ <mat-form-field>
+ <input id="policyInstanceIdFilter" matInput formControlName="id">
+ <mat-placeholder>Instance</mat-placeholder>
+ </mat-form-field>
+ </form>
+ </div>
</mat-header-cell>
<mat-cell *matCellDef="let element" (click)="modifyInstance(element)">{{element.policy_id}}
</mat-cell>
<ng-container matColumnDef="ric">
<mat-header-cell mat-sort-header *matHeaderCellDef
matTooltip="Element where the policy instance resides, e.g. a gNodeB or Near-RT RIC">
- Target
+ <div (click)="stopSort($event)">
+ <form style="display: flex" [formGroup]="policyInstanceForm">
+ <mat-form-field>
+ <input id="policyInstanceTargetFilter" matInput formControlName="target">
+ <mat-placeholder>Target</mat-placeholder>
+ </mat-form-field>
+ </form>
+ </div>
</mat-header-cell>
<mat-cell *matCellDef="let element" (click)="modifyInstance(element)">{{element.ric_id}}
</mat-cell>
<ng-container matColumnDef="service">
<mat-header-cell mat-sort-header *matHeaderCellDef
matTooltip="The service that created the policy instance, and is responsible for its lifecycle">
- Owner
+ <div (click)="stopSort($event)">
+ <form style="display: flex" [formGroup]="policyInstanceForm">
+ <mat-form-field>
+ <input id="policyInstanceOwnerFilter" matInput formControlName="owner">
+ <mat-placeholder>Owner</mat-placeholder>
+ </mat-form-field>
+ </form>
+ </div>
</mat-header-cell>
<mat-cell *matCellDef="let element" (click)="modifyInstance(element)">{{element.service_id}}
</mat-cell>
<ng-container matColumnDef="lastModified">
<mat-header-cell mat-sort-header *matHeaderCellDef
matTooltip="The time of the last modification of the policy instance">
- Last modified
+ <div (click)="stopSort($event)">
+ <form style="display: flex" [formGroup]="policyInstanceForm">
+ <mat-form-field>
+ <input id="policyInstanceLastModifiedFilter" matInput formControlName="lastModified">
+ <mat-placeholder>Last modified</mat-placeholder>
+ </mat-form-field>
+ </form>
+ </div>
</mat-header-cell>
<mat-cell *matCellDef="let element" (click)="modifyInstance(element)">{{toLocalTime(element.lastModified)}}
</mat-cell>
<mat-footer-row *matFooterRowDef="['noRecordsFound']" [ngClass]="{'display-none': this.hasInstances()}">
</mat-footer-row>
-</table>
+</table>
\ No newline at end of file