|
|
|
@ -33,7 +33,9 @@ export class MaintainForm extends BI.Widget {
|
|
|
|
|
if (this.connectionName && !this.model.isCopy) { |
|
|
|
|
this.store.updateConnection(this.connectionName, this.form.getSubmitValue()); |
|
|
|
|
} else { |
|
|
|
|
this.store.addConnection(this.form.getSubmitValue()); |
|
|
|
|
const form = this.form.getSubmitValue(); |
|
|
|
|
form.connectionId = this.connectionName; |
|
|
|
|
this.store.addConnection(form); |
|
|
|
|
} |
|
|
|
|
this.store.setIsCopy(false); |
|
|
|
|
}, |
|
|
|
@ -44,7 +46,7 @@ export class MaintainForm extends BI.Widget {
|
|
|
|
|
const id = BI.UUID(); |
|
|
|
|
const testConnection = () => { |
|
|
|
|
const formValue = this.form.getSubmitValue(); |
|
|
|
|
if (this.isEdit) { |
|
|
|
|
if (this.isEdit || this.model.isCopy) { |
|
|
|
|
formValue.connectionId = this.connectionName; |
|
|
|
|
} |
|
|
|
|
this.store.testConnection(formValue).then(re => { |
|
|
|
@ -118,7 +120,6 @@ export class MaintainForm extends BI.Widget {
|
|
|
|
|
if (this.model.isCopy) { |
|
|
|
|
formData.connectionName = `${formData.connectionName}-${BI.i18nText('Dec-Dcm_Copy')}`; |
|
|
|
|
this.isEdit = false; |
|
|
|
|
this.connectionName = ''; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return { |
|
|
|
|