aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+admin/system/jobs/jobs.component.ts
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2020-12-13 19:27:25 +0100
committerRigel Kent <sendmemail@rigelk.eu>2020-12-13 19:27:25 +0100
commit040d6896a3cd5622e78cccdedd8cce2afcf49a31 (patch)
tree1c4a1503e1886ce411e008fd0b367ef0d12088e9 /client/src/app/+admin/system/jobs/jobs.component.ts
parent7aebd32f8396827012aab5ea196158606c0611e3 (diff)
downloadPeerTube-040d6896a3cd5622e78cccdedd8cce2afcf49a31.tar.gz
PeerTube-040d6896a3cd5622e78cccdedd8cce2afcf49a31.tar.zst
PeerTube-040d6896a3cd5622e78cccdedd8cce2afcf49a31.zip
add display of logs matching any state
Diffstat (limited to 'client/src/app/+admin/system/jobs/jobs.component.ts')
-rw-r--r--client/src/app/+admin/system/jobs/jobs.component.ts16
1 files changed, 14 insertions, 2 deletions
diff --git a/client/src/app/+admin/system/jobs/jobs.component.ts b/client/src/app/+admin/system/jobs/jobs.component.ts
index f8e12d1b6..b7f18067b 100644
--- a/client/src/app/+admin/system/jobs/jobs.component.ts
+++ b/client/src/app/+admin/system/jobs/jobs.component.ts
@@ -16,7 +16,7 @@ export class JobsComponent extends RestTable implements OnInit {
16 private static LOCAL_STORAGE_STATE = 'jobs-list-state' 16 private static LOCAL_STORAGE_STATE = 'jobs-list-state'
17 private static LOCAL_STORAGE_TYPE = 'jobs-list-type' 17 private static LOCAL_STORAGE_TYPE = 'jobs-list-type'
18 18
19 jobState: JobStateClient = 'waiting' 19 jobState?: JobStateClient | 'all'
20 jobStates: JobStateClient[] = [ 'active', 'completed', 'failed', 'waiting', 'delayed' ] 20 jobStates: JobStateClient[] = [ 'active', 'completed', 'failed', 'waiting', 'delayed' ]
21 21
22 jobType: JobTypeClient = 'all' 22 jobType: JobTypeClient = 'all'
@@ -73,6 +73,10 @@ export class JobsComponent extends RestTable implements OnInit {
73 } 73 }
74 } 74 }
75 75
76 getColspan () {
77 return this.jobState === 'all' ? 5 : 4
78 }
79
76 onJobStateOrTypeChanged () { 80 onJobStateOrTypeChanged () {
77 this.pagination.start = 0 81 this.pagination.start = 0
78 82
@@ -81,8 +85,16 @@ export class JobsComponent extends RestTable implements OnInit {
81 } 85 }
82 86
83 protected loadData () { 87 protected loadData () {
88 let jobState = this.jobState as JobState
89 if (this.jobState === 'all') jobState = null
90
84 this.jobsService 91 this.jobsService
85 .getJobs(this.jobState, this.jobType, this.pagination, this.sort) 92 .getJobs({
93 jobState,
94 jobType: this.jobType,
95 pagination: this.pagination,
96 sort: this.sort
97 })
86 .subscribe( 98 .subscribe(
87 resultList => { 99 resultList => {
88 this.jobs = resultList.data 100 this.jobs = resultList.data