]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/+admin/system/jobs/jobs.component.html
Remove unnecessary onPage event on admin tables
[github/Chocobozzz/PeerTube.git] / client / src / app / +admin / system / jobs / jobs.component.html
index 5701172cbe788ca0feb54f4092f130a00c215f97..638d2380a4f8fb709d8db5b83995ab6324fba2fa 100644 (file)
 <p-table
   [value]="jobs" [lazy]="true" [paginator]="totalRecords > 0" [totalRecords]="totalRecords" [rows]="rowsPerPage"  [rowsPerPageOptions]="rowsPerPageOptions"
   [sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)" dataKey="uniqId" [first]="pagination.start"
-  [tableStyle]="{'table-layout':'auto'}" (onPage)="onPage($event)"
+  [tableStyle]="{'table-layout':'auto'}"
   [showCurrentPageReport]="true" i18n-currentPageReportTemplate
   currentPageReportTemplate="Showing {{'{first}'}} to {{'{last}'}} of {{'{totalRecords}'}} jobs"
-  (onPage)="onPage($event)" [expandedRowKeys]="expandedRows"
+  [expandedRowKeys]="expandedRows"
 >
   <ng-template pTemplate="header">
     <tr>
       <th style="width: 200px" class="job-type" i18n>Type</th>
       <th style="width: 200px" class="job-priority" i18n>Priority <small>(1 = highest priority)</small></th>
       <th style="width: 200px" class="job-state" i18n *ngIf="jobState === 'all'">State</th>
-      <th style="width: 100px" class="job-progress" i18n *ngIf="hasProgress()">Progress</th>
+      <th style="width: 100px" class="job-progress" i18n *ngIf="hasGlobalProgress()">Progress</th>
       <th style="width: 150px" class="job-date" i18n pSortableColumn="createdAt">Created <p-sortIcon field="createdAt"></p-sortIcon></th>
     </tr>
   </ng-template>
 
   <ng-template pTemplate="body" let-expanded="expanded" let-job>
     <tr>
-      <td class="expand-cell c-hand" [pRowToggler]="job" i18n-ngbTooltip ngbTooltip="More information" placement="top-left" container="body">
-        <span class="expander">
-          <i [ngClass]="expanded ? 'glyphicon glyphicon-menu-down' : 'glyphicon glyphicon-menu-right'"></i>
-        </span>
+      <td class="expand-cell" [pRowToggler]="job">
+        <my-table-expander-icon [expanded]="expanded"></my-table-expander-icon>
       </td>
 
       <td class="job-id c-hand" [pRowToggler]="job" [title]="job.id">{{ job.id }}</td>
@@ -67,8 +65,8 @@
         <span class="badge" [ngClass]="getJobStateClass(job.state)">{{ job.state }}</span>
       </td>
 
-      <td class="job-progress c-hand" [pRowToggler]="job" *ngIf="hasProgress()">
-        {{ getProgress(job) }}
+      <td class="job-progress c-hand" [pRowToggler]="job">
+        <ng-container *ngIf="hasProgress(job)">{{ getProgress(job) }}</ng-container>
       </td>
 
       <td class="job-date c-hand" [pRowToggler]="job">{{ job.createdAt | date: 'short' }}</td>