refactoring
This commit is contained in:
parent
bc35466e03
commit
647210b346
@ -392,7 +392,9 @@ export class GatewayConnectorComponent extends PageComponent implements AfterVie
|
|||||||
const title = `Delete connector \"${attribute.key}\"?`;
|
const title = `Delete connector \"${attribute.key}\"?`;
|
||||||
const content = `All connector data will be deleted.`;
|
const content = `All connector data will be deleted.`;
|
||||||
|
|
||||||
this.dialogService.confirm(title, content, 'Cancel', 'Delete').pipe(take(1)).subscribe(result => {
|
this.dialogService.confirm(title, content, 'Cancel', 'Delete').pipe(
|
||||||
|
take(1),
|
||||||
|
switchMap((result) => {
|
||||||
if (!result) {
|
if (!result) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -405,7 +407,9 @@ export class GatewayConnectorComponent extends PageComponent implements AfterVie
|
|||||||
this.removeConnectorFromList(attribute.key, false);
|
this.removeConnectorFromList(attribute.key, false);
|
||||||
tasks.push(this.getSaveEntityAttributesTask(scope));
|
tasks.push(this.getSaveEntityAttributesTask(scope));
|
||||||
|
|
||||||
forkJoin(tasks).pipe(take(1)).subscribe(() => {
|
return forkJoin(tasks);
|
||||||
|
})
|
||||||
|
).subscribe(() => {
|
||||||
if (this.initialConnector ? this.initialConnector.name === attribute.key : true) {
|
if (this.initialConnector ? this.initialConnector.name === attribute.key : true) {
|
||||||
this.clearOutConnectorForm();
|
this.clearOutConnectorForm();
|
||||||
this.cd.detectChanges();
|
this.cd.detectChanges();
|
||||||
@ -413,7 +417,6 @@ export class GatewayConnectorComponent extends PageComponent implements AfterVie
|
|||||||
}
|
}
|
||||||
this.updateData(true);
|
this.updateData(true);
|
||||||
});
|
});
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
connectorLogs(attribute: AttributeData, $event: Event): void {
|
connectorLogs(attribute: AttributeData, $event: Event): void {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user