Browse Source

Merge pull request #7258 in DEC/decision-webui-dcm from bugfix/11.0 to feature/x

* commit '25cfb8af0f44da3f407a3f1e325765892bdbb837':
  REPORT-91742 fix: 补充下默认值
  优化下逻辑
  REPORT-91742 fix: 修复测试连接失败问题
feature/x
superman 2 years ago
parent
commit
f171dc470f
  1. 16
      src/modules/pages/connection/list/list_item/list_item.ts

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

@ -6,6 +6,9 @@ import { hasRegistered } from '../list.service';
import { connectionCanEdit, getTextByDatabaseType, getChartLength } from '../../../../app.service';
import { testConnection } from '../../../maintain/forms/form.server';
import { DownListCombo, Label, SignEditor } from '@fui/core';
import { ApiFactory } from '../../../../crud/apiFactory';
const api = new ApiFactory().create();
@shortcut()
@store(ListItemModel)
@ -206,8 +209,17 @@ export class ListItem extends BI.BasicButton {
}
private testConnectionAction() {
const { name } = this.options;
testConnection(this.model.connections.find(item => item.connectionName === name));
// 接口返回的内容是对称加密的,前端要先解密再用新加密传回去
const connection = this.model.connections
.find(item => item.connectionName === this.options.name);
if (BI.isNull(connection)) return;
const validationQuery = connection?.connectionData?.connectionPoolAttr?.validationQuery || '';
BI.set(connection, 'connectionData.connectionPoolAttr.validationQuery', api.getCipher(api.getPlain(validationQuery)));
testConnection(connection);
}
private itemActionCalculate() {

Loading…
Cancel
Save