1
0
Fork 0
mirror of synced 2024-06-28 02:50:50 +12:00

Adding concept of internal and external actions.

This commit is contained in:
mike12345567 2021-09-14 12:40:19 +01:00
parent 458db567ea
commit e94c629bab
17 changed files with 26 additions and 5 deletions

View file

@ -24,7 +24,7 @@ context("Create a automation", () => {
})
// Create action
cy.contains("Action").click()
cy.contains("Internal").click()
cy.contains("Create Row").click()
cy.get(".setup").within(() => {
cy.get(".spectrum-Picker-label").click()

View file

@ -14,15 +14,17 @@
disabled: hasTrigger,
},
{
label: "Action",
label: "Internal",
value: "ACTION",
internal: true,
icon: "Actions",
disabled: !hasTrigger,
},
{
label: "Logic",
value: "LOGIC",
icon: "Filter",
label: "External",
value: "ACTION",
internal: false,
icon: "Extension",
disabled: !hasTrigger,
},
]
@ -32,9 +34,13 @@
let popover
let webhookModal
$: selectedTab = selectedIndex == null ? null : tabs[selectedIndex].value
$: selectedInternal =
selectedIndex == null ? null : tabs[selectedIndex].internal
$: anchor = selectedIndex === -1 ? null : anchors[selectedIndex]
$: blocks = sortBy(entry => entry[1].name)(
Object.entries($automationStore.blockDefinitions[selectedTab] ?? {})
).filter(
entry => selectedInternal == null || entry[1].internal === selectedInternal
)
function onChangeTab(idx) {

View file

@ -7,6 +7,7 @@ exports.definition = {
icon: "ri-terminal-box-line",
description: "Run a bash script",
type: "ACTION",
internal: true,
stepId: "EXECUTE_BASH",
inputs: {},
schema: {

View file

@ -9,6 +9,7 @@ exports.definition = {
icon: "ri-save-3-line",
description: "Add a row to your database",
type: "ACTION",
internal: true,
stepId: "CREATE_ROW",
inputs: {},
schema: {

View file

@ -6,6 +6,7 @@ exports.definition = {
tagline: "Delay for {{inputs.time}} milliseconds",
description: "Delay the automation until an amount of time has passed",
stepId: "DELAY",
internal: true,
inputs: {},
schema: {
inputs: {

View file

@ -9,6 +9,7 @@ exports.definition = {
tagline: "Delete a {{inputs.enriched.table.name}} row",
type: "ACTION",
stepId: "DELETE_ROW",
internal: true,
inputs: {},
schema: {
inputs: {

View file

@ -11,6 +11,7 @@ exports.definition = {
icon: "ri-discord-line",
stepId: "discord",
type: "ACTION",
internal: false,
inputs: {},
schema: {
inputs: {

View file

@ -8,6 +8,7 @@ exports.definition = {
description: "Execute a query in an external data connector",
type: "ACTION",
stepId: "EXECUTE_QUERY",
internal: true,
inputs: {},
schema: {
inputs: {

View file

@ -7,6 +7,7 @@ exports.definition = {
icon: "ri-terminal-box-line",
description: "Run a piece of JavaScript code in your automation",
type: "ACTION",
internal: true,
stepId: "EXECUTE_SCRIPT",
inputs: {},
schema: {

View file

@ -21,6 +21,7 @@ exports.definition = {
icon: "ri-git-branch-line",
description: "Filter any automations which do not meet certain conditions",
type: "LOGIC",
internal: true,
stepId: "FILTER",
inputs: {
condition: FilterConditions.EQUALS,

View file

@ -9,6 +9,7 @@ exports.definition = {
icon: "ri-shut-down-line",
stepId: "integromat",
type: "ACTION",
internal: false,
inputs: {},
schema: {
inputs: {

View file

@ -23,6 +23,7 @@ exports.definition = {
icon: "ri-send-plane-line",
description: "Send a request of specified method to a URL",
type: "ACTION",
internal: true,
stepId: "OUTGOING_WEBHOOK",
inputs: {
requestMethod: "POST",

View file

@ -6,6 +6,7 @@ exports.definition = {
icon: "ri-mail-open-line",
name: "Send Email (SMTP)",
type: "ACTION",
internal: true,
stepId: "SEND_EMAIL_SMTP",
inputs: {},
schema: {

View file

@ -10,6 +10,7 @@ exports.definition = {
icon: "ri-server-line",
description: "Logs the given text to the server (using console.log)",
type: "ACTION",
internal: true,
stepId: "SERVER_LOG",
inputs: {
text: "",

View file

@ -8,6 +8,7 @@ exports.definition = {
icon: "ri-slack-line",
stepId: "slack",
type: "ACTION",
internal: false,
inputs: {},
schema: {
inputs: {

View file

@ -7,6 +7,7 @@ exports.definition = {
icon: "ri-refresh-line",
description: "Update a row in your database",
type: "ACTION",
internal: true,
stepId: "UPDATE_ROW",
inputs: {},
schema: {

View file

@ -5,6 +5,7 @@ exports.definition = {
name: "Zapier Webhook",
stepId: "zapier",
type: "ACTION",
internal: false,
description: "Trigger a Zapier Zap via webhooks",
tagline: "Trigger a Zapier Zap",
icon: "ri-flashlight-line",