mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-23 17:08:34 +00:00
Merge branch 'main' into release-rebase-3/platformv14.7
This commit is contained in:
commit
a101df402b
2 changed files with 6 additions and 5 deletions
|
|
@ -57,11 +57,11 @@ export default class ElasticsearchService implements QueryService {
|
|||
return sslEnabled ? 'https' : 'http';
|
||||
}
|
||||
|
||||
async getConnection(sourceOptions: SourceOptions): Promise<any> {
|
||||
async getConnection(sourceOptions: SourceOptions): Promise<Client> {
|
||||
const host = sourceOptions.host;
|
||||
const port = sourceOptions.port;
|
||||
const username = sourceOptions.username;
|
||||
const password = sourceOptions.password;
|
||||
const username = encodeURIComponent(sourceOptions.username);
|
||||
const password = encodeURIComponent(sourceOptions.password);
|
||||
const sslEnabled = sourceOptions.ssl_enabled;
|
||||
const protocol = this.determineProtocol(sourceOptions);
|
||||
const sslCertificate = sourceOptions.ssl_certificate;
|
||||
|
|
|
|||
|
|
@ -95,13 +95,14 @@ export class AppImportExportService {
|
|||
}
|
||||
const appVersions = await queryAppVersions.orderBy('app_versions.created_at', 'ASC').getMany();
|
||||
|
||||
let dataSources =
|
||||
const legacyLocalDataSources =
|
||||
appVersions?.length &&
|
||||
(await manager
|
||||
.createQueryBuilder(DataSource, 'data_sources')
|
||||
.where('data_sources.appVersionId IN(:...versionId)', {
|
||||
versionId: appVersions.map((v) => v.id),
|
||||
})
|
||||
.andWhere('data_sources.scope != :scope', { scope: DataSourceScopes.GLOBAL })
|
||||
.orderBy('data_sources.created_at', 'ASC')
|
||||
.getMany());
|
||||
|
||||
|
|
@ -127,7 +128,7 @@ export class AppImportExportService {
|
|||
|
||||
const globalDataSources = [...new Map(globalQueries.map((gq) => [gq.dataSource.id, gq.dataSource])).values()];
|
||||
|
||||
dataSources = [...dataSources, ...globalDataSources];
|
||||
const dataSources = [...legacyLocalDataSources, ...globalDataSources];
|
||||
|
||||
if (dataSources?.length) {
|
||||
dataQueries = await manager
|
||||
|
|
|
|||
Loading…
Reference in a new issue