This commit is contained in:
mike12345567 2020-10-26 17:47:03 +00:00
parent 41fd10dbbe
commit d7196cfd3a
5 changed files with 22 additions and 16 deletions

View File

@ -78,7 +78,7 @@
{/if} {/if}
</div> </div>
{/each} {/each}
{#if stepId === "WEBHOOK"} {#if stepId === 'WEBHOOK'}
<Button wide secondary on:click={() => webhookModal.show()}> <Button wide secondary on:click={() => webhookModal.show()}>
Setup webhook Setup webhook
</Button> </Button>

View File

@ -62,7 +62,9 @@
</header> </header>
<div class="content"> <div class="content">
{#if $automationStore.selectedBlock} {#if $automationStore.selectedBlock}
<AutomationBlockSetup bind:block={$automationStore.selectedBlock} webhookModal={webhookModal} /> <AutomationBlockSetup
bind:block={$automationStore.selectedBlock}
{webhookModal} />
{:else if $automationStore.selectedAutomation} {:else if $automationStore.selectedAutomation}
<div class="block-label">Automation <b>{automation.name}</b></div> <div class="block-label">Automation <b>{automation.name}</b></div>
<Button secondary wide on:click={testAutomation}>Test Automation</Button> <Button secondary wide on:click={testAutomation}>Test Automation</Button>

View File

@ -48,13 +48,19 @@
cancelText="Skip"> cancelText="Skip">
<p> <p>
Webhooks are for receiving data. To make them easier please use the URL Webhooks are for receiving data. To make them easier please use the URL
shown below and send a <code>POST</code> request to it from your other application. shown below and send a
If you're unable to do this now then you can skip this step, however we <code>POST</code>
will not be able to configure bindings for your later actions! 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!
</p> </p>
<WebhookDisplay value={schemaURL} /> <WebhookDisplay value={schemaURL} />
{#if finished} {#if finished}
<p class="finished-text">Request received! We found {propCount} bindable value{propCount > 1 ? "s" : ""}.</p> <p class="finished-text">
Request received! We found
{propCount}
bindable value{propCount > 1 ? 's' : ''}.
</p>
{/if} {/if}
<div slot="footer"> <div slot="footer">
<a target="_blank" href="https://docs.budibase.com/automate/steps/triggers"> <a target="_blank" href="https://docs.budibase.com/automate/steps/triggers">

View File

@ -13,18 +13,18 @@
webhookUrls = automations.map(automation => { webhookUrls = automations.map(automation => {
const trigger = automation.definition.trigger const trigger = automation.definition.trigger
if (trigger?.stepId === "WEBHOOK" && trigger.inputs) { if (trigger?.stepId === "WEBHOOK" && trigger.inputs) {
return {type: "Automation", name: automation.name, url: trigger.inputs.triggerUrl} return {
type: "Automation",
name: automation.name,
url: trigger.inputs.triggerUrl,
}
} }
}) })
}) })
</script> </script>
<ModalContent <ModalContent title="Webhook Endpoints" confirmText="Done">
title="Webhook Endpoints" <p>See below the list of deployed webhook URLs.</p>
confirmText="Done">
<p>
See below the list of deployed webhook URLs.
</p>
{#each webhookUrls as webhookUrl} {#each webhookUrls as webhookUrl}
<div> <div>
<h5>{webhookUrl.type} - {webhookUrl.name}</h5> <h5>{webhookUrl.type} - {webhookUrl.name}</h5>

View File

@ -58,9 +58,7 @@
<a target="_blank" href={`https://${appId}.app.budi.live/${appId}`}> <a target="_blank" href={`https://${appId}.app.budi.live/${appId}`}>
View Your Deployed App → View Your Deployed App →
</a> </a>
<Button primary on:click={() => modal.show()}> <Button primary on:click={() => modal.show()}>View webhooks</Button>
View webhooks
</Button>
</div> </div>
</header> </header>
<div class="deployment-list"> <div class="deployment-list">