diff options
author | Chocobozzz <me@florianbigard.com> | 2021-01-26 10:00:23 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-01-26 10:00:23 +0100 |
commit | 83e74670419d8faf005d36ef2e8b8ac3166012d7 (patch) | |
tree | eb7d4aaa99ceb8b697b1fad1d43229b52d9a7299 /client/src/app | |
parent | 1e743faafeed89af13ee9dd3d62c1ceb696779cd (diff) | |
download | PeerTube-83e74670419d8faf005d36ef2e8b8ac3166012d7.tar.gz PeerTube-83e74670419d8faf005d36ef2e8b8ac3166012d7.tar.zst PeerTube-83e74670419d8faf005d36ef2e8b8ac3166012d7.zip |
Add refresh button in jobs list
Diffstat (limited to 'client/src/app')
-rw-r--r-- | client/src/app/+admin/system/jobs/jobs.component.html | 4 | ||||
-rw-r--r-- | client/src/app/+admin/system/jobs/jobs.component.scss | 4 | ||||
-rw-r--r-- | client/src/app/+admin/system/jobs/jobs.component.ts | 9 |
3 files changed, 16 insertions, 1 deletions
diff --git a/client/src/app/+admin/system/jobs/jobs.component.html b/client/src/app/+admin/system/jobs/jobs.component.html index 6b3fd9393..021e4f8d0 100644 --- a/client/src/app/+admin/system/jobs/jobs.component.html +++ b/client/src/app/+admin/system/jobs/jobs.component.html | |||
@@ -25,6 +25,10 @@ | |||
25 | </ng-option> | 25 | </ng-option> |
26 | </ng-select> | 26 | </ng-select> |
27 | </div> | 27 | </div> |
28 | |||
29 | <div class="button-filter-block"> | ||
30 | <my-button i18n-label label="Refresh" icon="refresh" (click)="refresh()"></my-button> | ||
31 | </div> | ||
28 | </div> | 32 | </div> |
29 | 33 | ||
30 | <p-table | 34 | <p-table |
diff --git a/client/src/app/+admin/system/jobs/jobs.component.scss b/client/src/app/+admin/system/jobs/jobs.component.scss index 2add506e8..7c6159420 100644 --- a/client/src/app/+admin/system/jobs/jobs.component.scss +++ b/client/src/app/+admin/system/jobs/jobs.component.scss | |||
@@ -36,6 +36,10 @@ | |||
36 | @include peertube-select-container(auto); | 36 | @include peertube-select-container(auto); |
37 | } | 37 | } |
38 | } | 38 | } |
39 | |||
40 | .button-filter-block { | ||
41 | align-self: flex-end; | ||
42 | } | ||
39 | } | 43 | } |
40 | 44 | ||
41 | td .glyphicon { | 45 | td .glyphicon { |
diff --git a/client/src/app/+admin/system/jobs/jobs.component.ts b/client/src/app/+admin/system/jobs/jobs.component.ts index 925450286..731c1c0c4 100644 --- a/client/src/app/+admin/system/jobs/jobs.component.ts +++ b/client/src/app/+admin/system/jobs/jobs.component.ts | |||
@@ -44,7 +44,7 @@ export class JobsComponent extends RestTable implements OnInit { | |||
44 | constructor ( | 44 | constructor ( |
45 | private notifier: Notifier, | 45 | private notifier: Notifier, |
46 | private jobsService: JobService | 46 | private jobsService: JobService |
47 | ) { | 47 | ) { |
48 | super() | 48 | super() |
49 | } | 49 | } |
50 | 50 | ||
@@ -97,6 +97,13 @@ export class JobsComponent extends RestTable implements OnInit { | |||
97 | return '' | 97 | return '' |
98 | } | 98 | } |
99 | 99 | ||
100 | refresh () { | ||
101 | this.jobs = [] | ||
102 | this.totalRecords = 0 | ||
103 | |||
104 | this.loadData() | ||
105 | } | ||
106 | |||
100 | protected loadData () { | 107 | protected loadData () { |
101 | let jobState = this.jobState as JobState | 108 | let jobState = this.jobState as JobState |
102 | if (this.jobState === 'all') jobState = null | 109 | if (this.jobState === 'all') jobState = null |