]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mgr/dashboard:fixed issue with notification icon
authorAnkit <51ankitkp@gmail.com>
Wed, 12 Mar 2025 17:45:55 +0000 (23:15 +0530)
committerAnkit <51ankitkp@gmail.com>
Wed, 19 Mar 2025 09:42:13 +0000 (15:12 +0530)
Fixes:https://tracker.ceph.com/issues/70253
Signed-off-by: Ankit Kumar <51ankitkp@gmail.com>
src/pybind/mgr/dashboard/frontend/src/app/core/navigation/navigation/navigation.component.html
src/pybind/mgr/dashboard/frontend/src/app/core/navigation/navigation/navigation.component.ts
src/pybind/mgr/dashboard/frontend/src/app/core/navigation/notifications/notifications.component.html
src/pybind/mgr/dashboard/frontend/src/app/core/navigation/notifications/notifications.component.ts

index a544bbcdb436cf3cee1a8aa52be7c0bbf32e54df..9e40d53b4fcecaa9bd3bcb909b3cb4f0e9f27e73 100644 (file)
@@ -33,8 +33,9 @@
       <cds-header-navigation>
         <cd-language-selector class="d-flex"></cd-language-selector>
       </cds-header-navigation>
-      <div class="cds--btn cds--btn--icon-only cds--header__action">
-        <cd-notifications (click)="toggleRightSidebar()"></cd-notifications>
+      <div class="cds--btn cds--btn--icon-only cds--header__action"
+           (click)="toggleSidebar()">
+        <cd-notifications></cd-notifications>
       </div>
       <div class="cds--btn cds--btn--icon-only cds--header__action">
         <cd-dashboard-help></cd-dashboard-help>
index 55c9ab7e88dcc08e5f11565cd139cf39f330f4e3..1b9c0b73c1bfab17770ef637a1d3ffbb6d80daf6 100644 (file)
@@ -14,6 +14,7 @@ import {
   FeatureTogglesMap$,
   FeatureTogglesService
 } from '~/app/shared/services/feature-toggles.service';
+import { NotificationService } from '~/app/shared/services/notification.service';
 import { PrometheusAlertService } from '~/app/shared/services/prometheus-alert.service';
 import { SummaryService } from '~/app/shared/services/summary.service';
 
@@ -49,6 +50,7 @@ export class NavigationComponent implements OnInit, OnDestroy {
   currentClusterName: string;
 
   constructor(
+    public notificationService: NotificationService,
     private authStorageService: AuthStorageService,
     private multiClusterService: MultiClusterService,
     private router: Router,
@@ -189,7 +191,9 @@ export class NavigationComponent implements OnInit, OnDestroy {
       }
     );
   }
-
+  toggleSidebar() {
+    this.notificationService.toggleSidebar();
+  }
   trackByFn(item: any) {
     return item;
   }
index f120234b9cd5d58e8acc3f0ed8904e700b235fc8..f106e6647e358443f1d37a71c8946815267e61b0 100644 (file)
@@ -1,7 +1,7 @@
 <a i18n-title
    title="Tasks and Notifications"
    [ngClass]="{ 'running': hasRunningTasks }"
-   (click)="toggleSidebar()">
+   >
   <svg cdsIcon="notification"
        size="20"
        title="notification"></svg>
index 89c6c4037941be719b0ce01a5808ce1ca1bd2f0b..b6e5fd41ab42a4c0d8b1df8d1e1693a81cd985ea 100644 (file)
@@ -40,8 +40,4 @@ export class NotificationsComponent implements OnInit, OnDestroy {
   ngOnDestroy(): void {
     this.subs.unsubscribe();
   }
-
-  toggleSidebar() {
-    this.notificationService.toggleSidebar();
-  }
 }