<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>
<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>
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';
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({
permissions: Permissions;
pageHeaderTitle: string | null = null;
pageHeaderDescription: string | null = null;
+ enabledFeature$: Observable<FeatureTogglesMap>;
@HostBinding('class') get class(): string {
return 'top-notification-' + this.notifications.length;
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() {
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>
import { Component, OnDestroy, OnInit } from '@angular/core';
+import { Router } from '@angular/router';
import _ from 'lodash';
})
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() {
page (<b>Dashboard Settings</b> -> <b>Telemetry configuration</b>) at any time.`
);
}
+
+ onConfigure(): void {
+ this.router.navigate(['/telemetry']);
+ }
}