]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/admin/requests/request-stats/request-stats.component.ts
Client: move some methods in the requestStats model
[github/Chocobozzz/PeerTube.git] / client / src / app / admin / requests / request-stats / request-stats.component.ts
index 8ff4eb540d5a4a9110a7bb64dbfdb8218b29f7fd..6a9739bbf19add9267be7c05ea2e886fdd870fdb 100644 (file)
@@ -19,19 +19,11 @@ export class RequestStatsComponent implements OnInit, OnDestroy {
   }
 
   ngOnDestroy() {
-    if (this.secondsInterval !== null) {
+    if (this.stats.secondsInterval !== null) {
       clearInterval(this.interval);
     }
   }
 
-  get remainingSeconds() {
-    return Math.floor(this.stats.remainingMilliSeconds / 1000);
-  }
-
-  get secondsInterval() {
-    return Math.floor(this.stats.milliSecondsInterval / 1000);
-  }
-
   getStats() {
     this.requestService.getStats().subscribe(
       stats => {