]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client/src/app/+admin/system/jobs/jobs.component.html
Serve audit logs to client
[github/Chocobozzz/PeerTube.git] / client / src / app / +admin / system / jobs / jobs.component.html
1 <div class="admin-sub-header">
2 <div i18n class="form-sub-title">Jobs list</div>
3
4 <div class="select-filter-block">
5 <label for="jobType">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>
9 </select>
10 </div>
11 </div>
12
13 <div class="select-filter-block">
14 <label for="jobState">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>
18 </select>
19 </div>
20 </div>
21 </div>
22
23 <p-table
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 >
27 <ng-template pTemplate="header">
28 <tr>
29 <th style="width: 27px"></th>
30 <th i18n style="width: 60px">ID</th>
31 <th i18n style="width: 210px">Type</th>
32 <th i18n style="width: 130px">State</th>
33 <th i18n style="width: 250px" pSortableColumn="createdAt">Created <p-sortIcon field="createdAt"></p-sortIcon></th>
34 <th i18n style="width: 250px">Processed on</th>
35 <th i18n style="width: 250px">Finished on</th>
36 </tr>
37 </ng-template>
38
39 <ng-template pTemplate="body" let-expanded="expanded" let-job>
40 <tr>
41 <td class="expand-cell">
42 <span class="expander" [pRowToggler]="job">
43 <i [ngClass]="expanded ? 'glyphicon glyphicon-menu-down' : 'glyphicon glyphicon-menu-right'"></i>
44 </span>
45 </td>
46 <td>{{ job.id }}</td>
47 <td>{{ job.type }}</td>
48 <td>{{ job.state }}</td>
49 <td>{{ job.createdAt }}</td>
50 <td>{{ job.processedOn }}</td>
51 <td>{{ job.finishedOn }}</td>
52 </tr>
53 </ng-template>
54
55 <ng-template pTemplate="rowexpansion" let-job>
56 <tr>
57 <td colspan="7">
58 <pre>{{ job.data }}</pre>
59 </td>
60 </tr>
61 <tr class="job-error" *ngIf="job.error">
62 <td colspan="7">
63 <pre>{{ job.error }}</pre>
64 </td>
65 </tr>
66 </ng-template>
67 </p-table>
68