Add refresh button in jobs list

pull/3383/head
Chocobozzz 2021-01-26 10:00:23 +01:00
parent 1e743faafe
commit 83e7467041
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
3 changed files with 16 additions and 1 deletions

View File

@ -25,6 +25,10 @@
</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

View File

@ -36,6 +36,10 @@
@include peertube-select-container(auto);
}
}
.button-filter-block {
align-self: flex-end;
}
}
td .glyphicon {

View 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