Browse Source

Merge pull request #37 in DEC/decision-webui-dcm from ~ALAN/decision-webui-dcm:feature/10.0 to feature/10.0

* commit '80204a8712873ededb13cad33ef390f7ec9f62ac':
  fix: KERNEL-1208 修复连接无法打开的bug
qufenxi
alan 5 years ago
parent
commit
438e9e8518
  1. 7
      src/modules/components/test_status/test_status.ts
  2. 2
      src/modules/pages/connection/list/list_item/list_item.ts
  3. 1
      src/modules/pages/maintain/forms/components/form.jdbc.ts
  4. 2
      src/modules/pages/maintain/forms/form.ts

7
src/modules/components/test_status/test_status.ts

@ -142,6 +142,9 @@ export class TestStatus extends BI.Widget {
type: TextButton,
cls: 'bi-high-light bi-high-light-border-bottom',
text: BI.i18nText('Dec-Dcm_Connection_Download_Driver'),
handler: () => {
window.open(this.model.link);
},
},
],
ref: (_ref: any) => {
@ -168,8 +171,8 @@ export class TestStatus extends BI.Widget {
setFail(message: string, driver = '', link = '') {
this.store.setStatus(TEST_STATUS.FAIL);
this.failMessage.setText(message);
this.failDriverMessage.isVisible(!!driver);
this.driverLink.isVisible(!!driver);
this.failDriverMessage.setVisible(!!driver);
this.driverLink.setVisible(!!driver);
if (driver) {
this.failDriverMessage.setText(BI.i18nText('Dec-Dcm_Connection_Lack_Driver', driver));
this.store.setLink(link);

2
src/modules/pages/connection/list/list_item/list_item.ts

@ -168,7 +168,7 @@ export class ListItem extends BI.BasicButton {
if (thisConnection.connectionType === connectionType.JDBC) {
const driver = (thisConnection.connectionData as ConnectionJDBC).driver;
const databaseLink = BI.get(DATA_BASE_DRIVER_LINK.find(item => item.databaseType === databaseType), 'link');
this.testStatus.setFail(re.errorMsg, driver, BI.Services.getService('dec.service.migration').getHelpLink(databaseLink));
this.testStatus.setFail(re.errorMsg, driver, Dec.system[DecCst.Hyperlink.DECISION_HYPERLINK_CONFIG][databaseLink]);
} else {
this.testStatus.setFail(re.errorMsg);
}

1
src/modules/pages/maintain/forms/components/form.jdbc.ts

@ -652,7 +652,6 @@ export class FormJdbc extends BI.Widget {
newCharsetName: this.form.newCharsetName.getValue()[0] || '',
originalCharsetName: this.form.newCharsetName.getValue()[0] || '',
schema: this.form.schema.getValue(),
port: this.form.port.getValue(),
host: this.form.host.getValue(),
authType: this.form.authType.getValue()[0] || '',
creator: Dec ? Dec.personal.username : '',

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

@ -55,7 +55,7 @@ export class MaintainForm extends BI.Widget {
const driver = (formValue.connectionData as ConnectionJDBC).driver;
const databaseType = (formValue.connectionData as ConnectionJDBC).database;
const databaseLink = BI.get(DATA_BASE_DRIVER_LINK.find(item => item.databaseType === databaseType), 'link');
this.testStatus.setFail(re.errorMsg, driver, BI.Services.getService('dec.service.migration').getHelpLink(databaseLink));
this.testStatus.setFail(re.errorMsg, driver, Dec.system[DecCst.Hyperlink.DECISION_HYPERLINK_CONFIG][databaseLink]);
} else {
this.testStatus.setFail(re.errorMsg);
}

Loading…
Cancel
Save