diff options
author | Chocobozzz <me@florianbigard.com> | 2021-11-16 09:13:20 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-11-16 09:13:20 +0100 |
commit | e5830ac64b6afb33e899ac8366004606c1fa39bb (patch) | |
tree | 6d6f542342e3203796c04738de525f565765193e /client/src/app/+admin/system/jobs/jobs.component.ts | |
parent | 1740952b8c0b84f3b1b6edc99890b757000fe3ef (diff) | |
download | PeerTube-e5830ac64b6afb33e899ac8366004606c1fa39bb.tar.gz PeerTube-e5830ac64b6afb33e899ac8366004606c1fa39bb.tar.zst PeerTube-e5830ac64b6afb33e899ac8366004606c1fa39bb.zip |
Fix progress display
Diffstat (limited to 'client/src/app/+admin/system/jobs/jobs.component.ts')
-rw-r--r-- | client/src/app/+admin/system/jobs/jobs.component.ts | 10 |
1 files changed, 7 insertions, 3 deletions
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 { | |||
77 | } | 77 | } |
78 | 78 | ||
79 | getColspan () { | 79 | getColspan () { |
80 | if (this.jobState === 'all' && this.hasProgress()) return 7 | 80 | if (this.jobState === 'all' && this.hasGlobalProgress()) return 7 |
81 | 81 | ||
82 | if (this.jobState === 'all' || this.hasProgress()) return 6 | 82 | if (this.jobState === 'all' || this.hasGlobalProgress()) return 6 |
83 | 83 | ||
84 | return 5 | 84 | return 5 |
85 | } | 85 | } |
@@ -91,10 +91,14 @@ export class JobsComponent extends RestTable implements OnInit { | |||
91 | this.saveJobStateAndType() | 91 | this.saveJobStateAndType() |
92 | } | 92 | } |
93 | 93 | ||
94 | hasProgress () { | 94 | hasGlobalProgress () { |
95 | return this.jobType === 'all' || this.jobType === 'video-transcoding' | 95 | return this.jobType === 'all' || this.jobType === 'video-transcoding' |
96 | } | 96 | } |
97 | 97 | ||
98 | hasProgress (job: Job) { | ||
99 | return job.type === 'video-transcoding' | ||
100 | } | ||
101 | |||
98 | getProgress (job: Job) { | 102 | getProgress (job: Job) { |
99 | if (job.state === 'active') return job.progress + '%' | 103 | if (job.state === 'active') return job.progress + '%' |
100 | 104 | ||