mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-19 10:46:00 +00:00
dockerhost hint on GUI
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
import ErrorMessageModal from './ErrorMessageModal.svelte';
|
||||
import { writable } from 'svelte/store';
|
||||
import FormProviderCore from '../forms/FormProviderCore.svelte';
|
||||
import { extensions } from '../stores';
|
||||
import { extensions, getCurrentConfig } from '../stores';
|
||||
import _ from 'lodash';
|
||||
import { getDatabaseFileLabel } from '../utility/getConnectionLabel';
|
||||
import { apiCall } from '../utility/api';
|
||||
@@ -27,7 +27,12 @@
|
||||
let isTesting;
|
||||
let sqlConnectResult;
|
||||
|
||||
const values = writable(connection || { server: 'localhost', engine: 'mssql@dbgate-plugin-mssql' });
|
||||
const values = writable(
|
||||
connection || {
|
||||
server: getCurrentConfig().isDocker ? 'dockerhost' : 'localhost',
|
||||
engine: 'mssql@dbgate-plugin-mssql',
|
||||
}
|
||||
);
|
||||
|
||||
$: engine = $values.engine;
|
||||
$: driver = $extensions.drivers.find(x => x.engine == engine);
|
||||
|
||||
@@ -10,10 +10,11 @@
|
||||
import FormSelectField from '../forms/FormSelectField.svelte';
|
||||
|
||||
import FormTextField from '../forms/FormTextField.svelte';
|
||||
import { extensions } from '../stores';
|
||||
import { extensions, getCurrentConfig } from '../stores';
|
||||
import getElectron from '../utility/getElectron';
|
||||
import { useAuthTypes } from '../utility/metadataLoaders';
|
||||
import FormColorField from '../forms/FormColorField.svelte';
|
||||
import FontIcon from '../icons/FontIcon.svelte';
|
||||
|
||||
const { values } = getFormContext();
|
||||
const electron = getElectron();
|
||||
@@ -101,6 +102,12 @@
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
{#if getCurrentConfig().isDocker}
|
||||
<div class="row">
|
||||
<FontIcon icon="img warn" padRight />
|
||||
Under docker, localhost and 127.0.0.1 will not work, use dockerhost instead
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
{#if showUser && showPassword}
|
||||
|
||||
Reference in New Issue
Block a user