]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: rm warning/error threshold for cpu usage 56441/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:36:43 +0000 (11:06 +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)

 Conflicts:
src/pybind/mgr/dashboard/frontend/src/app/shared/components/usage-bar/usage-bar.component.html
  - some changes are not in quincy for the threasholds. so adapting it

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 d6fbab5a066c7690dc7b5a7154e8ede8c77bd70a..273ea0b338a114442e351554dc7f762e27d5ff89 100644 (file)
@@ -94,8 +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 7068744e9f02882f04fa79c36a8d13371d58ad54..6b7fd2c5551f4c2fc0a2dc223314e5104096278f 100644 (file)
@@ -15,7 +15,7 @@
      data-placement="left"
      [ngbTooltip]="usageTooltipTpl">
   <div class="progress-bar bg-info"
-       [ngClass]="{'bg-warning': usedPercentage/100 >= warningThreshold, 'bg-danger': usedPercentage/100 >= errorThreshold}"
+       [ngClass]="{'bg-warning': warningThreshold && usedPercentage/100 >= warningThreshold, 'bg-danger': errorThreshold && usedPercentage/100 >= errorThreshold}"
        role="progressbar"
        [attr.aria-label]="{ title }"
        i18n-aria-label="The title of this usage bar is { title }"
index 4877e891e1f124d015b47430e7eff0226c8f13a7..471fb18c0839f5d6c74f3767dcabad664ba79744 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()