From 4a0ce14f04ba586ea9dd64eb395a3b2dee90619b Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Wed, 1 Dec 2021 13:11:35 +0000 Subject: [PATCH] Adding the ability to set a display name for any datasource/query parameter. --- .../IntegrationConfigForm.svelte | 20 +++++++++++---- .../integration/KeyValueBuilder.svelte | 6 +++-- .../integration/QueryFieldsBuilder.svelte | 25 +++++++++++++------ packages/server/src/integrations/rest.ts | 10 ++++---- 4 files changed, 41 insertions(+), 20 deletions(-) diff --git a/packages/builder/src/components/backend/DatasourceNavigator/TableIntegrationMenu/IntegrationConfigForm.svelte b/packages/builder/src/components/backend/DatasourceNavigator/TableIntegrationMenu/IntegrationConfigForm.svelte index e6e9232e52..16ddf54af4 100644 --- a/packages/builder/src/components/backend/DatasourceNavigator/TableIntegrationMenu/IntegrationConfigForm.svelte +++ b/packages/builder/src/components/backend/DatasourceNavigator/TableIntegrationMenu/IntegrationConfigForm.svelte @@ -32,20 +32,30 @@ .map(([key]) => key) let addButton + + function getDisplayName(key) { + let name + if (schema[key]?.display) { + name = schema[key].display + } else { + name = key + } + return capitalise(name) + }
{#if !creating}
- +
{/if} {#each configKeys as configKey} {#if schema[configKey].type === "object"}
- + @@ -59,12 +69,12 @@ /> {:else if schema[configKey].type === "boolean"}
- +
{:else if schema[configKey].type === "longForm"}
- +