Browse Source

Suggested Changes

pull/5560/head
Raj Gupta 3 months ago
parent
commit
bcdd529ada
  1. 3
      CHANGELOG.md
  2. 9
      apps/client/src/app/components/admin-jobs/admin-jobs.component.ts
  3. 2
      apps/client/src/app/components/admin-jobs/admin-jobs.html

3
CHANGELOG.md

@ -7,10 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## Unreleased ## Unreleased
- Add sorting to job queue table
### Added ### Added
- Added support for column sorting to the queue jobs table in the admin control panel
- Added the symbol to the benchmark component - Added the symbol to the benchmark component
- Added an option to configure the account column of the activities table component - Added an option to configure the account column of the activities table component

9
apps/client/src/app/components/admin-jobs/admin-jobs.component.ts

@ -46,6 +46,7 @@ import {
removeCircleOutline, removeCircleOutline,
timeOutline timeOutline
} from 'ionicons/icons'; } from 'ionicons/icons';
import { get } from 'lodash';
import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader'; import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader';
import { Subject } from 'rxjs'; import { Subject } from 'rxjs';
import { takeUntil } from 'rxjs/operators'; import { takeUntil } from 'rxjs/operators';
@ -59,8 +60,8 @@ import { takeUntil } from 'rxjs/operators';
MatButtonModule, MatButtonModule,
MatMenuModule, MatMenuModule,
MatSelectModule, MatSelectModule,
MatTableModule,
MatSortModule, MatSortModule,
MatTableModule,
NgxSkeletonLoaderModule, NgxSkeletonLoaderModule,
ReactiveFormsModule ReactiveFormsModule
], ],
@ -202,11 +203,7 @@ export class GfAdminJobsComponent implements OnDestroy, OnInit {
.subscribe(({ jobs }) => { .subscribe(({ jobs }) => {
this.dataSource = new MatTableDataSource(jobs); this.dataSource = new MatTableDataSource(jobs);
this.dataSource.sort = this.sort; this.dataSource.sort = this.sort;
this.dataSource.sortingDataAccessor = get;
if (this.sort) {
this.sort.active = 'created';
this.sort.direction = 'desc';
}
this.isLoading = false; this.isLoading = false;

2
apps/client/src/app/components/admin-jobs/admin-jobs.html

@ -16,7 +16,7 @@
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
</form> </form>
<table class="gf-table w-100" mat-table matSort [dataSource]="dataSource"> <table class="gf-table w-100" mat-table matSort matSortActive="created" matSortDirection="desc" [dataSource]="dataSource">
<ng-container matColumnDef="index"> <ng-container matColumnDef="index">
<th <th
*matHeaderCellDef *matHeaderCellDef

Loading…
Cancel
Save