From 657f55f0dac9400fde9576efcd4ab3297ce73973 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Thu, 6 Jan 2022 15:28:38 +0000 Subject: [PATCH 1/4] Adding a skip button for fetching plus datasource tables incase working with very large data sets and still want to perform queries. --- .../builder/src/builderStore/datasource.js | 4 ++-- .../PlusConfigForm.svelte | 24 +++++++++---------- .../modals/DatasourceConfigModal.svelte | 17 +++++++++++-- 3 files changed, 29 insertions(+), 16 deletions(-) diff --git a/packages/builder/src/builderStore/datasource.js b/packages/builder/src/builderStore/datasource.js index 61cead2e16..cfdeeac23e 100644 --- a/packages/builder/src/builderStore/datasource.js +++ b/packages/builder/src/builderStore/datasource.js @@ -23,10 +23,10 @@ function prepareData(config) { return datasource } -export async function saveDatasource(config) { +export async function saveDatasource(config, skipFetch = false) { const datasource = prepareData(config) // Create datasource - const resp = await datasources.save(datasource, datasource.plus) + const resp = await datasources.save(datasource, !skipFetch && datasource.plus) // update the tables incase data source plus await tables.fetch() diff --git a/packages/builder/src/components/backend/DatasourceNavigator/TableIntegrationMenu/PlusConfigForm.svelte b/packages/builder/src/components/backend/DatasourceNavigator/TableIntegrationMenu/PlusConfigForm.svelte index b97f23d7a3..819fb32e45 100644 --- a/packages/builder/src/components/backend/DatasourceNavigator/TableIntegrationMenu/PlusConfigForm.svelte +++ b/packages/builder/src/components/backend/DatasourceNavigator/TableIntegrationMenu/PlusConfigForm.svelte @@ -199,18 +199,18 @@ Tell budibase how your tables are related to get even more smart features. -{/if} -{#if relationshipInfo && relationshipInfo.length > 0} - openRelationshipModal(detail.from, detail.to)} - schema={relationshipSchema} - data={relationshipInfo} - allowEditColumns={false} - allowEditRows={false} - allowSelectRows={false} - /> -{:else} - No relationships configured. + {#if relationshipInfo && relationshipInfo.length > 0} +
openRelationshipModal(detail.from, detail.to)} + schema={relationshipSchema} + data={relationshipInfo} + allowEditColumns={false} + allowEditRows={false} + allowSelectRows={false} + /> + {:else} + No relationships configured. + {/if} {/if}