mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-19 16:36:00 +00:00
extracted getConnectionLabel functionality
This commit is contained in:
@@ -1,13 +1,14 @@
|
||||
<script lang="ts">
|
||||
import _ from 'lodash';
|
||||
import FormSelectField from '../forms/FormSelectField.svelte';
|
||||
import getConnectionLabel from '../utility/getConnectionLabel';
|
||||
import { useConnectionList } from '../utility/metadataLoaders';
|
||||
|
||||
$: connections = useConnectionList();
|
||||
$: connectionOptions = _.sortBy(
|
||||
($connections || []).map(conn => ({
|
||||
value: conn._id,
|
||||
label: conn.displayName || conn.server,
|
||||
label: getConnectionLabel(conn),
|
||||
})),
|
||||
'label'
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user