diff --git a/packages/builder/src/components/backend/DatasourceNavigator/TableIntegrationMenu/RestAuthenticationBuilder.svelte b/packages/builder/src/components/backend/DatasourceNavigator/TableIntegrationMenu/RestAuthenticationBuilder.svelte deleted file mode 100644 index 129acad852..0000000000 --- a/packages/builder/src/components/backend/DatasourceNavigator/TableIntegrationMenu/RestAuthenticationBuilder.svelte +++ /dev/null @@ -1,29 +0,0 @@ - - -
- {#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/rest/RestExtraConfigForm.svelte similarity index 89% rename from packages/builder/src/components/backend/DatasourceNavigator/TableIntegrationMenu/RestExtraConfigForm.svelte rename to packages/builder/src/components/backend/DatasourceNavigator/TableIntegrationMenu/rest/RestExtraConfigForm.svelte index c63872a1ef..c77f2900b0 100644 --- a/packages/builder/src/components/backend/DatasourceNavigator/TableIntegrationMenu/RestExtraConfigForm.svelte +++ b/packages/builder/src/components/backend/DatasourceNavigator/TableIntegrationMenu/rest/RestExtraConfigForm.svelte @@ -1,7 +1,7 @@ + +{renderAuthType()} diff --git a/packages/builder/src/components/backend/DatasourceNavigator/TableIntegrationMenu/rest/auth/RestAuthenticationBuilder.svelte b/packages/builder/src/components/backend/DatasourceNavigator/TableIntegrationMenu/rest/auth/RestAuthenticationBuilder.svelte new file mode 100644 index 0000000000..4d932869e7 --- /dev/null +++ b/packages/builder/src/components/backend/DatasourceNavigator/TableIntegrationMenu/rest/auth/RestAuthenticationBuilder.svelte @@ -0,0 +1,108 @@ + + + + + + + The authorization header will be automatically generated when you + sendthe request. + + + + {/if} + {#if currentConfig.type === AUTH_TYPES.BEARER} + + {/if} + + + + + + {#if authConfigs && authConfigs.length > 0} +
openConfigModal(detail)} + {schema} + data={authConfigs} + allowEditColumns={false} + allowEditRows={false} + allowSelectRows={false} + customRenderers={[{ column: "type", component: AuthTypeRenderer }]} + /> + {/if} +
+ openConfigModal()} con="Add" + >Add authentication +
+ + + diff --git a/packages/builder/src/components/backend/DatasourceNavigator/TableIntegrationMenu/rest/auth/authTypes.js b/packages/builder/src/components/backend/DatasourceNavigator/TableIntegrationMenu/rest/auth/authTypes.js new file mode 100644 index 0000000000..854391d6ce --- /dev/null +++ b/packages/builder/src/components/backend/DatasourceNavigator/TableIntegrationMenu/rest/auth/authTypes.js @@ -0,0 +1,15 @@ +export const AUTH_TYPES = { + BEARER: "bearer", + BASIC: "basic", +} + +export const AUTH_TYPE_LABELS = [ + { + label: "Bearer Token", + value: AUTH_TYPES.BEARER, + }, + { + label: "Basic Auth", + value: AUTH_TYPES.BASIC, + }, +] diff --git a/packages/builder/src/pages/builder/app/[application]/data/datasource/[selectedDatasource]/index.svelte b/packages/builder/src/pages/builder/app/[application]/data/datasource/[selectedDatasource]/index.svelte index 0e046e26f7..87ff9691f8 100644 --- a/packages/builder/src/pages/builder/app/[application]/data/datasource/[selectedDatasource]/index.svelte +++ b/packages/builder/src/pages/builder/app/[application]/data/datasource/[selectedDatasource]/index.svelte @@ -12,7 +12,7 @@ } from "@budibase/bbui" import { datasources, integrations, queries, tables } from "stores/backend" import IntegrationConfigForm from "components/backend/DatasourceNavigator/TableIntegrationMenu/IntegrationConfigForm.svelte" - import RestExtraConfigForm from "components/backend/DatasourceNavigator/TableIntegrationMenu/RestExtraConfigForm.svelte" + import RestExtraConfigForm from "components/backend/DatasourceNavigator/TableIntegrationMenu/rest/RestExtraConfigForm.svelte" import PlusConfigForm from "components/backend/DatasourceNavigator/TableIntegrationMenu/PlusConfigForm.svelte" import ICONS from "components/backend/DatasourceNavigator/icons" import CapitaliseRenderer from "components/common/renderers/CapitaliseRenderer.svelte"