1 <div class=
"admin-sub-header">
2 <div i18n
class=
"form-sub-title">Jobs list
</div>
4 <div class=
"select-filter-block">
5 <label for=
"jobType" i18n
>Job type
</label>
6 <div class=
"peertube-select-container">
7 <select id=
"jobType" name=
"jobType" [(ngModel)]=
"jobType" (ngModelChange)=
"onJobStateOrTypeChanged()">
8 <option *
ngFor=
"let jobType of jobTypes" [value]=
"jobType">{{ jobType }}
</option>
13 <div class=
"select-filter-block">
14 <label for=
"jobState" i18n
>Job state
</label>
15 <div class=
"peertube-select-container">
16 <select id=
"jobState" name=
"jobState" [(ngModel)]=
"jobState" (ngModelChange)=
"onJobStateOrTypeChanged()">
17 <option *
ngFor=
"let state of jobStates" [value]=
"state">{{ state }}
</option>
24 [value]=
"jobs" [lazy]=
"true" [paginator]=
"true" [totalRecords]=
"totalRecords" [rows]=
"rowsPerPage" dataKey=
"uniqId"
25 [sortField]=
"sort.field" [sortOrder]=
"sort.order" (onLazyLoad)=
"loadLazy($event)" [first]=
"pagination.start"
26 [tableStyle]=
"{'table-layout':'auto'}"
28 <ng-template pTemplate=
"header">
30 <th class=
"job-id" i18n
>ID
</th>
31 <th class=
"job-type" i18n
>Type
</th>
32 <th class=
"job-date" i18n
pSortableColumn=
"createdAt">Created
<p-sortIcon field=
"createdAt"></p-sortIcon></th>
33 <th class=
"job-state" i18n
>State
</th>
37 <ng-template pTemplate=
"body" let-expanded=
"expanded" let-job
>
38 <tr class=
"expander" [pRowToggler]=
"job">
39 <td class=
"job-id" [title]=
"job.id">{{ job.id }}
</td>
40 <td class=
"job-type">{{ job.type }}
</td>
41 <td class=
"job-date">{{ job.createdAt }}
</td>
42 <td class=
"job-state" *
ngIf=
"job.state === 'delayed'" class=
"text-muted"><span class=
"glyphicon glyphicon-repeat"></span> <span i18n
>Delayed.
</span></td>
43 <td class=
"job-state" *
ngIf=
"job.state === 'waiting'" class=
"text-warning"><span class=
"glyphicon glyphicon-hourglass"></span> <span i18n
>Will start soon...
</span></td>
44 <td class=
"job-state" *
ngIf=
"job.state === 'active'" class=
"text-warning"><span class=
"glyphicon glyphicon-cog"></span> <span i18n
>Running...
</span></td>
45 <td class=
"job-state" *
ngIf=
"job.state === 'completed'" class=
"text-success"><span class=
"glyphicon glyphicon-ok"></span> <span i18n
>Finished
</span></td>
46 <td class=
"job-state" *
ngIf=
"job.state === 'failed'" class=
"text-danger"><span class=
"glyphicon glyphicon-remove"></span> <span i18n
>Failed
</span></td>
50 <ng-template pTemplate=
"rowexpansion" let-job
>
56 'Processed on ' + (job.processedOn || '-'),
57 'Finished on ' + (job.finishedOn || '-')
63 <pre>{{ job.data }}
</pre>
66 <tr class=
"job-error" *
ngIf=
"job.error">
68 <pre>{{ job.error }}
</pre>