]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Merge pull request #65459 from rhcs-dashboard/72944-hide-suppresed-alerts-on-dashboard
authorafreen23 <afreen23.git@gmail.com>
Tue, 30 Sep 2025 09:43:13 +0000 (15:13 +0530)
committerGitHub <noreply@github.com>
Tue, 30 Sep 2025 09:43:13 +0000 (15:13 +0530)
mgr/dashboard : Hide suppressed  alert on landing page

Reviewed-by: Afreen Misbah <afreen@ibm.com>
Reviewed-by: Nizamudeen A <nia@redhat.com>
1  2 
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/prometheus/active-alert-list/active-alert-list.component.html
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/prometheus/active-alert-list/active-alert-list.component.ts

index 3266109490fc8a017de45a37f279cc3db2dc8eaa,6aa32132c238d267eabb53a020fcf2102771bfcd..215e8ece48c6fffbfc53cf1c8a91dcd8c0598dea
@@@ -30,8 -31,22 +31,23 @@@ export class ActiveAlertListComponent e
    selection = new CdTableSelection();
    icons = Icons;
    expandedInnerRow: any;
 +  multilineTextKeys = ['description', 'impact', 'fix'];
  
+   filters: CdTableColumn[] = [
+     {
+       name: $localize`State`,
+       prop: 'status.state',
+       filterOptions: [$localize`All`, $localize`Active`, $localize`Suppressed`],
+       filterInitValue: $localize`Active`,
+       filterPredicate: (row, value) => {
+         if (value === 'Active') return row.status?.state === AlertState.ACTIVE;
+         else if (value === 'Suppressed') return row.status?.state === AlertState.SUPPRESSED;
+         if (value === 'All') return true;
+         return false;
+       }
+     }
+   ];
    constructor(
      // NotificationsComponent will refresh all alerts every 5s (No need to do it here as well)
      private authStorageService: AuthStorageService,