From 902267f5eb1d0ed81d94fa2bd78cb02bbc05689f Mon Sep 17 00:00:00 2001 From: Jan Prochazka Date: Sun, 24 Oct 2021 08:03:03 +0200 Subject: [PATCH] Improved ms sql windows connect UX --- packages/types/engines.d.ts | 1 + packages/web/src/modals/ConnectionModalDriverFields.svelte | 2 ++ plugins/dbgate-plugin-mssql/src/backend/driver.js | 2 +- plugins/dbgate-plugin-mssql/src/frontend/driver.js | 1 + 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/types/engines.d.ts b/packages/types/engines.d.ts index 0a728b0a..910bfe3b 100644 --- a/packages/types/engines.d.ts +++ b/packages/types/engines.d.ts @@ -47,6 +47,7 @@ export interface EngineDriver { showConnectionTab?: (tab: 'ssl' | 'sshTunnel', values: any) => boolean; beforeConnectionSave?: (values: any) => any; databaseUrlPlaceholder?: string; + defaultAuthTypeName?: string; connect({ server, port, user, password, database }): Promise; close(pool): Promise; query(pool: any, sql: string, options?: QueryOptions): Promise; diff --git a/packages/web/src/modals/ConnectionModalDriverFields.svelte b/packages/web/src/modals/ConnectionModalDriverFields.svelte index eb53ca27..b2b05373 100644 --- a/packages/web/src/modals/ConnectionModalDriverFields.svelte +++ b/packages/web/src/modals/ConnectionModalDriverFields.svelte @@ -65,6 +65,8 @@ ({ value: auth.name, label: auth.title, diff --git a/plugins/dbgate-plugin-mssql/src/backend/driver.js b/plugins/dbgate-plugin-mssql/src/backend/driver.js index af87acaf..2c2caae1 100644 --- a/plugins/dbgate-plugin-mssql/src/backend/driver.js +++ b/plugins/dbgate-plugin-mssql/src/backend/driver.js @@ -41,7 +41,7 @@ const windowsAuthTypes = [ disabledFields: ['port'], }, { - title: 'Tedious driver', + title: 'NodeJs portable driver (tedious)', name: 'tedious', }, ]; diff --git a/plugins/dbgate-plugin-mssql/src/frontend/driver.js b/plugins/dbgate-plugin-mssql/src/frontend/driver.js index 17a2f61e..bfbdf9a2 100644 --- a/plugins/dbgate-plugin-mssql/src/frontend/driver.js +++ b/plugins/dbgate-plugin-mssql/src/frontend/driver.js @@ -59,6 +59,7 @@ const driver = { engine: 'mssql@dbgate-plugin-mssql', title: 'Microsoft SQL Server', defaultPort: 1433, + defaultAuthTypeName: 'tedious', }; module.exports = driver;