Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public save(): void {
let changes = this.getChanges();
if (!isEmpty(changes)) {
this.onGoing = true;
this.configService.saveConfiguration(changes)
.subscribe(response => {
this.onGoing = false;
// refresh allConfig
this.refreshAllconfig.emit();
this.msgHandler.showSuccess('CONFIG.SAVE_SUCCESS');
}, error => {
this.onGoing = false;
this.msgHandler.handleError(error);
});
} else {
// Inprop situation, should not come here
console.error('Save abort because nothing changed');
}
}
public save(): void {
let changes = this.getChanges();
if (!isEmpty(changes)) {
this.onGoing = true;
this.configService.saveConfiguration(changes)
.subscribe(response => {
this.onGoing = false;
this.refreshAllconfig.emit();
// Reload bootstrap option
this.appConfigService.load().subscribe(() => { }
, error => console.error('Failed to reload bootstrap option with error: ', error));
this.msgHandler.showSuccess('CONFIG.SAVE_SUCCESS');
}, error => {
this.onGoing = false;
this.msgHandler.handleError(error);
});
} else {
// Inprop situation, should not come here
console.error('Save abort because nothing changed');
public cancel(): void {
let changes = this.getChanges();
if (!isEmpty(changes)) {
this.confirmMessageHandler.confirmUnsavedChanges(changes);
} else {
// Invalid situation, should not come here
console.error('Nothing changed');
}
}
public cancel(): void {
let changes = this.getChanges();
if (!isEmpty(changes)) {
this.confirmMessageHandler.confirmUnsavedChanges(changes);
} else {
// Invalid situation, should not come here
console.error('Nothing changed');
}
}
}
public hasChanges(): boolean {
return !isEmpty(this.getChanges());
}
public hasChanges(): boolean {
return !isEmpty(this.getChanges());
}