jobTypes: JobTypeClient[] = [
'all',
+ 'activitypub-cleaner',
'activitypub-follow',
+ 'activitypub-http-broadcast-parallel',
'activitypub-http-broadcast',
'activitypub-http-fetcher',
'activitypub-http-unicast',
'activitypub-refresher',
'actor-keys',
+ 'after-video-channel-import',
'email',
+ 'federate-video',
+ 'manage-video-torrent',
+ 'move-to-object-storage',
+ 'notify',
+ 'video-channel-import',
'video-file-import',
'video-import',
'video-live-ending',
'video-redundancy',
+ 'video-studio-edition',
'video-transcoding',
- 'videos-views'
+ 'videos-views-stats'
]
jobs: Job[] = []
}
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
}
onJobStateOrTypeChanged () {
this.pagination.start = 0
- this.loadData()
+ this.reloadData()
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 + '%'
this.jobs = []
this.totalRecords = 0
- this.loadData()
+ this.reloadData()
}
- protected loadData () {
+ protected reloadData () {
let jobState = this.jobState as JobState
if (this.jobState === 'all') jobState = null
pagination: this.pagination,
sort: this.sort
})
- .subscribe(
- resultList => {
+ .subscribe({
+ next: resultList => {
this.jobs = resultList.data
this.totalRecords = resultList.total
},
- err => this.notifier.error(err.message)
- )
+ error: err => this.notifier.error(err.message)
+ })
}
private loadJobStateAndType () {