-->
<div fxLayout="row">
- <div class="nrcp-global-page-title">Policy Control</div>
+ <div class="nrcp-global-page-title">Policy Types</div>
<div class="refresh-button">
- <button mat-icon-button color="primary" (click)="refreshTables()">
- <mat-icon>refresh</mat-icon>
- </button>
- </div>
+ <button id="refreshButton" mat-icon-button color="primary" (click)="refreshTables()">
+ <mat-icon>refresh</mat-icon>
+ </button>
+ </div>
</div>
+<br>
-<table mat-table [dataSource]="policyTypesDataSource" matSort multiTemplateDataRows
- class="policy-type-table mat-elevation-z8">
+<nrcp-policy-type *ngFor="let policyTypeId of this.policyTypeIds" [policyTypeId]="policyTypeId" [minimiseTrigger]="minimiseTrigger"></nrcp-policy-type>
- <ng-container matColumnDef="name">
- <mat-header-cell *matHeaderCellDef>Policy Type</mat-header-cell>
- <mat-cell *matCellDef="let policyTypeSchema">
- <mat-icon matTooltip="Properties">{{isInstancesShown(policyTypeSchema) ? 'expand_less' : 'expand_more'}}
- </mat-icon>
- {{this.getDisplayName(policyTypeSchema)}}
- </mat-cell>
- </ng-container>
-
- <ng-container matColumnDef="description">
- <mat-header-cell *matHeaderCellDef> Description </mat-header-cell>
- <mat-cell *matCellDef="let policyTypeSchema"> {{policyTypeSchema.schemaObject.description}}
- </mat-cell>
- </ng-container>
-
- <ng-container matColumnDef="action">
- <mat-header-cell class="action-cell" *matHeaderCellDef>Action </mat-header-cell>
- <mat-cell class="action-cell" *matCellDef="let policyTypeSchema" (click)="$event.stopPropagation()">
- <button mat-icon-button (click)="createPolicyInstance(policyTypeSchema)">
- <mat-icon matTooltip="Create instance">add_box</mat-icon>
- </button>
- </mat-cell>
- </ng-container>
-
- <!-- =================== Policy instances for one type ======================== -->
- <ng-container matColumnDef="instanceTableContainer">
- <mat-cell *matCellDef="let policyTypeSchema">
- <nrcp-policy-instance [policyTypeSchema]=policyTypeSchema [expanded]=this.getExpandedObserver(policyTypeSchema)>
- </nrcp-policy-instance>
- </mat-cell>
- </ng-container>
- <!-- ======= -->
-
- <ng-container matColumnDef="noRecordsFound">
- <mat-footer-cell *matFooterCellDef>No records found.</mat-footer-cell>
- </ng-container>
-
- <mat-header-row *matHeaderRowDef="['name', 'description', 'action']"></mat-header-row>
- <mat-row *matRowDef="let policyTypeSchema; columns: ['name', 'description', 'action']"
- (click)="toggleListInstances(policyTypeSchema)">
- </mat-row>
-
- <mat-row *matRowDef="let policyTypeSchema; columns: ['instanceTableContainer'];"
- [@detailExpand]="isInstancesShown(policyTypeSchema) ? 'expanded' : 'collapsed'" style="overflow: hidden">
- </mat-row>
-
- <mat-footer-row *matFooterRowDef="['noRecordsFound']"
- [ngClass]="{'display-none': policyTypesDataSource.rowCount > 0}">
- </mat-footer-row>
-
-</table>
+<div id="noInstance" *ngIf="this.policyTypeIds.length==0">There are no policy types to display.</div>
\ No newline at end of file