From 2570ff732f9176c0affcf46de23ba8ff61e7889a Mon Sep 17 00:00:00 2001 From: ecmel Date: Fri, 24 May 2024 16:27:03 +0300 Subject: [PATCH] fixes KXI-46944 --- src/commands/workspaceCommand.ts | 2 +- src/services/dataSourceEditorProvider.ts | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/commands/workspaceCommand.ts b/src/commands/workspaceCommand.ts index 58f1c290..cda26751 100644 --- a/src/commands/workspaceCommand.ts +++ b/src/commands/workspaceCommand.ts @@ -96,7 +96,7 @@ function getServers() { } /* istanbul ignore next */ -async function getConnectionForServer(server: string) { +export async function getConnectionForServer(server: string) { if (server) { const servers = await ext.serverProvider.getChildren(); return servers.find((item) => { diff --git a/src/services/dataSourceEditorProvider.ts b/src/services/dataSourceEditorProvider.ts index a98b86ae..b4337c1f 100644 --- a/src/services/dataSourceEditorProvider.ts +++ b/src/services/dataSourceEditorProvider.ts @@ -27,6 +27,7 @@ import { import { getUri } from "../utils/getUri"; import { getNonce } from "../utils/getNonce"; import { + getConnectionForServer, getInsightsServers, getServerForUri, setServerForUri, @@ -107,6 +108,7 @@ export class DataSourceEditorProvider implements CustomTextEditorProvider { const updateWebview = async () => { const selectedServer = getServerForUri(document.uri) || ""; + await getConnectionForServer(selectedServer); webview.postMessage({ command: DataSourceCommand.Update, selectedServer,