* refactor saving
* refactor api layer to be stateless
* refactor header details
* set variable for menu height
* clean up scss
* clean up indentation
* clean up dropdown impl
* refactor no tags view
* split away header
* Fix tslint issues
* Refactor tag manager
* add tags to patch request
* clean up scss
* ⚡ Refactor types to entities
* fix issues
* update no workflow error
* clean up tagscontainer
* use getters instead of state
* remove imports
* use custom colors
* clean up tags container
* clean up dropdown
* clean up focusoncreate
* ⚡ Ignore mistaken ID in POST /workflows
* ⚡ Fix undefined tag ID in PATCH /workflows
* ⚡ Shorten response for POST /tags
* remove scss mixins
* clean up imports
* ⚡ Implement validation with class-validator
* address ivan's comments
* implement modals
* Fix lint issues
* fix disabling shortcuts
* fix focus issues
* fix focus issues
* fix focus issues with modal
* fix linting issues
* use dispatch
* use constants for modal keys
* fix focus
* fix lint issues
* remove unused prop
* add modal root
* fix lint issues
* remove unused methods
* fix shortcut
* remove max width
* ⚡ Fix duplicate entry error for pg and MySQL
* update rename messaging
* update order of buttons
* fix firefox overflow on windows
* fix dropdown height
* 🔨 refactor tag crud controllers
* 🧹 remove unused imports
* use variable for number of items
* fix dropdown spacing
* ⚡ Restore type to fix build
* ⚡ Fix post-refactor PATCH /workflows/:id
* ⚡ Fix PATCH /workflows/:id for zero tags
* ⚡ Fix usage count becoming stringified
* address max's comments
* fix filter spacing
* fix blur bug
* address most of ivan's comments
* address tags type concern
* remove defaults
* ⚡ return tag id as string
* 🔨 add hooks to tag CUD operations
* 🏎 simplify timestamp pruning
* remove blur event
* fix onblur bug
* ⚡ Fix fs import to fix build
* address max's comments
* implement responsive tag container
* fix lint issues
* update tag limits
* address ivan's comments
* remove rename, refactor header, implement new designs for save, remove responsive tag container
* update styling
* update styling
* implement responsive tag container
* implement header tags edit
* implement header tags edit
* fix lint issues
* implement expandable input
* minor fixes
* minor fixes
* use variable
* rename save as
* duplicate fixes
* minor edit fixes
* lint fixes
* style fixes
* hook up saving name
* hook up tags
* clean up impl
* fix dirty state bug
* update limit
* update notification messages
* on click outside
* fix minor bug with count
* lint fixes
* handle minor edge cases
* handle minor edge cases
* handle minor bugs; fix firefox dropdown issue
* Fix min width
* apply tags only after api success
* remove count fix
* clean up workflow tags impl, fix tags delete bug
* fix minor issue
* fix minor spacing issue
* disable wrap for ops
* fix viewport root; save on click in dropdown
* save button loading when saving name/tags
* implement max width on tags container
* implement cleaner create experience
* disable edit while updating
* codacy hex color
* refactor tags container
* fix clickability
* fix workflow open and count
* clean up structure
* fix up lint issues
* fix button size
* increase workflow name limit for larger screen
* tslint fixes
* disable responsiveness for workflow modal
* rename event
* change min width for tags
* clean up pr
* address max's comments on styles
* remove success toasts
* add hover mode to name
* minor fixes
* refactor name preview
* fix name input not to jiggle
* finish up name input
* Fix up add tags
* clean up param
* clean up scss
* fix resizing name
* fix resizing name
* fix resize bug
* clean up edit spacing
* ignore on esc
* fix input bug
* focus input on clear
* build
* fix up add tags clickablity
* remove scrollbars
* move into folders
* clean up multiple patch req
* remove padding top from edit
* update tags on enter
* build
* rollout blur on enter behavior
* rollout esc behavior
* fix tags bug when duplicating tags
* move key to reload tags
* update header spacing
* build
* update hex case
* refactor workflow title
* remove unusued prop
* keep focus on error, fix bug on error
* Fix bug with name / tags toggle on error
* fix connection push bug
* :spakles: Implement wait functionality
* 🐛 Do not delete waiting executions with prune
* ⚡ Improve SQLite migration to not lose execution data anymore
* ⚡ Make it possible to restart waiting execution via webhook
* ⚡ Add missing file
* 🐛 Some more merge fixes
* ⚡ Do not show error for Wait-Nodes if in time-mode
* ⚡ Make $executionId available in expressions
* 👕 Fix lint issue
* 👕 Fix lint issue
* 👕 Fix lint issue
* ⚡ Set the unlimited sleep time as a variable
* ⚡ Add also sleeping webhook path to config
* ⚡ Make it possible to retrieve restartUrl in workflow
* ⚡ Add authentication to Wait-Node in Webhook-Mode
* ⚡ Return 404 when trying to restart execution via webhook which does
not support it
* ✨ Make it possible to set absolute time on Wait-Node
* ⚡ Remove not needed imports
* ⚡ Fix description format
* ✨ Implement missing webhook features on Wait-Node
* ⚡ Display webhook variable in NodeWebhooks
* ⚡ Include also date in displayed sleep time
* ⚡ Make it possible to see sleep time on node
* ⚡ Make sure that no executions does get executed twice
* ⚡ Add comment
* ⚡ Further improvements
* ⚡ Make Wait-Node easier to use
* ✨ Add support for "notice" parameter type
* Fixing wait node to work with queue, improved logging and execution view
* Added support for mysql and pg
* ✨ Add support for webhook postfix path
* ✨ Make it possible to stop sleeping executions
* ⚡ Fix issue with webhook paths in not webhook mode
* ⚡ Remove not needed console.log
* ⚡ Update TODOs
* ⚡ Increase min time of workflow staying active to descrease possible issue
with overlap
* 👕 Fix lint issue
* 🐛 Fix issues with webhooks
* ⚡ Make error message clearer
* ⚡ Fix issue with missing execution ID in scaling mode
* Fixed execution list to correctly display waiting executins
* Feature: enable webhook wait workflows to continue after specified time
* Fixed linting
* ⚡ Improve waiting description text
* ⚡ Fix parameter display issue and rename
* ⚡ Remove comment
* ⚡ Do not display webhooks on Wait-Node
* Changed wording from restart to resume on wait node
* Fixed wording and inconsistent screen when changing resume modes
* Removed dots from the descriptions
* Changed docs url and renaming postfix to suffix
* Changed names from sleep to wait
* ⚡ Apply suggestions from ben
Co-authored-by: Ben Hesseldieck <1849459+BHesseldieck@users.noreply.github.com>
* Some fixes by Ben
* ⚡ Remove console.logs
* ⚡ Fixes and improvements
Co-authored-by: Mutasem <mutdmour@gmail.com>
Co-authored-by: Iván Ovejero <ivov.src@gmail.com>
Co-authored-by: Ben Hesseldieck <b.hesseldieck@gmail.com>
Co-authored-by: Ben Hesseldieck <1849459+BHesseldieck@users.noreply.github.com>
Co-authored-by: Omar Ajoue <krynble@gmail.com>
* Changes to types so that credentials can be always loaded from DB
This first commit changes all return types from the execute functions
and calls to get credentials to be async so we can use await.
This is a first step as previously credentials were loaded in memory and
always available. We will now be loading them from the DB which requires
turning the whole call chain async.
* Fix updated files
* Removed unnecessary credential loading to improve performance
* Fix typo
* ⚡ Fix issue
* Updated new nodes to load credentials async
* ⚡ Remove not needed comment
Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
* 🐛 fix db connection check
* 👕 fix missing semi
* ⏪ Revert "🐛 Hardcode typeorm@0.2.34 as new version makes health-check fail"
This reverts commit ddee2ec47c.
* 🐛 fix health-check in WebhookServer
* ⚡ Add logging for pruning errors
* ⚡ Reformat pruning date to UTC string
* ⚡ Reformat workflow deletion date to UTC
* ⚡ Enforce UTC datetimes for MySQL
* ⚡ Enforce UTC datetimes for Postgres
* ⏪ Revert "Reformat workflow deletion date to UTC"
This reverts commit ca9628bc6d.
* Added try catch blocks to avoid endlessly running workflows
* Added handling for subworkflows
* ⚡ Fix one cause of "unkown" status of worklows with "main" mode
* ⚡ Fix one cause of "unkown" status of worklows with "own" mode
* ⚡ Fix one cause of "unkown" status of worklows with "queue" mode
* Saving database recovery
* 🐛 Fix issue that errors did not get saved correctly and also not
displayed
* ⚡ Save workflow timeout correctly as error
* Adding error capture to queued jobs
* ⚡ Mark canceled executions as not finished consistently across all
modes
Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
* Performance improvements for executions count on Postgres
As reported by a community member https://community.n8n.io/t/stress-load-testing/4846/5
and https://github.com/n8n-io/n8n/issues/1578, when using postgres with
a big volume of executions, the executions list's performance degrades.
This PR is aimed at Postgres specifically by querying postgres' stats
collector instead of running a full table scan, providing a good
estimate.
More can be read here: https://www.citusdata.com/blog/2016/10/12/count-performance/
* Removed order of magnitude so we display closer numbers
* Making count based on statistics only when not applying filters
* ⚡ Minor styling improvements
Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
* Migration for MySQL to certify that we're using the correct collation
* Update migration to check for collation existence before running
* ⚡ Fix format
Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
* ✨ Send console.log messages to editor-UI
* ⚡ Send message only to session which started workflow
* ⚡ Made it also work in own process
* ⚡ Add support for console.log UI forward also to FunctionItem Node
* 👕 Fix lint issue
* 👕 Fix linting issue
* ⚡ Restructure IPushData unions in /cli
* ⚡ Restructure IPushData unions in /editor-ui
* 🔥 Remove unneeded castings
* 🔥 Remove commented code
* ⚡ Improve code
Co-authored-by: Iván Ovejero <ivov.src@gmail.com>
Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
Co-authored-by: Jan <janober@users.noreply.github.com>
* ✨ Send console.log messages to editor-UI
* ⚡ Send message only to session which started workflow
* ⚡ Made it also work in own process
* ⚡ Add support for console.log UI forward also to FunctionItem Node
* 👕 Fix lint issue
* 👕 Fix linting issue
* ⚡ Improve code
Co-authored-by: Iván Ovejero <ivov.src@gmail.com>
Co-authored-by: Iván Ovejero <ivov.src@gmail.com>
* Added logging to n8n
This commit adds logging to n8n using the Winston library.
For now, this commit only allows logging to console (default behavior)
or file (need to pass in config via environment variables).
Other logging methods can be further implemented using hooks. These were
skipped for now as it would require adding more dependencies.
Logging level is notice by default, meaning no additional messages would
be displayed at the moment. Logging level can be set to info or debug as
well to enrich the generated logs.
The ILogger interface was added to the workflow project as it would make
it available for all other projects but the implementation was done on
the cli project.
* Lint fixes and logging level naming. Also fixed the way we use the logger as it was not working previously
* Improvements to logging framework
Using appropriate single quotes
Improving the way the logger is declared
* Improved naming for Log Types
* Removed logger global variable, replacing it by a proxy
* Add logging to CLI commands
* Remove unused GenericHelpers
* Changed back some messages to console instead of logger and added npm
shortcuts for worker and webhook
* Fix typos
* Adding basic file rotation to logs as suggested by @mutdmour
* Fixed linting issues
* Correcting comment to correctly reflect space usage
* Added settings for log files rotation
* Correcting config type from String to Number
* Changed default file settings to number
To reflect previous changes to the type
* Changed the way log messages are added to be called statically. Also minor naming improvements
* Applying latest corrections sent by @ivov
* ⚡ Some logging improvements
* Saving logs to a folder inside n8n home instead of root
* Fixed broken tests and linting
* Changed some log messages to improve formatting
* Adding quotes to names on log messages
* Added execution and session IDs to logs. Also removed unnecessary line breaks
* ⚡ Added file caller to log messages (#1657)
This is done using callsites library which already existed
in the project as another library's dependency. So in fact
it does not add any new dependency.
* Adding logs to help debug Salesforce node
* ⚡ Add function name to logs and add more logs
* ⚡ Improve some error messages
* ⚡ Improve some more log messages
* ⚡ Rename logging env variables to match others
Co-authored-by: dali <servfrdali@yahoo.fr>
Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
* Implemented timeout for workers and corrected timeout for subworkflows
* Fixed issue with timeouts when running on separate processes
* Standardized timeouts across all n8n
Now the maxTimeout setting takes effect whenever a timeout is set
to any workflows.
This causes local timeouts (either set on a per-workflow basis or
via global settings) to be capped by the maximum timeout. This
behavior already existed but was not applied to all places.
Also changed the way n8n enforces timeouts for subworkflows, making
it work always.
In effect, with this change, if you have one workflow that calls others
only the main workflow's timeout is taken into consideration, limiting
the maximum time that other workflows combined can run.
* ⚡ Fix timeout problem in "own" mode
Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
* ✨ n8n start trigger node
* first declaration of WorkflowActivationMode
* implement first WorkflowActivationMode: 'init', 'create', 'update', 'activate'
* fix Server missing id
* add activation infos to triggers
* remove WorkflowActivationMode from webhook execution function
* add some missing activation and add manual activation
* clean up and fix some code
* fix UnhandledPromiseRejectionWarning: Error: Overwrite NodeExecuteFunctions.getExecuteTriggerFunctions.emit function!
* fix spaces
* use a better name for the node
* fix ident in package.json
* Contributions to lublak's PR #1287
* Fixed linting issues and change the way parameters are displayed
* ⚡ Fix name and minor improvements
Co-authored-by: lublak <lublak.de@gmail.com>
Co-authored-by: lublak <44057030+lublak@users.noreply.github.com>
Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
* Removing unnecessary data from process communication
* Wrapping progress save in a try ... catch block to prevent crashes
* Migration to fix mysql problems with big data on executions
* ⚡ Minor formatting fixes
Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
* Fix issue with auto refresh on execution list
When auto refresh is on, we used to get executions from backend using
the firstId field to filter recent executions.
This is a problem when you have executions that do not finish in order,
leaving gaps behind. This PR fixes this problem by refreshing the latest
30 executions and correctly adding them to the list.
* Fixed an issues with auto refresh on executions ExecutionsList
Fixed two bugs, one in frontend which was ignoring the first returned
row from the backend and an issue with backend that was not using
the overriden version of `executeWorkflow` function for sub sub
workflows.
* Fixed the display of manual executions when running with queues and improved display of subworkflows
* Changing workflow ids array from variable to constant
* Added unknown status to workflow execution and changed its color to orange
When running n8n in queue mode, the query to search for currently
running workflows would fail on Postgres but work fine with SQLite and
MySQL / MariaDB. This fix makes it work fine for all RDBMS.
* Add OAuth2 credentials
* Adjust credentials params
* Add node to listing
* Add initial node scaffolding
* Remove unused credentials params
* Add customer search with select statement
* Add pagination to customer search
* Add customer creation functionality
* Add customer update functionality
* Small formatting fix
* Adjust property name casing for consistency
* Adjust customer operations for consistency
* Handle large QuickBooks listings
* Add initial estimate resource description
* Add estimate resource retrieval operations
* Refactor customer billing address
* Simplify customer billing address
* Fix casing for customer additional fields
* Adjust types to accommodate loadOptions functions
* Add loadOptions for customers to estimate
* Sort customer update fields alphabetically
* Refactor estimate line into standalone file
* Add stub for PDF retrieval operation
* Add invoice resource description and execute branches
* Implement estimate PDF download functionality
* Place descriptions in their own dir
* Add get and getAll for invoices
* Add send functionality to invoices
* Refactor handling of binary data
* Add invoice voiding functionality
* Add invoice deletion functionality
* Refactor resources into subdirs and add interfaces
* Add get and getAll for bill
* Add payment description
* Add get and getAll for payment
* Make variables in endpoints consistent
* Refactor interfaces for consistency
* Add interface for item resource
* Fill in fields for all resources
* Minor fixes in defaults and descriptions
* Refactor loader
* Add all resources to execute function
* Fix line property duplication
* Add get and getAll for vendor
* Optimize description imports
* Add creation for customer and bill
* Add update operation for bill
* Refactor create and update for customer
* Implement employee create and update
* Implement create and update for estimate
* Make address params more consistent
* Add create and update to payment
* Add item operations
* Add create and delete operations for invoice
* Refactor binary data handler
* Refactor generic functions
* Add create and update operations for vendor
* Fix build
* Fix total amount in bill:update
* Fix balance in bill:update
* Remove currency from bill:update
* Implement reference retrieval in bill:update
* Fix failing params in customer:update
* Fix param in employee:update
* Implement reference retrieval in estimate:update
* Fix failing params in estimate:update
* Fix failing params in invoice:update
* Fix failing param in vendor:update
* Implement reference retrieval in payment:update
* Remove unused interfaces
* Rename line property function
* Remove hared directory
* Refactor reference and sync token retrieval
* Fix line structure in bill:create
* Fix line structure in estimate:create
* Flatten responses
* Refactor line processing
* Remove unused interfaces
* Add endpoint documentation
* Fix payment:void content type
* Fix default for bill line item
* Hide auth URI query parameters
* Hide auth header parameter
* Add switch for credentials environment
* Adjust OAuth2 callback to accommodate realmId
* Retrieve realmId from OAuth2 flow
* ⚡ Improvements
* Reposition dividers
* Add IDs to display names of reference fields
* Add estimate:delete and bill:delete
* Load items in lines for bill, estimate and invoice
* Add filename for binary property in PDF download
* ⚡ Improvements
* Adjust field description
* Implement estimate:send
* Adjust field description
* Adjust custom field descriptions
* Add missing period to description
* ⚡ Minor improvements on QuickBooks-Node
* Add descriptions for bill
* Add descriptions for customer
* Add descriptions for employee
* Add descriptions for estimate
* Add descriptions for invoice
* Add descriptions for payment
* Add descriptions for vendor
Co-authored-by: ricardo <ricardoespinoza105@gmail.com>
Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
* Unify execution ID across executions
* Fix indentation and improved comments
* WIP: saving data after each node execution
* Added on/off to save data after each step, saving initial data and retries working
* Fixing lint issues
* Fixing more lint issues
* ✨ Add bull to execute workflows
* 👕 Fix lint issue
* ⚡ Add graceful shutdown to worker
* ⚡ Add loading staticData to worker
* 👕 Fix lint issue
* ⚡ Fix import
* Changed tables metadata to add nullable to stoppedAt
* Reload database on migration run
* Fixed reloading database schema for sqlite by reconnecting and fixing postgres migration
* Added checks to Redis and exiting process if connection is unavailable
* Fixing error with new installations
* Fix issue with data not being sent back to browser on manual executions with defined destination
* Merging bull and unify execution id branch fixes
* Main process will now get execution success from database instead of redis
* Omit execution duration if execution did not stop
* Fix issue with execution list displaying inconsistant information information while a workflow is running
* Remove unused hooks to clarify for developers that these wont run in queue mode
* Added active pooling to help recover from Redis crashes
* Lint issues
* Changing default polling interval to 60 seconds
* Removed unnecessary attributes from bull job
* Added webhooks service and setting to disable webhooks from main process
* Fixed executions list when running with queues. Now we get the list of actively running workflows from bull.
* Add option to disable deregistration of webhooks on shutdown
* Rename WEBHOOK_TUNNEL_URL to WEBHOOK_URL keeping backwards compat.
* Added auto refresh to executions list
* Improvements to workflow stop process when running with queues
* Refactor queue system to use a singleton and avoid code duplication
* Improve comments and remove unnecessary commits
* Remove console.log from vue file
* Blocking webhook process to run without queues
* Handling execution stop graciously when possible
* Removing initialization of all workflows from webhook process
* Refactoring code to remove code duplication for job stop
* Improved execution list to be more fluid and less intrusive
* Fixing workflow name for current executions when auto updating
* ⚡ Right align autorefresh checkbox
Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
* Unify execution ID across executions
* Fix indentation and improved comments
* WIP: saving data after each node execution
* Added on/off to save data after each step, saving initial data and retries working
* Fixing lint issues
* Fixing more lint issues
* ✨ Add bull to execute workflows
* 👕 Fix lint issue
* ⚡ Add graceful shutdown to worker
* ⚡ Add loading staticData to worker
* 👕 Fix lint issue
* ⚡ Fix import
* Changed tables metadata to add nullable to stoppedAt
* Reload database on migration run
* Fixed reloading database schema for sqlite by reconnecting and fixing postgres migration
* Added checks to Redis and exiting process if connection is unavailable
* Fixing error with new installations
* Fix issue with data not being sent back to browser on manual executions with defined destination
* Merging bull and unify execution id branch fixes
* Main process will now get execution success from database instead of redis
* Omit execution duration if execution did not stop
* Fix issue with execution list displaying inconsistant information information while a workflow is running
* Remove unused hooks to clarify for developers that these wont run in queue mode
* Added active pooling to help recover from Redis crashes
* Lint issues
* Changing default polling interval to 60 seconds
* Removed unnecessary attributes from bull job
* ⚡ Improved output on worker job start
Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
* 🧹 clean up forgotten leftover
* 🎨 reset req.params
* 🐛 Bugfix and minor change on request parameters
* ⚡ Minor improvements on request parameters
Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
* ⚡ Changed rest api endpoint to omit node properties by default.
⚡ Created another endpoint to return all node information based on a list of names
* refactor: changed endpoint to POST instead of GET
* Changed properties to be optional for node description
* Removed eager loading for node properties.
All nodes will have their properties fetched when used in a workflow.
Works when opening an already saved workflow, creating a new one from
scratch or pasting JSON / URLs.
* Removing unnecessary dependency
* 🎉 basic setup and execution stopping
* 🚧 soft timeout for own process executions
* 🚧 add hard timeout for subprocesses
* 🚧 add soft timeout to main thread
* 🔧 set default timeout to 5 mins --> 500s
* 💡 adding documentation to configs
* 🚧 deactivate timeout by default
* 🚧 add logic of max execution timeout
* ⚡ adding timeout to settings in frontend and server
* 🎨 improve naming
* 💡 fix change in config docs
* ✔️ fixing compilation issue
* 🎨 add format for new config variables
* 👌 type cast before checking equality
* ⚡ Improve error message if NodeType is not known
* 🐳 Tag also rpi latest image
* 🐛 Fix Postgres issue with Node.js 14 #776
* 🚧 add toggle to activate workflow timeout
* 💄 improving UX of setting a timeout and its duration
Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
* 🐛 Fix naming of events in AffinityTrigger Node
* 🚧 OPTIONS allow header response for production webhooks
* ✅ Implemented Allow header for test webhook OPTIONS response
Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>