]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client/src/app/+admin/jobs/jobs-list/jobs-list.component.html
Fix pagination on rest table
[github/Chocobozzz/PeerTube.git] / client / src / app / +admin / jobs / jobs-list / jobs-list.component.html
1 <div class="admin-sub-header">
2 <div i18n class="form-sub-title">Jobs list</div>
3
4 <div class="peertube-select-container">
5 <select [(ngModel)]="jobState" (ngModelChange)="onJobStateChanged()">
6 <option *ngFor="let state of jobStates" [value]="state">{{ state }}</option>
7 </select>
8 </div>
9 </div>
10
11 <p-table
12 [value]="jobs" [lazy]="true" [paginator]="true" [totalRecords]="totalRecords" [rows]="rowsPerPage" dataKey="uniqId"
13 [sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)" [first]="pagination.start"
14 >
15 <ng-template pTemplate="header">
16 <tr>
17 <th style="width: 27px"></th>
18 <th i18n style="width: 60px">ID</th>
19 <th i18n style="width: 210px">Type</th>
20 <th i18n style="width: 130px">State</th>
21 <th i18n style="width: 250px" pSortableColumn="createdAt">Created <p-sortIcon field="createdAt"></p-sortIcon></th>
22 <th i18n style="width: 250px">Processed on</th>
23 <th i18n style="width: 250px">Finished on</th>
24 </tr>
25 </ng-template>
26
27 <ng-template pTemplate="body" let-expanded="expanded" let-job>
28 <tr>
29 <td>
30 <span class="expander" [pRowToggler]="job">
31 <i [ngClass]="expanded ? 'glyphicon glyphicon-menu-down' : 'glyphicon glyphicon-menu-right'"></i>
32 </span>
33 </td>
34 <td>{{ job.id }}</td>
35 <td>{{ job.type }}</td>
36 <td>{{ job.state }}</td>
37 <td>{{ job.createdAt }}</td>
38 <td>{{ job.processedOn }}</td>
39 <td>{{ job.finishedOn }}</td>
40 </tr>
41 </ng-template>
42
43 <ng-template pTemplate="rowexpansion" let-job>
44 <tr>
45 <td colspan="7">
46 <pre>{{ job.data }}</pre>
47 </td>
48 </tr>
49 <tr class="job-error" *ngIf="job.error">
50 <td colspan="7">
51 <pre>{{ job.error }}</pre>
52 </td>
53 </tr>
54 </ng-template>
55 </p-table>
56