From e5830ac64b6afb33e899ac8366004606c1fa39bb Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 16 Nov 2021 09:13:20 +0100 Subject: Fix progress display --- client/src/app/+admin/system/jobs/jobs.component.html | 6 +++--- client/src/app/+admin/system/jobs/jobs.component.ts | 10 +++++++--- 2 files changed, 10 insertions(+), 6 deletions(-) (limited to 'client/src/app') diff --git a/client/src/app/+admin/system/jobs/jobs.component.html b/client/src/app/+admin/system/jobs/jobs.component.html index 406dc0fe5..b68179a41 100644 --- a/client/src/app/+admin/system/jobs/jobs.component.html +++ b/client/src/app/+admin/system/jobs/jobs.component.html @@ -46,7 +46,7 @@ Type Priority (1 = highest priority) State - Progress + Progress Created @@ -65,8 +65,8 @@ {{ job.state }} - - {{ getProgress(job) }} + + {{ getProgress(job) }} {{ job.createdAt | date: 'short' }} diff --git a/client/src/app/+admin/system/jobs/jobs.component.ts b/client/src/app/+admin/system/jobs/jobs.component.ts index 2cf1bff7a..f7e10fd04 100644 --- a/client/src/app/+admin/system/jobs/jobs.component.ts +++ b/client/src/app/+admin/system/jobs/jobs.component.ts @@ -77,9 +77,9 @@ export class JobsComponent extends RestTable implements OnInit { } getColspan () { - if (this.jobState === 'all' && this.hasProgress()) return 7 + if (this.jobState === 'all' && this.hasGlobalProgress()) return 7 - if (this.jobState === 'all' || this.hasProgress()) return 6 + if (this.jobState === 'all' || this.hasGlobalProgress()) return 6 return 5 } @@ -91,10 +91,14 @@ export class JobsComponent extends RestTable implements OnInit { this.saveJobStateAndType() } - hasProgress () { + hasGlobalProgress () { return this.jobType === 'all' || this.jobType === 'video-transcoding' } + hasProgress (job: Job) { + return job.type === 'video-transcoding' + } + getProgress (job: Job) { if (job.state === 'active') return job.progress + '%' -- cgit v1.2.3