Uplift to Angular 9
[portal/nonrtric-controlpanel.git] / webapp-frontend / src / app / policy-control / policy-control.component.html
index fc74800..9aa8341 100644 (file)
   ========================LICENSE_END===================================
   -->
 
-<h3 class="rd-global-page-title">Policy Control</h3>
+  <div fxLayout="row">
+    <div class="nrcp-global-page-title">Policy Control</div>
+    <div class="refresh-button">
+        <button mat-icon-button color="primary" (click)="refreshTables()">
+            <mat-icon>refresh</mat-icon>
+        </button>
+    </div>
+</div>
 
 <table mat-table [dataSource]="policyTypesDataSource" matSort multiTemplateDataRows
     class="policy-type-table mat-elevation-z8">
 
     <ng-container matColumnDef="name">
         <mat-header-cell *matHeaderCellDef>Policy Type</mat-header-cell>
-        <mat-cell *matCellDef="let policyType">
-            <mat-icon matTooltip="Properties">{{isInstancesShown(policyType)  ? 'expand_less' : 'expand_more'}}
+        <mat-cell *matCellDef="let policyTypeSchema">
+            <mat-icon matTooltip="Properties">{{isInstancesShown(policyTypeSchema)  ? 'expand_less' : 'expand_more'}}
             </mat-icon>
-            {{this.getDisplayName(policyType)}}
+            {{this.getDisplayName(policyTypeSchema)}}
         </mat-cell>
     </ng-container>
 
     <ng-container matColumnDef="description">
         <mat-header-cell *matHeaderCellDef> Description </mat-header-cell>
-        <mat-cell *matCellDef="let policyType"> {{policyType.schemaObject.description}}
+        <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 policyType" (click)="$event.stopPropagation()">
-            <button mat-icon-button (click)="createPolicyInstance(policyType)">
+        <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>
@@ -49,9 +56,9 @@
 
     <!-- =================== Policy instances for one type ======================== -->
     <ng-container matColumnDef="instanceTableContainer">
-        <mat-cell *matCellDef="let policyType">
-            <rd-policy-instance [policyType]=policyType [expanded]=this.getExpandedObserver(policyType)>
-            </rd-policy-instance>
+        <mat-cell *matCellDef="let policyTypeSchema">
+            <nrcp-policy-instance [policyTypeSchema]=policyTypeSchema [expanded]=this.getExpandedObserver(policyTypeSchema)>
+            </nrcp-policy-instance>
         </mat-cell>
     </ng-container>
     <!-- ======= -->
     </ng-container>
 
     <mat-header-row *matHeaderRowDef="['name', 'description', 'action']"></mat-header-row>
-    <mat-row *matRowDef="let policyType; columns: ['name', 'description', 'action']"
-        (click)="toggleListInstances(policyType)">
+    <mat-row *matRowDef="let policyTypeSchema; columns: ['name', 'description', 'action']"
+        (click)="toggleListInstances(policyTypeSchema)">
     </mat-row>
 
-    <mat-row *matRowDef="let policyType; columns: ['instanceTableContainer'];"
-        [@detailExpand]="isInstancesShown(policyType) ? 'expanded' : 'collapsed'" style="overflow: hidden">
+    <mat-row *matRowDef="let policyTypeSchema; columns: ['instanceTableContainer'];"
+        [@detailExpand]="isInstancesShown(policyTypeSchema) ? 'expanded' : 'collapsed'" style="overflow: hidden">
     </mat-row>
 
     <mat-footer-row *matFooterRowDef="['noRecordsFound']"
@@ -74,7 +81,3 @@
     </mat-footer-row>
 
 </table>
-
-<div class="spinner-container" *ngIf="policyTypesDataSource.loading$ | async">
-    <mat-spinner diameter="50"></mat-spinner>
-</div>
\ No newline at end of file