From 94544c400826bb631989395fe241f74bbda48839 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Tue, 6 Feb 2024 15:40:51 +0000 Subject: [PATCH] Remove legacy concept of database store --- .../DatasourceNavigator.svelte | 121 +++++++++--------- .../TableNavigator/TableNavigator.svelte | 69 +++++----- .../data/query/[queryId]/index.svelte | 4 +- .../query/new/[datasourceId]/index.svelte | 4 +- .../data/table/[tableId]/index.svelte | 4 +- .../data/view/v1/[viewName]/index.svelte | 4 +- .../portal/apps/onboarding/index.svelte | 4 - .../builder/src/stores/builder/database.js | 16 --- packages/builder/src/stores/builder/index.js | 4 - 9 files changed, 100 insertions(+), 130 deletions(-) delete mode 100644 packages/builder/src/stores/builder/database.js diff --git a/packages/builder/src/components/backend/DatasourceNavigator/DatasourceNavigator.svelte b/packages/builder/src/components/backend/DatasourceNavigator/DatasourceNavigator.svelte index b0c92432cc..23081c92c4 100644 --- a/packages/builder/src/components/backend/DatasourceNavigator/DatasourceNavigator.svelte +++ b/packages/builder/src/components/backend/DatasourceNavigator/DatasourceNavigator.svelte @@ -9,7 +9,6 @@ views, viewsV2, userSelectedResourceMap, - database, } from "stores/builder" import EditDatasourcePopover from "./popovers/EditDatasourcePopover.svelte" import EditQueryPopover from "./popovers/EditQueryPopover.svelte" @@ -75,69 +74,67 @@ searchTerm && !showAppUsersTable && !enrichedDataSources.find(ds => ds.show) -{#if $database?._id} -
- {#if showAppUsersTable} - selectTable(TableNames.USERS)} - selectedBy={$userSelectedResourceMap[TableNames.USERS]} - /> - {/if} - {#each enrichedDataSources.filter(ds => ds.show) as datasource} - selectDatasource(datasource)} - on:iconClick={() => toggleNode(datasource)} - selectedBy={$userSelectedResourceMap[datasource._id]} - > -
- -
- {#if datasource._id !== BUDIBASE_INTERNAL_DB_ID} - - {/if} -
- - {#if datasource.open} - - {#each datasource.queries as query} - $goto(`./query/${query._id}`)} - selectedBy={$userSelectedResourceMap[query._id]} - > - - - {/each} +
+ {#if showAppUsersTable} + selectTable(TableNames.USERS)} + selectedBy={$userSelectedResourceMap[TableNames.USERS]} + /> + {/if} + {#each enrichedDataSources.filter(ds => ds.show) as datasource} + selectDatasource(datasource)} + on:iconClick={() => toggleNode(datasource)} + selectedBy={$userSelectedResourceMap[datasource._id]} + > +
+ +
+ {#if datasource._id !== BUDIBASE_INTERNAL_DB_ID} + {/if} - {/each} - {#if showNoResults} - -
- There aren't any datasources matching that name -
-
+
+ + {#if datasource.open} + + {#each datasource.queries as query} + $goto(`./query/${query._id}`)} + selectedBy={$userSelectedResourceMap[query._id]} + > + + + {/each} {/if} -
-{/if} + {/each} + {#if showNoResults} + +
+ There aren't any datasources matching that name +
+
+ {/if} +