From 32e574750a7b06699073ac8e98aeebaf2fa8a82d Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Sat, 1 Oct 2016 15:43:42 +0200 Subject: Add "max requests number" information for requests iterations --- .../app/admin/requests/request-stats/request-stats.component.html | 5 +++++ client/src/app/admin/requests/shared/request-stats.model.ts | 5 ++++- server/controllers/api/v1/requests.js | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) 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 1b90100e7..b5ac59a9a 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 @@ -11,6 +11,11 @@ {{ stats.remainingSeconds }} +
+ Maximum number of requests per interval: + {{ stats.maxRequestsInParallel }} +
+
Remaining requests: {{ stats.requests.length }} 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 dfa956f10..766e80836 100644 --- a/client/src/app/admin/requests/shared/request-stats.model.ts +++ b/client/src/app/admin/requests/shared/request-stats.model.ts @@ -4,15 +4,18 @@ export interface Request { } export class RequestStats { + maxRequestsInParallel: number; milliSecondsInterval: number; - remainingMilliSeconds: number; + remainingMilliSeconds: number; requests: Request[]; constructor(hash: { + maxRequestsInParallel: number, milliSecondsInterval: number, remainingMilliSeconds: number, requests: Request[]; }) { + this.maxRequestsInParallel = hash.maxRequestsInParallel; this.milliSecondsInterval = hash.milliSecondsInterval; this.remainingMilliSeconds = hash.remainingMilliSeconds; this.requests = hash.requests; diff --git a/server/controllers/api/v1/requests.js b/server/controllers/api/v1/requests.js index 9610e5cd6..97616424d 100644 --- a/server/controllers/api/v1/requests.js +++ b/server/controllers/api/v1/requests.js @@ -30,6 +30,7 @@ function getStatsRequests (req, res, next) { return res.json({ requests: requests, + maxRequestsInParallel: constants.REQUESTS_IN_PARALLEL, remainingMilliSeconds: Request.remainingMilliSeconds(), milliSecondsInterval: constants.REQUESTS_INTERVAL }) -- cgit v1.2.3