From 50eabc82d0a0998b54021118e32a413083b8239f Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Fri, 19 Feb 2021 12:07:37 +0000 Subject: [PATCH] prevent editing of headers in params --- .../PropertyControls/DatasourceSelect.svelte | 1 + .../integration/KeyValueBuilder.svelte | 11 ++++-- .../components/integration/QueryEditor.svelte | 4 +++ .../integration/QueryFieldsBuilder.svelte | 4 +-- .../components/integration/QueryViewer.svelte | 34 ++++--------------- .../src/components/integration/index.svelte | 6 ---- .../pages/[application]/data/_layout.svelte | 9 ++--- 7 files changed, 25 insertions(+), 44 deletions(-) diff --git a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/DatasourceSelect.svelte b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/DatasourceSelect.svelte index 75702b7cdb..241b50accf 100644 --- a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/DatasourceSelect.svelte +++ b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/DatasourceSelect.svelte @@ -109,6 +109,7 @@
ds._id === value.datasourceId)} query={value} schema={fetchDatasourceSchema(value)} editable={false} /> diff --git a/packages/builder/src/components/integration/KeyValueBuilder.svelte b/packages/builder/src/components/integration/KeyValueBuilder.svelte index 1d3fb5e8bb..c8ee3a9897 100644 --- a/packages/builder/src/components/integration/KeyValueBuilder.svelte +++ b/packages/builder/src/components/integration/KeyValueBuilder.svelte @@ -2,6 +2,7 @@ import { Button, Input } from "@budibase/bbui" export let object = {} + export let readOnly let fields = Object.entries(object).map(([name, value]) => ({ name, value })) @@ -21,14 +22,18 @@ -
+
{#each fields as field, idx} - deleteEntry(idx)} /> + {#if !readOnly} + deleteEntry(idx)} /> + {/if} {/each}
- +{#if !readOnly} + +{/if} diff --git a/packages/builder/src/pages/[application]/data/_layout.svelte b/packages/builder/src/pages/[application]/data/_layout.svelte index b0e1d17595..22c4751a40 100644 --- a/packages/builder/src/pages/[application]/data/_layout.svelte +++ b/packages/builder/src/pages/[application]/data/_layout.svelte @@ -27,9 +27,10 @@