From 999199dcf6a895e01192015db54237112408cbf6 Mon Sep 17 00:00:00 2001 From: Peter Clement Date: Mon, 11 Apr 2022 10:26:59 +0100 Subject: [PATCH] Add handling for failure conditions --- .../FlowChart/FlowItem.svelte | 12 +- .../FlowChart/ResultsModal.svelte | 17 +- .../SetupPanel/AutomationBlockSetup.svelte | 54 ++++-- packages/server/src/automations/steps/loop.js | 5 - packages/server/src/threads/automation.js | 173 +++++++++++++++--- 5 files changed, 205 insertions(+), 56 deletions(-) diff --git a/packages/builder/src/components/automation/AutomationBuilder/FlowChart/FlowItem.svelte b/packages/builder/src/components/automation/AutomationBuilder/FlowChart/FlowItem.svelte index 5a00b3e790..d1659e51d1 100644 --- a/packages/builder/src/components/automation/AutomationBuilder/FlowChart/FlowItem.svelte +++ b/packages/builder/src/components/automation/AutomationBuilder/FlowChart/FlowItem.svelte @@ -92,7 +92,7 @@ ) loopBlock.blockToLoop = block.id block.loopBlock = loopBlock.id - automationStore.actions.addBlockToAutomation(loopBlock, blockIdx - 1) + automationStore.actions.addBlockToAutomation(loopBlock, blockIdx) await automationStore.actions.save( $automationStore.selectedAutomation?.automation ) @@ -131,16 +131,6 @@
- {#if testResult && testResult[0]} -
resultsModal.show()}> - View response -
- {/if} -
{ diff --git a/packages/builder/src/components/automation/AutomationBuilder/FlowChart/ResultsModal.svelte b/packages/builder/src/components/automation/AutomationBuilder/FlowChart/ResultsModal.svelte index 7dfdff20a7..67c7f493e8 100644 --- a/packages/builder/src/components/automation/AutomationBuilder/FlowChart/ResultsModal.svelte +++ b/packages/builder/src/components/automation/AutomationBuilder/FlowChart/ResultsModal.svelte @@ -1,5 +1,5 @@