mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-23 20:45:59 +00:00
show all databases for filtered connections
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { filterName } from 'dbgate-tools';
|
import { filterName, getConnectionLabel } from 'dbgate-tools';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import { useDatabaseList } from '../utility/metadataLoaders';
|
import { useDatabaseList } from '../utility/metadataLoaders';
|
||||||
import AppObjectList from './AppObjectList.svelte';
|
import AppObjectList from './AppObjectList.svelte';
|
||||||
@@ -15,11 +15,13 @@
|
|||||||
|
|
||||||
$: databases = useDatabaseList({ conid: isExpandedOnlyBySearch ? null : data._id });
|
$: databases = useDatabaseList({ conid: isExpandedOnlyBySearch ? null : data._id });
|
||||||
$: dbList = isExpandedOnlyBySearch ? getLocalStorage(`database_list_${data._id}`) || [] : $databases || [];
|
$: dbList = isExpandedOnlyBySearch ? getLocalStorage(`database_list_${data._id}`) || [] : $databases || [];
|
||||||
|
|
||||||
|
$: connectionLabel = getConnectionLabel(data);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<AppObjectList
|
<AppObjectList
|
||||||
list={_.sortBy(
|
list={_.sortBy(
|
||||||
dbList.filter(x => filterName(filter, x.name)),
|
dbList.filter(x => filterName(filter, x.name, connectionLabel)),
|
||||||
x => x.sortOrder ?? x.name
|
x => x.sortOrder ?? x.name
|
||||||
).map(db => ({ ...db, connection: data }))}
|
).map(db => ({ ...db, connection: data }))}
|
||||||
module={databaseAppObject}
|
module={databaseAppObject}
|
||||||
|
|||||||
Reference in New Issue
Block a user