diff --git a/packages/builder/package.json b/packages/builder/package.json index 12067716e9..cc37af2b63 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -63,7 +63,7 @@ } }, "dependencies": { - "@budibase/bbui": "^1.44.1", + "@budibase/bbui": "^1.47.0", "@budibase/client": "^0.2.6", "@budibase/colorpicker": "^1.0.1", "@fortawesome/fontawesome-free": "^5.14.0", diff --git a/packages/builder/src/builderStore/store/automation/index.js b/packages/builder/src/builderStore/store/automation/index.js index e1db07053e..3f0743aa1e 100644 --- a/packages/builder/src/builderStore/store/automation/index.js +++ b/packages/builder/src/builderStore/store/automation/index.js @@ -11,12 +11,20 @@ const automationActions = store => ({ ]) const jsonResponses = await Promise.all(responses.map(x => x.json())) store.update(state => { + let selected = state.selectedAutomation?.automation state.automations = jsonResponses[0] state.blockDefinitions = { TRIGGER: jsonResponses[1].trigger, ACTION: jsonResponses[1].action, LOGIC: jsonResponses[1].logic, } + // if previously selected find the new obj and select it + if (selected) { + selected = jsonResponses[0].filter( + automation => automation._id === selected._id + ) + state.selectedAutomation = new Automation(selected[0]) + } return state }) }, diff --git a/packages/builder/src/components/automation/AutomationPanel/BlockList/AutomationBlock.svelte b/packages/builder/src/components/automation/AutomationPanel/BlockList/AutomationBlock.svelte index 2419999475..9d48acb6e7 100644 --- a/packages/builder/src/components/automation/AutomationPanel/BlockList/AutomationBlock.svelte +++ b/packages/builder/src/components/automation/AutomationPanel/BlockList/AutomationBlock.svelte @@ -1,11 +1,18 @@ + + +

+ Webhooks are for receiving data. To make them easier please use the URL + shown below and send a + POST + request to it from your other application. If you're unable to do this now + then you can skip this step, however we will not be able to configure + bindings for your later actions! +

+ + {#if finished} +

+ Request received! We found + {propCount} + bindable value{propCount > 1 ? 's' : ''}. +

+ {/if} +
+ + + Learn about webhooks + +
+
+ + diff --git a/packages/builder/src/components/automation/Shared/WebhookDisplay.svelte b/packages/builder/src/components/automation/Shared/WebhookDisplay.svelte new file mode 100644 index 0000000000..cac9a58397 --- /dev/null +++ b/packages/builder/src/components/automation/Shared/WebhookDisplay.svelte @@ -0,0 +1,64 @@ + + +
+ + copyToClipboard()}> + + +
+ + diff --git a/packages/builder/src/components/deploy/CreateWebhookDeploymentModal.svelte b/packages/builder/src/components/deploy/CreateWebhookDeploymentModal.svelte new file mode 100644 index 0000000000..4259f2ef9c --- /dev/null +++ b/packages/builder/src/components/deploy/CreateWebhookDeploymentModal.svelte @@ -0,0 +1,76 @@ + + + +

See below the list of deployed webhook URLs.

+ {#each webhookUrls as webhookUrl} +
+
{webhookUrl.type} - {webhookUrl.name}
+ +
+ {/each} + {#if webhookUrls.length === 0} +
No webhooks found.
+ {/if} +
+ + + Learn about webhooks + +
+
+ + diff --git a/packages/builder/src/components/deploy/DeploymentHistory.svelte b/packages/builder/src/components/deploy/DeploymentHistory.svelte index 4450faf4d2..2a8aabc2ca 100644 --- a/packages/builder/src/components/deploy/DeploymentHistory.svelte +++ b/packages/builder/src/components/deploy/DeploymentHistory.svelte @@ -2,9 +2,10 @@ import { onMount, onDestroy } from "svelte" import Spinner from "components/common/Spinner.svelte" import { slide } from "svelte/transition" - import { Heading, Body } from "@budibase/bbui" + import { Heading, Body, Button, Modal } from "@budibase/bbui" import api from "builderStore/api" import { notifier } from "builderStore/store/notifications" + import CreateWebhookDeploymentModal from "./CreateWebhookDeploymentModal.svelte" const DATE_OPTIONS = { fullDate: { @@ -23,6 +24,7 @@ export let appId + let modal let poll let deployments = [] let deploymentUrl = `https://${appId}.app.budi.live/${appId}` @@ -52,9 +54,12 @@

Deployment History

- - View Your Deployed App → - +
+ + View Your Deployed App → + + +
{#each deployments as deployment} @@ -80,6 +85,9 @@
{/if} + + +