fix: remote engine ip address

This commit is contained in:
Andras Bacsai 2022-07-22 20:49:42 +00:00
parent 9e3ba295ea
commit 3c18ef81ce
2 changed files with 3 additions and 5 deletions

View File

@ -1,7 +1,6 @@
<script lang="ts">
export let database: any;
export let privatePort: any;
export let settings: any;
import { page } from '$app/stores';
import CopyPasswordField from '$lib/components/CopyPasswordField.svelte';
@ -16,7 +15,7 @@
import { post } from '$lib/api';
import { toast } from '@zerodevx/svelte-toast';
import { t } from '$lib/translations';
import { errorNotification, getDomain } from '$lib/common';
import { errorNotification } from '$lib/common';
import { appSession, status } from '$lib/store';
const { id } = $page.params;
@ -51,7 +50,7 @@
return `${database.type}://${
databaseDbUser ? databaseDbUser + ':' : ''
}${databaseDbUserPassword}@${
isPublic ? ($appSession.ipv4) : database.id
isPublic ? (database.destinationDocker.remoteEngine ? database.destinationDocker.ipAddress : $appSession.ipv4) : database.id
}:${isPublic ? database.publicPort : privatePort}/${databaseDefault}`;
}

View File

@ -15,7 +15,6 @@
import Databases from './_Databases/_Databases.svelte';
import { status } from '$lib/store';
export let database: any;
export let settings: any;
export let privatePort: any;
const { id } = $page.params;
@ -86,4 +85,4 @@
</dl>
</div>
</div>
<Databases bind:database {privatePort} {settings} />
<Databases bind:database {privatePort}/>