From feb4bdfd9b46e87aadfa7c0d5338cde887d1f58c Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Sun, 11 Dec 2016 21:50:51 +0100 Subject: First version with PostgreSQL --- .../app/admin/requests/request-stats/request-stats.component.html | 2 +- .../src/app/admin/requests/request-stats/request-stats.component.ts | 2 +- client/src/app/admin/requests/shared/request-stats.model.ts | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'client/src/app/admin/requests') diff --git a/client/src/app/admin/requests/request-stats/request-stats.component.html b/client/src/app/admin/requests/request-stats/request-stats.component.html index b5ac59a9a..6698eac48 100644 --- a/client/src/app/admin/requests/request-stats/request-stats.component.html +++ b/client/src/app/admin/requests/request-stats/request-stats.component.html @@ -18,6 +18,6 @@
Remaining requests: - {{ stats.requests.length }} + {{ stats.totalRequests }}
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 d20b12199..9e2af219c 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 @@ -19,7 +19,7 @@ export class RequestStatsComponent implements OnInit, OnDestroy { } ngOnDestroy() { - if (this.stats.secondsInterval !== null) { + if (this.stats !== null && this.stats.secondsInterval !== null) { clearInterval(this.interval); } } diff --git a/client/src/app/admin/requests/shared/request-stats.model.ts b/client/src/app/admin/requests/shared/request-stats.model.ts index 766e80836..49ecbc79e 100644 --- a/client/src/app/admin/requests/shared/request-stats.model.ts +++ b/client/src/app/admin/requests/shared/request-stats.model.ts @@ -7,18 +7,18 @@ export class RequestStats { maxRequestsInParallel: number; milliSecondsInterval: number; remainingMilliSeconds: number; - requests: Request[]; + totalRequests: number; constructor(hash: { maxRequestsInParallel: number, milliSecondsInterval: number, remainingMilliSeconds: number, - requests: Request[]; + totalRequests: number; }) { this.maxRequestsInParallel = hash.maxRequestsInParallel; this.milliSecondsInterval = hash.milliSecondsInterval; this.remainingMilliSeconds = hash.remainingMilliSeconds; - this.requests = hash.requests; + this.totalRequests = hash.totalRequests; } get remainingSeconds() { -- cgit v1.2.3