]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard : update telemetry notification for simple mode 67522/head
authorAbhishek Desai <abhishek.desai1@ibm.com>
Wed, 25 Feb 2026 10:57:16 +0000 (16:27 +0530)
committerAbhishek Desai <abhishek.desai1@ibm.com>
Wed, 25 Feb 2026 12:24:33 +0000 (17:54 +0530)
fixes : https://tracker.ceph.com/issues/75157
Signed-off-by: Abhishek Desai <abhishek.desai1@ibm.com>
src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/dashboard/dashboard.component.html
src/pybind/mgr/dashboard/frontend/src/app/core/layouts/workbench-layout/workbench-layout.component.html
src/pybind/mgr/dashboard/frontend/src/app/core/layouts/workbench-layout/workbench-layout.component.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/components/telemetry-notification/telemetry-notification.component.html
src/pybind/mgr/dashboard/frontend/src/app/shared/components/telemetry-notification/telemetry-notification.component.ts

index e6eb1573744d55820ce612ab1ecb700717ef1530..81b83cdc5127e13a3418e71054baf101b05219bb 100644 (file)
@@ -5,6 +5,7 @@
 <cd-dashboard-v3 data-testid="cd-dashboard-v3"></cd-dashboard-v3>
 } @else {
 <!-- NEWER OVERVIEW -->
+<cd-telemetry-notification></cd-telemetry-notification>
 <cd-overview data-testid="cd-overview"></cd-overview>
 }
 </main>
index 458335c77cf0a9aeec0f9952316ab82511ff8d13..448966fc496445ef33ef76091654728ec08b92e8 100644 (file)
@@ -8,7 +8,10 @@
       <div class="cd-alert-container"
            [ngClass]="{'ms-4 me-4': (router.url == '/overview' || router.url == '/dashboard_3' || router.url == '/multi-cluster/overview'), 'm-3': (router.url == '/rgw/overview')}">
         <cd-pwd-expiration-notification></cd-pwd-expiration-notification>
+        @let features = enabledFeature$ | async;
+        @if (features?.dashboard) {
         <cd-telemetry-notification></cd-telemetry-notification>
+        }
         <cd-motd></cd-motd>
       </div>
       <cd-context></cd-context>
index 3cc7faf0eb633b49c6fde98597ac24a0f99e824c..d7983d6247f7958204eafcf70f25db63de15aff5 100644 (file)
@@ -1,7 +1,7 @@
 import { Component, HostBinding, OnDestroy, OnInit } from '@angular/core';
 import { ActivatedRouteSnapshot, NavigationEnd, Router } from '@angular/router';
 
-import { Subscription } from 'rxjs';
+import { Observable, Subscription } from 'rxjs';
 import { filter } from 'rxjs/operators';
 import { MultiClusterService } from '~/app/shared/api/multi-cluster.service';
 import { Permissions } from '~/app/shared/models/permissions';
@@ -12,6 +12,10 @@ import { SummaryService } from '~/app/shared/services/summary.service';
 import { TaskManagerService } from '~/app/shared/services/task-manager.service';
 import { TelemetryNotificationService } from '../../../shared/services/telemetry-notification.service';
 import { MotdNotificationService } from '~/app/shared/services/motd-notification.service';
+import {
+  FeatureTogglesMap,
+  FeatureTogglesService
+} from '~/app/shared/services/feature-toggles.service';
 import _ from 'lodash';
 
 @Component({
@@ -27,6 +31,7 @@ export class WorkbenchLayoutComponent implements OnInit, OnDestroy {
   permissions: Permissions;
   pageHeaderTitle: string | null = null;
   pageHeaderDescription: string | null = null;
+  enabledFeature$: Observable<FeatureTogglesMap>;
 
   @HostBinding('class') get class(): string {
     return 'top-notification-' + this.notifications.length;
@@ -40,9 +45,11 @@ export class WorkbenchLayoutComponent implements OnInit, OnDestroy {
     private faviconService: FaviconService,
     private authStorageService: AuthStorageService,
     private telemetryNotificationService: TelemetryNotificationService,
-    private motdNotificationService: MotdNotificationService
+    private motdNotificationService: MotdNotificationService,
+    private featureTogglesService: FeatureTogglesService
   ) {
     this.permissions = this.authStorageService.getPermissions();
+    this.enabledFeature$ = this.featureTogglesService.get();
   }
 
   ngOnInit() {
index 9af7958370a79d6f167dc362b1720b8f7bcd06f0..444724d67235b2f74a69893e9646230fdcc1205f 100644 (file)
@@ -4,9 +4,13 @@
                 size="slim"
                 [type]="notificationSeverity"
                 [dismissible]="notificationSeverity !== 'danger'"
+                [actionName]="'Configure Telemetry'"
+                (action)="onConfigure()"
                 (dismissed)="onDismissed()">
-  <div i18n>The Ceph community needs your help to continue improving: please
-    <a routerLink="/telemetry"
-       class="btn activate-button alert-link activate-text">Activate</a> the
-  <a href="https://docs.ceph.com/en/latest/mgr/telemetry/">Telemetry</a> module.</div>
+  <span i18n>Activate
+    <a href="https://docs.ceph.com/en/latest/mgr/telemetry/"
+       target="_blank"
+       rel="noopener"> Telemetry
+    </a>: The Ceph community welcomes your support in enhancing our efforts. Please activate the telemetry module.
+  </span>
 </cd-alert-panel>
index 57730b3431320242cc9ad7fb6f1ffaaf75aa60b6..a496b1f2332a711d6341a4581d921ca1b04b577b 100644 (file)
@@ -1,4 +1,5 @@
 import { Component, OnDestroy, OnInit } from '@angular/core';
+import { Router } from '@angular/router';
 
 import _ from 'lodash';
 
@@ -16,13 +17,14 @@ import { TelemetryNotificationService } from '~/app/shared/services/telemetry-no
 })
 export class TelemetryNotificationComponent implements OnInit, OnDestroy {
   displayNotification = false;
-  notificationSeverity = 'warning';
+  notificationSeverity = 'info';
 
   constructor(
     private mgrModuleService: MgrModuleService,
     private authStorageService: AuthStorageService,
     private notificationService: NotificationService,
-    private telemetryNotificationService: TelemetryNotificationService
+    private telemetryNotificationService: TelemetryNotificationService,
+    private router: Router
   ) {}
 
   ngOnInit() {
@@ -60,4 +62,8 @@ export class TelemetryNotificationComponent implements OnInit, OnDestroy {
 page (<b>Dashboard Settings</b> -> <b>Telemetry configuration</b>) at any time.`
     );
   }
+
+  onConfigure(): void {
+    this.router.navigate(['/telemetry']);
+  }
 }