]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: rm warning/error threshold for cpu usage 56442/head
authorNizamudeen A <nia@redhat.com>
Tue, 19 Mar 2024 14:57:13 +0000 (20:27 +0530)
committerNizamudeen A <nia@redhat.com>
Mon, 25 Mar 2024 05:37:58 +0000 (11:07 +0530)
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)

src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/service-daemon-list/service-daemon-list.component.html
src/pybind/mgr/dashboard/frontend/src/app/shared/components/usage-bar/usage-bar.component.html
src/pybind/mgr/dashboard/frontend/src/app/shared/components/usage-bar/usage-bar.component.ts

index c5c173044ea4244680a4697e3859bbbb06622512..273ea0b338a114442e351554dc7f762e27d5ff89 100644 (file)
@@ -94,9 +94,6 @@
   <cd-usage-bar [total]="total"
                 [calculatePerc]="false"
                 [used]="row.cpu_percentage"
-                [isBinary]="false"
-                [warningThreshold]="warningThreshold"
-                [errorThreshold]="errorThreshold">
+                [isBinary]="false">
   </cd-usage-bar>
 </ng-template>
-
index 9a0a3398a3c0535ab287a666ac036974f72c9d2c..e29b0dd8b4be227e2950d0ca39ccb079cb55e3c8 100644 (file)
@@ -29,7 +29,7 @@
      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 }"
index 58bd7d4a46dde15064ed90f9e76b9e2d2eb35a91..f147227eb1bc5415aac73890cca22c47412b1ac6 100644 (file)
@@ -13,9 +13,9 @@ export class UsageBarComponent implements OnChanges {
   @Input()
   used: any;
   @Input()
-  warningThreshold: number;
+  warningThreshold?: number;
   @Input()
-  errorThreshold: number;
+  errorThreshold?: number;
   @Input()
   isBinary = true;
   @Input()