mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-30 20:53:57 +00:00
connecting via socket for mysql and postgres #358
This commit is contained in:
2
packages/types/engines.d.ts
vendored
2
packages/types/engines.d.ts
vendored
@@ -72,6 +72,8 @@ export interface EngineDriver {
|
||||
beforeConnectionSave?: (values: any) => any;
|
||||
databaseUrlPlaceholder?: string;
|
||||
defaultAuthTypeName?: string;
|
||||
defaultSocketPath?: string;
|
||||
authTypeLabel?: string;
|
||||
importExportArgs?: any[];
|
||||
connect({ server, port, user, password, database }): Promise<any>;
|
||||
close(pool): Promise<any>;
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
|
||||
{#if $authTypes && driver?.showConnectionField('authType', $values)}
|
||||
<FormSelectField
|
||||
label="Authentication"
|
||||
label={driver?.authTypeLabel ?? 'Authentication'}
|
||||
name="authType"
|
||||
isNative
|
||||
disabled={isConnected}
|
||||
@@ -106,7 +106,7 @@
|
||||
name="port"
|
||||
disabled={isConnected || disabledFields.includes('port')}
|
||||
templateProps={{ noMargin: true }}
|
||||
placeholder={driver && driver.defaultPort}
|
||||
placeholder={driver?.defaultPort}
|
||||
/>
|
||||
</div>
|
||||
{/if}
|
||||
@@ -119,6 +119,15 @@
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
{#if driver?.showConnectionField('socketPath', $values)}
|
||||
<FormTextField
|
||||
label="Socket path"
|
||||
name="socketPath"
|
||||
disabled={isConnected || disabledFields.includes('socketPath')}
|
||||
placeholder={driver?.defaultSocketPath}
|
||||
/>
|
||||
{/if}
|
||||
|
||||
{#if showUser && showPassword}
|
||||
<div class="row">
|
||||
{#if showUser}
|
||||
|
||||
@@ -81,6 +81,7 @@
|
||||
'password',
|
||||
'defaultDatabase',
|
||||
'singleDatabase',
|
||||
'socketPath',
|
||||
];
|
||||
const visibleProps = allProps.filter(x => driver?.showConnectionField(x, $values));
|
||||
const omitProps = _.difference(allProps, visibleProps);
|
||||
|
||||
Reference in New Issue
Block a user