blob: de43b644842ddc99ed3069d282a5f421289dd5d7 (
plain) (
tree)
|
|
<div class="admin-sub-header">
<div i18n class="form-sub-title">Jobs list</div>
<div class="select-filter-block">
<label for="jobType">Job type</label>
<div class="peertube-select-container">
<select id="jobType" name="jobType" [(ngModel)]="jobType" (ngModelChange)="onJobStateOrTypeChanged()">
<option *ngFor="let jobType of jobTypes" [value]="jobType">{{ jobType }}</option>
</select>
</div>
</div>
<div class="select-filter-block">
<label for="jobState">Job state</label>
<div class="peertube-select-container">
<select id="jobState" name="jobState" [(ngModel)]="jobState" (ngModelChange)="onJobStateOrTypeChanged()">
<option *ngFor="let state of jobStates" [value]="state">{{ state }}</option>
</select>
</div>
</div>
</div>
<p-table
[value]="jobs" [lazy]="true" [paginator]="true" [totalRecords]="totalRecords" [rows]="rowsPerPage" dataKey="uniqId"
[sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)" [first]="pagination.start"
>
<ng-template pTemplate="header">
<tr>
<th style="width: 27px"></th>
<th i18n style="width: 60px">ID</th>
<th i18n style="width: 210px">Type</th>
<th i18n style="width: 130px">State</th>
<th i18n style="width: 250px" pSortableColumn="createdAt">Created <p-sortIcon field="createdAt"></p-sortIcon></th>
<th i18n style="width: 250px">Processed on</th>
<th i18n style="width: 250px">Finished on</th>
</tr>
</ng-template>
<ng-template pTemplate="body" let-expanded="expanded" let-job>
<tr>
<td class="expand-cell">
<span class="expander" [pRowToggler]="job">
<i [ngClass]="expanded ? 'glyphicon glyphicon-menu-down' : 'glyphicon glyphicon-menu-right'"></i>
</span>
</td>
<td>{{ job.id }}</td>
<td>{{ job.type }}</td>
<td>{{ job.state }}</td>
<td>{{ job.createdAt }}</td>
<td>{{ job.processedOn }}</td>
<td>{{ job.finishedOn }}</td>
</tr>
</ng-template>
<ng-template pTemplate="rowexpansion" let-job>
<tr>
<td colspan="7">
<pre>{{ job.data }}</pre>
</td>
</tr>
<tr class="job-error" *ngIf="job.error">
<td colspan="7">
<pre>{{ job.error }}</pre>
</td>
</tr>
</ng-template>
</p-table>
|