diff --git a/packages/builder/package.json b/packages/builder/package.json index 25c0f9aa4a..cc37af2b63 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -63,7 +63,7 @@ } }, "dependencies": { - "@budibase/bbui": "^1.46.0", + "@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/AutomationBuilder/BlockList.svelte b/packages/builder/src/components/automation/AutomationBuilder/BlockList.svelte index cc38928408..de3e9660ad 100644 --- a/packages/builder/src/components/automation/AutomationBuilder/BlockList.svelte +++ b/packages/builder/src/components/automation/AutomationBuilder/BlockList.svelte @@ -1,9 +1,10 @@ @@ -91,6 +95,9 @@ {/each} + + + 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..5b9293bc8c --- /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} + + +