diff options
Diffstat (limited to 'client/src/app/+admin/requests/shared/request-stats.model.ts')
-rw-r--r-- | client/src/app/+admin/requests/shared/request-stats.model.ts | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/client/src/app/+admin/requests/shared/request-stats.model.ts b/client/src/app/+admin/requests/shared/request-stats.model.ts new file mode 100644 index 000000000..f658c4682 --- /dev/null +++ b/client/src/app/+admin/requests/shared/request-stats.model.ts | |||
@@ -0,0 +1,35 @@ | |||
1 | export interface Request { | ||
2 | request: any; | ||
3 | to: any; | ||
4 | } | ||
5 | |||
6 | export class RequestStats { | ||
7 | requestsLimitPods: number; | ||
8 | requestsLimitPerPod: number; | ||
9 | milliSecondsInterval: number; | ||
10 | remainingMilliSeconds: number; | ||
11 | totalRequests: number; | ||
12 | |||
13 | constructor(hash: { | ||
14 | requestsLimitPods: number, | ||
15 | requestsLimitPerPod: number, | ||
16 | milliSecondsInterval: number, | ||
17 | remainingMilliSeconds: number, | ||
18 | totalRequests: number; | ||
19 | }) { | ||
20 | this.requestsLimitPods = hash.requestsLimitPods; | ||
21 | this.requestsLimitPerPod = hash.requestsLimitPerPod; | ||
22 | this.milliSecondsInterval = hash.milliSecondsInterval; | ||
23 | this.remainingMilliSeconds = hash.remainingMilliSeconds; | ||
24 | this.totalRequests = hash.totalRequests; | ||
25 | } | ||
26 | |||
27 | get remainingSeconds() { | ||
28 | return Math.floor(this.remainingMilliSeconds / 1000); | ||
29 | } | ||
30 | |||
31 | get secondsInterval() { | ||
32 | return Math.floor(this.milliSecondsInterval / 1000); | ||
33 | } | ||
34 | |||
35 | } | ||