feat: Add variables feature (#5602)

* feat: add variables db models and migrations

* feat: variables api endpoints

* feat: add $variables to expressions

* test: fix ActiveWorkflowRunner tests failing

* test: a different fix for the tests broken by $variables

* feat: variables licensing

* fix: could create one extra variable than licensed for

* feat: Add Variables UI page and $vars global property (#5750)

* feat: add support for row slot to datatable

* feat: add variables create, read, update, delete

* feat: add vars autocomplete

* chore: remove alert

* feat: add variables autocomplete for code and expressions

* feat: add tests for variable components

* feat: add variables search and sort

* test: update tests for variables view

* chore: fix test and linting issue

* refactor: review changes

* feat: add variable creation telemetry

* fix: Improve variables listing and disabled case, fix resource sorting (no-changelog) (#5903)

* fix: Improve variables disabled experience and fix sorting

* fix: update action box margin

* test: update tests for variables row and datatable

* fix: Add ee controller to base controller

* fix: variables.ee routes not being added

* feat: add variables validation

* fix: fix vue-fragment bug that breaks everything

* chore: Update lock

* feat: Add variables input validation and permissions (no-changelog) (#5910)

* feat: add input validation

* feat: handle variables view for non-instance-owner users

* test: update variables tests

* fix: fix data-testid pattern

* feat: improve overflow styles

* test: fix variables row snapshot

* feat: update sorting to take newly created variables into account

* fix: fix list layout overflow

* fix: fix adding variables on page other than 1. fix validation

* feat: add docs link

* fix: fix default displayName function for resource-list-layout

* feat: improve vars expressions ux, cm-tooltip

* test: fix datatable test

* feat: add MATCH_REGEX validation rule

* fix: overhaul how datatable pagination selector works

* feat: update  completer description

* fix: conditionally update usage syntax based on key validation

* test: update datatable snapshot

* fix: fix variables-row button margins

* fix: fix pagination overflow

* test: Fix broken test

* test: Update snapshot

* fix: Remove duplicate declaration

* feat: add custom variables icon

---------

Co-authored-by: Alex Grozav <alex@grozav.com>
Co-authored-by: Omar Ajoue <krynble@gmail.com>
This commit is contained in:
Val
2023-04-18 11:41:55 +01:00
committed by GitHub
parent 1555387ece
commit 1bb987140a
94 changed files with 2925 additions and 200 deletions

View File

@@ -142,6 +142,8 @@
"codeNodeEditor.completer.$prevNode.runIndex": "The run of the node providing input data to the current one",
"codeNodeEditor.completer.$runIndex": "The index of the current run of this node",
"codeNodeEditor.completer.$today": "A timestamp representing the current day (at midnight, as a Luxon object)",
"codeNodeEditor.completer.$vars": "The variables defined in your instance",
"codeNodeEditor.completer.$vars.varName": "Variable set on this n8n instance. All variables evaluate to strings.",
"codeNodeEditor.completer.$workflow": "Information about the workflow",
"codeNodeEditor.completer.$workflow.active": "Whether the workflow is active or not (boolean)",
"codeNodeEditor.completer.$workflow.id": "The ID of the workflow",
@@ -595,6 +597,7 @@
"mainSidebar.confirmMessage.workflowDelete.headline": "Delete Workflow?",
"mainSidebar.confirmMessage.workflowDelete.message": "Are you sure that you want to delete '{workflowName}'?",
"mainSidebar.credentials": "Credentials",
"mainSidebar.variables": "Variables",
"mainSidebar.help": "Help",
"mainSidebar.helpMenuItems.course": "Course",
"mainSidebar.helpMenuItems.documentation": "Documentation",
@@ -1601,6 +1604,39 @@
"importParameter.showError.invalidProtocol1.title": "Use the {node} node",
"importParameter.showError.invalidProtocol2.title": "Invalid Protocol",
"importParameter.showError.invalidProtocol.message": "The HTTP node doesnt support {protocol} requests",
"variables.heading": "Variables",
"variables.add": "Add Variable",
"variables.add.unavailable": "Upgrade plan to keep using variables",
"variables.add.onlyOwnerCanCreate": "Only owner can create variables",
"variables.empty.heading": "{name}, let's set up a variable",
"variables.empty.heading.userNotSetup": "Set up a variable",
"variables.empty.description": "Variables can be used to store data that can be referenced easily across multiple workflows.",
"variables.empty.button": "Add first variable",
"variables.noResults": "No variables found",
"variables.sort.nameAsc": "Sort by name (A-Z)",
"variables.sort.nameDesc": "Sort by name (Z-A)",
"variables.table.key": "Key",
"variables.table.value": "Value",
"variables.table.usage": "Usage Syntax",
"variables.editing.key.placeholder": "Enter a name",
"variables.editing.value.placeholder": "Enter a value",
"variables.editing.key.error.startsWithLetter": "This field may only start with a letter",
"variables.editing.key.error.jsonKey": "This field may contain only letters, numbers, and underscores",
"variables.row.button.save": "Save",
"variables.row.button.cancel": "Cancel",
"variables.row.button.edit": "Edit",
"variables.row.button.edit.onlyOwnerCanSave": "Only owner can edit variables",
"variables.row.button.delete": "Delete",
"variables.row.button.delete.onlyOwnerCanDelete": "Only owner can delete variables",
"variables.row.usage.copiedToClipboard": "Copied to clipboard",
"variables.row.usage.copyToClipboard": "Copy to clipboard",
"variables.search.placeholder": "Search variables...",
"variables.errors.save": "Error while saving variable",
"variables.errors.delete": "Error while deleting variable",
"variables.modals.deleteConfirm.title": "Delete variable",
"variables.modals.deleteConfirm.message": "Are you sure you want to delete the variable \"{name}\"? This cannot be undone.",
"variables.modals.deleteConfirm.confirmButton": "Delete",
"variables.modals.deleteConfirm.cancelButton": "Cancel",
"contextual.credentials.sharing.unavailable.title": "Upgrade to collaborate",
"contextual.credentials.sharing.unavailable.title.cloud": "Upgrade to collaborate",
"contextual.credentials.sharing.unavailable.title.desktop": "Upgrade to n8n Cloud to collaborate",
@@ -1625,6 +1661,14 @@
"contextual.workflows.sharing.unavailable.button.cloud": "Upgrade now",
"contextual.workflows.sharing.unavailable.button.desktop": "View plans",
"contextual.variables.unavailable.title": "Available on Enterprise plan",
"contextual.variables.unavailable.title.cloud": "Available on Power plan",
"contextual.variables.unavailable.title.desktop": "Upgrade to n8n Cloud to collaborate",
"contextual.variables.unavailable.description": "Variables can be used to store and access data across workflows. Reference them in n8n using the prefix <code>$vars</code> (e.g. <code>$vars.myVariable</code>). Variables are immutable and cannot be modified within your workflows.<br/><a href=\"https://docs.n8n.io/environments/variables/\" target=\"_blank\">Learn more in the docs.</a>",
"contextual.variables.unavailable.button": "View plans",
"contextual.variables.unavailable.button.cloud": "Upgrade now",
"contextual.variables.unavailable.button.desktop": "View plans",
"contextual.users.settings.unavailable.title": "Upgrade to add users",
"contextual.users.settings.unavailable.title.cloud": "Upgrade to add users",
"contextual.users.settings.unavailable.title.desktop": "Upgrade to add users",