@@ -161,7 +197,7 @@ export const CreateWrapperSheet = ({
onSubmit={onSubmit}
className="flex-grow flex flex-col h-full"
>
- {({ handleReset, values, initialValues, setFieldValue }: any) => {
+ {({ values, initialValues, setFieldValue }: any) => {
const hasChanges = JSON.stringify(values) !== JSON.stringify(initialValues)
const onClosePanel = () => {
@@ -236,7 +272,7 @@ export const CreateWrapperSheet = ({
- Define tables where the wrapper data will be shown.
+ Create foreign tables to query data from {wrapperMeta.label}.
@@ -261,7 +297,8 @@ export const CreateWrapperSheet = ({
- Specify schema in which the wrapper will create tables.
+ Create all foreign tables from {wrapperMeta.label} in a specified
+ schema.
@@ -366,38 +403,44 @@ export const CreateWrapperSheet = ({
Foreign Schema
- All wrapper tables will be created in the specified target schema.
+ You can query your data from the foreign tables in the specified schema
+ after the wrapper is created.
}
>
- {wrapperMeta.sourceSchemaOption && (
-
-
-
- {wrapperMeta.sourceSchemaOption.description}
-
-
- )}
+ {wrapperMeta.sourceSchemaOption &&
+ !wrapperMeta.sourceSchemaOption?.readOnly && (
+ // Hide the field if the source schema is read-only
+
+
+
+ {wrapperMeta.sourceSchemaOption.description}
+
+
+ )}
-
- Target Schema
-
-
setFieldValue('target_schema', schema)}
- onSelectCreateSchema={() => setCreateSchemaSheetOpen(true)}
+
- Be careful not to use an API exposed schema.
+ A new schema will be created. For security purposes, the wrapper tables
+ from the foreign schema cannot be created within an existing schema
@@ -411,7 +454,7 @@ export const CreateWrapperSheet = ({
type="default"
htmlType="button"
onClick={onClosePanel}
- disabled={isCreating}
+ disabled={isLoading}
>
Cancel
@@ -420,20 +463,11 @@ export const CreateWrapperSheet = ({
type="primary"
form={FORM_ID}
htmlType="submit"
- disabled={isCreating}
- loading={isCreating}
+ loading={isLoading}
>
Create wrapper
-
setCreateSchemaSheetOpen(false)}
- onSuccess={(schema) => {
- setFieldValue('target_schema', schema)
- setCreateSchemaSheetOpen(false)
- }}
- />
>
)
}}
diff --git a/apps/studio/components/interfaces/Integrations/Wrappers/WrapperRow.tsx b/apps/studio/components/interfaces/Integrations/Wrappers/WrapperRow.tsx
index fb9763e6701..e7c9c155fbe 100644
--- a/apps/studio/components/interfaces/Integrations/Wrappers/WrapperRow.tsx
+++ b/apps/studio/components/interfaces/Integrations/Wrappers/WrapperRow.tsx
@@ -107,37 +107,39 @@ const WrapperRow = ({ wrapper }: WrapperRowProps) => {
))}
-