This commit is contained in:
Michele Artini 2023-01-24 10:45:59 +01:00
parent d11c51879e
commit f1183df749
2 changed files with 3 additions and 12 deletions

View File

@ -5,7 +5,6 @@
<input matInput (keyup)="applyFilter($event)" placeholder="Filter..." #input />
</mat-form-field>
<p>
<span *ngIf="from < 0 && to < 0"><b>Recent workflows</b> (max {{total}})</span>
<span *ngIf="from >= 0 && to >= 0"><b>Workflows from </b>{{from | date:"yyyy-MM-dd HH:mm:ss"}} <b>to</b> {{to |
@ -18,7 +17,7 @@
<span><b>Count :</b> {{historyDatasource.filteredData.length}}</span>
</p>
<table mat-table [dataSource]="historyDatasource" matSort (matSortChange)="updateSort($event)" class="mat-elevation-z8">
<table mat-table [dataSource]="historyDatasource" matSort class="mat-elevation-z8">
<ng-container matColumnDef="processId">
<th mat-header-cell *matHeaderCellDef style="width: 15%;" mat-sort-header sortActionDescription="Sort by Process ID"> Process Id </th>

View File

@ -8,7 +8,6 @@ import { Observable } from 'rxjs';
import { map } from 'rxjs/operators';
import { MatDialog, MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
import { KeyValue } from '../model/controller.model';
import {LiveAnnouncer} from '@angular/cdk/a11y';
@Component({
selector: 'app-wf-history',
@ -25,7 +24,7 @@ export class WfHistoryComponent implements AfterViewInit {
from: number = -1
to: number = -1
constructor(public service: ISService, public route: ActivatedRoute, public dialog: MatDialog, private _liveAnnouncer: LiveAnnouncer) {
constructor(public service: ISService, public route: ActivatedRoute, public dialog: MatDialog) {
let totalP = route.snapshot.paramMap.get('total');
let fromP = route.snapshot.queryParamMap.get('from');
@ -59,14 +58,7 @@ export class WfHistoryComponent implements AfterViewInit {
data: wf
});
}
updateSort(sortState: Sort) {
if (sortState.direction) {
this._liveAnnouncer.announce(`Sorted ${sortState.direction}ending`);
} else {
this._liveAnnouncer.announce('Sorting cleared');
}
}
}
@Component({