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({
private router: Router,
private telemetryService: TelemetryService,
private i18n: I18n,
- private textToDownloadService: TextToDownloadService
+ private textToDownloadService: TextToDownloadService,
+ private telemetryNotificationService: TelemetryNotificationService
) {}
ngOnInit() {
disableModule(message: string = null, followUpFunc: Function = null) {
this.telemetryService.enable(false).subscribe(() => {
+ this.telemetryNotificationService.setVisibility(true);
if (message) {
this.notificationService.show(NotificationType.success, message);
}
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.')