mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-20 08:56:00 +00:00
import export
This commit is contained in:
17
packages/web/src/impexp/FormConnectionSelect.svelte
Normal file
17
packages/web/src/impexp/FormConnectionSelect.svelte
Normal file
@@ -0,0 +1,17 @@
|
||||
<script lang="ts">
|
||||
import FormSelectField from '../forms/FormSelectField.svelte';
|
||||
|
||||
import { useConnectionList } from '../utility/metadataLoaders';
|
||||
|
||||
$: connections = useConnectionList();
|
||||
$: connectionOptions = ($connections || []).map(conn => ({
|
||||
value: conn._id,
|
||||
label: conn.displayName || conn.server,
|
||||
}));
|
||||
</script>
|
||||
|
||||
{#if connectionOptions.length == 0}
|
||||
<div>Not available</div>
|
||||
{:else}
|
||||
<FormSelectField {...$$restProps} options={connectionOptions} />
|
||||
{/if}
|
||||
Reference in New Issue
Block a user