Consumer service
[portal/nonrtric-controlpanel.git] / webapp-frontend / src / app / ei-coordinator / jobs-list / jobs-list.component.html
index 840cc95..d2d8bf9 100644 (file)
@@ -18,20 +18,38 @@ limitations under the License.
 ========================LICENSE_END===================================
 -->
 <div class="table-container">
+    <mat-checkbox class="polling-checkbox" [checked]="checked" (change)="stopPolling($event.checked)">auto-refresh</mat-checkbox>
+    <div class="spinner-container" style="display: flex; justify-content: center; align-items: center;"
+        *ngIf="loading$ | async">
+        <mat-spinner></mat-spinner>
+    </div>
     <mat-table id="jobsTable" [dataSource]="jobsDataSource" fixedLayout matSort (matSortChange)="sortJobs($event)"
-        class="ei-coordinator-table mat-elevation-z8">
-        <ng-container matColumnDef="id">
+        matSortDisableClear matSortDirection="asc" class="ei-coordinator-table mat-elevation-z8">
+        <ng-container matColumnDef="jobId">
             <mat-header-cell *matHeaderCellDef mat-sort-header>
                 <div (click)="stopSort($event)">
                     <form style="display: flex" [formGroup]="jobForm">
                         <mat-form-field>
-                            <input id="jobIdFilter" matInput formControlName="id">
+                            <input id="jobIdFilter" matInput formControlName="jobId">
                             <mat-placeholder>Job ID</mat-placeholder>
                         </mat-form-field>
                     </form>
                 </div>
             </mat-header-cell>
-            <mat-cell *matCellDef="let eiJob"> {{eiJob.ei_job_identity}} </mat-cell>
+            <mat-cell *matCellDef="let job"> {{job.jobId}} </mat-cell>
+        </ng-container>
+        <ng-container matColumnDef="prodIds">
+            <mat-header-cell *matHeaderCellDef mat-sort-header>
+                <div (click)="stopSort($event)">
+                    <form style="display: flex" [formGroup]="jobForm">
+                        <mat-form-field>
+                            <input id="jobProdIdFilter" matInput formControlName="prodIds">
+                            <mat-placeholder>Producers</mat-placeholder>
+                        </mat-form-field>
+                    </form>
+                </div>
+            </mat-header-cell>
+            <mat-cell *matCellDef="let job"> {{job.prodIds}} </mat-cell>
         </ng-container>
         <ng-container matColumnDef="typeId">
             <mat-header-cell *matHeaderCellDef mat-sort-header>
@@ -44,7 +62,7 @@ limitations under the License.
                     </form>
                 </div>
             </mat-header-cell>
-            <mat-cell *matCellDef="let eiJob">{{this.getJobTypeId(eiJob)}} </mat-cell>
+            <mat-cell *matCellDef="let job">{{this.getJobTypeId(job)}} </mat-cell>
         </ng-container>
         <ng-container matColumnDef="owner">
             <mat-header-cell *matHeaderCellDef mat-sort-header>
@@ -57,7 +75,7 @@ limitations under the License.
                     </form>
                 </div>
             </mat-header-cell>
-            <mat-cell *matCellDef="let eiJob">{{this.getJobOwner(eiJob)}} </mat-cell>
+            <mat-cell *matCellDef="let job">{{this.getJobOwner(job)}} </mat-cell>
         </ng-container>
         <ng-container matColumnDef="targetUri">
             <mat-header-cell *matHeaderCellDef mat-sort-header>
@@ -70,9 +88,11 @@ limitations under the License.
                     </form>
                 </div>
             </mat-header-cell>
-            <mat-cell *matCellDef="let eiJob"> {{eiJob.target_uri}} </mat-cell>
+            <mat-cell *matCellDef="let job"> {{job.targetUri}} </mat-cell>
         </ng-container>
-        <mat-header-row *matHeaderRowDef="['id', 'typeId', 'owner', 'targetUri']"></mat-header-row>
-        <mat-row *matRowDef="let row; columns: ['id', 'typeId', 'owner', 'targetUri'];"></mat-row>
+        <mat-header-row *matHeaderRowDef="['jobId', 'prodIds', 'typeId', 'owner', 'targetUri']"></mat-header-row>
+        <mat-row *matRowDef="let row; columns: ['jobId', 'prodIds', 'typeId', 'owner', 'targetUri'];"></mat-row>
     </mat-table>
+    <mat-paginator [length]="jobs()?.length" [pageSize]="10" [pageSizeOptions]="[5, 10, 25, 100]" showFirstLastButtons
+        class="ei-coordinator-table mat-elevation-z8"></mat-paginator>
 </div>
\ No newline at end of file