From ca33149372fde85da64b9817316485ed161f66a6 Mon Sep 17 00:00:00 2001 From: Abhishek Desai Date: Wed, 25 Feb 2026 16:27:16 +0530 Subject: [PATCH] mgr/dashboard : update telemetry notification for simple mode fixes : https://tracker.ceph.com/issues/75157 Signed-off-by: Abhishek Desai --- .../dashboard/dashboard/dashboard.component.html | 1 + .../workbench-layout/workbench-layout.component.html | 3 +++ .../workbench-layout/workbench-layout.component.ts | 11 +++++++++-- .../telemetry-notification.component.html | 12 ++++++++---- .../telemetry-notification.component.ts | 10 ++++++++-- 5 files changed, 29 insertions(+), 8 deletions(-) diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/dashboard/dashboard.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/dashboard/dashboard.component.html index e6eb1573744..81b83cdc512 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/dashboard/dashboard.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/dashboard/dashboard.component.html @@ -5,6 +5,7 @@ } @else { + } diff --git a/src/pybind/mgr/dashboard/frontend/src/app/core/layouts/workbench-layout/workbench-layout.component.html b/src/pybind/mgr/dashboard/frontend/src/app/core/layouts/workbench-layout/workbench-layout.component.html index 458335c77cf..448966fc496 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/core/layouts/workbench-layout/workbench-layout.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/core/layouts/workbench-layout/workbench-layout.component.html @@ -8,7 +8,10 @@
+ @let features = enabledFeature$ | async; + @if (features?.dashboard) { + }
diff --git a/src/pybind/mgr/dashboard/frontend/src/app/core/layouts/workbench-layout/workbench-layout.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/core/layouts/workbench-layout/workbench-layout.component.ts index 3cc7faf0eb6..d7983d6247f 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/core/layouts/workbench-layout/workbench-layout.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/core/layouts/workbench-layout/workbench-layout.component.ts @@ -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; @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() { diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/telemetry-notification/telemetry-notification.component.html b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/telemetry-notification/telemetry-notification.component.html index 9af7958370a..444724d6723 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/telemetry-notification/telemetry-notification.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/telemetry-notification/telemetry-notification.component.html @@ -4,9 +4,13 @@ size="slim" [type]="notificationSeverity" [dismissible]="notificationSeverity !== 'danger'" + [actionName]="'Configure Telemetry'" + (action)="onConfigure()" (dismissed)="onDismissed()"> -
The Ceph community needs your help to continue improving: please - Activate the - Telemetry module.
+ Activate + Telemetry + : The Ceph community welcomes your support in enhancing our efforts. Please activate the telemetry module. + diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/telemetry-notification/telemetry-notification.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/telemetry-notification/telemetry-notification.component.ts index 57730b34313..a496b1f2332 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/telemetry-notification/telemetry-notification.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/telemetry-notification/telemetry-notification.component.ts @@ -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 (Dashboard Settings -> Telemetry configuration) at any time.` ); } + + onConfigure(): void { + this.router.navigate(['/telemetry']); + } } -- 2.47.3