Adding refresh buttons 74/5174/2
authormaximesson <maxime.bonneau@est.tech>
Thu, 26 Nov 2020 10:11:29 +0000 (11:11 +0100)
committerMaxime Bonneau <maxime.bonneau@est.tech>
Thu, 26 Nov 2020 14:18:49 +0000 (14:18 +0000)
Issue-ID: NONRTRIC-338
Signed-off-by: maximesson <maxime.bonneau@est.tech>
Change-Id: Ic80ea8f5f98f67b3f5123a5fbc8cc7c6b3215c57

webapp-frontend/src/app/ei-coordinator/ei-coordinator.component.html
webapp-frontend/src/app/ei-coordinator/ei-coordinator.component.scss
webapp-frontend/src/app/ei-coordinator/ei-coordinator.component.ts
webapp-frontend/src/app/policy-control/policy-control.component.html
webapp-frontend/src/app/policy-control/policy-control.component.scss
webapp-frontend/src/app/policy-control/policy-control.component.ts

index aee65c8..ada0384 100644 (file)
@@ -18,7 +18,34 @@ limitations under the License.
 ========================LICENSE_END===================================
 -->
 
-<h3 class="rd-global-page-title">Enrichment Information Coordinator</h3>
+<div fxLayout="row">
+    <div class="rd-global-page-title">Enrichment Information Coordinator</div>
+    <div class="refresh-button">
+        <button mat-icon-button color="primary" aria-label="Button with a refresh icon" (click)="refresh()">
+            <mat-icon>refresh</mat-icon>
+        </button>
+    </div>
+</div>
+
+<br>
+<h4>Producers</h4>
+<table mat-table EIProducerTable [dataSource]="eiProducersDataSource" [ngClass]="{'table-dark': darkMode}" matSort
+    multiTemplateDataRows class="ei-coordinator-table mat-elevation-z8">
+    <ng-container matColumnDef="id">
+        <th mat-header-cell *matHeaderCellDef> Producer ID </th>
+        <td mat-cell *matCellDef="let eiProducer"> {{this.getEIProducerId(eiProducer)}} </td>
+    </ng-container>
+    <ng-container matColumnDef="type">
+        <th mat-header-cell *matHeaderCellDef> Producer type </th>
+        <td mat-cell *matCellDef="let eiProducer"> {{this.getEIProducerTypes(eiProducer)}} </td>
+    </ng-container>
+    <ng-container matColumnDef="status">
+        <th mat-header-cell *matHeaderCellDef> Producer status </th>
+        <td mat-cell *matCellDef="let eiProducer"> {{this.getEIProducerStatus(eiProducer)}} </td>
+    </ng-container>
+    <tr mat-header-row *matHeaderRowDef="['id', 'type', 'status']"></tr>
+    <tr mat-row *matRowDef="let row; columns: ['id', 'type', 'status'];"></tr>
+</table>
 
 <br>
 <h4>Jobs</h4>
@@ -42,24 +69,4 @@ limitations under the License.
     </ng-container>
     <tr mat-header-row *matHeaderRowDef="['id', 'typeId', 'targetUri']"></tr>
     <tr mat-row *matRowDef="let row; columns: ['id', 'typeId', 'targetUri'];"></tr>
-</table>
-
-<br>
-<h4>Producers</h4>
-<table mat-table EIProducerTable [dataSource]="eiProducersDataSource" [ngClass]="{'table-dark': darkMode}" matSort
-    multiTemplateDataRows class="ei-coordinator-table mat-elevation-z8">
-    <ng-container matColumnDef="id">
-        <th mat-header-cell *matHeaderCellDef> Producer ID </th>
-        <td mat-cell *matCellDef="let eiProducer"> {{this.getEIProducerId(eiProducer)}} </td>
-    </ng-container>
-    <ng-container matColumnDef="type">
-        <th mat-header-cell *matHeaderCellDef> Producer type </th>
-        <td mat-cell *matCellDef="let eiProducer"> {{this.getEIProducerTypes(eiProducer)}} </td>
-    </ng-container>
-    <ng-container matColumnDef="status">
-        <th mat-header-cell *matHeaderCellDef> Producer status </th>
-        <td mat-cell *matCellDef="let eiProducer"> {{this.getEIProducerStatus(eiProducer)}} </td>
-    </ng-container>
-    <tr mat-header-row *matHeaderRowDef="['id', 'type', 'status']"></tr>
-    <tr mat-row *matRowDef="let row; columns: ['id', 'type', 'status'];"></tr>
 </table>
\ No newline at end of file
index 8e873ec..5038944 100644 (file)
 
 .display-none {
   display: none;
+}
+
+.refresh-button {
+  display: flex;
+  justify-content: space-between;
+  flex-wrap: wrap;
 }
\ No newline at end of file
index bcff218..3360577 100644 (file)
@@ -138,4 +138,8 @@ export class EICoordinatorComponent implements OnInit {
         }
         return '< No status >';
     }
+
+    refresh() {
+        location.reload();
+    }
 }
index fc74800..0621b3b 100644 (file)
   ========================LICENSE_END===================================
   -->
 
-<h3 class="rd-global-page-title">Policy Control</h3>
+<div fxLayout="row">
+    <div class="rd-global-page-title">Policy Control</div>
+    <div class="refresh-button">
+        <button mat-icon-button color="primary" aria-label="Button with a refresh icon" (click)="refresh()">
+            <mat-icon>refresh</mat-icon>
+        </button>
+    </div>
+</div>
 
 <table mat-table [dataSource]="policyTypesDataSource" matSort multiTemplateDataRows
     class="policy-type-table mat-elevation-z8">
index fe0a741..cc424b3 100644 (file)
 
 .display-none {
   display: none;
+}
+
+.refresh-button {
+  display: flex;
+  justify-content: space-between;
+  flex-wrap: wrap;
 }
\ No newline at end of file
index 9cf2438..c287438 100644 (file)
@@ -123,4 +123,8 @@ export class PolicyControlComponent implements OnInit {
     getExpandedObserver(policyType: PolicyType): Observable<boolean> {
         return this.getPolicyTypeInfo(policyType).isExpanded.asObservable();
     }
+
+    refresh() {
+        location.reload();
+    }
 }