]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/telemetry/telemetry.component.ts
import 15.2.5
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / src / app / ceph / cluster / telemetry / telemetry.component.ts
index d9ec0e4f8ec142ffef88a73034650199eee5dc15..d6d928e19500c8f15bf53ef347c6df454b360254 100644 (file)
@@ -14,6 +14,7 @@ import { CdFormBuilder } from '../../../shared/forms/cd-form-builder';
 import { CdFormGroup } from '../../../shared/forms/cd-form-group';
 import { CdValidators } from '../../../shared/forms/cd-validators';
 import { NotificationService } from '../../../shared/services/notification.service';
+import { TelemetryNotificationService } from '../../../shared/services/telemetry-notification.service';
 import { TextToDownloadService } from '../../../shared/services/text-to-download.service';
 
 @Component({
@@ -55,7 +56,8 @@ export class TelemetryComponent implements OnInit {
     private router: Router,
     private telemetryService: TelemetryService,
     private i18n: I18n,
-    private textToDownloadService: TextToDownloadService
+    private textToDownloadService: TextToDownloadService,
+    private telemetryNotificationService: TelemetryNotificationService
   ) {}
 
   ngOnInit() {
@@ -175,6 +177,7 @@ complete the next step and accept the license.`
 
   disableModule(message: string = null, followUpFunc: Function = null) {
     this.telemetryService.enable(false).subscribe(() => {
+      this.telemetryNotificationService.setVisibility(true);
       if (message) {
         this.notificationService.show(NotificationType.success, message);
       }
@@ -200,6 +203,7 @@ complete the next step and accept the license.`
 
   onSubmit() {
     this.telemetryService.enable().subscribe(() => {
+      this.telemetryNotificationService.setVisibility(false);
       this.notificationService.show(
         NotificationType.success,
         this.i18n('The Telemetry module has been configured and activated successfully.')