aboutsummaryrefslogtreecommitdiffhomepage
path: root/client
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-11-16 09:13:20 +0100
committerChocobozzz <me@florianbigard.com>2021-11-16 09:13:20 +0100
commite5830ac64b6afb33e899ac8366004606c1fa39bb (patch)
tree6d6f542342e3203796c04738de525f565765193e /client
parent1740952b8c0b84f3b1b6edc99890b757000fe3ef (diff)
downloadPeerTube-e5830ac64b6afb33e899ac8366004606c1fa39bb.tar.gz
PeerTube-e5830ac64b6afb33e899ac8366004606c1fa39bb.tar.zst
PeerTube-e5830ac64b6afb33e899ac8366004606c1fa39bb.zip
Fix progress display
Diffstat (limited to 'client')
-rw-r--r--client/src/app/+admin/system/jobs/jobs.component.html6
-rw-r--r--client/src/app/+admin/system/jobs/jobs.component.ts10
2 files changed, 10 insertions, 6 deletions
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 @@
46 <th style="width: 200px" class="job-type" i18n>Type</th> 46 <th style="width: 200px" class="job-type" i18n>Type</th>
47 <th style="width: 200px" class="job-priority" i18n>Priority <small>(1 = highest priority)</small></th> 47 <th style="width: 200px" class="job-priority" i18n>Priority <small>(1 = highest priority)</small></th>
48 <th style="width: 200px" class="job-state" i18n *ngIf="jobState === 'all'">State</th> 48 <th style="width: 200px" class="job-state" i18n *ngIf="jobState === 'all'">State</th>
49 <th style="width: 100px" class="job-progress" i18n *ngIf="hasProgress()">Progress</th> 49 <th style="width: 100px" class="job-progress" i18n *ngIf="hasGlobalProgress()">Progress</th>
50 <th style="width: 150px" class="job-date" i18n pSortableColumn="createdAt">Created <p-sortIcon field="createdAt"></p-sortIcon></th> 50 <th style="width: 150px" class="job-date" i18n pSortableColumn="createdAt">Created <p-sortIcon field="createdAt"></p-sortIcon></th>
51 </tr> 51 </tr>
52 </ng-template> 52 </ng-template>
@@ -65,8 +65,8 @@
65 <span class="badge" [ngClass]="getJobStateClass(job.state)">{{ job.state }}</span> 65 <span class="badge" [ngClass]="getJobStateClass(job.state)">{{ job.state }}</span>
66 </td> 66 </td>
67 67
68 <td class="job-progress c-hand" [pRowToggler]="job" *ngIf="hasProgress()"> 68 <td class="job-progress c-hand" [pRowToggler]="job">
69 {{ getProgress(job) }} 69 <ng-container *ngIf="hasProgress(job)">{{ getProgress(job) }}</ng-container>
70 </td> 70 </td>
71 71
72 <td class="job-date c-hand" [pRowToggler]="job">{{ job.createdAt | date: 'short' }}</td> 72 <td class="job-date c-hand" [pRowToggler]="job">{{ job.createdAt | date: 'short' }}</td>
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