mirror of
https://github.com/dbgate/dbgate
synced 2024-11-07 20:26:23 +00:00
dockerhost hint on GUI
This commit is contained in:
parent
e5bbf5eca3
commit
d041f88a47
@ -37,6 +37,7 @@ module.exports = {
|
||||
// hideAppEditor: !!process.env.HIDE_APP_EDITOR,
|
||||
allowShellConnection: platformInfo.allowShellConnection,
|
||||
allowShellScripting: platformInfo.allowShellConnection,
|
||||
isDocker: platformInfo.isDocker,
|
||||
permissions,
|
||||
login,
|
||||
...currentVersion,
|
||||
|
@ -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}
|
||||
|
Loading…
Reference in New Issue
Block a user