]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/+admin/system/runners/runner-job-list/runner-job-list.component.html
Automatic colspan for tables
[github/Chocobozzz/PeerTube.git] / client / src / app / +admin / system / runners / runner-job-list / runner-job-list.component.html
CommitLineData
118626c8
C
1<h1 class="d-flex justify-content-between">
2 <span class="text-nowrap me-2">
3 <my-global-icon iconName="globe" aria-hidden="true"></my-global-icon>
4 <span i18n>Runner jobs</span>
5 </span>
6
7 <a routerLink="/admin/system/runners/runners-list" class="peertube-button-link peertube-button-icon grey-button">
8 <my-global-icon iconName="codesandbox" aria-hidden="true"></my-global-icon>
9 <ng-container i18n>Remote runners</ng-container>
10 </a>
11</h1>
12
13<p-table
14 [value]="runnerJobs" [paginator]="totalRecords > 0" [totalRecords]="totalRecords" [rows]="rowsPerPage" [first]="pagination.start"
15 [rowsPerPageOptions]="rowsPerPageOptions" [sortField]="sort.field" [sortOrder]="sort.order"
16 [lazy]="true" (onLazyLoad)="loadLazy($event)" [lazyLoadOnInit]="false"
476ce1d7 17 [(selection)]="selectedRows" [showCurrentPageReport]="true" i18n-currentPageReportTemplate
118626c8
C
18 currentPageReportTemplate="Showing {{'{first}'}} to {{'{last}'}} of {{'{totalRecords}'}} runner jobs"
19 [expandedRowKeys]="expandedRows" dataKey="uuid"
20>
21 <ng-template pTemplate="header">
22 <tr>
476ce1d7
C
23 <th style="width: 40px">
24 <p-tableHeaderCheckbox ariaLabel="Select all rows" i18n-ariaLabel></p-tableHeaderCheckbox>
25 </th>
118626c8
C
26 <th style="width: 40px"></th>
27 <th style="width: 120px;"></th>
28 <th i18n>UUID</th>
29 <th i18n>Type</th>
30 <th i18n pSortableColumn="state">State <p-sortIcon field="state"></p-sortIcon></th>
31 <th style="width: 100px" i18n pSortableColumn="priority">Priority <p-sortIcon field="priority"></p-sortIcon></th>
32 <th style="width: 100px" i18n pSortableColumn="progress">Progress <p-sortIcon field="progress"></p-sortIcon></th>
33 <th i18n>Runner</th>
34 <th style="width: 150px;" i18n pSortableColumn="createdAt">Created <p-sortIcon field="createdAt"></p-sortIcon></th>
35 </tr>
36 </ng-template>
37
38 <ng-template pTemplate="caption">
476ce1d7 39
118626c8 40 <div class="caption">
476ce1d7
C
41 <div class="left-buttons">
42 <my-action-dropdown
43 *ngIf="isInSelectionMode()" i18n-label label="Batch actions" theme="orange"
44 [actions]="bulkActions" [entry]="selectedRows"
45 >
46 </my-action-dropdown>
47 </div>
48
118626c8
C
49 <div class="ms-auto d-flex">
50 <my-advanced-input-filter class="me-2" (search)="onSearch($event)"></my-advanced-input-filter>
51
52 <my-button i18n-label label="Refresh" icon="refresh" (click)="reloadData()"></my-button>
53 </div>
54 </div>
55 </ng-template>
56
57 <ng-template pTemplate="body" let-expanded="expanded" let-runnerJob>
476ce1d7
C
58 <tr [pSelectableRow]="runnerJob">
59 <td class="checkbox-cell">
60 <p-tableCheckbox [value]="runnerJob" ariaLabel="Select this row" i18n-ariaLabel></p-tableCheckbox>
61 </td>
62
118626c8
C
63 <td class="expand-cell" [pRowToggler]="runnerJob">
64 <my-table-expander-icon [expanded]="expanded"></my-table-expander-icon>
65 </td>
66
67 <td class="action-cell">
68 <my-action-dropdown
69 placement="bottom-right top-right left auto" container="body"
70 i18n-label label="Actions" [actions]="actions" [entry]="runnerJob"
71 ></my-action-dropdown>
72 </td>
73
74 <td>{{ runnerJob.uuid }}</td>
75 <td>{{ runnerJob.type }}</td>
76 <td>{{ runnerJob.state.label }}</td>
77 <td>{{ runnerJob.priority }}</td>
26172955
C
78
79 <td>
80 <ng-container *ngIf="runnerJob.progress">{{ runnerJob.progress }}%</ng-container>
81 </td>
82
118626c8 83 <td>{{ runnerJob.runner?.name }}</td>
d3ab2f63 84 <td>{{ runnerJob.createdAt }}</td>
118626c8
C
85 </tr>
86 </ng-template>
87
88 <ng-template pTemplate="rowexpansion" let-runnerJob>
89 <tr>
4b70c278 90 <td myAutoColspan>
118626c8
C
91 <div class="mt-2 fs-7 font-monospace">
92 Parent job: {{ runnerJob.parent?.uuid || '-' }} <br />
93 Processed on {{ (runnerJob.startedAt || '-') }} <br />
94 Finished on {{ (runnerJob.finishedAt || '-') }} <br />
95 </div>
96
97 <div class="mt-2">
98 <strong i18n>Payload:</strong>
99 <pre>{{ runnerJob.payload }}</pre>
100 </div>
101
102 <div class="mt-2">
103 <strong i18n>Private payload:</strong>
104 <pre>{{ runnerJob.privatePayload }}</pre>
105 </div>
106
3a0c2a77 107 <pre *ngIf="runnerJob.error" class="text-danger" >{{ runnerJob.error }}</pre>
118626c8
C
108 </td>
109 </tr>
110 </ng-template>
111
112 <ng-template pTemplate="emptymessage">
113 <tr>
4b70c278 114 <td myAutoColspan>
118626c8
C
115 <div class="no-results">
116 <ng-container i18n>No runner jobs found.</ng-container>
117 </div>
118 </td>
119 </tr>
120 </ng-template>
121</p-table>