]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/+admin/requests/shared/request-stats.model.ts
Client: lazy load admin area
[github/Chocobozzz/PeerTube.git] / client / src / app / +admin / requests / shared / request-stats.model.ts
CommitLineData
bed3143e
C
1export interface Request {
2 request: any;
3 to: any;
4}
5
6export class RequestStats {
872a4c7c
C
7 requestsLimitPods: number;
8 requestsLimitPerPod: number;
eb4f957e 9 milliSecondsInterval: number;
32e57475 10 remainingMilliSeconds: number;
feb4bdfd 11 totalRequests: number;
bed3143e
C
12
13 constructor(hash: {
872a4c7c
C
14 requestsLimitPods: number,
15 requestsLimitPerPod: number,
bed3143e
C
16 milliSecondsInterval: number,
17 remainingMilliSeconds: number,
feb4bdfd 18 totalRequests: number;
bed3143e 19 }) {
872a4c7c
C
20 this.requestsLimitPods = hash.requestsLimitPods;
21 this.requestsLimitPerPod = hash.requestsLimitPerPod;
bed3143e
C
22 this.milliSecondsInterval = hash.milliSecondsInterval;
23 this.remainingMilliSeconds = hash.remainingMilliSeconds;
feb4bdfd 24 this.totalRequests = hash.totalRequests;
bed3143e
C
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
eb4f957e 35}