for multi-core cpu's the value can be more than 100% so it doesn't make
sense to show warning/error when the usage is at or more than 100%.
hence removing it
Fixes: https://tracker.ceph.com/issues/58838
Signed-off-by: Nizamudeen A <nia@redhat.com>
(cherry picked from commit
131a70754a6bfbbb2d1481ba74436953c6ecc226)
<cd-usage-bar [total]="total"
[calculatePerc]="false"
[used]="row.cpu_percentage"
- [isBinary]="false"
- [warningThreshold]="warningThreshold"
- [errorThreshold]="errorThreshold">
+ [isBinary]="false">
</cd-usage-bar>
</ng-template>
-
data-placement="left"
[ngbTooltip]="usageTooltipTpl">
<div class="progress-bar bg-info"
- [ngClass]="{'bg-warning': (warningThreshold >= 0) && (usedPercentage/100 >= warningThreshold), 'bg-danger': (errorThreshold >= 0) && (usedPercentage/100 >= errorThreshold)}"
+ [ngClass]="{'bg-warning': warningThreshold && (warningThreshold >= 0) && (usedPercentage/100 >= warningThreshold), 'bg-danger': errorThreshold && (errorThreshold >= 0) && (usedPercentage/100 >= errorThreshold)}"
role="progressbar"
[attr.aria-label]="{ title }"
i18n-aria-label="The title of this usage bar is { title }"
@Input()
used: any;
@Input()
- warningThreshold: number;
+ warningThreshold?: number;
@Input()
- errorThreshold: number;
+ errorThreshold?: number;
@Input()
isBinary = true;
@Input()