diff options
Diffstat (limited to 'client')
4 files changed, 46 insertions, 23 deletions
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 6698eac48..9dbed1739 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 | |||
@@ -1,23 +1,33 @@ | |||
1 | <h3>Requests stats</h3> | 1 | <h3>Requests stats</h3> |
2 | 2 | ||
3 | <div *ngIf="stats !== null"> | 3 | <div *ngIf="stats !== null"> |
4 | <div> | 4 | <div class="requests-general"> |
5 | <span class="label-description">Interval seconds between requests:</span> | 5 | <div> |
6 | {{ stats.secondsInterval }} | 6 | <span class="label-description">Remaining requests:</span> |
7 | </div> | 7 | {{ stats.totalRequests }} |
8 | </div> | ||
8 | 9 | ||
9 | <div> | 10 | <div> |
10 | <span class="label-description">Remaining time before the scheduled request:</span> | 11 | <span class="label-description">Interval seconds between requests:</span> |
11 | {{ stats.remainingSeconds }} | 12 | {{ stats.secondsInterval }} |
12 | </div> | 13 | </div> |
13 | 14 | ||
14 | <div> | 15 | <div> |
15 | <span class="label-description">Maximum number of requests per interval:</span> | 16 | <span class="label-description">Remaining time before the scheduled request:</span> |
16 | {{ stats.maxRequestsInParallel }} | 17 | {{ stats.remainingSeconds }} |
18 | </div> | ||
17 | </div> | 19 | </div> |
18 | 20 | ||
19 | <div> | 21 | <div class="requests-limit"> |
20 | <span class="label-description">Remaining requests:</span> | 22 | <div> |
21 | {{ stats.totalRequests }} | 23 | <span class="label-description">Maximum number of different pods for a scheduled request:</span> |
24 | {{ stats.requestsLimitPods }} | ||
25 | </div> | ||
26 | |||
27 | <div> | ||
28 | <span class="label-description">Maximum number of requests per pod for a scheduled request:</span> | ||
29 | {{ stats.requestsLimitPerPod }} | ||
30 | </div> | ||
22 | </div> | 31 | </div> |
32 | |||
23 | </div> | 33 | </div> |
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 @@ | |||
1 | .label-description { | 1 | .label-description { |
2 | display: inline-block; | 2 | display: inline-block; |
3 | width: 350px; | ||
4 | font-weight: bold; | 3 | font-weight: bold; |
5 | color: black; | 4 | color: black; |
6 | } | 5 | } |
6 | |||
7 | .requests-general { | ||
8 | .label-description { | ||
9 | width: 320px; | ||
10 | } | ||
11 | } | ||
12 | |||
13 | .requests-limit { | ||
14 | margin-top: 20px; | ||
15 | |||
16 | .label-description { | ||
17 | width: 430px; | ||
18 | } | ||
19 | } | ||
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 | } |
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 { | |||
4 | } | 4 | } |
5 | 5 | ||
6 | export class RequestStats { | 6 | export class RequestStats { |
7 | maxRequestsInParallel: number; | 7 | requestsLimitPods: number; |
8 | requestsLimitPerPod: number; | ||
8 | milliSecondsInterval: number; | 9 | milliSecondsInterval: number; |
9 | remainingMilliSeconds: number; | 10 | remainingMilliSeconds: number; |
10 | totalRequests: number; | 11 | totalRequests: number; |
11 | 12 | ||
12 | constructor(hash: { | 13 | constructor(hash: { |
13 | maxRequestsInParallel: number, | 14 | requestsLimitPods: number, |
15 | requestsLimitPerPod: number, | ||
14 | milliSecondsInterval: number, | 16 | milliSecondsInterval: number, |
15 | remainingMilliSeconds: number, | 17 | remainingMilliSeconds: number, |
16 | totalRequests: number; | 18 | totalRequests: number; |
17 | }) { | 19 | }) { |
18 | this.maxRequestsInParallel = hash.maxRequestsInParallel; | 20 | this.requestsLimitPods = hash.requestsLimitPods; |
21 | this.requestsLimitPerPod = hash.requestsLimitPerPod; | ||
19 | this.milliSecondsInterval = hash.milliSecondsInterval; | 22 | this.milliSecondsInterval = hash.milliSecondsInterval; |
20 | this.remainingMilliSeconds = hash.remainingMilliSeconds; | 23 | this.remainingMilliSeconds = hash.remainingMilliSeconds; |
21 | this.totalRequests = hash.totalRequests; | 24 | this.totalRequests = hash.totalRequests; |