From 720b828bee939e197eeb7174d25ac6ed2dabcaa8 Mon Sep 17 00:00:00 2001 From: Rory Powell Date: Wed, 8 Dec 2021 15:27:58 +0000 Subject: [PATCH] Render table of auth configs and linting --- .../PlusConfigForm.svelte | 2 +- .../RestAuthenticationBuilder.svelte | 29 +++++++++++++++ .../RestExtraConfigForm.svelte | 20 +++++++++-- .../{ => renderers}/ArrayRenderer.svelte | 0 .../renderers/CapitaliseRenderer.svelte} | 0 .../[selectedDatasource]/index.svelte | 6 ++-- .../src/api/controllers/query/import/index.ts | 2 +- .../query/import/sources/base/index.ts | 1 - .../controllers/query/import/sources/curl.ts | 2 +- .../src/integrations/base/IntegrationBase.ts | 8 ++--- packages/server/src/integrations/rest.ts | 35 ++++++++++++------- .../src/integrations/tests/rest.spec.js | 9 ++--- 12 files changed, 86 insertions(+), 28 deletions(-) create mode 100644 packages/builder/src/components/backend/DatasourceNavigator/TableIntegrationMenu/RestAuthenticationBuilder.svelte rename packages/builder/src/components/common/{ => renderers}/ArrayRenderer.svelte (100%) rename packages/builder/src/{pages/builder/app/[application]/data/datasource/[selectedDatasource]/_components/VerbRenderer.svelte => components/common/renderers/CapitaliseRenderer.svelte} (100%) diff --git a/packages/builder/src/components/backend/DatasourceNavigator/TableIntegrationMenu/PlusConfigForm.svelte b/packages/builder/src/components/backend/DatasourceNavigator/TableIntegrationMenu/PlusConfigForm.svelte index 01ba071a3f..f736d29bee 100644 --- a/packages/builder/src/components/backend/DatasourceNavigator/TableIntegrationMenu/PlusConfigForm.svelte +++ b/packages/builder/src/components/backend/DatasourceNavigator/TableIntegrationMenu/PlusConfigForm.svelte @@ -12,7 +12,7 @@ import { datasources, integrations, tables } from "stores/backend" import CreateEditRelationship from "components/backend/Datasources/CreateEditRelationship.svelte" import CreateExternalTableModal from "./CreateExternalTableModal.svelte" - import ArrayRenderer from "components/common/ArrayRenderer.svelte" + import ArrayRenderer from "components/common/renderers/ArrayRenderer.svelte" import ConfirmDialog from "components/common/ConfirmDialog.svelte" import { goto } from "@roxi/routify" diff --git a/packages/builder/src/components/backend/DatasourceNavigator/TableIntegrationMenu/RestAuthenticationBuilder.svelte b/packages/builder/src/components/backend/DatasourceNavigator/TableIntegrationMenu/RestAuthenticationBuilder.svelte new file mode 100644 index 0000000000..129acad852 --- /dev/null +++ b/packages/builder/src/components/backend/DatasourceNavigator/TableIntegrationMenu/RestAuthenticationBuilder.svelte @@ -0,0 +1,29 @@ + + +
+ {#if authConfigs && authConfigs.length > 0} +
+ + + {/if} + + + diff --git a/packages/builder/src/components/backend/DatasourceNavigator/TableIntegrationMenu/RestExtraConfigForm.svelte b/packages/builder/src/components/backend/DatasourceNavigator/TableIntegrationMenu/RestExtraConfigForm.svelte index ce3881d82c..c63872a1ef 100644 --- a/packages/builder/src/components/backend/DatasourceNavigator/TableIntegrationMenu/RestExtraConfigForm.svelte +++ b/packages/builder/src/components/backend/DatasourceNavigator/TableIntegrationMenu/RestExtraConfigForm.svelte @@ -1,6 +1,7 @@ -
+
Headers Optional @@ -30,8 +31,23 @@
+ +
+
+ Authentication + Optional +
+
+ + Create an authentication config that can be shared with queries. + + +
+ Add authentication +
+