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-option>
|
||||||
</ng-select>
|
</ng-select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="button-filter-block">
|
||||||
|
<my-button i18n-label label="Refresh" icon="refresh" (click)="refresh()"></my-button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p-table
|
<p-table
|
||||||
|
|
|
@ -36,6 +36,10 @@
|
||||||
@include peertube-select-container(auto);
|
@include peertube-select-container(auto);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.button-filter-block {
|
||||||
|
align-self: flex-end;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
td .glyphicon {
|
td .glyphicon {
|
||||||
|
|
|
@ -44,7 +44,7 @@ export class JobsComponent extends RestTable implements OnInit {
|
||||||
constructor (
|
constructor (
|
||||||
private notifier: Notifier,
|
private notifier: Notifier,
|
||||||
private jobsService: JobService
|
private jobsService: JobService
|
||||||
) {
|
) {
|
||||||
super()
|
super()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -97,6 +97,13 @@ export class JobsComponent extends RestTable implements OnInit {
|
||||||
return ''
|
return ''
|
||||||
}
|
}
|
||||||
|
|
||||||
|
refresh () {
|
||||||
|
this.jobs = []
|
||||||
|
this.totalRecords = 0
|
||||||
|
|
||||||
|
this.loadData()
|
||||||
|
}
|
||||||
|
|
||||||
protected loadData () {
|
protected loadData () {
|
||||||
let jobState = this.jobState as JobState
|
let jobState = this.jobState as JobState
|
||||||
if (this.jobState === 'all') jobState = null
|
if (this.jobState === 'all') jobState = null
|
||||||
|
|
Loading…
Reference in a new issue