messaging-management/messaging/shared/usage/usage.component.ts
Usage component displays usage information in a form of e.g. "51% used". It can be used in two ways:
count and limit inputs, it will calculate the usage percentage.percentage input, it will use the provided percentage value.
Note: percentage input takes precedence over count and limit inputs.
| host | { |
| selector | app-usage |
| standalone | true |
| imports |
NgIf
C8yTranslatePipe
|
| templateUrl | ./usage.component.html |
IconDirective
NgIf
NgClass
C8yTranslatePipe
PercentPipe
<div
class="tag no-pointer"
[ngClass]="statusMap[status()]"
*ngIf="usage() !== null"
>
<i
class="text-danger m-r-4 text-12"
c8yIcon="exclamation-circle"
*ngIf="status() === 'danger'"
></i>
<span>
{{ usageToDisplay | translate: { percentageOfQuota: (usage() | percent: '1.0-2') } }}
</span>
</div>