]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/+admin/system/jobs/jobs.component.html
Enhance variable width column for id column in jobs list
[github/Chocobozzz/PeerTube.git] / client / src / app / +admin / system / jobs / jobs.component.html
CommitLineData
cd83ea1b 1<div class="admin-sub-header">
b1d40cff 2 <div i18n class="form-sub-title">Jobs list</div>
94a5ff8a 3
1061c73f 4 <div class="select-filter-block">
42712121 5 <label for="jobType" i18n>Job type</label>
1061c73f
C
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>
9 </select>
10 </div>
11 </div>
12
13 <div class="select-filter-block">
42712121 14 <label for="jobState" i18n>Job state</label>
1061c73f
C
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>
18 </select>
19 </div>
94a5ff8a 20 </div>
5cd80545 21</div>
cd83ea1b 22
ab998f7b 23<p-table
94831479 24 [value]="jobs" [lazy]="true" [paginator]="true" [totalRecords]="totalRecords" [rows]="rowsPerPage" dataKey="uniqId"
6d8c70aa 25 [sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)" [first]="pagination.start"
42712121 26 [tableStyle]="{'table-layout':'auto'}"
ab998f7b
C
27>
28 <ng-template pTemplate="header">
29 <tr>
eb1c46e9
RK
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>
ab998f7b
C
34 </tr>
35 </ng-template>
94a5ff8a 36
ab998f7b 37 <ng-template pTemplate="body" let-expanded="expanded" let-job>
42712121 38 <tr class="expander" [pRowToggler]="job">
eb1c46e9
RK
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>
ab998f7b
C
47 </tr>
48 </ng-template>
49
50 <ng-template pTemplate="rowexpansion" let-job>
51 <tr>
42712121
JM
52 <td colspan="4">
53 <pre>{{ [
54 'Job: ' + job.id,
55 'Type: ' + job.type,
56 'Processed on ' + (job.processedOn || '-'),
57 'Finished on ' + (job.finishedOn || '-')
58 ].join('\n') }}</pre>
59 </td>
60 </tr>
61 <tr>
62 <td colspan="4">
ab998f7b
C
63 <pre>{{ job.data }}</pre>
64 </td>
65 </tr>
c1953c56 66 <tr class="job-error" *ngIf="job.error">
42712121 67 <td colspan="4">
c1953c56
C
68 <pre>{{ job.error }}</pre>
69 </td>
70 </tr>
ab998f7b
C
71 </ng-template>
72</p-table>
94a5ff8a 73