|
|
@ -6,6 +6,9 @@ import { hasRegistered } from '../list.service'; |
|
|
|
import { connectionCanEdit, getTextByDatabaseType, getChartLength } from '../../../../app.service'; |
|
|
|
import { connectionCanEdit, getTextByDatabaseType, getChartLength } from '../../../../app.service'; |
|
|
|
import { testConnection } from '../../../maintain/forms/form.server'; |
|
|
|
import { testConnection } from '../../../maintain/forms/form.server'; |
|
|
|
import { DownListCombo, Label, SignEditor } from '@fui/core'; |
|
|
|
import { DownListCombo, Label, SignEditor } from '@fui/core'; |
|
|
|
|
|
|
|
import { ApiFactory } from '../../../../crud/apiFactory'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const api = new ApiFactory().create(); |
|
|
|
|
|
|
|
|
|
|
|
@shortcut() |
|
|
|
@shortcut() |
|
|
|
@store(ListItemModel) |
|
|
|
@store(ListItemModel) |
|
|
@ -206,8 +209,17 @@ export class ListItem extends BI.BasicButton { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private testConnectionAction() { |
|
|
|
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() { |
|
|
|
private itemActionCalculate() { |
|
|
|