aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+admin/system/jobs
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-01-21 16:57:21 +0100
committerChocobozzz <chocobozzz@cpy.re>2021-01-25 14:38:52 +0100
commit77d7e851dccf17dcc89e8fcc2db3f655d1e63f95 (patch)
treed09e045dfabe7ab1e170d1b0caa9decda8a7d39c /client/src/app/+admin/system/jobs
parent92c871b40554d5285232eb4392cebb63d127704a (diff)
downloadPeerTube-77d7e851dccf17dcc89e8fcc2db3f655d1e63f95.tar.gz
PeerTube-77d7e851dccf17dcc89e8fcc2db3f655d1e63f95.tar.zst
PeerTube-77d7e851dccf17dcc89e8fcc2db3f655d1e63f95.zip
Add priority to transcoding jobs
(1 = highest priority) 100 for new resolutions 10 for original file optimization Add a malus for transcoding jobs depending on how many uploads the user did in the last 7 days
Diffstat (limited to 'client/src/app/+admin/system/jobs')
-rw-r--r--client/src/app/+admin/system/jobs/jobs.component.html4
-rw-r--r--client/src/app/+admin/system/jobs/jobs.component.scss3
-rw-r--r--client/src/app/+admin/system/jobs/jobs.component.ts12
3 files changed, 11 insertions, 8 deletions
diff --git a/client/src/app/+admin/system/jobs/jobs.component.html b/client/src/app/+admin/system/jobs/jobs.component.html
index b6457a005..6b3fd9393 100644
--- a/client/src/app/+admin/system/jobs/jobs.component.html
+++ b/client/src/app/+admin/system/jobs/jobs.component.html
@@ -40,6 +40,7 @@
40 <th style="width: 40px"></th> 40 <th style="width: 40px"></th>
41 <th style="width: calc(100% - 390px)" class="job-id" i18n>ID</th> 41 <th style="width: calc(100% - 390px)" class="job-id" i18n>ID</th>
42 <th style="width: 200px" class="job-type" i18n>Type</th> 42 <th style="width: 200px" class="job-type" i18n>Type</th>
43 <th style="width: 200px" class="job-priority" i18n>Priority <small>(1 = highest priority)</small></th>
43 <th style="width: 200px" class="job-state" i18n *ngIf="jobState === 'all'">State</th> 44 <th style="width: 200px" class="job-state" i18n *ngIf="jobState === 'all'">State</th>
44 <th style="width: 100px" class="job-progress" i18n *ngIf="hasProgress()">Progress</th> 45 <th style="width: 100px" class="job-progress" i18n *ngIf="hasProgress()">Progress</th>
45 <th style="width: 150px" class="job-date" i18n pSortableColumn="createdAt">Created <p-sortIcon field="createdAt"></p-sortIcon></th> 46 <th style="width: 150px" class="job-date" i18n pSortableColumn="createdAt">Created <p-sortIcon field="createdAt"></p-sortIcon></th>
@@ -56,12 +57,13 @@
56 57
57 <td class="job-id c-hand" [pRowToggler]="job" [title]="job.id">{{ job.id }}</td> 58 <td class="job-id c-hand" [pRowToggler]="job" [title]="job.id">{{ job.id }}</td>
58 <td class="job-type c-hand" [pRowToggler]="job">{{ job.type }}</td> 59 <td class="job-type c-hand" [pRowToggler]="job">{{ job.type }}</td>
60 <td class="job-priority c-hand" [pRowToggler]="job">{{ job.priority }}</td>
59 61
60 <td class="job-state c-hand" [pRowToggler]="job" *ngIf="jobState === 'all'"> 62 <td class="job-state c-hand" [pRowToggler]="job" *ngIf="jobState === 'all'">
61 <span class="badge" [ngClass]="getJobStateClass(job.state)">{{ job.state }}</span> 63 <span class="badge" [ngClass]="getJobStateClass(job.state)">{{ job.state }}</span>
62 </td> 64 </td>
63 65
64 <td class="job-state" [pRowToggler]="job" *ngIf="hasProgress()"> 66 <td class="job-progress c-hand" [pRowToggler]="job" *ngIf="hasProgress()">
65 {{ getProgress(job) }} 67 {{ getProgress(job) }}
66 </td> 68 </td>
67 69
diff --git a/client/src/app/+admin/system/jobs/jobs.component.scss b/client/src/app/+admin/system/jobs/jobs.component.scss
index 9c6ae73e1..2add506e8 100644
--- a/client/src/app/+admin/system/jobs/jobs.component.scss
+++ b/client/src/app/+admin/system/jobs/jobs.component.scss
@@ -10,7 +10,8 @@
10} 10}
11 11
12.job-type, 12.job-type,
13.job-state { 13.job-state,
14.job-priority {
14 width: 150px !important; 15 width: 150px !important;
15} 16}
16 17
diff --git a/client/src/app/+admin/system/jobs/jobs.component.ts b/client/src/app/+admin/system/jobs/jobs.component.ts
index 5355d2c20..d08079f7e 100644
--- a/client/src/app/+admin/system/jobs/jobs.component.ts
+++ b/client/src/app/+admin/system/jobs/jobs.component.ts
@@ -21,19 +21,19 @@ export class JobsComponent extends RestTable implements OnInit {
21 21
22 jobType: JobTypeClient = 'all' 22 jobType: JobTypeClient = 'all'
23 jobTypes: JobTypeClient[] = [ 23 jobTypes: JobTypeClient[] = [
24 'all',
25 'activitypub-follow', 24 'activitypub-follow',
26 'activitypub-http-broadcast', 25 'activitypub-http-broadcast',
27 'activitypub-http-fetcher', 26 'activitypub-http-fetcher',
28 'activitypub-http-unicast', 27 'activitypub-http-unicast',
28 'activitypub-refresher',
29 'all',
29 'email', 30 'email',
30 'video-transcoding',
31 'video-file-import', 31 'video-file-import',
32 'video-import', 32 'video-import',
33 'videos-views', 33 'video-live-ending',
34 'activitypub-refresher',
35 'video-redundancy', 34 'video-redundancy',
36 'video-live-ending' 35 'video-transcoding',
36 'videos-views'
37 ] 37 ]
38 38
39 jobs: Job[] = [] 39 jobs: Job[] = []
@@ -75,7 +75,7 @@ export class JobsComponent extends RestTable implements OnInit {
75 getColspan () { 75 getColspan () {
76 if (this.jobState === 'all' && this.hasProgress()) return 6 76 if (this.jobState === 'all' && this.hasProgress()) return 6
77 77
78 if (this.jobState === 'all') return 5 78 if (this.jobState === 'all' || this.hasProgress()) return 5
79 79
80 return 4 80 return 4
81 } 81 }