Skip to content

Commit

Permalink
Merge pull request #323 from KxSystems/ee-fixes
Browse files Browse the repository at this point in the history
KXI-46944: KX Tab Never visited but a datasource is opened
  • Loading branch information
ecmel authored May 24, 2024
2 parents 8807763 + 2570ff7 commit 9c22ce1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/commands/workspaceCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down
2 changes: 2 additions & 0 deletions src/services/dataSourceEditorProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import {
import { getUri } from "../utils/getUri";
import { getNonce } from "../utils/getNonce";
import {
getConnectionForServer,
getInsightsServers,
getServerForUri,
setServerForUri,
Expand Down Expand Up @@ -107,6 +108,7 @@ export class DataSourceEditorProvider implements CustomTextEditorProvider {

const updateWebview = async () => {
const selectedServer = getServerForUri(document.uri) || "";
await getConnectionForServer(selectedServer);
webview.postMessage(<DataSourceMessage2>{
command: DataSourceCommand.Update,
selectedServer,
Expand Down

0 comments on commit 9c22ce1

Please sign in to comment.