From 76868c1bbb15179e1e1387c3da96ae6fb174fd97 Mon Sep 17 00:00:00 2001 From: Mel O'Hagan Date: Tue, 3 May 2022 11:50:16 +0100 Subject: [PATCH 001/226] Pass through type when creating internal table --- .../backend/TableNavigator/modals/CreateTableModal.svelte | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/builder/src/components/backend/TableNavigator/modals/CreateTableModal.svelte b/packages/builder/src/components/backend/TableNavigator/modals/CreateTableModal.svelte index a3b7ca81a6..7830fd0246 100644 --- a/packages/builder/src/components/backend/TableNavigator/modals/CreateTableModal.svelte +++ b/packages/builder/src/components/backend/TableNavigator/modals/CreateTableModal.svelte @@ -45,6 +45,8 @@ name, schema: addAutoColumns(name, dataImport.schema || {}), dataImport, + type: "internal", + sourceId: "bb_internal", } // Only set primary display if defined From 45522f456e8d84966fbe0640fb0ce18094e7ef19 Mon Sep 17 00:00:00 2001 From: Kacper Date: Mon, 9 May 2022 13:44:10 +0200 Subject: [PATCH 002/226] Allow to use select with radio buttons for boolean field type --- .../client/src/components/app/forms/optionsParser.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/client/src/components/app/forms/optionsParser.js b/packages/client/src/components/app/forms/optionsParser.js index e670ccb076..bd69967731 100644 --- a/packages/client/src/components/app/forms/optionsParser.js +++ b/packages/client/src/components/app/forms/optionsParser.js @@ -40,6 +40,15 @@ export const getOptions = ( // Extract custom options if (optionsSource === "custom" && customOptions) { + customOptions.forEach(option => { + if (typeof option.value === "string") { + if (option.value.toLowerCase() === "true") { + option.value = true + } else if (option.value.toLowerCase() === "false") { + option.value = false + } + } + }) return customOptions } From f58118b52d57847ac7538df6d99223916f88642c Mon Sep 17 00:00:00 2001 From: Peter Clement Date: Mon, 9 May 2022 16:50:43 +0100 Subject: [PATCH 003/226] Add test data sidebar and componentize part of the flow item for this purpose --- .../FlowChart/FlowItem.svelte | 72 +-------- .../FlowChart/FlowItemTitle.svelte | 117 +++++++++++++++ .../FlowChart/TestDataModal.svelte | 1 + .../AutomationBuilder/TestPanel.svelte | 137 ++++++++++++++++++ .../app/[application]/automate/_layout.svelte | 26 +++- 5 files changed, 282 insertions(+), 71 deletions(-) create mode 100644 packages/builder/src/components/automation/AutomationBuilder/FlowChart/FlowItemTitle.svelte create mode 100644 packages/builder/src/components/automation/AutomationBuilder/TestPanel.svelte diff --git a/packages/builder/src/components/automation/AutomationBuilder/FlowChart/FlowItem.svelte b/packages/builder/src/components/automation/AutomationBuilder/FlowChart/FlowItem.svelte index 532e0ff068..3506444ca8 100644 --- a/packages/builder/src/components/automation/AutomationBuilder/FlowChart/FlowItem.svelte +++ b/packages/builder/src/components/automation/AutomationBuilder/FlowChart/FlowItem.svelte @@ -1,30 +1,27 @@ + +
+
{ + blockComplete = !blockComplete + showParameters = { complete: !showParameters?.complete, id: block.id } + }} + class="splitHeader" + > +
+ {#if externalActions[block.stepId]} + {externalActions[block.stepId].name} + {:else} + + + + {/if} +
+ {#if isTrigger} + When this happens: + {:else} + Do this: + {/if} + + {block?.name?.toUpperCase() || ""} +
+
+
+ {#if showTestStatus && testResult && testResult[0]} +
resultsModal.show()}> + {testResult[0].outputs?.success || isTrigger + ? "Success" + : "Error"} +
+ {/if} +
{ + onSelect(block) + }} + > + +
+
+
+
+ + + + + + diff --git a/packages/builder/src/components/automation/AutomationBuilder/FlowChart/TestDataModal.svelte b/packages/builder/src/components/automation/AutomationBuilder/FlowChart/TestDataModal.svelte index ffd59b4e6a..fecd0fcc7e 100644 --- a/packages/builder/src/components/automation/AutomationBuilder/FlowChart/TestDataModal.svelte +++ b/packages/builder/src/components/automation/AutomationBuilder/FlowChart/TestDataModal.svelte @@ -51,6 +51,7 @@ $automationStore.selectedAutomation?.automation, testData ) + $automationStore.selectedAutomation.automation.showTestPanel = true } catch (error) { notifications.error("Error testing notification") } diff --git a/packages/builder/src/components/automation/AutomationBuilder/TestPanel.svelte b/packages/builder/src/components/automation/AutomationBuilder/TestPanel.svelte new file mode 100644 index 0000000000..4c0dea3958 --- /dev/null +++ b/packages/builder/src/components/automation/AutomationBuilder/TestPanel.svelte @@ -0,0 +1,137 @@ + + +
+
+ +
Test Details
+
+
+ { + $automationStore.selectedAutomation.automation.showTestPanel = false + await automationStore.actions.save( + $automationStore.selectedAutomation?.automation + ) + }} + hoverable + name="Close" + /> +
+
+ + + +
+ {#each blocks as block, idx} +
+ {#if block.stepId !== "LOOP"} + + {#if showParameters?.complete && block?.id === showParameters?.id} + + +
+ + +
+