From 41fd10dbbe991457a780492a5c23070952259f1e Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Mon, 26 Oct 2020 17:46:20 +0000 Subject: [PATCH] Adding a way to see the deployed webhook URLs to the deployment page. --- .../BlockList/AutomationBlock.svelte | 3 +- .../automation/Shared/WebhookDisplay.svelte | 10 ++- .../CreateWebhookDeploymentModal.svelte | 73 +++++++++++++++++++ .../deploy/DeploymentHistory.svelte | 25 ++++++- 4 files changed, 104 insertions(+), 7 deletions(-) create mode 100644 packages/builder/src/components/deploy/CreateWebhookDeploymentModal.svelte diff --git a/packages/builder/src/components/automation/AutomationPanel/BlockList/AutomationBlock.svelte b/packages/builder/src/components/automation/AutomationPanel/BlockList/AutomationBlock.svelte index 54e6b2dbbf..9d48acb6e7 100644 --- a/packages/builder/src/components/automation/AutomationPanel/BlockList/AutomationBlock.svelte +++ b/packages/builder/src/components/automation/AutomationPanel/BlockList/AutomationBlock.svelte @@ -10,7 +10,6 @@ let modal - $: blockDefinitions = $automationStore.blockDefinitions $: instanceId = $backendUiStore.selectedDatabase._id $: automation = $automationStore.selectedAutomation?.automation @@ -21,7 +20,7 @@ stepId, type: blockType, }) - if (stepId === blockDefinitions.TRIGGER["WEBHOOK"].stepId) { + if (stepId === "WEBHOOK") { modal.show() } analytics.captureEvent("Added Automation Block", { diff --git a/packages/builder/src/components/automation/Shared/WebhookDisplay.svelte b/packages/builder/src/components/automation/Shared/WebhookDisplay.svelte index e0e369035d..cac9a58397 100644 --- a/packages/builder/src/components/automation/Shared/WebhookDisplay.svelte +++ b/packages/builder/src/components/automation/Shared/WebhookDisplay.svelte @@ -1,11 +1,19 @@ + + +

+ See below the list of deployed webhook URLs. +

+ {#each webhookUrls as webhookUrl} +
+
{webhookUrl.type} - {webhookUrl.name}
+ +
+ {/each} +
+ + + Learn about webhooks + +
+
+ + diff --git a/packages/builder/src/components/deploy/DeploymentHistory.svelte b/packages/builder/src/components/deploy/DeploymentHistory.svelte index 4450faf4d2..de38947985 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,14 @@

Deployment History

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