From 6331299b7bf8e239dbe99d76eb9d01a7dfda46d3 Mon Sep 17 00:00:00 2001 From: Dean Date: Wed, 3 May 2023 17:26:58 +0100 Subject: [PATCH 1/6] Working commit --- .../components/integration/QueryViewer.svelte | 109 ++++++++++++++---- .../data/query/[queryId]/index.svelte | 4 +- 2 files changed, 91 insertions(+), 22 deletions(-) diff --git a/packages/builder/src/components/integration/QueryViewer.svelte b/packages/builder/src/components/integration/QueryViewer.svelte index 7a76970ecb..124531b35b 100644 --- a/packages/builder/src/components/integration/QueryViewer.svelte +++ b/packages/builder/src/components/integration/QueryViewer.svelte @@ -1,5 +1,5 @@ + { + console.log("running") + //navigateTo = null + }} +> + { + console.log("CONFIRM") + saveQuery() //needs ascertain success? + discard = true + $goto(`${navigateTo}`) + }} + onCancel={() => { + console.log("CANCEL") + discard = true + $goto(`${navigateTo}`) + }} + > + Leaving this section will mean losing and changes to your query + + +
Query {integrationInfo?.friendlyName} @@ -149,18 +199,20 @@ /> {/if} {#key query.parameters} - { - query.parameters = e.detail.map(binding => { - return { - name: binding.name, - default: binding.value, - } - }) - }} - /> +
+ { + query.parameters = e.detail.map(binding => { + return { + name: binding.name, + default: binding.value, + } + }) + }} + /> +
{/key} {/if}
@@ -203,7 +255,17 @@
Results - @@ -274,4 +336,9 @@ min-width: 150px; align-items: center; } + + .binding-wrap :global(div.container) { + padding-left: 0px; + padding-right: 0px; + } diff --git a/packages/builder/src/pages/builder/app/[application]/data/query/[queryId]/index.svelte b/packages/builder/src/pages/builder/app/[application]/data/query/[queryId]/index.svelte index 7f665c3394..fadd32ac75 100644 --- a/packages/builder/src/pages/builder/app/[application]/data/query/[queryId]/index.svelte +++ b/packages/builder/src/pages/builder/app/[application]/data/query/[queryId]/index.svelte @@ -3,8 +3,10 @@ import QueryViewer from "components/integration/QueryViewer.svelte" import RestQueryViewer from "components/integration/RestQueryViewer.svelte" import { IntegrationTypes } from "constants/backend" + import { cloneDeep } from "lodash/fp" $: query = $queries.selected + $: editableQuery = cloneDeep(query) $: datasource = $datasources.list.find(ds => ds._id === query?.datasourceId) $: isRestQuery = datasource?.source === IntegrationTypes.REST @@ -13,6 +15,6 @@ {#if isRestQuery} {:else} - + {/if} {/if} From e3dadaa22c0d4ce367b4b2ab08a38260eaf2330b Mon Sep 17 00:00:00 2001 From: Dean Date: Fri, 5 May 2023 09:10:52 +0100 Subject: [PATCH 2/6] Merge commit --- .../components/integration/QueryViewer.svelte | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/packages/builder/src/components/integration/QueryViewer.svelte b/packages/builder/src/components/integration/QueryViewer.svelte index 124531b35b..2542588f30 100644 --- a/packages/builder/src/components/integration/QueryViewer.svelte +++ b/packages/builder/src/components/integration/QueryViewer.svelte @@ -1,5 +1,5 @@