- <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>