1
0
Fork 0

Add refresh button in jobs list

This commit is contained in:
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