aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/admin/requests/request-stats/request-stats.component.ts
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-01-19 22:38:34 +0100
committerChocobozzz <florian.bigard@gmail.com>2017-01-19 22:38:34 +0100
commit872a4c7cea861246cf84fa3686bd9d40c684535f (patch)
treec4323e825a086cde30089e2118bf1fe59ff40dd8 /client/src/app/admin/requests/request-stats/request-stats.component.ts
parentc625a9560b0f98907c678015b673b6f82efd0c36 (diff)
downloadPeerTube-872a4c7cea861246cf84fa3686bd9d40c684535f.tar.gz
PeerTube-872a4c7cea861246cf84fa3686bd9d40c684535f.tar.zst
PeerTube-872a4c7cea861246cf84fa3686bd9d40c684535f.zip
Adapt requests controller/front to new informations
Diffstat (limited to 'client/src/app/admin/requests/request-stats/request-stats.component.ts')
-rw-r--r--client/src/app/admin/requests/request-stats/request-stats.component.ts7
1 files changed, 2 insertions, 5 deletions
diff --git a/client/src/app/admin/requests/request-stats/request-stats.component.ts b/client/src/app/admin/requests/request-stats/request-stats.component.ts
index 66075e4b5..23b836779 100644
--- a/client/src/app/admin/requests/request-stats/request-stats.component.ts
+++ b/client/src/app/admin/requests/request-stats/request-stats.component.ts
@@ -17,6 +17,7 @@ export class RequestStatsComponent implements OnInit, OnDestroy {
17 17
18 ngOnInit() { 18 ngOnInit() {
19 this.getStats(); 19 this.getStats();
20 this.runInterval();
20 } 21 }
21 22
22 ngOnDestroy() { 23 ngOnDestroy() {
@@ -27,10 +28,7 @@ export class RequestStatsComponent implements OnInit, OnDestroy {
27 28
28 getStats() { 29 getStats() {
29 this.requestService.getStats().subscribe( 30 this.requestService.getStats().subscribe(
30 stats => { 31 stats => this.stats = stats,
31 this.stats = stats;
32 this.runInterval();
33 },
34 32
35 err => alert(err.text) 33 err => alert(err.text)
36 ); 34 );
@@ -42,7 +40,6 @@ export class RequestStatsComponent implements OnInit, OnDestroy {
42 40
43 if (this.stats.remainingMilliSeconds <= 0) { 41 if (this.stats.remainingMilliSeconds <= 0) {
44 setTimeout(() => this.getStats(), this.stats.remainingMilliSeconds + 100); 42 setTimeout(() => this.getStats(), this.stats.remainingMilliSeconds + 100);
45 clearInterval(this.interval);
46 } 43 }
47 }, 1000); 44 }, 1000);
48 } 45 }