Skip to content

Commit

Permalink
Merge pull request #115 from KxSystems/KXI-31259-2
Browse files Browse the repository at this point in the history
fixes KXI-31259
  • Loading branch information
ecmel authored Sep 19, 2023
2 parents c969d57 + 54725db commit fee6e1e
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 7 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -325,11 +325,11 @@ Item | Action
---------------------------------------------------------- | -------
Hide notification of installation path after first install | yes/no; default `no`
Hide subscription to newsletter after first install | yes/no; default `no`
Insights for Explorer | [edit JSON settings](#insights-for-explorer)
Insights Enterprise Connections for Explorer | [edit JSON settings](#insights-enterprise-connections-for-explorer)
QHOME directory for q runtime | Display location path of q installation
Servers | [edit JSON settings](#servers)

### Insights for Explorer
### Insights Enterprise Connections for Explorer

```JSON
{
Expand All @@ -348,8 +348,8 @@ Servers | [edit JSON settings
}
},
"kdb.hideSubscribeRegistrationNotification": true,
"kdb.insights": {
"kdb.insightsEnterpriseConnections": {

"b61Z6R1TGF3vsudDAmo5WWDcGEmRQpmQKoWrluXJD9g=": {
"auth": true,
"alias": "servername.com",
Expand Down Expand Up @@ -379,7 +379,7 @@ Servers | [edit JSON settings
}
},
"kdb.hideSubscribeRegistrationNotification": true,
"kdb.insights": {
"kdb.insightsEnterpriseConnections": {
"b61Z6R1TGF3vsudDAmo5WWDcGEmRQpmQKoWrluXJD9g=": {
"auth": true,
"alias": "servername.com",
Expand Down
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,14 @@
"description": "kdb servers for explorer"
},
"kdb.insights": {
"deprecationMessage": "This setting is deprecated, use kdb.insightsEnterpriseConnections instead",
"type": "object",
"description": "kdb insights for explorer"
},
"kdb.insightsEnterpriseConnections": {
"type": "object",
"description": "kdb insights enterprise connections for explorer"
},
"kdb.hideInstallationNotification": {
"type": "boolean",
"description": "Hide notification for installation path, after first install"
Expand Down
14 changes: 12 additions & 2 deletions src/utils/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,13 @@ export function getServers(): Server | undefined {
}

export function getInsights(): Insights | undefined {
return workspace.getConfiguration().get("kdb.insights");
const configuration = workspace.getConfiguration();
const insights =
configuration.get<Insights>("kdb.insightsEnterpriseConnections");

return insights && Object.keys(insights).length > 0
? insights
: configuration.get("kdb.insights");
}

export async function updateServers(servers: Server): Promise<void> {
Expand All @@ -184,7 +190,11 @@ export async function updateServers(servers: Server): Promise<void> {
export async function updateInsights(insights: Insights): Promise<void> {
await workspace
.getConfiguration()
.update("kdb.insights", insights, ConfigurationTarget.Global);
.update(
"kdb.insightsEnterpriseConnections",
insights,
ConfigurationTarget.Global
);
}

export function getServerName(server: ServerDetails): string {
Expand Down

0 comments on commit fee6e1e

Please sign in to comment.