Add refresh button in jobs list
This commit is contained in:
parent
1e743faafe
commit
83e7467041
3 changed files with 16 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -36,6 +36,10 @@
|
|||
@include peertube-select-container(auto);
|
||||
}
|
||||
}
|
||||
|
||||
.button-filter-block {
|
||||
align-self: flex-end;
|
||||
}
|
||||
}
|
||||
|
||||
td .glyphicon {
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue