From 9237fd71bf495bae4474714f499266a5531dd82a Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Fri, 22 Jan 2021 10:54:23 +0000 Subject: [PATCH] sensible defaults, adding popover for parameters --- .../popovers/EditQueryParamsPopover.svelte | 42 ++++ .../components/integration/QueryViewer.svelte | 19 +- .../[selectedDatasource]/[query]/index.svelte | 1 + .../[selectedDatasource]/index.svelte | 61 ++--- packages/builder/yarn.lock | 216 +--------------- packages/server/yarn.lock | 231 +----------------- packages/standard-components/yarn.lock | 5 - 7 files changed, 76 insertions(+), 499 deletions(-) create mode 100644 packages/builder/src/components/backend/DatasourceNavigator/popovers/EditQueryParamsPopover.svelte diff --git a/packages/builder/src/components/backend/DatasourceNavigator/popovers/EditQueryParamsPopover.svelte b/packages/builder/src/components/backend/DatasourceNavigator/popovers/EditQueryParamsPopover.svelte new file mode 100644 index 0000000000..038e4cf9b1 --- /dev/null +++ b/packages/builder/src/components/backend/DatasourceNavigator/popovers/EditQueryParamsPopover.svelte @@ -0,0 +1,42 @@ + + +
+ + + Add Parameters + + +
+ +
+
+
+ + \ No newline at end of file diff --git a/packages/builder/src/components/integration/QueryViewer.svelte b/packages/builder/src/components/integration/QueryViewer.svelte index 5ac3e550c1..4f17ed808d 100644 --- a/packages/builder/src/components/integration/QueryViewer.svelte +++ b/packages/builder/src/components/integration/QueryViewer.svelte @@ -16,6 +16,7 @@ import { FIELDS } from "constants/backend" import IntegrationQueryEditor from "components/integration/index.svelte" import ExternalDataSourceTable from "components/backend/DataTable/ExternalDataSourceTable.svelte" + import EditQueryParamsPopover from "components/backend/DatasourceNavigator/popovers/EditQueryParamsPopover.svelte" import { backendUiStore } from "builderStore" const PREVIEW_HEADINGS = [ @@ -40,6 +41,7 @@ let tab = "JSON" let parameters let data = [] + let popover $: datasource = $backendUiStore.datasources.find( ds => ds._id === query.datasourceId @@ -132,25 +134,20 @@ {query.name} {#if config}
- {#each Object.keys(config) as queryVerb} -
{ - query.queryVerb = queryVerb - }}> - {queryVerb} -
- {/each}
+ {#if query.queryVerb} {/if} +