aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-01-26 10:00:23 +0100
committerChocobozzz <me@florianbigard.com>2021-01-26 10:00:23 +0100
commit83e74670419d8faf005d36ef2e8b8ac3166012d7 (patch)
treeeb7d4aaa99ceb8b697b1fad1d43229b52d9a7299
parent1e743faafeed89af13ee9dd3d62c1ceb696779cd (diff)
downloadPeerTube-83e74670419d8faf005d36ef2e8b8ac3166012d7.tar.gz
PeerTube-83e74670419d8faf005d36ef2e8b8ac3166012d7.tar.zst
PeerTube-83e74670419d8faf005d36ef2e8b8ac3166012d7.zip
Add refresh button in jobs list
-rw-r--r--client/src/app/+admin/system/jobs/jobs.component.html4
-rw-r--r--client/src/app/+admin/system/jobs/jobs.component.scss4
-rw-r--r--client/src/app/+admin/system/jobs/jobs.component.ts9
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
41td .glyphicon { 45td .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