import { PrometheusListHelper } from '~/app/shared/helpers/prometheus-list-helper';
import { PrometheusAlertService } from '~/app/shared/services/prometheus-alert.service';
import { OrchestratorService } from '~/app/shared/api/orchestrator.service';
+import { MgrModuleService } from '~/app/shared/api/mgr-module.service';
@Component({
selector: 'cd-dashboard-v3',
WRITECLIENTTHROUGHPUT: '',
RECOVERYBYTES: ''
};
+ telemetryEnabled: boolean;
+ telemetryURL = 'https://telemetry-public.ceph.com/';
timerGetPrometheusDataSub: Subscription;
timerTime = 30000;
readonly lastHourDateObject = {
private featureToggles: FeatureTogglesService,
private healthService: HealthService,
public prometheusService: PrometheusService,
+ private mgrModuleService: MgrModuleService,
private refreshIntervalService: RefreshIntervalService,
public prometheusAlertService: PrometheusAlertService
) {
});
this.getPrometheusData(this.lastHourDateObject);
this.getDetailsCardData();
+ this.getTelemetryReport();
}
+ getTelemetryText(): string {
+ return this.telemetryEnabled
+ ? 'Cluster telemetry is active'
+ : 'Cluster telemetry is inactive. To Activate the Telemetry, \
+ click settings icon on top navigation bar and select \
+ Telemetry configration.';
+ }
ngOnDestroy() {
this.interval.unsubscribe();
if (this.timerGetPrometheusDataSub) {
this.queriesResults
);
}
+
+ private getTelemetryReport() {
+ this.mgrModuleService.getConfig('telemetry').subscribe((resp: any) => {
+ this.telemetryEnabled = resp?.enabled;
+ });
+ }
}