]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Add refresh button in jobs list
authorChocobozzz <me@florianbigard.com>
Tue, 26 Jan 2021 09:00:23 +0000 (10:00 +0100)
committerChocobozzz <me@florianbigard.com>
Tue, 26 Jan 2021 09:00:23 +0000 (10:00 +0100)
client/src/app/+admin/system/jobs/jobs.component.html
client/src/app/+admin/system/jobs/jobs.component.scss
client/src/app/+admin/system/jobs/jobs.component.ts

index 6b3fd939381fdbedeefd9c1dffbd37215d43e63d..021e4f8d0ac0bdd295586cfe9783033486bae630 100644 (file)
       </ng-option>
     </ng-select>
   </div>
+
+  <div class="button-filter-block">
+    <my-button i18n-label label="Refresh" icon="refresh" (click)="refresh()"></my-button>
+  </div>
 </div>
 
 <p-table
index 2add506e8131309432b8641d3093cf0037233fec..7c61594205fdea1699358f9897c1df12b236ea95 100644 (file)
       @include peertube-select-container(auto);
     }
   }
+
+  .button-filter-block {
+    align-self: flex-end;
+  }
 }
 
 td .glyphicon {
index 925450286fba76e82dfc0a15a06342d1697df30c..731c1c0c4ae2f54be5ef150d6f721448871584d1 100644 (file)
@@ -44,7 +44,7 @@ export class JobsComponent extends RestTable implements OnInit {
   constructor (
     private notifier: Notifier,
     private jobsService: JobService
-    ) {
+  ) {
     super()
   }
 
@@ -97,6 +97,13 @@ export class JobsComponent extends RestTable implements OnInit {
     return ''
   }
 
+  refresh () {
+    this.jobs = []
+    this.totalRecords = 0
+
+    this.loadData()
+  }
+
   protected loadData () {
     let jobState = this.jobState as JobState
     if (this.jobState === 'all') jobState = null