Browse Source

fix: BI-50517 测试连接时传旧的name作为id

qufenxi
alan 5 years ago
parent
commit
dcf957494c
  1. 4
      src/modules/constants/constant.ts
  2. 1
      src/modules/crud/decision.api.ts
  3. 6
      src/modules/pages/maintain/forms/form.ts

4
src/modules/constants/constant.ts

@ -25,7 +25,7 @@ export const DATA_BASE_TYPES_OTHER =
commonly: false,
internal: false,
type: 'jdbc',
hasSchema: false,
hasSchema: true,
kerberos: false,
};
export const DATA_BASE_TYPES = [
@ -396,7 +396,7 @@ export const DATA_BASE_TYPES = [
commonly: false,
internal: false,
type: 'jdbc',
hasSchema: false,
hasSchema: true,
kerberos: false,
},
...BI.Constants.getConstant(CONSTANT_PLUGIN_TYPES).map(item => {

1
src/modules/crud/decision.api.ts

@ -38,7 +38,6 @@ export class DecisionApi implements Api {
testConnection(data: Connection): Promise<TestRequest> {
const form = {
...data,
connectionId: data.connectionName,
connectionData : JSON.stringify(data.connectionData),
};

6
src/modules/pages/maintain/forms/form.ts

@ -41,7 +41,11 @@ export class MaintainForm extends BI.Widget {
}
const id = BI.UUID();
const testConnection = () => {
this.store.testConnection(this.form.getSubmitValue()).then(re => {
const formValue = this.form.getSubmitValue();
if (this.isEdit) {
formValue.connectionId = this.connectionName;
}
this.store.testConnection(formValue).then(re => {
if (re && re.errorCode) {
this.testStatus.setFail(re.errorMsg);
} else if (re.data) {

Loading…
Cancel
Save