diff --git a/src/models/connectionsModels.ts b/src/models/connectionsModels.ts index d200d5b8..c9db79bf 100644 --- a/src/models/connectionsModels.ts +++ b/src/models/connectionsModels.ts @@ -11,7 +11,11 @@ * specific language governing permissions and limitations under the License. */ -//TODO: start to migrate all connections models to here +export const enum ConnectionType { + BundledQ, + Kdb, + Insights, +} export enum ServerType { INSIGHTS, diff --git a/src/models/messages.ts b/src/models/messages.ts index 222ebe4f..751a5382 100644 --- a/src/models/messages.ts +++ b/src/models/messages.ts @@ -11,6 +11,7 @@ * specific language governing permissions and limitations under the License. */ +import { ConnectionType } from "./connectionsModels"; import { DataSourceFiles } from "./dataSource"; import { MetaObjectPayload } from "./meta"; @@ -44,12 +45,6 @@ export interface DataSourceMessage2 { dataSourceFile: DataSourceFiles; } -export const enum ConnectionType { - BundledQ, - Kdb, - Insights, -} - export interface EditConnectionMessage { connType: ConnectionType; serverName: string; diff --git a/src/panels/newConnection.ts b/src/panels/newConnection.ts index b20fb989..9d2a3670 100644 --- a/src/panels/newConnection.ts +++ b/src/panels/newConnection.ts @@ -16,8 +16,9 @@ import { getUri } from "../utils/getUri"; import { getNonce } from "../utils/getNonce"; import { ext } from "../extensionVariables"; import { InsightsNode, KdbNode } from "../services/kdbTreeProvider"; -import { ConnectionType, EditConnectionMessage } from "../models/messages"; +import { EditConnectionMessage } from "../models/messages"; import { retrieveConnLabelsNames } from "../utils/connLabel"; +import { ConnectionType } from "../models/connectionsModels"; export class NewConnectionPannel { public static currentPanel: NewConnectionPannel | undefined; @@ -176,17 +177,25 @@ export class NewConnectionPannel { webview: vscode.Webview, extensionUri: vscode.Uri, ) { - const webviewUri = getUri(webview, extensionUri, ["out", "webview.js"]); - const nonce = getNonce(); + const getResource = (resource: string) => + getUri(webview, extensionUri, ["out", resource]); return /* html */ ` - +