-
Interval seconds between requests:
- {{ stats.secondsInterval }}
+
+
+ Remaining requests:
+ {{ stats.totalRequests }}
+
+
+
+ Interval seconds between requests:
+ {{ stats.secondsInterval }}
+
+
+
+ Remaining time before the scheduled request:
+ {{ stats.remainingSeconds }}
+
-
-
Remaining time before the scheduled request:
- {{ stats.remainingSeconds }}
+
+
+ Maximum number of different pods for a scheduled request:
+ {{ stats.requestsLimitPods }}
+
+
+
+ Maximum number of requests per pod for a scheduled request:
+ {{ stats.requestsLimitPerPod }}
+
-
- Maximum number of requests per interval:
- {{ stats.maxRequestsInParallel }}
-
-
-
- Remaining requests:
- {{ stats.totalRequests }}
-
diff --git a/client/src/app/admin/requests/request-stats/request-stats.component.scss b/client/src/app/admin/requests/request-stats/request-stats.component.scss
index 92c28dc99..9c68fba99 100644
--- a/client/src/app/admin/requests/request-stats/request-stats.component.scss
+++ b/client/src/app/admin/requests/request-stats/request-stats.component.scss
@@ -1,6 +1,19 @@
.label-description {
display: inline-block;
- width: 350px;
font-weight: bold;
color: black;
}
+
+.requests-general {
+ .label-description {
+ width: 320px;
+ }
+}
+
+.requests-limit {
+ margin-top: 20px;
+
+ .label-description {
+ width: 430px;
+ }
+}
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 {
ngOnInit() {
this.getStats();
+ this.runInterval();
}
ngOnDestroy() {
@@ -27,10 +28,7 @@ export class RequestStatsComponent implements OnInit, OnDestroy {
getStats() {
this.requestService.getStats().subscribe(
- stats => {
- this.stats = stats;
- this.runInterval();
- },
+ stats => this.stats = stats,
err => alert(err.text)
);
@@ -42,7 +40,6 @@ export class RequestStatsComponent implements OnInit, OnDestroy {
if (this.stats.remainingMilliSeconds <= 0) {
setTimeout(() => this.getStats(), this.stats.remainingMilliSeconds + 100);
- clearInterval(this.interval);
}
}, 1000);
}
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 49ecbc79e..f658c4682 100644
--- a/client/src/app/admin/requests/shared/request-stats.model.ts
+++ b/client/src/app/admin/requests/shared/request-stats.model.ts
@@ -4,18 +4,21 @@ export interface Request {
}
export class RequestStats {
- maxRequestsInParallel: number;
+ requestsLimitPods: number;
+ requestsLimitPerPod: number;
milliSecondsInterval: number;
remainingMilliSeconds: number;
totalRequests: number;
constructor(hash: {
- maxRequestsInParallel: number,
+ requestsLimitPods: number,
+ requestsLimitPerPod: number,
milliSecondsInterval: number,
remainingMilliSeconds: number,
totalRequests: number;
}) {
- this.maxRequestsInParallel = hash.maxRequestsInParallel;
+ this.requestsLimitPods = hash.requestsLimitPods;
+ this.requestsLimitPerPod = hash.requestsLimitPerPod;
this.milliSecondsInterval = hash.milliSecondsInterval;
this.remainingMilliSeconds = hash.remainingMilliSeconds;
this.totalRequests = hash.totalRequests;
diff --git a/server/controllers/api/requests.js b/server/controllers/api/requests.js
index 1f9193fc8..3e0d246d1 100644
--- a/server/controllers/api/requests.js
+++ b/server/controllers/api/requests.js
@@ -28,7 +28,8 @@ function getStatsRequests (req, res, next) {
return res.json({
totalRequests: totalRequests,
- maxRequestsInParallel: constants.REQUESTS_IN_PARALLEL,
+ requestsLimitPods: constants.REQUESTS_LIMIT_PODS,
+ requestsLimitPerPod: constants.REQUESTS_LIMIT_PER_POD,
remainingMilliSeconds: db.Request.remainingMilliSeconds(),
milliSecondsInterval: constants.REQUESTS_INTERVAL
})