From b15f003c8c6a02b70e3152ba0dafc00ab5290e81 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Tue, 11 Jan 2022 16:54:43 +0000 Subject: [PATCH 1/2] Updating to use automation setup to use action button instead of custom chevron div and using the action button in the automation code editor so that bindings can be hidden/shown if they are taking up too much of screen. --- .../FlowChart/FlowItem.svelte | 18 +++++++----------- .../SetupPanel/AutomationBlockSetup.svelte | 13 ++++++++++++- 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/packages/builder/src/components/automation/AutomationBuilder/FlowChart/FlowItem.svelte b/packages/builder/src/components/automation/AutomationBuilder/FlowChart/FlowItem.svelte index 7f379ba138..38e59419bb 100644 --- a/packages/builder/src/components/automation/AutomationBuilder/FlowChart/FlowItem.svelte +++ b/packages/builder/src/components/automation/AutomationBuilder/FlowChart/FlowItem.svelte @@ -9,6 +9,7 @@ Modal, Button, StatusLight, + ActionButton, } from "@budibase/bbui" import AutomationBlockSetup from "../../SetupPanel/AutomationBlockSetup.svelte" import CreateWebhookModal from "components/automation/Shared/CreateWebhookModal.svelte" @@ -119,19 +120,13 @@
-
{ - setupToggled = !setupToggled - }} - class="center-items" + (setupToggled = !setupToggled)} + quiet + icon={setupToggled ? "ChevronDown" : "ChevronRight"} > - {#if setupToggled} - - {:else} - - {/if} Setup -
+ {#if !isTrigger}
deleteStep()}> @@ -187,6 +182,7 @@ .splitHeader { display: flex; justify-content: space-between; + align-items: center; } .iconAlign { padding: 0 0 0 var(--spacing-m); diff --git a/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte b/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte index d648b3f989..928897d6f5 100644 --- a/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte +++ b/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte @@ -10,6 +10,7 @@ ActionButton, Drawer, Modal, + Detail, } from "@budibase/bbui" import CreateWebhookModal from "components/automation/Shared/CreateWebhookModal.svelte" @@ -37,6 +38,7 @@ let drawer let tempFilters = lookForFilters(schemaProperties) || [] let fillWidth = true + let codeBindingOpen = false $: stepId = block.stepId $: bindings = getAvailableBindings( @@ -233,7 +235,16 @@ onChange(e, key)} value={inputData[key]} /> {:else if value.customType === "code"} -
{JSON.stringify(bindings, null, 2)}
+ (codeBindingOpen = !codeBindingOpen)} + quiet + icon={codeBindingOpen ? "ChevronDown" : "ChevronRight"} + > + Bindings + + {#if codeBindingOpen} +
{JSON.stringify(bindings, null, 2)}
+ {/if} { From 44f9ae0682a1c773b216b6b77183799dd2776889 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Tue, 11 Jan 2022 17:14:04 +0000 Subject: [PATCH 2/2] Fixing issue where any two automations steps of the same type executed in the same automation would have the same response output in the frontend, this was a visual bug. Also fixing an issue introduced by REST update that broke the query controller. --- .../automation/AutomationBuilder/FlowChart/FlowItem.svelte | 2 +- packages/server/src/automations/steps/executeQuery.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/builder/src/components/automation/AutomationBuilder/FlowChart/FlowItem.svelte b/packages/builder/src/components/automation/AutomationBuilder/FlowChart/FlowItem.svelte index 38e59419bb..fe94b7e63f 100644 --- a/packages/builder/src/components/automation/AutomationBuilder/FlowChart/FlowItem.svelte +++ b/packages/builder/src/components/automation/AutomationBuilder/FlowChart/FlowItem.svelte @@ -28,7 +28,7 @@ let blockComplete $: testResult = $automationStore.selectedAutomation.testResults?.steps.filter( - step => step.stepId === block.stepId + step => (block.id ? step.id === block.id : step.stepId === block.stepId) ) $: isTrigger = block.type === "TRIGGER" diff --git a/packages/server/src/automations/steps/executeQuery.js b/packages/server/src/automations/steps/executeQuery.js index 0fa8661561..99c2c40783 100644 --- a/packages/server/src/automations/steps/executeQuery.js +++ b/packages/server/src/automations/steps/executeQuery.js @@ -72,7 +72,7 @@ exports.run = async function ({ inputs, appId, emitter }) { }) try { - await queryController.execute(ctx) + await queryController.executeV1(ctx) const { data, ...rest } = ctx.body return { response: data,