From 23d83739b0e39183716c11486bc28623701b9611 Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Tue, 12 Jan 2021 10:28:41 +0000 Subject: [PATCH] readable to writable bindings --- .../builder/src/builderStore/store/backend.js | 2 +- .../integration/QueryParameterBuilder.svelte | 16 +++++++++++++++- .../components/integration/QueryViewer.svelte | 1 + .../src/components/integration/index.svelte | 15 +++++++++++---- .../userInterface/BindableInput.svelte | 5 +++++ .../userInterface/DataBindingDrawer/index.svelte | 2 +- .../EventsEditor/actions/ExecuteQuery.svelte | 2 +- .../userInterface/TableViewSelect.svelte | 4 +--- packages/server/src/api/routes/query.js | 3 +-- 9 files changed, 37 insertions(+), 13 deletions(-) diff --git a/packages/builder/src/builderStore/store/backend.js b/packages/builder/src/builderStore/store/backend.js index 507b4e3fe9..0ada121790 100644 --- a/packages/builder/src/builderStore/store/backend.js +++ b/packages/builder/src/builderStore/store/backend.js @@ -142,7 +142,7 @@ export const getBackendUiStore = () => { delete: async queryId => { await api.delete(`/api/queries/${queryId}`) store.update(state => { - state.datasources = state.queries.filter( + state.queries = state.queries.filter( existing => existing._id !== queryId ) if (state.selectedQueryId === queryId) { diff --git a/packages/builder/src/components/integration/QueryParameterBuilder.svelte b/packages/builder/src/components/integration/QueryParameterBuilder.svelte index 91f0eb023c..ef9a1f25a3 100644 --- a/packages/builder/src/components/integration/QueryParameterBuilder.svelte +++ b/packages/builder/src/components/integration/QueryParameterBuilder.svelte @@ -1,6 +1,10 @@
@@ -33,7 +43,11 @@ { + console.log('changing', evt.detail) + onBindingChange(parameter.name, evt.detail) + }} + value={runtimeToReadableBinding(bindings, customParams[parameter.name])} {bindings} /> {/if}
+ {query.name}
diff --git a/packages/builder/src/components/integration/index.svelte b/packages/builder/src/components/integration/index.svelte index 3876df5a09..3c370f9b19 100644 --- a/packages/builder/src/components/integration/index.svelte +++ b/packages/builder/src/components/integration/index.svelte @@ -16,11 +16,18 @@ } + + + + + {#if query.queryType === QueryTypes.SQL} - -