mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-19 16:36:00 +00:00
db diff with db model
This commit is contained in:
@@ -3,15 +3,19 @@
|
||||
import FormSelectField from '../forms/FormSelectField.svelte';
|
||||
import getConnectionLabel from '../utility/getConnectionLabel';
|
||||
import { useConnectionList } from '../utility/metadataLoaders';
|
||||
export let allowChooseModel = false;
|
||||
|
||||
$: connections = useConnectionList();
|
||||
$: connectionOptions = _.sortBy(
|
||||
($connections || []).map(conn => ({
|
||||
value: conn._id,
|
||||
label: getConnectionLabel(conn),
|
||||
})),
|
||||
'label'
|
||||
);
|
||||
$: connectionOptions = [
|
||||
...(allowChooseModel ? [{ label: '(DB Model)', value: '__model' }] : []),
|
||||
..._.sortBy(
|
||||
($connections || []).map(conn => ({
|
||||
value: conn._id,
|
||||
label: getConnectionLabel(conn),
|
||||
})),
|
||||
'label'
|
||||
),
|
||||
];
|
||||
</script>
|
||||
|
||||
<FormSelectField {...$$restProps} options={connectionOptions} />
|
||||
|
||||
Reference in New Issue
Block a user