mirror of https://github.com/Squidex/squidex.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
949 B
37 lines
949 B
|
|
/*
|
|
* Squidex Headless CMS
|
|
*
|
|
* @license
|
|
* Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved.
|
|
*/
|
|
|
|
import { ChangeDetectionStrategy, Component, Input, OnChanges } from '@angular/core';
|
|
import { AppDto, CallsUsageDto, fadeAnimation } from '@app/shared';
|
|
|
|
@Component({
|
|
selector: 'sqx-api-traffic-summary-card',
|
|
styleUrls: ['./api-traffic-summary-card.component.scss'],
|
|
templateUrl: './api-traffic-summary-card.component.html',
|
|
animations: [
|
|
fadeAnimation
|
|
],
|
|
changeDetection: ChangeDetectionStrategy.OnPush
|
|
})
|
|
export class ApiTrafficSummaryCardComponent implements OnChanges {
|
|
@Input()
|
|
public app: AppDto;
|
|
|
|
@Input()
|
|
public usage: CallsUsageDto;
|
|
|
|
public bytesMonth = 0;
|
|
public bytesAllowed = 0;
|
|
|
|
public ngOnChanges() {
|
|
if (this.usage) {
|
|
this.bytesMonth = this.usage.monthBytes;
|
|
this.bytesAllowed = this.usage.allowedBytes;
|
|
}
|
|
}
|
|
}
|