diff --git a/hosting/nginx.dev.conf b/hosting/nginx.dev.conf index 1ecee422cd..915125cbce 100644 --- a/hosting/nginx.dev.conf +++ b/hosting/nginx.dev.conf @@ -126,6 +126,16 @@ http { proxy_pass http://app-service; } + location /embed { + rewrite /embed/(.*) /app/$1 break; + proxy_pass http://app-service; + proxy_redirect off; + proxy_set_header Host $host; + proxy_set_header x-budibase-embed "true"; + add_header x-budibase-embed "true"; + add_header Content-Security-Policy "frame-ancestors *"; + } + location /builder { proxy_read_timeout 120s; proxy_connect_timeout 120s; diff --git a/hosting/proxy/nginx.prod.conf b/hosting/proxy/nginx.prod.conf index 001a08a9a6..9ce6b54053 100644 --- a/hosting/proxy/nginx.prod.conf +++ b/hosting/proxy/nginx.prod.conf @@ -92,6 +92,16 @@ http { proxy_pass $apps; } + location /embed { + rewrite /embed/(.*) /app/$1 break; + proxy_pass $apps; + proxy_redirect off; + proxy_set_header Host $host; + proxy_set_header x-budibase-embed "true"; + add_header x-budibase-embed "true"; + add_header Content-Security-Policy "frame-ancestors *"; + } + location = / { proxy_pass $apps; } diff --git a/packages/backend-core/src/events/publishers/serve.ts b/packages/backend-core/src/events/publishers/serve.ts index 64e24e20a7..5fb0883b0b 100644 --- a/packages/backend-core/src/events/publishers/serve.ts +++ b/packages/backend-core/src/events/publishers/serve.ts @@ -14,10 +14,15 @@ async function servedBuilder(timezone: string) { await publishEvent(Event.SERVED_BUILDER, properties) } -async function servedApp(app: App, timezone: string) { +async function servedApp( + app: App, + timezone: string, + embed: boolean | undefined +) { const properties: AppServedEvent = { appVersion: app.version, timezone, + embed, } await publishEvent(Event.SERVED_APP, properties) } diff --git a/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte b/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte index a8fa700b90..3144a7b44b 100644 --- a/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte +++ b/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte @@ -333,7 +333,7 @@ : null}>{value.title || (key === "row" ? "Table" : key)} {/if} - {#if value.type === "string" && value.enum && canShowField(key)} + {#if value.type === "string" && value.enum && canShowField(key, value)} + diff --git a/packages/builder/src/components/deploy/RevertModal.svelte b/packages/builder/src/components/deploy/RevertModal.svelte index 364add9053..a36ecb0b79 100644 --- a/packages/builder/src/components/deploy/RevertModal.svelte +++ b/packages/builder/src/components/deploy/RevertModal.svelte @@ -5,6 +5,7 @@ notifications, ModalContent, ActionButton, + Link, } from "@budibase/bbui" import { store } from "builderStore" import { API } from "api" @@ -28,16 +29,15 @@ notifications.error(`Error reverting changes: ${error}`) } } - - + export const hide = () => { + revertModal.hide() + } + + export const show = () => { + revertModal.show() + } + {#if !hideIcon && updateAvailable} - - Update available - + Update {/if} { title: "Data", route: "/builder/app/:application/data", layout: OnboardingData, - query: ".topcenternav .spectrum-Tabs-item#builder-data-tab", + query: ".topleftnav .spectrum-Tabs-item#builder-data-tab", onLoad: async () => { tourEvent(TOUR_STEP_KEYS.BUILDER_DATA_SECTION) }, @@ -45,20 +45,20 @@ const getTours = () => { title: "Design", route: "/builder/app/:application/design", layout: OnboardingDesign, - query: ".topcenternav .spectrum-Tabs-item#builder-design-tab", + query: ".topleftnav .spectrum-Tabs-item#builder-design-tab", onLoad: () => { tourEvent(TOUR_STEP_KEYS.BUILDER_DESIGN_SECTION) }, align: "left", }, { - id: TOUR_STEP_KEYS.BUILDER_AUTOMATE_SECTION, + id: TOUR_STEP_KEYS.BUILDER_AUTOMATION_SECTION, title: "Automations", - route: "/builder/app/:application/automate", - query: ".topcenternav .spectrum-Tabs-item#builder-automate-tab", + route: "/builder/app/:application/automation", + query: ".topleftnav .spectrum-Tabs-item#builder-automation-tab", body: "Once you have your app screens made, you can set up automations to fit in with your current workflow", onLoad: () => { - tourEvent(TOUR_STEP_KEYS.BUILDER_AUTOMATE_SECTION) + tourEvent(TOUR_STEP_KEYS.BUILDER_AUTOMATION_SECTION) }, align: "left", }, diff --git a/packages/builder/src/components/portal/page/SideNavItem.svelte b/packages/builder/src/components/portal/page/SideNavItem.svelte index c22b8b6113..ff627acfc5 100644 --- a/packages/builder/src/components/portal/page/SideNavItem.svelte +++ b/packages/builder/src/components/portal/page/SideNavItem.svelte @@ -4,18 +4,27 @@ export let active = false - - {text || ""} - +{#if url} + + {text || ""} + +{:else} + + + {text || ""} + +{/if} diff --git a/packages/builder/src/pages/builder/portal/overview/[appId]/access/_components/AssignmentModal.svelte b/packages/builder/src/pages/builder/portal/overview/[appId]/access/_components/AssignmentModal.svelte deleted file mode 100644 index b3aed56a48..0000000000 --- a/packages/builder/src/pages/builder/portal/overview/[appId]/access/_components/AssignmentModal.svelte +++ /dev/null @@ -1,211 +0,0 @@ - - - addData(data)} - showCloseIcon={false} - disabled={!valid} -> - {#if data.length} - - {#each data as input, index} -
-
- x._id !== Constants.Roles.PUBLIC - )} - secondaryPlaceholder="Access" - bind:primaryValue={input.id} - bind:secondaryValue={input.role} - bind:searchTerm={search} - getPrimaryOptionLabel={group => group.name} - getPrimaryOptionValue={group => group.name} - getPrimaryOptionIcon={group => group.icon} - getPrimaryOptionColour={group => group.colour} - getSecondaryOptionLabel={role => role.name} - getSecondaryOptionValue={role => role._id} - getSecondaryOptionColour={role => - RoleUtils.getRoleColour(role._id)} - /> -
-
- removeItem(index)} - /> -
-
- {/each} -
- {/if} -
- Add more -
-
- - diff --git a/packages/builder/src/pages/builder/portal/overview/[appId]/access/_components/EditableRoleRenderer.svelte b/packages/builder/src/pages/builder/portal/overview/[appId]/access/_components/EditableRoleRenderer.svelte deleted file mode 100644 index d92a522602..0000000000 --- a/packages/builder/src/pages/builder/portal/overview/[appId]/access/_components/EditableRoleRenderer.svelte +++ /dev/null @@ -1,26 +0,0 @@ - - -
- rolesContext.updateRole(e.detail, row._id)} - on:remove={() => rolesContext.removeRole(row._id)} - /> -
- - diff --git a/packages/builder/src/pages/builder/portal/overview/[appId]/access/index.svelte b/packages/builder/src/pages/builder/portal/overview/[appId]/access/index.svelte deleted file mode 100644 index 62c5da12ec..0000000000 --- a/packages/builder/src/pages/builder/portal/overview/[appId]/access/index.svelte +++ /dev/null @@ -1,271 +0,0 @@ - - - - - Access - Assign users to your app and set their access - - - - {#if $usersFetch.loaded} - -
- Users - -
- -
- You have no users assigned yet -
-
- -
- {/if} - - {#if $usersFetch.loaded && $licensing.groupsEnabled} - -
- Groups - -
- -
- You have no groups assigned yet -
-
-
- {/if} -
-
- - - - - - diff --git a/packages/builder/src/pages/builder/portal/overview/[appId]/automation-history/_components/HistoryDetailsPanel.svelte b/packages/builder/src/pages/builder/portal/overview/[appId]/automation-history/_components/HistoryDetailsPanel.svelte deleted file mode 100644 index 565c0d1f2f..0000000000 --- a/packages/builder/src/pages/builder/portal/overview/[appId]/automation-history/_components/HistoryDetailsPanel.svelte +++ /dev/null @@ -1,82 +0,0 @@ - - -{#if history} - -
- - -
- - {history.automationName} - - - {#if history.status === STOPPED_ERROR} -
- -
- {/if} - {#if exists} -
- -
- {/if} - {#key history} -
- -
- {/key} -
-{:else} - No details found -{/if} - - diff --git a/packages/builder/src/pages/builder/portal/overview/[appId]/automation-history/_components/StatusRenderer.svelte b/packages/builder/src/pages/builder/portal/overview/[appId]/automation-history/_components/StatusRenderer.svelte deleted file mode 100644 index f041faa349..0000000000 --- a/packages/builder/src/pages/builder/portal/overview/[appId]/automation-history/_components/StatusRenderer.svelte +++ /dev/null @@ -1,27 +0,0 @@ - - - - {info.message} - diff --git a/packages/builder/src/pages/builder/portal/overview/[appId]/automation-history/index.svelte b/packages/builder/src/pages/builder/portal/overview/[appId]/automation-history/index.svelte deleted file mode 100644 index 5eb8b9d965..0000000000 --- a/packages/builder/src/pages/builder/portal/overview/[appId]/automation-history/index.svelte +++ /dev/null @@ -1,263 +0,0 @@ - - - - - Automation History - View the automations your app has executed - - - -
-