Compare commits

..

2396 Commits

Author SHA1 Message Date
Nick O'Leary
749533b0b4 Bump for 1.3.1 2021-04-08 16:23:22 +01:00
Nick O'Leary
142a5f7ca1 Fix change node form validation 2021-04-08 16:21:03 +01:00
Nick O'Leary
28bfa8e418 Update changelog 2021-04-08 14:57:38 +01:00
Kristian Heljas
7b8ed487e9 Function node: add node.outputCount property to sandbox (#2918)
* Function node: add `node.outputs` property to sandbox

https://discourse.nodered.org/t/expose-configured-output-count-to-function-node-i-can-pr/43848

* style: indetation for function node sanbox code

I guess this was unintentionally unindented in d51aefa156 (diff-24cd715c3b7405ea194bfdc0dc2a350ceb2f5d18696b8163c3e40105b981a666)

* Function node: tests for accessing node properties

consistently tests that `node.id`, `node.name` and `node.outputs`
are available in `init()`, `func()` and `finalize()` methods.

* Function node: rename `node.outputs` to `node.outputCount`

https://discourse.nodered.org/t/expose-configured-output-count-to-function-node-i-can-pr/43848/9?u=kristian
2021-04-08 14:52:02 +01:00
Nick O'Leary
0059f9475e Merge pull request #2919 from kazuhitoyokoi/master-addjpn
Add Japanese translations for Node-RED v1.3
2021-04-08 14:50:22 +01:00
Kazuhito Yokoi
9429ea7c64 Fix typo 2021-04-08 20:32:01 +09:00
Kazuhito Yokoi
a157580b22 Add Japanese translations for Node-RED v1.3 2021-04-08 20:06:35 +09:00
Nick O'Leary
41a0147938 Update changelog 2021-04-07 14:37:13 +01:00
Nick O'Leary
16e021e94f Request node: set followAllRedirects to work with POSTs
Fixes #2017
2021-04-07 14:35:29 +01:00
Nick O'Leary
449d76a6c7 Update version for 1.3.0 2021-04-06 18:31:49 +01:00
Nick O'Leary
70172db693 Update changelog 2021-04-06 18:31:16 +01:00
Nick O'Leary
ff93a38354 Update dependencies 2021-04-06 18:31:02 +01:00
Nick O'Leary
e3b70b10d1 Add property validate to Change node rule set
Closes #2911
2021-04-06 17:26:06 +01:00
Nick O'Leary
400141b093 Merge pull request #2913 from heikokue/i18n-de/fixes1
small fixes/improvements of DE translations
2021-04-06 17:03:32 +01:00
Nick O'Leary
ca5e45a46d Flag validation errors in Inject node props config
Fixes #2914
2021-04-06 16:45:21 +01:00
Nick O'Leary
74b547b93c Remove Node 8 from travis due to node-sass breakage 2021-03-31 23:54:25 +01:00
Nick O'Leary
a688305572 Fix jshint errors 2021-03-31 23:53:53 +01:00
Nick O'Leary
f0f2eefb59 Merge branch 'pr_2908' into dev 2021-03-31 23:50:30 +01:00
Nick O'Leary
bdb548ffdc Exec node: remove addpayValue and reuse addpay to track appending property 2021-03-31 23:50:00 +01:00
Nick O'Leary
fe5d4abec1 Add externalModules config to settings.js 2021-03-31 23:14:26 +01:00
Nick O'Leary
70632706f9 Allow Flow.getNode to return subflowInstance nodes
Related to #2898
2021-03-31 23:14:26 +01:00
Nick O'Leary
8f424c063e Merge pull request #2892 from node-red/view-stack
Add actions to make tab navigation easier
2021-03-31 20:56:15 +01:00
Heiko Kuester
9955c3dd5d small fixes/improvements of DE translations 2021-03-31 17:51:40 +02:00
Nick O'Leary
d555fcf7bd Merge pull request #2903 from node-red/plugin-resources
Allow module to provide resources and automatically expose them
2021-03-30 22:50:36 +01:00
Nick O'Leary
8da00c0872 Fix Switch node handling of hasKey rule when property is undefined 2021-03-30 21:37:39 +01:00
Nick O'Leary
393290df2c Prevent accidental text selection of subflow toolbar text 2021-03-25 22:40:25 +00:00
Nick O'Leary
f8a7835341 Fix credential lookup for nested subflows
Fixes #2910
2021-03-25 22:27:49 +00:00
Nick O'Leary
082bac8c3a Handle invalid regex set dynamically in Switch node
Fixes #2905
2021-03-22 21:06:59 +00:00
Nick O'Leary
4cafe42cf4 Update node-sass to 5.x
Fixes #2907
2021-03-22 20:18:23 +00:00
Kazuhito Yokoi
89485971fa Use RED.util.getMessageProperty() to check message property 2021-03-22 20:48:01 +09:00
Kazuhito Yokoi
cb72d5100e Remove type for typedInput in exec node 2021-03-22 20:24:12 +09:00
Kazuhito Yokoi
f103533852 Support typedInput in msg.payload field of exec node 2021-03-22 16:19:55 +09:00
Nick O'Leary
55f1e7ece1 Merge pull request #2904 from node-red-hitachi/fix-exporting-config-node
fix exporting config node
2021-03-18 10:30:03 +00:00
Hiroyasu Nishiyama
c0a765c998 fix exporting config node 2021-03-18 00:11:35 +09:00
heikokue
ed44fb461c updated DE translation for 1.3.0 (MQTT5, modules, function, ...) and other small fixes (#2901) 2021-03-16 09:52:16 +00:00
Nick O'Leary
8543613563 Allow module to provide resources and automatically expose them 2021-03-15 21:06:10 +00:00
Kazuhito Yokoi
734adc6445 Add Japanese translations for Node-RED v1.3.0 (#2900) 2021-03-15 08:23:30 +00:00
heikokue
827f8d4d51 rework of DE translation (#2806)
* started rework of translation to DE, added translation rules and dictionary

* reworks DE translation of JSONata /editor-client/locales/de/jsonata.json

* rework DE translation of editor-client

* moved /editor-client/locales/de/README.md to Wiki https://github.com/node-red/node-red/wiki/Design:-i18n-de

* Update README.md

* Update README.md

* Create README.md

* Create README.md

* fixed #2: "Sie müssen ..., um ... zu können"

* fixed #3

* fixed #4 and removed unnecessary spaces

* fixed #5

* fixed #6, added missing dots, removed unnecessary spaces

* fixed #7, #8, #9

* fixed #10, #11, #12, #13, #14, #15

* fixed #17, #18, 19

* fixed #19

* moved /editor-client/locales/de/dictionary.csv to https://github.com/heikokue/node-red-designs/blob/i18n-de/designs/i18n-de/dictionary.csv

* reworked DE translation of runtime

* fine-tuned DE translation of editor-client

* reworked DE translation of common nodes, fine-tuned editor-client

* reworked DE translation of all nodes, fine-tuned editor-client, intotips, jsonata & runtime

* small i18n fixes
2021-03-12 13:07:12 +00:00
Nick O'Leary
5bbd3d6273 Merge pull request #2894 from node-red-hitachi/fix-error-report-on-node-load
Fix error report on  node load
2021-03-11 16:01:06 +00:00
Dave Conway-Jones
df90e3414d CSV better handling of messages with incoming parts - to create array output
and add tests (apologies for the massive reformat of test file) - but honestly there are two new tests
2021-03-11 12:47:54 +00:00
Dave Conway-Jones
16b9abbe92 redo CSV fix for commas in header template 2021-03-11 09:34:30 +00:00
Nick O'Leary
2de43b719e Merge branch 'pr_2895' into dev 2021-03-10 21:31:27 +00:00
Nick O'Leary
3b84f27f36 Remove arrow-funcs from editor code 2021-03-10 21:31:05 +00:00
Nick O'Leary
f7a6a333e1 Show context store name on TypedInput flow/global types
Fixes #2793
2021-03-10 17:51:20 +00:00
Nick O'Leary
c37ea90206 Remember TypedInput selected sub option when switching types
Fixes #2896
2021-03-10 17:50:46 +00:00
Nick O'Leary
0b39ef68d9 Use cursor keys to change selection in workspace 2021-03-10 14:04:47 +00:00
Hiroyasu Nishiyama
40ea759e2c fix vanishing link in subflow 2021-03-10 09:03:52 +09:00
Hiroyasu Nishiyama
3671a70e3b fix error report on node load 2021-03-09 10:57:29 +09:00
Nick O'Leary
2fa50e458f Fix select up/down stream when zoomed in or out 2021-03-09 00:37:01 +00:00
Nick O'Leary
9c7db1381c Add core:go-to-selected-subflow action 2021-03-06 23:28:20 +00:00
Nick O'Leary
2d4f5b8603 Ctrl-dbclick on subflow node opens subflow tab 2021-03-06 23:21:16 +00:00
Nick O'Leary
5181890433 Add go-to-previous/next-location actions 2021-03-06 23:20:53 +00:00
Nick O'Leary
99a9e3a91b Fix handling encrypted creds on /flows api 2021-03-06 20:27:51 +00:00
Nick O'Leary
101378c625 Properly handle credentials passed to /flows api 2021-03-06 20:09:03 +00:00
Nick O'Leary
aa5e47b462 Fix copy-to-clipboard action in FireFox 2021-03-04 10:45:30 +00:00
Nick O'Leary
15715a2968 Ensure select-up/down-stream action follows branches in flows 2021-03-03 14:20:55 +00:00
Nick O'Leary
b5751e5746 Merge pull request #2890 from node-red-hitachi/update-node-i18n-jp
Update i18n and Japanese message catalogue for function node and mqtt node
2021-03-03 13:48:56 +00:00
Hiroyasu Nishiyama
7e40cb5331 update i18n and Japanese message for nodes 2021-03-03 10:07:33 +09:00
Nick O'Leary
4b1a86ee02 Update changelog 2021-03-02 20:23:33 +00:00
Nick O'Leary
6c66ca8acf Merge pull request #2888 from kazuhitoyokoi/dev-fixtraviserr
Fix regular expression for Node.js v8
2021-03-02 14:52:18 +00:00
Kazuhito Yokoi
d58a091bb7 Fix regular expression for Node.js v8 2021-03-02 13:13:23 +00:00
Nick O'Leary
0566a2d9b1 Fix function node tests use of RED.settings 2021-03-02 00:12:41 +00:00
Nick O'Leary
3d23d1de4f Merge pull request #2873 from node-red/function-modules
Function node external modules
2021-03-01 21:35:31 +00:00
Nick O'Leary
c9c5f7f088 Fix functionExternalModules tests 2021-03-01 21:34:37 +00:00
Nick O'Leary
8e65408b1c Prevent duplicate keyboard shortcut from being assigned 2021-03-01 20:50:34 +00:00
Nick O'Leary
c3adc956d7 Add functionExternalModules to settings and default to false 2021-03-01 18:24:16 +00:00
Nick O'Leary
f69d6b4eb1 Merge pull request #2886 from Steve-Mcl/dev
mqtt v5 fixes
2021-03-01 11:56:00 +00:00
Nick O'Leary
916d377aaa Fix handling of + in shortcuts 2021-02-28 10:29:54 +00:00
Nick O'Leary
39532a9d65 Fix keymap entries with multiple keys for same action 2021-02-27 21:58:22 +00:00
Nick O'Leary
3dc696b2a9 Fix semver comparison in palette editor 2021-02-27 21:58:05 +00:00
Nick O'Leary
7be7dec19a Fix removing links when deleting node 2021-02-27 21:57:27 +00:00
Dave Conway-Jones
fc709ba266 revert CSV node to commas in headers fix level 2021-02-26 14:34:38 +00:00
Steve-Mcl
080e2f2589 mqtt v5 fixes
- copy/paste issues with willMsg
- ensure helper func is ran for lwt messages
2021-02-25 19:58:59 +00:00
Nick O'Leary
0dc4440a99 Merge branch 'master' into dev 2021-02-25 17:56:01 +00:00
Nick O'Leary
f770786b89 Merge pull request #2846 from node-red/show-first-sidebar
Ensure the first sidebar tab is shown when editor loads
2021-02-25 16:06:24 +00:00
Nick O'Leary
46bc331428 Merge pull request #2843 from node-red/theme-keymap
Allow default keymap to be overridden in settings file
2021-02-25 16:05:51 +00:00
Nick O'Leary
3af77b6a31 Merge pull request #2785 from node-red/library-plugins
Library plugins
2021-02-25 16:05:23 +00:00
Nick O'Leary
8c4461c4f8 Merge pull request #2855 from node-red-hitachi/network-examples
Network node examples
2021-02-25 16:01:31 +00:00
Nick O'Leary
bccfd21cf4 Merge pull request #2854 from node-red/fix-csv-template-reset
fix csv node template reset when array complete
2021-02-25 16:00:30 +00:00
Nick O'Leary
e6f1394a74 Merge pull request #2869 from node-red/Fix-join-node-array-index-and-reset
Fix join node array index and reset
2021-02-25 15:59:54 +00:00
Nick O'Leary
de24831fb9 Merge pull request #2877 from node-red/select-tools
Add new select-* actions to editor
2021-02-25 15:58:56 +00:00
Nick O'Leary
e5716162ad Merge pull request #2880 from node-red/stop-order
Stop config nodes after flow nodes
2021-02-25 15:58:39 +00:00
Nick O'Leary
5809a3af0d Merge pull request #2881 from bartbutenaers/editableList-buttons
EditableList custom buttons
2021-02-25 15:58:23 +00:00
Nick O'Leary
11a385550a Merge branch 'pr_2778' into dev 2021-02-25 15:50:25 +00:00
Nick O'Leary
255b8f2005 Update mqtt nodes for v5 2021-02-25 15:49:56 +00:00
Nick O'Leary
3d398cfd53 Tidy up typedInput syntax 2021-02-25 13:39:59 +00:00
Nick O'Leary
5f8804c25c Ensure TypedInput Change event is passed type/value properties
Fixes #2883
2021-02-25 13:03:31 +00:00
bartbutenaers
02d1369d5b Escape all user input 2021-02-23 00:00:23 +01:00
bartbutenaers
0fef2ab509 Avoid innerHtml 2021-02-22 21:45:12 +01:00
Stephen McLaughlin
16088b8a08 improve description of mqtt options
Co-authored-by: Nick O'Leary <nick.oleary@gmail.com>
2021-02-22 12:45:32 +00:00
Nick O'Leary
69befe8f0e Merge pull request #2879 from HaKr/SemVerFullCompareNewAttempt
New attempt for PR #2821
2021-02-22 11:01:39 +00:00
bartbutenaers
ae7a3981c0 Pass evt to button handler 2021-02-21 23:24:40 +01:00
bartbutenaers
8b4aa3f5af Custom buttons comment 2021-02-21 22:57:34 +01:00
bartbutenaers
60c8a2c598 Custom buttons 2021-02-21 22:55:19 +01:00
bartbutenaers
fbb7dd4c3f EditableList custom buttons 2021-02-21 22:52:41 +01:00
Steve-Mcl
833ecfb1af MQTT V5 - prep for 1.3.0 beta...
* MQTT IN node tidy up
  * remove userProperties
  * remove subscriptionIdentifier
* MQTT OUT node tidy up
  * remove topicAlias
  * remove payloadFormatIndicator
  * remove subscriptionIdentifier
* MQTT BROKER node tidy up
  * remove topicAliasMaximum
  * remove maximumPacketSize
  * remove receiveMaximum
  * remove userProperties
2021-02-20 19:58:13 +00:00
Steve-Mcl
c20bab2436 more specific class selectors for show/hide items 2021-02-20 15:52:14 +00:00
Nick O'Leary
afb17af571 Fix global leak in lib/flows/index.js 2021-02-19 21:47:02 +00:00
Nick O'Leary
5012568464 Stop config nodes after flow nodes
Fixes #2876
2021-02-19 20:44:01 +00:00
Harry de Kroon
02dd141095 New attempt for PR #2821
PR #2821 could not be completed due to different email addresses used for it's commits.
This new branch is meant to be used as a new PR to replace the failed one
2021-02-19 16:55:04 +01:00
Nick O'Leary
0be82d964e Merge pull request #2870 from node-red-hitachi/fix-debug-filter
Allow filtering of debug node output within subflow
2021-02-19 15:45:57 +00:00
Nick O'Leary
b41c7962c2 Add tests for pluggable library 2021-02-19 15:24:56 +00:00
Nick O'Leary
6f9e06e78d Add validation of library plugin id and better error reporting 2021-02-19 14:39:42 +00:00
Nick O'Leary
c2347076f4 Handle errors when initialising library plugin 2021-02-19 14:01:33 +00:00
Nick O'Leary
c744af161d Add support for settings object in plugin definition 2021-02-19 11:59:49 +00:00
Hiroyasu Nishiyama
74ea382cf2 update subflow finding algorithm 2021-02-19 14:35:59 +09:00
Steve-Mcl
ab4a9e72d4 Merge branch 'dev' into mqtt5 2021-02-18 18:50:26 +00:00
Nick O'Leary
3f9a29730f Add partial implementation of adding library sources via editor
This adds lots of commented out code that provides a settings panel
to add new library sources. It is incomplete as it doesn't actually
add/update the library sources on the runtime.

For 1.3, I'm focussing on allowing additional sources get added
via the settings file only. I've done enough work on the editor
side to convince myself more work is needed than I can justify
at this time on what is otherwise not going to be a widely
used feature.
2021-02-18 11:58:23 +00:00
Nick O'Leary
8a076c01ab Support for library source plugins 2021-02-18 11:58:22 +00:00
Nick O'Leary
ca75efcbaf Adds shift-click support for selecting up/down stream nodes 2021-02-17 17:32:55 +00:00
Nick O'Leary
f96ce2fd83 Get node-red core nodes back to the top of the list 2021-02-17 15:20:16 +00:00
Nick O'Leary
d5f4f987f2 Add 'node' object to Function close scope 2021-02-17 14:41:50 +00:00
Nick O'Leary
11475b0c38 Move function expand buttons to overlap editor and save space 2021-02-17 14:41:25 +00:00
Nick O'Leary
137fa98903 Move name field above tab bar in Function node 2021-02-17 12:04:38 +00:00
Nick O'Leary
ea62c1806e Give edit dialog a little bit more vertical space 2021-02-17 12:04:20 +00:00
Nick O'Leary
45afd06047 Prevent rogue mouseup on tab from triggering tab change 2021-02-17 12:03:13 +00:00
Dave Conway-Jones
e6ec59092c Update settings.js 2021-02-17 12:02:27 +00:00
Nick O'Leary
35f788693d Add select-connected action 2021-02-16 21:16:21 +00:00
Nick O'Leary
d5314d2a85 Add select-up/downstream-nodes action to editor 2021-02-16 20:46:41 +00:00
Nick O'Leary
efd8c3d6d2 Merge pull request #2849 from node-red-hitachi/fix-copy-to-clipboard
fix line break of exporting nodes to clipboard
2021-02-16 15:50:24 +00:00
Nick O'Leary
7d04353843 Merge pull request #2859 from node-red/fix-numeric-status
fix numeric status not displaying by ensuring it's a string
2021-02-16 14:32:14 +00:00
Nick O'Leary
644da0b77b Merge pull request #2872 from node-red-hitachi/fix-node-deploy-with-group-change
Fix deploy of node in group
2021-02-16 14:18:08 +00:00
Nick O'Leary
785c349adc Prevent function module overwriting built-in sandbox properties 2021-02-16 13:58:59 +00:00
Nick O'Leary
1608196cd2 Merge pull request #2874 from kazuhitoyokoi/dev-jpn
Add Japanese translations for Node-RED v1.3.0
2021-02-16 10:07:40 +00:00
Nick O'Leary
9d34abf603 Function node: test modules identified in libs are added to sandbox 2021-02-15 20:59:37 +00:00
Nick O'Leary
05beb6ca79 Add unit tests for externalModules 2021-02-15 17:28:14 +00:00
Hiroyasu Nishiyama
12c7238c72 revert diffConfigs args 2021-02-15 22:05:42 +09:00
Kazuhito Yokoi
ed359ca10c Add Japanese translations for Node-RED v1.3.0 2021-02-15 13:02:58 +09:00
Hiroyasu Nishiyama
b66468c4ea restart node only if node's group changes 2021-02-14 10:06:46 +09:00
Nick O'Leary
d2c9ccbfdd Detect externalModule dependencies inside subflow modules
Not sure this is 100% the right approach. If a subflow module has a dependency
it should be in the subflow's package.json and therefore installed next to the
subflow module in ~/.node-red/node_modules.

By treating it as a 'normal' external module, it will be dynamically installed
in ~/.node-red/externalModules. That then exposes the module to the user
who won't know why its there and may remove it.

It would be better to allow nodes inside a subflow module to require
from ~/.node-red/node_modules and not limit it to the externalModules
dir. The hard part is knowing when to do that.
2021-02-14 00:02:08 +00:00
Nick O'Leary
85e05b787f Hide projects dialog when opening proj with invalid encrypt key 2021-02-13 19:53:10 +00:00
Nick O'Leary
e5471b44e0 Merge pull request #2871 from node-red-hitachi/fix-IE11-flow-downlod
add IE11 polyfill to support URI download scheme
2021-02-13 00:27:42 +00:00
Nick O'Leary
e0f0a76ae4 Update marked dependency 2021-02-13 00:25:40 +00:00
Nick O'Leary
6336ab121e Merge branch 'dev' into function-modules 2021-02-13 00:21:27 +00:00
Nick O'Leary
e899d2d5b8 Fix tests for externalModules component 2021-02-13 00:18:04 +00:00
Nick O'Leary
a94c19a6cf Fix up loading of freshly installed modules in Function node 2021-02-12 22:40:30 +00:00
Nick O'Leary
9c09ee3b71 Rework Function node module integration 2021-02-12 18:14:13 +00:00
Dave Conway-Jones
d8e68a75b9 Update CSV template words for clarity. 2021-02-12 17:24:33 +00:00
Dave Conway-Jones
302c5cfe09 CSV node - handle commas in msg.columns if quoted.
and add more tests
To close #2860
2021-02-12 16:55:41 +00:00
Hiroyasu Nishiyama
1be337fbc5 make nodes with only group change not deployed by nodes deploy mode 2021-02-13 00:23:30 +09:00
Hiroyasu Nishiyama
3ec37e2c66 make flow download code separate utility instead of polyfill 2021-02-11 23:10:33 +09:00
Hiroyasu Nishiyama
3740c21bee add IE11 polyfill to support URI download scheme 2021-02-11 17:56:08 +09:00
Hiroyasu Nishiyama
5a6568e7c2 allow filtering of debug node output within subflow 2021-02-10 17:32:27 +09:00
Dave Conway-Jones
4cd9b7b050 fix join node in array mode with repeated messages, and rallow reset all
to close #2866
2021-02-09 17:27:58 +00:00
Nick O'Leary
dd780945e1 Sanitize Debug node name when display enable/disable message 2021-02-09 15:04:00 +00:00
Dave Conway-Jones
e86f6a841a fix numeric status not displaying by ensuring it's a string 2021-02-05 11:36:26 +00:00
Nick O'Leary
fad8dcd304 Bump for 1.2.9 2021-02-03 18:04:37 +00:00
Nick O'Leary
1633a2ff70 Sanitize node type names when displaying in notifications 2021-02-03 15:50:05 +00:00
Nick O'Leary
a2878fa066 Sanitize branch name before displaying in notification message 2021-02-03 15:46:57 +00:00
Nick O'Leary
735de2908a Handle more valid language codes when validating lang params
Fixes #2856
2021-02-03 15:43:26 +00:00
Hiroyasu Nishiyama
818021e0b7 add examples for websocket in/out node 2021-02-03 17:13:56 +09:00
Hiroyasu Nishiyama
3cc6c4433f add examples for UDP in/out node 2021-02-03 17:12:35 +09:00
Hiroyasu Nishiyama
8306ddd40f add examples for TCP in/out node 2021-02-03 17:01:29 +09:00
Hiroyasu Nishiyama
024e71cdf5 add examples for HTTP in/response node 2021-02-03 16:34:17 +09:00
Dave Conway-Jones
4313cbaa5c fix csv node template reset when array complete
and add tests
to close #2853
2021-02-02 14:20:46 +00:00
Nick O'Leary
f5da2eb633 Merge branch 'master' into dev 2021-02-02 13:45:43 +00:00
Nick O'Leary
23f0cd3a26 Bump for 1.2.8 2021-02-02 13:11:33 +00:00
Nick O'Leary
74db3e17d0 Restrict project file access to inside the project directory 2021-02-01 13:39:39 +00:00
Matthias Radde
7bde7f0cfd fixing minor typo in node's documentation (#2848) 2021-01-30 18:30:29 +00:00
Nick O'Leary
ac68e9c6b5 Merge pull request #2850 from node-red-hitachi/fix-grant-jshint-failure
fix jshint failure
2021-01-30 08:46:18 +00:00
Hiroyasu Nishiyama
32692dce07 fix jshint failure 2021-01-30 09:43:01 +09:00
Hiroyasu Nishiyama
64d3b8e104 fix line break of exporting nodes to clipboard 2021-01-30 01:20:51 +09:00
Nick O'Leary
a03edf3d58 Merge pull request #2845 from node-red/subflow-delete-prompt
Add confirm dialog when deleting subflow with instances in use
2021-01-29 10:57:11 +00:00
Nick O'Leary
e5b7ccb612 Add subflow edit button to palette tooltip 2021-01-29 10:42:04 +00:00
Nick O'Leary
9c1ce5543d Merge pull request #2844 from node-red/disable-groups
Add enable/disable toggle button for groups in info-outliner
2021-01-29 10:20:26 +00:00
Nick O'Leary
ba387a8e4e Merge pull request #2841 from node-red/credential-timeout
Handle timeouts when trying to load node credentials in editor
2021-01-29 10:20:04 +00:00
Nick O'Leary
7fa25c1ff4 Merge pull request #2839 from node-red/subflow-search
Add easier ways to find subflow instances
2021-01-29 10:19:36 +00:00
Nick O'Leary
3bd1bfc769 Fix check for existing config nodes in subflow export set 2021-01-29 10:16:40 +00:00
Kazuhiro Ito
dad47ade38 Add config node to refer to when exporting subflow 2021-01-29 11:05:15 +09:00
Nick O'Leary
fa6e0c8964 Ensure the first sidebar tab is shown when editor loads 2021-01-28 23:42:32 +00:00
Nick O'Leary
bb4b252401 Add confirm dialog when deleting subflow with instances in use 2021-01-28 23:08:47 +00:00
Nick O'Leary
a50404b141 Add enable/disable toggle button for groups in info-outliner 2021-01-28 22:07:19 +00:00
Nick O'Leary
61690ecf4a Allow default keymap to be overridden in settings file 2021-01-28 16:42:16 +00:00
Nick O'Leary
f4c87af5c1 Increase credential load timeout to 30secs 2021-01-28 11:30:10 +00:00
Nick O'Leary
83d12f7d39 Handle timeouts when trying to load node credentials in editor
Fixes #2840
2021-01-28 11:15:15 +00:00
Nick O'Leary
2e73b229d7 Add easier ways to find subflow instances 2021-01-28 00:41:19 +00:00
Nick O'Leary
3a0074d96e Merge branch 'master' into dev 2021-01-27 23:28:19 +00:00
Nick O'Leary
7068c175f2 Ensure subflow help is picked up for palette tooltip
Fixes #2834
2021-01-27 22:53:06 +00:00
Nick O'Leary
9b5ed8407f Broaden lang verification to include * 2021-01-27 22:06:12 +00:00
Hiroyasu Nishiyama
7d08de9c99 Storage examples (#2784)
* add examples of file node

* add file-in node examples

* add watch node examples
2021-01-27 20:50:13 +00:00
Nick O'Leary
575d07e41a Merge pull request #2836 from node-red/theme-plugins
Add support for Theme Plugins
2021-01-27 20:45:59 +00:00
Nick O'Leary
24da3608c4 Merge pull request #2779 from node-red/plugins
Plugins
2021-01-27 20:37:35 +00:00
Nick O'Leary
37935bf388 Merge pull request #2748 from neuroforgede/master
make split node work with out of order messages
2021-01-27 20:35:32 +00:00
heikokue
9eb7fad621 fixed #2790 swapped description of encodeUrl/encodeUrlComponent and d… (#2791)
* fixed #2790 swapped description of encodeUrl/encodeUrlComponent and decodeUrl/decodeUrlComponent

* fixed #2790 swapped description of encodeUrl/encodeUrlComponent and decodeUrl/decodeUrlComponent also in ja, ru, zh-CN and zh-TW
2021-01-27 20:33:54 +00:00
Nick O'Leary
438d51d26e Allow nested msg properties in msg/flow/global expressions (#2822)
* Allow nested msg properties in msg/flow/global expressions

* Remove typo in RED.utils

Co-authored-by: Nick O'Leary <knolleary@users.noreply.github.com>
2021-01-27 20:32:52 +00:00
Hiroyasu Nishiyama
34ef055d7b Fix line break of subflow label on palette (#2828)
* fix line break of subflow label on palette

* handle line break on palette
2021-01-27 20:32:15 +00:00
Hiroyasu Nishiyama
4a1d66f210 update UI, Runtime API, metadata handling, and others 2021-01-27 22:27:54 +09:00
Nick O'Leary
1f6328bf4e Add initial support for ThemePlugins 2021-01-26 13:49:47 +00:00
Nick O'Leary
8e7a230dbc Fix plugin test to expect user flag 2021-01-26 13:49:13 +00:00
Nick O'Leary
6e718ca772 Fix merge of dev 2021-01-26 13:44:38 +00:00
Alex Kaul
70554e24b1 Improve Ru locale (#2826)
* Update Russian Locale

* Upd ru translation for "timestamp"

* Improve node help texts for ru locale

* Improve editor texts for ru locale
2021-01-25 17:25:06 +00:00
Nick O'Leary
a0f736bb88 Validate user-provided language parameter before passing to i18n 2021-01-25 17:06:27 +00:00
Alex Kaul
79473c243d Fix grunt release mkdir issue on Node.js 14 (#2827)
* Update Russian Locale

* Upd grunt-mkdir
2021-01-25 11:03:51 +00:00
Alex Kaul
441eb3bb29 Fix scrollbars (#2825)
* Update Russian Locale

* Fix scrollbars
2021-01-25 11:02:43 +00:00
Ben Hardill
ca44af0625 Prevent crash when coreNodesDir is empty (#2831)
* Fix for HTTP-Request not sending body for GET

Background in SO question:
https://stackoverflow.com/q/60356824/504554

* Prevent crash when coreNodesDir points to empty dir

This should prevent a crash when you point to an empty core nodes
directory.

* Matching upstream master
2021-01-25 10:56:23 +00:00
Nick O'Leary
9e179170ee Add i18n function to editor plugins when they are registered
Adds a `_` function to the plugin definition object that will automatically
prepend the plugin's module namespace to any call. This saves the plugin
from having to prepend its namespace all of the time.
2021-01-20 15:35:44 +00:00
Nick O'Leary
9f71dbb006 Fixup merge 2021-01-18 16:25:41 +00:00
Nick O'Leary
7531314e3f Add RED.plugins module to editor 2021-01-18 16:25:40 +00:00
Nick O'Leary
a006b52052 Initial plugin runtime api implementation 2021-01-18 16:25:40 +00:00
Nick O'Leary
bebebaa3dd Merge pull request #2820 from node-red/export-preview
Add preview to Export Dialog
2021-01-18 16:25:16 +00:00
Tiago Ferreira
55ff035fc9 Ability to add projects path to the settings file (#2816)
* add the ability to set the projects path

* Update packages/node_modules/@node-red/runtime/locales/en-US/runtime.json

use directory to keep consistency with the project

Co-authored-by: Nick O'Leary <nick.oleary@gmail.com>

* Update packages/node_modules/@node-red/runtime/lib/storage/localfilesystem/projects/index.js

only show the projects directory is projects are enabled

Co-authored-by: Nick O'Leary <nick.oleary@gmail.com>

* use "directory" instead of "folder" to keep consistency with the Node-RED project

Co-authored-by: Nick O'Leary <nick.oleary@gmail.com>
2021-01-18 13:18:07 +00:00
Hiroyasu Nishiyama
d8c8d7bc57 hide unused input field (#2823) 2021-01-16 16:58:13 +00:00
martinb
b0acb58442 Merge tag '1.2.7' into release/1.2.7 2021-01-14 15:46:22 +01:00
Nathanaël Lécaudé
2b28ae3402 Add settings.execMaxBufferSize to control buffer size of exec node (#2819)
Co-authored-by: Dave Conway-Jones <dceejay@users.noreply.github.com>
closes #2817
2021-01-14 14:38:39 +00:00
Dave Conway-Jones
aa47bae2ad Exec node - don't append msg.payload to command by default (#2818)
* exec change default to not append payload
2021-01-13 10:12:19 +00:00
Nick O'Leary
ccfde84769 Merge pull request #2812 from node-red/property-types
Support node property typing
2021-01-12 23:56:01 +00:00
Nick O'Leary
b1df6d5149 Add preview of exported nodes to Export dialog 2021-01-12 18:23:15 +00:00
Hiroyasu Nishiyama
d51aefa156 initial support for npm module installation 2021-01-11 19:32:16 +09:00
Nick O'Leary
c40412d7c6 Merge pull request #2690 from node-red/sf-module
[sf-modules] Support npm subflow modules
2021-01-08 21:16:05 +00:00
Nick O'Leary
b0bc7ecacb Merge pull request #2763 from node-red/simple-git-setting
Allow project workflow to be configured via settings file
2021-01-08 15:20:11 +00:00
Nick O'Leary
5489bd37c9 Fix handling of default workflow mode when projects not active 2021-01-08 15:05:34 +00:00
Nick O'Leary
ea2e3f25d8 Implement node property typing
See https://github.com/node-red/designs/pull/37
2021-01-08 14:19:12 +00:00
Nick O'Leary
09b37cf538 Merge pull request #2796 from fellinga/feature/lang-select
add optional lang select
2021-01-07 17:15:36 +00:00
Nick O'Leary
e30a01310e Merge pull request #2788 from kevinGodell/dev
middleware integration
2021-01-07 17:11:48 +00:00
Nick O'Leary
d5cc5b2574 Use subflow.info for help text and meta.type for node type 2021-01-07 15:34:27 +00:00
Nick O'Leary
160ca6add4 remove console.log 2021-01-07 11:26:21 +00:00
Nick O'Leary
da96c85d32 Handle subflow modules with their own npm dependencies 2021-01-07 11:26:20 +00:00
Nick O'Leary
de15a1c36f Add subflow meta data edit pane 2021-01-07 11:10:58 +00:00
Nick O'Leary
814fc8bc69 Add SubflowModule class for running subflow modules 2021-01-07 11:10:58 +00:00
Nick O'Leary
0c9fd25d3e Nodes log via parent flow to allow flow-info to be added 2021-01-07 11:10:34 +00:00
Nick O'Leary
9a660f3fe9 Support npm subflow modules 2021-01-07 11:10:33 +00:00
Nick O'Leary
6e1466e411 Tidy some subflow env props css 2021-01-07 10:42:35 +00:00
Nick O'Leary
7913b3cbc2 Merge branch 'master' into dev 2021-01-07 10:17:50 +00:00
Nick O'Leary
87c9ed6356 Merge pull request #2797 from node-red/externalModules
Add support for settings.externalModules
2021-01-07 10:12:33 +00:00
Nick O'Leary
06ceb056f3 Update build.yml 2021-01-07 10:09:49 +00:00
Nick O'Leary
65b4ef6c3d Remove ES6 from editor code 2021-01-07 10:06:08 +00:00
Nick O'Leary
0284ef401e Fix loading individual module catalog 2021-01-06 20:20:32 +00:00
Nick O'Leary
8a87f93741 Use npm info to check pending install version 2021-01-06 20:03:22 +00:00
Nick O'Leary
af19536222 Better logging when deprecated editorTheme.palette.* settings used 2021-01-06 17:36:59 +00:00
Nick O'Leary
abe77ab96f Bump for 1.2.7 2021-01-06 11:49:31 +00:00
Nick O'Leary
ea720bb4a5 Bump dependencies 2021-01-06 11:41:17 +00:00
Nick O'Leary
6ee2e2b570 Merge pull request #2777 from aaronmyatt/improve-test-coverage-in-editor-api-index
Improve editor api index test coverage
2021-01-06 11:39:30 +00:00
Nick O'Leary
3885107e6e Merge pull request #2805 from kelvininc/user_menu_theme_improvement
Allow to explicit use userMenu in the theme configuration
2021-01-06 11:37:22 +00:00
Nick O'Leary
30a68fefec Ensure subflow-scoped config nodes do not get moved on import
Fixes #2789
2021-01-06 11:22:52 +00:00
Tiago Ferreira
fa84c4e461 Allow to explicit use userMenu in the theme configuration
Unit test to ensure that   works after the theme is initialize

Allow to explicti use userMenu in the theme configuration
2020-12-29 22:06:02 +00:00
Nick O'Leary
5743a5f91d Filter palette manager nodes based on allow/deny list 2020-12-27 21:34:21 +00:00
Nick O'Leary
9d2d060dec Fix unit tests for externalModules 2020-12-27 20:59:31 +00:00
fellinga
b36e7e172e add settings to init 2020-12-27 14:44:32 +01:00
Nick O'Leary
aacb92a7ae Implement allow/denyList when loading/installing modules 2020-12-27 12:49:17 +00:00
fellinga
4943bde3d4 add optional lang select 2020-12-27 12:59:12 +01:00
Nick O'Leary
fc459be531 Deprecate editorTheme.palette.editable for externalModules.palette.allowInstall
Also deprecates editorTheme.palette.editable for externalModules.palette.allowUpload
2020-12-23 23:29:07 +00:00
Nick O'Leary
3151502a3f Deprecate autoInstallModules for externalModules.autoInstall 2020-12-23 22:05:58 +00:00
Kevin Godell
79b10ed18a allow for adding an array of middleware functions 2020-12-22 16:30:38 -06:00
Kevin Godell
34b27f2e68 allow for adding an array of middleware functions 2020-12-22 16:28:33 -06:00
David Mödinger
c433f736a5 Improvements to DE translation (#2192)
* Gitter->Raster inconsistency

* Set to -> Festlegen bei // Setzen als
2020-12-17 08:25:35 +00:00
aaronmyatt
55e6c6e01a adds tests for editor-api.start() 2020-12-16 21:53:52 +08:00
Nick O'Leary
496b5a092f Ensure subflow credential objects exist
Fixes #2783
2020-12-15 17:20:22 +00:00
Nick O'Leary
02510efda1 Merge pull request #2781 from johnwang71/flow-undefined-474
Fix bug: Crash & quit while handling exception with undefine msg.error
2020-12-15 13:37:07 +00:00
johnwang71
be828af3e2 Fix bug: Crash & quit while handling exception with undefine msg.error. i.e. flow with 3 nodes, http-in, delay 5-10s, http-out; client with 3s timeout request the flow; TypeError: Cannot read property 'hasOwnProperty' of undefined\r at Flow.handleError (/usr/src/node-red/node_modules/@node-red/runtime/lib/flows/Flow.js:474:27) 2020-12-14 18:18:50 +08:00
Nick O'Leary
9b1c114c3f Merge pull request #2772 from node-red/api-tidy
Fully remove when.js dependency
2020-12-07 14:05:15 +00:00
Nick O'Leary
4df27d4b0b Fix typos in parser examples 2020-12-07 14:04:42 +00:00
Nick O'Leary
e3445dae46 Merge pull request #2749 from node-red-hitachi/parser-example
add examples for parser category nodes
2020-12-07 14:01:14 +00:00
Nick O'Leary
f5fcf23678 Merge branch 'pr_2751' into dev 2020-12-07 13:58:53 +00:00
Nick O'Leary
0a6c08e2c3 Merge pull request #2750 from node-red-hitachi/split-join-node-mapi
Messaging API support in Split/Join nodes
2020-12-07 13:54:47 +00:00
Nick O'Leary
b80a7459cf Merge pull request #2733 from node-red-hitachi/delay-node-mapi
Messaging API support in Delay node
2020-12-07 13:53:51 +00:00
Nick O'Leary
f6480e6e0c Merge pull request #2744 from node-red-hitachi/sort-node-mapi
Messaging API support in Sort node
2020-12-07 13:52:34 +00:00
Nick O'Leary
41d12c433e Merge pull request #2734 from node-red-hitachi/csv-node-mapi
Messaging API support in CSV node
2020-12-07 13:50:09 +00:00
Nick O'Leary
169a2484f2 Merge pull request #2738 from node-red-hitachi/batch-node-mapi
Messaging API support in Batch node
2020-12-07 13:33:04 +00:00
Steve-Mcl
be52ec1390 mark more TODO areas (mostly debugging) 2020-12-07 12:48:33 +00:00
Steve-Mcl
00db43198d design/TODO comments 2020-12-07 12:26:27 +00:00
Steve-Mcl
6bac207611 better handling of server properties 2020-12-07 12:25:51 +00:00
Nick O'Leary
df1eb631e1 Merge pull request #2752 from bartbutenaers/readonly-typedinput
Allow TypedInput to be disabled
2020-12-07 12:21:53 +00:00
Steve-Mcl
6150ae787d userProperties input type correction 2020-12-07 11:50:33 +00:00
Nick O'Leary
fc7967d455 Fix missing promise on setUserSettings 2020-12-07 11:49:02 +00:00
Nick O'Leary
fca21ac126 Rename paletteEditorEnabled to installerEnabled 2020-12-07 11:49:01 +00:00
Nick O'Leary
6fb96fa3c1 Move exec and events components to util module
The exec and events components are common components that
are used by both runtime and registry. It makes sense to
move them into the util package.

This also adds some docs to the registry module
2020-12-07 11:49:01 +00:00
Nick O'Leary
a1f565f756 Use more async funcs in runtime/lib/api to reduce Promise creation 2020-12-07 11:49:01 +00:00
Nick O'Leary
5992ed1fab Fully remove when.js dependency 2020-12-07 11:49:01 +00:00
Nick O'Leary
beccdac717 Merge branch 'master' into dev 2020-12-07 11:48:38 +00:00
Nick O'Leary
9f3e9786a8 Disable nyc coverage reporting on older node versions 2020-12-07 11:46:14 +00:00
Steve-Mcl
b72ea63100 config node userProperties should only permit json 2020-12-07 11:45:02 +00:00
Steve-Mcl
27550f2d4b automatically use resposeTopic if topic is empty 2020-12-07 09:43:52 +00:00
Steve-Mcl
6917919f35 show name as @x if alias is set but topic is not
- e.g. @1 denotes alias 1 is set but topic is empty
2020-12-07 09:41:43 +00:00
Steve-Mcl
48d6fe5918 Merge branch 'dev' into mqtt5 2020-12-07 08:21:59 +00:00
aaronmyatt
c9bc530df0 tests custom cors settings 2020-12-06 15:29:54 +08:00
aaronmyatt
0b569a4120 exercise admin auth pathways 2020-12-05 23:06:18 +08:00
aaronmyatt
950fd7d2cf removes unused dependencies 2020-12-05 15:15:36 +08:00
aaronmyatt
50dd0354d1 adds admin middleware tests 2020-12-04 23:10:28 +08:00
Dave Conway-Jones
78f1cb8a66 ensure trigger timestamp option sends .now()
To close #2771
2020-12-01 23:05:22 +00:00
Nick O'Leary
4bfe9a9ae9 Bump for 1.2.6 2020-11-25 21:09:45 +00:00
Nathanaël Lécaudé
c5d38d8962 Library: properly handle symlinked folders 2020-11-25 21:08:43 +00:00
Nick O'Leary
bbe3ee701f Merge pull request #2768 from natcl/librarySymlinks
Library: properly handle symlinked folders
2020-11-25 21:07:50 +00:00
Nick O'Leary
2f86bb1ca5 Update MQTT to latest to fix Node 8 URL breakage 2020-11-25 21:05:31 +00:00
Nick O'Leary
3999690062 Support Windows paths when installing tarball by path name
Fixes #2769
2020-11-25 21:04:24 +00:00
Nathanaël Lécaudé
b1c0d6b452 Library: properly handle symlinked folders 2020-11-24 18:29:39 -05:00
Kazuhito Yokoi
d57edaa4c1 Update Japanese translations for 1.2.5 (#2764) 2020-11-19 15:09:30 +00:00
Steve-Mcl
3033d2086e Merge remote-tracking branch 'upstream/dev' into mqtt5 2020-11-19 13:45:56 +00:00
Nick O'Leary
0f7d185a61 Ensure runtime side picks up default project workflow mode 2020-11-18 16:37:39 +00:00
Nick O'Leary
81f200641b Allow default project workflow to be set via settings 2020-11-18 16:37:39 +00:00
Nick O'Leary
c6129b44a1 Merge branch 'master' into dev 2020-11-18 16:36:56 +00:00
Nick O'Leary
088419b38e Fix unsecure command usage in GH Action 2020-11-18 11:02:09 +00:00
Nick O'Leary
8ebcee32c2 Bump for 1.2.5 2020-11-17 23:09:07 +00:00
Nick O'Leary
2b801a756a Fix import of config nodes with unknown z property 2020-11-17 23:07:43 +00:00
Nick O'Leary
98b639540b Set ACTIONS_ALLOW_UNSECURE_COMMANDS in GH Action 2020-11-17 22:09:17 +00:00
Nick O'Leary
e0b797fc7e Update changelog 2020-11-17 21:06:21 +00:00
Nick O'Leary
795416a84d Bump for 1.2.4 2020-11-17 21:03:24 +00:00
Nick O'Leary
545dda166f Support bigint types in Debug sidebar 2020-11-17 20:50:29 +00:00
Nick O'Leary
f19ec5d9b6 Clear retained status of deleted nodes 2020-11-17 13:29:13 +00:00
Nick O'Leary
6ea978d83d Prevent needless retention of node status messages 2020-11-16 21:05:13 +00:00
Alex Kaul
42f3b70a22 Update Russian Locale (#2761) 2020-11-16 18:44:18 +00:00
Nick O'Leary
1cd10f074b Update projects dialogs to use TypedInput-cred input 2020-11-16 11:37:32 +00:00
Nick O'Leary
bed1d31bc8 Restore cursor position in TypedInput cred-mode 2020-11-16 11:37:04 +00:00
Nick O'Leary
99478897c5 Ensure config nodes with invalid z are imported somewhere 2020-11-14 14:10:32 +00:00
Nick O'Leary
d79cd463a0 Disable projects when flowFile passed into grunt dev
Useful for quickly testing a standalone flow file
2020-11-14 14:09:24 +00:00
Nick O'Leary
2a8290a4b7 Bump version to 1.3.0-beta.1 2020-11-13 18:23:35 +00:00
martinb
ccf4e73701 cleanup test case for support of out of order messages 2020-11-12 18:56:43 +01:00
martinb
01b67c692b add test case for support of out of order messages support in auto mode of join node if exactly one message has count set 2020-11-12 18:51:14 +01:00
Alex Kaul
4023ab3f28 Add Russian Locale (#2531) 2020-11-12 17:01:44 +00:00
Kazuhito Yokoi
70f3b7450f Add Japanese translation for http-in node (#2758) 2020-11-12 10:21:45 +00:00
Dave Conway-Jones
ca4960e097 Fix CSV node repeating array output
and add tests to cover it
2020-11-10 14:43:59 +00:00
Nick O'Leary
ebe604e1af Ensure user keyboard shortcuts override defaults
Fixes #2753
2020-11-09 21:13:20 +00:00
bartbutenaers
32b04cd32f Disable TypedInput 2020-11-06 08:48:14 +01:00
bartbutenaers
e149174696 Disable TypedInput 2020-11-06 08:45:50 +01:00
Nick O'Leary
f878ffc01b Update changelog 2020-11-05 13:53:22 +00:00
Nick O'Leary
15b49f4db8 Disable 'use strict' checking in Function node
Fixes #2743
2020-11-05 13:48:55 +00:00
Dave Conway-Jones
b1cc7b3296 de-duplicate colour keys 2020-11-05 09:38:34 +00:00
Dave Conway-Jones
65d90a6dff Add gray/grey alternate options for status 2020-11-05 09:20:47 +00:00
Dave Conway-Jones
a58f4c2ec2 remove " from npm install prefix option
to fix npm 7
2020-11-05 09:19:47 +00:00
Kunihiko Toumura
f038069fe2 Messaging API support in Trigger node 2020-11-05 15:09:41 +09:00
Kunihiko Toumura
407cb3e7d5 Messaging API support in Split/Join nodes 2020-11-04 21:43:20 +09:00
Hiroyasu Nishiyama
b8bc62ee11 add example for YAML node 2020-11-03 20:54:04 +09:00
Hiroyasu Nishiyama
ccbd179f23 add example for XML node 2020-11-03 20:06:27 +09:00
Hiroyasu Nishiyama
dac7830bd4 add example for JSON node 2020-11-03 20:06:18 +09:00
Nick O'Leary
75d7ac2d8a Merge pull request #2747 from node-red-hitachi/update-message-jp
update Japanese message catalogue for 1.2.3 release
2020-11-03 10:42:45 +00:00
martinb
468cfeffb6 make split node work with out of order messages as long as one of the messages has msg.parts.count set to the proper value 2020-11-03 09:35:21 +01:00
Hiroyasu Nishiyama
bc82ca2106 add examples for HTML node 2020-11-03 17:32:53 +09:00
Hiroyasu Nishiyama
725c962236 add examples for CSV node 2020-11-03 14:34:34 +09:00
Hiroyasu Nishiyama
6720c1aa46 update Japanese message catalogue for 1.2.3 release 2020-11-03 09:16:13 +09:00
Nick O'Leary
280203e64e Move mosca to ui-test-dependencies list 2020-11-02 21:32:20 +00:00
Nick O'Leary
281d8b7cec Bump for 1.2.3 2020-11-02 21:31:27 +00:00
Nick O'Leary
2c6cda1f27 Handle import errors on initial load and report to user 2020-11-02 21:14:24 +00:00
Kunihiko Toumura
d7dfeaf0c1 Messaging API support in Sort node 2020-11-02 13:31:27 +09:00
Nick O'Leary
fa532da8c7 Merge pull request #2739 from node-red/settings-file
Modify default settings comment
2020-10-29 15:42:00 +00:00
Nick O'Leary
cbf84647de Modify default settings comment 2020-10-29 11:51:30 +00:00
Kunihiko Toumura
dbfbd54e1f Messaging API support in Batch node 2020-10-29 16:16:03 +09:00
Nick O'Leary
c38a490a6f Merge pull request #2737 from node-red/fix-async-settings
Add mutex lock to saveSettings storage call
2020-10-28 22:14:25 +00:00
Nick O'Leary
9d7a450821 Add mutex lock to saveSettings storage call
Fixes #2736
2020-10-28 21:59:22 +00:00
Kunihiko Toumura
8007bea7db Messaging API support in CSV node 2020-10-26 20:25:52 +09:00
Kunihiko Toumura
dc1ab7e331 Add support for Messaging API to delay node 2020-10-26 16:52:18 +09:00
Steve-Mcl
a0d197d0c0 Merge branch 'dev' into mqtt5 2020-10-25 09:52:33 +00:00
Steve-Mcl
a776ba248e correction to retain handling def value 2020-10-25 09:50:57 +00:00
Nick O'Leary
0ecd9673b8 Only apply recovery tab on initial load
Fixes #2731
2020-10-21 10:36:47 +01:00
Nick O'Leary
97aa1230ef Reinstate coveralls reporting to travis build 2020-10-19 21:22:15 +01:00
Nick O'Leary
ff0be73b1f Migrate to nyc instead of istanbul for code coverage 2020-10-19 21:10:34 +01:00
Nick O'Leary
8049e44dec Update CHANGELOG for 1.2.2 2020-10-19 13:25:38 +01:00
Nick O'Leary
dc26022fb4 Prevent node z property getting set to 0 or "" 2020-10-19 13:24:04 +01:00
Nick O'Leary
e8e44f9a32 Only apply z-recovery logic to flow nodes 2020-10-19 13:23:43 +01:00
Nick O'Leary
12d56b8b03 Fix api call to reload flows
Fixes #2726
2020-10-19 12:56:40 +01:00
Nick O'Leary
e62fd7ed15 Remove bad z property from import config nodes 2020-10-19 12:53:03 +01:00
Nick O'Leary
978eb95acd Bump for 1.2.1 2020-10-15 16:22:37 +01:00
Nick O'Leary
e34f4acb22 Fix race condition in .config file migration
Fixes #2724
2020-10-15 16:21:28 +01:00
Steve-Mcl
195aeb5caf mqttv5 progress 2020-10-14 23:30:03 +01:00
Nick O'Leary
15a600c763 Fix tab selection after sidebar tab reorder 2020-10-14 22:10:03 +01:00
Nick O'Leary
82ad5839fa Update changelog and bump dependencies 2020-10-13 21:49:11 +01:00
Nick O'Leary
9af883231d Merge pull request #2722 from node-red-hitachi/fix-link-selection
fix selection of link node not existing within active workspace
2020-10-13 13:56:53 +01:00
Hiroyasu Nishiyama
9bfe8ac007 fix selection of link node not existing within active workspace 2020-10-12 20:16:21 +09:00
Nick O'Leary
f46367d77b Fix import of merged flow 2020-10-12 11:20:44 +01:00
Steve-Mcl
38649de85f debugging 2020-10-10 10:56:10 +01:00
Nick O'Leary
eb2e1c0c45 Merge pull request #2718 from node-red-hitachi/fix-upload-button-width-on-safari
Fix upload button width on Safari
2020-10-09 17:12:35 +01:00
Steve-Mcl
33bb86cbcf mqtt5 1st draft 2020-10-08 20:24:35 +01:00
Jiye Yu
baffc2d6ca update Chinese translation for NodeRed v1.2 (#2719) 2020-10-08 13:17:04 +01:00
Hiroyasu Nishiyama
96ab508c91 move width specification of upload button to scss 2020-10-08 09:07:11 +09:00
Nick O'Leary
57e42659e3 Merge pull request #2716 from node-red-hitachi/fix-sidebar-tab-popup
Fix unexpected line break of sidebar tab name popover
2020-10-07 12:33:02 +01:00
Nick O'Leary
f059e97697 Merge pull request #2717 from node-red-hitachi/i18n-module-list-refresh-tooltip
i18n module refresh tooltip
2020-10-07 11:37:01 +01:00
Hiroyasu Nishiyama
516e6430eb fix upload button width on safari 2020-10-07 13:42:43 +09:00
Hiroyasu Nishiyama
f194a8ecf4 i18n module refresh tooltip 2020-10-07 11:08:23 +09:00
Hiroyasu Nishiyama
13f046f310 fix unexpected line break of sidebar tab name popover 2020-10-07 09:57:34 +09:00
Nick O'Leary
1edf5acb87 Merge pull request #2714 from node-red-hitachi/update-function-node-help-text
Update info text of Function node
2020-10-06 17:46:11 +01:00
Nick O'Leary
af636870d4 Add better error message if context file gets corrupted 2020-10-06 15:42:52 +01:00
Hiroyasu Nishiyama
379b8ada61 update info text of function node 2020-10-06 13:45:00 +09:00
Nick O'Leary
5e63471983 Use markdown editor if editText called with md mode 2020-10-05 20:38:05 +01:00
Nick O'Leary
086f0f8450 Prevent group actions when in non-default mouse mode 2020-10-02 16:07:22 +01:00
Nick O'Leary
97a4b3dc2a Merge branch 'pr_2709' into dev 2020-10-02 11:14:16 +01:00
Kazuhito Yokoi
4eb8d681c1 Update Japanese translations needed for 1.2 (#2710) 2020-10-02 11:07:01 +01:00
Hiroyasu Nishiyama
2066584164 fix to make Japanese import dialogue message single line 2020-10-01 19:25:21 +09:00
Nick O'Leary
a954c198fb Bump version for 1.2.0-beta.1 2020-09-30 10:20:41 +01:00
Nick O'Leary
bb1f8cd5e8 Update CHANGELOG and bump package.json 2020-09-29 20:43:03 +01:00
Nick O'Leary
101e96dcb3 Merge pull request #2665 from node-red/msg-router
Pluggable Message Routing
2020-09-29 20:36:23 +01:00
Nick O'Leary
59adf82895 Merge pull request #2707 from node-red/trigger-delay-override
Allow trigger node delay to be overridden with msg.delay
2020-09-29 20:29:10 +01:00
Nick O'Leary
3b68f56b15 Update top-level copyright statements 2020-09-29 20:28:15 +01:00
Nick O'Leary
2962c4372c Support setting trigger loop interval with msg.delay 2020-09-29 17:47:09 +01:00
Nick O'Leary
517e376582 Restore support for runtimeSyncDelivery flag 2020-09-29 17:39:29 +01:00
Nick O'Leary
7a90fe5aec Fix flow api unit tests 2020-09-29 17:35:43 +01:00
Nick O'Leary
ea45dde63a Remove when.js from runtime/lib/flow/index 2020-09-29 17:20:01 +01:00
Nick O'Leary
22a301b55e Add flows:* events and deprecate nodes-* events 2020-09-29 16:29:10 +01:00
Nick O'Leary
605177dcf0 Validate hook names when they are added 2020-09-29 16:28:52 +01:00
Nick O'Leary
460e1f5563 Fixup merge error 2020-09-29 12:19:27 +01:00
Nick O'Leary
6f25337b99 Add docs for RED.hooks 2020-09-29 12:19:27 +01:00
Nick O'Leary
08148a07b2 Update Node/Flow to trigger msg routing hooks 2020-09-29 12:19:27 +01:00
Nick O'Leary
27c0e45940 Remove unused router component 2020-09-29 12:19:27 +01:00
Nick O'Leary
bdd736315a Add RED.hooks engine 2020-09-29 12:19:27 +01:00
Nick O'Leary
d57ec0cd53 Refactor lib/flows code to include initial router component 2020-09-29 12:19:26 +01:00
Nick O'Leary
952c9d8bdb Upgrade to latest nodemon to fix restart
The grunt-nodemon module we were using is no longer
maintained and is stuck on a 1.x version of nodemon.

At that version, node-red doesn't restart properly
due to our increased signal handling in the core.

This change removes grunt-nodemon and replaces it
with nodemon itself, with a custom task to wrap it
that does the same work as grunt-nodemon was doing.
2020-09-29 12:11:10 +01:00
Nick O'Leary
cf84ec78fa Allow trigger node delay to be overridden with msg.delay 2020-09-28 21:10:23 +01:00
Nick O'Leary
b595e84c30 Update jsdoc of util.getMessageProperty 2020-09-28 14:26:20 +01:00
Nick O'Leary
6e5f115bd5 Improve jsdoc of util.getObjectProperty to clarify thrown error
See #2703
2020-09-28 14:23:23 +01:00
Nick O'Leary
a1ab00c93e sort package dependencies 2020-09-28 14:13:53 +01:00
Nick O'Leary
6e5c4e832e Update dependencies 2020-09-28 11:58:22 +01:00
Nick O'Leary
48ea487974 Update changelog 2020-09-28 11:40:38 +01:00
Nick O'Leary
54dc98a90b Merge pull request #2035 from node-red/simple-git
Add option for simplified git workglow
2020-09-28 11:39:17 +01:00
Nick O'Leary
c5bdd3d056 Allow user to manage project version string 2020-09-28 11:30:46 +01:00
Nick O'Leary
64d6e1f8e1 Changing timing in trigger node test 2020-09-28 10:50:19 +01:00
Nick O'Leary
69d60ffb24 Add simplified git workflow to auto-commit changes 2020-09-28 10:41:33 +01:00
Nick O'Leary
e6ffa3d143 Cache settings when doing initial load 2020-09-28 10:41:05 +01:00
Nick O'Leary
bb4330e486 Clone settings before passing to storage layer
Avoids the storage layer modifying the in-memory object
2020-09-28 10:40:03 +01:00
Nick O'Leary
1a4d720978 Improve timings in trigger node test 2020-09-25 23:32:59 +01:00
Nick O'Leary
91c2f479bb Fix settings file migration test 2020-09-25 18:29:47 +01:00
Nick O'Leary
b61701fa17 Remove UI tests from travis config 2020-09-25 18:00:32 +01:00
Nick O'Leary
cb9f910642 Update changelog 2020-09-25 17:19:02 +01:00
Nick O'Leary
4b8d07f301 Merge branch 'pr_2644' into dev 2020-09-25 17:11:39 +01:00
Nick O'Leary
2db3a4f1ef Add unit tests for function node init code 2020-09-25 17:11:10 +01:00
Nick O'Leary
ead1f65887 Disable selection FA icons when dbl clicking node 2020-09-25 16:03:21 +01:00
Nick O'Leary
aae9866866 Update changelog 2020-09-25 15:58:33 +01:00
Nick O'Leary
085ff84bc9 Merge pull request #2704 from node-red/split-config
Split .config.json into separate files
2020-09-25 15:56:32 +01:00
Nick O'Leary
e12975cf0b Do not remove old config.json file to ease downgrade path 2020-09-25 15:50:26 +01:00
Nick O'Leary
a33cf6b532 Merge branch 'master' into dev 2020-09-25 11:53:37 +01:00
Nick O'Leary
5be25d9538 Merge branch 'pr_2705' 2020-09-25 11:53:15 +01:00
Nick O'Leary
2b29eeb795 Add unit test for module path 2020-09-25 11:52:48 +01:00
t.kawamorita
785561a0cc fix getModuleFiles function 2020-09-25 11:58:03 +09:00
Nick O'Leary
b46dc88346 Update changelog 2020-09-24 18:12:52 +01:00
Nick O'Leary
96d81ef72b Add slight delay to fix config.json file tests 2020-09-24 16:54:24 +01:00
Nick O'Leary
81dc3de26a Ensure errors in ACE NRJavaScript mode are on valid lines
In the case of an "Unmatched {" error, it flags the { on
the line we wrap the user's code in. That doesn't help the
user.

This fix moves such an error to the first valid { in the file.

It handles ignoring { in comments or strings. It fails to ignore
{ inside regex. But that's an edge case on top of an edge case.
2020-09-24 16:29:05 +01:00
Nick O'Leary
4d0c572c2e Fix .config.json unit tests 2020-09-24 15:42:52 +01:00
Nick O'Leary
fb2da0ee9e Split .config.json into separate files 2020-09-23 17:29:09 +01:00
Nick O'Leary
b8b0247717 Default flowFilePretty to true if projects enabled 2020-09-23 10:57:58 +01:00
Nick O'Leary
103e212aee Fix size of context sidebar refresh toggle buttons 2020-09-22 23:44:10 +01:00
Nick O'Leary
2f33575907 Merge branch 'dev' of github.com:node-red/node-red into dev 2020-09-21 20:12:42 +01:00
Nick O'Leary
576c528573 Merge pull request #2698 from node-red/import-dupes
Improved handling of importing duplicate subflow/config nodes
2020-09-21 18:30:15 +01:00
Nick O'Leary
3c444d3fb3 Merge branch 'master' into dev 2020-09-21 14:25:30 +01:00
Nick O'Leary
7cb499cde9 Sanitize unknown node type when displaying 2020-09-21 14:00:01 +01:00
Nick O'Leary
5a174ba014 Add comment highlighting to JSONata and fix regex handling
Closes #2701
2020-09-21 11:52:33 +01:00
Nick O'Leary
041feb4e86 Ensure sf instance nodes update in outliner when import-replace sf 2020-09-18 20:56:16 +01:00
Nick O'Leary
19726cf428 Fix setting of esversion in nrjavascript worker 2020-09-16 23:21:52 +01:00
Nick O'Leary
aaf134b1c5 Update ACE to 1.4.12-src-min-noconflict
Fixes #1988
2020-09-16 19:13:40 +01:00
Nick O'Leary
9d5f5ee94b Update to MQTT 4.2.1
Closes #2694
2020-09-16 16:56:39 +01:00
Nick O'Leary
a48f0827ae Detect importing duplicate nodes and help user resolve 2020-09-16 11:59:13 +01:00
Nick O'Leary
5686158245 Allow toggleButton icons to be optional 2020-09-16 11:59:13 +01:00
Nick O'Leary
3824cdde68 Allow treeList to have a header component 2020-09-16 11:59:13 +01:00
Nick O'Leary
e619b9bf7b Merge pull request #2691 from node-red/recover-nodes
Recover nodes with invalid z property
2020-09-16 11:56:29 +01:00
Nick O'Leary
b7243c2226 Merge branch 'master' into dev 2020-09-16 11:54:34 +01:00
Nick O'Leary
70b6674f44 Replace Math.random with crypto.getBytes for session tokens 2020-09-11 14:09:54 +01:00
Nick O'Leary
ef67b8481e Check file exists before trying to take backup 2020-09-11 13:26:00 +01:00
Nick O'Leary
baffe4861c Handle undefined value in Debug view of Array and Object
Fixes #2696
2020-09-07 21:05:27 +01:00
Nick O'Leary
5cf489a270 Fixup node test 2020-09-04 09:52:30 +01:00
Nick O'Leary
44b1819926 Merge pull request #2693 from mgroenhoff/master
Fix `this` context when calling multiple event listeners (fixes #2692).
2020-09-04 09:33:23 +01:00
Melvin Groenhoff
d84c2b780b Fix this context when calling multiple event listeners (fixes #2692). 2020-09-04 10:20:30 +02:00
Nick O'Leary
dc8991a1da Ensure recoverd nodes tab is added to outliner properly 2020-09-03 20:24:50 +01:00
Nick O'Leary
7bd0ca2212 Handle nodes with invalid z property
Closes #2170
2020-09-03 18:31:33 +01:00
Nick O'Leary
4dd619b8c6 Merge branch 'master' into dev 2020-09-03 16:14:55 +01:00
Nick O'Leary
3a86ab186c Merge branch 'dev' of github.com:node-red/node-red into dev 2020-09-03 15:23:41 +01:00
Nick O'Leary
2f2a6367c2 Merge pull request #2684 from node-red/skip-html
Avoid loading node html if disableEditor set
2020-09-03 15:02:09 +01:00
Nick O'Leary
be880c25f9 Merge pull request #2682 from node-red/upload-npm
Add support for file upload on /nodes api
2020-09-03 15:01:31 +01:00
Nick O'Leary
17812f0d77 Merge pull request #2683 from node-red/write-to-temp
Update util.writeFile to write to tmp file before rename
2020-09-03 15:00:31 +01:00
Nick O'Leary
0c5eae2349 Merge pull request #2679 from rorysavage77/mutex-for-flow-modification
Updated flow modification methods to support mutex serialization
2020-09-03 14:17:56 +01:00
Nick O'Leary
3ad1803057 Merge pull request #2655 from node-red/reorder-sidebar
Reorderable sidebar tabs
2020-09-03 14:07:17 +01:00
Nick O'Leary
02c20e97b7 Only recalculate group label offsets when needed 2020-09-03 13:49:42 +01:00
Nick O'Leary
716dc781e4 Reuse first group name/style when merging elements
Fixes #2680
2020-09-03 13:28:35 +01:00
Nick O'Leary
d9900d8e4c Fix copy/paste of node into active group
Fixes #2686
2020-09-03 13:12:08 +01:00
Nick O'Leary
3b9065b057 Prevent Enter on search box from reloading page
Fixes #2678
2020-09-03 11:22:41 +01:00
Nick O'Leary
e73b748b95 Merge branch 'dev' of github.com:node-red/node-red into dev 2020-09-03 11:17:09 +01:00
Nick O'Leary
b309161f00 Merge pull request #2685 from node-red-hitachi/dev-tracemetric
Add 'done' metric log for message tracing
2020-09-03 11:16:26 +01:00
Nick O'Leary
b21667834e Tweak upload dialog margin 2020-08-26 10:37:21 +01:00
Nick O'Leary
183fa59c83 Add tgz upload button to palette manager 2020-08-26 00:15:36 +01:00
Kunihiko Toumura
0c5586ddfb Add 'done' metric log for message tracing 2020-08-18 09:28:50 +09:00
Nick O'Leary
33855bcb8b Skip loading node html if disableEditor set 2020-08-14 00:20:44 +01:00
Nick O'Leary
dc81b7a699 Add --userDir=/tmp/foo support to grunt dev 2020-08-14 00:08:09 +01:00
Nick O'Leary
b0b2c32654 Update util.writeFile to write to tmp file before rename 2020-08-13 17:17:40 +01:00
Nick O'Leary
6f1ed76b4c Add support for file upload in /nodes api 2020-08-13 15:54:54 +01:00
Rory A. Svage
f81cee0be2 Message 2020-08-07 16:44:52 -04:00
Nick O'Leary
bcd85b11a1 Merge branch 'master' into dev 2020-08-05 15:19:54 +01:00
Nick O'Leary
ec368ae3fd Bump for 1.1.3 2020-08-05 14:59:25 +01:00
Nick O'Leary
d28c264422 Fix jshint error on polyfill 2020-08-05 14:58:43 +01:00
Nick O'Leary
fba505bc90 Fix vertical align of fa node icons
Fixes #2670
2020-08-05 13:53:49 +01:00
Kazuhito Yokoi
c50ed2c328 Add Japanese translation for empty rules in switch node 2020-08-05 11:22:23 +01:00
Nick O'Leary
7e11ff2b20 Update packages/node_modules/@node-red/nodes/locales/en-US/function/10-switch.html 2020-08-05 11:22:14 +01:00
Nathanaël Lécaudé
3fb83c46e2 Update 10-switch.html
Clarify switch help regarding booleans for the is empty / is not empty rules.
2020-08-05 11:22:04 +01:00
Nick O'Leary
763f2bd5c5 Merge pull request #2669 from kazuhitoyokoi/dev-jpn4switch
Update Japanese translation for switch node
2020-08-05 11:20:17 +01:00
Nick O'Leary
85edee288f Allow lasso selection to be restricted to active group 2020-08-05 11:16:53 +01:00
Nick O'Leary
1aa494a97a Make ctrl-click on nexted group more intuitive 2020-08-05 10:38:14 +01:00
Nick O'Leary
a8e7627184 Support select-all inside active group 2020-08-04 21:01:08 +01:00
Nick O'Leary
d590bbdd2c Fix copy/paste of nested groups 2020-08-04 20:59:51 +01:00
Nick O'Leary
80d65b5acb Add Set(iterable) polyfill for IE11 2020-08-04 20:59:32 +01:00
Kazuhito Yokoi
1d250f7491 Add Japanese translation for empty rules in switch node 2020-08-04 21:41:23 +09:00
Nick O'Leary
dd741ec6d8 Merge pull request #2649 from natcl/patch-5
Clarify empty rules in switch node documentation
2020-08-03 16:59:25 +01:00
Nick O'Leary
e741af6d55 Update packages/node_modules/@node-red/nodes/locales/en-US/function/10-switch.html 2020-08-03 16:58:09 +01:00
Nick O'Leary
e691b1b7c3 Add additional check for git auth failure response
Fixes #2656
2020-08-03 16:55:36 +01:00
Sebastian Raff
29142128f2 german translation, wording (#2660) (#2666)
to also close #2660
2020-08-02 18:34:10 +01:00
Nick O'Leary
758f44e25f Improve performance of moving groups 2020-07-31 23:22:33 +01:00
Nick O'Leary
16c26d8098 Move runtime settings back to adminApi from editorApi
Fixes #2662
2020-07-31 15:26:21 +01:00
Nick O'Leary
a004c61afc Merge pull request #2653 from node-red-hitachi/dev-messaging-api-cherrypick
Messaging API support of core nodes (cherrypicked)
2020-07-23 15:19:52 +01:00
Nick O'Leary
a9d1a64c32 Merge pull request #2661 from node-red-hitachi/master-zh
Update Chinese message for debug node
2020-07-23 15:09:36 +01:00
Dave Conway-Jones
889224715b Fix hhp-in to handle application/cbor as binary
as per discussion https://discourse.nodered.org/t/http-request-node-invalid-message-body-was-specified-to-be-cbor-but-could-not-decode-message-failed-to-parse/30503
2020-07-23 10:04:24 +01:00
Nick O'Leary
442b9d23f1 Remove filtering of duplicate fa icons 2020-07-22 14:51:07 +01:00
JIYE YU
e4dd895709 update Chinese message for debug node 2020-07-22 12:54:07 +09:00
Nick O'Leary
82677c304e Show node help when switching node edit dialogs
Fixes #2652
2020-07-16 16:12:16 +01:00
Nick O'Leary
73d8dfe381 Allow sidebar tabs to be reordered
The sidebar tab buttons can now be dragged to reorder them.

Changes to the order are stored in user preferences.
2020-07-15 11:26:08 +01:00
Kunihiko Toumura
1177aa8aca new-style callback function (yaml node) 2020-07-14 19:20:37 +09:00
Kunihiko Toumura
0eda0a4935 new-style callback function (xml node) 2020-07-14 19:18:05 +09:00
Kunihiko Toumura
a19dab0dc9 new-style callback function (json node) 2020-07-14 19:15:31 +09:00
Kunihiko Toumura
d8eb80b72e new-style callback function (html node) 2020-07-14 19:10:56 +09:00
Kunihiko Toumura
4f3a6821d1 new-style callback function (http response node) 2020-07-14 19:08:22 +09:00
Kunihiko Toumura
77bd7541ca new-style callback function (template node) 2020-07-14 19:05:41 +09:00
Kunihiko Toumura
ca46bc5366 new-style callback function (range node) 2020-07-14 19:02:41 +09:00
Kunihiko Toumura
2e19bc07df new-style callback function (link in/out node) 2020-07-14 18:59:09 +09:00
Kunihiko Toumura
3f4de43b67 new-style callback function (status node) 2020-07-14 18:56:16 +09:00
Kunihiko Toumura
0d0bf62fc4 new-style callback function (catch node) 2020-07-14 18:53:21 +09:00
Kunihiko Toumura
3c8654fa25 new-style callback function (complete node) 2020-07-14 18:50:03 +09:00
Kunihiko Toumura
756a6ec5aa new-style callback function (inject node) 2020-07-14 18:46:38 +09:00
Nick O'Leary
98c7364924 Ensure group theme picks up theme defaults properly
Fixes #2651
2020-07-13 20:44:53 +01:00
Nick O'Leary
62c01b59b2 Extend release action to update website 2020-07-10 21:46:00 +01:00
Nick O'Leary
43db1824be Bump for 1.1.2 2020-07-10 20:13:05 +01:00
Nick O'Leary
7f671c9f3f Ensure unknown nodes removed from outliner when node registers
Fixes #2646
2020-07-10 20:00:18 +01:00
Nathanaël Lécaudé
410009dd61 Update 10-switch.html
Clarify switch help regarding booleans for the is empty / is not empty rules.
2020-07-10 13:08:40 -04:00
Nick O'Leary
580cc00967 Fix all the touch screen issues 2020-07-10 16:00:38 +01:00
Nick O'Leary
612c565cfd Add RED.view.redrawStatus to avoid full redraw on update 2020-07-10 16:00:18 +01:00
Nick O'Leary
979c5351a8 Ensure node/group xrefs are consistent on import 2020-07-10 15:59:28 +01:00
Nick O'Leary
97b7479081 Disable keyboard handler when dialogs are open 2020-07-09 20:41:55 +01:00
Nick O'Leary
1df2f5e96a Allow Comms websocket auth to be done via token header
Fixes #2642
2020-07-09 19:07:51 +01:00
cinhcet
0601833387 msgid added in vm to avoid unneccesary if statement 2020-07-08 19:09:07 +02:00
Nick O'Leary
8b36279e52 Bump version 1.2.0-alpha.1 2020-07-08 15:57:32 +01:00
Nick O'Leary
32163d5f21 Update changelog 2020-07-08 13:26:48 +01:00
Nick O'Leary
1c337f6817 Fix connecting wires to subflow status or io ports on touchscreen 2020-07-08 13:22:26 +01:00
Nick O'Leary
6df26f2400 Bump for 1.1.1 2020-07-08 10:30:20 +01:00
Nick O'Leary
a9431a5aee Merge pull request #2645 from kazuhitoyokoi/master-addjpn
Update Japanese message for debug node
2020-07-08 10:08:49 +01:00
Kazuhito Yokoi
5a3c832a98 Update Japanese message for debug node 2020-07-08 16:20:02 +09:00
Nick O'Leary
c4b5bb22db Tidy up commit msg on docker update action 2020-07-08 01:13:14 +01:00
Nick O'Leary
2b5a976f35 Add github action to auto-update docker repo version on release publish 2020-07-08 01:02:18 +01:00
cinhcet
5d7a625883 expose send, status, log, warn, error, debug, trace, name, id in setup code of function node 2020-07-08 01:30:29 +02:00
Nick O'Leary
ae1ca85924 Update Debug status label 2020-07-07 22:10:47 +01:00
Nick O'Leary
c9acfdb1d7 Set apiRootUrl for debug pop-out to load locales properly
Fixes #2629, #2630
2020-07-07 21:14:44 +01:00
Nick O'Leary
11ac8fbf13 Ensure groups are removed when deleting subflows 2020-07-07 18:23:42 +01:00
Nick O'Leary
dc541444ba Merge pull request #2638 from node-red/Clean-up-debug-status-/-remove-loops
fix debug status to not loop, make migration more seamless, detect status type objects
2020-07-07 13:37:05 +01:00
Nick O'Leary
8ea25bcd1c Update build-custom-theme to handle keyframes properly
Fixes #2636

Also adds a header to the generated CSS identifing the version
of NR and date/time it was generated.
2020-07-07 11:38:07 +01:00
Nick O'Leary
f5e46a663a Remove hardcoded css and allow group to default from theme
Fixes #2633
2020-07-07 11:01:05 +01:00
Nick O'Leary
64ec415a54 Add RED.view.DEBUG_SYNC_REDRAW to disable requestAnimationFrame
References #2631
2020-07-06 21:01:14 +01:00
Nick O'Leary
57154b2853 Authenticate websocket comms using user-provided token if present
Fixes #2642
2020-07-06 20:45:07 +01:00
Nick O'Leary
0243a902b2 Fix up subflow port wiring 2020-07-06 18:11:47 +01:00
Nick O'Leary
6c04402a98 Prevent wiring to node with no corresponding port
Fixes #2641
2020-07-06 17:32:44 +01:00
Nick O'Leary
ef7c9b5c2a Get group order right in history events to ensure proper handling 2020-07-06 16:00:15 +01:00
Nick O'Leary
73448a6039 Avoid copying duplicate nodes to internal clipboard 2020-07-06 16:00:15 +01:00
Dave Conway-Jones
176a0ff99b add words avout indepedence of messages being delayed. 2020-07-06 10:33:26 +01:00
Dave Conway-Jones
b96d562700 fix debug status to not loop, make migration more seamless, detect status type objects 2020-07-04 15:26:02 +01:00
Nick O'Leary
7a3ead8f3b Merge branch 'dev' 2020-06-30 17:46:43 +01:00
Nick O'Leary
f72903ccc2 Update changelog 2020-06-29 21:12:12 +01:00
Nick O'Leary
668678b2c4 Bump version to 1.1.0 2020-06-29 21:08:34 +01:00
Nick O'Leary
e2802175a5 Clear outline focus on config node sidebar panel 2020-06-29 21:07:21 +01:00
Nick O'Leary
71c5b1be86 Merge pull request #2628 from Steve-Mcl/dev
Add developer options
2020-06-29 20:51:11 +01:00
Nick O'Leary
44da085e0b Tweak group margin to fit node status and look better 2020-06-29 20:43:25 +01:00
Nick O'Leary
362554ad3b Switch JSONata expr does not require msg.parts.count 2020-06-29 09:32:52 +01:00
Dave Conway-Jones
f01866d76f Fix backwards migration of inject without topic 2020-06-28 15:09:07 +01:00
Steve-Mcl
53490cd368 Add developer options
- permits npm run build-dev.  skips minification & doesnt launch nodemon
- permits npm run dev for those without grunt installed globally
2020-06-27 11:24:06 +01:00
Nick O'Leary
c171088838 Fix reparenting nodes in outliner when they change 2020-06-26 17:21:20 +01:00
Nick O'Leary
0cc944dc5a Update changelog 2020-06-26 16:02:19 +01:00
Nick O'Leary
8bd8834237 Add default shortcut for core:show-help-tab 2020-06-26 15:58:02 +01:00
Nick O'Leary
84fc739c8d Merge pull request #2626 from node-red-hitachi/dev-zhcn
Update both zh-CN and zh-TW translation for release 1.1.0
2020-06-26 15:54:47 +01:00
JIYE YU
a7fa2cf0c9 update zh-TW translation for release-1.1.0 2020-06-26 10:40:17 +09:00
JIYE YU
1137cd5ca5 update zh-CN translation for nodes information 2020-06-26 10:38:41 +09:00
Nick O'Leary
d47906b525 Simplify example https settings 2020-06-25 20:10:26 +01:00
JIYE YU
13a59a882e update zh-CN translation for editor-client 2020-06-25 18:31:36 +09:00
Nick O'Leary
3b7348f862 Update changelog 2020-06-24 14:51:18 +01:00
Nick O'Leary
07585f01e3 Ensure all examples are consistently named 2020-06-24 14:43:27 +01:00
Nick O'Leary
5042137006 Merge branch 'pr_2585' into examples 2020-06-24 13:50:50 +01:00
Nick O'Leary
a2ea79130c Merge branch 'pr_2550' into examples 2020-06-24 13:49:56 +01:00
Nick O'Leary
979401f3ac Merge branch 'pr_2549' into examples 2020-06-24 13:49:33 +01:00
Nick O'Leary
4c98db2269 Outliner - add empty item when last config node moved 2020-06-24 13:18:46 +01:00
Nick O'Leary
209c5f337c Join node - clear timeout when msg.reset received
Fixes #2471
2020-06-24 10:02:42 +01:00
Nick O'Leary
8080ed4787 Merge pull request #2623 from node-red-hitachi/update-subflow-message-jp
Update subflow message jp
2020-06-23 16:18:36 +01:00
Nick O'Leary
f3be5f0e67 Merge pull request #2624 from node-red-hitachi/fix-subflow-input
Fix error on empty subflow input types
2020-06-23 16:18:02 +01:00
Hiroyasu Nishiyama
fb2d185c5f fix typedInput error on empty subflow input types 2020-06-23 09:24:29 +09:00
Hiroyasu Nishiyama
f2d696b48e update JP message catalogue for subflow input type 2020-06-23 08:39:44 +09:00
Dave Conway-Jones
5596d2df8e catch tiny possible escape for "\n " in exec command node label. 2020-06-22 22:41:22 +01:00
Dave Conway-Jones
b72ca439e2 Fix tcp in node finishing packets when in streaming base64 receive mode. 2020-06-22 22:40:15 +01:00
Nick O'Leary
432ed264c2 Remove hardcoded css
Fixes #2603
2020-06-22 20:39:41 +01:00
Nick O'Leary
0a411cbe4f Fix node button mouse pointer css 2020-06-22 14:37:52 +01:00
Nick O'Leary
581f71911a Change node linebreak handling to use "\n " 2020-06-22 13:08:35 +01:00
Nick O'Leary
e548bf8bc2 Handle import of node with non-default number of outputs 2020-06-22 10:43:09 +01:00
Nick O'Leary
1d944bab51 Improve display of focussed form element 2020-06-18 22:25:19 +01:00
Nick O'Leary
6f407750f5 Fix clearing group label 2020-06-18 22:25:00 +01:00
Nick O'Leary
19ffe8f308 Default group label to be shown and improve toggle button 2020-06-18 22:24:44 +01:00
Nick O'Leary
c9069d472f Make color/icon/label-pos pickers keyboard navigable 2020-06-18 22:23:50 +01:00
Nick O'Leary
68d3cc7507 Fix node toggle button initial opacity 2020-06-18 10:18:35 +01:00
Nick O'Leary
0c90376752 Align node labels on FF
FF doesn't seems to use alignment-baseline CSS class in the same
way Chrome does. Switched to domintant-baseline.
2020-06-18 10:11:22 +01:00
Hiroyasu Nishiyama
f5eb832cd2 merge template node example #1 and #4 2020-06-18 14:03:33 +09:00
Hiroyasu Nishiyama
c3a058a479 fixed switch node example#8 imported as flow 2020-06-18 13:56:01 +09:00
Hiroyasu Nishiyama
bc87210ce3 change scale and limit to limit and fixed typo 2020-06-18 13:35:09 +09:00
Hiroyasu Nishiyama
d595eb2614 change exec node example to use echo command and merge two examples 2020-06-18 13:12:58 +09:00
Hiroyasu Nishiyama
cb4d118ccc remove delay node example#6 from cookbook 2020-06-18 11:25:05 +09:00
Hiroyasu Nishiyama
62c723866a fix typos 2020-06-18 10:41:36 +09:00
Nick O'Leary
c9e54f2ba9 Bump for 1.1.0-beta.3 2020-06-17 10:54:15 +01:00
Nick O'Leary
e2c86c4b96 Fix wiring nodes from input back to output 2020-06-17 10:52:41 +01:00
Nick O'Leary
4469a334fd Fix sometimes unable to keyboard-move group to left/up 2020-06-17 09:57:25 +01:00
Nick O'Leary
aca379db6e Fix group position in outliner 2020-06-16 20:48:28 +01:00
Nick O'Leary
9ce5210c33 Handle unknown nodes with no icon 2020-06-16 20:34:45 +01:00
Nick O'Leary
4dd68452b4 Prevent node creep when switching tabs 2020-06-16 20:23:18 +01:00
Nick O'Leary
714b3d3fe0 Bump version to 1.1.0-beta.2 2020-06-16 15:21:03 +01:00
Nick O'Leary
2378e0d961 Fix up linting in search.js 2020-06-16 15:08:30 +01:00
Nick O'Leary
f78bbdc29f Update CHANGELOG for 1.1.0-beta.2 2020-06-16 15:03:56 +01:00
Nick O'Leary
708620f929 Merge pull request #2605 from johanneskropf/patch-1
use bash as shell for exec command if on linux
2020-06-16 14:45:34 +01:00
Nick O'Leary
9f0490fc12 Merge pull request #2619 from kazuhitoyokoi/dev-fixuitest3
Fix page object of inject node
2020-06-16 14:38:15 +01:00
Nick O'Leary
d37eebd8ed Merge pull request #2618 from kazuhitoyokoi/dev-addjpntranslations
Fix i18n bug in outliner
2020-06-16 14:22:55 +01:00
Kazuhito Yokoi
bfeda23ce5 Fix page object of inject node 2020-06-16 21:58:08 +09:00
Kazuhito Yokoi
52eb158231 Add Japanese translations for outliner, jsonata and runtime 2020-06-16 21:32:10 +09:00
Nick O'Leary
afb782410d Merge pull request #2617 from kazuhitoyokoi/dev-fixuitest2
Fix page object of debug node
2020-06-16 10:57:16 +01:00
Nick O'Leary
aebb7da3c7 Fix deleting node in group after changing selection 2020-06-16 10:54:50 +01:00
Kazuhito Yokoi
b90710945a Fix page object of debug node 2020-06-16 11:45:27 +09:00
Nick O'Leary
56efd51c06 Fixup padding of quick-add search box 2020-06-15 22:31:47 +01:00
Nick O'Leary
76728d1783 Move config nodes under type-level hierarchy in outline
Also adds user-count label and button to open search
2020-06-15 22:31:47 +01:00
Nick O'Leary
5b1fe9aa0a Emit nodes:change event for config node users list modified 2020-06-15 22:31:47 +01:00
Nick O'Leary
e3c8466819 Merge pull request #2616 from kazuhitoyokoi/dev-fixuitest
Fix page object of inject node
2020-06-15 22:27:30 +01:00
Kazuhito Yokoi
6a70cd1975 Fix page object of inject node 2020-06-15 20:36:41 +09:00
Nick O'Leary
2c45771024 Merge pull request #2593 from kazuhitoyokoi/master-adduitest4travis
Enable automated UI testing on Travis CI
2020-06-15 11:14:14 +01:00
Nick O'Leary
ebca8c0217 Increase group margin to avoid clash with status text 2020-06-14 23:44:26 +01:00
Nick O'Leary
752a080876 Fix event order when quick-adding node to group 2020-06-14 23:44:01 +01:00
Nick O'Leary
0541d9189d Switch RED.events.DEBUG messages to warn to get stacktraces 2020-06-14 23:43:15 +01:00
Nick O'Leary
0e454b08c8 Fix empty item handling for subflows/config in outliner 2020-06-14 22:46:59 +01:00
Nick O'Leary
2d0ca20a03 Fix search indexing of group nodes 2020-06-14 22:46:46 +01:00
Nick O'Leary
61d9ccf263 Avoid regenerating every node label on redraw 2020-06-13 23:02:10 +01:00
Hiroyasu Nishiyama
1c30584153 fix code indentation 2020-06-13 23:33:45 +09:00
Hiroyasu Nishiyama
5c5bebd689 fix handling of multi-line node label 2020-06-13 23:28:10 +09:00
johanneskropf
d9548a2891 moved check for shell 2020-06-12 17:14:11 +02:00
johanneskropf
d25e027201 moved building of execOpt object to line 36 2020-06-12 17:10:31 +02:00
Nick O'Leary
93211470d1 Merge pull request #2611 from node-red-hitachi/fix-group-merge-activation
Disable group merge for single item or non-group items
2020-06-12 08:50:12 +01:00
Nick O'Leary
b5800205c4 Merge pull request #2610 from node-red-hitachi/fix-charAt-error-on-undefined
Fix char at error on undefined when opening websocket-listner
2020-06-12 08:49:34 +01:00
Nick O'Leary
eeebf04509 Merge pull request #2609 from node-red-hitachi/fix-remove-from-group
fix empty placeholder not shown on remove from group
2020-06-12 08:49:09 +01:00
Nick O'Leary
f4f99f594d Merge pull request #2612 from node-red-hitachi/fix-group-position
Fix group position of empty group with multi-line label
2020-06-12 08:48:33 +01:00
Hiroyasu Nishiyama
5e8e739f78 fix position of empty group with multi-line label 2020-06-12 16:07:46 +09:00
Hiroyasu Nishiyama
a15adc43af merge code for checking menu activation 2020-06-12 09:54:11 +09:00
Hiroyasu Nishiyama
07556592c1 disable merge group menu for single item or non-group item 2020-06-12 08:42:15 +09:00
Hiroyasu Nishiyama
7694349078 prevent charAt call on websocket listener 2020-06-11 23:00:56 +09:00
Hiroyasu Nishiyama
4f3cb3103e make treelist of subflow/config nodes initialy has empty placeholder 2020-06-11 22:18:31 +09:00
Hiroyasu Nishiyama
842cd1ecf0 fix empty placeholder not shown on remove from group 2020-06-11 09:57:43 +09:00
Nick O'Leary
81a4f42673 Merge pull request #2607 from node-red-hitachi/fix-stringify-error
prevent conversion of circular structure
2020-06-10 13:38:32 +01:00
Hiroyasu Nishiyama
152e695f4c prevent conversion of circular structure 2020-06-10 19:56:16 +09:00
Nick O'Leary
5a0c10b80e Handle null status text in the editor
Fixes #2606
2020-06-10 10:58:44 +01:00
johanneskropf
06adf3d346 use bash as shell for exec command if on linux
This relates to:
https://github.com/node-red/node-red/issues/2604
and
https://discourse.nodered.org/t/exec-node-timeout-not-working-in-exec-mode/28040
and is a possible workaround for most issues related to kill described there.
This has only been tested on linux where this change applies so it would most definitely need more testing on windows/mac and maybe linux distributions where there is no bash(?).
2020-06-10 11:24:56 +02:00
Nick O'Leary
7be824640c Fix snapToGrid 2020-06-10 01:02:48 +01:00
Nick O'Leary
c061487a16 Massively reduce our dependency on d3 to render the view
This is a slightly scary set of changes to be making. It overhauls
how the view is rendered.

Rather than use d3 for every single part of generating the view,
we new use native DOM functions as much as possible.

d3 is still used for the basic heavy lifting of working out what
nodes/links etc need to be added/removed from the view. But once
it comes to rendering them, d3 is side-lined as much as possible.

There's room for further improvement. This change focusses on Nodes
and Links. It has not touched groups, subflow-ports and link-nodes.
2020-06-10 00:45:20 +01:00
Nick O'Leary
97fd34150f EditableList/TreeList - defer adding elements to DOM
Whenever a DOM element is modified, it causes the browser to re-examine
the whole hierarchy around the element to see if anything needs to change.

This can cause a lot of extra work if an element is added to the DOM and
then a lot of updates are applied to the element.

It is much better to get the element as close to its final state as
possible *before* adding it to the DOM.
2020-06-10 00:42:11 +01:00
Nick O'Leary
6d294a0c74 Prevent RED.stop being called multiple times if >1 signal received 2020-06-09 08:23:12 +01:00
Nick O'Leary
fe4ef354ac Flag a node as removed when it is disabled 2020-06-08 20:59:00 +01:00
Nick O'Leary
d28b8b5e8d Some performance improvements for TreeList 2020-06-08 17:13:05 +01:00
Nick O'Leary
f2b30d9a3f Resize info/help sidebars whenever sidebar is opened 2020-06-08 13:17:06 +01:00
Nick O'Leary
0a614f2741 Add search defaults to outliner searchBox 2020-06-08 12:02:21 +01:00
Nick O'Leary
a9fb50787b Add search presets option to searchBox widget 2020-06-08 12:01:29 +01:00
Nick O'Leary
ce7d7a8e01 Add RED.popover.menu as a new type of menu widget 2020-06-08 12:01:05 +01:00
Nick O'Leary
7006c00233 Add support for is:XYZ search flags
- is:unused
 - is:config
 - is:subflow
 - is:invalid
2020-06-08 11:55:24 +01:00
Nick O'Leary
21866634b3 Track subflow instances on the subflow node itself 2020-06-08 11:49:43 +01:00
Nick O'Leary
34dfd50702 Bump node-red-admin 0.2.6 2020-06-06 10:35:07 +01:00
Nick O'Leary
d9502a6c00 Refresh outline filter whenever something changes
Fixes #2601
2020-06-05 22:19:46 +01:00
Nick O'Leary
95f7b9205a Fix Help tab search box appearance 2020-06-05 17:14:25 +01:00
Nick O'Leary
d14d4944a0 Rename Node Information to Information in sidebar 2020-06-05 17:14:08 +01:00
Nick O'Leary
b4b2729e96 Do a sync-redraw after clearing to ensure clean state 2020-06-05 16:56:12 +01:00
Nick O'Leary
299b81f51b Fix Link node filter
Fixes #2600
2020-06-05 16:20:40 +01:00
Nick O'Leary
ad6b18e66f Make catch/status/complete/link filter case-insensitive 2020-06-05 16:00:02 +01:00
Nick O'Leary
091a462a42 Add 'add' option to touch radialMenu for quick-add dialog 2020-06-05 15:48:45 +01:00
Dave Conway-Jones
cb218a57f1 Merge branch 'dev' of https://github.com/node-red/node-red into dev 2020-06-05 11:22:42 +01:00
Dave Conway-Jones
ba8649117d ensure trigger node detects changes to number of outputs 2020-06-05 11:22:38 +01:00
Nick O'Leary
20daebd965 Ignore whitespace when checking function setup/close code 2020-06-05 10:36:49 +01:00
Nick O'Leary
7c2786969a Preserve event handlers when moving outliner items 2020-06-05 09:55:36 +01:00
Nick O'Leary
565aae5967 Add tooltips to outliner buttons 2020-06-05 09:55:36 +01:00
Dave Conway-Jones
16a634063a Fix debug node status to migrate old nodes to correct default mode. 2020-06-05 09:48:12 +01:00
Nick O'Leary
4c28b5b227 Only validate nodes once they have all been imported
This ensures any checks for dependent config nodes will pass
2020-06-04 17:06:29 +01:00
Nick O'Leary
a7a949377b Ensure configNode.users is updated properly on import 2020-06-04 17:06:11 +01:00
Nick O'Leary
c048b1a25b Exit with non-0 rc if admin command fails 2020-06-04 11:02:48 +01:00
Nick O'Leary
f7e7f7ed01 Add $moment docs 2020-06-04 09:46:17 +01:00
Nick O'Leary
5dfcb80de8 Fixing typos in the changelog 2020-06-04 00:05:12 +01:00
Nick O'Leary
c8f6100a6a Assume -d params are strings if they don't otherwise parse 2020-06-04 00:04:41 +01:00
Nick O'Leary
c0f4e07e10 Bump dependencies 2020-06-03 21:26:31 +01:00
Nick O'Leary
3c259b2c22 Update changelog 2020-06-03 21:10:28 +01:00
Nick O'Leary
3b3a2d4edc Merge pull request #2592 from node-red/admin-cli
Add node-red admin support
2020-06-03 20:59:19 +01:00
Nick O'Leary
e930098b51 Merge pull request #2447 from node-red/catch-more-signals
catch more signals to allow clean context flush on shutdown
2020-06-03 19:28:16 +01:00
Nick O'Leary
43d5df4a12 Merge branch 'dev' into catch-more-signals 2020-06-03 19:26:50 +01:00
Nick O'Leary
914cfdbc55 Merge pull request #2595 from jeancarl/dev
Filter list of nodes on node type
2020-06-03 18:59:57 +01:00
JeanCarl Bisson
aa8f4af339 Filter list of nodes on node type 2020-06-03 10:33:35 -07:00
Nick O'Leary
b6fbe7d07d Merge pull request #2588 from node-red/status-filter-nodes
Add compact searchBox to status/catch/complete nodes
2020-06-03 17:29:05 +01:00
Nick O'Leary
bf9d6c7ac4 Bump to node-red-admin 0.2.4 2020-06-03 16:53:45 +01:00
Nick O'Leary
139ae547c6 Add filter to link node 2020-06-03 15:54:51 +01:00
Nick O'Leary
8b252b458c Merge pull request #2590 from kazuhitoyokoi/dev-addjpnmsg
Add Japanese transaltions for http-request node, change node and https refresh logic
2020-06-03 14:31:52 +01:00
Nick O'Leary
efecfa328b Fix up event handling when deleting groups and tabs 2020-06-03 14:23:26 +01:00
Nick O'Leary
5651e7107f Bump to 0.2.3 node-red-admin 2020-06-03 10:48:52 +01:00
Nick O'Leary
b6b3ceef4d Add some proper validation of module/url properties in install api 2020-06-03 10:45:28 +01:00
Kazuhito Yokoi
e44d89c2af Enable automated UI testing on Travis CI 2020-06-03 17:22:25 +09:00
Nick O'Leary
3e74d75f28 Add node-red admin support 2020-06-02 23:39:36 +01:00
Nick O'Leary
6d737b9e4c Remove unneeded code on object delete in outliner
See https://github.com/node-red/node-red/pull/2578#discussion_r434163293
2020-06-02 22:53:34 +01:00
Nick O'Leary
dec82589d1 Handle missing projects runtime setting 2020-06-02 22:53:05 +01:00
Nick O'Leary
f0193b0f67 Add better messages for 404 errors on admin api 2020-06-02 22:52:22 +01:00
Kazuhito Yokoi
fdf8eb0657 Add japanese transaltions for http-request node and https refresh logic 2020-06-02 14:55:53 +09:00
Nick O'Leary
2ce424b567 Add compact searchBox to status/catch/complete nodes 2020-06-01 21:09:58 +01:00
Nick O'Leary
8995fa9ed1 Update changelog for 1.1.0-beta.1 2020-06-01 14:57:37 +01:00
Nick O'Leary
dc412b305c Tidy up unhandledRejection warning from context unit tests 2020-06-01 13:48:12 +01:00
Nick O'Leary
d7505da997 Merge pull request #2586 from Steve-Mcl/dev
Support setting title on typedInput option/ check
2020-06-01 13:29:01 +01:00
Nick O'Leary
4b54a81dfd Add test cases for setMessageProperty with non-object properties 2020-06-01 13:13:14 +01:00
Nick O'Leary
132254b3a5 Merge branch 'dev' into pr_2439 2020-06-01 11:56:19 +01:00
Steve-Mcl
9128b12960 Support setting title on typedInput option/ check 2020-06-01 11:25:42 +01:00
Nick O'Leary
e9104df047 Merge branch 'dev' into pr_2583 2020-06-01 10:20:40 +01:00
Nick O'Leary
bae52613ab Merge branch 'master' into dev 2020-06-01 09:38:39 +01:00
Nick O'Leary
18af906fd3 Merge branch 'dev' of github.com:node-red/node-red into dev 2020-06-01 09:37:14 +01:00
Nick O'Leary
d45415ab22 Merge branch 'master' into dev 2020-06-01 09:36:20 +01:00
Nick O'Leary
c6c42740c5 Merge pull request #2584 from sammachin/sammachin-settings_set_fix
fix for settings.set subsequent updates
2020-06-01 09:30:41 +01:00
Hiroyasu Nishiyama
b4c033ca50 add missing inject node examples 2020-06-01 15:20:53 +09:00
Hiroyasu Nishiyama
b67f2d874b add examples for function category nodes 2020-06-01 14:44:18 +09:00
Sam Machin
a8d8540346 fix for settings.set subsequent updates
By cloning the value the assert.deepEqual will now fail even for subsequent updates of the value without restarting Node-RED
2020-05-31 13:44:31 +01:00
Dave Conway-Jones
cbf1afc9fe turn off installer funding messages 2020-05-31 11:21:53 +01:00
Dave Conway-Jones
8a798e620a Ensure delay node rate limit timer is cleared on reset 2020-05-30 15:18:15 +01:00
Nick O'Leary
774751a25c Tweak HTTP Request GET payload handling labels 2020-05-29 17:35:18 +01:00
Nick O'Leary
13718032f6 Merge branch 'dev' into pr_2478 2020-05-29 17:04:54 +01:00
Nick O'Leary
1b497b340b Merge branch 'pr_2551' into dev 2020-05-29 16:52:19 +01:00
Nick O'Leary
bb41ab482c Rework the https refresh logic
- puts the node version check first
 - validates the refresh interval and keeps it in valid range
 - simplifies the error messages
 - uses parseFloat not parseInt so we can use fractions of hour
2020-05-29 16:50:53 +01:00
Nick O'Leary
215aab0fe4 Modify format of -D settings file 2020-05-29 11:44:13 +01:00
Nick O'Leary
666822cf51 Merge branch 'dev' into pr_2463 2020-05-29 11:04:38 +01:00
bartbutenaers
40101df6ec Refresh interval in hours 2020-05-29 00:11:14 +02:00
bartbutenaers
4adcb9c439 Refresh interval in hours 2020-05-29 00:08:07 +02:00
dxdc
a6cd0bf7e9 Add moment-timezone dependencies 2020-05-28 06:08:40 -05:00
Nick O'Leary
8158744829 Merge pull request #2578 from node-red-hitachi/fix-group-delete
fix deletion of group
2020-05-28 11:18:08 +01:00
Nick O'Leary
70c0c7bc14 Merge pull request #2582 from node-red-hitachi/fix-IE11-support
remove JSONata Array.from check for IE11
2020-05-28 11:04:15 +01:00
dxdc
fdda29f048 Support for moment-timezone 2020-05-28 01:20:10 -05:00
dxdc
95cc8ea80d Add missing unit test for accesses undefined environment variable from an expression 2020-05-28 00:48:11 -05:00
dxdc
18f8dde712 Add test for $moment jsonata expression 2020-05-27 23:47:04 -05:00
dxdc
effff3405b Add support for moment in jsonata expressions, based on elasticio/jsonata-moment 2020-05-27 23:26:57 -05:00
Hiroyasu Nishiyama
9d8cbcb993 remove JSONata Arra.from check for IE11 2020-05-28 13:22:14 +09:00
Hiroyasu Nishiyama
3345f2f3b8 simplify code structure 2020-05-28 10:23:50 +09:00
Nick O'Leary
bcf1d986a4 Merge branch 'master' of github.com:node-red/node-red 2020-05-27 17:15:45 +01:00
Nick O'Leary
a51e74bfa1 Bump jquery/migrate to latest versions 2020-05-27 17:15:33 +01:00
Nick O'Leary
cf00acac04 Bump jquery/migrate to latest versions 2020-05-27 17:13:33 +01:00
Nick O'Leary
876a7a4646 Add bulk-activate actions for debug node
Adds the actions:

 - core:activate-all-debug-nodes
 - core:activate-all-flow-debug-nodes

to match the deactivate* actions.

Also adds:

 - core:activate-selected-debug-nodes
 - core:deactivate-selected-debug-nodes

Adds a new httpAdmin route - /debug/(enable/disable) - that can be
use to bulk enable/disable nodes via HTTP Post.
2020-05-27 12:20:23 +01:00
Nick O'Leary
95d1b7bc36 Merge branch 'dev' into pr_2570 2020-05-27 11:52:37 +01:00
Nick O'Leary
d4ae0b0a2e Merge pull request #2576 from kazuhitoyokoi/dev-addjapanesetranslations
Update Japanese translations for trigger, tcp request, debug nodes
2020-05-27 10:26:42 +01:00
Nick O'Leary
36739fb444 Merge pull request #2577 from node-red-hitachi/update-function-message-jp
Update Japanese message catalogue for function node
2020-05-27 10:26:25 +01:00
Nick O'Leary
7906c28abb Merge pull request #2579 from ristomatti/bug/editor-underscore-hidden
Fix editor underscore visibility on Linux systems
2020-05-27 10:26:01 +01:00
Kazuhito Yokoi
f87b40941f Update Japanese translations for trigger, tcp request, debug nodes 2020-05-27 10:44:17 +09:00
Hiroyasu Nishiyama
05f816fc5d not emit change event on group delete 2020-05-25 08:46:35 +09:00
Ristomatti Airo
f9a157fe18 Fix editor underscore visibility on Linux systems
- seems to relate to DejaVu Sans font rendering
- fixes #2104
2020-05-23 18:41:44 +03:00
Hiroyasu Nishiyama
ca213589ac update Japanese message catalogue for function node 2020-05-23 21:39:52 +09:00
Hiroyasu Nishiyama
c5ca9fafee fix deletion of group 2020-05-23 21:20:23 +09:00
Nick O'Leary
82b3a97d99 Remove _info/type tests for subflow node tests 2020-05-22 21:23:55 +01:00
Nick O'Leary
1c94064c57 Remove unused _info/_type subflow env var magic values 2020-05-22 20:54:06 +01:00
Nick O'Leary
7969dd431f [function] Make the function node top-level async
This allows you to use 'await' in a function node without
having to wrap it in another promise/async function.
2020-05-22 20:49:18 +01:00
Nick O'Leary
22e7ddcb1d Merge branch 'dev' into pr_2490 2020-05-22 15:43:17 +01:00
Nick O'Leary
b1eafac67a Fixup IE11 Array.from polyfill 2020-05-22 15:31:38 +01:00
Nick O'Leary
5d81cec00c Merge branch 'pr_2498' into dev 2020-05-22 15:22:12 +01:00
Nick O'Leary
9512450d7c Reduce duplicated code in Function node html 2020-05-22 14:57:28 +01:00
Nick O'Leary
ed1998162f Fix gutter button position in outline tree 2020-05-21 23:05:29 +01:00
Nick O'Leary
ac2a21f992 Fixup positioning of create-project icons in startup dialog 2020-05-21 17:46:29 +01:00
Nick O'Leary
ad78ce0eb6 [projects] Allow remote branch dialog to create non-default remote branches 2020-05-21 17:26:27 +01:00
Nick O'Leary
8ce49c25d4 Ensure auth failure on project fetch identifies the remote
Fixes #2545
2020-05-21 17:25:51 +01:00
Nick O'Leary
4c24bd4ab9 [projects] Allow remote branch dialog to create non-default remote branches 2020-05-21 17:19:54 +01:00
Nick O'Leary
0de49e2a75 Ensure auth failure on project fetch identifies the remote
Fixes #2545
2020-05-21 17:18:46 +01:00
Nick O'Leary
05c3f459ad Add #! lines to project shell scripts
Fixes #2548
2020-05-21 15:33:10 +01:00
Nick O'Leary
50aaef5103 Make all dialogs handle smaller height screens better
Covers library, clipboard and project dialogs
2020-05-21 15:14:39 +01:00
Nick O'Leary
38872049fd Fix checkbox appearance on status/complete/catch/link nodes 2020-05-21 10:39:49 +01:00
Nick O'Leary
5dc1cc54d5 Add basic Array.from polyfill for IE11 2020-05-21 10:26:24 +01:00
Nick O'Leary
57f0fbbb98 Add some more trap form elements to workaround Chrome autofill 2020-05-21 10:21:18 +01:00
Nick O'Leary
977fef03b0 Merge pull request #2572 from jeancarl/dev
Moved options property from Outputs to Inputs section
2020-05-20 13:47:54 +01:00
Nick O'Leary
7d67e6a276 [outliner] handle items being added out-of-order
Closes #2573
2020-05-20 12:37:19 +01:00
Nick O'Leary
0832be5970 Merge pull request #2574 from node-red-hitachi/fix-grunt-error
add variable declaration to prohibit jshint error
2020-05-20 11:38:56 +01:00
Hiroyasu Nishiyama
2343fbd86a add variable declaration to prohibit jshint error 2020-05-20 13:47:56 +09:00
JeanCarl Bisson
367ebc1dd4 Moved options property from Outputs to Inputs section 2020-05-19 20:31:02 -07:00
Nick O'Leary
15cc88de6c [info-sidebar] Handle node/group/flows with \\n in their name 2020-05-19 17:53:20 +01:00
cinhcet
64b3c11682 debug nodes in subflows are ignored and changed name of callback to callback 2020-05-19 18:00:03 +02:00
Nick O'Leary
b8784185e8 Merge pull request #2568 from node-red-hitachi/fix-line-break-of-group-name
fix line break of group label
2020-05-19 15:09:06 +01:00
Nick O'Leary
fdc721baa1 Merge pull request #2569 from node-red/node-labels
Add action to toggle node label visiblity
2020-05-19 14:43:54 +01:00
Nick O'Leary
03b64bc493 Merge pull request #2564 from node-red/debugStatus
Let debug node show status indpendent of main output
2020-05-19 14:41:52 +01:00
cinhcet
a6a781f67c fix debug undo/redo by introducing a sideEffectCallback in history object 2020-05-19 13:51:08 +02:00
Nick O'Leary
fe1f8ca0a8 Delay when nodes are added to internal model on import
Closes #2567

This ensures when the node:added event fires, all possible
changes have already been applied such as remapping node ids.

This avoids the need to emit a separate node:changed event.
2020-05-19 11:28:38 +01:00
Dave Conway-Jones
a600feb5de Move debug status text length check to just before dsiplay. 2020-05-19 10:57:33 +01:00
Nick O'Leary
1f2c0a78c2 Only refresh sidebar on tab edit if nothing else selected 2020-05-19 10:13:35 +01:00
Nick O'Leary
e4b9c6a2ee Merge pull request #2571 from node-red-hitachi/fix-delete-tab
Fix error on deleting tab
2020-05-19 10:06:49 +01:00
cinhcet
a69db4d572 move to debug.html, rename to "deactivate" instead of "disable" 2020-05-19 11:03:15 +02:00
Hiroyasu Nishiyama
12c92072d0 not update sidebar for deleted tab 2020-05-19 09:27:50 +09:00
Nick O'Leary
e674d9246b [treeList] Ensure removed item is also removed from selected set 2020-05-19 00:15:51 +01:00
cinhcet
b71f81af57 added editor action to disable all debug nodes on a global/current workspace level 2020-05-18 22:49:10 +02:00
Nick O'Leary
b3535281ef Add action to toggle node label visiblity 2020-05-18 21:08:01 +01:00
Hiroyasu Nishiyama
5f5e6ea845 fix error on empty label 2020-05-17 11:44:23 +09:00
Dave Conway-Jones
64d2e80690 Merge branch 'dev' of https://github.com/node-red/node-red into dev 2020-05-16 22:24:38 +01:00
Dave Conway-Jones
b6e0568e76 Trigger node - hide second outpiut option when not appropriate
Update status to better reflect multiple streams in flight
2020-05-16 22:24:29 +01:00
Nick O'Leary
dca5b3b2a0 Merge pull request #2566 from node-red-hitachi/fix-outliner-subflow
Fix outliner display of newly created subflow
2020-05-16 21:17:56 +01:00
Hiroyasu Nishiyama
243915516e fix line break of group label 2020-05-16 20:56:21 +09:00
Hiroyasu Nishiyama
bc3683d8f6 fix outliner for subflow addition 2020-05-16 11:25:55 +09:00
Dave Conway-Jones
1d36ce0fdf debug node: add auto handling of error and status msgs if set to show status 2020-05-15 23:32:27 +01:00
Dave Conway-Jones
88d4d306f3 Add some colour smarts to debug status 2020-05-15 16:06:34 +01:00
Dave Conway-Jones
184d928cf7 ensure debug status in sync with main option 2020-05-14 23:01:26 +01:00
Nick O'Leary
fbd911ed27 [outliner] Keep outliner selection in sync with workspace 2020-05-14 22:08:25 +01:00
bartbutenaers
dec3762b7a Remove debugger statement 2020-05-14 22:43:50 +02:00
Dave Conway-Jones
a849872c21 ensure old config work with new fields 2020-05-14 16:28:38 +01:00
Dave Conway-Jones
1d71fb3554 Let debug node show status indpendent of main output 2020-05-14 15:38:48 +01:00
bartbutenaers
0d3bf0cd00 Https refresh settings 2020-05-13 23:49:30 +02:00
bartbutenaers
6c766eba86 Logs internationalisation 2020-05-13 23:46:33 +02:00
bartbutenaers
cc760acb62 Update packages/node_modules/node-red/red.js
Co-authored-by: Nick O'Leary <nick.oleary@gmail.com>
2020-05-13 23:24:57 +02:00
bartbutenaers
f4d4bf8779 Update packages/node_modules/node-red/red.js
Co-authored-by: Nick O'Leary <nick.oleary@gmail.com>
2020-05-13 23:24:40 +02:00
bartbutenaers
90f62e5e4a Update packages/node_modules/node-red/red.js
Co-authored-by: Nick O'Leary <nick.oleary@gmail.com>
2020-05-13 23:23:29 +02:00
Nick O'Leary
f1bd3e1711 Merge pull request #2562 from kazuhitoyokoi/dev-addjapanesetranslations
Add Japanese translations for Outliner, help sidebar and loading progress bar
2020-05-13 09:18:50 +01:00
Nick O'Leary
01dde8bea5 Merge pull request #2563 from kazuhitoyokoi/dev-fixgroping
Fix description of grouping nodes
2020-05-13 08:54:19 +01:00
Kazuhito Yokoi
341c66a199 Fix description of grouping nodes 2020-05-13 12:32:02 +09:00
Nick O'Leary
bc1fb2770b [groups] Change style of disabled groups 2020-05-12 13:53:20 +01:00
Nick O'Leary
9f1373945b [help-sidebar] Tidy up some errors 2020-05-12 13:42:01 +01:00
Kazuhito Yokoi
266ee2ca81 Add Japanese translations for Outliner 2020-05-12 20:06:07 +09:00
Kazuhito Yokoi
35738cc1a3 Update Japanese translations for CSV node 2020-05-12 20:03:00 +09:00
Nick O'Leary
ff310f89bd [groups] Support RED.view.reveal(group-id) 2020-05-12 10:59:41 +01:00
Hiroyasu Nishiyama
2dd004f6cd rename example name of complete node 2020-05-12 15:56:35 +09:00
Hiroyasu Nishiyama
964b7e0e23 rename example name of status node 2020-05-12 15:53:59 +09:00
Hiroyasu Nishiyama
bc039bde81 rename example name of catch node 2020-05-12 15:52:01 +09:00
Hiroyasu Nishiyama
9505f82d9b split debug node examples 2020-05-12 15:43:28 +09:00
Kazuhito Yokoi
9189db5531 Add Japanese translations for Outliner, help sidebar and loading progress bar 2020-05-12 11:06:29 +09:00
bartbutenaers
bfa5f39b6d Asynchronous https support 2020-05-11 23:33:54 +02:00
bartbutenaers
15f97bbf26 Asynchronous https support 2020-05-11 23:29:38 +02:00
Nick O'Leary
90ba761325 Merge pull request #2555 from node-red/authMiddleware
Add httpAdminMiddleware to allow custom headers on admin routes
2020-05-11 16:28:07 +01:00
Nick O'Leary
ddd428f76e Merge pull request #2558 from node-red/progress-bar
Add a loading progress bar
2020-05-11 16:27:40 +01:00
Nick O'Leary
0c83fa7060 Add loading progress bar 2020-05-11 16:27:22 +01:00
Nick O'Leary
f2e2c7e4d0 Merge pull request #2556 from node-red/outliner
Add Outliner to Info sidebar and add help sidebar
2020-05-11 16:26:41 +01:00
Nick O'Leary
717bfffa63 [Inject] Use legacy properies by preference 2020-05-11 16:07:26 +01:00
Hiroyasu Nishiyama
a764a4a44b update initial contents for setup & close code 2020-05-11 22:55:07 +09:00
Dave Conway-Jones
247fa0ce7c Fix inject so more backwards compatible
reuse old payload property and copy over topic if a string.
2020-05-11 14:37:19 +01:00
Nick O'Leary
13932b2cfb Merge pull request #2553 from node-red-hitachi/add-reset-to-batch-node
Add reset feature to batch node
2020-05-11 09:39:09 +01:00
Nick O'Leary
0bd0540d2f Merge pull request #2559 from kazuhitoyokoi/dev-addjapanesetranslations
Add Japanese translations for grouping nodes
2020-05-11 09:38:14 +01:00
Nick O'Leary
9a17cc503c Merge pull request #2561 from node-red-hitachi/inject-node-error-handling
Update inject node error handling
2020-05-11 09:37:43 +01:00
Dave Conway-Jones
89a048e5fa add docker to environment list 2020-05-11 09:01:35 +01:00
Nick O'Leary
88bc022e2a [help-sidebar] hide toc when directly setting content 2020-05-11 09:00:12 +01:00
Hiroyasu Nishiyama
00e080459e update handling of invalid jsonata expression 2020-05-11 14:51:47 +09:00
Hiroyasu Nishiyama
5b197adf33 update according to comments 2020-05-11 14:37:14 +09:00
Kazuhito Yokoi
9019c31f91 Add Japanese translations for core nodes 2020-05-08 15:12:47 +09:00
Kazuhito Yokoi
2e14703b16 Add Japanese translations for grouping nodes 2020-05-08 15:01:39 +09:00
Nick O'Leary
f87698438d [outliner] Handle switching projects properly 2020-05-07 21:48:47 +01:00
Nick O'Leary
4af1cf1d1f [help-sidebar] Refresh help on node selection 2020-05-07 15:19:56 +01:00
Nick O'Leary
d6ad7dc6eb Add show-examples-import-dialog action 2020-05-07 13:46:18 +01:00
Nick O'Leary
f25e4ea520 [help-sidebar] Include subflow help in sidebar 2020-05-07 12:34:15 +01:00
Nick O'Leary
17891d373b [outliner] Fix positioning of tips box 2020-05-07 10:32:25 +01:00
Nick O'Leary
9f29149d87 [help-sidebar] Add help sidebar 2020-05-06 16:15:12 +01:00
Nick O'Leary
010e20989a [popover] Allow hover-type popovers to contain buttons 2020-05-06 16:12:07 +01:00
Hiroyasu Nishiyama
c885f2edaa add example of link node across tabs 2020-05-06 12:36:28 +09:00
Hiroyasu Nishiyama
ae5a7176ba change comment of debug node example 2020-05-06 12:36:05 +09:00
Hiroyasu Nishiyama
ee13cd10fe add checks for interval value 2020-05-06 11:21:58 +09:00
Nick O'Leary
b0f9bf2c62 Add httpAdminMiddleware for admin routes 2020-05-05 18:13:21 +01:00
Nick O'Leary
9fbfc3d677 Merge branch 'dev' into outliner 2020-05-05 17:47:59 +01:00
Nick O'Leary
189389f96a [inject] Tidy up node label 2020-05-05 17:35:30 +01:00
Nick O'Leary
2af7066512 Merge branch 'dev' into outliner 2020-05-05 15:11:35 +01:00
Hiroyasu Nishiyama
9cbc40a229 fix message catalogue for CSV ndoe & update japanese message catalogue (#2554) 2020-05-05 14:43:08 +01:00
Nick O'Leary
18bf220ca4 Merge pull request #2413 from dvv/patch-1
Allow to know particular session from status node
2020-05-05 14:42:26 +01:00
Hiroyasu Nishiyama
8750c4b121 add reset feature to batch node 2020-05-05 21:07:55 +09:00
Dave Conway-Jones
417d2cb40a Add nodejs14 to Travis test matrix 2020-05-04 21:48:34 +01:00
Dave Conway-Jones
36b0698432 Trigger - redo second output code update 2020-05-04 17:11:09 +01:00
Nick O'Leary
0edc57f0e3 Merge pull request #2547 from node-red-hitachi/fix-project-menu-item-activation
Activate project menu after initial clone
2020-05-04 16:14:42 +01:00
Nick O'Leary
3d76137247 [inject] Modify output labels for multi-value inject 2020-05-04 15:37:09 +01:00
Dave Conway-Jones
df9d231389 Merge branch 'dev' of https://github.com/node-red/node-red into dev 2020-05-04 14:17:17 +01:00
Dave Conway-Jones
e2aebaf0e7 CSV : add warn when unpaired quotes detected on input.
helps handling now that we allow line breaks within fields (as per spec).
2020-05-04 14:17:11 +01:00
Nick O'Leary
20e84a847a Merge pull request #2435 from PaulWieland/dev
Adding user definable properties to inject node
2020-05-04 14:02:10 +01:00
Nick O'Leary
ad4779e32f Merge pull request #2436 from node-red/add-trigger-second-output
Add second output to trigger node
2020-05-04 12:48:25 +01:00
Nick O'Leary
90537e42ba Merge branch 'dev' into add-trigger-second-output 2020-05-04 12:45:01 +01:00
Nick O'Leary
4615465599 Merge pull request #2527 from node-red/enhance-csv
Enhance csv to allow output of column headers once only
2020-05-04 12:43:16 +01:00
Nick O'Leary
95418724fa Merge pull request #2540 from vladimir-kazan/fix-deprecation-warning
Fix: Remove nodejs deprecation warning in 21-httpin node
2020-05-04 12:42:30 +01:00
Nick O'Leary
989cb05257 Merge pull request #2544 from kazuhitoyokoi/master-fixuitest
Fix test cases for UI testing
2020-05-04 12:41:30 +01:00
Nick O'Leary
d7df20413d Merge branch 'master' into dev 2020-05-04 11:41:44 +01:00
bartbutenaers
f7e0f55c13 httpsRefreshInterval in seconds 2020-05-02 22:24:04 +02:00
bartbutenaers
e16f48c9fd httpsRefreshInterval in seconds 2020-05-02 22:22:36 +02:00
bartbutenaers
4694644043 Refresh interval in milliseconds 2020-05-02 14:41:46 +02:00
bartbutenaers
f468d6e947 Rename fix 2020-05-02 14:40:01 +02:00
bartbutenaers
9a19477796 Refresh https settings 2020-05-02 07:54:58 +02:00
bartbutenaers
00d41c6de2 Refresh https settings 2020-05-02 07:52:20 +02:00
Nick O'Leary
fc2a9a85ff [outline] Reveal selected item after clearing outline filter 2020-05-01 17:51:44 +01:00
Nick O'Leary
78c86880e4 [outline] Update information section of info sidebar 2020-05-01 17:39:54 +01:00
Nick O'Leary
aca61c0354 Modify RED.panels to use flexbox position 2020-05-01 17:38:23 +01:00
Nick O'Leary
73dde4de51 Allow node edit dialog to be opened on a non-default tab 2020-05-01 17:37:42 +01:00
Nick O'Leary
597c4a2e4f Add createNodeIcon and getDarkerColor to RED.utils 2020-05-01 17:37:15 +01:00
Hiroyasu Nishiyama
62ec7f4d37 add examples of common category nodes 2020-05-02 00:18:24 +09:00
Hiroyasu Nishiyama
319c7e9e9f add join node example 2020-05-01 16:49:17 +09:00
Hiroyasu Nishiyama
580492b0c8 create sequence category 2020-05-01 10:39:52 +09:00
Hiroyasu Nishiyama
655ce7b87a add split node example 2020-05-01 10:37:47 +09:00
Hiroyasu Nishiyama
4e09b404a2 fix comment description of sort sequence example 2020-05-01 09:55:38 +09:00
Hiroyasu Nishiyama
748f831495 rename examples & correct sequence size 2020-05-01 09:48:31 +09:00
Hiroyasu Nishiyama
bb3b87814c add sort node examples 2020-05-01 09:24:29 +09:00
Hiroyasu Nishiyama
0bfe20182f rename batch examples 2020-04-30 23:55:22 +09:00
Hiroyasu Nishiyama
4245c0a0ad activate project menu after initial clone 2020-04-30 12:59:10 +09:00
Paul Wieland
25aadc690a Added i18n and legacy output label support 2020-04-27 12:16:20 -04:00
Nick O'Leary
12dc4ab1fa [outline] Connect search dialog to outline filter box 2020-04-27 15:23:39 +01:00
Nick O'Leary
55a5917282 [search] Refactor search to use editor events to generate index 2020-04-27 14:43:22 +01:00
Nick O'Leary
a5b33d11fc [outline] Add outline section to info sidebar 2020-04-27 11:17:19 +01:00
Nick O'Leary
d2d872f51c TreeList updates for the outliner sidebar
All data items now get their `item.treeList` api added even if deferBuild is set.
This means the apis can be used regardless of whether the tree has built their
ui pieces.

Also adds a number of new api calls

Top-level methods:

 - clearSelection - clears selection from the list
 - filter(filterFunc) - filters the tree using the provided function

Data item functions:

 - item.treeList.sortChildren(sortFunction)
 - item.treeList.replaceElement(element)
2020-04-27 11:14:47 +01:00
Nick O'Leary
5c0b500f48 Reorder group creation so groups:add is fired before nodes:change 2020-04-27 11:06:28 +01:00
Nick O'Leary
28418288e3 Allow RED.notify.popover to have a position offset 2020-04-27 11:05:32 +01:00
Nick O'Leary
0150769c17 EditableList api calls must not return nested list items 2020-04-27 11:04:41 +01:00
Nick O'Leary
2eaea02489 Make selected list item more distinct 2020-04-27 11:04:04 +01:00
Nick O'Leary
1a9c4b7714 All node button to be clicked via api call 2020-04-27 11:03:43 +01:00
Nick O'Leary
d9f710aa52 Only update disabled workspace css if it is the active ws 2020-04-27 11:03:02 +01:00
Nick O'Leary
2069cc4392 Add flows:reorder event 2020-04-27 10:49:54 +01:00
Nick O'Leary
f78be9050a Reorder inital load so projects:load event emits before any nodes:add 2020-04-27 10:49:14 +01:00
Nick O'Leary
feb5d13e1c Bump for 1.0.6 2020-04-24 13:55:34 +01:00
Nick O'Leary
a3b0448f53 Handle clone of null in utils
Fixes #2536
2020-04-24 13:54:49 +01:00
Nick O'Leary
3dfbefb9f5 Handle error objects when reporting in palette manager 2020-04-24 13:54:49 +01:00
Nick O'Leary
9f6bac1b1b Revert to cron 1.7.2
See https://github.com/kelektiv/node-cron/issues/478
2020-04-24 13:54:49 +01:00
Nick O'Leary
0f2ed14d16 Update to JSONata 1.8.3 2020-04-24 13:54:49 +01:00
Paul Wieland
3e898c487a Corrected output label logic 2020-04-22 15:13:11 -04:00
Nick O'Leary
efb9dce92f Merge pull request #2543 from node-red/editor-events
Add more consistent events in the editor
2020-04-22 13:51:36 +01:00
Kazuhito Yokoi
f024e0bbed Fix test cases for UI testing 2020-04-21 21:58:18 +09:00
Dave Conway-Jones
3f1bb6771a Dont try and clone properties of a null object 2020-04-21 11:14:11 +01:00
Dave Conway-Jones
0b3ced5203 add test for cr lf in input and enhance odd quotes tests 2020-04-21 10:58:36 +01:00
Nick O'Leary
373267c53b Add more consistent events in the editor
This introduces a much more consistent set of events within the editor
for whenever a element is added, removed or modified.

The events emited on the `RED.events` event system. The event names
take the form: `"<thing>:<action>"`.

`<thing>` can be one of:
 - nodes
 - flows
 - subflows
 - groups
 - links

`<action>` can be one of:
 - add
 - remove
 - change

The payload of the events is the object in question.

There is also:
 - flows:reorder    - when tabs are reordered. Payload is array of flow ids.
 - workspace:clear  - when the workspace is emptied - part of switching projects

The `nodes:change` event was already used by RED.nodes.dirty() to cause
the Deploy button to become active. This renames that event to:
 - workspace:dirty  - Payload is boolean flag for the dirty state

This commit also updates the Palette to use the subflows:change event to
only redraw subflows that have actually changed rather than refresh them
all whenever one of them *might* have changed. This removes a noticable
flicker of the icon which was needlessly being redrawn.
2020-04-20 22:23:34 +01:00
Nick O'Leary
ae3e250269 Merge branch 'dev' of github.com:node-red/node-red into dev 2020-04-20 21:57:46 +01:00
Vladimir Kuznetsov
33200b2d08 Fix: Remove nodejs deprecation warning in 21-httpin node 2020-04-15 15:39:59 +02:00
Nick O'Leary
b032e00d01 [groups] increase group border radius 2020-04-14 22:39:42 +01:00
Dave Conway-Jones
fda95dfc5d csv node: remove xs console.log 2020-04-14 11:02:14 +01:00
Dave Conway-Jones
bc96f2d0cb udp node: when reusing input socket honour the broadcast mode. 2020-04-11 22:33:11 +01:00
Hiroyasu Nishiyama
c649e1b4a2 update promise & message handling 2020-04-10 23:06:43 +09:00
Nick O'Leary
f54ed8ebd1 Prevent button label wrapping in typedInput 2020-04-09 20:20:52 +01:00
Nick O'Leary
b82167fefa Bump for 1.0.5 2020-04-09 14:15:46 +01:00
Paul Wieland
2efc2bc186 Update 20-inject.html
Scroll the div down automatically when the user changes the repeat drop down.
2020-04-08 13:37:51 -04:00
Nick O'Leary
f572c11912 Bump dependencies 2020-04-08 17:43:32 +01:00
Paul Wieland
4595a77c41 tip removed from inject node, cleanup i18n 2020-04-08 12:30:13 -04:00
Paul Wieland
7c1853431a Update 20-inject.html
Cleanup old payload, topic & type.
Move name and remove tip.
2020-04-08 12:29:55 -04:00
Nick O'Leary
e26eb85718 Fine tune typedInput flexbox handling on option-button 2020-04-08 17:06:11 +01:00
Nick O'Leary
821b5686f2 Merge branch 'master' into pr_2492 2020-04-08 12:42:33 +01:00
Nick O'Leary
c989f466ed Update changelog 2020-04-08 12:38:49 +01:00
Nick O'Leary
97c771f93a Ensure file context does not write 'undefined' to store
Fixes #2522
2020-04-08 11:32:39 +01:00
Nick O'Leary
54dbdde9cb Merge pull request #2532 from martinLim45/master
Set flow.disabled when disabled property is false
2020-04-07 10:05:36 +01:00
martinLim45
513957eea1 Set flow.disabled when disabled property is false 2020-04-07 16:41:49 +09:00
Dave Conway-Jones
5eed4672ed rtrigger node - reapply - passing topic through to output fix that seemed to only half merge 2020-04-06 22:58:00 +01:00
Nick O'Leary
aafa4fe0b9 Bump dev branch to 1.1.0 2020-04-06 20:29:22 +01:00
Nick O'Leary
572c03631d Do not collapse whitespace in Debug string messages 2020-04-06 15:40:06 +01:00
Nick O'Leary
2f869a55e2 Handle nodes with no wires array 2020-04-06 15:39:48 +01:00
Hiroyasu Nishiyama
161f6090c1 update initialize & finalize processing of function node 2020-04-06 16:34:41 +09:00
Nick O'Leary
efad7270b7 Add polyfills for IE11 2020-04-03 16:57:15 +01:00
Dave Conway-Jones
24eb78d137 add ja translations 2020-04-03 16:55:43 +01:00
Dave Conway-Jones
e969a1c97c Let CSV node only send headers once
(and then reset that on msg.reset)
and also accept msg.columns csv string to set column headers if not specified in node.
And Add tests
2020-04-03 15:54:19 +01:00
tmdoit
4f31632863 Fix: Allow CR and LF control chars to be a part of the value (#2526)
To properly parse CSV data.
2020-04-03 15:10:33 +01:00
Dave Conway-Jones
1d417c07cd TCP out - tidy up select of which rows to display
to help address #2525
2020-04-03 11:14:23 +01:00
Nick O'Leary
344c9fe57e Merge branch 'master' into dev 2020-04-02 23:24:42 +01:00
Nick O'Leary
9d4400349b Fix timer reference in node close handling 2020-04-02 23:24:18 +01:00
Nick O'Leary
24f7000918 [groups] Remove padStart because IE11 2020-04-02 23:23:41 +01:00
Nick O'Leary
6ff3286d78 Merge branch 'master' into dev 2020-04-02 16:52:55 +01:00
Nick O'Leary
f058de8bcd Update TypedInput to use flexbox and remove resizing code 2020-04-02 16:49:58 +01:00
Nick O'Leary
fbfc74e5ca [groups] Ensure newly imported nodes have width/height 2020-04-02 11:58:08 +01:00
Nick O'Leary
1b5654001c Merge pull request #2396 from amodelbello/master
Replace pvorb/clone with lodash.clonedeep to prevent errors when cloning complex objects
2020-04-01 20:22:40 +01:00
Nick O'Leary
e0f3e94e2b Merge branch 'dev' into master 2020-04-01 20:22:25 +01:00
Nick O'Leary
5da89892b4 [groups] Draw group selection above all other groups 2020-04-01 14:10:35 +01:00
Nick O'Leary
a6ecb54cc4 Clear node.close timeout to avoid unnecessary work on restart 2020-03-31 19:25:20 +01:00
Nick O'Leary
04da13eaf9 Merge branch 'pr_2523' into dev 2020-03-31 15:59:31 +01:00
Nick O'Leary
7fa4df082e Force sync redraw of view when replacing unknown nodes 2020-03-31 15:58:51 +01:00
Nick O'Leary
ae001c5e82 Merge branch 'master' into dev 2020-03-31 15:35:46 +01:00
Nick O'Leary
e7f942eda7 Update nodeTabMap when replacing unknown nodes 2020-03-31 15:34:48 +01:00
Hiroyasu Nishiyama
fa8236ee2c update for recent change of dev branch 2020-03-31 20:32:07 +09:00
Hiroyasu Nishiyama
08ec04c889 merge upstream/dev 2020-03-31 19:05:22 +09:00
Hiroyasu Nishiyama
e5150ea012 force redraw after node installation 2020-03-31 16:48:20 +09:00
Nick O'Leary
222ece2533 Merge pull request #2493 from node-red/groups
Grouping Nodes
2020-03-30 23:43:27 +01:00
Nick O'Leary
294696daf5 Merge branch 'dev' into groups 2020-03-30 23:42:52 +01:00
Nick O'Leary
d099356207 Merge branch 'master' into dev 2020-03-30 23:42:40 +01:00
Nick O'Leary
5c06761b1a Remove console.log from subflow 2020-03-30 23:42:30 +01:00
Nick O'Leary
05fc3c5eca Merge branch 'master' into dev 2020-03-30 23:41:33 +01:00
Nick O'Leary
9d4e2adde4 Merge pull request #2519 from neohelden/master
German I18n adjustments
2020-03-30 21:44:44 +01:00
Nick O'Leary
a8db3d8dd3 Don't double-sanitize node name in debug sidebar
Fixes #2521
2020-03-29 20:38:05 +01:00
Nick O'Leary
6ae7c51dc5 Check node props when deciding if pasted node can splice links
Fixes #2494
2020-03-29 20:33:15 +01:00
Nick O'Leary
84771f5864 Flows/subflows must preinitialise their context objects
Fixes #2513

If a node inside a subflow accessed its context object in its
constructor, the subflow-instance flow context would not yet
have been created. This would cause a place holder context
to get created on its behalf, but that place holder doesn't
have its parent set properly. This then breaks the usage
of $parent inside such a subflow.

This fix has changed it so flows (and subflows) create their
flow context as part of their initial creation. That ensures
it exists when individual nodes from the subflow are created,
allowing them to safely access their context.

This has also fixed a related issue where any attempt to use
$parent to access beyond the root parent would seemingly hang
as the callback was never being called. This would cause
messages to get stuck in flows. The fix ensures the callback
is used in the root context objects and undefined is returned.
2020-03-27 23:47:12 +00:00
Nick O'Leary
4304d44851 Ensure complete node scope is remapped in subflows
Fixes #2514
2020-03-27 09:44:15 +00:00
Nick O'Leary
1018c0e8a5 Handle false values in $env() properly
Fixes 2517
2020-03-27 09:05:58 +00:00
Nick O'Leary
b1d0013214 [groups] Better ordering of group elements on the DOM 2020-03-26 22:51:06 +00:00
Nick O'Leary
94ef25bbb9 [groups] i18n group messages 2020-03-26 22:50:46 +00:00
Nick O'Leary
13830ffc9c [groups] Tidy up Info sidebar summary of group selection 2020-03-26 21:00:22 +00:00
Nick O'Leary
e0bef941b4 [groups] Include groups when copying whole tabs 2020-03-26 20:26:58 +00:00
Nick O'Leary
03e9522d98 [groups] Include groups when exporting 2020-03-26 18:01:57 +00:00
Nick O'Leary
1bdbd31b96 [groups] Overhaul group drag handling for empty groups 2020-03-26 15:27:34 +00:00
Nick O'Leary
ef9db701f8 [groups] Add default group style to css so can be themed 2020-03-26 15:25:08 +00:00
Nick O'Leary
afb564a4fc [groups] Add copy/paste group style actions 2020-03-26 15:24:02 +00:00
Nick O'Leary
3e7f58dedd [groups] Include group counts in copy/paste notifications 2020-03-26 15:22:59 +00:00
Pascal Stech
e46d8345db German I18n adjustments 2020-03-26 15:39:32 +01:00
Nick O'Leary
2e364b6d9a Merge pull request #2516 from alexk111/patch-1
Remove duplicate
2020-03-25 17:53:12 +00:00
Alex Kaul
b4177836a8 Remove duplicate 2020-03-26 00:42:01 +07:00
Nick O'Leary
5b2ee21204 Merge pull request #2506 from node-red-hitachi/fix-subflow-template-tab
fix tab appearance of subflow template panel
2020-03-24 15:15:21 +00:00
Nick O'Leary
9b6e798eb6 Merge pull request #2502 from kazuhitoyokoi/master-updatemsgcatalog4websocketnode
Add Japanese translation to node property of websocket node
2020-03-24 15:14:17 +00:00
Nick O'Leary
7c91c4ae5a [groups] Prevent subflow port nodes being added group 2020-03-24 14:05:35 +00:00
Nick O'Leary
7bc3b662e4 [groups] Fix up various delete/undo actions with groups 2020-03-24 14:05:09 +00:00
Nick O'Leary
64af1f7e9b [groups] Lasso should select top-most group of selection 2020-03-23 22:04:40 +00:00
Nick O'Leary
f0038e9796 [groups] Use requestAnimationFrame for view redraw
This moves the expensive redraw code out of the event handling phase
and onto the browser's repaint phase. This makes the event handling
more responsive, particularly when dragging a large number of nodes.

It also removes lots of unnecessary anonymous functions in the redraw
code that should also improve performance.
2020-03-23 21:30:52 +00:00
Nick O'Leary
768aa4ac92 [groups] getGroupAt should return top most group 2020-03-23 21:30:09 +00:00
Nick O'Leary
f61c137ea3 [groups] Improve styling of group selection/highlight 2020-03-23 14:51:18 +00:00
Nick O'Leary
20a8059758 [groups] Add style options for group label 2020-03-20 20:00:03 +00:00
Nick O'Leary
58696c6ad4 [groups] Add better colour picker for group fill/stroke 2020-03-19 13:41:54 +00:00
Dave Conway-Jones
b5ed018bae csv node - add tests for blank columns and null values 2020-03-18 16:18:16 +00:00
tmdoit
91b7dd988e [CSV node] Add support for parsing empty strings and null values (#2510)
* [CSV node] Add support for parsing empty strings and null values

* Add new lines at the end and fix script type.

* Last one script type fix

* Naming change
2020-03-18 15:54:10 +00:00
Dave Conway-Jones
b0c3c78899 MQTT out - Add warning if topic contains + or #
still sends msg as it causes connection to bounce which may be useful and dropping it would be a change in behaviour.
2020-03-18 15:47:03 +00:00
Kazuhito Yokoi
282f00e091 Add Japanese translation for join node (#2508) 2020-03-17 21:36:23 +00:00
Nick O'Leary
5cd2791506 [groups] Add groups to flow util unit tests 2020-03-16 23:01:57 +00:00
Nick O'Leary
9b2e9ec41a [groups] Support undo of convert to subflow from inside group 2020-03-16 22:51:54 +00:00
Kazuhito Yokoi
08ef9ee682 Add backslash handling to library 2020-03-16 21:58:28 +09:00
Nick O'Leary
a8bc753720 [groups] Show group info when selected in sidebar 2020-03-16 11:16:18 +00:00
Nick O'Leary
266df86d98 [groups] Add menu options for group actions 2020-03-16 10:20:48 +00:00
Dave Conway-Jones
85a1f59a93 Fix join to not crash on appending invalid tyoes to buffer.
Add extra info to clarify use of complete
to Close #2505
2020-03-15 16:43:32 +00:00
Dave Conway-Jones
43258ee816 Trigger node - reset default timeout value when switcing away from wait for reset 2020-03-15 15:11:19 +00:00
Hiroyasu Nishiyama
c4ca0b6e91 fix tab apperance of subflow template panel 2020-03-15 08:02:26 +09:00
Nick O'Leary
1bf3b3077e [groups] Include groups when converting selection to subflow 2020-03-14 00:17:16 +00:00
Nick O'Leary
c9194c3635 [groups] Fix undo/redo handling of addTo/removeFrom group 2020-03-13 23:09:18 +00:00
Nick O'Leary
27c462fee9 [groups] Support dragging node from palette into group 2020-03-13 23:01:19 +00:00
Nick O'Leary
7886e5d57c [groups] Add undo support for group actions 2020-03-13 23:01:01 +00:00
Nick O'Leary
6912dec166 Merge pull request #2479 from node-red-hitachi/dev-admin-api-auth
Add admin api authentication function
2020-03-13 13:36:53 +00:00
Nick O'Leary
b8e610e1b6 Merge pull request #2500 from tilleul/patch-3
Support for context stores using JSONata and evaluateNodeProperty()
2020-03-13 13:21:26 +00:00
Kazuhito Yokoi
421b5846f2 Add page objects for UI testing (#2501)
* Update page object of change node

* Support multiple node outputs in UI testing

* Add page object of switch node

* Add page objects of trigger and exec nodes

* Remove unnecessary code

* Update page object of trigger node to select time unit

* Add page objects of websocket nodes

* Support boolean as value in selectWithWait()

* Update page object of split node

* Merge page objects of mqtt nodes to make them same as original mqtt node file path
2020-03-13 13:20:16 +00:00
Nick O'Leary
6a30f2cbc8 Merge pull request #2503 from kazuhitoyokoi/master-jpn4filenode
Remove old leagcy wording from file node info (Japanese and Chinese)
2020-03-13 13:19:53 +00:00
Nick O'Leary
a8b1e91843 Merge pull request #2504 from bonanitech/patch-3
Fix paletteCategories order
2020-03-13 13:11:41 +00:00
Nick O'Leary
20f97d0d13 Add better handling of host-key-verify error with projects 2020-03-13 13:09:47 +00:00
Mauricio Bonani
4c78f06c2b Fix paletteCategories order 2020-03-13 08:44:56 -04:00
Kazuhito Yokoi
c700d5c922 Remove old leagcy wording from file node info (Chinese) 2020-03-13 21:38:23 +09:00
Kazuhito Yokoi
a9508a2c04 Remove old leagcy wording from file node info (Japanese) 2020-03-13 21:31:16 +09:00
Dave Conway-Jones
09d55a0cbd remove unneeded title line from file info text 2020-03-13 11:33:37 +00:00
Dave Conway-Jones
b165129388 Remove old leagcy wording from file node info to stop confusing users. 2020-03-13 11:28:19 +00:00
Nick O'Leary
0ef3471f8f [groups] Add undo of group import 2020-03-13 11:27:13 +00:00
Dave Conway-Jones
9ba9998bd6 make exec node logging consistent with itself. (only be verbose when in verbose mode) 2020-03-13 11:26:49 +00:00
Kazuhito Yokoi
72126730ef Remove unnecessary code for node property of websocket node in the German language 2020-03-13 16:32:00 +09:00
Kazuhito Yokoi
fd2213232c Update message catalogs for other languages 2020-03-13 16:29:16 +09:00
Kazuhito Yokoi
369c5754f2 Add Japanese translation to node property of websocket node 2020-03-13 16:26:48 +09:00
Nick O'Leary
fc3d0ab053 [groups] Keep groups ordered by depth in DOM 2020-03-09 15:10:54 +00:00
Nick O'Leary
1c63d7ff31 Merge pull request #2489 from kazuhitoyokoi/master-fixuitest
Fix XPath in page objects for UI tests
2020-03-09 11:17:49 +00:00
Nick O'Leary
de971fa53f Merge pull request #2487 from bonanitech/patch-1
Fix workspace CSS properties syntax
2020-03-09 11:17:14 +00:00
Nick O'Leary
d005eb46cf Merge pull request #2488 from bonanitech/patch-2
Consolidate duplicate selectors
2020-03-09 11:16:49 +00:00
Nick O'Leary
d1dd7d1d51 [groups] Support copy/paste/import/export of groups 2020-03-09 11:14:18 +00:00
tilleul
b78ef006ec Support for context stores using JSONata and evaluateNodeProperty()
The function prepareJSONataExpression() does not take context store into account.
This causes problems when using typedInput fields and getting the value of a property based on its type using evaluateNodeProperty().
2020-03-09 11:22:20 +01:00
Hiroyasu Nishiyama
134c68c98e merge origin 2020-03-07 19:22:12 +09:00
Hiroyasu Nishiyama
82539fc420 update for merging settings object & better error handling 2020-03-07 19:19:48 +09:00
Hiroyasu Nishiyama
7a5604697f Update packages/node_modules/node-red/red.js
Co-Authored-By: Nick O'Leary <nick.oleary@gmail.com>
2020-03-07 16:38:24 +09:00
Hiroyasu Nishiyama
84d2b8ad6d add support of initialization & finalization to function node 2020-03-07 01:55:45 +09:00
Nick O'Leary
9a0c843f29 [groups] Support deleting groups as part of selection 2020-03-05 22:49:31 +00:00
Nick O'Leary
4d96d95370 [groups] Add merge-selection-to-group and remove-selection-from-group 2020-03-05 15:52:26 +00:00
Nick O'Leary
51ea5dc342 [groups] Add ungroup-selection action 2020-03-05 10:43:28 +00:00
Nick O'Leary
97d58e34f2 [groups] Support nested groups in editor 2020-03-04 21:48:38 +00:00
Nick O'Leary
86ce5c591b [groups] add basic group functionality to editor 2020-03-03 20:55:01 +00:00
Thierry Le Gal
dea47a6e3d Improve performance in change node panel 2020-03-03 18:43:44 +01:00
Thierry Le Gal
7621cf3377 Merge pull request #1 from node-red/master
Refresh on node-red github
2020-03-03 18:36:23 +01:00
Dave Conway-Jones
5090b01b8e Ensure join node handles missing buffer joiner when not in string mode
and add tests
to close #2491
2020-03-02 19:50:39 +00:00
Kazuhito Yokoi
6675fdf3c2 Saving the node description property to the library 2020-03-02 05:50:32 +00:00
Kazuhito Yokoi
491812fac5 Fix XPath in UI tests 2020-03-02 05:07:48 +00:00
Mauricio Bonani
8a82552bdc Consolidate duplicates 2020-02-29 15:14:57 -05:00
Mauricio Bonani
bd4fc2e5cc Fix workspace CSS properties syntax 2020-02-29 09:15:42 -05:00
Nick O'Leary
32aa4c41ce Bump for 1.0.4 2020-02-27 14:37:25 +00:00
Nick O'Leary
2a6bedbd8d update changelog 2020-02-27 11:38:44 +00:00
KAZUHIRO ITO
83942c2551 Fix plugin only receives the actual token 2020-02-27 19:55:21 +09:00
KAZUHIRO ITO
458d794f52 Fix tokensStrategy order 2020-02-27 19:41:59 +09:00
KAZUHIRO ITO
95982ad464 Update adminAuth tokensStrategy test spec 2020-02-27 19:20:08 +09:00
Ben Hardill
7723ff461b Remove console.logs 2020-02-26 19:46:54 +00:00
Ben Hardill
0ca36a89e3 Updates to match Nick's suggestions 2020-02-26 19:45:01 +00:00
Nick O'Leary
cc5fdd9844 Avoid adding extra divs to edit form to avoid size miscalculation 2020-02-26 13:17:03 +00:00
Nick O'Leary
d09ee6611f Update dependencies 2020-02-26 11:37:37 +00:00
KAZUHIRO ITO
bba6855872 Add admin api authentication function 2020-02-26 12:59:40 +09:00
Nick O'Leary
43970b404e Update github templates 2020-02-25 23:06:14 +00:00
Dave Conway-Jones
1868289b71 Better fix for trigegr 2nd message in last payload mode
Now works correctly in multiple topics mode.
And update tests
2020-02-25 22:15:53 +00:00
Ben Hardill
37bcd5c603 First pass at adding support for GET requests
with a body
2020-02-25 21:28:15 +00:00
Nick O'Leary
c9ad5bea93 Merge branch 'dev' of github.com:node-red/node-red into dev 2020-02-25 15:09:26 +00:00
Nick O'Leary
a09b3bb6c7 Merge branch 'dev' into pr_2242 2020-02-25 14:32:33 +00:00
Nick O'Leary
3d6170be5e Merge pull request #2475 from kazuhitoyokoi/master-adduitest
Add UI test case for error handling
2020-02-25 14:10:38 +00:00
Kazuhito Yokoi
00477fd67a Add UI test case for error handling 2020-02-25 19:56:48 +09:00
Kazuhito Yokoi
21c57f968a Add page object code for nodes 2020-02-25 19:02:46 +09:00
Kazuhito Yokoi
f7d2314d64 Add page object code for split node and remove duplicated code 2020-02-25 19:01:17 +09:00
Kazuhito Yokoi
5ecf8c83db Support to input JSON path in debug node property 2020-02-25 18:46:02 +09:00
Nick O'Leary
608834eafb Ensure IPv6 broker names are wrapped in brackets
Fixes #2462
2020-02-24 21:52:07 +00:00
Dave Conway-Jones
1fd4b2b9fc join node - check existance before clearing timeout 2020-02-24 21:31:01 +00:00
Dave Conway-Jones
01a143cd5a Emsure trigger complete 2nd msg when set to send latest
and add test
to close #2474
2020-02-24 21:28:40 +00:00
Dave Conway-Jones
6321b21a1a Merge branch 'master' of https://github.com/node-red/node-red 2020-02-24 21:19:54 +00:00
Dave Conway-Jones
8405826fab Ensure trigger sends complete 2nd msg if set to send latest msg
and add test
to close #2474
2020-02-24 21:17:54 +00:00
Nick O'Leary
22de8855c1 Handle httpAdminRoot missing ending slash with login strategy
Fixes #2473
2020-02-24 21:08:29 +00:00
Nick O'Leary
1830478ec3 Merge pull request #2461 from node-red/set-flow-with-creds
Allow credentials to be provided as part of /flows api
2020-02-24 16:22:57 +00:00
Nick O'Leary
6d98b93135 Merge pull request #2464 from kazuhitoyokoi/master-adduitests
Add UI test cases for data formats
2020-02-24 16:20:13 +00:00
Nick O'Leary
54978e4d64 Merge pull request #2466 from node-red-hitachi/update-message-catalogue
Update message catalogue for SUBFLOW UI
2020-02-24 16:19:59 +00:00
Nick O'Leary
9d567d61fe Merge pull request #2470 from mknj/master
bump https-proxy-agent
2020-02-24 16:19:17 +00:00
Nick O'Leary
79feb691bd Add regex awareness to jsonata formatter 2020-02-24 16:08:58 +00:00
Nick O'Leary
e16fe1e6a5 Add better regex highlighting in jsonata edit mode
Fixes #2465
2020-02-24 13:27:42 +00:00
Nick O'Leary
04d3981921 Bump to jsonata 1.8.1 2020-02-24 11:42:56 +00:00
Nick O'Leary
40c3099e4e Avoid adding extra newlines when formating jsonata
Fixes #2472
2020-02-24 11:41:27 +00:00
Nick O'Leary
3f86fd7176 Upgrade to latest marked and dompurify libs 2020-02-24 11:22:47 +00:00
mknj
9e6bc46540 bump https-proxy-agent
fixes #2469

this is a major version bump of https-proxy-agent, because they set engine to >6 and did some refactoring, which is ok for node-red.

all tests pass.
2020-02-21 07:33:05 +01:00
Dave Conway-Jones
5e892f222b clarify tcp node text re blank parameters. 2020-02-19 16:40:07 +00:00
Hiroyasu Nishiyama
2da1554caa update message catalogue for subflow UI 2020-02-18 21:38:32 +09:00
Kazuhito Yokoi
a53d0c091e Merge split and join node objects 2020-02-17 19:03:45 +09:00
Kazuhito Yokoi
f88bfa059d Make scenario structures same as cookbook 2020-02-17 14:17:13 +09:00
Kazuhito Yokoi
2e38999506 Add UI test cases for data formats 2020-02-17 13:57:01 +09:00
Kazuhito Yokoi
42b841cb78 Update XPath to the latest 2020-02-17 13:29:06 +09:00
Hiroyasu Nishiyama
c0d007ffa9 add option support for overwriting settiings.js 2020-02-16 23:07:05 +09:00
Dave Conway-Jones
127b361979 change PR to only use a single property for the 2nd output 2020-02-14 20:13:37 -05:00
Nick O'Leary
e3dab3cf20 Ensure catalog load errors are logged to the console 2020-02-14 16:14:52 +00:00
Nick O'Leary
569b9f3d06 Track context sidebar element paths to track formatting changes
Fixes #2460
2020-02-13 22:39:59 +00:00
Nick O'Leary
d6b5494625 Allow credentials to be provided as part of /flows api 2020-02-13 16:44:48 +00:00
Nick O'Leary
f76edf74f9 Merge pull request #2454 from node-red/send-metric-fix
Move receive metric position to better reflect async changes
2020-02-13 10:08:24 +00:00
Kazuhito Yokoi
5c199d3bb4 Fix garbled characters in library (#2457)
* update getFileBody

* add suitable unit tests

Co-authored-by: Hiroyuki Okada <ok.okada.hiroyuki@gmail.com>
2020-02-12 16:35:33 +00:00
Nick O'Leary
634a51635c Battling Chrome Autocomplete, part 31: Wrap search input with form 2020-02-10 18:56:03 +00:00
Nick O'Leary
4f9395e881 Merge pull request #2455 from node-red-hitachi/core-node-example
Add support of example flows for core node
2020-02-10 15:17:14 +00:00
Nick O'Leary
8035531a27 Merge pull request #2368 from node-red/subflow-cred-props
Add credential-type to subflow env properties
2020-02-10 11:33:42 +00:00
Nick O'Leary
cc177533e8 Dont export subflow template creds by default 2020-02-10 11:28:56 +00:00
Nick O'Leary
cd210d9fbf Add support for credential-stored env var in subflow 2020-02-10 11:28:56 +00:00
Nick O'Leary
87b9b56b65 Merge pull request #2367 from node-red/cred-typedInput
Add credential type to TypedInput
2020-02-10 11:17:10 +00:00
Nick O'Leary
bffcaa1c17 Refocus credential typedInput when hide/show button clicked 2020-02-10 11:16:19 +00:00
Nick O'Leary
33cbb2ada8 Fixup typedInput cred css 2020-02-10 11:09:49 +00:00
Nick O'Leary
d08e77cf36 Add credential type to TypedInput 2020-02-10 11:09:49 +00:00
Nick O'Leary
1f8ed9dcb9 Merge branch 'master' into dev 2020-02-10 11:07:50 +00:00
Nick O'Leary
53b127902c Merge pull request #2458 from node-red-hitachi/master-zhtw
complete traditional chinese translation
2020-02-10 10:46:50 +00:00
JIYE YU
389cbf4900 complete traditional chinese translation 2020-02-10 11:31:37 +09:00
Nick O'Leary
80d100f3f9 Move receive metric position to better reflect async changes
Fixes #2444
2020-02-07 16:49:41 +00:00
Nick O'Leary
a05589c5a6 Filter palette using raw label not html formatted label
Fixes #2409
2020-02-07 16:31:59 +00:00
Nick O'Leary
7d32636133 Improve file store error when cache disabled and sync api used
Closes #2406
2020-02-07 14:26:30 +00:00
Nick O'Leary
3db5f928ee Wrap long context values when displaying in sidebar
Fixes #2400
2020-02-07 13:59:08 +00:00
Nick O'Leary
797da3bc8e Fix duplicating array item in visual json editor 2020-02-07 10:46:04 +00:00
Nick O'Leary
1e8d695311 Merge pull request #2453 from node-red-hitachi/master-zhcn
Complete zh-CN translation for Editor-client/Nodes/Runtime
2020-02-07 10:15:55 +00:00
JIYE YU
00eb474e02 new zh-CN translation for runtime 2020-02-07 18:27:06 +09:00
JIYE YU
ad6104baeb wrap up ch-ZN translation for nodes message.json 2020-02-07 17:58:20 +09:00
JIYE YU
cd552ab202 wrap up ch-ZN translation for editor-client files 2020-02-07 17:57:37 +09:00
Nick O'Leary
bbd471ad93 Trick chrome into autofilling dummy username/password inputs
Fixes #2445

Continuing the arms race against Chrome's war on developers getting
to choose if a form should be autocompleted or not.

The honey-pot username/password fields we already had were being
ignored. This is because they were hidden.

This fix does three things:

 - unhides the honey-pot inputs, but moves them offscreen so they won't be seen
 - gives them dummy id's so Chrome thinks they are username/password fields
 - updates our autocomplete setting to be the standards-compliant 'off' for all
  the other browsers who adhere to the standard
2020-02-06 15:36:23 +00:00
Nick O'Leary
0f1ca1c7cf cloneMessage should handle undefined without throwing err
Fixes #2399
2020-02-06 10:05:32 +00:00
Nick O'Leary
62fc554d25 Merge pull request #2431 from kazuhitoyokoi/master-removenamespace
Remove unnecessary namespaces for i18n
2020-02-06 09:25:38 +00:00
Nick O'Leary
84dc34e68f Merge pull request #2451 from kazuhitoyokoi/translations4japanese
Add Japanese translations for i18n
2020-02-06 09:22:14 +00:00
Kazuhito Yokoi
0bb77bfa7f Add Japanese translations for i18n 2020-02-06 16:14:09 +09:00
Nick O'Leary
b6702a0c3b Modify history sidebar button positioning to handle long labels
Fixes #2338
2020-02-05 19:48:24 +00:00
Nick O'Leary
a781a1dd4d Merge pull request #2440 from kazuhitoyokoi/master-supportbrowserstack
Support BrowserStack in UI testing
2020-02-05 15:40:03 +00:00
Nick O'Leary
d771527f77 Add some auto-complete snippets to the nrjavascript mode
Close #2438
2020-02-05 15:11:18 +00:00
Nick O'Leary
3d9945b60c Update to JSONata 1.8 2020-02-05 14:44:39 +00:00
Nick O'Leary
5897045f24 Ignore disabled nodes when checking for invalid configs on deploy
Closes #2430
2020-02-05 14:26:55 +00:00
Dave Conway-Jones
b2f53a183e rename BreakingExit call
(undo Brexit :-)
2020-02-05 13:58:45 +00:00
Nick O'Leary
be3dd63360 Merge pull request #2442 from node-red-hitachi/master-zhcn
Add zn-CN translation for all nodes
2020-02-05 10:59:05 +00:00
Nick O'Leary
f951fe6939 Merge pull request #2449 from Tscherno/patch-1
Add HEAD as Method
2020-02-04 20:23:39 +00:00
Dave Conway-Jones
0622be843b Add catcher for PM2 graceful shutdown 2020-02-04 13:42:34 +00:00
Hiroyasu Nishiyama
272fbc0cb0 add examples of batch node 2020-02-04 09:45:23 +09:00
Hiroyasu Nishiyama
36bf2a3c38 add support for examples of core nodes 2020-02-03 12:59:12 +09:00
Tscherno
663ed9833a Add HEAD as Method 2020-02-01 17:21:33 +01:00
Dave Conway-Jones
fcf757f715 catch mode signals to allow clean context flush on shutdown
(yes the name is intentionally ironic)
Code pattern copied from https://nodejs.org/api/process.html#process_signal_events
2020-01-31 18:11:58 +00:00
Dave Conway-Jones
88e729664a complete tidy up of trigger node
remove unnecessary console.log
2020-01-31 17:56:06 +00:00
JIYE YU
c03abdb5e7 add zn-CN translation for nodes: network, parsers, sequence 2020-01-31 11:32:23 +09:00
JIYE YU
6d3eb7bb4b fix translated doc according to comments 2020-01-31 11:32:23 +09:00
JIYE YU
7ffd37d9cb add zn-CN translation for nodes:common,function,storage 2020-01-31 11:32:23 +09:00
Dave Conway-Jones
87aacb4270 change property name to leave space if we want to also do main payload property 2020-01-30 22:20:55 +00:00
Dave Conway-Jones
3f756aac21 Allow trigger node to use other than msg.topic to separate streams
and add test
2020-01-30 21:39:34 +00:00
Jiye Yu
504d13943d wrap up the zh-tw UI translation (#2443)
* zh-tw UI translation: complement the rest part

* fix translated sentence according to comments
2020-01-30 12:40:44 +00:00
Nick O'Leary
59b1466e5d Merge pull request #2235 from 3anology/master
UI Translated to Traditional Chinese
2020-01-28 21:45:41 +00:00
Dave Conway-Jones
d5d9ac5c76 let setMessageProperty return success flag
so calling node can warn if operation tries to overwrite primitive type
2020-01-26 18:20:25 +00:00
Dave Conway-Jones
bb12ec702a Add second output to trigger node
and add tests
2020-01-24 18:20:14 +00:00
Paul Wieland
82490b0a58 Implemented RED.util.setMessageProperty 2020-01-23 11:23:02 -05:00
Paul Wieland
2cbf625483 Removing form-row label. 2020-01-23 10:56:31 -05:00
Paul Wieland
44f2a986a2 Update messages.json
This label is used for the user definable properties form-row. The word properties is duplicated with the tab description, but it best descrbies the form-rows content. If another name is chosen, this entry can be deleted.
2020-01-23 08:56:55 -05:00
Paul Wieland
c3df1c6cde Add support for user definable properties to inject node 2020-01-23 08:55:50 -05:00
Nick O'Leary
6b52206186 Merge branch 'master' into dev 2020-01-22 11:54:24 +00:00
Nick O'Leary
9d4238e5cc Re-enable jshint on editor and fixup issues 2020-01-22 11:53:41 +00:00
Kazuhito Yokoi
c16c119a7d Remove unnecessary namespaces for i18n 2020-01-21 20:13:34 +09:00
Kazuhito Yokoi
b49835c72f Support BrowserStack in UI testing 2020-01-21 09:49:19 +09:00
Nick O'Leary
ee6f6ae391 Fixup debug tests 2020-01-17 20:57:13 +00:00
Nick O'Leary
95a51aafdc Add path property to debug messages
Fixes #2358

This property can be used to identify the full path to the node that
logged a given message. If the node is inside a subflow (and maybe
nested many levels deep), this path can be used to help find the
node, rather than just the top-level subflow instance node.

A side-effect of this change is the Debug sidebar is now able to
show the message tools for a message coming from a deeply nested
subflow
2020-01-17 16:56:30 +00:00
Nick O'Leary
5e7cd79ed9 Merge pull request #2392 from kazuhitoyokoi/master-fixjsoneditor
Add icons and support i18n in typedInput of JSON editor
2020-01-17 10:38:23 +00:00
Nick O'Leary
aba6173e23 Merge pull request #2411 from kazuhitoyokoi/master-fixeditor
Fix IME bug in text editor
2020-01-17 10:36:43 +00:00
Nick O'Leary
468beee045 Merge pull request #2381 from node-red/keyboard-nav
Scroll the view with WASD/Cursor keys when nothing selected
2020-01-17 10:36:05 +00:00
Nick O'Leary
70ad66bcff Merge pull request #2425 from kazuhitoyokoi/dev-fixnodehtml
Change types from text/x-red to text/html in node html files
2020-01-17 10:35:28 +00:00
Nick O'Leary
e2c3b35391 Merge pull request #2408 from onozuka/remove-runtime-deploy-event
UI-test: fix memory leak. runtime-deploy event in deploy()
2020-01-17 10:21:34 +00:00
Nick O'Leary
448de23f59 Merge pull request #2426 from kazuhitoyokoi/master-fixuitest
Improvements of UI testing
2020-01-17 10:18:05 +00:00
Kazuhito Yokoi
74a015c329 Change types from text/x-red to text/html in node html files 2020-01-15 11:40:48 +09:00
Kazuhito Yokoi
44a07c74fd Click tab instead of workspace 2020-01-15 10:42:59 +09:00
Kazuhito Yokoi
0f8af4ba1c Use boolean value as flag instead of string value 2020-01-14 20:36:10 +09:00
Kazuhito Yokoi
214d788029 Use enter key to open node property instead of double click 2020-01-14 19:24:50 +09:00
Kazuhito Yokoi
530bf22bd5 Use palette search when selecting nodes 2020-01-14 18:02:27 +09:00
Kazuhito Yokoi
ccc98370eb Use ephemeral port number for MQTT broker 2020-01-14 17:44:56 +09:00
Kazuhito Yokoi
7640bc029c Add handling to remove unused file and directories in UI testing 2020-01-14 17:24:16 +09:00
Kazuhito Yokoi
3f72eb51a0 Fix shortcut key handling 2020-01-14 17:18:46 +09:00
Kazuhito Yokoi
8801ace247 Remain .payload in debug node property 2020-01-14 16:56:39 +09:00
Kazuhito Yokoi
faf46e4447 Improve node files for UI testing 2020-01-14 16:37:43 +09:00
Kazuhito Yokoi
63978e226b Move node files for UI testing to v1.0 directory structures 2020-01-14 15:42:56 +09:00
Nick O'Leary
b96164d4f5 Fix false change detection when no config node selected 2020-01-10 14:52:20 +00:00
Kazuhito Yokoi
944070dfb1 Move CSS definition to ace.scss 2020-01-09 13:06:39 +09:00
Kazuhito Yokoi
f0584df1d0 Revert "Fix IME bug in text editor"
This reverts commit 9cbd0fceea.
2020-01-09 12:53:39 +09:00
Nick O'Leary
ba209c2bdd Merge pull request #2417 from node-red-hitachi/fix-error-on-install
Remove undefined loadFlowLibrary call
2020-01-08 14:43:19 +00:00
Nick O'Leary
c6e2f28b97 Merge pull request #2419 from boisei0/fix-2418-regex-routes
Fixes the routes described in #2418
2020-01-08 14:43:00 +00:00
Arlena Derksen
2436bb0128 Fixes the routes described in #2418 regarding too broad matching of regex URLs. 2020-01-03 21:27:35 +01:00
Dave Conway-Jones
9c4640e010 Make min-height for change, switch, batch and mqtt consistent
to allow fit to smaller screens before scrolling
(to fix comment from forum)
2020-01-01 21:32:56 +00:00
Hiroyasu Nishiyama
1ee43113b1 remove undefined loadFlowLibrary call 2019-12-31 20:22:13 +09:00
Dave Conway-Jones
902f477ee3 Bump included nodes versions to mathc latest
rbe, tail (and sentiment).
To close #2415
2019-12-30 15:46:08 +00:00
Dave Conway-Jones
9c1d46ff92 Make node highlighting a bit more obvious for busy flows 2019-12-26 16:53:13 +00:00
Vladimir Dronnikov
fe0d4f08f3 Allow to know particular session from status node
The rationale is to keep own list of active sessions.
As a workaround for https://discourse.nodered.org/t/tcp-connection-pool-better-separation/19432
TIA
2019-12-25 06:21:55 +03:00
Kazuhito Yokoi
9cbd0fceea Fix IME bug in text editor 2019-12-17 21:00:50 +09:00
Yukio Onozuka
b22a4f94ab when call event. remove runtime event. 2019-12-13 07:52:34 +09:00
Amo DelBello
14c2005bbc Merge pull request #1 from node-red/master
node-red/node-red changes
2019-12-09 14:54:53 -07:00
Nick O'Leary
a4c351fd4f Merge pull request #2397 from kazuhitoyokoi/master-fixuitest
Fix test cases for UI
2019-12-03 10:33:05 +00:00
Kazuhito Yokoi
a364d4950d Fix test cases for UI 2019-12-02 12:43:13 +09:00
Amo DelBello
d017dd75cd Remove 'clone' from util 2019-11-29 20:15:56 -07:00
Amo DelBello
021df83c3f Replace 'clone' with 'lodash.clonedeep' 2019-11-29 18:50:30 -07:00
Kazuhito Yokoi
7805974736 Add icons and support i18n in typedInput of JSON editor 2019-11-25 16:40:42 +09:00
Nick O'Leary
c1dae95f71 Merge pull request #2390 from node-red-hitachi/fix-mqtt-jp
Update Japanese info text of mqtt out node
2019-11-22 22:29:35 +00:00
Hiroyasu Nishiyama
e7c2ff3bd2 fix typos in Japanese info text of mqtt out 2019-11-22 13:01:50 +09:00
Hiroyasu Nishiyama
25459b52a1 udate Japanese info text of mqtt 2019-11-22 12:47:36 +09:00
Nick O'Leary
d45274494d Merge branch 'master' into dev 2019-11-21 21:57:58 +00:00
Nick O'Leary
b81be8f358 Update for 1.0.3 again 2019-11-21 17:28:28 +00:00
Nick O'Leary
aa6c0b9d6e Add clarification that MQTT Out requires payload to send msg
Fixes #2370
2019-11-21 16:56:01 +00:00
Nick O'Leary
64580237d5 Remove rogue debug 2019-11-21 11:08:15 +00:00
Nick O'Leary
b93165592e Merge pull request #2372 from btsimonh/proxy-support
noproxy support in mqtt, Proxy & noproxy support in websocket
2019-11-21 10:45:23 +00:00
Nick O'Leary
83c1e44925 Merge pull request #2371 from btsimonh/projects-flowsFile-absolute
flows file absolute path plus non-existent folder creation.
2019-11-21 10:44:20 +00:00
Nick O'Leary
3088115aba Avoid unnecessary i18n catalog load if base lng provided 2019-11-21 10:42:40 +00:00
Nick O'Leary
fc93e502b8 Merge pull request #2376 from tt92/master
I18n - language fallback behaviour
2019-11-21 10:38:21 +00:00
Nick O'Leary
e90e6eaac3 Merge pull request #2388 from node-red/subflow-status-i18n
let subflow add node-red context to status so i18n works
2019-11-21 09:59:40 +00:00
Dave Conway-Jones
2f4dcba54d let subflow add node-red context to status
For all those nodes thaht don't specify it.
So that subflow status then works ok
2019-11-20 06:12:33 -05:00
tot92
683c6a748e switched loading order 2019-11-18 20:45:48 +01:00
Simon Hailes
175a871ee0 repalce for-in with 'normal' for loop in mqtt and http 2019-11-18 17:14:38 +00:00
btsimonh
b4e2061e85 Update packages/node_modules/@node-red/nodes/core/network/21-httprequest.js
Co-Authored-By: Nick O'Leary <nick.oleary@gmail.com>
2019-11-18 17:03:59 +00:00
Nick O'Leary
2aef99c440 Merge pull request #2362 from node-red-hitachi/i18n-json-editor
Update support of i18n of visual JSON editor
2019-11-18 11:32:19 +00:00
Nick O'Leary
6c125e125f Merge pull request #2383 from kazuhitoyokoi/master-fixpermission
Revert permission of script file
2019-11-18 11:29:43 +00:00
Nick O'Leary
88cbc32abc Fix inverse of 'replace' editor event 2019-11-14 19:13:23 +00:00
Kazuhito Yokoi
8f45e8f84a Revert permission of script file 2019-11-14 12:38:54 +09:00
Hiroyasu Nishiyama
21635aadfe use type name from common.type 2019-11-13 22:50:44 +09:00
Hiroyasu Nishiyama
d5234888b3 Merge branch 'master' into i18n-json-editor 2019-11-13 22:42:53 +09:00
Nick O'Leary
f478afb58a Merge pull request #2378 from node-red-hitachi/dev-node-installation
Add node installation from other than public site
2019-11-13 12:06:33 +00:00
Nick O'Leary
a54ca699b5 Scroll the view with WASD/Cursor keys when nothing selected 2019-11-13 10:06:25 +00:00
Nick O'Leary
1f5ff0c6d3 Merge pull request #2366 from btsimonh/fix-encodeObjecterror
Catches bad objects being encoded, returning instead the error.
2019-11-13 09:33:20 +00:00
Nick O'Leary
2a2541df59 Merge pull request #2361 from kazuhitoyokoi/master-fixtypedInput
Support i18n for typedInput in join and switch nodes
2019-11-13 09:29:08 +00:00
Nick O'Leary
cd629c1699 Merge pull request #2373 from kazuhitoyokoi/master-fixuitest
Fix UI testing on the latest Google Chrome
2019-11-13 09:25:59 +00:00
KAZUHIRO ITO
ff96773295 Add node installation from other than public site 2019-11-11 18:25:36 +09:00
tot92
4d6828ec14 typo 2019-11-09 22:09:02 +01:00
tot92
dae1d6057e fixed i18n language fallback behaviour 2019-11-09 22:07:06 +01:00
Kazuhito Yokoi
6726c42cc8 Remove @wdio/cli module 2019-11-05 21:59:37 +09:00
Kazuhito Yokoi
4f6023e44c Support UI testing on the latest Google Chrome 2019-11-05 11:40:20 +09:00
Kazuhito Yokoi
9e16d7f433 Move messages to editor.json 2019-11-05 11:29:43 +09:00
Simon Hailes
aa86cfc55f Add fix for HttpsProxyAgent using an incorrect default port for http: 2019-11-03 11:08:24 +00:00
Simon Hailes
6931cb9895 Added test for both UNC path and flow in non-existent subfolder. 2019-11-03 10:42:50 +00:00
Simon Hailes
d32d04bd4e websocket - add proxy support. 2019-11-03 09:55:11 +00:00
Simon Hailes
0b3e9bf5e2 mqtt & httprequest: change proxy comparison from null to falsy.
mqtt - add no_proxy support.
2019-11-03 09:54:23 +00:00
Simon Hailes
a4af7b8e21 localfilesystem - ensure folder is present before write (e.g. flows file not in user folder) 2019-11-03 09:10:32 +00:00
Simon Hailes
72deee5d74 Detect windows UNC '\\' as well as 'X:' as an absolute flow path - use the path.isAbsolute function instead of rolling our own. 2019-11-03 08:24:47 +00:00
Simon Hailes
5e9e523d4c add one line of coverage in log tests. 2019-11-02 13:21:58 +00:00
Simon Hailes
c54509df3d additional test to cover last line in encodeObject 2019-11-02 13:03:37 +00:00
Simon Hailes
63cc9adeaa small update to log - if toString() causes exception, then note and use util.inspect instead - prevents log from causing processes to abort through exception.
Add tests.
2019-11-02 12:38:40 +00:00
Simon Hailes
74d760a46d add util.inspect data to 'type not printable'. Add test to cover these lines (no existing test). 2019-11-02 12:37:07 +00:00
Simon Hailes
d46531def8 add unit tests for encode Object changes. 2019-11-02 11:27:08 +00:00
Simon Hailes
eb09ec6834 add utils.inspect result and be more explicit about the error. 2019-11-02 10:39:22 +00:00
Nick O'Leary
9bd9c6a400 Merge pull request #2364 from kazuhitoyokoi/master-addtooltip
Add tooltip to the expand button in markdown editor
2019-11-01 23:36:31 +00:00
Nick O'Leary
7321e206c5 Merge pull request #2363 from kazuhitoyokoi/master-fixtabselectkey
Support ctrl key to select tabs for Windows
2019-11-01 23:35:18 +00:00
Nick O'Leary
2c7917f0ca Merge pull request #2355 from node-red-hitachi/fix-typedInput-line-break
Prohibit line break in type menu of typedInput
2019-11-01 23:27:36 +00:00
Nick O'Leary
d94b20a908 Merge pull request #2356 from node-red-hitachi/fix-jsonata-help-display
Make JSONata help initially shown
2019-11-01 23:27:01 +00:00
Nick O'Leary
b1b1fe21dd Merge pull request #2357 from kazuhitoyokoi/addplaceholder
Add placeholders to name fields
2019-11-01 23:26:40 +00:00
Nick O'Leary
1db3af7c8e Merge pull request #2354 from node-red-hitachi/update-jsonata-message-jp
Update Japanese JSONata message catalogue
2019-11-01 23:25:46 +00:00
piyonakajima
397fe31f97 Update 17-split.html (#2365) 2019-11-01 13:04:43 +00:00
Simon Hailes
bc283aa025 Catches bad objects being encoded, returning instead the error.
Symptom- Observed that global context would not display in front end, the call returning 400.
Traced to an object in global which cause encodeObject to except.
This push catches that, and now global will display, but the object in question display as an error.
2019-11-01 11:38:26 +00:00
Kazuhito Yokoi
9dbdf0947b Add tooltip to expand button in markdown editor 2019-10-31 17:21:26 +09:00
Kazuhito Yokoi
7c21bf4555 Add icons for typedInput 2019-10-31 16:03:27 +09:00
Kazuhito Yokoi
361dc194ee Support ctrl key to select tabs for Windows 2019-10-31 14:46:29 +09:00
Hiroyasu Nishiyama
8c1aa83d12 update support of i18n of JSON editor 2019-10-31 12:26:04 +09:00
Kazuhito Yokoi
d2755a8049 Support i18n for typedInput in split and switch nodes 2019-10-30 19:58:29 +09:00
Kazuhito Yokoi
1b78bd1684 Add placeholder to topic field 2019-10-30 19:39:38 +09:00
Kazuhito Yokoi
5f67f1f078 Add placeholders to name fields 2019-10-29 20:45:57 +09:00
Hiroyasu Nishiyama
07061928df make JSONata help initially shown 2019-10-29 10:24:15 +09:00
Hiroyasu Nishiyama
18ff2df65c prohibit line break in type menu of typedInput 2019-10-28 23:49:14 +09:00
Hiroyasu Nishiyama
7b1411d171 update Japanese JSONata message catalogue 2019-10-28 22:45:53 +09:00
Nick O'Leary
3a1d0f3695 Merge pull request #2330 from kazuhitoyokoi/master-fixcopyhandling4subflow
Fix handling to avoid invalid nested subflow
2019-10-28 09:58:32 +00:00
Nick O'Leary
2cd5e1d3c5 Bump for 1.0.3 2019-10-27 21:22:20 +00:00
Nick O'Leary
000765fb77 Increase timeouts in Subflow tests to minimise false positives 2019-10-25 21:15:59 +01:00
Dave Conway-Jones
0ff324b0db delay node- remove commented out code 2019-10-25 17:03:16 +01:00
Dave Conway-Jones
a96d5096fe Fix delay to not pass through .reset and .flush props consistently
to close #2349
(it used to not pass them through but did on initial message... now it doesn't)
2019-10-25 16:48:35 +01:00
Dave Conway-Jones
e8ef476a6d update grunt-sass and add node-sass for node12 support
and update Gruntfile.js to use them
2019-10-25 15:23:51 +01:00
juggledad
22b9df62d1 Using the ‘a msg per line’ the last line does not get msg.topic passed (#2352)
When using the file-in node and ‘a msg per line’ the last line does not get msg.topic passed. 

In the  
   .on(‘end’, function() { 
code (starting at line 334) the msg is created but no msg.topic is set. Adding 
   topic:msg.topic, 
after line 343 (var m = { payload: spare,) fixes the issue.
2019-10-25 14:51:50 +01:00
Nick O'Leary
6026da867b Fix timings of Delay node tests 2019-10-25 11:48:12 +01:00
Nick O'Leary
4d58902ba7 Merge pull request #2340 from pdong/chore/update-to-jsonata-1.7
Update JSONata to 1.7.0
2019-10-25 10:25:22 +01:00
Nick O'Leary
4dc1343445 Merge pull request #2350 from kazuhitoyokoi/master-addtranslation4httprequest
Add translation for http request node
2019-10-25 10:22:41 +01:00
Nick O'Leary
080487cb33 Bump https-proxy-agent version 2019-10-25 10:22:05 +01:00
Nick O'Leary
0febcf4f9e Merge pull request #2339 from bartbutenaers/master
Check auth type on opening
2019-10-23 21:38:54 +01:00
Nick O'Leary
cd23f711ed Merge pull request #2332 from TJKoury/patch-2
Remove msg
2019-10-23 21:37:58 +01:00
Nick O'Leary
f9b147af42 Merge pull request #2334 from kazuhitoyokoi/master-fixsubflowlang2
Fix language handling in subflow node
2019-10-23 21:36:57 +01:00
Nick O'Leary
775f1110d3 Merge pull request #2337 from piyonakajima/language_of_tooltip
fix tooltip language in subflow
2019-10-23 21:33:32 +01:00
Nick O'Leary
57649a9b81 Merge pull request #2345 from 1ft-seabass/fix-tcpin
Removed unused variable "remoteDetails"
2019-10-23 21:32:29 +01:00
Nick O'Leary
72a268b70a Merge pull request #2344 from 1ft-seabass/fix-70-csv
Fixed the code format of 70-CSV.js from Tab to Space. try again.
2019-10-23 21:31:30 +01:00
Nick O'Leary
f86a171dff Merge pull request #2346 from 1ft-seabass/fix-jsdoc-description
Fixed jsdoc descriptions
2019-10-23 21:31:02 +01:00
tseigo
e022b782a9 Fixed jsdoc descriptions 2019-10-22 00:35:35 +09:00
tseigo
bd67731bb7 Removed unused variable "remoteDetails" 2019-10-22 00:28:57 +09:00
tseigo
25de4e4782 Fixed the code format of 70-CSV.js from Tab to Space. try again. 2019-10-22 00:24:10 +09:00
Phi Dong
c590247afa Update node-red/util JSONata to 1.7.0 2019-10-19 14:33:13 -07:00
Phi Dong
5d36539271 Update JSONata to 1.7.0 2019-10-19 12:37:54 -07:00
bartbutenaers
0d673486a3 Check auth type on opening 2019-10-19 14:16:03 +02:00
Nick O'Leary
29f1651a18 Use default language if lng param not set in i18n req 2019-10-18 16:09:14 +01:00
NAKAJIMA,Tomohiro
dd20a3e685 Fix the language of the tooltip 2019-10-18 23:50:54 +09:00
Kazuhito Yokoi
75a5b1354c Add translation for http request node 2019-10-17 21:56:22 +09:00
Kazuhito Yokoi
dae9ac8173 Fix language handling in subflow node 2019-10-17 21:24:55 +09:00
Dave Conway-Jones
78b735276b fix httprequest timeout units info
to close #2333
2019-10-17 13:24:51 +01:00
Kazuhito Yokoi
e10dd54e2b Revert "Merge pull request #2328 from kazuhitoyokoi/master-fixsubflowlang"
This reverts commit 873bdc6733, reversing
changes made to 8a40b075b5.
2019-10-17 21:05:06 +09:00
TJKoury
cb8deab1f9 Update packages/node_modules/@node-red/runtime/lib/nodes/Node.js
Co-Authored-By: Nick O'Leary <nick.oleary@gmail.com>
2019-10-17 07:42:11 -04:00
TJKoury
e5c27d0236 Remove msg
`msg` not defined in scope.
2019-10-16 20:00:11 -04:00
Kazuhito Yokoi
faf6fa9450 Fix copy and paste handling in subflow 2019-10-16 20:59:01 +09:00
Nick O'Leary
873bdc6733 Merge pull request #2328 from kazuhitoyokoi/master-fixsubflowlang
Fix language handling in subflow node
2019-10-16 11:12:48 +01:00
Nick O'Leary
8a40b075b5 Merge pull request #2326 from bonanitech/patch-1
Fix palette editor search visualization
2019-10-16 11:12:03 +01:00
Kazuhito Yokoi
56c41374bf Fix language handling in subflow node 2019-10-15 16:50:16 +09:00
Mauricio Bonani
a08c2c6437 Fix palette editor search visualization 2019-10-14 15:13:59 -04:00
Nick O'Leary
e94634544c Add script to generate npm publish script 2019-10-14 15:50:48 +01:00
Nick O'Leary
07fe5b247b Bump for 1.0.2 2019-10-14 13:17:48 +01:00
Nick O'Leary
c1c694035d Allow node.status() to be passed number/bool types
Adds to the existing support for string types. Also
adds unit tests for all three cases
2019-10-14 13:06:59 +01:00
Nick O'Leary
147d2a02be Ensure node status is refreshed whenever node is edited
Fixes an issue where, if the number of node outputs was changes
the node would resize, but the status text would not reposition
until a new status message arrived.

This change marks status as dirty whenever the node has been
edited, forcing it to be redrawn.
2019-10-14 13:05:45 +01:00
Nick O'Leary
6f91786f4d Fixup Change node use of node.done 2019-10-11 11:08:25 +01:00
Nick O'Leary
f62a933d1c Ensure z property included in full message debug payload
Fixes #2315 #2316
2019-10-11 11:07:48 +01:00
1ft-seabass
451835fbeb Fixed editor.json (#2321) 2019-10-11 08:55:23 +01:00
Nick O'Leary
547e7a1b21 Allow node emitted events to have multiple arguments
This is fixing a regression introduced in 1.0 where a custom
`Node.emit` function was added that could only handle a single
argument.
2019-10-10 16:35:12 +01:00
Nick O'Leary
053e3ba923 Merge pull request #2313 from kazuhitoyokoi/master-fixvisualeditor
Fix menu in visual JSON editor
2019-10-10 14:31:19 +01:00
Nick O'Leary
bf65dcd49b Merge pull request #2314 from ThierryLeGal/addItem-insert-divider
Insert divider in menu by calling RED.menu.addItem('id', null);
2019-10-10 14:29:14 +01:00
Nick O'Leary
a1d186112a Merge pull request #2323 from boisei0/jsdoc-red-util
Fixed docstrings to have them match the function signature
2019-10-10 14:26:52 +01:00
Arlena Derksen
ca7a298509 Fixed docstrings to have them match the function signature (name of parameters). 2019-10-10 14:57:19 +02:00
Kazuhito Yokoi
ff4d58f648 Fix invalid JSON data in template node (#2322) 2019-10-10 10:34:10 +01:00
kitazaki
a1e10e99fa Update 10-file.html (#2320) 2019-10-09 14:51:38 +01:00
Ryoichi Obara
16bda530f6 Remove unnecessary comma. (#2312) 2019-10-09 08:41:33 +01:00
Ryoichi Obara
bf9e04d9db Unify translations of "boolean". (#2318) 2019-10-09 08:40:36 +01:00
Ryoichi Obara
8df86a75b1 Interval of inject node should be 596 hours or less. (#2319) 2019-10-09 08:39:08 +01:00
Thierry Le Gal
5056203023 Insert divider in menu by calling RED.menu.addItem('id', null); 2019-10-07 14:47:20 +02:00
Kazuhito Yokoi
a0026e66ce Fix element to collapse items in visual JSON editor 2019-10-07 16:13:04 +09:00
Nick O'Leary
f75dd2209d Bump for 1.0.1 2019-10-04 11:13:46 +01:00
Nick O'Leary
e35f6d9e35 Allow TLS config node to provide just CA cert
Fixes #2297
2019-10-04 11:02:00 +01:00
Nick O'Leary
3cb00ce4e0 Merge pull request #2308 from kazuhitoyokoi/master-fixgridsetting
Fix grid setting in flow editor
2019-10-04 10:53:01 +01:00
Nick O'Leary
8e18cf5986 Merge pull request #2306 from kazuhitoyokoi/master-fixtooltips
i18n support in tooltips
2019-10-04 10:50:27 +01:00
Nick O'Leary
81f80600f5 Merge pull request #2307 from kazuhitoyokoi/master-fixinjectnode
Fix width on inject node property
2019-10-04 10:49:48 +01:00
Kazuhito Yokoi
895156675f Fix grid setting 2019-10-04 18:15:32 +09:00
Kazuhito Yokoi
1c424e2e0a Fix width on inject node property 2019-10-04 15:33:31 +09:00
Kazuhito Yokoi
0124bb17e8 i18n support in tooltips 2019-10-04 12:22:09 +09:00
Hiroyasu Nishiyama
2c89b2d262 update Japanese info text of range node (#2302) 2019-10-03 20:32:56 +01:00
Nick O'Leary
c7bbe2f1fe Add env vars to enable safe mode and projects (#2301)
* Add NODE_RED_ENABLE_SAFE_MODE and NODE_RED_ENABLE_PROJECTS

* Allow env-vars to be set to false to disable features
2019-10-03 20:31:16 +01:00
Nick O'Leary
88609a8829 Merge pull request #2303 from pdong/bug/node-color-change-when-not-on-a-flow
Fix issue where subflow color did not update when not on a flow
2019-10-03 15:59:35 +01:00
Nick O'Leary
329beb166c Merge pull request #2305 from kazuhitoyokoi/master-fixlargeicon4subflowtab
Fix large icon on subflow tab in IE
2019-10-03 15:54:34 +01:00
Nick O'Leary
e36f3d937c Merge branch 'pr_2304' 2019-10-03 15:53:58 +01:00
Nick O'Leary
1395092ca6 Add viewbox to default icon 2019-10-03 15:53:26 +01:00
Nick O'Leary
c09004dbc8 Fix error when setting typedInput to boolean true/false 2019-10-03 15:04:49 +01:00
Kazuhito Yokoi
7efe4a2776 Fix large icon on subflow tab in IE 2019-10-02 18:22:43 +09:00
Dave Conway-Jones
b763e0b0cb Let switch node between rule work both ways round
and add test
2019-10-02 09:52:26 +01:00
Kazuhito Yokoi
ddd0d1bef3 Fix invisible icons in IE 2019-10-02 17:39:38 +09:00
Phi Dong
dbca2178c0 Fix issue where subflow color did not update when not on a flow 2019-10-01 22:46:01 -07:00
Dave Conway-Jones
af742ea536 Add example to range node info and make use of target consistent 2019-10-01 20:57:20 +01:00
Nick O'Leary
14c1a86b9b Merge pull request #2299 from kazuhitoyokoi/master-fixtypedinput4ie
Fix large icons in typed input for IE
2019-10-01 12:43:23 +01:00
Nick O'Leary
ee3dc8c4cd Join node must clone group message before sending 2019-10-01 12:41:20 +01:00
Kazuhito Yokoi
1ed148aaf5 Fix large icons in typed input for IE 2019-10-01 20:02:34 +09:00
Nick O'Leary
3327adb1ae Update readme 2019-09-30 13:38:46 +01:00
Nick O'Leary
4d5f771f9f Bump for 1.0 2019-09-30 11:02:22 +01:00
Nick O'Leary
aa69d663ed Put <meta> inside <head> to keep IE11 happy 2019-09-30 10:59:20 +01:00
Nick O'Leary
29d1894f9a Fix wrap of header logo in IE11 2019-09-30 10:59:04 +01:00
Nick O'Leary
e5738d608c Add fallback for Object.values call in IE11 2019-09-30 10:58:03 +01:00
Nick O'Leary
9775d3a33d Ensure status is refreshed when switching tabs 2019-09-30 09:56:51 +01:00
Nick O'Leary
ad4cf8d631 Merge branch 'dev' of github.com:node-red/node-red into dev 2019-09-30 09:56:01 +01:00
Dave Conway-Jones
a27e8777aa Let function node spinner go to 0 2019-09-30 09:54:05 +01:00
Nick O'Leary
d23edcc0b5 Merge branch 'dev' of github.com:node-red/node-red into dev 2019-09-29 16:47:44 +01:00
Nick O'Leary
52373e5bef Add click-on-tooltip to close
For the rare occasions a tooltip gets orphaned on the page
2019-09-29 16:47:18 +01:00
Dave Conway-Jones
bb70e796a1 Change MQtt node default 3.1 compatibility mode to false 2019-09-27 14:22:37 +01:00
Yuma Matsuura
7957ec4369 Modify id 2019-09-27 19:17:17 +09:00
Nick O'Leary
3365d26b40 Merge pull request #2291 from kazuhitoyokoi/dev-fixmenuhiding
Fix menu hiding function for flow editor
2019-09-26 20:45:59 +01:00
Nick O'Leary
d3c111b533 Merge pull request #2293 from kazuhitoyokoi/dev-fixi18n4project
Update i18n for project feature
2019-09-26 20:32:15 +01:00
Nick O'Leary
ec876eb102 Merge pull request #2295 from kazuhitoyokoi/dev-fixnodedraggablehandling
Fix draggable handling in palette
2019-09-26 20:31:41 +01:00
Kazuhito Yokoi
dddfb1ec08 Fix node draggable handling 2019-09-26 11:43:24 +09:00
Nick O'Leary
6fc9c03d70 Ensure complete node scope property is remapped on import 2019-09-24 21:04:33 +01:00
Kazuhito Yokoi
199ff071e8 Update i18n for project feature 2019-09-24 19:46:51 +09:00
Kazuhito Yokoi
7e4a06044a Fix menu hiding function for flow editor 2019-09-24 17:22:36 +09:00
Nick O'Leary
d047b75cb7 Show clear debug shortcut in tooltip 2019-09-23 10:28:26 +01:00
Nick O'Leary
6fb6b13037 Normalise default subflow color references 2019-09-23 10:28:26 +01:00
Dave Conway-Jones
460c5a1ae3 fix file-in port labels for all 4 options 2019-09-20 21:57:19 +01:00
Nick O'Leary
9955bcc339 Hide header text of very small screens to deploy is visible 2019-09-20 13:08:50 +01:00
Nick O'Leary
0a3ab996eb Merge pull request #2290 from node-red-hitachi/fix-node-name-breaking
allow word breaking of node name with long word
2019-09-20 13:08:34 +01:00
Nick O'Leary
46f912a6f9 Merge pull request #2283 from kazuhitoyokoi/dev-fixmarkdowneditor
Fix Markdown editor
2019-09-20 13:00:04 +01:00
Nick O'Leary
01e0f24752 Merge pull request #2289 from kazuhitoyokoi/dev-fixinfo4completenode
Fix typo in complete node
2019-09-20 12:59:38 +01:00
Nick O'Leary
7178c63e10 Fix tab access on touch screens 2019-09-20 12:58:21 +01:00
Nick O'Leary
30c402eb83 Update radialMenu to use standard theme colours 2019-09-20 12:58:21 +01:00
Nick O'Leary
2601cc898c Fix undefined reference loading on mobile 2019-09-20 12:58:21 +01:00
Dave Conway-Jones
d2a8823808 add extra comment re mustache escapes to tempalte info 2019-09-20 11:20:40 +01:00
Dave Conway-Jones
6b61fa9f6f remove legacy error option from file in mode
(for 1.0)
2019-09-20 11:18:19 +01:00
Hiroyasu Nishiyama
247052df5f allow word breaking of node name with long word 2019-09-19 22:50:35 +09:00
Kazuhito Yokoi
8eb28555bc Enable wrap mode in Markdown editor 2019-09-17 20:26:59 +09:00
Kazuhito Yokoi
73132475dc Fix typo in complete node 2019-09-17 18:10:47 +09:00
Kazuhito Yokoi
42c6487ff3 Show print margin on ace editor 2019-09-17 14:47:00 +09:00
Nick O'Leary
8d2ca25fd6 Update changelog 2019-09-16 15:33:05 +01:00
Nick O'Leary
5c5919a7eb Merge branch 'master' into dev 2019-09-16 15:27:34 +01:00
Nick O'Leary
34cdbfc852 Bump for 1.0.0-beta.4 2019-09-16 15:27:06 +01:00
Nick O'Leary
1bc50194aa Merge pull request #2282 from node-red-hitachi/update-jp-message
update Japanese message catalogue
2019-09-16 15:23:38 +01:00
Nick O'Leary
4a75236e74 Merge pull request #2286 from node-red-hitachi/fix-subflow-UI-select
Fix subflow UI for select
2019-09-16 15:23:15 +01:00
Nick O'Leary
64b2f881c4 Merge pull request #2285 from node-red-hitachi/fix-subflow-ui-label-padding
Remove padding for label for SUBFLOW UI row without icon
2019-09-16 15:21:05 +01:00
Nick O'Leary
4709ddea5d Merge pull request #2284 from node-red-hitachi/allow-subflow-label-row-wo-name
Allow subflow label row without environment variable name
2019-09-16 15:18:44 +01:00
Hiroyasu Nishiyama
6ef49152f3 remove useless variable definition 2019-09-15 23:55:27 +09:00
Hiroyasu Nishiyama
1c44b0bc98 Fix subflow UI for select 2019-09-15 23:44:01 +09:00
Hiroyasu Nishiyama
11bce8c17c remove padding before label text for SUBFLOW UI row 2019-09-13 23:11:23 +09:00
Hiroyasu Nishiyama
b42fff1055 Allow SUBFLOW UI label row without variable name 2019-09-13 22:49:48 +09:00
Kazuhito Yokoi
1b2e442513 Remove print margin from library editor 2019-09-13 14:43:13 +09:00
Kazuhito Yokoi
a4d48077ba Remove print margin from ace editor 2019-09-13 14:42:45 +09:00
Kazuhito Yokoi
901e2527d8 Maximize the size of markdown editor 2019-09-13 14:41:10 +09:00
Nick O'Leary
f0839571d0 Clone the first message passed to node.send in Function
Also introduces an optional second arg to node.send in the Function
node that can disable that cloning
2019-09-12 22:09:35 +01:00
Dave Conway-Jones
89d0d6ec93 remove old rc option from exec node for 1.0
(not removing functionality so old flows will keep working - just removing option to select it)
2019-09-12 17:01:11 +01:00
Hiroyasu Nishiyama
922ab1d17b update Japanese message catalogue 2019-09-11 22:46:01 +09:00
Dave Conway-Jones
7c7be378bc Add python and SQL to template language options
as we already include in the ACE modes
2019-09-10 17:17:21 +01:00
Nick O'Leary
ec01f8f54b Move context sidebar auto-refresh option to individual sections 2019-09-10 17:10:22 +01:00
Nick O'Leary
5a094b44c4 Remove 'uglify' from Grunt watch task
The grunt watch task is used by the grunt dev task that watches for
changes and auto rebuilds the editor js.

When running in dev mode, the editor will load the unminified version
of red.js. This means there is no point in running the uglify task to
generate the minified version. The uglify task tasks a few seconds and
if you do a couple rapid saves, the second will often not get built as
the previous uglify task was still running.

Removing it from the dev task shouldn't have any side effects. It still
forms part of the `grunt build` and `grunt release` tasks where it is
needed.
2019-09-10 17:04:53 +01:00
Nick O'Leary
3c657a6645 Fix Switch node display of jsonata_exp type 2019-09-10 14:31:34 +01:00
Nick O'Leary
3129d44ff1 Realign subflow output port labels 2019-09-10 14:31:17 +01:00
Nick O'Leary
00306f82c5 Remove sentiment from core nodes 2019-09-10 14:31:08 +01:00
Nick O'Leary
7def676a17 Create SECURITY.md 2019-09-10 12:56:32 +01:00
Nick O'Leary
6c48735854 Move flow-status button to footer for consistency 2019-09-10 11:49:59 +01:00
Nick O'Leary
a0b1831cdb Fix node hover effect to prevent jumping position 2019-09-10 11:39:07 +01:00
Nick O'Leary
db9fb8480a Filter quickadd properly when splicing a wire 2019-09-10 11:38:35 +01:00
Nick O'Leary
c138e2ffb4 Mark workspace dirty when deleting link node link
Fixes #2274
2019-09-10 11:12:38 +01:00
Nick O'Leary
473c45794e Merge pull request #2281 from node-red-hitachi/fix-comple-node-info-text
update info text of complete node & add JP text
2019-09-10 09:55:46 +01:00
Nick O'Leary
a12aa81d73 Add red-ui-button class to strategy login button 2019-09-10 09:54:15 +01:00
Nick O'Leary
0033e279f1 Merge pull request #2277 from hobbyquaker/patch-1
Add css class to login submit button
2019-09-10 09:48:26 +01:00
Nick O'Leary
a25e98d0cb Fix padding of subflow locale select
Closes #2276
2019-09-10 09:45:04 +01:00
Nick O'Leary
bc65480f27 Merge pull request #2273 from node-red-hitachi/update-jp-message
Update JP message catalogue
2019-09-10 09:32:27 +01:00
Hiroyasu Nishiyama
8582cda124 update info text of complete node & add JP text 2019-09-09 21:44:23 +09:00
Nick O'Leary
d963dfdbb6 Merge branch 'master' into dev 2019-09-06 10:49:27 +01:00
Nick O'Leary
f7e9c109f6 Bump for 0.20.8 2019-09-06 10:28:52 +01:00
Nick O'Leary
30c3004f27 Sanitize tab name in edit dialog 2019-09-06 10:25:30 +01:00
Yuma Matsuura
17653761b9 Update a line break function 2019-09-03 18:43:46 +09:00
Sebastian Raff
4f049fd94b add class red-ui-button to cancel button 2019-08-28 17:55:59 +02:00
Sebastian Raff
f98d1c95cc Add css class to login submit button (#2275) 2019-08-27 19:32:59 +02:00
Hiroyasu Nishiyama
a2b5c0247b update JP message catalogue 2019-08-26 23:08:25 +09:00
3Anology
bca9b5d8c0 基本Node繁體中文化 2019-08-23 00:12:41 +08:00
3Anology
bc789c7f9f Update infotips.json 2019-08-22 23:50:44 +08:00
Nick O'Leary
28bda9fa41 Bump for 1.0.0-beta.3 2019-08-22 11:09:55 +01:00
Nick O'Leary
18aeeab041 Bump dependencies 2019-08-22 10:40:33 +01:00
Nick O'Leary
c7427a5f7c Add nls messages for new palette categories 2019-08-21 17:30:02 +01:00
Nick O'Leary
03aa6c7d3a Apply user specified palette cateogies and remaining core ones 2019-08-21 17:27:06 +01:00
Nick O'Leary
10077ae750 Use a more atomic process for writing context files
Fixes #2271
2019-08-21 16:54:26 +01:00
Nick O'Leary
74eec25285 Merge pull request #2213 from node-red/node-categories
Change core node categories
2019-08-21 16:04:44 +01:00
Nick O'Leary
b6055479a1 Move Complete node to the new common category 2019-08-21 14:41:51 +01:00
Nick O'Leary
69b781419f Move io to network 2019-08-21 14:23:24 +01:00
Nick O'Leary
da6db24f9e Reorganise nodes into new categories 2019-08-21 14:23:23 +01:00
Nick O'Leary
2b66723d42 Another pass of categorisation 2019-08-21 14:22:30 +01:00
Nick O'Leary
00a3e25714 Change core node categories 2019-08-21 14:21:34 +01:00
Nick O'Leary
8ccbd2d8f9 Merge branch 'dev' into pr_2258 2019-08-21 12:52:58 +01:00
Nick O'Leary
8307f26099 Fix up dynamic generation of switch ui 2019-08-21 12:39:51 +01:00
Nick O'Leary
c686f7eefc Set default http request persist option to false 2019-08-21 11:45:21 +01:00
Nick O'Leary
311c7b1158 Merge pull request #2261 from eeyepee/master
Add HTTP Persistent (session reuse) capability
2019-08-21 11:44:35 +01:00
Nick O'Leary
a17325f028 Update Function catch tests to handle async receive 2019-08-21 11:39:34 +01:00
Nick O'Leary
b734097d16 Merge pull request #2227 from node-red/node-done
Adds Done callback to Input event handler
2019-08-21 11:15:00 +01:00
Nick O'Leary
afaf077aca Pass httpServer to runtime even when httpAdmin disabled
Fixes #2272
2019-08-21 11:12:50 +01:00
Dave Conway-Jones
bf14af6a1f Function node - handle things thrown that aren't proper Error types
and add tests
to close #2269
2019-08-19 10:42:14 +01:00
Nick O'Leary
e72faef839 Check both node props and defn props when deciding to splice 2019-08-16 14:59:15 +01:00
Nick O'Leary
b274bafe8e Allow a node to change if it has an input port
Closes #2268
2019-08-15 13:29:08 +01:00
Nick O'Leary
7bed967755 Add node.done to exec node 2019-08-15 10:40:40 +01:00
Nick O'Leary
944b81b71c Update UDP nodes for node.done 2019-08-15 10:20:54 +01:00
Nick O'Leary
cd529d53ae Update TCP nodes to node.done 2019-08-15 10:19:03 +01:00
Nam Giang
0d680a58f3 removed expensive try/catch 2019-08-14 15:11:03 -07:00
Nam Giang
b30d519523 Merge branch 'master' of github.com:namgk/node-red 2019-08-14 15:02:51 -07:00
Nick O'Leary
83932e1725 Fix Flow test for updated node.done api 2019-08-14 22:55:46 +01:00
Nick O'Leary
4ce0e39760 Add nodeDone to File nodes 2019-08-14 22:28:10 +01:00
Nick O'Leary
84232f25f0 Add node done to mqtt, http req and ws output nodes 2019-08-14 15:54:06 +01:00
Nick O'Leary
2daedf8fd5 Sanitize subflow env var names properly when building ui form 2019-08-14 11:43:04 +01:00
Nick O'Leary
fe084a4478 Allow search results to show more than 25 results 2019-08-14 11:37:46 +01:00
Nick O'Leary
5bf9646a76 Merge pull request #2266 from node-red-hitachi/fix-subflow-i18n
Fix i18n of new subflow feature
2019-08-14 09:52:42 +01:00
Nick O'Leary
2b1f28e6c2 Merge pull request #2265 from node-red-hitachi/fix-ko-message-catalogue
remove unused entries in KO message catalogue
2019-08-14 09:52:05 +01:00
Nick O'Leary
5b8bd6e64f Merge pull request #2264 from node-red-hitachi/fix-de-message-catalogue
remove unused entries in DE message catalogue
2019-08-14 09:51:51 +01:00
Nick O'Leary
426fd499ce Fix ctrl-click on wire whilst already in quick-join 2019-08-14 09:50:34 +01:00
Nick O'Leary
17d3a5840d Revert "Add initial core:layout-flow action"
This reverts commit be49e1d383.
2019-08-13 20:41:13 +01:00
Nick O'Leary
be49e1d383 Add initial core:layout-flow action 2019-08-13 20:38:25 +01:00
Hiroyasu Nishiyama
daa98e8925 fix i18n of new subflow feature 2019-08-13 21:17:31 +09:00
Nick O'Leary
58784b7568 Use ctrl-click on wire to splice node in place 2019-08-13 10:31:21 +01:00
Hiroyasu Nishiyama
419a183167 remove unused entries in KO message catalogue 2019-08-13 15:05:14 +09:00
Hiroyasu Nishiyama
675b4bde14 remove unused entries in DE message catalogue 2019-08-13 14:51:59 +09:00
Nick O'Leary
ee6ee99577 Make icon and color pickers more consistent 2019-08-12 22:07:55 +01:00
Ibrahim Al-Mahfooz
3bc1f69e75 Update 21-httprequest.js 2019-08-12 22:52:00 +03:00
Ibrahim Al-Mahfooz
5b9df6d5f2 Update 21-httprequest.html 2019-08-12 22:50:37 +03:00
Ibrahim Al-Mahfooz
9f062ec1b8 Update messages.json 2019-08-12 22:49:41 +03:00
Ibrahim Al-Mahfooz
b52a47bd03 Update messages.json
Change persistent to persist
2019-08-12 22:06:49 +03:00
Ibrahim Al-Mahfooz
5e20134f4f Update 21-httprequest.html
Change persistent to persist
2019-08-12 22:05:50 +03:00
Ibrahim Al-Mahfooz
89d267d6a2 Update packages/node_modules/@node-red/nodes/locales/en-US/messages.json
Co-Authored-By: Nick O'Leary <nick.oleary@gmail.com>
2019-08-12 20:29:09 +03:00
Nick O'Leary
607bc42f59 Merge branch 'dev' into pr_2225 2019-08-12 15:05:12 +01:00
Nick O'Leary
880757fb5d Rework Subflow Instance property UI (#2236)
* Add support of Subflow UI definition

* new UI definition for env var

* fix label

* fixed value obtaining

* fixed label width

* fix checkbox

* fix subflow info

* remove old subflow ui tests

* add tests

* merge ui new changes

* fix initial open button

* fix environment variable edit tab

* WIP: cp-1

* Rework subflow ui property

* Restrict SF value type according to input selection

* Move subflow property UI code to subflow.js

* Update subflow ui type select appearance

* Present subflow instance properties as table rather than generated UI

* Move subflow instance properties to separate tab

* Fix subflow property ui element layout issues
2019-08-12 15:01:54 +01:00
Nick O'Leary
c8acc6a12e Fix redo of subflow create 2019-08-12 14:51:01 +01:00
Nick O'Leary
7d4c2442da Merge branch 'dev' into pr_2221 2019-08-12 14:44:30 +01:00
Nick O'Leary
e5255b0c7c Ensure 2nd arg to node.error is an object
Fixes #2228
2019-08-12 14:36:26 +01:00
Nick O'Leary
ac3ef9b6fc Merge pull request #2263 from node-red-hitachi/fix-subflow-category-change
fix subflow category change on palette
2019-08-12 10:58:56 +01:00
Hiroyasu Nishiyama
7b5a41c3ff fix subflow category change on palette 2019-08-12 13:49:34 +09:00
Ibrahim Al-Mahfooz
d5b0d2a886 Update 21-httprequest.html
Adding the HTTP Persistent web configuration
2019-08-09 21:26:14 +03:00
Ibrahim Al-Mahfooz
4d60447242 Update 21-httprequest.js
Adding HTTP persistent definition and function
2019-08-09 21:23:28 +03:00
Ibrahim Al-Mahfooz
78bee3dc59 Update messages.json
Added the HTTP Persistent item
2019-08-09 21:20:45 +03:00
Nick O'Leary
e2db958510 Fix up admin nodes test for audit log changes 2019-08-09 17:27:32 +01:00
Nick O'Leary
16440072fb Add audit log to project spec tests 2019-08-09 17:09:03 +01:00
Nick O'Leary
be2dd6dc32 Add req back to audit log events and extend to Projects api 2019-08-09 16:56:11 +01:00
Nick O'Leary
189bde7c9c Merge pull request #2259 from kazuhitoyokoi/master-fixtabsmenu
Remove tab menu from node property UI for subflow and configuration nodes
2019-08-09 10:26:08 +01:00
Nick O'Leary
6a4760e291 Mark workspace dirty when shift-click-drag detaches wires
Fixes #2260
2019-08-09 10:24:52 +01:00
Kazuhito Yokoi
c082bb97e0 Remove tab menu from node property UI for subflow and config nodes 2019-08-07 12:29:20 +09:00
Nam Giang
c8e14f91e7 optimization for switch node 2019-08-06 17:41:35 -07:00
Nick O'Leary
6032d096ec Merge branch 'master' into dev 2019-08-06 17:13:00 +01:00
Nick O'Leary
defa9a2270 Fix ssh-keygen error handling 2019-08-06 17:12:40 +01:00
Nick O'Leary
77a913f858 Add Node 12 to full build matrix on Travis
Having removed the ui test dependencies out of package.json
we can remove the 'allow failures' flag from the node 12 build.

Given how close Node 12 is to being LTS, we really need to pay
proper attention to it.
2019-08-06 16:34:43 +01:00
Nick O'Leary
6e3fa974ba Remove all ui test dependencies from package.json
Given chromedriver was already an extra dependency that needed to
be manually installed, I have now moved all of the webdriver.io
dependencies out as well.

A new script has been added to install all of the ui test dependencies.

The Grunt file has been updated on how it checks for the missing
deps.
2019-08-06 16:32:46 +01:00
Nick O'Leary
7926055b97 Merge branch 'master' into dev 2019-08-06 16:10:33 +01:00
Nick O'Leary
ffd10e656e Merge pull request #2251 from kazuhitoyokoi/master-fixsplitnode
Fix escape character handling for separator in split node
2019-08-06 16:00:58 +01:00
Nick O'Leary
59c1828078 Merge pull request #2253 from kazuhitoyokoi/master-removetooltip
Fix duplicated tooltips
2019-08-06 16:00:40 +01:00
Nick O'Leary
6164271fe8 Merge pull request #2250 from kazuhitoyokoi/master-updatetranslation4delaynode
Add Japanese translation into delay node
2019-08-06 16:00:01 +01:00
Nick O'Leary
26ba35933d Merge pull request #2257 from kazuhitoyokoi/dev-updatejapanesetranslation
Update Japanese message catalog
2019-08-06 15:59:46 +01:00
Nick O'Leary
87359937c9 Merge pull request #2256 from kazuhitoyokoi/master-fixerrorhandlingtostartserver
Use appropriate version of Node.js
2019-08-06 15:59:34 +01:00
Nick O'Leary
9b938f6515 Fix default value handling on context array access
Fixes #2252
2019-08-06 15:55:25 +01:00
Nick O'Leary
6c3913785d Add error event handler to ssh-keygen child_process
Fixes #2255
2019-08-06 15:21:57 +01:00
Nick O'Leary
542cf3147d Support displaying falsey node status values
Fixes #2246
2019-08-06 15:12:13 +01:00
Nick O'Leary
fb9828badc Update Function node to add node.done 2019-08-06 14:27:56 +01:00
Kazuhito Yokoi
2505ac3f98 Update Japanese message catalog 2019-08-06 19:57:39 +09:00
Kazuhito Yokoi
fde8548166 Remove handling for unused error code 2019-08-06 19:30:05 +09:00
Kazuhito Yokoi
fe91295704 Replace node.js with Node.js 2019-08-06 19:27:46 +09:00
Kazuhito Yokoi
15b99c5749 Use appropriate the version of Node.js 2019-08-06 19:24:45 +09:00
Kazuhito Yokoi
9d66ca4a49 Fix duplicated tooltip 2019-08-05 19:03:30 +09:00
Kunihiko Toumura
b749a27f86 Eliminate snake_case and use camelCase, and change assignment of keyboard shortcut 2019-08-05 10:20:46 +09:00
Nick O'Leary
083212cffe Merge pull request #2248 from kazuhitoyokoi/master-removeunusedvariables
Remove unused variable
2019-08-02 09:42:22 +01:00
Kunihiko Toumura
c4e8756210 merge upstream changes 2019-08-02 15:15:30 +09:00
Kazuhito Yokoi
3a6448f727 Fix splitters in split node 2019-08-02 13:56:37 +09:00
Kazuhito Yokoi
fe18df25ba Add Japanese translation to delay node 2019-08-01 20:50:35 +09:00
Hiroyasu Nishiyama
db65460ec0 fix SUBFLOW palette node update & SUBFLOW default color 2019-07-31 22:59:29 +09:00
Kazuhito Yokoi
0ad3eceb82 Remove unused variables 2019-07-31 16:06:30 +09:00
Nick O'Leary
a376d6e361 Merge pull request #2226 from node-red/add-has_key-to-switch
Add "has key" rule to  switch node + tests
2019-07-30 23:06:44 +01:00
Nick O'Leary
45c7f3f3ca Update packages/node_modules/@node-red/nodes/core/logic/10-switch.html 2019-07-30 23:06:18 +01:00
Nick O'Leary
238de59a2a Merge pull request #2232 from node-red-hitachi/fix-delete-tab
fix reference error on deleting tab
2019-07-30 23:04:01 +01:00
Nick O'Leary
96255e51d2 Merge pull request #2245 from node-red-hitachi/fix-conv-subflow
Fix error on converting selection to subflow
2019-07-30 23:03:30 +01:00
Nick O'Leary
18c3223105 Merge pull request #2247 from kazuhitoyokoi/master-fixvariablename
Fix wrong variable name
2019-07-30 23:01:59 +01:00
Kazuhito Yokoi
b9e97792f3 Fix wrong variable name 2019-07-30 19:52:28 +09:00
Hiroyasu Nishiyama
cbce9b8637 fix undo handling & typo 2019-07-30 11:07:55 +09:00
Ben Hardill
5ab90b85da Limit the regex for the /nodes/ api end points
fixes #2240

It looks like the regex for the /nodes/... endpoints over matches.

I've added `^` to the start to anchor the matches to the start of the
URL.
2019-07-29 11:42:29 +01:00
Nick O'Leary
f3e1e8a2c7 Merge pull request #2244 from kazuhitoyokoi/master-fixwiring4subflownode
Fix inserting new subflow node to existing wire
2019-07-29 10:57:45 +01:00
Nick O'Leary
e41b292e54 Merge pull request #2238 from teastman/master
Handle undefined node._def in edit stack title.
2019-07-29 10:44:54 +01:00
Hiroyasu Nishiyama
86928bbb2d fix converting selection to subflow 2019-07-26 23:06:56 +09:00
Kazuhito Yokoi
2f5ec8b5bf Fix inserting new subflow node to existing wire between nodes 2019-07-26 17:51:49 +09:00
Yuma Matsuura
a42d7d867e Add a libe break function 2019-07-26 11:36:22 +09:00
Tyler Eastman
14ac6446de Handle undefined node._def in edit stack title. 2019-07-22 14:25:52 -07:00
Hiroyasu Nishiyama
260a9723a4 use custom color picker instead of color input type 2019-07-21 22:55:25 +09:00
Kunihiko Toumura
4e7b000dcd Merge remote-tracking branch 'upstream/dev' into dev-redo 2019-07-17 09:13:01 +09:00
Kunihiko Toumura
2254e4c57e minor fix (add semicolon) 2019-07-17 09:12:47 +09:00
3Anology
d517697564 zh-TW
繁體中文(台灣)
2019-07-15 19:15:29 +08:00
Hiroyasu Nishiyama
25a27733b9 fix reference error on deleting tab 2019-07-15 11:23:27 +09:00
Nick O'Leary
6ab520984c Merge branch 'dev' into pr_2229 2019-07-12 13:37:13 +01:00
Nick O'Leary
04d7106956 Remove unwanted icons 2019-07-12 13:37:01 +01:00
Hiroyasu Nishiyama
db5589f2aa rearrange contents of subflow template settings tab 2019-07-11 19:37:47 +09:00
Hiroyasu Nishiyama
d06dbbb4bd changed to color change reflect immediately on OK 2019-07-11 08:22:31 +09:00
Dave Conway-Jones
b7a62bd9e7 Update packages/node_modules/@node-red/nodes/core/logic/10-switch.html
Co-Authored-By: Nick O'Leary <nick.oleary@gmail.com>
2019-07-10 10:01:17 +01:00
Dave Conway-Jones
93ad9a3aa6 Update packages/node_modules/@node-red/nodes/core/logic/10-switch.js
Co-Authored-By: Nick O'Leary <nick.oleary@gmail.com>
2019-07-10 10:01:09 +01:00
Nick O'Leary
f1855174f0 Merge branch 'dev' into pr_2165 2019-07-10 09:30:48 +01:00
Dave Conway-Jones
a2dedba0ef change internal type to hask 2019-07-09 21:04:53 +01:00
Nick O'Leary
5a65f445f0 Bump test helper version 2019-07-09 11:44:33 +01:00
Nick O'Leary
f52289b2c3 Add send to input handler signature 2019-07-09 11:40:55 +01:00
Nick O'Leary
3b5ea0f15f Add node done API 2019-07-08 23:23:33 +01:00
Dave Conway-Jones
238bcb8698 Add "has key" rule to switch node + tests 2019-07-08 15:54:31 +01:00
Hiroyasu Nishiyama
3ee8bcad8c add support for specifying subflow template color 2019-07-08 23:52:08 +09:00
Nick O'Leary
f0a51bafbe Use node/tab map to make filterNodes more efficient 2019-07-08 10:55:26 +01:00
Nick O'Leary
944f3bd329 Merge branch 'master' into dev 2019-07-07 21:48:13 +01:00
Nick O'Leary
8bb7b2e88b Ensure session expiry timeout doesn't exceed limit 2019-07-06 16:34:48 +01:00
Nick O'Leary
aab0b0b4bf Bump for 0.20.7 2019-07-05 11:12:26 +01:00
Nick O'Leary
083d6c5125 Merge pull request #2224 from natcl/patch-4
Update jsonata to 1.6.5 which should fix #2183
2019-07-05 09:29:13 +01:00
Nathanaël Lécaudé
c2167a2c5f Add jsonata bump in util 2019-07-04 18:08:44 -04:00
Nathanaël Lécaudé
1a695e0451 Update jsonata to 1.6.5 which should fix #2183 2019-07-04 17:50:55 -04:00
Kunihiko Toumura
8847f325ed Merge remote-tracking branch 'upstream/dev' into dev-redo 2019-07-04 08:31:45 +01:00
Kunihiko Toumura
94c9da468e fix initialization bug 2019-07-04 08:26:39 +01:00
Nick O'Leary
24b38407e4 Merge branch 'master' into dev 2019-07-01 12:43:16 +01:00
Nick O'Leary
f49d1ae860 Ensure the subflow stop promise is waiting for before restarting 2019-07-01 12:42:11 +01:00
Nick O'Leary
8b3b541a56 Improve typedInput label width calculation
If the label contains an img, the width calculation needs
to wait for the img to be loaded. This fix is a bit hacky
as it doesn't actually tie into the onload event, but should
be good enough
2019-07-01 11:17:36 +01:00
Nick O'Leary
a974e84ad1 Merge pull request #2222 from node-red/no-empty-examples
Ignore empty examples directories (don't add to import menu)
2019-06-29 21:32:07 +01:00
Dave Conway-Jones
c4f4115bcb better handle example file at any depth 2019-06-29 01:16:02 +01:00
Nick O'Leary
3c5adbee31 Merge pull request #2220 from natcl/patch-3
Add default shortcut (ctrl-d) for deploy
2019-06-28 23:35:28 +01:00
Nick O'Leary
55645e3730 Properly escape node types in palette
We were only escaping the first instance of any invalid dom char
and not all of the
2019-06-28 22:39:27 +01:00
Dave Conway-Jones
d918bb568c Ignore empty examples directories (don't add to import menu) 2019-06-23 12:09:43 +01:00
Kunihiko Toumura
b1bff62bf7 Merge remote-tracking branch 'upstream/dev' into dev-redo 2019-06-23 16:19:15 +09:00
Nick O'Leary
d11d389ae4 Smarter filtering in action list dialog 2019-06-22 20:37:54 +01:00
Nick O'Leary
a73c159160 Ensure an item in action list is always selected 2019-06-22 20:25:57 +01:00
Kunihiko Toumura
7adf102d8d Initial implementation of redo (un-undo) 2019-06-22 16:05:50 +09:00
Nathanaël Lécaudé
e4d3ff623a change shortcut for ctrl-d 2019-06-21 19:04:25 -04:00
Nathanaël Lécaudé
2433d59f00 Add default shortcut (ctrl-s) for deploy
This adds a shortcut for deploy (ctrl-s).
2019-06-21 17:40:24 -04:00
Nick O'Leary
8c68e76c3e Merge pull request #2217 from node-red/svg-icons
Update all node icons and editor images to SVG
2019-06-21 22:08:34 +01:00
Nick O'Leary
0b204de5a9 Fix up tests for svg changes 2019-06-21 22:01:24 +01:00
Nick O'Leary
93c811ab70 Update typedInput icons to svg
Map any request for one of our pngs to its svg replacement
2019-06-21 21:45:14 +01:00
Nick O'Leary
3ff861099a Move deploy icons to svg 2019-06-21 16:08:43 +01:00
Nick O'Leary
f22762539f Handle png/svg fallback for def.icon values. Remove old pngs 2019-06-21 15:41:17 +01:00
Nick O'Leary
677442a3c0 Merge branch 'master' into dev 2019-06-21 14:01:34 +01:00
Nick O'Leary
b73f12cdba Bump for 0.20.6 2019-06-21 13:25:39 +01:00
Nick O'Leary
28fbb61e81 Bump dependencies 2019-06-21 13:25:09 +01:00
Nick O'Leary
c1104d1cd6 Revealing node position needs to account for zoom level
Fixes #2172
2019-06-21 12:53:09 +01:00
Dave Conway-Jones
e346702292 stop join tripping up if last message of buffer is blank. 2019-06-21 12:49:21 +01:00
Nick O'Leary
90887779ea Improve handling of file upload in request node
formData can only be Strings or Buffers - anything else will cause
errors. To help matters, we now look for invalid types and json-encode
them where needed.
2019-06-21 12:48:13 +01:00
Nick O'Leary
a941b1437c Handle subflow internal node wired to a non-existant node
Fixes #2202
2019-06-21 12:47:37 +01:00
Nick O'Leary
04bdcbd490 Do not save subflow env vars with blank names 2019-06-21 12:46:53 +01:00
Nick O'Leary
87a815fd6f Don't allow a link node virtual wire to connect to normal port 2019-06-21 12:45:50 +01:00
Nick O'Leary
d623848c87 Update all node icons to SVG
When listing icons provided by a module, if there is a png and svg
with the same name, only the svg will be listed.

If a node asks for a png icon which is not known, but there is a
corresponding svg, that will be used instead.
2019-06-21 12:36:20 +01:00
Nick O'Leary
46abd0cc42 Clear HTTP Request node authType when auth disabled
Fixes #2215
2019-06-20 22:33:38 +01:00
Nick O'Leary
e315325d91 Fix parsing of content-type header
Fixes #2216

This was broken when we switched from media-typer to content-type
modules for parsing the content-type header.

The content-type header can handle the field with parameters, but
does not do the type/sub-type parsing that media-typer does.

Our code relied on that extra bit of parsing to correctly
identify if the content should be parsed to String or kept as
a buffer.

The fix restores the use of media-typer, but using the result
of the content-type module to make sure it valid
2019-06-20 21:15:20 +01:00
Dave Conway-Jones
f3fc083330 Fix join node reset issue with merging objects
and add tests
to close #2188
2019-06-20 19:47:53 +01:00
Dave Conway-Jones
92cb57eb7b Fix join node reset issue with merging objects
and add tests
to close #2188
2019-06-20 18:14:46 +01:00
Nick O'Leary
d645fbff2f Merge branch 'master' into dev 2019-06-19 10:11:51 +01:00
Nick O'Leary
8486f4d43a Copy data-i18n attribute on TypedInput
Fixes #2211
2019-06-19 10:10:17 +01:00
Nick O'Leary
60b1a05894 Fix styling of Debug pop-out window 2019-06-18 11:40:13 +01:00
Nick O'Leary
f955d63707 Merge branch 'disable-node' into dev 2019-06-18 11:33:20 +01:00
Nick O'Leary
f106019938 Add runtime test for disabled nodes 2019-06-18 11:02:31 +01:00
Nick O'Leary
2473249c8b Allow config nodes to be disabled, tidy css and add actions 2019-06-17 22:46:34 +01:00
Nick O'Leary
d13dc4fba3 Don't allow a link node virtual wire to connect to normal port 2019-06-17 15:37:45 +01:00
Nick O'Leary
41a0af032c Enable individual flow nodes to be disabled 2019-06-14 22:12:47 +01:00
Nick O'Leary
70cf7b0c5a Do not save subflow env vars with blank names 2019-06-14 11:18:07 +01:00
Nick O'Leary
14f6788ab9 Set autocomplete to disabled in form input elements 2019-06-14 11:17:49 +01:00
Nick O'Leary
bb67049d90 Ensure focus returns to the right element after dialogs shown 2019-06-14 10:57:12 +01:00
Nick O'Leary
ae2162beaf Handle subflow internal node wired to a non-existant node
Fixes #2202
2019-06-13 14:23:46 +01:00
Nick O'Leary
19f2c5e07f Merge branch 'master' into dev 2019-06-13 09:37:36 +01:00
Nick O'Leary
8abc5b3889 Add actions to change deploy type 2019-06-12 10:06:58 +01:00
Nick O'Leary
4d37c28bc7 Merge pull request #2197 from node-red/commandPrompt
Add Command prompt dialog
2019-06-11 22:47:30 +01:00
Nick O'Leary
cc0933eee4 Rename commandPrompt to actionList 2019-06-11 22:43:28 +01:00
Nick O'Leary
2de9a804a0 Tidy up nls of command prompt and selection handling 2019-06-11 22:43:28 +01:00
Nick O'Leary
ffeb2e91f4 Add command prompt dialog 2019-06-11 22:43:28 +01:00
Nick O'Leary
8cf5ec9e5a Update UI tests for new editor css 2019-06-11 17:12:31 +01:00
Nick O'Leary
ea0526f29a Add insertItemAt doc to editableList 2019-06-11 17:12:31 +01:00
Nick O'Leary
cfcb3a69e5 Merge pull request #2198 from node-red-hitachi/allow-env-in-switch-node
Allow environment variable as target of switch node
2019-06-11 15:13:46 +01:00
Nick O'Leary
e3e0378857 Add visual json editor 2019-06-11 14:44:44 +01:00
Nick O'Leary
ccc3809daa Make 'anything else' template more explicit 2019-06-09 17:32:14 +01:00
Nick O'Leary
c97786e12c Improve handling of file upload in request node
formData can only be Strings or Buffers - anything else will cause
errors. To help matters, we now look for invalid types and json-encode
them where needed.
2019-06-08 20:42:14 +01:00
Nick O'Leary
400071879f Add enable/disable-flow actions 2019-06-07 15:14:21 +01:00
Nick O'Leary
4cd6e20c91 Fix undo of flow disable state change 2019-06-07 15:13:49 +01:00
Nick O'Leary
460e3ad395 Fix select-all action in main view 2019-06-07 14:35:22 +01:00
Nick O'Leary
6f08bd6fc5 Fix delete-all action on config node sidebar 2019-06-07 14:35:10 +01:00
Nick O'Leary
eed3a749db Fix undefined error on typedInput due to valueLabel used before being added 2019-06-07 14:34:35 +01:00
Hiroyasu Nishiyama
6587d12fbd update info text 2019-06-07 21:39:12 +09:00
Hiroyasu Nishiyama
f8dd68ecc4 Add support for env var propety in switch node 2019-06-07 21:35:36 +09:00
Nick O'Leary
f0aef2b853 Add show-library dialog actions 2019-06-07 11:35:04 +01:00
Nick O'Leary
7d27df1b97 Add shift-cursor handling for moving quick-add dialog 2019-06-06 17:17:44 +01:00
Nick O'Leary
457ec86c25 Do not allow tab focus on clipboard hidden element 2019-06-06 17:17:05 +01:00
Nick O'Leary
a24c66958f Fix display of node help when clicking in palette
Fixes #2194
2019-06-06 14:38:21 +01:00
Nick O'Leary
617628b886 Ensure node help is loaded in the right language
Fixes #2195
2019-06-06 14:16:19 +01:00
Nick O'Leary
6b7e623d33 Remove some hardcoded css colors 2019-06-06 11:34:20 +01:00
Nick O'Leary
5ca85b7e83 Merge branch 'pr_2187' into dev 2019-06-04 22:58:18 +01:00
Nick O'Leary
5965bf3332 Merge pull request #2190 from node-red-hitachi/fix-typedinput-appearance
Fix typedinput width calculation
2019-06-04 20:56:30 +01:00
Nick O'Leary
baf2dd293b Merge pull request #2189 from bonanitech/patch-1
Update build-custom-theme.js
2019-06-04 16:50:36 +01:00
Dave Conway-Jones
2cc19e7e32 stop join tripping up if last message of buffer is blank. 2019-06-01 23:49:27 +01:00
Dave Conway-Jones
53ab6f8569 Add popovers to context sidebar mini buttons 2019-06-01 13:21:21 +01:00
Hiroyasu Nishiyama
cf8faac7ef fix width calculation of typedInput 2019-05-31 22:20:54 +09:00
Mauricio Bonani
86947a384d Update build-custom-theme.js 2019-05-31 08:33:22 -04:00
Dave Conway-Jones
22855279bd ensure input box has focus on repeated quick add 2019-05-30 14:33:11 +01:00
Paul Williams
e56fdecdc6 Add new shortcut to clear debug message list
Clearing the debug message list is globally scoped by default to
`ctrl+alt+l`. Mnemonic: similar to clearing a terminal shell using
ctrl+l.
2019-05-30 09:36:44 +00:00
Dave Conway-Jones
dc75a5812f Handle webscoket item being parseable but not an object better
and add test
2019-05-29 12:49:35 +01:00
Dave Conway-Jones
33e20c9969 Only add copypath popover if button exists. 2019-05-28 21:43:21 +01:00
Nick O'Leary
109204897f Fix clipboard export download button 2019-05-28 16:10:21 +01:00
Nick O'Leary
3b3a2d62f8 Merge pull request #2175 from node-red-hitachi/update-language-selector
update editor language selection UI for i18n
2019-05-28 13:26:38 +01:00
Nick O'Leary
b1b4b3fb63 Ensure tooltip popover doesn't replace normal popover 2019-05-28 13:25:03 +01:00
Nick O'Leary
d583c68de5 Fix error handling in Websocket broadcast function
Fixes #2182
2019-05-28 11:51:34 +01:00
Nick O'Leary
d360f30af6 Ensure library list has an item selected when opened 2019-05-28 11:23:03 +01:00
Nick O'Leary
ed033565a4 Handle empty list of example flows
Fixes #2171
2019-05-28 11:21:53 +01:00
Nick O'Leary
2d6acfae1b Restore tray component css for compatibility. Mark as deprecated 2019-05-28 09:50:29 +01:00
Hiroyasu Nishiyama
10da894124 fix function name & string compare function 2019-05-28 08:55:00 +09:00
Nick O'Leary
6dda8f21e4 Merge pull request #2176 from node-red-hitachi/update-editor-message-jp
Update Japanese message catalogue for editor
2019-05-27 22:18:18 +01:00
Nick O'Leary
1a9d759002 Merge pull request #2177 from node-red-hitachi/i18n-library-ui
Update I18n support for library ui
2019-05-27 22:18:00 +01:00
Nick O'Leary
df24e13eb5 Merge pull request #2178 from node-red-hitachi/update-nodes-message-jp
update Japanese message for nodes
2019-05-27 22:17:19 +01:00
Nick O'Leary
2ab19937af Fix pinned debug item css 2019-05-27 21:23:41 +01:00
Nick O'Leary
390b86cd8e Revert treeList children function signature change 2019-05-27 21:11:50 +01:00
Nick O'Leary
423aba5bab Ensure ndoe status icon is shown when value set 2019-05-27 21:07:27 +01:00
Dave Conway-Jones
dc0b9231cd Add popover tooltips to debug sidebar,function and template
path, value, pin buttons in debug
expand buttons in function and template.
2019-05-27 15:48:06 +01:00
Hiroyasu Nishiyama
3b177bedf8 update Japanese message for nodes 2019-05-27 14:25:03 +09:00
Hiroyasu Nishiyama
12ce719213 make new library folder interface i18n ready 2019-05-27 13:34:47 +09:00
Hiroyasu Nishiyama
320433b1bf update Japanese message catalogue 2019-05-27 13:13:25 +09:00
Hiroyasu Nishiyama
7f35e2280e update editor language selection UI for i18n 2019-05-27 11:28:36 +09:00
Nick O'Leary
c514d988df Revealing node position needs to account for zoom level
Fixes #2172
2019-05-25 22:11:05 +01:00
Nick O'Leary
749a080397 Fix typedInput option selection
Fixes #2174
2019-05-25 21:19:31 +01:00
Nick O'Leary
b105a12505 Fix palette node id handling so search works
Fixes #2173
2019-05-24 22:13:21 +01:00
Nick O'Leary
abaf363ddd Update changelog 2019-05-24 11:37:42 +01:00
Nick O'Leary
16db9d4290 Bump for 1.0.0-beta.2 2019-05-24 11:36:57 +01:00
Nick O'Leary
a694b0364d Fix length calculation when reading library file 2019-05-24 11:36:05 +01:00
Nick O'Leary
b68835f171 Update CHANGELOG 2019-05-24 10:44:46 +01:00
Nick O'Leary
32714c5dac Fix node multi-select mode 2019-05-24 10:26:00 +01:00
Nick O'Leary
245e06f026 Merge branch 'master' into dev 2019-05-24 10:22:14 +01:00
Nick O'Leary
e0111d3fe6 Merge pull request #2167 from minzojian/master
update packages\node_modules\@node-red\runtime\lib\index.js
2019-05-24 10:09:21 +01:00
Nick O'Leary
a71d4223ff Add node-select to typedInput 2019-05-23 23:38:42 +01:00
Nick O'Leary
20cba6411b Disable copy/paste and enable select-all in node-select mode 2019-05-23 16:48:07 +01:00
Nick O'Leary
502a8112b5 Remove hardcoded colours from some nodes 2019-05-23 16:39:56 +01:00
Nick O'Leary
308c6ee4da Update catch/status nodes to use selectNodes api and treeList 2019-05-23 16:39:34 +01:00
Nick O'Leary
cae003d4fa Add RED.view.selectNodes api for node selection whilst editing 2019-05-23 16:39:06 +01:00
Nick O'Leary
b9b900e908 Add build-custom-theme script 2019-05-22 14:27:28 +01:00
Nick O'Leary
8bdba9178a Line-up view tooltip text (again) having fixed size calculation 2019-05-22 00:10:55 +01:00
Nick O'Leary
97f11e38cd Minimise work done to calculate node label widths
Currently, everytime the tab is switched, we recalculate the
width of every node. There's no need to do that as the width
will not have changed - unless it has changed, but then the
dirty/changed flag will be set on that one node and it will
get handled.
Also avoid endless added/removing an element to calculate the
dimenstions - keep it on the dom (keyed by className) and
positioned well away from the visible space.
2019-05-22 00:04:19 +01:00
Nick O'Leary
c4f5df0cd0 Bump to jquery 3.4.1 2019-05-22 00:03:26 +01:00
Nick O'Leary
9ed3a6748a Fix node label size calculation 2019-05-21 23:48:33 +01:00
Nick O'Leary
359c0354f6 Set package version to 1.0.0-beta.1 2019-05-21 23:32:42 +01:00
Nick O'Leary
fc77c089fa Bump dependencies 2019-05-21 23:31:21 +01:00
Nick O'Leary
137a7ac48c Fix getLibraryEntry for files missing meta data 2019-05-21 23:30:59 +01:00
Nick O'Leary
42b60aef4e Fix library/clipboard import/export issues 2019-05-21 22:58:56 +01:00
Nick O'Leary
5ab7380ad1 Add auto-refresh toggle to context sidebar 2019-05-21 17:19:39 +01:00
Nick O'Leary
afa25df1af Allow RED.settings.get/set to use full property desc 2019-05-21 17:19:12 +01:00
Nick O'Leary
5cb888328e Fix Deploy menu focus style 2019-05-21 15:26:15 +01:00
Nick O'Leary
78aeb94917 Line up component footer buttons better 2019-05-21 15:26:03 +01:00
Nick O'Leary
5f3e9a19ea Introduce toggleButton and move flow-disabled to use it 2019-05-21 15:25:38 +01:00
Nick O'Leary
420e8c001b Fix setting output port labels 2019-05-21 15:24:45 +01:00
Nick O'Leary
c63b8a4ebc Fix a couple css errors in menu/config sidebar 2019-05-20 22:03:05 +01:00
Nick O'Leary
5f5feaed5f Add expand editor button to Template node 2019-05-19 22:34:04 +01:00
KentWood
87a1f616b0 Update index.js
fixed a error when run node-red with httpAdminRoot=false
https://github.com/node-red/node-red/issues/2166
2019-05-18 17:04:56 +08:00
Nick O'Leary
cc051544f9 Only NLS status text that starts with a letter
Fixes #2128
2019-05-17 16:32:14 +01:00
Dave Conway-Jones
85a438a40f remove pi, twitter, email and feedparser from packages
remove tests from core
2019-05-17 14:14:17 +01:00
Dave Conway-Jones
877260a243 Remove pi gpi, twitter, email and feedparser nodes from core 2019-05-17 14:08:51 +01:00
Dave Conway-Jones
83d99043a8 Add "don't parse numbers" option to csv node
and add test
2019-05-17 13:46:26 +01:00
Nick O'Leary
6a57d25f4a Trigger change evnt on typedInput when type changes and options present
Fixes #2160
2019-05-17 11:45:16 +01:00
Nick O'Leary
91473e731e Merge pull request #2126 from natcl/master
http request node: warn user if msg.requestTimeout == 0
2019-05-17 10:47:37 +01:00
Nick O'Leary
1d91ac1169 Merge pull request #2154 from Holger-Will/dev-esm
allow script tags with src to reference esm modules
2019-05-17 10:46:48 +01:00
Nick O'Leary
2850477a71 Merge branch 'dev' into dev-esm 2019-05-17 10:46:36 +01:00
Nick O'Leary
651b1c92c3 Merge pull request #2156 from bernardobelchior/patch-1
Remove unnecessary ternary
2019-05-17 10:45:36 +01:00
Nick O'Leary
77e74eb37b Merge pull request #2159 from hobbyquaker/master
german localization improvements
2019-05-17 10:44:50 +01:00
Nick O'Leary
5bb2bc7077 Merge pull request #2158 from node-red/statusbar
⚠️ Standardise CSS class names through-out the editor
2019-05-17 10:43:48 +01:00
Nick O'Leary
98a001a8ca Deprecate editor-button css class 2019-05-17 10:42:43 +01:00
Nick O'Leary
0d75ff336d Found some more ids and classes to namespace 2019-05-16 22:32:28 +01:00
Nick O'Leary
8567f1655e Only redraw node status when it has changed 2019-05-16 14:42:41 +01:00
Nick O'Leary
68b94737ed Add tooltip on node error icon for validation errs 2019-05-16 14:42:21 +01:00
Nick O'Leary
094c92ed85 Fix ui tests for new css classes 2019-05-16 13:43:42 +01:00
Nick O'Leary
42ab6deff1 Tidy up remaining css classes 2019-05-16 13:26:49 +01:00
Nick O'Leary
3a257e1e00 Fix typedInput styling and allow option list to scroll 2019-05-16 10:28:01 +01:00
Nick O'Leary
2bf9a353a6 Fix panel/tray size calculation on resize 2019-05-15 16:29:06 +01:00
Nick O'Leary
bbe41febf1 Fix view tooltip text position 2019-05-15 14:17:44 +01:00
Nick O'Leary
031362a633 Move all colours to sass variables 2019-05-15 13:54:29 +01:00
Nick O'Leary
4418f8bfce Better CSS namespace of base form elements 2019-05-09 19:22:40 +01:00
Nick O'Leary
364175fa9d Merge pull request #2163 from node-red-hitachi/fix-debug-node-memory-leak
Fix possible memory leak of debug sidebar output
2019-05-09 14:51:20 +01:00
Hiroyasu Nishiyama
13cf2b48e1 use jQuery DOM manipulation instead of raw JS 2019-05-09 18:06:10 +09:00
Dave Conway-Jones
e4f6694223 Fix CSV regex to treat strings starting e as text
rather than part of exponential, add tests
2019-05-08 22:43:41 +01:00
Nick O'Leary
59093f1721 Pull out more CSS colors to sass variables 2019-05-08 19:06:08 +01:00
Nick O'Leary
db5e79a19b Convert node-change/error icons to SVG 2019-05-08 19:05:30 +01:00
Bernardo Belchior
f0b1585b52 Remove redundant conditional 2019-05-08 18:51:16 +01:00
Nick O'Leary
50228c5970 Namespace more editor component CSS 2019-05-08 13:26:48 +01:00
Nick O'Leary
b98e85016a Namespace type editors CSS 2019-05-07 16:48:05 +01:00
Nick O'Leary
bc540eefb6 Namespace projects CSS 2019-05-07 15:47:33 +01:00
Nick O'Leary
3f1c4b4117 Namespace dropdown menu CSS 2019-05-07 14:46:44 +01:00
hobbyquaker
5e7689a151 i18n-german fix typos 2019-05-04 09:47:29 +02:00
hobbyquaker
42845cfcc0 i18n-german subflows https://github.com/jwende/nodered-german/issues/14 2019-05-04 09:36:58 +02:00
hobbyquaker
caad0eca67 i18n-german fix typo 2019-05-04 09:33:54 +02:00
Nick O'Leary
67f8ec7f87 Append node configs to div rather than body 2019-05-03 21:32:12 +01:00
Nick O'Leary
d8d37a66e4 Namespace diff CSS 2019-05-03 20:22:46 +01:00
hobbyquaker
69db23f2f6 i18n-german retain https://github.com/jwende/nodered-german/issues/16 2019-05-03 19:59:40 +02:00
hobbyquaker
c3f6bcad56 i18n-german payload https://github.com/jwende/nodered-german/issues/9 2019-05-03 19:58:50 +02:00
hobbyquaker
ab1521bf26 i18n-german topic https://github.com/jwende/nodered-german/issues/8 2019-05-03 19:56:44 +02:00
hobbyquaker
fafe8b88c2 i18n-german number https://github.com/jwende/nodered-german/issues/6 2019-05-03 19:54:45 +02:00
hobbyquaker
9276988ff6 i18n-german buffer https://github.com/jwende/nodered-german/issues/6 2019-05-03 19:52:28 +02:00
hobbyquaker
85179edf1b i18n-german string https://github.com/jwende/nodered-german/issues/6 2019-05-03 19:51:56 +02:00
hobbyquaker
2f1ba6cf1f i18n-german https://github.com/jwende/nodered-german/issues/4 2019-05-03 19:47:30 +02:00
hobbyquaker
93674b4e29 i18n-german https://github.com/jwende/nodered-german/issues/3 2019-05-03 19:22:50 +02:00
hobbyquaker
20851664e8 i18n-german https://github.com/jwende/nodered-german/issues/2 2019-05-03 19:21:50 +02:00
hobbyquaker
38c87a056c i18n-german https://github.com/jwende/nodered-german/issues/1 2019-05-03 19:20:19 +02:00
Nick O'Leary
ad77565508 Namespace CSS for Debug, Keyboard, Clipboard, Settings 2019-05-02 22:33:29 +01:00
Nick O'Leary
0e02e21967 Get rid of Bootstrap 2019-05-02 17:03:42 +01:00
Nick O'Leary
1e35a6ce5e Fix sidebar separator draggable 2019-05-02 17:03:09 +01:00
Nick O'Leary
90b167eba1 Remove bootstrap.js and package all js in vendor.js 2019-05-02 16:10:47 +01:00
Nick O'Leary
5b1defad9f Simplify index.mst to a single div to insert the editor 2019-05-02 16:09:13 +01:00
Nick O'Leary
8dc1ad8168 Namespace workspace/view css 2019-05-01 22:41:20 +01:00
Nick O'Leary
126a42056d Namespace all header css 2019-04-30 23:38:54 +01:00
Nick O'Leary
5866dad79a Namespace context/config sidebar css 2019-04-30 23:28:35 +01:00
Nick O'Leary
9dac679b72 Namespace all sidebar css 2019-04-30 22:56:39 +01:00
Bernardo Belchior
12ff3abeda Remove unnecessary ternary 2019-04-30 14:19:51 +01:00
Holger Will
0f07fb4479 fix formatting 2019-04-30 05:17:46 +02:00
Holger Will
d9d98439b2 allow script tags with src to reference esm modules 2019-04-30 04:57:47 +02:00
Nick O'Leary
d251a30cb8 Update ui tests for palette css namespace 2019-04-29 22:41:31 +01:00
Nick O'Leary
a2632fdcc8 Namespace all palette css 2019-04-29 22:38:14 +01:00
Nick O'Leary
10c818474c Tidy zoom control statusBar widget 2019-04-29 20:53:04 +01:00
Nick O'Leary
5e8279cf51 Add workspace statusBar 2019-04-29 17:24:14 +01:00
Nick O'Leary
4c8c081c31 Revert branchList focus call change 2019-04-29 16:32:43 +01:00
Nick O'Leary
bad2baba7f Merge pull request #2153 from node-red/jq3
Upgrade to jq 3.3.1 / jq-ui 1.12.1
2019-04-29 16:20:48 +01:00
Nick O'Leary
b5da6f9c74 Upgrade to jq 3.3.1 / jq-ui 1.12.1
Uses jquery-migrate-3.0.1.min.js to keep things working.
2019-04-29 11:50:15 +01:00
Nick O'Leary
7ec999475e Merge branch 'master' into dev 2019-04-29 08:45:07 +01:00
Nick O'Leary
742bf85a89 Bump all dependencies
Fixes #2152
2019-04-29 08:42:37 +01:00
Nick O'Leary
c9c6f41aad Try adding node 12 again 2019-04-26 16:49:35 +01:00
Nick O'Leary
b0d93df387 Blur the active element when closing edit dialog via action
Fixes #2097
2019-04-26 16:33:43 +01:00
Nick O'Leary
3e20892fdf Add Node 12 to travis (allow_failures) 2019-04-26 16:31:01 +01:00
Nick O'Leary
369f8b3fe0 Merge pull request #2148 from node-red/new-export-dialog
Updated Library UX
2019-04-26 16:23:23 +01:00
Nick O'Leary
337dfba2b8 Add keyboard nav to treeList 2019-04-26 16:21:35 +01:00
Nick O'Leary
493687b5bb Allow editor language to be chosen in editor settings
This gets stored in localStorage of the browser which is not
ideal. This is because we load language catalogs before we
load user preferences - so if this was stored in the runtime,
the editor wouldn't know the user's preference until it was
too late to apply it.

This is likely good enough for now - may need to do something
more convoluted later on.
2019-04-25 15:23:08 +01:00
Nick O'Leary
c7587960fb Fix display of link node list within subflow
Fixes #2140
2019-04-25 11:58:59 +01:00
Nick O'Leary
5c962aa899 Merge pull request #2138 from kazuhitoyokoi/master-fixdraggable
Fix node drag and drop animation
2019-04-25 11:54:07 +01:00
Nick O'Leary
3e9d2a8062 Merge branch 'dev' into new-export-dialog 2019-04-25 11:45:14 +01:00
Nick O'Leary
c2aa8a206a Merge branch 'dev' of github.com:node-red/node-red into dev 2019-04-25 11:44:55 +01:00
Nick O'Leary
6d8ea2b6a4 Merge branch 'dev' into new-export-dialog 2019-04-25 11:42:33 +01:00
Nick O'Leary
b581e33611 Update runtime apis to support multiple libraries 2019-04-25 11:32:09 +01:00
Nick O'Leary
5e43a02cd3 Move remaining library dialogs to new style 2019-04-24 11:50:24 +01:00
Nick O'Leary
6f37d5ca5c Move type-library dialogs to new treeList style 2019-04-23 15:46:15 +01:00
Nick O'Leary
3263008379 Move library import/export to single dialog 2019-04-23 14:23:17 +01:00
Dave Conway-Jones
4588089bd6 hide delay node reset label on deploy
to close #2145
2019-04-21 10:31:36 +01:00
Kazuhito Yokoi
44b75f0b92 Adjust node animation speed 2019-04-16 11:02:51 +09:00
Kazuhito Yokoi
162bd6a8c3 Fix node drag and drop animation 2019-04-16 09:47:08 +09:00
Dave Conway-Jones
0c13603185 let status be simple text if wanted 2019-04-07 16:23:17 +01:00
Nick O'Leary
ed2a45e975 Bump for 0.20.5 2019-04-05 13:46:25 +01:00
Nick O'Leary
0fa165c606 Revert error handling in palette manager 2019-04-05 13:45:06 +01:00
Nick O'Leary
fe63ab1242 Bump packages to 0.20.4 2019-04-05 10:21:11 +01:00
Nick O'Leary
faf808da69 Update changelog 2019-04-05 10:13:15 +01:00
Dave Conway-Jones
71709cd662 reduce udp out timeout to be less than default inject at start
to address Issue #2127
2019-04-04 21:59:47 +01:00
Nick O'Leary
d92040b804 Add error message if catalog invalid json 2019-04-04 11:36:12 +01:00
Nick O'Leary
3662fbb462 Merge branch 'master' into dev 2019-04-03 11:33:57 +01:00
Nick O'Leary
d89ae3ebbf Merge branch 'dev' of github.com:node-red/node-red into dev 2019-04-03 11:33:23 +01:00
Nick O'Leary
6175fecdd8 Update changelog 2019-04-03 10:12:12 +01:00
Nick O'Leary
fab632da62 Bump for 0.20.4 2019-04-03 10:11:36 +01:00
Nathanaël Lécaudé
c1e3b0d971 http request node: warn user if msg.requestTimeout == 0 2019-04-02 15:00:25 -04:00
Nick O'Leary
7b15ba31ea Merge pull request #2125 from kazuhitoyokoi/master-fixfilenode
Fix encoding menu in file node
2019-04-02 16:50:14 +01:00
Nick O'Leary
f11d4ccd45 Switch media-typer to content-type module
Fixes #2122 #2123
2019-04-02 16:45:30 +01:00
Nick O'Leary
fbec803129 Use userObj.username and not .name for ssh key lookup
Closes #2109
2019-04-02 14:06:37 +01:00
Kazuhito Yokoi
0f57d1a433 Fix encoding menu in file node 2019-04-02 21:35:41 +09:00
Nick O'Leary
63829b6382 Ensure mqtt message handlers are tidied up properly on partial deploy 2019-03-29 10:30:40 +00:00
Nick O'Leary
8ac3899ddc Merge pull request #2100 from node-red-hitachi/master-korean
Add Korean locales files for nodes
2019-03-28 22:38:22 +00:00
Nick O'Leary
59fb4ea6f8 Merge pull request #2111 from node-red-hitachi/context-api-testcase
Add tests for context API
2019-03-28 22:38:06 +00:00
Nick O'Leary
92bb9bb3c3 Merge pull request #2116 from aiot-maker/master
Add explanation to the help text on the new feature to build query st…
2019-03-28 22:36:21 +00:00
Nick O'Leary
1795c491a8 Merge branch 'master' into dev 2019-03-28 16:59:04 +00:00
Nick O'Leary
ea333c19f7 Update package dependencies 2019-03-28 14:46:16 +00:00
Nick O'Leary
28ef879c07 Update ACE to 1.4.3-src-min-noconflict
Fixes #2106
2019-03-28 14:02:09 +00:00
Nick O'Leary
10839abf24 Fix creating missing package.json when existing project imported
Fixes #2115
2019-03-28 13:46:52 +00:00
Nick O'Leary
9832394f8e Allow subflow instance to override env var with falsey values
Fixes #2113
2019-03-28 13:33:54 +00:00
Nick O'Leary
dd89ea3731 Prevent wire from normal node to link virtual port
Fixes #2114
2019-03-28 10:48:48 +00:00
Andrei Ochmat
5d9fd6dc3b Add explanation to the help text on the new feature to build query string from msg.payload 2019-03-27 15:45:28 -03:00
Hiroki Uchikawa
f7c87e26db Add test cases for context runtime API 2019-03-27 12:54:02 +09:00
Hiroki Uchikawa
f98f4085bf Add test cases for context admin API 2019-03-27 12:54:01 +09:00
Hiroki Uchikawa
543519d055 Add test cases to ensure context API routes are correctly mounted. 2019-03-27 12:54:01 +09:00
Nick O'Leary
5a9fcd9267 Bump dev branch to 0.21.0-alpha.0 2019-03-26 15:51:17 +00:00
Nick O'Leary
fe2360883f Bump bcrypt to latest 2019-03-20 17:01:58 +00:00
Nick O'Leary
b45ddadb09 Bump for 0.20.3 2019-03-20 15:24:23 +00:00
Nick O'Leary
a3cbe80a36 Do not dynamically add/remove upgrade listener in ws nodes
The way we dynamically added/removed event handlers for the
upgrade event was causing problems with the way sockjs (as
used by the worldmap node) tries to intercept the event.

This fix means the ws nodes won't ever remove the upgrade
listener - it gets added once when the first ws node is
deployed and will then remain until the last ws node is
removed and the runtime restarted.
2019-03-20 14:58:26 +00:00
Nick O'Leary
ee6c6266cc Avoid env var reference loops and support $parent. prefix
Fixes #2099
2019-03-20 13:37:33 +00:00
李赫柱
d6bd35287f Add Korean locales files for nodes 2019-03-20 18:27:04 +09:00
Nick O'Leary
962a29110c Ensure config._flow is non-enumerable so is ignored by JSON.stringify
Fixes  https://github.com/pdmangel/node-red-contrib-openhab2/issues/36
2019-03-18 15:11:56 +00:00
Nick O'Leary
a242475b38 Block loading ACE from cdn 2019-03-18 10:55:12 +00:00
Nick O'Leary
d59bf84470 Update changelog 2019-03-15 19:04:31 +00:00
Nick O'Leary
161ee17f45 Bump for 0.20.2 2019-03-15 19:03:30 +00:00
Nick O'Leary
8aa00b0cfc Filter out duplicate nodes when importing a flow 2019-03-15 19:02:24 +00:00
Nick O'Leary
afe89c3621 Handle node configs with multiple external scripts properly
If the config had multiple scripts, we were calling the done
callback once for each script. This in turn led to duplicate
flows being loaded.
2019-03-15 18:50:58 +00:00
Nick O'Leary
bdf68311b4 Bump for 0.20.1 2019-03-15 11:22:01 +00:00
Nick O'Leary
afa69f4c0e Ensure all subflow instances are stopped when flow stopping
Fixes #2095
2019-03-15 09:13:32 +00:00
Nick O'Leary
6fe2b24592 Merge pull request #2091 from node-red-hitachi/korean
modify name of korean locale folders
2019-03-14 15:25:52 +00:00
李赫柱
7442b356e3 modify name of korean locale forders 2019-03-14 09:53:24 +09:00
Nick O'Leary
1d7be6457f Ensure node names are sanitized before being presented 2019-03-13 16:08:11 +00:00
Nick O'Leary
c9ff05ba80 Subflow status node must pass status to parent flow
Fixes #2087
2019-03-13 13:14:34 +00:00
Nick O'Leary
faae184f1c Merge pull request #2090 from node-red-hitachi/fix-file-node-encoding-menu
Fix problem on displaying option label on Firefox
2019-03-13 10:46:23 +00:00
Hiroyasu Nishiyama
515a8a9bbb fix problem on displaying option label on Firefox 2019-03-13 19:17:32 +09:00
Nick O'Leary
58914e5c5f Bump package to 0.20.0 2019-03-12 14:53:12 +00:00
Nick O'Leary
c944eaab5c Fix max call stack err when getting node from inside subflow 2019-03-12 14:40:47 +00:00
Nick O'Leary
d3d9533493 Search subflows instances when looking for given node id 2019-03-12 14:25:36 +00:00
Nick O'Leary
9c474cc089 Bump for 0.20 2019-03-12 10:59:20 +00:00
Nick O'Leary
3f1b0b986f Handle node name as unsanitized text in debug sidebar 2019-03-12 10:37:24 +00:00
Nick O'Leary
28e08ebaf5 Add envVarExcludes setting to block named env vars 2019-03-07 22:54:20 +00:00
Nick O'Leary
3213c03754 Update settings.js docs on userDir to match reality
Fixes #2082
2019-03-07 19:58:54 +00:00
Nick O'Leary
4447288a4c Merge pull request #2083 from node-red-hitachi/fix-typo-JP-info-httprequest
Fix typo in Japanese info text of httprequest node
2019-03-07 19:58:26 +00:00
Hiroyasu Nishiyama
eee4e83a1e fix minor typo in Japanese info text of httprequest node 2019-03-07 22:50:56 +09:00
Nick O'Leary
a67b492620 Merge pull request #2081 from node-red-hitachi/dev-korean
Add Korean Language
2019-03-07 10:02:42 +00:00
Nick O'Leary
6062ff2748 Merge pull request #2080 from node-red-hitachi/update-JP-info-httprequest
Update info text of httprequest node
2019-03-07 10:02:09 +00:00
Dave Conway-Jones
3b11195caa Add --no-update-notifier flag to npm calls to speedup processing. 2019-03-07 09:03:25 +00:00
李赫柱
9946ea111c Add Korean Language 2019-03-07 10:33:55 +09:00
Hiroyasu Nishiyama
7074d66f8e fix unmatched tag in English info text of httprequest node 2019-03-07 10:06:57 +09:00
Hiroyasu Nishiyama
008b26f329 update JP info text of httprequest node 2019-03-07 10:04:06 +09:00
Dave Conway-Jones
b246f0779f re-fix merge of file nodes 2019-03-06 22:33:20 +00:00
Hiroyasu Nishiyama
dc89218702 add encoding support to file in/out node (#2066)
* add encoding support to file in/out node

* update package.json

* change default encoding label: 'none' -> 'utf8[default]'

* add a missing message catalogue entry

* change default encoding label
2019-03-06 22:28:33 +00:00
Nick O'Leary
3c013b3533 Add file upload test for http request node 2019-03-06 21:21:35 +00:00
Nick O'Leary
fe0d0f08e4 Merge branch 'pr_2078' into dev 2019-03-06 15:51:16 +00:00
Nick O'Leary
38b5063038 Tidy up blockquote css style 2019-03-05 20:56:35 +00:00
Nick Kasten
e55481a454 conditional formData assignment only 2019-03-05 11:12:59 -06:00
Nick Kasten
7063a88513 improved info panel UI 2019-03-05 10:31:25 -06:00
Nick Kasten
a9bf3d0226 add multipart/form-data support to http request node 2019-03-05 09:55:21 -06:00
Nick O'Leary
781b3aff1b Merge branch 'dev' into pr_2076 2019-03-05 14:37:33 +00:00
Nick O'Leary
b011b9203b Keep subflow palette appearance in sync with edits 2019-03-05 14:37:07 +00:00
Nick O'Leary
39344fcae5 Fix background of tab select icon 2019-03-05 13:25:44 +00:00
Nick O'Leary
a046b357da Tidy up registry/loader api used by unit tests
Fixes #2073
2019-03-05 13:25:44 +00:00
Nick O'Leary
d8e4020cec Merge pull request #2075 from kazuhitoyokoi/dev-fixlibrarybug
Fix module name bug in import menu
2019-03-05 13:05:36 +00:00
Kazuhito Yokoi
f80b172022 Add condition to handle existing node 2019-03-05 21:29:03 +09:00
Kazuhito Yokoi
66fc4b536c Automatic placing of node icon 2019-03-05 21:21:23 +09:00
Kazuhito Yokoi
1f97ccdddb Fix module name bug in library 2019-03-05 19:38:56 +09:00
Nick O'Leary
308d6889a7 Update changelog 2019-03-05 10:18:40 +00:00
Nick O'Leary
c3b9982c44 Add --no-audit flag to npm commands to reduce overhead 2019-03-05 10:17:30 +00:00
Nick O'Leary
fab796e4e4 Modify trigger spec timings to reduce false-positive test runs 2019-03-05 09:48:43 +00:00
Nick O'Leary
749db6ba82 Merge pull request #2072 from node-red-hitachi/update-messages-JP
Update Japanese messages
2019-03-05 08:36:24 +00:00
Hiroyasu Nishiyama
12d6c4ddf5 add missing Japanese translation 2019-03-05 11:57:06 +09:00
Hiroyasu Nishiyama
430a03bb14 update JP message catalogue 2019-03-05 11:14:02 +09:00
Nick O'Leary
43f21fc7aa Add list-flows action and button 2019-03-04 22:37:51 +00:00
Nick O'Leary
b27da3d1a0 Update changelog 2019-03-04 16:15:06 +00:00
Nick O'Leary
4463a8e3b2 Add exportGlobalContextKeys to prevent exposing fgc keys 2019-03-04 16:10:39 +00:00
Nick O'Leary
9e74ddac48 Bump dependencies 2019-03-04 12:33:36 +00:00
Nick O'Leary
5f62e41d62 update changelog 2019-03-04 11:17:19 +00:00
Nick O'Leary
19a103d3a0 Add _session and event to WS/TCP Status messages 2019-03-04 11:09:18 +00:00
Nick O'Leary
8fb6bc059e Pass complete status to Status node and filter to editor 2019-03-04 10:23:10 +00:00
Nick O'Leary
8f61a0d258 Fix message catalog formatting 2019-03-03 12:05:20 +00:00
Nick O'Leary
7fa589e430 Merge pull request #2068 from node-red-hitachi/i18n-port-label
Add i18n support for port label
2019-03-03 11:52:20 +00:00
Nick O'Leary
6d8d826764 Merge branch 'dev' into i18n-port-label 2019-03-03 11:52:12 +00:00
Nick O'Leary
a40e84e1f6 Merge pull request #2070 from bartbutenaers/dev
Fix hiding Bearer token
2019-03-03 11:49:48 +00:00
bartbutenaers
4844c2123f Fix hiding Bearer token 2019-03-01 23:18:48 +01:00
Nick O'Leary
236d437430 Add api docs landing content 2019-02-28 22:21:22 +00:00
Hiroyasu Nishiyama
ae726c199b add i18n support for port label of inject/exec/httprequest/file node 2019-02-28 20:22:33 +09:00
Nick O'Leary
e7f54f005c Merge pull request #2060 from jeancarl/dev
Transfer input attributes (placeholder, type) to generated TypedInput field
2019-02-28 10:50:15 +00:00
bartbutenaers
e7b1ec6904 Add Digest and Bearer Auth modes to http request node (#2061)
* Authentication methods

* Authentication methods

* Authentication methods

* Support undefined auth type

* Support undefined auth type

* Apply basic auth on existing nodes

* Use password as bearer token

* Use password as bearer token

* Switch between password/token labels

* Bearer token abbreviation

* Separate token span
2019-02-27 22:15:31 +00:00
Nick O'Leary
f4f664a4a2 Ensure flows wait for all nodes to close before restarting
Fixes #2067
2019-02-27 20:56:58 +00:00
Nick O'Leary
fec52a8151 Merge branch 'master' into dev 2019-02-26 21:44:36 +00:00
Nick O'Leary
d8b4c1e209 Rename issue templates to fix their order 2019-02-26 21:14:25 +00:00
Nick O'Leary
eac853c7dd Update issue templates 2019-02-26 21:12:42 +00:00
Nick O'Leary
a04337a270 Merge branch 'master' into dev 2019-02-25 14:46:25 +00:00
Nick O'Leary
50d7e16365 Bump for 0.19.6 2019-02-25 14:40:08 +00:00
Nick O'Leary
ef7bc931b7 Merge pull request #2051 from node-red-hitachi/fix-multi-byte-output
Fix output of multi-byte string with file node
2019-02-25 10:48:23 +00:00
Nick O'Leary
41de771074 Fix git clone with password protected key 2019-02-21 22:44:56 +00:00
Dave Conway-Jones
2ebdd6c5cb let join node handle merged objects with repeated properties and honour parts
to close issue from slack re repeated {"d":"d","d":"d","d":"d"}  messages
2019-02-20 00:11:31 +00:00
Nick O'Leary
b51cfcc753 Merge pull request #2062 from kazuhitoyokoi/dev-fixtypo
Fix typo and update message catalog
2019-02-19 09:35:35 +00:00
Kazuhito Yokoi
91cc03dd80 Fix typo and update message catalog 2019-02-19 14:24:37 +09:00
Nick O'Leary
9d673a213e Use absolute flow file path in project settings
This ensures the diff logic can recognise the project flow file
and apply merge resolution to paths that git knows
2019-02-17 22:18:40 +00:00
JeanCarl
97e789538e Transfer placeholder and type to generated TypedInput field 2019-02-15 14:40:19 -08:00
Nick O'Leary
e05ff01d57 Allow a project to be located below the root of repo 2019-02-15 22:11:25 +00:00
Dave Conway-Jones
0748dff355 And fix the JSON node test 2019-02-15 17:16:27 +00:00
Dave Conway-Jones
28d4084aa0 ensure JSON node handles single booleans and numbers 2019-02-15 17:07:11 +00:00
Nick O'Leary
afd2ccfb4f Detect the cloning of an empty git repo properly 2019-02-14 14:00:25 +00:00
Nick O'Leary
057127f4de Hitting enter in Comment node name field clicks markdown button
When Enter is pressed in a form, the browser will find the first
submittable element and trigger it. By default <button> elements
have type set to 'submit' which causes them to be targetted by
this behaviour.

Adding `type="button"` prevents this behaviour. This change
targets some main offenders - in particular the markdown toolbar.

There are of lots of other `<button>` elements without this attribute
set, so they need tidying up. Not currently aware of any others that
exist in a <Form> so may be immune from this behaviour.
2019-02-13 20:41:34 +00:00
Dave Conway-Jones
2937b25d6d Shift status text left if no shape specified 2019-02-13 14:36:36 +00:00
Nick O'Leary
419f26db87 Fix use of custom auth strategy plugins 2019-02-12 10:45:38 +00:00
Nick O'Leary
be1b9c0e43 Handle treeList labels as text not html 2019-02-11 16:15:25 +00:00
Nick O'Leary
894d28c60b Remove remnants of when library in git/index
Fixes #2057
2019-02-11 09:01:40 +00:00
Nick O'Leary
06cc08d9f7 Better align node status text to status dot 2019-02-09 21:27:54 +00:00
Nick O'Leary
75393c0b28 Clear subflow status no close 2019-02-09 21:24:31 +00:00
Nick O'Leary
bdc1da70c1 Change subflow edit dialog titles 2019-02-09 21:20:20 +00:00
Nick O'Leary
7cef990ba6 Resize subflow edit dialog properly 2019-02-09 20:44:21 +00:00
Nick O'Leary
fb0f12bb20 Bump to 0.20.0-beta.5 2019-02-08 10:41:22 +00:00
Nick O'Leary
e94b8d3e84 Update changelog 2019-02-08 10:41:01 +00:00
Nick O'Leary
8c00e1fdf4 Bump dependencies 2019-02-08 10:35:06 +00:00
Nick O'Leary
a31fa82284 Merge pull request #2056 from node-red-hitachi/update-logic-nodes-info-jp
Update Japanese info text of logic nodes
2019-02-08 09:38:17 +00:00
Nick O'Leary
5d0af45d8f Merge pull request #2055 from node-red-hitachi/update-io-nodes-info-jp
Update Japanese info text of io nodes
2019-02-08 09:38:04 +00:00
Hiroyasu Nishiyama
e9f248020e update Japanese info text of split node 2019-02-08 09:46:35 +09:00
Hiroyasu Nishiyama
a8e1058af6 fix typos in Japanese info text of range node 2019-02-08 09:35:02 +09:00
Hiroyasu Nishiyama
1a087fd799 update info text of switch node 2019-02-08 09:32:07 +09:00
Hiroyasu Nishiyama
50c81533e0 fix header level of switch node info text 2019-02-08 09:26:11 +09:00
Hiroyasu Nishiyama
5eab9aa4b1 fix typos in tcpin node info text 2019-02-08 09:14:32 +09:00
Hiroyasu Nishiyama
1970cbfe37 fix mismatched p-tag 2019-02-08 09:05:29 +09:00
Hiroyasu Nishiyama
6d736201f9 fix unmatched p-tag 2019-02-08 08:58:59 +09:00
Nick O'Leary
51ec52b573 Merge pull request #2053 from node-red-hitachi/update-node-messages-jp
Update Japanese message catalogue of core nodes
2019-02-07 22:00:55 +00:00
Nick O'Leary
d099387186 Merge pull request #2054 from node-red-hitachi/update-core-nodes-info-jp
Update Japanese info text of core nodes
2019-02-07 21:59:57 +00:00
Hiroyasu Nishiyama
3f91e4da66 update Japanese info text of template node 2019-02-07 23:35:09 +09:00
Hiroyasu Nishiyama
4124159378 update Japanese info text of function node 2019-02-07 23:24:12 +09:00
Hiroyasu Nishiyama
18f3789e29 update Japanese info text of catch node 2019-02-07 23:15:06 +09:00
Hiroyasu Nishiyama
a713c92530 convert to buffer before write 2019-02-07 22:46:21 +09:00
Hiroyasu Nishiyama
7828af591e update Japanese message catalogue of core nodes 2019-02-07 20:03:16 +09:00
Nick O'Leary
d432dba726 Merge pull request #2052 from node-red-hitachi/update-editor-messages-jp
Update Japanese editor message catalogue
2019-02-07 09:30:13 +00:00
Nick O'Leary
72ae87857f Delete package-lock.json 2019-02-07 09:29:38 +00:00
Nick O'Leary
724acff591 Properly sanitize node names in deploy warning dialogs 2019-02-07 09:11:06 +00:00
Hiroyasu Nishiyama
482b432e2c update Japanese message catalogue for JSONata 2019-02-07 12:49:36 +09:00
Hiroyasu Nishiyama
351c0cb0a8 add missing colon 2019-02-07 12:33:36 +09:00
Hiroyasu Nishiyama
314a0fb5d6 update Japanese message catalog 2019-02-07 12:28:59 +09:00
Nick O'Leary
a301bf8bf5 Fix XSS issues in library ui code 2019-02-06 22:25:25 +00:00
Nick O'Leary
37b3601c47 Link Node - scroll to current flow in node list 2019-02-06 15:38:35 +00:00
Nick O'Leary
6e944485f0 Merge pull request #2030 from node-red-hitachi/scope-parent
Allow access of scope parent
2019-02-06 14:10:57 +00:00
Nick O'Leary
431266069e Merge pull request #2050 from node-red/subflow-props
Display parent subflow properties in subflow instance edit dialog
2019-02-06 14:06:22 +00:00
Nick O'Leary
d48a09e68b Add env type to subflow env var types
Also remove date and regex types
2019-02-06 13:58:31 +00:00
Hiroyasu Nishiyama
1db1ec7b5e fix encoding of file node from binary to utf8 2019-02-06 21:53:23 +09:00
Nick O'Leary
2a8f0a4eab Display parent subflow properties in edit dialog 2019-02-05 23:08:39 +00:00
Nick O'Leary
79f3669fac Add 'catch uncaught only' mode to Catch node
Closes #1747

This was inspired by a PR from @mauriciom75 but implemented in a different way
due to some of the internal reworking done to Flow and Subflow in the dev branch
2019-02-05 14:29:50 +00:00
Nick O'Leary
aab0f2dcd5 Merge pull request #2047 from node-red-hitachi/fix-use-common-i18n-label
Fix use of i18n label
2019-02-05 08:31:38 +00:00
Nick O'Leary
a47831e278 Merge pull request #2049 from kazuhitoyokoi/dev-fixbug4outoputinsubflow
Fix direction value of subflow output
2019-02-05 08:31:04 +00:00
Kazuhito Yokoi
f1a5e8a42c Fix direction value of subflow output 2019-02-05 16:27:02 +09:00
Hiroyasu Nishiyama
723e9b3cba make $parent access without key return undefined 2019-02-05 14:47:30 +09:00
Hiroyasu Nishiyama
ff759a8074 use common i18 label for variable name placeholder 2019-02-05 13:12:21 +09:00
Nick O'Leary
4de1056d82 Tidy up HTTP Request payload to GET params work 2019-02-04 21:30:11 +00:00
Nick O'Leary
884b8da8bf Merge pull request #1981 from jonferreira/dev
Use payload properties as parameters on a GET request
2019-02-04 20:43:45 +00:00
Nick O'Leary
044ad77a4b Merge pull request #2044 from node-red-hitachi/cookie_encoding
Allow http request node to avoid encoding cookie
2019-02-04 20:39:05 +00:00
Nick O'Leary
1fe8b388a3 Allow subflow env-var list to resize with the dialog 2019-02-04 17:20:31 +00:00
Dave Conway-Jones
79fe7d684c Add parsed JSON output option to MQTT subscribe node 2019-02-04 16:35:42 +00:00
Dave Conway-Jones
c409af0ea8 Add local time display option to numerics in debug window 2019-02-04 15:51:42 +00:00
Nick O'Leary
5110eaff96 Merge branch 'dev' into pr_2042 2019-02-04 14:39:00 +00:00
Nick O'Leary
db3eee72b5 Do not convert falsey env vars to blank string
Only blank out undefined as that's what we've always done
2019-02-04 14:12:34 +00:00
Nick O'Leary
3bcff91328 Add Status Node to Subflow to allow subflow-specific status
Closes #597
2019-02-01 23:44:50 +00:00
Hiroyasu Nishiyama
e843f192ec convert subflow env vars to dict 2019-02-02 08:34:33 +09:00
Hiroki Uchikawa
f3d2053878 Make the encode option a boolean value to determine whether to encode 2019-02-01 17:15:07 +09:00
Nick O'Leary
efe8fbbd11 Better handling of multiple flow merges
Fixes #2039

Keeps better track of what was merged so a subsequent merge
properly identifies new-vs-old and doesn't remove thinks by mistake
2019-01-30 15:12:01 +00:00
Hiroyasu Nishiyama
ce507b3b52 simplified meta-data 2019-01-30 20:57:51 +09:00
Nick O'Leary
85de227003 Make Node._flow a writeable property
This is needed so an existing node constructor that does:

   Object.assign(this,config);

works when it tries to replace this._flow with config._flow.
2019-01-30 10:50:29 +00:00
Hiroki Uchikawa
7c6eb7c794 Allow http request node to change cookie value encoding 2019-01-30 19:33:23 +09:00
Hiroki Uchikawa
2037741b54 Revert cookie encoding behavior 2019-01-30 19:24:19 +09:00
Nick O'Leary
d534a8952d Do not propagate Flow.getNode to parent when called from outside flow 2019-01-29 21:49:20 +00:00
Hiroyasu Nishiyama
0b05b883cb add test cases 2019-01-30 00:04:41 +09:00
Hiroyasu Nishiyama
6937aa5ddd fix type of env values 2019-01-29 23:46:56 +09:00
Hiroyasu Nishiyama
8f6b24e0aa fixed to access last variable with same name 2019-01-29 21:46:50 +09:00
Hiroyasu Nishiyama
ba3b64a6c6 removed useless env setup & simplified env access in function node 2019-01-29 21:39:59 +09:00
Nick O'Leary
d23b32a830 Bump to 0.20.0-beta.4 2019-01-28 15:29:01 +00:00
Nick O'Leary
ceba08a801 Update dependencies and tidy up sentiment 2019-01-28 15:27:40 +00:00
Nick O'Leary
e0bb03a53f More api documentation updates 2019-01-28 14:40:42 +00:00
Hiroyasu Nishiyama
0881c6a20b update test cases 2019-01-28 23:14:49 +09:00
Hiroyasu Nishiyama
f88a4b1791 fixed comments from @knolleary 2019-01-28 22:14:08 +09:00
Hiroyasu Nishiyama
2b43e3ee23 add placeholder for env var name 2019-01-27 21:56:13 +09:00
Nick O'Leary
2e063f91bc Merge pull request #2041 from kazntree/default-chromedriver
Remove chromedriver from devDependencies
2019-01-26 21:48:25 +00:00
Nick O'Leary
79062e2034 Move nodes to top-left corner when converting to subflow 2019-01-26 20:49:22 +00:00
Hiroyasu Nishiyama
a413f3cded Add support of subflow env var 2019-01-26 23:15:20 +09:00
Nick O'Leary
4baaaa8d59 Propagate Status/Error events from global config nodes 2019-01-25 15:46:39 +00:00
Nick O'Leary
c99b35428b Ensure status/error events are propagated to parent properly 2019-01-25 13:35:02 +00:00
Nick O'Leary
3c8e4f8bbf Merge branch 'pr_2033' into dev 2019-01-23 16:29:14 +00:00
Nick O'Leary
aa9a37da38 Add placeholder node when in quick-add mode 2019-01-23 16:27:13 +00:00
Nick O'Leary
85efb48c1f Merge branch 'dev' into pr_2033 2019-01-22 16:13:26 +00:00
Nick O'Leary
888e7ee023 Merge pull request #2038 from kazuhitoyokoi/dev-fixbuginwebsocketnode
Fix bug in WebSocket configuration node
2019-01-22 16:13:06 +00:00
Kazuhito Yokoi
d7bbf8a8da Fix bug in websocket node 2019-01-22 12:03:30 +09:00
Dave Conway-Jones
e2ee88de84 offset menu so you can see node placement 2019-01-21 22:08:25 +00:00
Dave Conway-Jones
1d1ab5b7b2 don't pin new nodes to grid if not using grid 2019-01-21 16:15:38 +00:00
Nick O'Leary
54c863d48f Make Node._flow non-enumerable to avoid circular refs 2019-01-21 14:19:19 +00:00
Nick O'Leary
acc633b4b6 Don't collapse version control header when clicking refresh 2019-01-21 10:06:02 +00:00
Dave Conway-Jones
766ccf85c2 add fast entry via keyboard for string of nodes 2019-01-20 14:43:17 +00:00
kazntree
7ab5a2be47 remove chromedriver package, and instruct how to install it when running grunt test-ui 2019-01-20 19:10:54 +09:00
Nick O'Leary
7a6e1fe566 Check for undeployed change before showing open project dialog 2019-01-18 21:42:13 +00:00
Nick O'Leary
4749c92252 Add View Tools 2019-01-18 21:19:03 +00:00
Nick O'Leary
0e035e47df Avoid duplicate links when missing node type installed
Fixes #2032
2019-01-17 22:35:58 +00:00
Nick O'Leary
1359545e13 Allow debug edit expression to be sent to status 2019-01-17 17:15:53 +00:00
Nick O'Leary
5b2f24f842 Handle i18n properly when key is a valid sub-identifier
Fixes #2028
The i18n library will, be default, return a string containing
an error message about the key resolving to an object. We cannot
distinguish that string from others to handle ourselves.

The `returnObjectTrees` option will cause it to return the object
rather than error. We can then test for that and return the original
key if the object is returned - which is the desired result.
2019-01-17 14:44:41 +00:00
Nick O'Leary
bb73e30909 Merge pull request #2016 from jwende/dev
german translation v01
2019-01-17 14:25:15 +00:00
Nick O'Leary
490903ca25 Tidy up when usage in Flow and Node 2019-01-17 13:18:26 +00:00
Nick O'Leary
901b32297e Restore RED.auth to node-red module api 2019-01-16 23:41:44 +00:00
Nick O'Leary
dd72046922 Add some comments to Flow and Subflow classes 2019-01-16 23:33:04 +00:00
Nick O'Leary
6286b34d00 Add Flow.getSetting for resolving env-var properties
This lays the groundwork for subflow-specific settings
2019-01-16 22:38:04 +00:00
Nick O'Leary
81f4e0de56 Refactor Subflow logic into own class 2019-01-16 16:27:19 +00:00
Hiroyasu Nishiyama
596fbfb517 allow $parent access of flow context 2019-01-16 23:10:03 +09:00
Nick O'Leary
da756fa568 WIP: Start refactor of nodes/Flow.js 2019-01-11 14:53:21 +00:00
Nick O'Leary
30aebc4ee3 Bump JSONata in util package 2019-01-11 10:08:09 +00:00
Nick O'Leary
45138ce5ca Bump JSONata to 1.6.4:wq 2019-01-11 09:54:56 +00:00
Nick O'Leary
f26b9feeaf Change default dropdown appearance and sidebar tab menu handling 2019-01-10 23:30:51 +00:00
Nick O'Leary
9e47d933af Handle multiple-select box when nothing selected
Fixes #2021
2019-01-10 15:21:27 +00:00
Nick O'Leary
f309a9d537 Bump version to 0.20.0-beta.3 2019-01-10 13:34:47 +00:00
Nick O'Leary
a786b37cb9 Make ssh key dialog accessible when opened from new proj dialog 2019-01-10 13:28:40 +00:00
Nick O'Leary
6a519a30a2 Update changelog 2019-01-09 17:04:33 +00:00
Nick O'Leary
81ae552e69 Project ui code using incorrect error property 2019-01-09 17:03:17 +00:00
Nick O'Leary
0ec04a3624 Allow notifications to be reused in place rather than stack
For example, clipboard actions now reuse the same notification.
Similarly the Inject node will reuse its notification when
injecting.
2019-01-09 14:02:46 +00:00
Nick O'Leary
81d5b47fce Update ws dependency in sub-modules 2019-01-08 16:31:18 +00:00
Nick O'Leary
ed31a0cf15 Update to WS 6.x and fix all it broke
Significant update to the ws module to get it completely up to date.

The jump from 1.x to 6.x has required a rewrite of our WS handling. Most
specifically the means by which you can have multiple ws servers on a
single http server has completely changed; we now have to handle the
'upgrade' event on the server ourselves.
2019-01-08 16:21:36 +00:00
Nick O'Leary
201d1926bc Bump dependencies 2019-01-08 10:32:23 +00:00
Nick O'Leary
9ee6655bfa Bump jsonata in submodule package.json 2019-01-07 17:03:32 +00:00
Nick O'Leary
c4beab6b0d Bump JSONata to 1.6.4
Fixes #2023
2019-01-07 16:59:38 +00:00
Nick O'Leary
34b6643913 Remove unused variable declaration in Change node 2019-01-07 15:00:32 +00:00
Nick O'Leary
98e391b867 Add audit logging to admin api 2019-01-07 14:59:48 +00:00
Nick O'Leary
19eb8e9a6d Update palette manager properly when module updated 2019-01-07 14:54:35 +00:00
Nick O'Leary
43b7aa40c3 Remove promises from Join node 2019-01-02 22:37:06 +00:00
Nick O'Leary
747af44fc1 Tidy up variable naming in split.js 2019-01-01 23:05:13 +00:00
Joerg Wende
a73381e24b german translation v01 2018-12-22 09:22:25 +01:00
Nick O'Leary
d5ef428edd Remove promises from Change node 2018-12-21 14:37:04 +00:00
Nick O'Leary
5fa4d227b8 Merge pull request #2010 from node-red-hitachi/fix-require
Fix RED.require
2018-12-21 10:38:35 +00:00
Hiroyasu Nishiyama
cc7e3b0c26 fix failure of RED.require 2018-12-21 14:39:51 +09:00
Nick O'Leary
473a2ae275 Remove all Promises from Switch node
Promises are expensive and should not be used in the main
message handling path. The Switch node used them a lot if
the node references context - with a lot of duplicate code
to handle async and sync code paths.

This change modifies the code to use callbacks throughout
that are just as performant in either case.
2018-12-20 22:57:47 +00:00
Nick O'Leary
7f5d47f39d Update Link node UI to use TreeList 2018-12-20 13:15:42 +00:00
Nick O'Leary
6031f146aa Add TreeList common widget 2018-12-20 13:15:31 +00:00
Nick O'Leary
020a469f3b Fix visual jump when opening Comment editor on Safari
Part of #2008
2018-12-19 10:05:09 +00:00
Nick O'Leary
091de3aa66 Fix vertical align of markdown editor in Safari
Fixes #2008
2018-12-19 10:04:36 +00:00
Nick O'Leary
b837f7608c Avoid marking node as changed if label state is default
Fixes #2009
2018-12-19 09:30:20 +00:00
Nick O'Leary
afe9367bac Merge pull request #2005 from kazuhitoyokoi/dev-updatemessagecatalog
Update message catalog
2018-12-18 22:58:19 +00:00
Nick O'Leary
9bd9023cb6 Merge pull request #2007 from node-red-hitachi/dev-uitest-mac
Update UI test for mac OS
2018-12-18 22:57:48 +00:00
Nick O'Leary
8502cf8498 Highlight port on node hover while joining 2018-12-18 21:45:33 +00:00
Nick O'Leary
33dade0584 Support drag-wiring of link nodes 2018-12-18 10:57:53 +00:00
Nick O'Leary
84cc2ad0fa Allow TypeSearch to include a filter option 2018-12-18 10:57:33 +00:00
Nick O'Leary
dc2d3bc7c0 Improve diff colouring 2018-12-18 10:57:18 +00:00
Nick O'Leary
64df557423 Allow sections to toggle in 2-element stack 2018-12-18 10:56:54 +00:00
Yuma Matsuura
715cc77e76 Update UI test for mac os 2018-12-18 09:29:46 +09:00
Kazuhito Yokoi
b80d1af3d7 Fix typo 2018-12-17 19:01:33 +09:00
Kazuhito Yokoi
f05f534fd2 Update message catalogue 2018-12-17 18:48:19 +09:00
Nick O'Leary
c0837ead0e Add support for ${} env var syntax when skipping validation
Closes #1980

See also #825
2018-12-13 16:13:57 +00:00
Nick O'Leary
a1f135bd66 Allow oauth strategy callback method to be customised
Closes #1998

Method can be set via: `adminAuth.strategy.options.callbackMethod`

Can be either GET (default) or POST.
2018-12-13 13:43:57 +00:00
Nick O'Leary
978f4ecc58 Ensure fs context cache is flushed on close
Fixes #2001
2018-12-13 12:46:19 +00:00
Dave Conway-Jones
46a8d96997 fix library Buffer( to Buffer.alloc( for node 10 2018-12-13 11:32:58 +00:00
Nick O'Leary
c283224000 Merge branch 'master' into dev 2018-12-13 11:14:58 +00:00
Nick O'Leary
a6ef755139 Merge pull request #1993 from arunnattarayan/patch-1
Export to library produces empty folder when name has a trailing slash
2018-12-13 11:05:52 +00:00
Nick O'Leary
29a257d17a Merge pull request #1995 from node-red-hitachi/debug-node-with-jsonata
Add support of output editing in DEBUG node using JSONata
2018-12-13 11:05:21 +00:00
Nick O'Leary
368b76a183 Merge pull request #2000 from node-red-hitachi/i18n-markdown-tooltip
i18 support for markdown editor tooltips
2018-12-13 11:00:03 +00:00
Nick O'Leary
8bb861124d Catch file-not-found on startup when non-existant flow file specified 2018-12-13 10:59:03 +00:00
Hiroyasu Nishiyama
2f884ec778 i18 support for markdown editor tooltip 2018-12-11 22:33:11 +09:00
Nick O'Leary
8c561e92c8 Actively expire login sesssions and notify user 2018-12-11 11:32:12 +00:00
Hiroyasu Nishiyama
633b9180d7 update info text 2018-12-11 19:53:10 +09:00
Hiroyasu Nishiyama
0e2d0e1b6f merge dev 2018-12-11 19:02:49 +09:00
Nick O'Leary
ea4d65ceee Add RED.editor.registerTypeEditor for custom type editors 2018-12-10 22:21:21 +00:00
Nick O'Leary
d47ac84d2e Merge pull request #1999 from natcl/dev
JSON node: delete msg.schema before sending msg to avoid conflicts
2018-12-10 20:54:24 +00:00
Nathanaël Lécaudé
a97759aa35 JSON node: add help about schema deletion 2018-12-10 14:47:52 -05:00
Nathanaël Lécaudé
3fcfd4abdd JSON node: add help about schema deletion 2018-12-10 14:46:21 -05:00
Nathanaël Lécaudé
6d771da9a9 JSON node: delete msg.schema before sending msg to avoid conflicts 2018-12-10 13:47:55 -05:00
Nick O'Leary
6201247875 Tidy up markdown toolbar handling across all editors
Any editor for the markdown mode will now automatically get
the markdown toolbar added.

The comment node has been updated to handle this properly and
to not add two copies of its content to the sidebar.
2018-12-10 15:24:27 +00:00
Hiroyasu Nishiyama
8c367bcc53 update messages 2018-12-09 20:33:58 +09:00
Hiroyasu Nishiyama
8198132ca7 use output selector for specifying JSONata expression 2018-12-09 20:30:35 +09:00
Dave Conway-Jones
cf3b4e9e63 change check order for node.users
If node _def hasUsers is false then node.users may not exist... so won't have a length...
2018-12-08 18:09:33 +00:00
Hiroyasu Nishiyama
987dbf8a92 Merge branch 'dev' into debug-node-with-jsonata 2018-12-08 17:43:29 +09:00
Nick O'Leary
acf8c9bc4a Fixup version again because its Friday afternoon 2018-12-07 16:49:37 +00:00
Nick O'Leary
7173895d36 Fixup version 2018-12-07 16:47:19 +00:00
Nick O'Leary
43530d4a5f Remove tail/sentiment node tests 2018-12-07 16:45:06 +00:00
Nick O'Leary
fefabef9ee Bump for 0.20.0.beta.2 2018-12-07 16:44:14 +00:00
Nick O'Leary
0dd40a941b Handle 3rd party node trying to use core node-red icon 2018-12-07 16:43:06 +00:00
Nick O'Leary
24b6670bc4 Remove sentiment and tail nodes 2018-12-07 16:23:55 +00:00
Nick O'Leary
76661abbf5 Ensure changelog is copied into node-red module 2018-12-07 16:10:51 +00:00
Nick O'Leary
e9dc9eff9b fix changelog typo 2018-12-07 15:30:20 +00:00
Nick O'Leary
2f160743bc Add sentiment/tail external modules 2018-12-07 15:29:35 +00:00
Nick O'Leary
98616e772c Bump dependencies 2018-12-07 14:13:59 +00:00
Nick O'Leary
bc014fec9b Update changelog 2018-12-07 13:35:36 +00:00
Nick O'Leary
732598d9d2 Remove deprecated warning from RED.nodes for now... 2018-12-07 11:40:47 +00:00
Nick O'Leary
2979acd5b8 Bump to beta.1 version 2018-12-07 11:40:33 +00:00
Nick O'Leary
fd20cd524e Add senitment and tail nodes to deprecated list
Partof #1904
2018-12-07 11:25:09 +00:00
Nick O'Leary
7b80ae42e1 removed regex in if statement
Co-Authored-By: arunnattarayan <arunkumarit02@gmail.com>
2018-12-06 19:20:43 +05:30
Nick O'Leary
b7012674c6 Fix Template node name field from overflowing row 2018-12-06 10:54:42 +00:00
Nick O'Leary
c76bd39280 Improve alignment of node label edit inputs 2018-12-06 10:54:23 +00:00
Nick O'Leary
09cd710f66 Add RED.notifications.hide flag
For use by the UI tests to suppress notifications from being displayed
in the editor. It is not for use by end-users and not exposed in any
way other than via javascript injection by the UI tests
2018-12-06 10:51:56 +00:00
Nick O'Leary
d9aadf9d98 Merge pull request #1979 from node-red/better-npm-check
refuse to enable palette if npm too old
2018-12-05 14:52:28 +00:00
meeki007
86716b5ffb Tidy up Template node edit form
Closes #1969 #1970 #1968 #1967
2018-12-05 14:47:38 +00:00
meeki007
96e3aab3b4 update 10-switch.html - missing Font Awesome font
switch node was missing font  ( fa-ellipsis-h )
other nodes that have been updated with property option have the icon.
rbe-node and range-node have the icon to the left of property

its time the switch-node joins its siblings in uniformity.
2018-12-05 14:27:38 +00:00
Nick O'Leary
72c78fe3ad Merge pull request #1996 from node-red-hitachi/http-redirectList
Add redirectList property in msg of http-request node
2018-12-05 14:01:36 +00:00
Nick O'Leary
abe746020b Update packages/node_modules/@node-red/runtime/locales/en-US/runtime.json
Co-Authored-By: dceejay <dceejay@users.noreply.github.com>
2018-12-05 13:48:39 +00:00
Nick O'Leary
8e1c15419c API documentation updates 2018-12-05 13:00:25 +00:00
Nick O'Leary
ee47646cf7 Fix up unit tests 2018-12-04 15:59:43 +00:00
nakanishi
32d9acdaa5 minor fix 2018-12-04 15:46:46 +00:00
nakanishi
4eb3bd496b Add redirectList property in msg of http-request node 2018-12-04 15:39:01 +00:00
Hiroyasu Nishiyama
3c4f4d27d6 Support output editting of DEBUG node using JSONata 2018-12-01 18:03:04 +01:00
Nick O'Leary
2060af8a92 Merge pull request #1987 from node-red-hitachi/fa-nonexist
Show arrow-in node when invalid font-awesome icon name was specified …
2018-11-30 23:13:33 +00:00
Nick O'Leary
21bf74a467 Merge pull request #1989 from TothiViseo/diffNodePropertiesOnClick
Speeding up display of diff for large flows
2018-11-30 23:12:33 +00:00
Nick O'Leary
677833a277 Merge pull request #1990 from node-red-hitachi/move-en-info-text
Move English info text under locales directory
2018-11-30 23:07:53 +00:00
Nick O'Leary
0b5e4f2dd7 Documentation updates for node-red and runtime modules 2018-11-30 23:01:09 +00:00
Arun Nattarayan
06a1f30350 Added validation while export into library 2018-11-30 20:04:12 +05:30
Hiroyasu Nishiyama
c1ff241550 add fixes for core nodes 2018-11-30 13:02:15 +00:00
Hiroyasu Nishiyama
5717f75eac move English info text under locales directory 2018-11-30 12:50:49 +00:00
To-Thi Hoang
6b3b68a4e5 Diff panel DOM generation : Move generation of DOM for node properties to the click on the node row (instead of the diff panel opening). 2018-11-30 10:48:21 +01:00
nakanishi
8bda2d0add Show arrow-in node when invalid font-awesome icon name was specified for default icon 2018-11-29 16:57:39 +00:00
Nick O'Leary
bc02c9573c Generate runtime api docs in runtime module 2018-11-16 10:04:53 +00:00
jonferreira
86bb5503ab Update 21-httprequest.html 2018-11-15 17:11:40 +00:00
jonferreira
21ce23d27d Update 21-httprequest.js 2018-11-15 17:11:27 +00:00
jonferreira
6c75baecb2 Update messages.json 2018-11-15 17:11:11 +00:00
Nick O'Leary
8167608f04 Handle lookup of undefined property in Global context
Fixes #1978
2018-11-14 20:57:17 +00:00
Dave Conway-Jones
514e31aef9 refuse to enable palette if npm too old 2018-11-14 18:29:27 +00:00
Nick O'Leary
20a31a6d38 Allow a project to be loaded from cmdline even if its unknown 2018-11-14 12:51:23 +00:00
Nick O'Leary
4f0aa1bc02 Add 'open project' option to Projects Welcome dialog 2018-11-14 12:51:02 +00:00
Nick O'Leary
be0ef6e594 Merge pull request #1973 from node-red-hitachi/update-i18n-editor
add i18n & JP message for node config tab
2018-11-14 09:39:55 +00:00
Hiroyasu Nishiyama
93a8dbd31a add Japanese translation of newly added message 2018-11-14 09:13:21 +09:00
Hiroyasu Nishiyama
cf931e8ddf Merge remote-tracking branch 'upstream/dev' into update-i18n-editor 2018-11-14 09:06:05 +09:00
Hiroyasu Nishiyama
510bfbf268 remove @ from English message 2018-11-14 08:59:36 +09:00
Nick O'Leary
2f93bb969b Merge pull request #1976 from MatthiasU/master
Add quotation marks for basic auth challenge
2018-11-13 23:16:41 +00:00
Nick O'Leary
27365c9f7b Tweak conflict message 2018-11-13 23:12:39 +00:00
Nick O'Leary
b1d2e188f5 Merge pull request #1971 from node-red-hitachi/update-message-catalogue-JP
Update Japanese message catalogue
2018-11-13 23:10:24 +00:00
Nick O'Leary
e4f67df2a1 Add 'type already registered' check in palette editor 2018-11-13 22:36:56 +00:00
Matthias Uttendorfer
e094ea3d2a Add quotation marks for basic auth challenge
This is required by RFC 2617
2018-11-13 23:05:19 +01:00
Nick O'Leary
7515b745b5 Make sure editor footer is i18n enabled 2018-11-13 15:10:19 +00:00
Hiroyasu Nishiyama
0e902a7e71 i18n & JP message for node config tab 2018-11-13 23:29:14 +09:00
Nick O'Leary
2dfb443625 Handle missing tab.disabled property 2018-11-13 13:39:06 +00:00
Nick O'Leary
e6e7747ae1 Handle missing wires prop and string x/y props on import 2018-11-13 13:29:48 +00:00
Hiroyasu Nishiyama
d80ea6c0f5 add additional Japanese translation 2018-11-13 06:55:04 +09:00
Hiroyasu Nishiyama
ac6e3988a8 merge upstream/dev 2018-11-13 06:50:01 +09:00
Nick O'Leary
bfd98f3767 Add ability to delete context values from sidebar 2018-11-12 17:04:22 +00:00
Hiroyasu Nishiyama
cc8bc1339f update Japanese message catalogue - nodes messages.json 2018-11-12 21:09:19 +09:00
Hiroyasu Nishiyama
542d1dc600 update Japanese message catalogue - editor.json 2018-11-12 20:59:09 +09:00
Nick O'Leary
1c66c88f95 Allow copy-to-clipboard copy whole tabs 2018-11-09 09:51:55 +01:00
Nick O'Leary
dc880c672a Make disabled flows more obvious in editor 2018-11-08 18:04:36 +01:00
Nick O'Leary
073f38c68c Only unsub mqtt node that is being removed 2018-11-08 17:03:41 +01:00
Nick O'Leary
6a6d13b075 Allow import/export from file in editor 2018-11-05 22:32:39 +00:00
Nick O'Leary
9bb7e72c69 Merge pull request #1962 from node-red-hitachi/update-JP-catalog-for-nodes
Update Japanese message catalog for nodes
2018-11-03 21:36:29 +00:00
Nick O'Leary
7436e01188 Allow config nodes to be selected in sidebar and deleted 2018-11-03 21:32:38 +00:00
Hiroyasu Nishiyama
3d272d0f10 update Japanese translation of nodes 2018-11-02 23:41:48 +09:00
Hiroyasu Nishiyama
ee66a12dad add missing message reference in websocket config node 2018-11-02 23:40:14 +09:00
Nick O'Leary
47de85b012 Merge pull request #1956 from node-red-hitachi/dev-fix_rpi_html
Fix html file of rpi-gpio out node
2018-11-02 14:01:28 +00:00
Nick O'Leary
f85b63a972 Merge pull request #1959 from natcl/httpTimeoutPerMsg
http request: add msg.requestTimeout parameter
2018-11-02 14:00:57 +00:00
Nick O'Leary
e630919ef8 Handle subflow type in refreshLabelForm
Part of #1955
2018-11-02 13:59:10 +00:00
Nick O'Leary
2e3fd49b40 Merge pull request #1955 from node-red-hitachi/subflow-label
Show port label of subflow with input port
2018-11-02 13:59:04 +00:00
Nick O'Leary
dd54af2c08 Merge pull request #1961 from node-red-hitachi/update-JP-catalog-for-editor
Update message catalog for Node-RED editor
2018-11-02 13:17:27 +00:00
Hiroyasu Nishiyama
737bf411ff make projects menu use i18n 2018-11-02 21:25:14 +09:00
Hiroyasu Nishiyama
5070b1a6b5 update Japanese editor.json message 2018-11-02 21:11:09 +09:00
Hiroyasu Nishiyama
c849da92cf fix word "reloaded" to "reverted" 2018-11-02 21:10:29 +09:00
Nick O'Leary
6a4e7201fe Disable subflow toolbar when multiple tabs are selected 2018-11-02 09:56:43 +00:00
Nick O'Leary
ffa6dea452 Attach server object to the right part of runtime api 2018-11-02 09:44:24 +00:00
Nathanaël Lécaudé
30c1d31a99 http request: coding style 2018-11-01 17:32:25 -04:00
Nathanaël Lécaudé
6934a2d5c3 http request: add msg.requestTimeout parameter 2018-11-01 17:27:04 -04:00
Masae Okada
b9906ced9a fix html file of rpi-gpio out node 2018-11-01 18:34:38 +09:00
nakanishi
5500b4fe35 Show port label of subflow with input port 2018-11-01 13:35:13 +09:00
Nick O'Leary
2353f12cd6 Add @node-red/nodes to core package dependency 2018-10-31 14:54:00 +00:00
Nick O'Leary
1b8cab0f58 Update individual module versions 2018-10-31 13:57:52 +00:00
Nick O'Leary
869c1d4ea4 Merge pull request #1948 from node-red-hitachi/typo-jp
Fix typo in Japanese
2018-10-31 13:52:21 +00:00
Nick O'Leary
9b938195a8 Merge pull request #1949 from node-red-hitachi/uitest-timing
Fixed UI test problems caused by timing
2018-10-31 13:52:01 +00:00
Nick O'Leary
bb3c52821a Bump chromedriver again 2018-10-31 11:56:49 +00:00
Nick O'Leary
81c8ae95e2 Bump package dependencies 2018-10-31 11:52:43 +00:00
Nick O'Leary
6098570ab7 Merge branch 'master' into dev 2018-10-31 11:48:52 +00:00
nakanishi
d033c24fe5 Fixed UI test problems caused by timing 2018-10-31 09:27:33 +09:00
nakanishi
4995e52dd6 Fix typo in Japanese 2018-10-31 09:03:42 +09:00
Nick O'Leary
c685a31056 Backlevel chromedriver version due to bad semver
Chromedriver 2.41.1 cannot be installed on Node 4.
2018-10-30 23:27:44 +00:00
Nick O'Leary
c32ce3bb7b Bump for 0.19.5 2018-10-30 22:46:42 +00:00
Nick O'Leary
c0d8f904b3 Support ctrl-click selection of flow tabs 2018-10-30 22:18:16 +00:00
Dave Conway-Jones
8dba0dac9e Fix UDP in test 2018-10-29 22:23:03 +00:00
Nick O'Leary
d0bf4a5329 Merge branch 'pr_1947' into dev 2018-10-29 21:49:43 +00:00
Nick O'Leary
7b28ba6078 Allow left-hand node button to act as toggle 2018-10-29 20:55:35 +00:00
DurandA
e6466c3c3a Add auto-detect and base64 output to mqtt node
Fixes #1912
2018-10-29 15:11:20 +01:00
Nick O'Leary
d96d3064d6 Give function node editor a bit more vertical space 2018-10-27 09:56:54 +01:00
Nick O'Leary
d4589ed7e3 Hide tooltips when a node is deleted 2018-10-26 23:17:09 +01:00
Nick O'Leary
5cfc52ea18 Support dbl-click in tab bar to add new flow in position 2018-10-26 23:09:41 +01:00
Nick O'Leary
3fcacd8339 Allow actions to have an argument 2018-10-26 23:09:41 +01:00
Nick O'Leary
49fe13f22f Fix duplicate subflow detection on import 2018-10-26 23:09:41 +01:00
Nick O'Leary
4d27ba1bda Merge pull request #1945 from node-red/UDP-Node-fixes
Udp node socket binding fixes
2018-10-26 21:37:39 +01:00
Nick O'Leary
b715ac8bf4 Add more test coverage around settings apis 2018-10-26 21:22:58 +01:00
Dave Conway-Jones
d96049416f csv node - boost / fix tests for new regex 2018-10-26 09:53:33 +01:00
Dave Conway-Jones
1c4df785fd csv node - better regex for number detection 2018-10-26 09:24:56 +01:00
Nick O'Leary
8f94c5efeb Increase unit test coverage context/exec modules 2018-10-25 15:37:46 +01:00
Nick O'Leary
7cffa1ece7 Fix istanbul test coverage generation 2018-10-25 13:36:57 +01:00
Nick O'Leary
1ac18d7b33 Remove restriction on upgrading non-local modules 2018-10-25 13:05:57 +01:00
Nick O'Leary
1111d2518b Add pack-modules grunt task 2018-10-25 11:18:13 +01:00
Nick O'Leary
ba7416450e Merge pull request #1942 from node-red-hitachi/dev-uitest-place
Automatically adjust node deployment
2018-10-25 09:56:33 +01:00
Nick O'Leary
3b02d36acb Merge pull request #1943 from node-red-hitachi/dev-fixEditorApiName
fix typo of editor-api package name
2018-10-25 09:56:04 +01:00
nakanishi
c2aa9a5337 Automatically adjust node deployment 2018-10-25 10:19:51 +09:00
Nick O'Leary
70fb181b7b Add more ui tooltips 2018-10-24 22:57:16 +01:00
Nick O'Leary
e64f4e3f39 Merge branch 'master' into dev 2018-10-24 16:42:21 +01:00
Nick O'Leary
e4d518749f Remove deprecated Buffer constructor usage
Fixes #1709
2018-10-24 13:45:34 +01:00
Nick O'Leary
7dcca2c907 Add import notification with info on what has been imported
Closes #1862
2018-10-24 11:07:48 +01:00
Nick O'Leary
4a027b8a79 Fix-up json error messages 2018-10-24 10:03:58 +01:00
Dave Conway-Jones
c2c6e6080e remove extraneous brace from udp node 2018-10-23 23:27:49 +01:00
Nephiel
4f87ebdf0a Recognize pip installs of RPi.GPIO (#1934)
Fixes "[warn] rpi-gpio : Cannot find Pi RPi.GPIO python library" when it is installed with pip using the default prefix (/usr/local).
2018-10-23 23:20:44 +01:00
Nick O'Leary
09abec15b1 Show error details when trying to import invalid json 2018-10-23 23:07:31 +01:00
Dave Conway-Jones
33d0d12bc8 More resilient binding to correct port for udp, give input side priority 2018-10-23 23:04:36 +01:00
Dave Conway-Jones
f488869635 clear tcpget node status if user changes target per message 2018-10-23 18:59:23 +01:00
Nick O'Leary
6382564727 Make exec node test more tolerant of multiple messages being received 2018-10-23 11:33:26 +01:00
Nick O'Leary
7476b4c7db Merge pull request #1937 from node-red/hide-label
Adds the ability to hide a node's label
2018-10-23 11:01:04 +01:00
Nick O'Leary
daf3e6a47a Merge branch 'dev' into hide-label 2018-10-23 10:55:27 +01:00
Nick O'Leary
19b6cba398 Merge pull request #1941 from node-red-hitachi/master-batch
Prevent invalid value for batch node property
2018-10-23 10:47:48 +01:00
Nick O'Leary
5bd3d12c7b Merge pull request #1940 from node-red-hitachi/import-invalid-fa
Show default icon when invalid font-awesome icon was specified
2018-10-23 10:09:45 +01:00
nakanishi
c9db74ebca Show default icon when non-existent font-awesome icon was specified 2018-10-23 16:30:56 +09:00
TAKAYA IDE
f8a88cc1a4 fix typo of editor-api package name 2018-10-23 13:21:59 +09:00
Nick O'Leary
4a081bf125 Update httpServerOptions doc in settings.js 2018-10-22 23:00:00 +01:00
TJKoury
8a68a3e861 Update editor options
http://expressjs.com/en/api.html#app.settings.table

Allow for setting individual options on the editor express app.  This app is not available through the embedded interface when using Node-RED within another application.

Update settings with editor options

Allow editor express app options to be set in settings.js

Update settings.js

formatting

Update settings.js

Co-Authored-By: TJKoury <TJKoury@gmail.com>

editorOptions -> httpServerOptions
2018-10-22 22:54:44 +01:00
Akash Mugu
7a9dd9ad9c Exec: Add unit tests - Preserve existing properties on msg object 2018-10-22 16:44:16 +01:00
Akash Mugu
6c01d0f9d8 Exec: Preserve existing properties on msg object 2018-10-22 16:44:16 +01:00
Nick O'Leary
45a53ac168 Merge pull request #1936 from node-red-hitachi/dev-fixtypoenglish
Fix typo in English messages
2018-10-22 16:39:10 +01:00
Nick O'Leary
dabb2790c9 Fix up merge of auth token handling 2018-10-22 16:21:02 +01:00
Nick O'Leary
c66c5ea53c Add configurable option for showing node label 2018-10-22 15:38:43 +01:00
Nick O'Leary
0a98ba6985 Tidy up appearance tab in edit dialog 2018-10-22 14:41:47 +01:00
Nick O'Leary
bb8e491856 Merge branch 'master' into dev 2018-10-22 11:02:23 +01:00
Kazuhito Yokoi
5590d31336 Fix typo 2018-10-22 18:52:34 +09:00
Nick O'Leary
dc7e48dc53 Merge branch 'dev' into pr_1789 2018-10-22 10:46:47 +01:00
Kazuhito Yokoi
371d357218 Fix typo in English messages 2018-10-22 18:21:51 +09:00
Nick O'Leary
f22960ad59 Avoid http redirects as Safari doesn't reuse Auth header
Fixes #1903
2018-10-19 14:03:22 +01:00
Nick O'Leary
34ead436b0 Merge pull request #1913 from node-red-hitachi/dev-httpproxy
Add http-proxy for http-request node.
2018-10-19 11:10:26 +01:00
Nick O'Leary
808d5a75ae Merge pull request #1922 from node-red-hitachi/dev-uitest-split
Followed runtime-editor split for UI test
2018-10-19 11:03:48 +01:00
Nick O'Leary
55e897faac Merge pull request #1927 from node-red-hitachi/faicon-height
Adjust the fa icon position for the node with height
2018-10-19 11:03:34 +01:00
Nick O'Leary
5a5dda21e4 Merge pull request #1928 from kazuhitoyokoi/dev-fixmsgcatalog
Fix reference bug in message catalog
2018-10-19 11:02:17 +01:00
Nick O'Leary
f085655daa Merge pull request #1929 from kazuhitoyokoi/dev-updatejapanesemessages
Update Japanese message catalog
2018-10-19 10:59:27 +01:00
Nick O'Leary
5cf9c07b73 Merge pull request #1931 from node-red-hitachi/master-typedinput
Fix unnecessary TypedInput element
2018-10-19 10:57:13 +01:00
Nick O'Leary
9751089807 Tidy up ace tooltip styling 2018-10-19 10:42:39 +01:00
HirokiUchikawa
211eeea05d Set min value of properties and spinners for batch 2018-10-19 17:52:57 +09:00
Nick O'Leary
b2516117f5 Add event log to editor
Shows output from git pull/push and npm install in the editor
2018-10-18 23:49:47 +01:00
Nick O'Leary
2816b3edae Add tooltip to flow add button 2018-10-17 13:45:57 +01:00
Nick O'Leary
242398c724 Slow down sidebar control appearance
Also hides WIP action info panel buttons
2018-10-17 13:18:08 +01:00
Nick O'Leary
289583325d Allow palette to be hidden 2018-10-17 11:03:09 +01:00
Kazuhito Yokoi
0f793ebd65 Update Japanese message catalog 2018-10-17 18:03:21 +09:00
Kazuhito Yokoi
ce014044ea Fix reference bug in message catalog 2018-10-17 15:43:09 +09:00
nakanishi
1064e531f0 Adjust the fa icon position for the node with height 2018-10-17 10:31:47 +09:00
Nick O'Leary
dc3128fb3e Add node module into to sidebar and palette popover 2018-10-16 14:05:23 +01:00
HirokiUchikawa
51a3521834 Fix that unnecessary optionMenu remains 2018-10-16 19:48:50 +09:00
Nick O'Leary
d40aa7260f Mark all newly imported nodes as changed 2018-10-16 11:36:46 +01:00
Nick O'Leary
fc8c4063f2 Add markdown toolbar to flow description editor 2018-10-16 11:36:24 +01:00
Yuma Matsuura
f204c77ba3 Modify require paths 2018-10-16 12:38:39 +09:00
Nick O'Leary
7a8545273c Merge branch 'master' into dev 2018-10-15 11:37:14 +01:00
Nick O'Leary
6a9575e9f4 Merge pull request #1894 from node-red-hitachi/fix-overlapping-file-node-execution
fix multiple input message processing of file node
2018-10-15 03:15:05 -07:00
Nick O'Leary
c13e79e9c3 Merge pull request #1915 from kazuhitoyokoi/dev-addtestcases4themejs
Update test cases in theme_spec.js
2018-10-15 02:46:09 -07:00
Nick O'Leary
62088259ae Merge pull request #1924 from imZack/patch-1
Add missing comma
2018-10-15 02:39:29 -07:00
YuLun Shih
925ebcc06e Add missing comma 2018-10-12 14:50:45 -07:00
Nick O'Leary
a20eaf852f Merge pull request #1918 from node-red-hitachi/fix-i18n-for-safari
Fix i18n handling for ja-JP locale on Safari/MacOS
2018-10-11 14:21:20 -07:00
Arnaud Durand
84a6a5235e Add output type to mqtt node
Fixes #1912
2018-10-11 21:29:19 +02:00
Yuma Matsuura
8235b7b96d Followed runtime-editor split 2018-10-11 18:16:08 +09:00
Nick O'Leary
0376e0d711 Allow a node label to be hidden 2018-10-08 16:25:11 +01:00
Nick O'Leary
6bd0682e8c Better markdown editor preview 2018-10-07 14:24:32 +01:00
Nick O'Leary
e24c22f9be Merge branch 'master' into dev 2018-10-07 12:02:29 +01:00
Nick O'Leary
673a6bbe2c Do not disable context sidebar during node edit
Fixes #1921
2018-10-07 11:59:43 +01:00
Nick O'Leary
cf32a33984 Don't allow virtual links to be spliced
Fixes #1920
2018-10-07 11:55:43 +01:00
Nick O'Leary
f4ca8cd738 Merge branch 'master' into dev 2018-10-07 11:45:43 +01:00
Nick O'Leary
98c1bc276d Merge project package changes to avoid overwritten changes 2018-10-07 11:37:50 +01:00
Nick O'Leary
629536b562 Handle manually added project deps that are unused
Fixes #1908
2018-10-07 11:11:30 +01:00
Nick O'Leary
422109868d Add markdown toolbar to node description editor 2018-10-06 23:14:04 +01:00
Nick O'Leary
bcc7834650 Add markdown formatting toolbar 2018-10-05 17:56:54 +01:00
Nick O'Leary
1161e4f6c1 Add tooltips to debug elements 2018-10-05 17:56:42 +01:00
Hiroyasu Nishiyama
14435c24ac fix i18n handling for ja-JP locale on Safari/MacOS 2018-10-05 21:16:57 +09:00
Nick O'Leary
22ede79799 Add node body tooltip - limit to link nodes for now 2018-10-03 15:40:05 +01:00
Nick O'Leary
6cb3699ee9 Decrease opacity of flow-navigator 2018-10-03 14:13:36 +01:00
Nick O'Leary
6c65d3830e Move editor locales into editor-client package 2018-10-03 14:08:16 +01:00
Nick O'Leary
cdcf39fe82 Update tooltip style and add to some editor buttons 2018-10-03 14:02:07 +01:00
Hiroyasu Nishiyama
1441042458 update close & input handling of File node 2018-10-03 21:29:28 +09:00
Kazuhito Yokoi
71403e5acd Update test cases in theme_spec.js 2018-10-03 13:39:11 +09:00
Osamu Katada
3d70bc722a Add http-proxy for http-request node. 2018-10-03 09:58:25 +09:00
Nick O'Leary
b2f50da322 Create custom ace javascript mode to handle Function sig
Fixes #1911
2018-10-02 23:01:34 +01:00
Dave Conway-Jones
2a50c66df8 Merge branch 'dev' of https://github.com/node-red/node-red into dev 2018-10-02 18:56:22 +01:00
Dave Conway-Jones
8de47c0a6e delay node: report queue activity wehn in by topic mode 2018-10-02 18:56:17 +01:00
Nick O'Leary
023391e22a Merge pull request #1899 from node-red-hitachi/fa-icon
Added font-awesome icons to user defined icon
2018-10-02 14:59:13 +01:00
Nick O'Leary
a4ddfd404f Merge pull request #1906 from node-red/Allow-button-to-be-invisible
If debug set not to go to sidebar hide the button
2018-10-02 14:58:41 +01:00
Nick O'Leary
7307e558cb Merge pull request #1910 from kazuhitoyokoi/dev-updatejapanesemessages
Update Japanese message catalog
2018-10-02 14:57:31 +01:00
Nick O'Leary
47356f5221 Merge pull request #1909 from kazuhitoyokoi/dev-updatemessagecatalog
Add necessary p tag into English message catalog
2018-10-02 14:55:14 +01:00
Nick O'Leary
c6f8950b64 Merge pull request #1905 from node-red/ace-update
Update ACE to 1.4.1-src-min-noconflict
2018-10-02 14:54:52 +01:00
Hiroyasu Nishiyama
58c8311d56 make close handler argument only one 2018-10-02 20:37:30 +09:00
Kazuhito Yokoi
071f4eacde Update Japanese message catalog 2018-10-02 18:41:33 +09:00
Kazuhito Yokoi
f96bdc578e Add necessary </p> tag into English message catalog 2018-10-02 18:30:45 +09:00
Nick O'Leary
e03a0fffa9 Merge pull request #1907 from amilajack/patch-2
Change repo badge to point to master branch
2018-10-01 21:00:41 +01:00
Amila Welihinda
8e2c12f8d9 Change repo badge to point to master branch 2018-10-01 12:50:03 -07:00
Dave Conway-Jones
114420e8fd If debug set not to go to sidebar hide the button
Add button.visible function to view.js
Make status independant of tosidebar setting
2018-10-01 12:59:06 +01:00
nakanishi
ba49b2c681 Hide brand icons of font-awesome from icon tile 2018-10-01 18:39:43 +09:00
Nick O'Leary
5391fc962a Update ACE to 1.4.1-src-min-noconflict 2018-09-30 21:28:44 +01:00
Hiroyasu Nishiyama
7cec7ae608 invoke callbacks if async handler is specified 2018-09-30 22:30:19 +09:00
Nick O'Leary
d6211af5bd Cache node locales by language 2018-09-28 16:58:06 +01:00
Nick O'Leary
ef114e31c2 Look for core-node language files in the right location 2018-09-28 16:48:25 +01:00
Nick O'Leary
fd74a03479 Fix grunt dev monitoring of src 2018-09-28 16:21:49 +01:00
Nick O'Leary
428bf634e9 Merge pull request #1895 from node-red/Tidy-core-nodes
Tidy core nodes
2018-09-28 13:20:58 +01:00
Nick O'Leary
c49f722e4f Merge pull request #1891 from camlow325/resolve-example-path-for-windows-support
Resolve path when sending example file for Windows support
2018-09-28 13:18:53 +01:00
Nick O'Leary
d4d95a43b6 Merge pull request #1900 from kazuhitoyokoi/master-addtestcases4settings.js
Add test cases for red/api/editor/settings.js
2018-09-28 13:17:32 +01:00
nakanishi
8789d983ed Show icon element with either icon image or fa-icon 2018-09-28 17:07:55 +09:00
Nick O'Leary
10faa96bcf Exclude non-testable .js files from the unit tests 2018-09-27 15:09:49 +01:00
Nick O'Leary
42d31b9ee6 Move default settings back into node-red package 2018-09-27 15:01:10 +01:00
Dave Conway-Jones
c9dc9b4fe9 fix websocket feedback test - now doesn't spin 2018-09-26 16:03:22 +01:00
Hiroyasu Nishiyama
a345089c8b wait closing while penging messages exist 2018-09-26 12:39:12 +09:00
Kazuhito Yokoi
67c268e13d Add test cases for red/api/editor/settings.js 2018-09-26 10:22:01 +09:00
nakanishi
f13e02a1a9 Added font-awesome icons to user defined icon 2018-09-26 09:16:15 +09:00
Nick O'Leary
d887ab126b Add --safe mode flag to allow starting without flows running 2018-09-25 11:20:50 +01:00
Dave Conway-Jones
1a7868159a Split/join - add msg.reset to info panel 2018-09-25 08:43:53 +01:00
Dave Conway-Jones
c6a1c8e8c4 Fix corruption of websocket _session 2018-09-25 08:40:29 +01:00
Nick O'Leary
fba339f666 Prevent github from suppressing diffs 2018-09-24 22:02:18 +01:00
Nick O'Leary
09d41a9708 Merge pull request #1896 from node-red/delay-flush
Delay node - add msg.flush option
2018-09-24 21:53:28 +01:00
Nick O'Leary
ce85c8d986 Ensure all palette categories are opened properly
Closes #1893
2018-09-24 21:15:39 +01:00
Dave Conway-Jones
4630a162af Add msg.flush mode to delay node
to spew out contents rather than dump
(as per Trello item)
2018-09-23 17:31:11 +01:00
Dave Conway-Jones
fde157ff50 remove cr lf from incoming filename so easier to pass in results from exec node.
and add test
2018-09-23 10:36:50 +01:00
Dave Conway-Jones
51f875c02d reset join without sending part array
(thought this had been fixed already ?)
2018-09-23 10:35:47 +01:00
Dave Conway-Jones
f0957c838f add watched filename to msg.filename so can feed direct to file in node 2018-09-23 10:35:18 +01:00
Dave Conway-Jones
f5bebef37f websocket - preserve _session on msg but don't send as part of wholemsg 2018-09-23 10:34:22 +01:00
Nick O'Leary
80a15089b4 Add markdown-preview to expandable editor for ndoe descriptions 2018-09-21 17:21:04 +01:00
Jeremy Barlow
cb35604ef5 Resolve path when sending example file for Windows support
Previously, when trying to import an example into the flow editor on
Windows, the load attempt would fail with an HTTP 404 error in the
browser client, with a `TypeError: path must be absolute or specify
root to res.sendFile` error being written to the Node-RED log. This was
due to the path being passed to the `res.sendFile` function not being
fully-qualified (for example, `\Users\myuser\...\example.json`).

With the changes in this commit, the path to the example file is
resolved to a fully-qualified path before being passed into the
`res.sendFile` call. For example, a path on Windows of
`\Users\myuser\...\example.json` would be transformed to
`C:\\Users\\myuser\\...\\example.json` before being passed along to the
`sendFile` function. This change allows the file to be loaded and sent
properly to the browser client and for the embedded flows in the example
to be loaded in the flow editor.
2018-09-21 08:15:00 -07:00
Hiroyasu Nishiyama
61681bb1d6 lift processQ function 2018-09-21 23:02:45 +09:00
Nick O'Leary
8edf399631 Add set-package-version script to bump all version numbers 2018-09-21 14:27:56 +01:00
Nick O'Leary
d5ffd1432f Fix up version tests to handle tagged releases 2018-09-21 14:06:16 +01:00
Nick O'Leary
e73bf03615 Bump package to 0.20.0-alpha.0 to avoid accidental publish 2018-09-21 13:58:38 +01:00
Nick O'Leary
665fe0e01e Merge pull request #1890 from node-red/repackage
Restructure Node-RED into multiple modules
2018-09-21 13:50:31 +01:00
Hiroyasu Nishiyama
1a226c4dc6 fix multiple input message processing of file node 2018-09-21 21:07:44 +09:00
Nick O'Leary
a866aa9c18 Merge branch 'dev' into repackage 2018-09-21 11:47:34 +01:00
Nick O'Leary
d9089b798c Update info side bar with node description section 2018-09-21 11:38:48 +01:00
Nick O'Leary
d34ebd4d1b Fix i18n api changes in runtime/nodes 2018-09-18 10:31:44 +01:00
Hideki Nakamura
716aa74004 Fix code not to change settings.adminAuth 2018-09-17 10:18:36 -07:00
Nick O'Leary
2aae76c9bc Merge branch 'dev' into repackage 2018-09-17 14:49:11 +01:00
Nick O'Leary
5fc3ca0e23 Merge pull request #1884 from node-red-hitachi/dev-redirect-bugfix
Prohibit http-request node from sending cookies to the different domain when redirected
2018-09-17 14:15:18 +01:00
Dave Conway-Jones
5bb27109bf Config search (#1880)
* Let nodes be findable direct from config node info

* add link to search as <a> tag

* don't expose onclick in sidebar
2018-09-17 11:35:00 +01:00
Nick O'Leary
7406ab6017 Merge branch 'master' into dev 2018-09-17 11:33:36 +01:00
Nick O'Leary
08fccc4e77 Update for 0.19.4 2018-09-17 11:26:06 +01:00
Nick O'Leary
c1d50e82e1 Fix race condition in non-cache lfs context
Fixes #1888
2018-09-17 10:31:00 +01:00
Nick O'Leary
9777af7cb5 LocalFileSystem Context: Remove extra flush code 2018-09-16 22:04:09 +01:00
Hiroki Uchikawa
fd86035865 Prevent race condition (#1889)
* Make pending Flag to be deleted after write process complete.

* Prevent executing write process until the previous process is completed

* Fix to prevent file write race condition when closing file context

* Make flushing rerun if pendingWrites was added
2018-09-16 21:15:23 +01:00
Nick O'Leary
a8ec032553 Allow context store name to be provided in the key
For nodes that get/set context, when multiple stores are configured
they will not know to parse the store name from the key. So they
will pass the store name in the key, such as #:(store)::key.

Currently that will cause that full string to be used as the key
and the default context store used - which is wrong.

The code now parses out the store name from the key if it is set -
athough if the call to get/set does include the store argument, it
will take precedence.

This only applies when the key is a string - it doesn't apply when
an array of keys is provided.
2018-09-14 23:21:05 +01:00
Nick O'Leary
66ee27c5fa Switch node: only use promises when absolutely necessary
Fixes a significant performance regression introduced when the
node was made async-only with the persistent context work.
2018-09-14 14:03:36 +01:00
Nick O'Leary
17a737ca88 Fix dbl-click handling on webkit-based browsers
d3.event.buttons is not as widely supported as I thought. Can
change this one instance as it is inside a click handler so
d3.event.button will be defined instead
2018-09-14 11:09:56 +01:00
Nick O'Leary
f30ff7a2fd Redesign node edit dialog to tabbed style 2018-09-14 10:54:24 +01:00
Hideki Nakamura
c102828a99 Add some test cases 2018-09-11 10:36:54 -07:00
Hideki Nakamura
cb0e631b85 Update the implementation according to the Design notes 2018-09-11 09:44:18 -07:00
Nick O'Leary
75e7c0e50d Ensure context.flow/global cannot be deleted or enumerated 2018-09-10 22:30:51 +01:00
Osamu Katada
62b2adab78 Bugfix. http-request node 2018-09-10 10:47:05 +09:00
Nick O'Leary
fc0cf1ff51 Handle context.get with multiple levels of unknown key
Fixes #1883
2018-09-09 23:47:31 +01:00
Nick O'Leary
0f4d46671f Fix global.get("foo.bar") for functionGlobalContext set values 2018-09-09 11:07:44 +01:00
Kazuhito Yokoi
048f9c0294 Fix node color bug (#1877)
* Fix node color bug

* Add color property into sample node

* Revert view.js

* Add color handling into getNodeColor()
2018-09-08 22:41:38 +01:00
Nick O'Leary
0529eed0c9 Merge pull request #1856 from kazuhitoyokoi/master-nodedescriptionproperty
Add node description property UI
2018-09-07 12:23:41 +01:00
Nick O'Leary
ca77842b5b Merge pull request #1857 from cclauss/patch-1
Define raw_input() in Python 3 & fix time.sleep()
2018-09-06 22:59:48 +01:00
Nick O'Leary
8c169dc82b Add 'restart flows' option to deploy menu 2018-09-06 15:27:01 +01:00
Nick O'Leary
195342f7db Fix grunt dev actions for json files 2018-09-06 15:16:43 +01:00
Nick O'Leary
cfaaef7860 Merge branch 'dev' into repackage 2018-09-06 10:31:36 +01:00
Nick O'Leary
e939d5e96e Merge branch 'master' into dev 2018-09-06 10:28:07 +01:00
Hiroyasu Nishiyama
6fa8b7f5f1 fix persistable context handling of sort node & existing error in testcases 2018-09-05 16:04:12 +01:00
Nick O'Leary
a2d03c14ae Update CHANGELOG for 0.19.3 2018-09-05 09:49:09 +01:00
Dave Conway-Jones
c667a0e74c debug node - show ring at start until first msg 2018-09-05 09:45:34 +01:00
Dave Conway-Jones
8123828113 improve split node accumulation test to include early complete 2018-09-05 08:36:56 +01:00
Dave Conway-Jones
72b8dbb45b Split node - fix complete to send msg for k/v object
and update info to try to clarify.
2018-09-04 22:54:28 +01:00
Nick O'Leary
9f4628cf0a Merge pull request #1873 from node-red-hitachi/jp-fix-message
Fix message catalogue for projects
2018-09-04 21:59:26 +01:00
Nick O'Leary
ec4d24af91 Merge pull request #1872 from node-red-hitachi/uitest-mqtt
Add UI testing code for MQTT node
2018-09-04 21:58:29 +01:00
Dave Conway-Jones
7703875740 tidy split node merged object key typed input 2018-09-04 17:41:14 +01:00
Nick O'Leary
6442bb8a13 Set the JavaScript editor to full-screen 2018-09-04 13:30:06 +01:00
Nick O'Leary
51373f59e2 Merge branch 'dev' into repackage 2018-09-04 11:41:03 +01:00
Nick O'Leary
6cc56879d3 Merge branch 'master' into dev 2018-09-04 11:37:45 +01:00
Nick O'Leary
f29d7c9252 Fixup localfilesystem registry test 2018-09-04 11:37:04 +01:00
Nick O'Leary
2f7f53ed96 Filter global modules installed locally
If a module is found both locally and globally installed, the local
copy will take precedence. This will allow a user to upgrade a
node module that they may not otherwise be able to touch
2018-09-04 11:26:05 +01:00
Hiroyasu Nishiyama
da89460830 Update message catalogue for Projects 2018-09-04 15:08:43 +09:00
Yuma Matsuura
9e006d42bb Add UI testing code for mqtt node 2018-09-04 14:13:34 +09:00
Nick O'Leary
4c02bab4ee Merge branch 'dev' into repackage 2018-08-31 21:20:21 +01:00
Nick O'Leary
5800ed41f1 Handle expected closed status event in gpio tests 2018-08-31 21:19:26 +01:00
Nick O'Leary
18b5b4901f Merge branch 'dev' into repackage 2018-08-31 21:18:23 +01:00
Nick O'Leary
368418cf56 Merge branch 'master' into dev 2018-08-31 21:02:20 +01:00
Nick O'Leary
94031a52a5 Add svg to permitted icon extension list 2018-08-31 21:02:09 +01:00
Dave Conway-Jones
d67f91e7ed debug node - indicate status all the time if selected to do so 2018-08-31 16:31:08 +01:00
Nick O'Leary
3e6cadf3d8 Merge branch 'master' into dev 2018-08-31 11:26:54 +01:00
Nick O'Leary
f37697c4fb Merge pull request #1870 from natcl/json-schema
JSON node: fix schema validation for obj -> obj or str -> str
2018-08-31 11:25:31 +01:00
Nick O'Leary
0c5a76b391 Add env.get to Function node 2018-08-30 22:42:30 +01:00
Dave Conway-Jones
69448c7329 pi nodes - increase test coverage slightly 2018-08-30 20:54:03 +01:00
Dave Conway-Jones
8e9815fb91 TCP-request node - only write payload
to close #1869
2018-08-30 20:47:39 +01:00
Nick O'Leary
bf1afcfe8a Update grunt release task for new package structure
The task still creates .dist/node-red-xyz.zip as an archive
of the full release. It no longer creates .dist/node-red-xyz/ as
a directory containing the to-be-published module. Instead
npm publish should be run in each /packages/node_modules/**
directory in turn.
2018-08-30 15:28:24 +01:00
Nick O'Leary
2980818f0d Add inter-module dependencies to package.json 2018-08-30 12:56:31 +01:00
Nick O'Leary
9da58dbaf0 Move index.mst out of npmignored src dir 2018-08-30 12:44:33 +01:00
Nathanaël Lécaudé
4cdd7978cf JSON schema: remove unused function 2018-08-29 13:40:37 -04:00
Nathanaël Lécaudé
40d81358f4 JSON schema: perform validation when obj -> obj or str -> str 2018-08-29 13:36:28 -04:00
Nathanaël Lécaudé
c7b62aed91 JSON schema: add draft-06 support (via $schema keyword) 2018-08-29 12:20:04 -04:00
Nick O'Leary
55d71659f8 Merge branch 'master' into repackage 2018-08-29 09:55:40 +01:00
Stefan Machmeier
c0e7d6d826 Mqtt proxy configuration for websocket connection, #1651. 2018-08-29 09:53:07 +01:00
Nick O'Leary
f809377de8 Merge pull request #1854 from kazuhitoyokoi/master-fixtypointestcase4functionnode
Fix typo in test case
2018-08-28 21:19:48 +01:00
Nick O'Leary
9767bd9697 Merge pull request #1860 from node-red-hitachi/uitest-refactoring
Refactored UI testing code following a design note
2018-08-28 21:06:36 +01:00
Nick O'Leary
3a55528552 Merge pull request #1861 from SPIRIT-21/master
Allows MQTT Shared Subscriptions for MQTT-In core node
2018-08-28 21:04:53 +01:00
Nick O'Leary
56197ffe3a Merge pull request #1851 from t4skforce/patch-1
fixed some linting issues
2018-08-28 20:58:51 +01:00
Nick O'Leary
0f0d0c046c Merge pull request #1853 from node-red-hitachi/fix-icon-spec-for-typedInput
Fix use of HTML tag or CSS class specification as icon of TypedInput
2018-08-28 20:44:06 +01:00
Nick O'Leary
8d5b546763 Update module package versions 2018-08-28 13:57:04 +01:00
Nick O'Leary
19c9707d62 Get jdsoc tagging right for util module 2018-08-28 13:45:38 +01:00
nakanishi
ecc4973645 Fixed the problems that were caused by timing issue 2018-08-27 17:34:04 +09:00
Nick O'Leary
79e004a040 Merge branch 'master' into repackage 2018-08-24 14:13:09 +01:00
Nick O'Leary
3169f93cc2 Bump for 0.19.2 2018-08-24 13:25:02 +01:00
Nick O'Leary
c1a1a73599 Ensure node default color is used if palette.theme has no match 2018-08-24 13:08:49 +01:00
Nick O'Leary
48308db45b Rework jsdoc format and pull in jsdoc-nr-template 2018-08-24 13:02:06 +01:00
Nick O'Leary
3f37e96f78 Restore subflow category ui lost in the merge 2018-08-23 21:00:19 +01:00
Christopher Hiller
db1b0ccb79 fix lost messages / properties in TCPRequest Node; closes #1863 (#1864)
- Added some more checks around this.
- We're choosing to only use the latest message when sending, which is
  effectively what was happening before the queue implementation.
2018-08-23 08:50:51 +01:00
Lars Oldiges
df161ce672 Allows MQTT Shared Subscriptions for MQTT-In core node 2018-08-22 13:20:49 +02:00
Nick O'Leary
4e21a5e557 Start documenting apis 2018-08-22 10:00:03 +01:00
nakanishi
72fe30892e Refactor UI testing code following a design note 2018-08-22 14:36:30 +09:00
Nick O'Leary
19fa69811b Add LICENSE to each package 2018-08-21 13:57:59 +01:00
Nick O'Leary
0ddb4c625d Add README files to each package 2018-08-21 13:43:11 +01:00
Nick O'Leary
d373105b32 Fix typo in template.html 2018-08-21 13:42:51 +01:00
Nick O'Leary
36dc1d2f97 Move .npmignore into editor-client package 2018-08-20 22:04:29 +01:00
Nick O'Leary
11fa2cb35d Fixup registry/lib/localfilesystem_spec after locales move 2018-08-20 21:22:47 +01:00
Nick O'Leary
546f07156f Move node locales and tidy up package.json files 2018-08-20 20:31:29 +01:00
Nick O'Leary
7e7117632d Fixup grunt docs task 2018-08-20 17:03:38 +01:00
Nick O'Leary
954226da0d Fix up promises in tests, remove package-lock 2018-08-20 16:45:50 +01:00
Nick O'Leary
38a1291c5b Fixup all the tests 2018-08-20 16:17:24 +01:00
Nick O'Leary
998bf92ad4 Move tests to reflect package structure 2018-08-19 11:28:03 +01:00
Nick O'Leary
974ba40f28 Add scripts/verify-package-dependencies.js 2018-08-19 00:44:17 +01:00
Nick O'Leary
e57d8ba0ef pull out editor-client and editor-api 2018-08-17 22:10:54 +01:00
Nick O'Leary
6b79c6135f Merge branch 'master' into repackage 2018-08-16 20:43:15 +01:00
Nick O'Leary
28b311b7ed Improve error reporting from context plugin loading 2018-08-16 14:36:11 +01:00
Nick O'Leary
dcda513901 Prevent no-op edit of node marking as changed due to icon 2018-08-16 10:54:27 +01:00
Nick O'Leary
72c400794c Change node must handle empty rule set 2018-08-16 09:41:43 +01:00
Nick O'Leary
a747d8c2d5 Move core node icons into node package 2018-08-15 23:12:51 +01:00
Nick O'Leary
a3aec6b939 Merge branch 'master' into repackage 2018-08-15 20:46:56 +01:00
Nick O'Leary
042409f870 Update for 0.19.1 2018-08-15 15:33:24 +01:00
Nick O'Leary
5b8f4f4069 Pull in latest twitter node 2018-08-15 15:31:55 +01:00
Nick O'Leary
d132d63c1d Handle windows paths for context storage 2018-08-15 15:31:42 +01:00
cclauss
4374506981 Define raw_input() in Python 3 & fix time.sleep()
* __raw_input()__ was removed in Python 3 in favor of __input()__
* Fix __sleep()__ to match the import on line 22

[flake8](http://flake8.pycqa.org) testing of https://github.com/node-red/node-red on Python 3.7.0

$ __flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics__
```
./nodes/core/hardware/nrgpio.py:45:24: F821 undefined name 'raw_input'
                data = raw_input()
                       ^
./nodes/core/hardware/nrgpio.py:63:24: F821 undefined name 'raw_input'
                data = raw_input()
                       ^
./nodes/core/hardware/nrgpio.py:85:24: F821 undefined name 'raw_input'
                data = raw_input()
                       ^
./nodes/core/hardware/nrgpio.py:120:24: F821 undefined name 'raw_input'
                data = raw_input()
                       ^
./nodes/core/hardware/nrgpio.py:134:24: F821 undefined name 'raw_input'
                data = raw_input()
                       ^
./nodes/core/hardware/nrgpio.py:164:24: F821 undefined name 'raw_input'
                data = raw_input()
                       ^
./nodes/core/hardware/nrgpio.py:201:17: F821 undefined name 'time'
                time.sleep(10)
                ^
7     F821 undefined name 'raw_input'
7
```

@dceejay
2018-08-15 16:25:58 +02:00
Nick O'Leary
ef8b936069 Handle persisting objects with circular refs in context 2018-08-15 10:19:37 +01:00
Nick O'Leary
36e3bfffb4 Ensure js editor can expand to fill available space 2018-08-14 17:30:25 +01:00
Nick O'Leary
91a38bdb60 Add example localfilesystem contextStorage to settings 2018-08-14 16:28:59 +01:00
Nick O'Leary
f169a68319 Fix template node handling of nested context tags 2018-08-14 16:21:38 +01:00
Nick O'Leary
ee886f98dd Update dependencies 2018-08-13 11:19:05 +01:00
Nick O'Leary
a3826cc6a7 Bump version to 0.19 2018-08-13 11:06:38 +01:00
Nick O'Leary
ba33b832ba Info side putting info text in wrong pane 2018-08-13 11:05:33 +01:00
Nick O'Leary
f6c017176b Add core:toggle-navigator action 2018-08-13 11:04:34 +01:00
Nick O'Leary
7a01b115bb User settings view tab does not scroll properly 2018-08-13 11:03:55 +01:00
Nick O'Leary
1dc021e871 Improve custom context store module logging 2018-08-09 15:37:04 +01:00
Nick O'Leary
c9f916ebab Fixup context test case to block until context close completes 2018-08-09 15:36:43 +01:00
Nick O'Leary
ff627fd128 Fix localfilesystem clean handling 2018-08-09 14:39:20 +01:00
Kazuhito Yokoi
bba57f8d2b Add node description property UI 2018-08-06 21:39:37 +09:00
Kazuhito Yokoi
695873d35a Fix typo in test case for function node 2018-08-06 21:14:53 +09:00
Hiroyasu Nishiyama
15da19dcea fix use of HTML tag or CSS class specification as icon of typedInput 2018-08-06 10:28:02 +09:00
Nick O'Leary
4312a01707 remove editor/public 2018-08-04 22:30:41 +01:00
Nick O'Leary
ecd8f97d8b WIP: move all the code 2018-08-04 22:23:06 +01:00
t4skforce
d5bdc1600b fixed some linting issues
* added some semicolons
* removed double parsing of ```err.stack``` into ```var stack```
2018-07-31 22:54:15 +02:00
Nick O'Leary
dfa077fd5f Update package versions 2018-07-30 15:25:10 +01:00
Hideki Nakamura
b14a0e0dde Merge the logic for api access token to tokens.js so as not to change strategies.js 2018-07-10 17:25:01 -07:00
Hideki Nakamura
e982f5076f Merge branch '0.19' into api-access-token 2018-07-10 16:06:25 -07:00
Hideki Nakamura
42188b9f49 Merge branch '0.19' of https://github.com/node-red/node-red into api-access-token 2018-07-10 09:33:25 -07:00
Hideki Nakamura
50e2dcbcd5 Add a processing to check specified API Access Tokens 2018-07-05 18:58:02 -07:00
Hideki Nakamura
6104bb98f1 Merge remote-tracking branch 'upstream/0.19' into 0.19 2018-07-05 11:44:13 -07:00
1279 changed files with 107912 additions and 45060 deletions

1
.gitattributes vendored Normal file
View File

@@ -0,0 +1 @@
/packages/node_modules/** linguist-generated=false

View File

@@ -28,7 +28,8 @@ To help us understand the issue, please fill-in as much of the following informa
### Please tell us about your environment:
- [ ] Node-RED version:
- [ ] node.js version:
- [ ] Node.js version:
- [ ] npm version:
- [ ] Platform/OS:
- [ ] Browser:
- [ ] running in Docker:

39
.github/ISSUE_TEMPLATE/--bug_report.md vendored Normal file
View File

@@ -0,0 +1,39 @@
---
name: Bug report
about: Reproducible software issues in the core of Node-RED
title: ''
labels: ''
assignees: ''
---
<!--
This issue tracker is for problems with the Node-RED runtime, the editor or the core nodes.
If your issue is:
- a general 'how-to' type question,
- a feature request or suggestion for a change,
- or problems with 3rd party (`node-red-contrib-`) nodes
please use the [Node-RED Forum](https://discourse.nodered.org) or [slack team](https://nodered.org/slack).
You could also consider asking a question on [Stack Overflow](https://stackoverflow.com/questions/tagged/node-red) and tag it `node-red`.
That way the whole Node-RED user community can help, rather than rely on the core development team.
To help us understand the issue, please fill-in as much of the following information as you can:
-->
### What are the steps to reproduce?
### What happens?
### What do you expect to happen?
### Please tell us about your environment:
- [ ] Node-RED version:
- [ ] Node.js version:
- [ ] npm version:
- [ ] Platform/OS:
- [ ] Browser:

View File

@@ -0,0 +1,17 @@
---
name: Anything Else
about: Something that is not a bug report
title: ''
labels: ''
assignees: ''
---
Please DO NOT raise an issue.
We DO NOT use the issue tracker for general support or feature requests. Only bug reports should be raised here using the 'Bug report' template.
For general support, please use the [Node-RED Forum](https://discourse.nodered.org) or [slack team](https://nodered.org/slack). You could also consider asking a question on [Stack Overflow](https://stackoverflow.com/questions/tagged/node-red) and tag it `node-red`.
That way the whole Node-RED user community can help, rather than rely on the core development team.
For feature requests, please use the Node-RED Forum](https://discourse.nodered.org). Many ideas have already been discussed there and you should search that for your request before starting a new discussion.

View File

@@ -29,6 +29,6 @@ the [forum](https://discourse.nodered.org) or
<!-- Put an `x` in the boxes that apply -->
- [ ] I have read the [contribution guidelines](https://github.com/node-red/node-red/blob/master/CONTRIBUTING.md)
- [ ] For non-bugfix PRs, I have discussed this change on the mailing list/slack team.
- [ ] For non-bugfix PRs, I have discussed this change on the forum/slack team.
- [ ] I have run `grunt` to verify the unit tests pass
- [ ] I have added suitable unit tests to cover the new/changed functionality

View File

@@ -0,0 +1,29 @@
const fs = require("fs");
const newVersion = require("../../package.json").version;
if (process.env.GITHUB_REF !== "refs/tags/"+newVersion) {
console.log(`GITHUB_REF doesn't match the package.json version: ${process.env.GITHUB_REF} !== ${newVersion}`);
process.exit(0);
}
if (!/^\d+\.\d+\.\d+$/.test(newVersion)) {
console.log(`Not updating for a non-stable release - ${newVersion}`);
process.exit(0);
}
const currentVersion = require("../../../node-red-docker/package.json").version;
console.log(`Update from ${currentVersion} to ${newVersion}`)
updateFile(__dirname+"/../../../node-red-docker/package.json", currentVersion, newVersion);
updateFile(__dirname+"/../../../node-red-docker/docker-custom/package.json", currentVersion, newVersion);
updateFile(__dirname+"/../../../node-red-docker/README.md", currentVersion, newVersion);
console.log(`::set-env name=newVersion::${newVersion}`);
function updateFile(path,from,to) {
let contents = fs.readFileSync(path,"utf8");
contents = contents.replace(new RegExp(from.replace(/\./g,"\\."),"g"), to);
fs.writeFileSync(path, contents);
}

View File

@@ -0,0 +1,18 @@
const fs = require("fs");
const newVersion = require("../../package.json").version;
if (process.env.GITHUB_REF !== "refs/tags/"+newVersion) {
console.log(`GITHUB_REF doesn't match the package.json version: ${process.env.GITHUB_REF} !== ${newVersion}`);
process.exit(0);
}
if (!/^\d+\.\d+\.\d+$/.test(newVersion)) {
console.log(`Not updating for a non-stable release - ${newVersion}`);
process.exit(0);
}
const path = __dirname+"/../../../node-red.github.io/index.html";
let contents = fs.readFileSync(path, "utf8");
contents = contents.replace(/<span class="node-red-latest-version">v\d+\.\d+\.\d+<\/span>/, `<span class="node-red-latest-version">v${newVersion}<\/span>` );
fs.writeFileSync(path, contents);

59
.github/workflows/build.yml vendored Normal file
View File

@@ -0,0 +1,59 @@
name: PublishDockerImage
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
on:
release:
types: [published]
jobs:
generate:
name: 'Update node-red-docker image'
runs-on: ubuntu-latest
steps:
- name: Check out node-red repository
uses: actions/checkout@v2
with:
path: 'node-red'
- name: Check out node-red-docker repository
uses: actions/checkout@v2
with:
repository: 'node-red/node-red-docker'
path: 'node-red-docker'
- name: Check out node-red.github.io repository
uses: actions/checkout@v2
with:
repository: 'node-red/node-red.github.io'
path: 'node-red.github.io'
- uses: actions/setup-node@v1
with:
node-version: '12'
- run: node ./node-red/.github/scripts/update-node-red-docker.js
- name: Create Docker Pull Request
uses: peter-evans/create-pull-request@v2
with:
token: ${{ secrets.NR_REPO_TOKEN }}
committer: GitHub <noreply@github.com>
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
path: 'node-red-docker'
commit-message: 'Bump to ${{ env.newVersion }}'
title: '🚀 Update to Node-RED ${{ env.newVersion }} release'
body: |
Updates the Node-RED Docker repo for the ${{ env.newVersion }} release.
Once this is merged, you will need to create a new release with the tag `v${{ env.newVersion }}`.
This PR was auto-generated by a GitHub Action. Any questions, speak to @knolleary
- run: node ./node-red/.github/scripts/update-node-red-website.js
- name: Create Website Pull Request
uses: peter-evans/create-pull-request@v2
with:
token: ${{ secrets.NR_REPO_TOKEN }}
committer: GitHub <noreply@github.com>
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
path: 'node-red.github.io'
commit-message: 'Bump to ${{ env.newVersion }}'
title: '🚀 Update to Node-RED ${{ env.newVersion }} release'
body: |
Updates the Node-RED Website repo for the ${{ env.newVersion }} release.
This PR was auto-generated by a GitHub Action. Any questions, speak to @knolleary

10
.gitignore vendored
View File

@@ -7,7 +7,9 @@
.sessions.json
.settings
.tern-project
.i18n-editor-metadata
*.backup
*.bak
*_cred*
coverage
credentials.json
@@ -17,3 +19,11 @@ node_modules
public
locales/zz-ZZ
nodes/core/locales/zz-ZZ
!packages/node_modules
packages/node_modules/@node-red/editor-client/public
!test/**/node_modules
docs
!packages/node_modules/**/docs
.vscode
.nyc_output
sync.ffs_db

View File

@@ -1,5 +1,4 @@
/Gruntfile.js
/.git/*
/lib/*
*.backup
/public/*

View File

@@ -1,7 +0,0 @@
.settings
.jshintignore
.jshintrc
.project
.tern-project
.travis.yml
.git

View File

@@ -1,12 +1,21 @@
sudo: false
addons:
chrome: stable
language: node_js
matrix:
include:
- node_js: "14"
script:
- ./node_modules/.bin/grunt && ( cat coverage/lcov.info | $(npm get prefix)/bin/coveralls || true ) && rm -rf coverage
# - scripts/install-ui-test-dependencies.sh && grunt test-ui
before_script:
- npm install -g coveralls
- node_js: "12"
script:
- ./node_modules/.bin/grunt no-coverage
- node_js: "10"
script:
- ./node_modules/.bin/grunt && istanbul report text && ( cat coverage/lcov.info | $(npm get prefix)/bin/coveralls || true ) && rm -rf coverage
before_script:
- npm install -g istanbul coveralls
- node_js: "8"
- node_js: "6"
- node_js: "4"
- ./node_modules/.bin/grunt no-coverage
#- node_js: "8"
# script:
# - ./node_modules/.bin/grunt no-coverage

15
API.md Normal file
View File

@@ -0,0 +1,15 @@
Node-RED Modules
---
Node-RED provides a set of node modules that implement different parts of the
application.
Module | Description
-------|-------
[node-red](node-red.html) | the main module that pulls together all of the internal modules and provides the executable version of Node-RED
[@node-red/editor-api](@node-red_editor-api.html) | an Express application that serves the Node-RED editor and provides the Admin HTTP API
[@node-red/runtime](@node-red_runtime.html) | the core runtime of Node-RED
[@node-red/util](@node-red_util.html) | common utilities for the Node-RED runtime and editor modules
[@node-red/registry](@node-red_registry.html) | the internal node registry
@node-red/nodes | the default set of core nodes
@node-red/editor-client | the client-side resources of the Node-RED editor application

File diff suppressed because it is too large Load Diff

View File

@@ -26,7 +26,7 @@ relevant nodes, press Ctrl-E and copy the flow data from the Export dialog.
At a minimum, please include:
- Version of Node-RED - either release number if you downloaded a zip, or the first few lines of `git log` if you are cloning the repository directly.
- Version of node.js - what does `node -v` say?
- Version of Node.js - what does `node -v` say?
## Feature requests

View File

@@ -15,18 +15,30 @@
**/
var path = require("path");
var fs = require("fs-extra");
var sass = require("node-sass");
module.exports = function(grunt) {
var nodemonArgs = ["-v"];
var nodemonArgs = ["-V"];
var flowFile = grunt.option('flowFile');
if (flowFile) {
nodemonArgs.push(flowFile);
process.env.NODE_RED_ENABLE_PROJECTS=false;
}
var userDir = grunt.option('userDir');
if (userDir) {
nodemonArgs.push("-u");
nodemonArgs.push(userDir);
}
var browserstack = grunt.option('browserstack');
if (browserstack) {
process.env.BROWSERSTACK = true;
}
var nonHeadless = grunt.option('non-headless');
if (nonHeadless) {
process.env.NODE_RED_NON_HEADLESS = 'true';
process.env.NODE_RED_NON_HEADLESS = true;
}
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
@@ -41,8 +53,8 @@ module.exports = function(grunt) {
ui: 'bdd',
reporter: 'spec'
},
all: { src: ['test/**/*_spec.js'] },
core: { src: ["test/_spec.js","test/red/**/*_spec.js"]},
all: { src: ["test/unit/_spec.js","test/unit/**/*_spec.js","test/nodes/**/*_spec.js"] },
core: { src: ["test/unit/_spec.js","test/unit/**/*_spec.js"]},
nodes: { src: ["test/nodes/**/*_spec.js"]}
},
webdriver: {
@@ -50,18 +62,19 @@ module.exports = function(grunt) {
configFile: 'test/editor/wdio.conf.js'
}
},
mocha_istanbul: {
nyc: {
options: {
globals: ['expect'],
timeout: 3000,
ignoreLeaks: false,
ui: 'bdd',
reportFormats: ['lcov','html'],
print: 'both'
cwd: '.',
include: ['packages/node_modules/**'],
excludeNodeModules: false,
exclude: ['packages/node_modules/@node-red/editor-client/**'],
reporter: ['lcov', 'html','text-summary'],
reportDir: 'coverage',
all: true
},
all: { src: ["test/_spec.js","test/red/**/*_spec.js","test/nodes/**/*_spec.js"] },
core: { src: ["test/_spec.js","test/red/**/*_spec.js"]},
nodes: { src: ["test/nodes/**/*_spec.js"]}
all: { cmd: false, args: ['grunt', 'simplemocha:all'] },
core: { options: { exclude:['packages/node_modules/@node-red/editor-client/**', 'packages/node_modules/@node-red/nodes/**']},cmd: false, args: ['grunt', 'simplemocha:core'] },
nodes: { cmd: false, args: ['grunt', 'simplemocha:nodes'] }
},
jshint: {
options: {
@@ -77,22 +90,20 @@ module.exports = function(grunt) {
//"loopfunc": true, // allow functions to be defined in loops
//"sub": true // don't warn that foo['bar'] should be written as foo.bar
},
all: [
'Gruntfile.js',
'red.js',
'red/**/*.js',
'nodes/core/*/*.js',
'editor/js/**/*.js'
],
core: {
files: {
src: [
'Gruntfile.js',
'red.js',
'red/**/*.js'
]
}
},
// all: [
// 'Gruntfile.js',
// 'red.js',
// 'packages/**/*.js'
// ],
// core: {
// files: {
// src: [
// 'Gruntfile.js',
// 'red.js',
// 'packages/**/*.js',
// ]
// }
// },
nodes: {
files: {
src: [ 'nodes/core/*/*.js' ]
@@ -100,7 +111,7 @@ module.exports = function(grunt) {
},
editor: {
files: {
src: [ 'editor/js/**/*.js' ]
src: [ 'packages/node_modules/@node-red/editor-client/src/js/**/*.js' ]
}
},
tests: {
@@ -120,81 +131,96 @@ module.exports = function(grunt) {
src: [
// Ensure editor source files are concatenated in
// the right order
"editor/js/red.js",
"editor/js/events.js",
"editor/js/i18n.js",
"editor/js/settings.js",
"editor/js/user.js",
"editor/js/comms.js",
"editor/js/text/bidi.js",
"editor/js/text/format.js",
"editor/js/ui/state.js",
"editor/js/nodes.js",
"editor/js/history.js",
"editor/js/validators.js",
"editor/js/ui/utils.js",
"editor/js/ui/common/editableList.js",
"editor/js/ui/common/checkboxSet.js",
"editor/js/ui/common/menu.js",
"editor/js/ui/common/panels.js",
"editor/js/ui/common/popover.js",
"editor/js/ui/common/searchBox.js",
"editor/js/ui/common/tabs.js",
"editor/js/ui/common/stack.js",
"editor/js/ui/common/typedInput.js",
"editor/js/ui/actions.js",
"editor/js/ui/deploy.js",
"editor/js/ui/diff.js",
"editor/js/ui/keyboard.js",
"editor/js/ui/workspaces.js",
"editor/js/ui/view.js",
"editor/js/ui/view-navigator.js",
"editor/js/ui/sidebar.js",
"editor/js/ui/palette.js",
"editor/js/ui/tab-info.js",
"editor/js/ui/tab-config.js",
"editor/js/ui/tab-context.js",
"editor/js/ui/palette-editor.js",
"editor/js/ui/editor.js",
"editor/js/ui/editors/*.js",
"editor/js/ui/tray.js",
"editor/js/ui/clipboard.js",
"editor/js/ui/library.js",
"editor/js/ui/notifications.js",
"editor/js/ui/search.js",
"editor/js/ui/typeSearch.js",
"editor/js/ui/subflow.js",
"editor/js/ui/userSettings.js",
"editor/js/ui/projects/projects.js",
"editor/js/ui/projects/projectSettings.js",
"editor/js/ui/projects/projectUserSettings.js",
"editor/js/ui/projects/tab-versionControl.js",
"editor/js/ui/touch/radialMenu.js"
"packages/node_modules/@node-red/editor-client/src/js/polyfills.js",
"packages/node_modules/@node-red/editor-client/src/js/jquery-addons.js",
"packages/node_modules/@node-red/editor-client/src/js/red.js",
"packages/node_modules/@node-red/editor-client/src/js/events.js",
"packages/node_modules/@node-red/editor-client/src/js/i18n.js",
"packages/node_modules/@node-red/editor-client/src/js/settings.js",
"packages/node_modules/@node-red/editor-client/src/js/user.js",
"packages/node_modules/@node-red/editor-client/src/js/comms.js",
"packages/node_modules/@node-red/editor-client/src/js/text/bidi.js",
"packages/node_modules/@node-red/editor-client/src/js/text/format.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/state.js",
"packages/node_modules/@node-red/editor-client/src/js/plugins.js",
"packages/node_modules/@node-red/editor-client/src/js/nodes.js",
"packages/node_modules/@node-red/editor-client/src/js/font-awesome.js",
"packages/node_modules/@node-red/editor-client/src/js/history.js",
"packages/node_modules/@node-red/editor-client/src/js/validators.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/utils.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/common/editableList.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/common/treeList.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/common/checkboxSet.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/common/menu.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/common/panels.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/common/popover.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/common/searchBox.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/common/tabs.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/common/stack.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/common/typedInput.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/common/toggleButton.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/common/colorPicker.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/actions.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/deploy.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/diff.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/keyboard.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/workspaces.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/statusBar.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/view.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/view-navigator.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/view-tools.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/sidebar.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/palette.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/tab-info.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/tab-info-outliner.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/tab-help.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/tab-config.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/tab-context.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/palette-editor.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/editor.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/editors/*.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/event-log.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/tray.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/clipboard.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/library.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/notifications.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/search.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/actionList.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/typeSearch.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/subflow.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/group.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/userSettings.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/projects/projects.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/projects/projectSettings.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/projects/projectUserSettings.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/projects/tab-versionControl.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/touch/radialMenu.js"
],
dest: "public/red/red.js"
dest: "packages/node_modules/@node-red/editor-client/public/red/red.js"
},
vendor: {
files: {
"public/vendor/vendor.js": [
"editor/vendor/jquery/js/jquery-1.11.3.min.js",
"editor/vendor/bootstrap/js/bootstrap.min.js",
"editor/vendor/jquery/js/jquery-ui-1.10.3.custom.min.js",
"editor/vendor/jquery/js/jquery.ui.touch-punch.min.js",
"editor/vendor/marked/marked.min.js",
"editor/vendor/d3/d3.v3.min.js",
"editor/vendor/i18next/i18next.min.js"
],
"public/vendor/vendor.css": [
// TODO: resolve relative resource paths in
// bootstrap/FA/jquery
],
"public/vendor/jsonata/jsonata.min.js": [
"packages/node_modules/@node-red/editor-client/public/vendor/vendor.js": [
"packages/node_modules/@node-red/editor-client/src/vendor/jquery/js/jquery-3.5.1.min.js",
"packages/node_modules/@node-red/editor-client/src/vendor/jquery/js/jquery-migrate-3.3.0.min.js",
"packages/node_modules/@node-red/editor-client/src/vendor/jquery/js/jquery-ui.min.js",
"packages/node_modules/@node-red/editor-client/src/vendor/jquery/js/jquery.ui.touch-punch.min.js",
"node_modules/marked/marked.min.js",
"node_modules/dompurify/dist/purify.min.js",
"packages/node_modules/@node-red/editor-client/src/vendor/d3/d3.v3.min.js",
"packages/node_modules/@node-red/editor-client/src/vendor/i18next/i18next.min.js",
"node_modules/jsonata/jsonata-es5.min.js",
"editor/vendor/jsonata/formatter.js"
"packages/node_modules/@node-red/editor-client/src/vendor/jsonata/formatter.js",
"packages/node_modules/@node-red/editor-client/src/vendor/ace/ace.js",
"packages/node_modules/@node-red/editor-client/src/vendor/ace/ext-language_tools.js",
],
"public/vendor/ace/worker-jsonata.js": [
// "packages/node_modules/@node-red/editor-client/public/vendor/vendor.css": [
// // TODO: resolve relative resource paths in
// // bootstrap/FA/jquery
// ],
"packages/node_modules/@node-red/editor-client/public/vendor/ace/worker-jsonata.js": [
"node_modules/jsonata/jsonata-es5.min.js",
"editor/vendor/jsonata/worker-jsonata.js"
"packages/node_modules/@node-red/editor-client/src/vendor/jsonata/worker-jsonata.js"
]
}
}
@@ -202,63 +228,60 @@ module.exports = function(grunt) {
uglify: {
build: {
files: {
'public/red/red.min.js': 'public/red/red.js',
'public/red/main.min.js': 'public/red/main.js',
'public/vendor/ace/mode-jsonata.js': 'editor/vendor/jsonata/mode-jsonata.js',
'public/vendor/ace/snippets/jsonata.js': 'editor/vendor/jsonata/snippets-jsonata.js'
'packages/node_modules/@node-red/editor-client/public/red/red.min.js': 'packages/node_modules/@node-red/editor-client/public/red/red.js',
'packages/node_modules/@node-red/editor-client/public/red/main.min.js': 'packages/node_modules/@node-red/editor-client/public/red/main.js',
'packages/node_modules/@node-red/editor-client/public/vendor/ace/mode-jsonata.js': 'packages/node_modules/@node-red/editor-client/src/vendor/jsonata/mode-jsonata.js',
'packages/node_modules/@node-red/editor-client/public/vendor/ace/snippets/jsonata.js': 'packages/node_modules/@node-red/editor-client/src/vendor/jsonata/snippets-jsonata.js'
}
}
},
sass: {
build: {
options: {
implementation: sass,
outputStyle: 'compressed'
},
files: [{
dest: 'public/red/style.min.css',
src: 'editor/sass/style.scss'
},
{
dest: 'public/vendor/bootstrap/css/bootstrap.min.css',
src: 'editor/vendor/bootstrap/css/bootstrap.css'
dest: 'packages/node_modules/@node-red/editor-client/public/red/style.min.css',
src: 'packages/node_modules/@node-red/editor-client/src/sass/style.scss'
}]
}
},
jsonlint: {
messages: {
src: [
'nodes/core/locales/en-US/messages.json',
'red/api/locales/en-US/editor.json',
'red/runtime/locales/en-US/runtime.json'
'packages/node_modules/@node-red/nodes/locales/**/*.json',
'packages/node_modules/@node-red/editor-client/locales/**/*.json',
'packages/node_modules/@node-red/runtime/locales/**/*.json'
]
},
keymaps: {
src: [
'editor/js/keymap.json'
'packages/node_modules/@node-red/editor-client/src/js/keymap.json'
]
}
},
attachCopyright: {
js: {
src: [
'public/red/red.min.js',
'public/red/main.min.js'
'packages/node_modules/@node-red/editor-client/public/red/red.min.js',
'packages/node_modules/@node-red/editor-client/public/red/main.min.js'
]
},
css: {
src: [
'public/red/style.min.css'
'packages/node_modules/@node-red/editor-client/public/red/style.min.css'
]
}
},
clean: {
build: {
src: [
"public/red",
"public/index.html",
"public/favicon.ico",
"public/icons",
"public/vendor"
"packages/node_modules/@node-red/editor-client/public/red",
"packages/node_modules/@node-red/editor-client/public/index.html",
"packages/node_modules/@node-red/editor-client/public/favicon.ico",
"packages/node_modules/@node-red/editor-client/public/icons",
"packages/node_modules/@node-red/editor-client/public/vendor"
]
},
release: {
@@ -270,27 +293,27 @@ module.exports = function(grunt) {
watch: {
js: {
files: [
'editor/js/**/*.js'
'packages/node_modules/@node-red/editor-client/src/js/**/*.js'
],
tasks: ['copy:build','concat','uglify','attachCopyright:js']
tasks: ['copy:build','concat',/*'uglify',*/ 'attachCopyright:js']
},
sass: {
files: [
'editor/sass/**/*.scss'
'packages/node_modules/@node-red/editor-client/src/sass/**/*.scss'
],
tasks: ['sass','attachCopyright:css']
},
json: {
files: [
'nodes/core/locales/en-US/messages.json',
'red/api/locales/en-US/editor.json',
'red/runtime/locales/en-US/runtime.json'
'packages/node_modules/@node-red/nodes/locales/**/*.json',
'packages/node_modules/@node-red/editor-client/locales/**/*.json',
'packages/node_modules/@node-red/runtime/locales/**/*.json'
],
tasks: ['jsonlint:messages']
},
keymaps: {
files: [
'editor/js/keymap.json'
'packages/node_modules/@node-red/editor-client/src/js/keymap.json'
],
tasks: ['jsonlint:keymaps','copy:build']
},
@@ -305,12 +328,13 @@ module.exports = function(grunt) {
nodemon: {
/* uses .nodemonignore */
dev: {
script: 'red.js',
script: 'packages/node_modules/node-red/red.js',
options: {
args: nodemonArgs,
ext: 'js,html,json',
watch: [
'red','nodes'
'packages/node_modules',
'!packages/node_modules/@node-red/editor-client'
]
}
}
@@ -329,69 +353,56 @@ module.exports = function(grunt) {
build: {
files:[
{
src: 'editor/js/main.js',
dest: 'public/red/main.js'
src: 'packages/node_modules/@node-red/editor-client/src/js/main.js',
dest: 'packages/node_modules/@node-red/editor-client/public/red/main.js'
},
{
src: 'editor/js/keymap.json',
dest: 'public/red/keymap.json'
src: 'packages/node_modules/@node-red/editor-client/src/js/keymap.json',
dest: 'packages/node_modules/@node-red/editor-client/public/red/keymap.json'
},
{
cwd: 'editor/images',
cwd: 'packages/node_modules/@node-red/editor-client/src/images',
src: '**',
expand: true,
dest: 'public/red/images/'
dest: 'packages/node_modules/@node-red/editor-client/public/red/images/'
},
{
cwd: 'editor/vendor',
cwd: 'packages/node_modules/@node-red/editor-client/src/vendor',
src: [
'ace/**',
//'bootstrap/css/**',
'bootstrap/img/**',
'jquery/css/**',
'jquery/css/base/**',
'font-awesome/**'
],
expand: true,
dest: 'public/vendor/'
dest: 'packages/node_modules/@node-red/editor-client/public/vendor/'
},
{
cwd: 'editor/icons',
cwd: 'packages/node_modules/@node-red/editor-client/src/icons',
src: '**',
expand: true,
dest: 'public/icons/'
dest: 'packages/node_modules/@node-red/editor-client/public/icons/'
},
{
expand: true,
src: ['editor/index.html','editor/favicon.ico'],
dest: 'public/',
src: ['packages/node_modules/@node-red/editor-client/src/index.html','packages/node_modules/@node-red/editor-client/src/favicon.ico'],
dest: 'packages/node_modules/@node-red/editor-client/public/',
flatten: true
},
{
src: 'CHANGELOG.md',
dest: 'public/red/about'
dest: 'packages/node_modules/@node-red/editor-client/public/red/about'
},
{
src: 'CHANGELOG.md',
dest: 'packages/node_modules/node-red/'
},
{
cwd: 'packages/node_modules/@node-red/editor-client/src/ace/bin/',
src: '**',
expand: true,
dest: 'packages/node_modules/@node-red/editor-client/public/vendor/ace/'
}
]
},
release: {
files: [{
mode: true,
expand: true,
src: [
'*.md',
'LICENSE',
'package.json',
'settings.js',
'red.js',
'lib/.gitignore',
'nodes/*.demo',
'nodes/core/**',
'red/**',
'public/**',
'editor/templates/**',
'bin/**'
],
dest: path.resolve('<%= paths.dist %>/node-red-<%= pkg.version %>')
}]
}
},
chmod: {
@@ -400,37 +411,94 @@ module.exports = function(grunt) {
},
release: {
src: [
path.resolve('<%= paths.dist %>/node-red-<%= pkg.version %>/nodes/core/hardware/nrgpio*'),
path.resolve('<%= paths.dist %>/node-red-<%= pkg.version %>/red/runtime/storage/localfilesystem/projects/git/node-red-*sh')
"packages/node_modules/@node-red/nodes/core/hardware/nrgpio",
"packages/node_modules/@node-red/runtime/lib/storage/localfilesystem/projects/git/node-red-*sh"
]
}
},
'npm-command': {
options: {
cmd: "pack",
cwd: "<%= paths.dist %>/modules"
},
'node-red': { options: { args: [__dirname+'/packages/node_modules/node-red'] } },
'@node-red/editor-api': { options: { args: [__dirname+'/packages/node_modules/@node-red/editor-api'] } },
'@node-red/editor-client': { options: { args: [__dirname+'/packages/node_modules/@node-red/editor-client'] } },
'@node-red/nodes': { options: { args: [__dirname+'/packages/node_modules/@node-red/nodes'] } },
'@node-red/registry': { options: { args: [__dirname+'/packages/node_modules/@node-red/registry'] } },
'@node-red/runtime': { options: { args: [__dirname+'/packages/node_modules/@node-red/runtime'] } },
'@node-red/util': { options: { args: [__dirname+'/packages/node_modules/@node-red/util'] } }
},
mkdir: {
release: {
options: {
create: ['<%= paths.dist %>/modules']
},
},
},
compress: {
release: {
options: {
archive: '<%= paths.dist %>/node-red-<%= pkg.version %>.zip'
},
expand: true,
cwd: '<%= paths.dist %>/',
src: ['node-red-<%= pkg.version %>/**']
cwd: 'packages/node_modules/',
src: [
'**',
'!@node-red/editor-client/src/**'
]
}
},
jsdoc : {
runtimeAPI: {
src: 'red/runtime-api/*.js',
modules: {
src: [
'API.md',
'packages/node_modules/node-red/lib/red.js',
'packages/node_modules/@node-red/runtime/lib/index.js',
'packages/node_modules/@node-red/runtime/lib/api/*.js',
'packages/node_modules/@node-red/runtime/lib/events.js',
'packages/node_modules/@node-red/runtime/lib/hooks.js',
'packages/node_modules/@node-red/util/**/*.js',
'packages/node_modules/@node-red/editor-api/lib/index.js',
'packages/node_modules/@node-red/editor-api/lib/auth/index.js',
'packages/node_modules/@node-red/registry/lib/index.js'
],
options: {
destination: 'docs',
configure: './jsdoc.json'
}
},
_editor: {
src: [
'packages/node_modules/@node-red/editor-client/src/js'
],
options: {
destination: 'packages/node_modules/@node-red/editor-client/docs',
configure: './jsdoc.json'
}
}
},
jsdoc2md: {
runtimeAPI: {
options: {
separators: true
},
src: 'red/runtime-api/*.js',
dest: 'docs/runtime-api.md'
src: [
'packages/node_modules/@node-red/runtime/lib/index.js',
'packages/node_modules/@node-red/runtime/lib/api/*.js',
'packages/node_modules/@node-red/runtime/lib/events.js'
],
dest: 'packages/node_modules/@node-red/runtime/docs/api.md'
},
nodeREDUtil: {
options: {
separators: true
},
src: 'packages/node_modules/@node-red/util/**/*.js',
dest: 'packages/node_modules/@node-red/util/docs/api.md'
}
}
});
@@ -443,15 +511,37 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-concurrent');
grunt.loadNpmTasks('grunt-sass');
grunt.loadNpmTasks('grunt-nodemon');
grunt.loadNpmTasks('grunt-contrib-compress');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-chmod');
grunt.loadNpmTasks('grunt-jsonlint');
grunt.loadNpmTasks('grunt-mocha-istanbul');
grunt.loadNpmTasks('grunt-webdriver');
if (fs.existsSync(path.join("node_modules", "grunt-webdriver"))) {
grunt.loadNpmTasks('grunt-webdriver');
}
grunt.loadNpmTasks('grunt-jsdoc');
grunt.loadNpmTasks('grunt-jsdoc-to-markdown');
grunt.loadNpmTasks('grunt-npm-command');
grunt.loadNpmTasks('grunt-mkdir');
grunt.loadNpmTasks('grunt-simple-nyc');
grunt.registerMultiTask('nodemon', 'Runs a nodemon monitor of your node.js server.', function () {
const nodemon = require('nodemon');
this.async();
const options = this.options();
options.script = this.data.script;
let callback;
if (options.callback) {
callback = options.callback;
delete options.callback;
} else {
callback = function(nodemonApp) {
nodemonApp.on('log', function (event) {
console.log(event.colour);
});
};
}
callback(nodemon(options));
});
grunt.registerMultiTask('attachCopyright', function() {
var files = this.data.src;
@@ -493,6 +583,38 @@ module.exports = function(grunt) {
}
});
grunt.registerTask('verifyPackageDependencies', function() {
var done = this.async();
var verifyDependencies = require("./scripts/verify-package-dependencies.js");
verifyDependencies().then(function(failures) {
if (failures.length > 0) {
failures.forEach(f => grunt.log.error(f));
grunt.fail.fatal("Failed to verify package dependencies");
}
done();
});
});
grunt.registerTask('verifyUiTestDependencies', function() {
if (!fs.existsSync(path.join("node_modules", "grunt-webdriver"))) {
grunt.fail.fatal('You need to install the UI test dependencies first.\nUse the script in "scripts/install-ui-test-dependencies.sh"');
return false;
}
});
grunt.registerTask('generatePublishScript',
'Generates a script to publish build output to npm',
function () {
const done = this.async();
const generatePublishScript = require("./scripts/generate-publish-script.js");
generatePublishScript().then(function(output) {
grunt.log.writeln(output);
const filePath = path.join(grunt.config.get('paths.dist'),"modules","publish.sh");
grunt.file.write(filePath,output);
done();
});
});
grunt.registerTask('setDevEnv',
'Sets NODE_ENV=development so non-minified assets are used',
function () {
@@ -501,41 +623,61 @@ module.exports = function(grunt) {
grunt.registerTask('default',
'Builds editor content then runs code style checks and unit tests on all components',
['build','jshint:editor','mocha_istanbul:all']);
['build','verifyPackageDependencies','jshint:editor','nyc:all']);
grunt.registerTask('no-coverage',
'Builds editor content then runs code style checks and unit tests on all components without code coverage',
['build','verifyPackageDependencies','jshint:editor','simplemocha:all']);
grunt.registerTask('test-core',
'Runs code style check and unit tests on core runtime code',
['build','mocha_istanbul:core']);
['build','nyc:core']);
grunt.registerTask('test-editor',
'Runs code style check on editor code',
['jshint:editor']);
grunt.registerTask('test-ui',
'Builds editor content then runs unit tests on editor ui',
['build','jshint:editor','webdriver:all']);
if (!fs.existsSync(path.join("node_modules", "grunt-webdriver"))) {
grunt.registerTask('test-ui',
'Builds editor content then runs unit tests on editor ui',
['verifyUiTestDependencies']);
} else {
grunt.registerTask('test-ui',
'Builds editor content then runs unit tests on editor ui',
['verifyUiTestDependencies','build','jshint:editor','webdriver:all']);
}
grunt.registerTask('test-nodes',
'Runs unit tests on core nodes',
['build','mocha_istanbul:nodes']);
['build','nyc:nodes']);
grunt.registerTask('build',
'Builds editor content',
['clean:build','jsonlint','concat:build','concat:vendor','copy:build','uglify:build','sass:build','attachCopyright']);
grunt.registerTask('build-dev',
'Developer mode: build dev version',
['clean:build','concat:build','concat:vendor','copy:build','sass:build','setDevEnv']);
grunt.registerTask('dev',
'Developer mode: run node-red, watch for source changes and build/restart',
['build','setDevEnv','concurrent:dev']);
grunt.registerTask('release',
'Create distribution zip file',
['build','clean:release','copy:release','chmod:release','compress:release']);
['build','verifyPackageDependencies','clean:release','mkdir:release','chmod:release','compress:release','pack-modules','generatePublishScript']);
grunt.registerTask('pack-modules',
'Create module pack files for release',
['mkdir:release','npm-command']);
grunt.registerTask('coverage',
'Run Istanbul code test coverage task',
['build','mocha_istanbul:all']);
['build','nyc:all']);
grunt.registerTask('docs',
'Generates API documentation',
['jsdoc','jsdoc2md']);
['jsdoc']);
};

View File

@@ -1,4 +1,4 @@
Copyright JS Foundation and other contributors, http://js.foundation
Copyright OpenJS Foundation and other contributors, https://openjsf.org/
Apache License
Version 2.0, January 2004

View File

@@ -2,12 +2,12 @@
http://nodered.org
[![Build Status](https://travis-ci.org/node-red/node-red.svg)](https://travis-ci.org/node-red/node-red)
[![Build Status](https://travis-ci.org/node-red/node-red.svg?branch=master)](https://travis-ci.org/node-red/node-red)
[![Coverage Status](https://coveralls.io/repos/node-red/node-red/badge.svg?branch=master)](https://coveralls.io/r/node-red/node-red?branch=master)
A visual tool for wiring the Internet of Things.
Low-code programming for event-driven applications.
![Node-RED: A visual tool for wiring the Internet of Things](http://nodered.org/images/node-red-screenshot.png)
![Node-RED: Low-code programming for event-driven applications](http://nodered.org/images/node-red-screenshot.png)
## Quick Start
@@ -44,9 +44,6 @@ If you want to run the latest code from git, here's how to get started:
4. Run
npm start
or
node red.js
## Contributing
@@ -59,7 +56,7 @@ This project adheres to the [Contributor Covenant 1.4](http://contributor-covena
## Authors
Node-RED is a project of the [JS Foundation](http://js.foundation).
Node-RED is a project of the [OpenJS Foundation](https://openjsf.org).
It was created by [IBM Emerging Technology](https://www.ibm.com/blogs/emerging-technology/).
@@ -70,4 +67,4 @@ It was created by [IBM Emerging Technology](https://www.ibm.com/blogs/emerging-t
## Copyright and license
Copyright JS Foundation and other contributors, http://js.foundation under [the Apache 2.0 license](LICENSE).
Copyright OpenJS Foundation and other contributors, https://openjsf.org under [the Apache 2.0 license](LICENSE).

5
SECURITY.md Normal file
View File

@@ -0,0 +1,5 @@
# Security Policy
## Reporting a Vulnerability
Please report any potential security issues to `team@nodered.org`. This will notify the core project team who will respond accordingly.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 308 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 712 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 508 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 575 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 493 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 601 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 459 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 218 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 324 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 378 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 542 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 503 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 255 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 457 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 502 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 449 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 253 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 639 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 402 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 386 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 386 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 413 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 393 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 467 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 393 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 423 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 360 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 482 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 273 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 793 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 256 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 439 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 592 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 509 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 488 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 628 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 258 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 404 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 591 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 707 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 291 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 386 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 289 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 368 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 290 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 392 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1019 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 600 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 410 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 638 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 546 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 638 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 646 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 809 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 563 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 588 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 502 B

View File

@@ -1,332 +0,0 @@
/**
* Copyright JS Foundation and other contributors, http://js.foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
**/
RED.history = (function() {
var undo_history = [];
function undoEvent(ev) {
var i;
var len;
var node;
var subflow;
var modifiedTabs = {};
if (ev) {
if (ev.t == 'multi') {
len = ev.events.length;
for (i=len-1;i>=0;i--) {
undoEvent(ev.events[i]);
}
} else if (ev.t == 'replace') {
RED.nodes.clear();
var imported = RED.nodes.import(ev.config);
imported[0].forEach(function(n) {
if (ev.changed[n.id]) {
n.changed = true;
}
})
RED.nodes.version(ev.rev);
} else if (ev.t == 'add') {
if (ev.nodes) {
for (i=0;i<ev.nodes.length;i++) {
node = RED.nodes.node(ev.nodes[i]);
if (node.z) {
modifiedTabs[node.z] = true;
}
RED.nodes.remove(ev.nodes[i]);
}
}
if (ev.links) {
for (i=0;i<ev.links.length;i++) {
RED.nodes.removeLink(ev.links[i]);
}
}
if (ev.workspaces) {
for (i=0;i<ev.workspaces.length;i++) {
RED.nodes.removeWorkspace(ev.workspaces[i].id);
RED.workspaces.remove(ev.workspaces[i]);
}
}
if (ev.subflows) {
for (i=0;i<ev.subflows.length;i++) {
RED.nodes.removeSubflow(ev.subflows[i]);
RED.workspaces.remove(ev.subflows[i]);
}
}
if (ev.subflow) {
if (ev.subflow.instances) {
ev.subflow.instances.forEach(function(n) {
var node = RED.nodes.node(n.id);
if (node) {
node.changed = n.changed;
node.dirty = true;
}
});
}
if (ev.subflow.hasOwnProperty('changed')) {
subflow = RED.nodes.subflow(ev.subflow.id);
if (subflow) {
subflow.changed = ev.subflow.changed;
}
}
}
if (ev.removedLinks) {
for (i=0;i<ev.removedLinks.length;i++) {
RED.nodes.addLink(ev.removedLinks[i]);
}
}
} else if (ev.t == "delete") {
if (ev.workspaces) {
for (i=0;i<ev.workspaces.length;i++) {
RED.nodes.addWorkspace(ev.workspaces[i]);
RED.workspaces.add(ev.workspaces[i]);
}
}
if (ev.subflow && ev.subflow.subflow) {
RED.nodes.addSubflow(ev.subflow.subflow);
}
if (ev.subflowInputs && ev.subflowInputs.length > 0) {
subflow = RED.nodes.subflow(ev.subflowInputs[0].z);
subflow.in.push(ev.subflowInputs[0]);
subflow.in[0].dirty = true;
}
if (ev.subflowOutputs && ev.subflowOutputs.length > 0) {
subflow = RED.nodes.subflow(ev.subflowOutputs[0].z);
ev.subflowOutputs.sort(function(a,b) { return a.i-b.i});
for (i=0;i<ev.subflowOutputs.length;i++) {
var output = ev.subflowOutputs[i];
subflow.out.splice(output.i,0,output);
for (var j=output.i+1;j<subflow.out.length;j++) {
subflow.out[j].i++;
subflow.out[j].dirty = true;
}
RED.nodes.eachLink(function(l) {
if (l.source.type == "subflow:"+subflow.id) {
if (l.sourcePort >= output.i) {
l.sourcePort++;
}
}
});
}
}
if (ev.subflow && ev.subflow.hasOwnProperty('instances')) {
ev.subflow.instances.forEach(function(n) {
var node = RED.nodes.node(n.id);
if (node) {
node.changed = n.changed;
node.dirty = true;
}
});
}
if (subflow) {
RED.nodes.filterNodes({type:"subflow:"+subflow.id}).forEach(function(n) {
n.inputs = subflow.in.length;
n.outputs = subflow.out.length;
while (n.outputs > n.ports.length) {
n.ports.push(n.ports.length);
}
n.resize = true;
n.dirty = true;
});
}
if (ev.nodes) {
for (i=0;i<ev.nodes.length;i++) {
RED.nodes.add(ev.nodes[i]);
modifiedTabs[ev.nodes[i].z] = true;
}
}
if (ev.links) {
for (i=0;i<ev.links.length;i++) {
RED.nodes.addLink(ev.links[i]);
}
}
if (ev.changes) {
for (i in ev.changes) {
if (ev.changes.hasOwnProperty(i)) {
node = RED.nodes.node(i);
if (node) {
for (var d in ev.changes[i]) {
if (ev.changes[i].hasOwnProperty(d)) {
node[d] = ev.changes[i][d];
}
}
node.dirty = true;
}
}
}
}
} else if (ev.t == "move") {
for (i=0;i<ev.nodes.length;i++) {
var n = ev.nodes[i];
n.n.x = n.ox;
n.n.y = n.oy;
n.n.dirty = true;
n.n.moved = n.moved;
}
// A move could have caused a link splice
if (ev.links) {
for (i=0;i<ev.links.length;i++) {
RED.nodes.removeLink(ev.links[i]);
}
}
if (ev.removedLinks) {
for (i=0;i<ev.removedLinks.length;i++) {
RED.nodes.addLink(ev.removedLinks[i]);
}
}
} else if (ev.t == "edit") {
for (i in ev.changes) {
if (ev.changes.hasOwnProperty(i)) {
if (ev.node._def.defaults && ev.node._def.defaults[i] && ev.node._def.defaults[i].type) {
// This is a config node property
var currentConfigNode = RED.nodes.node(ev.node[i]);
if (currentConfigNode) {
currentConfigNode.users.splice(currentConfigNode.users.indexOf(ev.node),1);
}
var newConfigNode = RED.nodes.node(ev.changes[i]);
if (newConfigNode) {
newConfigNode.users.push(ev.node);
}
}
ev.node[i] = ev.changes[i];
}
}
if (ev.subflow) {
if (ev.subflow.hasOwnProperty('inputCount')) {
if (ev.node.in.length > ev.subflow.inputCount) {
ev.node.in.splice(ev.subflow.inputCount);
} else if (ev.subflow.inputs.length > 0) {
ev.node.in = ev.node.in.concat(ev.subflow.inputs);
}
}
if (ev.subflow.hasOwnProperty('outputCount')) {
if (ev.node.out.length > ev.subflow.outputCount) {
ev.node.out.splice(ev.subflow.outputCount);
} else if (ev.subflow.outputs.length > 0) {
ev.node.out = ev.node.out.concat(ev.subflow.outputs);
}
}
if (ev.subflow.hasOwnProperty('instances')) {
ev.subflow.instances.forEach(function(n) {
var node = RED.nodes.node(n.id);
if (node) {
node.changed = n.changed;
node.dirty = true;
}
});
}
RED.editor.validateNode(ev.node);
RED.nodes.filterNodes({type:"subflow:"+ev.node.id}).forEach(function(n) {
n.inputs = ev.node.in.length;
n.outputs = ev.node.out.length;
RED.editor.updateNodeProperties(n);
RED.editor.validateNode(n);
});
} else {
var outputMap;
if (ev.outputMap) {
outputMap = {};
for (var port in ev.outputMap) {
if (ev.outputMap.hasOwnProperty(port) && ev.outputMap[port] !== "-1") {
outputMap[ev.outputMap[port]] = port;
}
}
}
RED.editor.updateNodeProperties(ev.node,outputMap);
RED.editor.validateNode(ev.node);
}
if (ev.links) {
for (i=0;i<ev.links.length;i++) {
RED.nodes.addLink(ev.links[i]);
}
}
ev.node.dirty = true;
ev.node.changed = ev.changed;
} else if (ev.t == "createSubflow") {
if (ev.nodes) {
RED.nodes.filterNodes({z:ev.subflow.subflow.id}).forEach(function(n) {
n.z = ev.activeWorkspace;
n.dirty = true;
});
for (i=0;i<ev.nodes.length;i++) {
RED.nodes.remove(ev.nodes[i]);
}
}
if (ev.links) {
for (i=0;i<ev.links.length;i++) {
RED.nodes.removeLink(ev.links[i]);
}
}
RED.nodes.removeSubflow(ev.subflow.subflow);
RED.workspaces.remove(ev.subflow.subflow);
if (ev.removedLinks) {
for (i=0;i<ev.removedLinks.length;i++) {
RED.nodes.addLink(ev.removedLinks[i]);
}
}
} else if (ev.t == "reorder") {
if (ev.order) {
RED.workspaces.order(ev.order);
}
}
Object.keys(modifiedTabs).forEach(function(id) {
var subflow = RED.nodes.subflow(id);
if (subflow) {
RED.editor.validateNode(subflow);
}
});
RED.nodes.dirty(ev.dirty);
RED.view.redraw(true);
RED.palette.refresh();
RED.workspaces.refresh();
RED.sidebar.config.refresh();
}
}
return {
//TODO: this function is a placeholder until there is a 'save' event that can be listened to
markAllDirty: function() {
for (var i=0;i<undo_history.length;i++) {
undo_history[i].dirty = true;
}
},
list: function() {
return undo_history
},
depth: function() {
return undo_history.length;
},
push: function(ev) {
undo_history.push(ev);
},
pop: function() {
var ev = undo_history.pop();
undoEvent(ev);
},
peek: function() {
return undo_history[undo_history.length-1];
},
clear: function() {
undo_history = [];
}
}
})();

View File

@@ -1,44 +0,0 @@
{
"*": {
"ctrl-shift-p":"core:manage-palette",
"ctrl-f": "core:search",
"ctrl-=": "core:zoom-in",
"ctrl--": "core:zoom-out",
"ctrl-0": "core:zoom-reset",
"ctrl-enter": "core:confirm-edit-tray",
"ctrl-escape": "core:cancel-edit-tray",
"ctrl-g i": "core:show-info-tab",
"ctrl-g d": "core:show-debug-tab",
"ctrl-g c": "core:show-config-tab",
"ctrl-g x": "core:show-context-tab",
"ctrl-e": "core:show-export-dialog",
"ctrl-i": "core:show-import-dialog",
"ctrl-space": "core:toggle-sidebar",
"ctrl-,": "core:show-user-settings",
"ctrl-alt-r": "core:show-remote-diff",
"ctrl-alt-n": "core:new-project",
"ctrl-alt-o": "core:open-project",
"ctrl-g v": "core:show-version-control-tab"
},
"workspace": {
"backspace": "core:delete-selection",
"delete": "core:delete-selection",
"enter": "core:edit-selected-node",
"ctrl-c": "core:copy-selection-to-internal-clipboard",
"ctrl-x": "core:cut-selection-to-internal-clipboard",
"ctrl-v": "core:paste-from-internal-clipboard",
"ctrl-z": "core:undo",
"ctrl-a": "core:select-all-nodes",
"shift-?": "core:show-help",
"up": "core:move-selection-up",
"right": "core:move-selection-right",
"down": "core:move-selection-down",
"left": "core:move-selection-left",
"shift-up": "core:step-selection-up",
"shift-right": "core:step-selection-right",
"shift-down": "core:step-selection-down",
"shift-left": "core:step-selection-left",
"ctrl-shift-j": "core:show-previous-tab",
"ctrl-shift-k": "core:show-next-tab"
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,379 +0,0 @@
/**
* Copyright JS Foundation and other contributors, http://js.foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
**/
RED.clipboard = (function() {
var dialog;
var dialogContainer;
var exportNodesDialog;
var importNodesDialog;
var disabled = false;
function setupDialogs() {
dialog = $('<div id="clipboard-dialog" class="hide node-red-dialog"><form class="dialog-form form-horizontal"></form></div>')
.appendTo("body")
.dialog({
modal: true,
autoOpen: false,
width: 500,
resizable: false,
buttons: [
{
id: "clipboard-dialog-cancel",
text: RED._("common.label.cancel"),
click: function() {
$( this ).dialog( "close" );
}
},
{
id: "clipboard-dialog-close",
class: "primary",
text: RED._("common.label.close"),
click: function() {
$( this ).dialog( "close" );
}
},
{
id: "clipboard-dialog-copy",
class: "primary",
text: RED._("clipboard.export.copy"),
click: function() {
$("#clipboard-export").select();
document.execCommand("copy");
document.getSelection().removeAllRanges();
RED.notify(RED._("clipboard.nodesExported"));
$( this ).dialog( "close" );
}
},
{
id: "clipboard-dialog-ok",
class: "primary",
text: RED._("common.label.import"),
click: function() {
RED.view.importNodes($("#clipboard-import").val(),$("#import-tab > a.selected").attr('id') === 'import-tab-new');
$( this ).dialog( "close" );
}
}
],
open: function(e) {
$(this).parent().find(".ui-dialog-titlebar-close").hide();
},
close: function(e) {
}
});
dialogContainer = dialog.children(".dialog-form");
exportNodesDialog =
'<div class="form-row">'+
'<label style="width:auto;margin-right: 10px;" data-i18n="clipboard.export.copy"></label>'+
'<span id="export-range-group" class="button-group">'+
'<a id="export-range-selected" class="editor-button toggle" href="#" data-i18n="clipboard.export.selected"></a>'+
'<a id="export-range-flow" class="editor-button toggle" href="#" data-i18n="clipboard.export.current"></a>'+
'<a id="export-range-full" class="editor-button toggle" href="#" data-i18n="clipboard.export.all"></a>'+
'</span>'+
'</div>'+
'<div class="form-row">'+
'<textarea readonly style="resize: none; width: 100%; border-radius: 4px;font-family: monospace; font-size: 12px; background:#f3f3f3; padding-left: 0.5em; box-sizing:border-box;" id="clipboard-export" rows="5"></textarea>'+
'</div>'+
'<div class="form-row" style="text-align: right;">'+
'<span id="export-format-group" class="button-group">'+
'<a id="export-format-mini" class="editor-button editor-button-small toggle" href="#" data-i18n="clipboard.export.compact"></a>'+
'<a id="export-format-full" class="editor-button editor-button-small toggle" href="#" data-i18n="clipboard.export.formatted"></a>'+
'</span>'+
'</div>';
importNodesDialog = '<div class="form-row">'+
'<textarea style="resize: none; width: 100%; border-radius: 0px;font-family: monospace; font-size: 12px; background:#eee; padding-left: 0.5em; box-sizing:border-box;" id="clipboard-import" rows="5" placeholder="'+
RED._("clipboard.pasteNodes")+
'"></textarea>'+
'</div>'+
'<div class="form-row">'+
'<label style="width:auto;margin-right: 10px;" data-i18n="clipboard.import.import"></label>'+
'<span id="import-tab" class="button-group">'+
'<a id="import-tab-current" class="editor-button toggle selected" href="#" data-i18n="clipboard.export.current"></a>'+
'<a id="import-tab-new" class="editor-button toggle" href="#" data-i18n="clipboard.import.newFlow"></a>'+
'</span>'+
'</div>';
}
function validateImport() {
var importInput = $("#clipboard-import");
var v = importInput.val();
v = v.substring(v.indexOf('['),v.lastIndexOf(']')+1);
try {
JSON.parse(v);
importInput.removeClass("input-error");
importInput.val(v);
$("#clipboard-dialog-ok").button("enable");
} catch(err) {
if (v !== "") {
importInput.addClass("input-error");
}
$("#clipboard-dialog-ok").button("disable");
}
}
function importNodes() {
if (disabled) {
return;
}
dialogContainer.empty();
dialogContainer.append($(importNodesDialog));
dialogContainer.i18n();
$("#clipboard-dialog-ok").show();
$("#clipboard-dialog-cancel").show();
$("#clipboard-dialog-close").hide();
$("#clipboard-dialog-copy").hide();
$("#clipboard-dialog-ok").button("disable");
$("#clipboard-import").keyup(validateImport);
$("#clipboard-import").on('paste',function() { setTimeout(validateImport,10)});
$("#import-tab > a").click(function(evt) {
evt.preventDefault();
if ($(this).hasClass('disabled') || $(this).hasClass('selected')) {
return;
}
$(this).parent().children().removeClass('selected');
$(this).addClass('selected');
});
dialog.dialog("option","title",RED._("clipboard.importNodes")).dialog("open");
}
function exportNodes() {
if (disabled) {
return;
}
dialogContainer.empty();
dialogContainer.append($(exportNodesDialog));
dialogContainer.i18n();
var format = RED.settings.flowFilePretty ? "export-format-full" : "export-format-mini";
$("#export-format-group > a").click(function(evt) {
evt.preventDefault();
if ($(this).hasClass('disabled') || $(this).hasClass('selected')) {
$("#clipboard-export").focus();
return;
}
$(this).parent().children().removeClass('selected');
$(this).addClass('selected');
var flow = $("#clipboard-export").val();
if (flow.length > 0) {
var nodes = JSON.parse(flow);
format = $(this).attr('id');
if (format === 'export-format-full') {
flow = JSON.stringify(nodes,null,4);
} else {
flow = JSON.stringify(nodes);
}
$("#clipboard-export").val(flow);
$("#clipboard-export").focus();
}
});
$("#export-range-group > a").click(function(evt) {
evt.preventDefault();
if ($(this).hasClass('disabled') || $(this).hasClass('selected')) {
$("#clipboard-export").focus();
return;
}
$(this).parent().children().removeClass('selected');
$(this).addClass('selected');
var type = $(this).attr('id');
var flow = "";
var nodes = null;
if (type === 'export-range-selected') {
var selection = RED.view.selection();
// Don't include the subflow meta-port nodes in the exported selection
nodes = RED.nodes.createExportableNodeSet(selection.nodes.filter(function(n) { return n.type !== 'subflow'}));
} else if (type === 'export-range-flow') {
var activeWorkspace = RED.workspaces.active();
nodes = RED.nodes.filterNodes({z:activeWorkspace});
var parentNode = RED.nodes.workspace(activeWorkspace)||RED.nodes.subflow(activeWorkspace);
nodes.unshift(parentNode);
nodes = RED.nodes.createExportableNodeSet(nodes);
} else if (type === 'export-range-full') {
nodes = RED.nodes.createCompleteNodeSet(false);
}
if (nodes !== null) {
if (format === "export-format-full") {
flow = JSON.stringify(nodes,null,4);
} else {
flow = JSON.stringify(nodes);
}
}
if (flow.length > 0) {
$("#export-copy").removeClass('disabled');
} else {
$("#export-copy").addClass('disabled');
}
$("#clipboard-export").val(flow);
$("#clipboard-export").focus();
})
$("#clipboard-dialog-ok").hide();
$("#clipboard-dialog-cancel").hide();
$("#clipboard-dialog-copy").hide();
$("#clipboard-dialog-close").hide();
var selection = RED.view.selection();
if (selection.nodes) {
$("#export-range-selected").click();
} else {
$("#export-range-selected").addClass('disabled').removeClass('selected');
$("#export-range-flow").click();
}
if (format === "export-format-full") {
$("#export-format-full").click();
} else {
$("#export-format-mini").click();
}
$("#clipboard-export")
.focus(function() {
var textarea = $(this);
textarea.select();
textarea.mouseup(function() {
textarea.unbind("mouseup");
return false;
})
});
dialog.dialog("option","title",RED._("clipboard.exportNodes")).dialog( "open" );
$("#clipboard-export").focus();
if (!document.queryCommandSupported("copy")) {
$("#clipboard-dialog-cancel").hide();
$("#clipboard-dialog-close").show();
} else {
$("#clipboard-dialog-cancel").show();
$("#clipboard-dialog-copy").show();
}
}
function hideDropTarget() {
$("#dropTarget").hide();
RED.keyboard.remove("escape");
}
function copyText(value,element,msg) {
var truncated = false;
if (typeof value !== "string" ) {
value = JSON.stringify(value, function(key,value) {
if (value !== null && typeof value === 'object') {
if (value.__enc__) {
if (value.hasOwnProperty('data') && value.hasOwnProperty('length')) {
truncated = value.data.length !== value.length;
return value.data;
}
if (value.type === 'function' || value.type === 'internal') {
return undefined
}
if (value.type === 'number') {
// Handle NaN and Infinity - they are not permitted
// in JSON. We can either substitute with a String
// representation or null
return null;
}
}
}
return value;
});
}
if (truncated) {
msg += "_truncated";
}
$("#clipboard-hidden").val(value).select();
var result = document.execCommand("copy");
if (result && element) {
var popover = RED.popover.create({
target: element,
direction: 'left',
size: 'small',
content: RED._(msg)
});
setTimeout(function() {
popover.close();
},1000);
popover.open();
}
return result;
}
return {
init: function() {
setupDialogs();
$('<input type="text" id="clipboard-hidden">').appendTo("body");
RED.actions.add("core:show-export-dialog",exportNodes);
RED.actions.add("core:show-import-dialog",importNodes);
RED.events.on("editor:open",function() { disabled = true; });
RED.events.on("editor:close",function() { disabled = false; });
RED.events.on("search:open",function() { disabled = true; });
RED.events.on("search:close",function() { disabled = false; });
RED.events.on("type-search:open",function() { disabled = true; });
RED.events.on("type-search:close",function() { disabled = false; });
$('#chart').on("dragenter",function(event) {
if ($.inArray("text/plain",event.originalEvent.dataTransfer.types) != -1 ||
$.inArray("Files",event.originalEvent.dataTransfer.types) != -1) {
$("#dropTarget").css({display:'table'});
RED.keyboard.add("*", "escape" ,hideDropTarget);
}
});
$('#dropTarget').on("dragover",function(event) {
if ($.inArray("text/plain",event.originalEvent.dataTransfer.types) != -1 ||
$.inArray("Files",event.originalEvent.dataTransfer.types) != -1) {
event.preventDefault();
}
})
.on("dragleave",function(event) {
hideDropTarget();
})
.on("drop",function(event) {
if ($.inArray("text/plain",event.originalEvent.dataTransfer.types) != -1) {
var data = event.originalEvent.dataTransfer.getData("text/plain");
data = data.substring(data.indexOf('['),data.lastIndexOf(']')+1);
RED.view.importNodes(data);
} else if ($.inArray("Files",event.originalEvent.dataTransfer.types) != -1) {
var files = event.originalEvent.dataTransfer.files;
if (files.length === 1) {
var file = files[0];
var reader = new FileReader();
reader.onload = (function(theFile) {
return function(e) {
RED.view.importNodes(e.target.result);
};
})(file);
reader.readAsText(file);
}
}
hideDropTarget();
event.preventDefault();
});
},
import: importNodes,
export: exportNodes,
copyText: copyText
}
})();

View File

@@ -1,81 +0,0 @@
/**
* Copyright JS Foundation and other contributors, http://js.foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
**/
RED.panels = (function() {
function createPanel(options) {
var container = options.container || $("#"+options.id);
var children = container.children();
if (children.length !== 2) {
throw new Error("Container must have exactly two children");
}
container.addClass("red-ui-panels");
var separator = $('<div class="red-ui-panels-separator"></div>').insertAfter(children[0]);
var startPosition;
var panelHeights = [];
var modifiedHeights = false;
var panelRatio;
separator.draggable({
axis: "y",
containment: container,
scroll: false,
start:function(event,ui) {
var height = container.height();
startPosition = ui.position.top;
panelHeights = [$(children[0]).height(),$(children[1]).height()];
},
drag: function(event,ui) {
var height = container.height();
var delta = ui.position.top-startPosition;
var newHeights = [panelHeights[0]+delta,panelHeights[1]-delta];
$(children[0]).height(newHeights[0]);
$(children[1]).height(newHeights[1]);
if (options.resize) {
options.resize(newHeights[0],newHeights[1]);
}
ui.position.top -= delta;
panelRatio = newHeights[0]/height;
},
stop:function(event,ui) {
modifiedHeights = true;
}
});
return {
resize: function(height) {
var panelHeights = [$(children[0]).height(),$(children[1]).height()];
container.height(height);
if (modifiedHeights) {
var topPanelHeight = panelRatio*height;
var bottomPanelHeight = height - topPanelHeight - 48;
panelHeights = [topPanelHeight,bottomPanelHeight];
$(children[0]).height(panelHeights[0]);
$(children[1]).height(panelHeights[1]);
}
if (options.resize) {
options.resize(panelHeights[0],panelHeights[1]);
}
}
}
}
return {
create: createPanel
}
})();

View File

@@ -1,171 +0,0 @@
/**
* Copyright JS Foundation and other contributors, http://js.foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
**/
RED.popover = (function() {
var deltaSizes = {
"default": {
top: 10,
leftRight: 17,
leftLeft: 25,
leftBottom: 8,
},
"small": {
top: 5,
leftRight: 17,
leftLeft: 16,
leftBottom: 3,
}
}
function createPopover(options) {
var target = options.target;
var direction = options.direction || "right";
var trigger = options.trigger;
var content = options.content;
var delay = options.delay;
var autoClose = options.autoClose;
var width = options.width||"auto";
var size = options.size||"default";
if (!deltaSizes[size]) {
throw new Error("Invalid RED.popover size value:",size);
}
var timer = null;
var active;
var div;
var openPopup = function(instant) {
if (active) {
div = $('<div class="red-ui-popover red-ui-popover-'+direction+'"></div>');
if (size !== "default") {
div.addClass("red-ui-popover-size-"+size);
}
if (typeof content === 'function') {
var result = content.call(res);
if (result === null) {
return;
}
if (typeof result === 'string') {
div.text(result);
} else {
div.append(result);
}
} else {
div.html(content);
}
if (width !== "auto") {
div.width(width);
}
div.appendTo("body");
var targetPos = target.offset();
var targetWidth = target.outerWidth();
var targetHeight = target.outerHeight();
var divHeight = div.height();
var divWidth = div.width();
if (direction === 'right') {
div.css({top: targetPos.top+targetHeight/2-divHeight/2-deltaSizes[size].top,left:targetPos.left+targetWidth+deltaSizes[size].leftRight});
} else if (direction === 'left') {
div.css({top: targetPos.top+targetHeight/2-divHeight/2-deltaSizes[size].top,left:targetPos.left-deltaSizes[size].leftLeft-divWidth});
} else if (direction === 'bottom') {
div.css({top: targetPos.top+targetHeight+deltaSizes[size].top,left:targetPos.left+targetWidth/2-divWidth/2 - deltaSizes[size].leftBottom});
}
if (instant) {
div.show();
} else {
div.fadeIn("fast");
}
}
}
var closePopup = function(instant) {
if (!active) {
if (div) {
if (instant) {
$(this).remove();
} else {
div.fadeOut("fast",function() {
$(this).remove();
});
}
div = null;
}
}
}
if (trigger === 'hover') {
target.on('mouseenter',function(e) {
clearTimeout(timer);
active = true;
timer = setTimeout(openPopup,delay.show);
});
target.on('mouseleave', function(e) {
if (timer) {
clearTimeout(timer);
}
active = false;
setTimeout(closePopup,delay.hide);
});
} else if (trigger === 'click') {
target.click(function(e) {
e.preventDefault();
e.stopPropagation();
active = !active;
if (!active) {
closePopup();
} else {
openPopup();
}
});
} else if (autoClose) {
setTimeout(function() {
active = false;
closePopup();
},autoClose);
}
var res = {
setContent: function(_content) {
content = _content;
return res;
},
open: function (instant) {
active = true;
openPopup(instant);
return res;
},
close: function (instant) {
active = false;
closePopup(instant);
return res;
}
}
return res;
}
return {
create: createPopover,
tooltip: function(target,content) {
RED.popover.create({
target:target,
trigger: "hover",
size: "small",
direction: "bottom",
content: content,
delay: { show: 550, hide: 10 }
});
}
}
})();

View File

@@ -1,99 +0,0 @@
/**
* Copyright JS Foundation and other contributors, http://js.foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
**/
(function($) {
$.widget( "nodered.searchBox", {
_create: function() {
var that = this;
this.currentTimeout = null;
this.lastSent = "";
this.element.val("");
this.uiContainer = this.element.wrap("<div>").parent();
this.uiContainer.addClass("red-ui-searchBox-container");
$('<i class="fa fa-search"></i>').prependTo(this.uiContainer);
this.clearButton = $('<a href="#"><i class="fa fa-times"></i></a>').appendTo(this.uiContainer);
this.clearButton.on("click",function(e) {
e.preventDefault();
that.element.val("");
that._change("",true);
that.element.focus();
});
this.resultCount = $('<span>',{class:"red-ui-searchBox-resultCount hide"}).appendTo(this.uiContainer);
this.element.val("");
this.element.on("keydown",function(evt) {
if (evt.keyCode === 27) {
that.element.val("");
}
})
this.element.on("keyup",function(evt) {
that._change($(this).val());
});
this.element.on("focus",function() {
$("body").one("mousedown",function() {
that.element.blur();
});
});
},
_change: function(val,instant) {
var fireEvent = false;
if (val === "") {
this.clearButton.hide();
fireEvent = true;
} else {
this.clearButton.show();
fireEvent = (val.length >= (this.options.minimumLength||0));
}
var current = this.element.val();
fireEvent = fireEvent && current !== this.lastSent;
if (fireEvent) {
if (!instant && this.options.delay > 0) {
clearTimeout(this.currentTimeout);
var that = this;
this.currentTimeout = setTimeout(function() {
that.lastSent = that.element.val();
that._trigger("change");
},this.options.delay);
} else {
this._trigger("change");
}
}
},
value: function(val) {
if (val === undefined) {
return this.element.val();
} else {
this.element.val(val);
this._change(val);
}
},
count: function(val) {
if (val === undefined || val === null || val === "") {
this.resultCount.text("").hide();
} else {
this.resultCount.text(val).show();
}
},
change: function() {
this._trigger("change");
}
});
})(jQuery);

View File

@@ -1,508 +0,0 @@
/**
* Copyright JS Foundation and other contributors, http://js.foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
**/
RED.tabs = (function() {
var defaultTabIcon = "fa fa-lemon-o";
function createTabs(options) {
var tabs = {};
var pinnedTabsCount = 0;
var currentTabWidth;
var currentActiveTabWidth = 0;
var collapsibleMenu;
var ul = options.element || $("#"+options.id);
var wrapper = ul.wrap( "<div>" ).parent();
var scrollContainer = ul.wrap( "<div>" ).parent();
wrapper.addClass("red-ui-tabs");
if (options.vertical) {
wrapper.addClass("red-ui-tabs-vertical");
}
if (options.addButton && typeof options.addButton === 'function') {
wrapper.addClass("red-ui-tabs-add");
var addButton = $('<div class="red-ui-tab-button"><a href="#"><i class="fa fa-plus"></i></a></div>').appendTo(wrapper);
addButton.find('a').click(function(evt) {
evt.preventDefault();
options.addButton();
})
}
var scrollLeft;
var scrollRight;
if (options.scrollable) {
wrapper.addClass("red-ui-tabs-scrollable");
scrollContainer.addClass("red-ui-tabs-scroll-container");
scrollContainer.scroll(updateScroll);
scrollLeft = $('<div class="red-ui-tab-button red-ui-tab-scroll red-ui-tab-scroll-left"><a href="#" style="display:none;"><i class="fa fa-caret-left"></i></a></div>').appendTo(wrapper).find("a");
scrollLeft.on('mousedown',function(evt) { scrollEventHandler(evt,'-=150') }).on('click',function(evt){ evt.preventDefault();});
scrollRight = $('<div class="red-ui-tab-button red-ui-tab-scroll red-ui-tab-scroll-right"><a href="#" style="display:none;"><i class="fa fa-caret-right"></i></a></div>').appendTo(wrapper).find("a");
scrollRight.on('mousedown',function(evt) { scrollEventHandler(evt,'+=150') }).on('click',function(evt){ evt.preventDefault();});
}
if (options.collapsible) {
// var dropDown = $('<div>',{class:"red-ui-tabs-select"}).appendTo(wrapper);
// ul.hide();
wrapper.addClass("red-ui-tabs-collapsible");
var collapsedButtonsRow = $('<div class="red-ui-tab-link-buttons"></div>').appendTo(wrapper);
var selectButton = $('<a href="#"><i class="fa fa-caret-down"></i></a>').appendTo(collapsedButtonsRow);
selectButton.addClass("red-ui-tab-link-button-menu")
selectButton.click(function(evt) {
evt.preventDefault();
if (!collapsibleMenu) {
var pinnedOptions = [];
var options = [];
ul.children().each(function(i,el) {
var id = $(el).data('tabId');
var opt = {
id:"red-ui-tabs-menu-option-"+id,
icon: tabs[id].iconClass || defaultTabIcon,
label: tabs[id].name,
onselect: function() {
activateTab(id);
}
};
if (tabs[id].pinned) {
pinnedOptions.push(opt);
} else {
options.push(opt);
}
});
options = pinnedOptions.concat(options);
collapsibleMenu = RED.menu.init({id:"debug-message-option-menu",options: options});
collapsibleMenu.css({
position: "absolute"
})
collapsibleMenu.on('mouseleave', function(){ $(this).hide() });
collapsibleMenu.on('mouseup', function() { $(this).hide() });
collapsibleMenu.appendTo("body");
}
var elementPos = selectButton.offset();
collapsibleMenu.css({
top: (elementPos.top+selectButton.height()-20)+"px",
left: (elementPos.left - collapsibleMenu.width() + selectButton.width())+"px"
})
collapsibleMenu.toggle();
})
}
function scrollEventHandler(evt,dir) {
evt.preventDefault();
if ($(this).hasClass('disabled')) {
return;
}
var currentScrollLeft = scrollContainer.scrollLeft();
scrollContainer.animate( { scrollLeft: dir }, 100);
var interval = setInterval(function() {
var newScrollLeft = scrollContainer.scrollLeft()
if (newScrollLeft === currentScrollLeft) {
clearInterval(interval);
return;
}
currentScrollLeft = newScrollLeft;
scrollContainer.animate( { scrollLeft: dir }, 100);
},100);
$(this).one('mouseup',function() {
clearInterval(interval);
})
}
ul.children().first().addClass("active");
ul.children().addClass("red-ui-tab");
function onTabClick() {
if (options.onclick) {
options.onclick(tabs[$(this).attr('href').slice(1)]);
}
activateTab($(this));
return false;
}
function updateScroll() {
if (ul.children().length !== 0) {
var sl = scrollContainer.scrollLeft();
var scWidth = scrollContainer.width();
var ulWidth = ul.width();
if (sl === 0) {
scrollLeft.hide();
} else {
scrollLeft.show();
}
if (sl === ulWidth-scWidth) {
scrollRight.hide();
} else {
scrollRight.show();
}
}
}
function onTabDblClick() {
if (options.ondblclick) {
options.ondblclick(tabs[$(this).attr('href').slice(1)]);
}
return false;
}
function activateTab(link) {
if (typeof link === "string") {
link = ul.find("a[href='#"+link+"']");
}
if (link.length === 0) {
return;
}
if (!link.parent().hasClass("active")) {
ul.children().removeClass("active");
ul.children().css({"transition": "width 100ms"});
link.parent().addClass("active");
var parentId = link.parent().attr('id');
wrapper.find(".red-ui-tab-link-button").removeClass("active selected");
$("#"+parentId+"-link-button").addClass("active selected");
if (options.scrollable) {
var pos = link.parent().position().left;
if (pos-21 < 0) {
scrollContainer.animate( { scrollLeft: '+='+(pos-50) }, 300);
} else if (pos + 120 > scrollContainer.width()) {
scrollContainer.animate( { scrollLeft: '+='+(pos + 140-scrollContainer.width()) }, 300);
}
}
if (options.onchange) {
options.onchange(tabs[link.attr('href').slice(1)]);
}
updateTabWidths();
setTimeout(function() {
ul.children().css({"transition": ""});
},100);
}
}
function activatePreviousTab() {
var previous = ul.find("li.active").prev();
if (previous.length > 0) {
activateTab(previous.find("a"));
}
}
function activateNextTab() {
var next = ul.find("li.active").next();
if (next.length > 0) {
activateTab(next.find("a"));
}
}
function updateTabWidths() {
if (options.vertical) {
return;
}
var tabs = ul.find("li.red-ui-tab");
var width = wrapper.width();
var tabCount = tabs.size();
var tabWidth;
if (options.collapsible) {
tabWidth = width - collapsedButtonsRow.width()-10;
if (tabWidth < 198) {
var delta = 198 - tabWidth;
var b = collapsedButtonsRow.find("a:last").prev();
while (b.is(":not(:visible)")) {
b = b.prev();
}
if (!b.hasClass("red-ui-tab-link-button-pinned")) {
b.hide();
}
tabWidth = width - collapsedButtonsRow.width()-10;
} else {
var space = width - 198 - collapsedButtonsRow.width();
if (space > 40) {
collapsedButtonsRow.find("a:not(:visible):first").show();
tabWidth = width - collapsedButtonsRow.width()-10;
}
}
tabs.css({width:tabWidth});
} else {
var tabWidth = (width-12-(tabCount*6))/tabCount;
currentTabWidth = (100*tabWidth/width)+"%";
currentActiveTabWidth = currentTabWidth+"%";
if (options.scrollable) {
tabWidth = Math.max(tabWidth,140);
currentTabWidth = tabWidth+"px";
currentActiveTabWidth = 0;
var listWidth = Math.max(wrapper.width(),12+(tabWidth+6)*tabCount);
ul.width(listWidth);
updateScroll();
} else if (options.hasOwnProperty("minimumActiveTabWidth")) {
if (tabWidth < options.minimumActiveTabWidth) {
tabCount -= 1;
tabWidth = (width-12-options.minimumActiveTabWidth-(tabCount*6))/tabCount;
currentTabWidth = (100*tabWidth/width)+"%";
currentActiveTabWidth = options.minimumActiveTabWidth+"px";
} else {
currentActiveTabWidth = 0;
}
}
if (options.collapsible) {
console.log(currentTabWidth);
}
tabs.css({width:currentTabWidth});
if (tabWidth < 50) {
ul.find(".red-ui-tab-close").hide();
ul.find(".red-ui-tab-icon").hide();
ul.find(".red-ui-tab-label").css({paddingLeft:Math.min(12,Math.max(0,tabWidth-38))+"px"})
} else {
ul.find(".red-ui-tab-close").show();
ul.find(".red-ui-tab-icon").show();
ul.find(".red-ui-tab-label").css({paddingLeft:""})
}
if (currentActiveTabWidth !== 0) {
ul.find("li.red-ui-tab.active").css({"width":options.minimumActiveTabWidth});
ul.find("li.red-ui-tab.active .red-ui-tab-close").show();
ul.find("li.red-ui-tab.active .red-ui-tab-icon").show();
ul.find("li.red-ui-tab.active .red-ui-tab-label").css({paddingLeft:""})
}
}
}
ul.find("li.red-ui-tab a").on("click",onTabClick).on("dblclick",onTabDblClick);
setTimeout(function() {
updateTabWidths();
},0);
function removeTab(id) {
var li = ul.find("a[href='#"+id+"']").parent();
if (li.hasClass("active")) {
var tab = li.prev();
if (tab.size() === 0) {
tab = li.next();
}
activateTab(tab.find("a"));
}
li.remove();
if (tabs[id].pinned) {
pinnedTabsCount--;
}
if (options.onremove) {
options.onremove(tabs[id]);
}
delete tabs[id];
updateTabWidths();
collapsibleMenu = null;
}
return {
addTab: function(tab) {
tabs[tab.id] = tab;
var li = $("<li/>",{class:"red-ui-tab"}).appendTo(ul);
li.attr('id',"red-ui-tab-"+(tab.id.replace(".","-")));
li.data("tabId",tab.id);
if (options.maximumTabWidth) {
li.css("maxWidth",options.maximumTabWidth+"px");
}
var link = $("<a/>",{href:"#"+tab.id, class:"red-ui-tab-label"}).appendTo(li);
if (tab.icon) {
$('<img src="'+tab.icon+'" class="red-ui-tab-icon"/>').appendTo(link);
} else if (tab.iconClass) {
$('<i>',{class:"red-ui-tab-icon "+tab.iconClass}).appendTo(link);
}
var span = $('<span/>',{class:"bidiAware"}).text(tab.label).appendTo(link);
span.attr('dir', RED.text.bidi.resolveBaseTextDir(tab.label));
if (options.collapsible) {
li.addClass("red-ui-tab-pinned");
var pinnedLink = $('<a href="#'+tab.id+'" class="red-ui-tab-link-button"></a>');
if (tab.pinned) {
if (pinnedTabsCount === 0) {
pinnedLink.prependTo(collapsedButtonsRow)
} else {
pinnedLink.insertAfter(collapsedButtonsRow.find("a.red-ui-tab-link-button-pinned:last"));
}
} else {
pinnedLink.insertBefore(collapsedButtonsRow.find("a:last"));
}
pinnedLink.attr('id',li.attr('id')+"-link-button");
if (tab.iconClass) {
$('<i>',{class:tab.iconClass}).appendTo(pinnedLink);
} else {
$('<i>',{class:defaultTabIcon}).appendTo(pinnedLink);
}
pinnedLink.click(function(evt) {
evt.preventDefault();
activateTab(tab.id);
});
if (tab.pinned) {
pinnedLink.addClass("red-ui-tab-link-button-pinned");
pinnedTabsCount++;
}
RED.popover.tooltip($(pinnedLink), tab.name);
}
link.on("click",onTabClick);
link.on("dblclick",onTabDblClick);
if (tab.closeable) {
var closeLink = $("<a/>",{href:"#",class:"red-ui-tab-close"}).appendTo(li);
closeLink.append('<i class="fa fa-times" />');
closeLink.on("click",function(event) {
event.preventDefault();
removeTab(tab.id);
});
}
if (options.onadd) {
options.onadd(tab);
}
link.attr("title",tab.label);
if (ul.find("li.red-ui-tab").size() == 1) {
activateTab(link);
}
if (options.onreorder) {
var originalTabOrder;
var tabDragIndex;
var tabElements = [];
var startDragIndex;
li.draggable({
axis:"x",
distance: 20,
start: function(event,ui) {
originalTabOrder = [];
tabElements = [];
ul.children().each(function(i) {
tabElements[i] = {
el:$(this),
text: $(this).text(),
left: $(this).position().left,
width: $(this).width()
};
if ($(this).is(li)) {
tabDragIndex = i;
startDragIndex = i;
}
originalTabOrder.push($(this).data("tabId"));
});
ul.children().each(function(i) {
if (i!==tabDragIndex) {
$(this).css({
position: 'absolute',
left: tabElements[i].left+"px",
width: tabElements[i].width+2,
transition: "left 0.3s"
});
}
})
if (!li.hasClass('active')) {
li.css({'zIndex':1});
}
},
drag: function(event,ui) {
ui.position.left += tabElements[tabDragIndex].left+scrollContainer.scrollLeft();
var tabCenter = ui.position.left + tabElements[tabDragIndex].width/2 - scrollContainer.scrollLeft();
for (var i=0;i<tabElements.length;i++) {
if (i === tabDragIndex) {
continue;
}
if (tabCenter > tabElements[i].left && tabCenter < tabElements[i].left+tabElements[i].width) {
if (i < tabDragIndex) {
tabElements[i].left += tabElements[tabDragIndex].width+8;
tabElements[tabDragIndex].el.detach().insertBefore(tabElements[i].el);
} else {
tabElements[i].left -= tabElements[tabDragIndex].width+8;
tabElements[tabDragIndex].el.detach().insertAfter(tabElements[i].el);
}
tabElements[i].el.css({left:tabElements[i].left+"px"});
tabElements.splice(i, 0, tabElements.splice(tabDragIndex, 1)[0]);
tabDragIndex = i;
break;
}
}
},
stop: function(event,ui) {
ul.children().css({position:"relative",left:"",transition:""});
if (!li.hasClass('active')) {
li.css({zIndex:""});
}
updateTabWidths();
if (startDragIndex !== tabDragIndex) {
options.onreorder(originalTabOrder, $.makeArray(ul.children().map(function() { return $(this).data('tabId');})));
}
activateTab(tabElements[tabDragIndex].el.data('tabId'));
}
})
}
setTimeout(function() {
updateTabWidths();
},10);
collapsibleMenu = null;
},
removeTab: removeTab,
activateTab: activateTab,
nextTab: activateNextTab,
previousTab: activatePreviousTab,
resize: updateTabWidths,
count: function() {
return ul.find("li.red-ui-tab").size();
},
contains: function(id) {
return ul.find("a[href='#"+id+"']").length > 0;
},
renameTab: function(id,label) {
tabs[id].label = label;
var tab = ul.find("a[href='#"+id+"']");
tab.attr("title",label);
tab.find("span.bidiAware").text(label).attr('dir', RED.text.bidi.resolveBaseTextDir(label));
updateTabWidths();
},
order: function(order) {
var existingTabOrder = $.makeArray(ul.children().map(function() { return $(this).data('tabId');}));
if (existingTabOrder.length !== order.length) {
return
}
var i;
var match = true;
for (i=0;i<order.length;i++) {
if (order[i] !== existingTabOrder[i]) {
match = false;
break;
}
}
if (match) {
return;
}
var existingTabMap = {};
var existingTabs = ul.children().detach().each(function() {
existingTabMap[$(this).data("tabId")] = $(this);
});
for (i=0;i<order.length;i++) {
existingTabMap[order[i]].appendTo(ul);
}
}
}
}
return {
create: createTabs
}
})();

View File

@@ -1,692 +0,0 @@
/**
* Copyright JS Foundation and other contributors, http://js.foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
**/
(function($) {
var contextParse = function(v) {
var parts = RED.utils.parseContextKey(v);
return {
option: parts.store,
value: parts.key
}
}
var contextExport = function(v,opt) {
if (!opt) {
return v;
}
var store = ((typeof opt === "string")?opt:opt.value)
if (store !== RED.settings.context.default) {
return "#:("+store+")::"+v;
} else {
return v;
}
}
var allOptions = {
msg: {value:"msg",label:"msg.",validate:RED.utils.validatePropertyExpression},
flow: {value:"flow",label:"flow.",hasValue:true,
options:[],
validate:RED.utils.validatePropertyExpression,
parse: contextParse,
export: contextExport
},
global: {value:"global",label:"global.",hasValue:true,
options:[],
validate:RED.utils.validatePropertyExpression,
parse: contextParse,
export: contextExport
},
str: {value:"str",label:"string",icon:"red/images/typedInput/az.png"},
num: {value:"num",label:"number",icon:"red/images/typedInput/09.png",validate:/^[+-]?[0-9]*\.?[0-9]*([eE][-+]?[0-9]+)?$/},
bool: {value:"bool",label:"boolean",icon:"red/images/typedInput/bool.png",options:["true","false"]},
json: {
value:"json",
label:"JSON",
icon:"red/images/typedInput/json.png",
validate: function(v) { try{JSON.parse(v);return true;}catch(e){return false;}},
expand: function() {
var that = this;
var value = this.value();
try {
value = JSON.stringify(JSON.parse(value),null,4);
} catch(err) {
}
RED.editor.editJSON({
value: value,
complete: function(v) {
var value = v;
try {
value = JSON.stringify(JSON.parse(v));
} catch(err) {
}
that.value(value);
}
})
}
},
re: {value:"re",label:"regular expression",icon:"red/images/typedInput/re.png"},
date: {value:"date",label:"timestamp",hasValue:false},
jsonata: {
value: "jsonata",
label: "expression",
icon: "red/images/typedInput/expr.png",
validate: function(v) { try{jsonata(v);return true;}catch(e){return false;}},
expand:function() {
var that = this;
RED.editor.editExpression({
value: this.value().replace(/\t/g,"\n"),
complete: function(v) {
that.value(v.replace(/\n/g,"\t"));
}
})
}
},
bin: {
value: "bin",
label: "buffer",
icon: "red/images/typedInput/bin.png",
expand: function() {
var that = this;
RED.editor.editBuffer({
value: this.value(),
complete: function(v) {
that.value(v);
}
})
}
},
env: {
value: "env",
label: "env variable",
icon: "red/images/typedInput/env.png"
}
};
var nlsd = false;
$.widget( "nodered.typedInput", {
_create: function() {
try {
if (!nlsd && RED && RED._) {
for (var i in allOptions) {
if (allOptions.hasOwnProperty(i)) {
allOptions[i].label = RED._("typedInput.type."+i,{defaultValue:allOptions[i].label});
}
}
var contextStores = RED.settings.context.stores;
var contextOptions = contextStores.map(function(store) {
return {value:store,label: store, icon:'<i class="red-ui-typedInput-icon fa fa-database" style="color: #'+(store==='memory'?'ddd':'777')+'"></i>'}
})
if (contextOptions.length < 2) {
allOptions.flow.options = [];
allOptions.global.options = [];
} else {
allOptions.flow.options = contextOptions;
allOptions.global.options = contextOptions;
}
}
nlsd = true;
var that = this;
this.disarmClick = false;
this.input = $('<input type="text"></input>');
this.input.insertAfter(this.element);
this.input.val(this.element.val());
this.element.addClass('red-ui-typedInput');
this.uiWidth = this.element.outerWidth();
this.elementDiv = this.input.wrap("<div>").parent().addClass('red-ui-typedInput-input');
this.uiSelect = this.elementDiv.wrap( "<div>" ).parent();
var attrStyle = this.element.attr('style');
var m;
if ((m = /width\s*:\s*(calc\s*\(.*\)|\d+(%|px))/i.exec(attrStyle)) !== null) {
this.input.css('width','100%');
this.uiSelect.width(m[1]);
this.uiWidth = null;
} else {
this.uiSelect.width(this.uiWidth);
}
["Right","Left"].forEach(function(d) {
var m = that.element.css("margin"+d);
that.uiSelect.css("margin"+d,m);
that.input.css("margin"+d,0);
});
this.uiSelect.addClass("red-ui-typedInput-container");
this.element.attr('type','hidden');
this.options.types = this.options.types||Object.keys(allOptions);
this.selectTrigger = $('<button tabindex="0"></button>').prependTo(this.uiSelect);
$('<i class="red-ui-typedInput-icon fa fa-sort-desc"></i>').toggle(this.options.types.length > 1).appendTo(this.selectTrigger);
this.selectLabel = $('<span class="red-ui-typedInput-type-label"></span>').appendTo(this.selectTrigger);
this.types(this.options.types);
if (this.options.typeField) {
this.typeField = $(this.options.typeField).hide();
var t = this.typeField.val();
if (t && this.typeMap[t]) {
this.options.default = t;
}
} else {
this.typeField = $("<input>",{type:'hidden'}).appendTo(this.uiSelect);
}
this.input.on('focus', function() {
that.uiSelect.addClass('red-ui-typedInput-focus');
});
this.input.on('blur', function() {
that.uiSelect.removeClass('red-ui-typedInput-focus');
});
this.input.on('change', function() {
that.validate();
that.element.val(that.value());
that.element.trigger('change',that.propertyType,that.value());
})
this.selectTrigger.click(function(event) {
event.preventDefault();
that._showTypeMenu();
});
this.selectTrigger.on('keydown',function(evt) {
if (evt.keyCode === 40) {
// Down
that._showTypeMenu();
}
}).on('focus', function() {
that.uiSelect.addClass('red-ui-typedInput-focus');
})
// explicitly set optionSelectTrigger display to inline-block otherwise jQ sets it to 'inline'
this.optionSelectTrigger = $('<button tabindex="0" class="red-ui-typedInput-option-trigger" style="display:inline-block"><span class="red-ui-typedInput-option-caret"><i class="red-ui-typedInput-icon fa fa-sort-desc"></i></span></button>').appendTo(this.uiSelect);
this.optionSelectLabel = $('<span class="red-ui-typedInput-option-label"></span>').prependTo(this.optionSelectTrigger);
RED.popover.tooltip(this.optionSelectLabel,function() {
return that.optionValue;
});
this.optionSelectTrigger.click(function(event) {
event.preventDefault();
that._showOptionSelectMenu();
}).on('keydown', function(evt) {
if (evt.keyCode === 40) {
// Down
that._showOptionSelectMenu();
}
}).on('blur', function() {
that.uiSelect.removeClass('red-ui-typedInput-focus');
}).on('focus', function() {
that.uiSelect.addClass('red-ui-typedInput-focus');
});
this.optionExpandButton = $('<button tabindex="0" class="red-ui-typedInput-option-expand" style="display:inline-block"><i class="red-ui-typedInput-icon fa fa-ellipsis-h"></i></button>').appendTo(this.uiSelect);
this.type(this.options.default||this.typeList[0].value);
}catch(err) {
console.log(err.stack);
}
},
_showTypeMenu: function() {
if (this.typeList.length > 1) {
this._showMenu(this.menu,this.selectTrigger);
this.menu.find("[value='"+this.propertyType+"']").focus();
} else {
this.input.focus();
}
},
_showOptionSelectMenu: function() {
if (this.optionMenu) {
this.optionMenu.css({
minWidth:this.optionSelectLabel.width()
});
this._showMenu(this.optionMenu,this.optionSelectTrigger);
var selectedOption = this.optionMenu.find("[value='"+this.optionValue+"']");
if (selectedOption.length === 0) {
selectedOption = this.optionMenu.children(":first");
}
selectedOption.focus();
}
},
_hideMenu: function(menu) {
$(document).off("mousedown.close-property-select");
menu.hide();
if (this.elementDiv.is(":visible")) {
this.input.focus();
} else if (this.optionSelectTrigger.is(":visible")){
this.optionSelectTrigger.focus();
} else {
this.selectTrigger.focus();
}
},
_createMenu: function(opts,callback) {
var that = this;
var menu = $("<div>").addClass("red-ui-typedInput-options");
opts.forEach(function(opt) {
if (typeof opt === 'string') {
opt = {value:opt,label:opt};
}
var op = $('<a href="#"></a>').attr("value",opt.value).appendTo(menu);
if (opt.label) {
op.text(opt.label);
}
if (opt.icon) {
if (opt.icon.indexOf("<") === 0) {
$(opt.icon).prependTo(op);
} else if (opt.icon.indexOf("/") !== -1) {
$('<img>',{src:opt.icon,style:"margin-right: 4px; height: 18px;"}).prependTo(op);
} else {
$('<i>',{class:"red-ui-typedInput-icon "+opt.icon}).prependTo(op);
}
} else {
op.css({paddingLeft: "18px"});
}
if (!opt.icon && !opt.label) {
op.text(opt.value);
}
op.click(function(event) {
event.preventDefault();
callback(opt.value);
that._hideMenu(menu);
});
});
menu.css({
display: "none",
});
menu.appendTo(document.body);
menu.on('keydown', function(evt) {
if (evt.keyCode === 40) {
// DOWN
$(this).children(":focus").next().focus();
} else if (evt.keyCode === 38) {
// UP
$(this).children(":focus").prev().focus();
} else if (evt.keyCode === 27) {
that._hideMenu(menu);
}
})
return menu;
},
_showMenu: function(menu,relativeTo) {
if (this.disarmClick) {
this.disarmClick = false;
return
}
var that = this;
var pos = relativeTo.offset();
var height = relativeTo.height();
var menuHeight = menu.height();
var top = (height+pos.top-3);
if (top+menuHeight > $(window).height()) {
top -= (top+menuHeight)-$(window).height()+5;
}
menu.css({
top: top+"px",
left: (2+pos.left)+"px",
});
menu.slideDown(100);
this._delay(function() {
that.uiSelect.addClass('red-ui-typedInput-focus');
$(document).on("mousedown.close-property-select", function(event) {
if(!$(event.target).closest(menu).length) {
that._hideMenu(menu);
}
if ($(event.target).closest(relativeTo).length) {
that.disarmClick = true;
event.preventDefault();
}
})
});
},
_getLabelWidth: function(label) {
var labelWidth = label.outerWidth();
if (labelWidth === 0) {
var container = $('<div class="red-ui-typedInput-container"></div>').css({
position:"absolute",
top:0,
left:-1000
}).appendTo(document.body);
var newTrigger = label.clone().appendTo(container);
labelWidth = newTrigger.outerWidth();
container.remove();
}
return labelWidth;
},
_resize: function() {
if (this.uiWidth !== null) {
this.uiSelect.width(this.uiWidth);
}
var type = this.typeMap[this.propertyType];
if (type && type.hasValue === false) {
this.selectTrigger.addClass("red-ui-typedInput-full-width");
} else {
this.selectTrigger.removeClass("red-ui-typedInput-full-width");
var labelWidth = this._getLabelWidth(this.selectTrigger);
this.elementDiv.css('left',labelWidth+"px");
if (this.optionExpandButton.is(":visible")) {
this.elementDiv.css('right',"22px");
} else {
this.elementDiv.css('right','0');
this.input.css({
'border-top-right-radius': '4px',
'border-bottom-right-radius': '4px'
});
}
// if (this.optionSelectTrigger) {
// this.optionSelectTrigger.css({'left':(labelWidth)+"px",'width':'calc( 100% - '+labelWidth+'px )'});
// }
if (this.optionSelectTrigger) {
if (type && type.options && type.hasValue === true) {
this.optionSelectLabel.css({'left':'auto'})
var lw = this._getLabelWidth(this.optionSelectLabel);
this.optionSelectTrigger.css({'width':(23+lw)+"px"});
this.elementDiv.css('right',(23+lw)+"px");
this.input.css({
'border-top-right-radius': 0,
'border-bottom-right-radius': 0
});
} else {
this.optionSelectLabel.css({'left':'0'})
this.optionSelectTrigger.css({'width':'calc( 100% - '+labelWidth+'px )'});
if (!this.optionExpandButton.is(":visible")) {
this.elementDiv.css({'right':0});
this.input.css({
'border-top-right-radius': '4px',
'border-bottom-right-radius': '4px'
});
}
}
}
}
},
_updateOptionSelectLabel: function(o) {
var opt = this.typeMap[this.propertyType];
this.optionSelectLabel.empty();
if (o.icon) {
if (o.icon.indexOf("<") === 0) {
$(o.icon).prependTo(this.optionSelectLabel);
} else if (o.icon.indexOf("/") !== -1) {
// url
$('<img>',{src:o.icon,style:"height: 18px;"}).prependTo(this.optionSelectLabel);
} else {
// icon class
$('<i>',{class:"red-ui-typedInput-icon "+o.icon}).prependTo(this.optionSelectLabel);
}
} else if (o.label) {
this.optionSelectLabel.text(o.label);
} else {
this.optionSelectLabel.text(o.value);
}
if (opt.hasValue) {
this.optionValue = o.value;
this._resize();
this.input.trigger('change',this.propertyType,this.value());
}
},
_destroy: function() {
if (this.optionMenu) {
this.optionMenu.remove();
}
this.menu.remove();
},
types: function(types) {
var that = this;
var currentType = this.type();
this.typeMap = {};
this.typeList = types.map(function(opt) {
var result;
if (typeof opt === 'string') {
result = allOptions[opt];
} else {
result = opt;
}
that.typeMap[result.value] = result;
return result;
});
this.selectTrigger.toggleClass("disabled", this.typeList.length === 1);
this.selectTrigger.find(".fa-sort-desc").toggle(this.typeList.length > 1)
if (this.menu) {
this.menu.remove();
}
this.menu = this._createMenu(this.typeList, function(v) { that.type(v) });
if (currentType && !this.typeMap.hasOwnProperty(currentType)) {
this.type(this.typeList[0].value);
} else {
this.propertyType = null;
this.type(currentType);
}
setTimeout(function() {that._resize();},0);
},
width: function(desiredWidth) {
this.uiWidth = desiredWidth;
this._resize();
},
value: function(value) {
if (!arguments.length) {
var v = this.input.val();
if (this.typeMap[this.propertyType].export) {
v = this.typeMap[this.propertyType].export(v,this.optionValue)
}
return v;
} else {
var selectedOption;
if (this.typeMap[this.propertyType].options) {
for (var i=0;i<this.typeMap[this.propertyType].options.length;i++) {
var op = this.typeMap[this.propertyType].options[i];
if (typeof op === "string") {
if (op === value) {
selectedOption = this.activeOptions[op];
break;
}
} else if (op.value === value) {
selectedOption = op;
break;
}
}
if (!selectedOption) {
selectedOption = {value:""}
}
this._updateOptionSelectLabel(selectedOption)
}
this.input.val(value);
this.input.trigger('change',this.type(),value);
}
},
type: function(type) {
if (!arguments.length) {
return this.propertyType;
} else {
var that = this;
var opt = this.typeMap[type];
if (opt && this.propertyType !== type) {
this.propertyType = type;
if (this.typeField) {
this.typeField.val(type);
}
this.selectLabel.empty();
var image;
if (opt.icon) {
image = new Image();
image.name = opt.icon;
image.src = opt.icon;
$('<img>',{src:opt.icon,style:"margin-right: 4px;height: 18px;"}).prependTo(this.selectLabel);
} else {
this.selectLabel.text(opt.label);
}
if (opt.options) {
if (this.optionExpandButton) {
this.optionExpandButton.hide();
}
if (this.optionSelectTrigger) {
this.optionSelectTrigger.show();
if (!opt.hasValue) {
this.elementDiv.hide();
} else {
this.elementDiv.show();
}
this.activeOptions = {};
opt.options.forEach(function(o) {
if (typeof o === 'string') {
that.activeOptions[o] = {label:o,value:o};
} else {
that.activeOptions[o.value] = o;
}
});
if (!that.activeOptions.hasOwnProperty(that.optionValue)) {
that.optionValue = null;
}
this.optionMenu = this._createMenu(opt.options,function(v){
that._updateOptionSelectLabel(that.activeOptions[v]);
if (!opt.hasValue) {
that.value(that.activeOptions[v].value)
}
});
var op;
if (!opt.hasValue) {
var currentVal = this.input.val();
var validValue = false;
for (var i=0;i<opt.options.length;i++) {
op = opt.options[i];
if (typeof op === "string" && op === currentVal) {
that._updateOptionSelectLabel({value:currentVal});
validValue = true;
break;
} else if (op.value === currentVal) {
that._updateOptionSelectLabel(op);
validValue = true;
break;
}
}
if (!validValue) {
op = opt.options[0];
if (typeof op === "string") {
this.value(op);
that._updateOptionSelectLabel({value:op});
} else {
this.value(op.value);
that._updateOptionSelectLabel(op);
}
}
} else {
var selectedOption = this.optionValue||opt.options[0];
if (opt.parse) {
var parts = opt.parse(this.input.val());
if (parts.option) {
selectedOption = parts.option;
if (!this.activeOptions.hasOwnProperty(selectedOption)) {
parts.option = Object.keys(this.activeOptions)[0];
selectedOption = parts.option
}
}
this.input.val(parts.value);
if (opt.export) {
this.element.val(opt.export(parts.value,parts.option||selectedOption));
}
}
if (typeof selectedOption === "string") {
this.optionValue = selectedOption;
if (!this.activeOptions.hasOwnProperty(selectedOption)) {
selectedOption = Object.keys(this.activeOptions)[0];
}
if (!selectedOption) {
this.optionSelectTrigger.hide();
} else {
this._updateOptionSelectLabel(this.activeOptions[selectedOption]);
}
} else if (selectedOption) {
this.optionValue = selectedOption.value;
this._updateOptionSelectLabel(selectedOption);
} else {
this.optionSelectTrigger.hide();
}
}
}
} else {
if (this.optionMenu) {
this.optionMenu.remove();
this.optionMenu = null;
}
if (this.optionSelectTrigger) {
this.optionSelectTrigger.hide();
}
if (opt.hasValue === false) {
this.oldValue = this.input.val();
this.input.val("");
this.elementDiv.hide();
} else {
if (this.oldValue !== undefined) {
this.input.val(this.oldValue);
delete this.oldValue;
}
this.elementDiv.show();
}
if (this.optionExpandButton) {
if (opt.expand && typeof opt.expand === 'function') {
this.optionExpandButton.show();
this.optionExpandButton.off('click');
this.optionExpandButton.on('click',function(evt) {
evt.preventDefault();
opt.expand.call(that);
})
} else {
this.optionExpandButton.hide();
}
}
this.input.trigger('change',this.propertyType,this.value());
}
if (image) {
image.onload = function() { that._resize(); }
image.onerror = function() { that._resize(); }
} else {
this._resize();
}
}
}
},
validate: function() {
var result;
var value = this.value();
var type = this.type();
if (this.typeMap[type] && this.typeMap[type].validate) {
var val = this.typeMap[type].validate;
if (typeof val === 'function') {
result = val(value);
} else {
result = val.test(value);
}
} else {
result = true;
}
if (result) {
this.uiSelect.removeClass('input-error');
} else {
this.uiSelect.addClass('input-error');
}
return result;
},
show: function() {
this.uiSelect.show();
this._resize();
},
hide: function() {
this.uiSelect.hide();
}
});
})(jQuery);

View File

@@ -1,118 +0,0 @@
/**
* Copyright JS Foundation and other contributors, http://js.foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
**/
RED.editor.types._json = (function() {
var template = '<script type="text/x-red" data-template-name="_json"><div class="form-row" style="margin-bottom: 3px; text-align: right;"><button id="node-input-json-reformat" class="editor-button editor-button-small"><span data-i18n="jsonEditor.format"></span></button></div><div class="form-row node-text-editor-row"><div style="height: 200px;min-height: 150px;" class="node-text-editor" id="node-input-json"></div></div></script>';
return {
init: function() {
$(template).appendTo(document.body);
},
show: function(options) {
var value = options.value;
var onComplete = options.complete;
var type = "_json"
RED.view.state(RED.state.EDITING);
var expressionEditor;
var changeTimer;
var checkValid = function() {
var v = expressionEditor.getValue();
try {
JSON.parse(v);
$("#node-dialog-ok").removeClass('disabled');
return true;
} catch(err) {
$("#node-dialog-ok").addClass('disabled');
return false;
}
}
var trayOptions = {
title: options.title,
width: "inherit",
buttons: [
{
id: "node-dialog-cancel",
text: RED._("common.label.cancel"),
click: function() {
RED.tray.close();
}
},
{
id: "node-dialog-ok",
text: RED._("common.label.done"),
class: "primary",
click: function() {
if (options.requireValid && !checkValid()) {
return;
}
onComplete(expressionEditor.getValue());
RED.tray.close();
}
}
],
resize: function(dimensions) {
var rows = $("#dialog-form>div:not(.node-text-editor-row)");
var editorRow = $("#dialog-form>div.node-text-editor-row");
var height = $("#dialog-form").height();
for (var i=0;i<rows.size();i++) {
height -= $(rows[i]).outerHeight(true);
}
height -= (parseInt($("#dialog-form").css("marginTop"))+parseInt($("#dialog-form").css("marginBottom")));
$(".node-text-editor").css("height",height+"px");
expressionEditor.resize();
},
open: function(tray) {
var trayBody = tray.find('.editor-tray-body');
var dialogForm = RED.editor.buildEditForm(tray.find('.editor-tray-body'),'dialog-form',type,'editor');
expressionEditor = RED.editor.createEditor({
id: 'node-input-json',
value: "",
mode:"ace/mode/json"
});
expressionEditor.getSession().setValue(value||"",-1);
if (options.requireValid) {
expressionEditor.getSession().on('change', function() {
clearTimeout(changeTimer);
changeTimer = setTimeout(checkValid,200);
});
checkValid();
}
$("#node-input-json-reformat").click(function(evt) {
evt.preventDefault();
var v = expressionEditor.getValue()||"";
try {
v = JSON.stringify(JSON.parse(v),null,4);
} catch(err) {
// TODO: do an optimistic auto-format
}
expressionEditor.getSession().setValue(v||"",-1);
});
dialogForm.i18n();
},
close: function() {
expressionEditor.destroy();
if (options.onclose) {
options.onclose();
}
},
show: function() {}
}
RED.tray.show(trayOptions);
}
}
})();

View File

@@ -1,501 +0,0 @@
/**
* Copyright JS Foundation and other contributors, http://js.foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
**/
RED.library = (function() {
var exportToLibraryDialog;
var elementPrefix = "node-input-";
var _librarySaveConfirm = '<div id="node-dialog-library-save-confirm" class="hide"><form class="form-horizontal"><div style="text-align: center; padding-top: 30px;" id="node-dialog-library-save-content"></div></form></div>';
var _librarySave = '<div id="node-dialog-library-save" class="hide"><form class="form-horizontal"><div class="form-row"><label for="node-dialog-library-save-folder" data-i18n="[append]library.folder"><i class="fa fa-folder-open"></i> </label><input type="text" id="node-dialog-library-save-folder" data-i18n="[placeholder]library.folderPlaceholder"></div><div class="form-row"><label for="node-dialog-library-save-filename" data-i18n="[append]library.filename"><i class="fa fa-file"></i> </label><input type="text" id="node-dialog-library-save-filename" data-i18n="[placeholder]library.filenamePlaceholder"></div></form></div>';
var _libraryLookup = '<div id="node-dialog-library-lookup" class="hide"><form class="form-horizontal"><div class="form-row"><ul id="node-dialog-library-breadcrumbs" class="breadcrumb"><li class="active"><a href="#" data-i18n="[append]library.breadcrumb"></a></li></ul></div><div class="form-row"><div style="vertical-align: top; display: inline-block; height: 100%; width: 30%; padding-right: 20px;"><div id="node-select-library" style="border: 1px solid #999; width: 100%; height: 100%; overflow:scroll;"><ul></ul></div></div><div style="vertical-align: top; display: inline-block;width: 65%; height: 100%;"><div style="height: 100%; width: 95%;" class="node-text-editor" id="node-select-library-text" ></div></div></div></form></div>';
function loadFlowLibrary() {
$.getJSON("library/flows",function(data) {
//console.log(data);
var buildMenu = function(data,root) {
var i;
var li;
var a;
var ul = document.createElement("ul");
if (root === "") {
ul.id = "menu-item-import-library-submenu";
}
ul.className = "dropdown-menu";
if (data.d) {
for (i in data.d) {
if (data.d.hasOwnProperty(i)) {
li = document.createElement("li");
li.className = "dropdown-submenu pull-left";
a = document.createElement("a");
a.href="#";
var label = i.replace(/^@.*\//,"").replace(/^node-red-contrib-/,"").replace(/^node-red-node-/,"").replace(/-/," ").replace(/_/," ");
a.innerHTML = label;
li.appendChild(a);
li.appendChild(buildMenu(data.d[i],root+(root!==""?"/":"")+i));
ul.appendChild(li);
}
}
}
if (data.f) {
for (i in data.f) {
if (data.f.hasOwnProperty(i)) {
li = document.createElement("li");
a = document.createElement("a");
a.href="#";
a.innerHTML = data.f[i];
a.flowName = root+(root!==""?"/":"")+data.f[i];
a.onclick = function() {
$.get('library/flows/'+this.flowName, function(data) {
RED.view.importNodes(data);
});
};
li.appendChild(a);
ul.appendChild(li);
}
}
}
return ul;
};
var examples;
if (data.d && data.d._examples_) {
examples = data.d._examples_;
delete data.d._examples_;
}
var menu = buildMenu(data,"");
$("#menu-item-import-examples").remove();
if (examples) {
RED.menu.addItem("menu-item-import",{id:"menu-item-import-examples",label:RED._("menu.label.examples"),options:[]})
$("#menu-item-import-examples-submenu").replaceWith(buildMenu(examples,"_examples_"));
}
//TODO: need an api in RED.menu for this
$("#menu-item-import-library-submenu").replaceWith(menu);
});
}
function createUI(options) {
var libraryData = {};
var selectedLibraryItem = null;
var libraryEditor = null;
elementPrefix = options.elementPrefix || "node-input-";
// Orion editor has set/getText
// ACE editor has set/getValue
// normalise to set/getValue
if (options.editor.setText) {
// Orion doesn't like having pos passed in, so proxy the call to drop it
options.editor.setValue = function(text,pos) {
options.editor.setText.call(options.editor,text);
}
}
if (options.editor.getText) {
options.editor.getValue = options.editor.getText;
}
function buildFileListItem(item) {
var li = document.createElement("li");
li.onmouseover = function(e) { $(this).addClass("list-hover"); };
li.onmouseout = function(e) { $(this).removeClass("list-hover"); };
return li;
}
function buildFileList(root,data) {
var ul = document.createElement("ul");
var li;
for (var i=0; i<data.length; i++) {
var v = data[i];
if (typeof v === "string") {
// directory
li = buildFileListItem(v);
li.onclick = (function () {
var dirName = v;
return function(e) {
var bcli = $('<li class="active"><span class="divider">/</span> <a href="#">'+dirName+'</a></li>');
$("a",bcli).click(function(e) {
$(this).parent().nextAll().remove();
$.getJSON("library/"+options.url+root+dirName,function(data) {
$("#node-select-library").children().first().replaceWith(buildFileList(root+dirName+"/",data));
});
e.stopPropagation();
});
var bc = $("#node-dialog-library-breadcrumbs");
$(".active",bc).removeClass("active");
bc.append(bcli);
$.getJSON("library/"+options.url+root+dirName,function(data) {
$("#node-select-library").children().first().replaceWith(buildFileList(root+dirName+"/",data));
});
}
})();
li.innerHTML = '<i class="fa fa-folder"></i> '+v+"</i>";
ul.appendChild(li);
} else {
// file
li = buildFileListItem(v);
li.innerHTML = v.name;
li.onclick = (function() {
var item = v;
return function(e) {
$(".list-selected",ul).removeClass("list-selected");
$(this).addClass("list-selected");
$.get("library/"+options.url+root+item.fn, function(data) {
selectedLibraryItem = item;
libraryEditor.setValue(data,-1);
});
}
})();
ul.appendChild(li);
}
}
return ul;
}
$('#'+elementPrefix+"name").css("width","calc(100% - 52px)").after(
'<div class="btn-group" style="margin-left:5px;">'+
'<a id="node-input-'+options.type+'-lookup" class="editor-button" data-toggle="dropdown"><i class="fa fa-book"></i> <i class="fa fa-caret-down"></i></a>'+
'<ul class="dropdown-menu pull-right" role="menu">'+
'<li><a id="node-input-'+options.type+'-menu-open-library" tabindex="-1" href="#">'+RED._("library.openLibrary")+'</a></li>'+
'<li><a id="node-input-'+options.type+'-menu-save-library" tabindex="-1" href="#">'+RED._("library.saveToLibrary")+'</a></li>'+
'</ul></div>'
);
$('#node-input-'+options.type+'-menu-open-library').click(function(e) {
$("#node-select-library").children().remove();
var bc = $("#node-dialog-library-breadcrumbs");
bc.children().first().nextAll().remove();
libraryEditor.setValue('',-1);
$.getJSON("library/"+options.url,function(data) {
$("#node-select-library").append(buildFileList("/",data));
$("#node-dialog-library-breadcrumbs a").click(function(e) {
$(this).parent().nextAll().remove();
$("#node-select-library").children().first().replaceWith(buildFileList("/",data));
e.stopPropagation();
});
$( "#node-dialog-library-lookup" ).dialog( "open" );
});
e.preventDefault();
});
$('#node-input-'+options.type+'-menu-save-library').click(function(e) {
//var found = false;
var name = $("#"+elementPrefix+"name").val().replace(/(^\s*)|(\s*$)/g,"");
//var buildPathList = function(data,root) {
// var paths = [];
// if (data.d) {
// for (var i in data.d) {
// var dn = root+(root==""?"":"/")+i;
// var d = {
// label:dn,
// files:[]
// };
// for (var f in data.d[i].f) {
// d.files.push(data.d[i].f[f].fn.split("/").slice(-1)[0]);
// }
// paths.push(d);
// paths = paths.concat(buildPathList(data.d[i],root+(root==""?"":"/")+i));
// }
// }
// return paths;
//};
$("#node-dialog-library-save-folder").attr("value","");
var filename = name.replace(/[^\w-]/g,"-");
if (filename === "") {
filename = "unnamed-"+options.type;
}
$("#node-dialog-library-save-filename").attr("value",filename+".js");
//var paths = buildPathList(libraryData,"");
//$("#node-dialog-library-save-folder").autocomplete({
// minLength: 0,
// source: paths,
// select: function( event, ui ) {
// $("#node-dialog-library-save-filename").autocomplete({
// minLength: 0,
// source: ui.item.files
// });
// }
//});
$( "#node-dialog-library-save" ).dialog( "open" );
e.preventDefault();
});
libraryEditor = ace.edit('node-select-library-text');
libraryEditor.setTheme("ace/theme/tomorrow");
if (options.mode) {
libraryEditor.getSession().setMode(options.mode);
}
libraryEditor.setOptions({
readOnly: true,
highlightActiveLine: false,
highlightGutterLine: false
});
libraryEditor.renderer.$cursorLayer.element.style.opacity=0;
libraryEditor.$blockScrolling = Infinity;
$( "#node-dialog-library-lookup" ).dialog({
title: RED._("library.typeLibrary", {type:options.type}),
modal: true,
autoOpen: false,
width: 800,
height: 450,
buttons: [
{
text: RED._("common.label.cancel"),
click: function() {
$( this ).dialog( "close" );
}
},
{
text: RED._("common.label.load"),
class: "primary",
click: function() {
if (selectedLibraryItem) {
for (var i=0; i<options.fields.length; i++) {
var field = options.fields[i];
$("#"+elementPrefix+field).val(selectedLibraryItem[field]);
}
options.editor.setValue(libraryEditor.getValue(),-1);
}
$( this ).dialog( "close" );
}
}
],
open: function(e) {
var form = $("form",this);
form.height(form.parent().height()-30);
$("#node-select-library-text").height("100%");
$(".form-row:last-child",form).children().height(form.height()-60);
},
resize: function(e) {
var form = $("form",this);
form.height(form.parent().height()-30);
$(".form-row:last-child",form).children().height(form.height()-60);
}
});
function saveToLibrary(overwrite) {
var name = $("#"+elementPrefix+"name").val().replace(/(^\s*)|(\s*$)/g,"");
if (name === "") {
name = RED._("library.unnamedType",{type:options.type});
}
var filename = $("#node-dialog-library-save-filename").val().replace(/(^\s*)|(\s*$)/g,"");
var pathname = $("#node-dialog-library-save-folder").val().replace(/(^\s*)|(\s*$)/g,"");
if (filename === "" || !/.+\.js$/.test(filename)) {
RED.notify(RED._("library.invalidFilename"),"warning");
return;
}
var fullpath = pathname+(pathname===""?"":"/")+filename;
if (!overwrite) {
//var pathnameParts = pathname.split("/");
//var exists = false;
//var ds = libraryData;
//for (var pnp in pathnameParts) {
// if (ds.d && pathnameParts[pnp] in ds.d) {
// ds = ds.d[pathnameParts[pnp]];
// } else {
// ds = null;
// break;
// }
//}
//if (ds && ds.f) {
// for (var f in ds.f) {
// if (ds.f[f].fn == fullpath) {
// exists = true;
// break;
// }
// }
//}
//if (exists) {
// $("#node-dialog-library-save-content").html(RED._("library.dialogSaveOverwrite",{libraryType:options.type,libraryName:fullpath}));
// $("#node-dialog-library-save-confirm").dialog( "open" );
// return;
//}
}
var queryArgs = [];
var data = {};
for (var i=0; i<options.fields.length; i++) {
var field = options.fields[i];
if (field == "name") {
data.name = name;
} else {
data[field] = $("#"+elementPrefix+field).val();
}
}
data.text = options.editor.getValue();
$.ajax({
url:"library/"+options.url+'/'+fullpath,
type: "POST",
data: JSON.stringify(data),
contentType: "application/json; charset=utf-8"
}).done(function(data,textStatus,xhr) {
RED.notify(RED._("library.savedType", {type:options.type}),"success");
}).fail(function(xhr,textStatus,err) {
if (xhr.status === 401) {
RED.notify(RED._("library.saveFailed",{message:RED._("user.notAuthorized")}),"error");
} else {
RED.notify(RED._("library.saveFailed",{message:xhr.responseText}),"error");
}
});
}
$( "#node-dialog-library-save-confirm" ).dialog({
title: RED._("library.saveToLibrary"),
modal: true,
autoOpen: false,
width: 530,
height: 230,
buttons: [
{
text: RED._("common.label.cancel"),
click: function() {
$( this ).dialog( "close" );
}
},
{
text: RED._("common.label.save"),
class: "primary",
click: function() {
saveToLibrary(true);
$( this ).dialog( "close" );
}
}
]
});
$( "#node-dialog-library-save" ).dialog({
title: RED._("library.saveToLibrary"),
modal: true,
autoOpen: false,
width: 530,
height: 230,
buttons: [
{
text: RED._("common.label.cancel"),
click: function() {
$( this ).dialog( "close" );
}
},
{
text: RED._("common.label.save"),
class: "primary",
click: function() {
saveToLibrary(false);
$( this ).dialog( "close" );
}
}
]
});
}
function exportFlow() {
//TODO: don't rely on the main dialog
var nns = RED.nodes.createExportableNodeSet(RED.view.selection().nodes);
$("#node-input-library-filename").attr('nodes',JSON.stringify(nns));
exportToLibraryDialog.dialog( "open" );
}
return {
init: function() {
$(_librarySave).appendTo(document.body);
$(_librarySaveConfirm).appendTo(document.body);
$(_libraryLookup).appendTo(document.body);
RED.actions.add("core:library-export",exportFlow);
RED.events.on("view:selection-changed",function(selection) {
if (!selection.nodes) {
RED.menu.setDisabled("menu-item-export-library",true);
} else {
RED.menu.setDisabled("menu-item-export-library",false);
}
});
if (RED.settings.theme("menu.menu-item-import-library") !== false) {
loadFlowLibrary();
}
exportToLibraryDialog = $('<div id="library-dialog" class="hide"><form class="dialog-form form-horizontal"></form></div>')
.appendTo("body")
.dialog({
modal: true,
autoOpen: false,
width: 500,
resizable: false,
title: RED._("library.exportToLibrary"),
buttons: [
{
id: "library-dialog-cancel",
text: RED._("common.label.cancel"),
click: function() {
$( this ).dialog( "close" );
}
},
{
id: "library-dialog-ok",
class: "primary",
text: RED._("common.label.export"),
click: function() {
//TODO: move this to RED.library
var flowName = $("#node-input-library-filename").val();
if (!/^\s*$/.test(flowName)) {
$.ajax({
url:'library/flows/'+flowName,
type: "POST",
data: $("#node-input-library-filename").attr('nodes'),
contentType: "application/json; charset=utf-8"
}).done(function() {
RED.library.loadFlowLibrary();
RED.notify(RED._("library.savedNodes"),"success");
}).fail(function(xhr,textStatus,err) {
if (xhr.status === 401) {
RED.notify(RED._("library.saveFailed",{message:RED._("user.notAuthorized")}),"error");
} else {
RED.notify(RED._("library.saveFailed",{message:xhr.responseText}),"error");
}
});
}
$( this ).dialog( "close" );
}
}
],
open: function(e) {
$(this).parent().find(".ui-dialog-titlebar-close").hide();
},
close: function(e) {
}
});
exportToLibraryDialog.children(".dialog-form").append($(
'<div class="form-row">'+
'<label for="node-input-library-filename" data-i18n="[append]editor:library.filename"><i class="fa fa-file"></i> </label>'+
'<input type="text" id="node-input-library-filename" data-i18n="[placeholder]editor:library.fullFilenamePlaceholder">'+
'<input type="text" style="display: none;" />'+ // Second hidden input to prevent submit on Enter
'</div>'
));
},
create: createUI,
loadFlowLibrary: loadFlowLibrary,
export: exportFlow
}
})();

View File

@@ -1,537 +0,0 @@
/**
* Copyright JS Foundation and other contributors, http://js.foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
**/
RED.palette = (function() {
var exclusion = ['config','unknown','deprecated'];
var coreCategories = ['subflows', 'input', 'output', 'function', 'social', 'mobile', 'storage', 'analysis', 'advanced'];
var categoryContainers = {};
function createCategory(originalCategory,rootCategory,category,ns) {
if ($("#palette-base-category-"+rootCategory).length === 0) {
createCategoryContainer(originalCategory,rootCategory, ns+":palette.label."+rootCategory);
}
$("#palette-container-"+rootCategory).show();
if ($("#palette-"+category).length === 0) {
$("#palette-base-category-"+rootCategory).append('<div id="palette-'+category+'"></div>');
}
}
function createCategoryContainer(originalCategory,category, labelId) {
var label = RED._(labelId, {defaultValue:category});
label = (label || category).replace(/_/g, " ");
var catDiv = $('<div id="palette-container-'+category+'" class="palette-category palette-close hide">'+
'<div id="palette-header-'+category+'" class="palette-header"><i class="expanded fa fa-angle-down"></i><span>'+label+'</span></div>'+
'<div class="palette-content" id="palette-base-category-'+category+'">'+
'<div id="palette-'+category+'-input"></div>'+
'<div id="palette-'+category+'-output"></div>'+
'<div id="palette-'+category+'-function"></div>'+
'</div>'+
'</div>').appendTo("#palette-container");
catDiv.data('category',originalCategory);
catDiv.data('label',label);
categoryContainers[category] = {
container: catDiv,
close: function() {
catDiv.removeClass("palette-open");
catDiv.addClass("palette-closed");
$("#palette-base-category-"+category).slideUp();
$("#palette-header-"+category+" i").removeClass("expanded");
},
open: function() {
catDiv.addClass("palette-open");
catDiv.removeClass("palette-closed");
$("#palette-base-category-"+category).slideDown();
$("#palette-header-"+category+" i").addClass("expanded");
},
toggle: function() {
if (catDiv.hasClass("palette-open")) {
categoryContainers[category].close();
} else {
categoryContainers[category].open();
}
}
};
$("#palette-header-"+category).on('click', function(e) {
categoryContainers[category].toggle();
});
}
function setLabel(type, el,label, info) {
var nodeWidth = 82;
var nodeHeight = 25;
var lineHeight = 20;
var portHeight = 10;
var words = label.split(/[ -]/);
var displayLines = [];
var currentLine = words[0];
var currentLineWidth = RED.view.calculateTextWidth(currentLine, "palette_label", 0);
for (var i=1;i<words.length;i++) {
var newWidth = RED.view.calculateTextWidth(currentLine+" "+words[i], "palette_label", 0);
if (newWidth < nodeWidth) {
currentLine += " "+words[i];
currentLineWidth = newWidth;
} else {
displayLines.push(currentLine);
currentLine = words[i];
currentLineWidth = RED.view.calculateTextWidth(currentLine, "palette_label", 0);
}
}
displayLines.push(currentLine);
var lines = displayLines.join("<br/>");
var multiLineNodeHeight = 8+(lineHeight*displayLines.length);
el.css({height:multiLineNodeHeight+"px"});
var labelElement = el.find(".palette_label");
labelElement.html(lines).attr('dir', RED.text.bidi.resolveBaseTextDir(lines));
el.find(".palette_port").css({top:(multiLineNodeHeight/2-5)+"px"});
var popOverContent;
try {
var l = "<p><b>"+RED.text.bidi.enforceTextDirectionWithUCC(label)+"</b></p>";
if (label != type) {
l = "<p><b>"+RED.text.bidi.enforceTextDirectionWithUCC(label)+"</b><br/><i>"+type+"</i></p>";
}
popOverContent = $(l+(info?info:$("script[data-help-name='"+type+"']").html()||"<p>"+RED._("palette.noInfo")+"</p>").trim())
.filter(function(n) {
return (this.nodeType == 1 && this.nodeName == "P") || (this.nodeType == 3 && this.textContent.trim().length > 0)
}).slice(0,2);
} catch(err) {
// Malformed HTML may cause errors. TODO: need to understand what can break
// NON-NLS: internal debug
console.log("Error generating pop-over label for ",type);
console.log(err.toString());
popOverContent = "<p><b>"+label+"</b></p><p>"+RED._("palette.noInfo")+"</p>";
}
el.data('popover').setContent(popOverContent);
}
function setIcon(element,sf) {
var iconElement = element.find(".palette_icon");
var icon_url = RED.utils.getNodeIcon(sf._def,sf);
iconElement.attr("style", "background-image: url("+icon_url+")");
}
function escapeNodeType(nt) {
return nt.replace(" ","_").replace(".","_").replace(":","_");
}
function addNodeType(nt,def) {
var nodeTypeId = escapeNodeType(nt);
if ($("#palette_node_"+nodeTypeId).length) {
return;
}
if (exclusion.indexOf(def.category)===-1) {
var originalCategory = def.category;
var category = def.category.replace(/ /g,"_");
var rootCategory = category.split("-")[0];
var d = document.createElement("div");
d.id = "palette_node_"+nodeTypeId;
d.type = nt;
var label = /^(.*?)([ -]in|[ -]out)?$/.exec(nt)[1];
if (typeof def.paletteLabel !== "undefined") {
try {
label = (typeof def.paletteLabel === "function" ? def.paletteLabel.call(def) : def.paletteLabel)||"";
} catch(err) {
console.log("Definition error: "+nt+".paletteLabel",err);
}
}
$('<div/>',{class:"palette_label"+(def.align=="right"?" palette_label_right":"")}).appendTo(d);
d.className="palette_node";
if (def.icon) {
var icon_url = RED.utils.getNodeIcon(def);
var iconContainer = $('<div/>',{class:"palette_icon_container"+(def.align=="right"?" palette_icon_container_right":"")}).appendTo(d);
$('<div/>',{class:"palette_icon",style:"background-image: url("+icon_url+")"}).appendTo(iconContainer);
}
d.style.backgroundColor = RED.utils.getNodeColor(nt,def);
if (def.outputs > 0) {
var portOut = document.createElement("div");
portOut.className = "palette_port palette_port_output";
d.appendChild(portOut);
}
if (def.inputs > 0) {
var portIn = document.createElement("div");
portIn.className = "palette_port palette_port_input";
d.appendChild(portIn);
}
createCategory(def.category,rootCategory,category,(coreCategories.indexOf(rootCategory) !== -1)?"node-red":def.set.id);
$("#palette-"+category).append(d);
$(d).data('category',rootCategory);
d.onmousedown = function(e) { e.preventDefault(); };
var popover = RED.popover.create({
target:$(d),
trigger: "hover",
width: "300px",
content: "hi",
delay: { show: 750, hide: 50 }
});
$(d).data('popover',popover);
// $(d).popover({
// title:d.type,
// placement:"right",
// trigger: "hover",
// delay: { show: 750, hide: 50 },
// html: true,
// container:'body'
// });
$(d).click(function() {
RED.view.focus();
var helpText;
if (nt.indexOf("subflow:") === 0) {
helpText = marked(RED.nodes.subflow(nt.substring(8)).info||"")||('<span class="node-info-none">'+RED._("sidebar.info.none")+'</span>');
} else {
helpText = $("script[data-help-name='"+d.type+"']").html()||('<span class="node-info-none">'+RED._("sidebar.info.none")+'</span>');
}
RED.sidebar.info.set(helpText,RED._("sidebar.info.nodeHelp"));
});
var chart = $("#chart");
var chartOffset = chart.offset();
var chartSVG = $("#chart>svg").get(0);
var activeSpliceLink;
var mouseX;
var mouseY;
var spliceTimer;
var paletteWidth;
var paletteTop;
$(d).draggable({
helper: 'clone',
appendTo: 'body',
revert: true,
revertDuration: 50,
containment:'#main-container',
start: function() {
paletteWidth = $("#palette").width();
paletteTop = $("#palette").parent().position().top + $("#palette-container").position().top;
RED.view.focus();
},
stop: function() { d3.select('.link_splice').classed('link_splice',false); if (spliceTimer) { clearTimeout(spliceTimer); spliceTimer = null;}},
drag: function(e,ui) {
// TODO: this is the margin-left of palette node. Hard coding
// it here makes me sad
//console.log(ui.helper.position());
ui.position.left += 17.5;
if (def.inputs > 0 && def.outputs > 0) {
mouseX = ui.position.left-paletteWidth+(ui.helper.width()/2) - chartOffset.left + chart.scrollLeft();
mouseY = ui.position.top-paletteTop+(ui.helper.height()/2) - chartOffset.top + chart.scrollTop();
if (!spliceTimer) {
spliceTimer = setTimeout(function() {
var nodes = [];
var bestDistance = Infinity;
var bestLink = null;
if (chartSVG.getIntersectionList) {
var svgRect = chartSVG.createSVGRect();
svgRect.x = mouseX;
svgRect.y = mouseY;
svgRect.width = 1;
svgRect.height = 1;
nodes = chartSVG.getIntersectionList(svgRect,chartSVG);
mouseX /= RED.view.scale();
mouseY /= RED.view.scale();
} else {
// Firefox doesn't do getIntersectionList and that
// makes us sad
mouseX /= RED.view.scale();
mouseY /= RED.view.scale();
nodes = RED.view.getLinksAtPoint(mouseX,mouseY);
}
for (var i=0;i<nodes.length;i++) {
if (d3.select(nodes[i]).classed('link_background')) {
var length = nodes[i].getTotalLength();
for (var j=0;j<length;j+=10) {
var p = nodes[i].getPointAtLength(j);
var d2 = ((p.x-mouseX)*(p.x-mouseX))+((p.y-mouseY)*(p.y-mouseY));
if (d2 < 200 && d2 < bestDistance) {
bestDistance = d2;
bestLink = nodes[i];
}
}
}
}
if (activeSpliceLink && activeSpliceLink !== bestLink) {
d3.select(activeSpliceLink.parentNode).classed('link_splice',false);
}
if (bestLink) {
d3.select(bestLink.parentNode).classed('link_splice',true)
} else {
d3.select('.link_splice').classed('link_splice',false);
}
if (activeSpliceLink !== bestLink) {
if (bestLink) {
$(ui.helper).data('splice',d3.select(bestLink).data()[0]);
} else {
$(ui.helper).removeData('splice');
}
}
activeSpliceLink = bestLink;
spliceTimer = null;
},200);
}
}
}
});
var nodeInfo = null;
if (nt.indexOf("subflow:") === 0) {
$(d).dblclick(function(e) {
RED.workspaces.show(nt.substring(8));
e.preventDefault();
});
nodeInfo = marked(def.info||"");
}
setLabel(nt,$(d),label,nodeInfo);
var categoryNode = $("#palette-container-"+category);
if (categoryNode.find(".palette_node").length === 1) {
categoryContainers[category].open();
}
}
}
function removeNodeType(nt) {
var nodeTypeId = escapeNodeType(nt);
var paletteNode = $("#palette_node_"+nodeTypeId);
var categoryNode = paletteNode.closest(".palette-category");
paletteNode.remove();
if (categoryNode.find(".palette_node").length === 0) {
if (categoryNode.find("i").hasClass("expanded")) {
categoryNode.find(".palette-content").slideToggle();
categoryNode.find("i").toggleClass("expanded");
}
}
}
function hideNodeType(nt) {
var nodeTypeId = escapeNodeType(nt);
var paletteNode = $("#palette_node_"+nodeTypeId);
paletteNode.hide();
var categoryNode = paletteNode.closest(".palette-category");
var cl = categoryNode.find(".palette_node");
var c = 0;
for (var i = 0; i < cl.length; i++) {
if ($(cl[i]).css('display') === 'none') { c += 1; }
}
if (c === cl.length) { categoryNode.hide(); }
}
function showNodeType(nt) {
var nodeTypeId = escapeNodeType(nt);
var paletteNode = $("#palette_node_"+nodeTypeId);
var categoryNode = paletteNode.closest(".palette-category");
categoryNode.show();
paletteNode.show();
}
function refreshNodeTypes() {
RED.nodes.eachSubflow(function(sf) {
var paletteNode = $("#palette_node_subflow_"+sf.id.replace(".","_"));
var portInput = paletteNode.find(".palette_port_input");
var portOutput = paletteNode.find(".palette_port_output");
if (portInput.length === 0 && sf.in.length > 0) {
var portIn = document.createElement("div");
portIn.className = "palette_port palette_port_input";
paletteNode.append(portIn);
} else if (portInput.length !== 0 && sf.in.length === 0) {
portInput.remove();
}
if (portOutput.length === 0 && sf.out.length > 0) {
var portOut = document.createElement("div");
portOut.className = "palette_port palette_port_output";
paletteNode.append(portOut);
} else if (portOutput.length !== 0 && sf.out.length === 0) {
portOutput.remove();
}
setLabel(sf.type+":"+sf.id,paletteNode,sf.name,marked(sf.info||""));
setIcon(paletteNode,sf);
var currentCategory = paletteNode.data('category');
var newCategory = (sf.category||"subflows");
if (currentCategory !== newCategory) {
var category = newCategory.replace(/ /g,"_");
createCategory(newCategory,category,category,"node-red");
var currentCategoryNode = paletteNode.closest(".palette-category");
var newCategoryNode = $("#palette-"+category);
newCategoryNode.append(paletteNode);
if (newCategoryNode.find(".palette_node").length === 1) {
categoryContainers[category].open();
}
paletteNode.data('category',newCategory);
if (currentCategoryNode.find(".palette_node").length === 0) {
if (currentCategoryNode.find("i").hasClass("expanded")) {
currentCategoryNode.find(".palette-content").slideToggle();
currentCategoryNode.find("i").toggleClass("expanded");
}
}
}
});
}
function filterChange(val) {
var re = new RegExp(val.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'),'i');
$("#palette-container .palette_node").each(function(i,el) {
var currentLabel = $(el).find(".palette_label").text();
if (val === "" || re.test(el.id) || re.test(currentLabel)) {
$(this).show();
} else {
$(this).hide();
}
});
for (var category in categoryContainers) {
if (categoryContainers.hasOwnProperty(category)) {
if (categoryContainers[category].container
.find(".palette_node")
.filter(function() { return $(this).css('display') !== 'none'}).length === 0) {
categoryContainers[category].close();
} else {
categoryContainers[category].open();
}
}
}
}
function init() {
RED.events.on('registry:node-type-added', function(nodeType) {
var def = RED.nodes.getType(nodeType);
addNodeType(nodeType,def);
if (def.onpaletteadd && typeof def.onpaletteadd === "function") {
def.onpaletteadd.call(def);
}
});
RED.events.on('registry:node-type-removed', function(nodeType) {
removeNodeType(nodeType);
});
RED.events.on('registry:node-set-enabled', function(nodeSet) {
for (var j=0;j<nodeSet.types.length;j++) {
showNodeType(nodeSet.types[j]);
var def = RED.nodes.getType(nodeSet.types[j]);
if (def && def.onpaletteadd && typeof def.onpaletteadd === "function") {
def.onpaletteadd.call(def);
}
}
});
RED.events.on('registry:node-set-disabled', function(nodeSet) {
for (var j=0;j<nodeSet.types.length;j++) {
hideNodeType(nodeSet.types[j]);
var def = RED.nodes.getType(nodeSet.types[j]);
if (def && def.onpaletteremove && typeof def.onpaletteremove === "function") {
def.onpaletteremove.call(def);
}
}
});
RED.events.on('registry:node-set-removed', function(nodeSet) {
if (nodeSet.added) {
for (var j=0;j<nodeSet.types.length;j++) {
removeNodeType(nodeSet.types[j]);
var def = RED.nodes.getType(nodeSet.types[j]);
if (def && def.onpaletteremove && typeof def.onpaletteremove === "function") {
def.onpaletteremove.call(def);
}
}
}
});
$("#palette > .palette-spinner").show();
$("#palette-search input").searchBox({
delay: 100,
change: function() {
filterChange($(this).val());
}
})
var categoryList = coreCategories;
if (RED.settings.paletteCategories) {
categoryList = RED.settings.paletteCategories;
} else if (RED.settings.theme('palette.categories')) {
categoryList = RED.settings.theme('palette.categories');
}
if (!Array.isArray(categoryList)) {
categoryList = coreCategories
}
categoryList.forEach(function(category){
createCategoryContainer(category, category, "palette.label."+category);
});
$("#palette-collapse-all").on("click", function(e) {
e.preventDefault();
for (var cat in categoryContainers) {
if (categoryContainers.hasOwnProperty(cat)) {
categoryContainers[cat].close();
}
}
});
$("#palette-expand-all").on("click", function(e) {
e.preventDefault();
for (var cat in categoryContainers) {
if (categoryContainers.hasOwnProperty(cat)) {
categoryContainers[cat].open();
}
}
});
}
function getCategories() {
var categories = [];
$("#palette-container .palette-category").each(function(i,d) {
categories.push({id:$(d).data('category'),label:$(d).data('label')});
})
return categories;
}
return {
init: init,
add:addNodeType,
remove:removeNodeType,
hide:hideNodeType,
show:showNodeType,
refresh:refreshNodeTypes,
getCategories: getCategories
};
})();

View File

@@ -1,298 +0,0 @@
/**
* Copyright JS Foundation and other contributors, http://js.foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
**/
RED.search = (function() {
var disabled = false;
var dialog = null;
var searchInput;
var searchResults;
var selected = -1;
var visible = false;
var index = {};
var keys = [];
var results = [];
function indexProperty(node,label,property) {
if (typeof property === 'string' || typeof property === 'number') {
property = (""+property).toLowerCase();
index[property] = index[property] || {};
index[property][node.id] = {node:node,label:label};
} else if (Array.isArray(property)) {
property.forEach(function(prop) {
indexProperty(node,label,prop);
})
} else if (typeof property === 'object') {
for (var prop in property) {
if (property.hasOwnProperty(prop)) {
indexProperty(node,label,property[prop])
}
}
}
}
function indexNode(n) {
var l = RED.utils.getNodeLabel(n);
if (l) {
l = (""+l).toLowerCase();
index[l] = index[l] || {};
index[l][n.id] = {node:n,label:l}
}
l = l||n.label||n.name||n.id||"";
var properties = ['id','type','name','label','info'];
if (n._def && n._def.defaults) {
properties = properties.concat(Object.keys(n._def.defaults));
}
for (var i=0;i<properties.length;i++) {
if (n.hasOwnProperty(properties[i])) {
indexProperty(n, l, n[properties[i]]);
}
}
}
function indexWorkspace() {
index = {};
RED.nodes.eachWorkspace(indexNode);
RED.nodes.eachSubflow(indexNode);
RED.nodes.eachConfig(indexNode);
RED.nodes.eachNode(indexNode);
keys = Object.keys(index);
keys.sort();
keys.forEach(function(key) {
index[key] = Object.keys(index[key]).map(function(id) {
return index[key][id];
})
})
}
function search(val) {
searchResults.editableList('empty');
selected = -1;
results = [];
if (val.length > 0) {
val = val.toLowerCase();
var i;
var j;
var list = [];
var nodes = {};
for (i=0;i<keys.length;i++) {
var key = keys[i];
var kpos = keys[i].indexOf(val);
if (kpos > -1) {
for (j=0;j<index[key].length;j++) {
var node = index[key][j];
nodes[node.node.id] = nodes[node.node.id] = node;
nodes[node.node.id].index = Math.min(nodes[node.node.id].index||Infinity,kpos);
}
}
}
list = Object.keys(nodes);
list.sort(function(A,B) {
return nodes[A].index - nodes[B].index;
});
for (i=0;i<list.length;i++) {
results.push(nodes[list[i]]);
}
if (results.length > 0) {
for (i=0;i<Math.min(results.length,25);i++) {
searchResults.editableList('addItem',results[i])
}
} else {
searchResults.editableList('addItem',{});
}
}
}
function ensureSelectedIsVisible() {
var selectedEntry = searchResults.find("li.selected");
if (selectedEntry.length === 1) {
var scrollWindow = searchResults.parent();
var scrollHeight = scrollWindow.height();
var scrollOffset = scrollWindow.scrollTop();
var y = selectedEntry.position().top;
var h = selectedEntry.height();
if (y+h > scrollHeight) {
scrollWindow.animate({scrollTop: '-='+(scrollHeight-(y+h)-10)},50);
} else if (y<0) {
scrollWindow.animate({scrollTop: '+='+(y-10)},50);
}
}
}
function createDialog() {
dialog = $("<div>",{id:"red-ui-search",class:"red-ui-search"}).appendTo("#main-container");
var searchDiv = $("<div>",{class:"red-ui-search-container"}).appendTo(dialog);
searchInput = $('<input type="text" data-i18n="[placeholder]menu.label.searchInput">').appendTo(searchDiv).searchBox({
delay: 200,
change: function() {
search($(this).val());
}
});
searchInput.on('keydown',function(evt) {
var children;
if (results.length > 0) {
if (evt.keyCode === 40) {
// Down
children = searchResults.children();
if (selected < children.length-1) {
if (selected > -1) {
$(children[selected]).removeClass('selected');
}
selected++;
}
$(children[selected]).addClass('selected');
ensureSelectedIsVisible();
evt.preventDefault();
} else if (evt.keyCode === 38) {
// Up
children = searchResults.children();
if (selected > 0) {
if (selected < children.length) {
$(children[selected]).removeClass('selected');
}
selected--;
}
$(children[selected]).addClass('selected');
ensureSelectedIsVisible();
evt.preventDefault();
} else if (evt.keyCode === 13) {
// Enter
if (results.length > 0) {
reveal(results[Math.max(0,selected)].node);
}
}
}
});
searchInput.i18n();
var searchResultsDiv = $("<div>",{class:"red-ui-search-results-container"}).appendTo(dialog);
searchResults = $('<ol>',{id:"search-result-list", style:"position: absolute;top: 5px;bottom: 5px;left: 5px;right: 5px;"}).appendTo(searchResultsDiv).editableList({
addButton: false,
addItem: function(container,i,object) {
var node = object.node;
if (node === undefined) {
$('<div>',{class:"red-ui-search-empty"}).text(RED._('search.empty')).appendTo(container);
} else {
var def = node._def;
var div = $('<a>',{href:'#',class:"red-ui-search-result"}).appendTo(container);
var nodeDiv = $('<div>',{class:"red-ui-search-result-node"}).appendTo(div);
var colour = RED.utils.getNodeColor(node.type,def);
var icon_url = RED.utils.getNodeIcon(def,node);
if (node.type === 'tab') {
colour = "#C0DEED";
}
nodeDiv.css('backgroundColor',colour);
var iconContainer = $('<div/>',{class:"palette_icon_container"}).appendTo(nodeDiv);
$('<div/>',{class:"palette_icon",style:"background-image: url("+icon_url+")"}).appendTo(iconContainer);
var contentDiv = $('<div>',{class:"red-ui-search-result-description"}).appendTo(div);
if (node.z) {
var workspace = RED.nodes.workspace(node.z);
if (!workspace) {
workspace = RED.nodes.subflow(node.z);
workspace = "subflow:"+workspace.name;
} else {
workspace = "flow:"+workspace.label;
}
$('<div>',{class:"red-ui-search-result-node-flow"}).text(workspace).appendTo(contentDiv);
}
$('<div>',{class:"red-ui-search-result-node-label"}).text(object.label || node.id).appendTo(contentDiv);
$('<div>',{class:"red-ui-search-result-node-type"}).text(node.type).appendTo(contentDiv);
$('<div>',{class:"red-ui-search-result-node-id"}).text(node.id).appendTo(contentDiv);
div.click(function(evt) {
evt.preventDefault();
reveal(node);
});
}
},
scrollOnAdd: false
});
}
function reveal(node) {
hide();
RED.view.reveal(node.id);
}
function show() {
if (disabled) {
return;
}
if (!visible) {
RED.keyboard.add("*","escape",function(){hide()});
$("#header-shade").show();
$("#editor-shade").show();
$("#palette-shade").show();
$("#sidebar-shade").show();
$("#sidebar-separator").hide();
indexWorkspace();
if (dialog === null) {
createDialog();
}
dialog.slideDown(300);
RED.events.emit("search:open");
visible = true;
}
searchInput.focus();
}
function hide() {
if (visible) {
RED.keyboard.remove("escape");
visible = false;
$("#header-shade").hide();
$("#editor-shade").hide();
$("#palette-shade").hide();
$("#sidebar-shade").hide();
$("#sidebar-separator").show();
if (dialog !== null) {
dialog.slideUp(200,function() {
searchInput.searchBox('value','');
});
}
RED.events.emit("search:close");
}
}
function init() {
RED.actions.add("core:search",show);
RED.events.on("editor:open",function() { disabled = true; });
RED.events.on("editor:close",function() { disabled = false; });
RED.events.on("type-search:open",function() { disabled = true; });
RED.events.on("type-search:close",function() { disabled = false; });
$("#header-shade").on('mousedown',hide);
$("#editor-shade").on('mousedown',hide);
$("#palette-shade").on('mousedown',hide);
$("#sidebar-shade").on('mousedown',hide);
}
return {
init: init,
show: show,
hide: hide
};
})();

View File

@@ -1,235 +0,0 @@
/**
* Copyright JS Foundation and other contributors, http://js.foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
**/
RED.sidebar = (function() {
//$('#sidebar').tabs();
var sidebar_tabs = RED.tabs.create({
id:"sidebar-tabs",
onchange:function(tab) {
$("#sidebar-content").children().hide();
$("#sidebar-footer").children().hide();
if (tab.onchange) {
tab.onchange.call(tab);
}
$(tab.wrapper).show();
if (tab.toolbar) {
$(tab.toolbar).show();
}
},
onremove: function(tab) {
$(tab.wrapper).hide();
if (tab.onremove) {
tab.onremove.call(tab);
}
},
// minimumActiveTabWidth: 70,
collapsible: true
// scrollable: true
});
var knownTabs = {
};
function addTab(title,content,closeable,visible) {
var options;
if (typeof title === "string") {
// TODO: legacy support in case anyone uses this...
options = {
id: content.id,
label: title,
name: title,
content: content,
closeable: closeable,
visible: visible
}
} else if (typeof title === "object") {
options = title;
}
delete options.closeable;
options.wrapper = $('<div>',{style:"height:100%"}).appendTo("#sidebar-content")
options.wrapper.append(options.content);
options.wrapper.hide();
if (!options.enableOnEdit) {
options.shade = $('<div>',{class:"sidebar-shade hide"}).appendTo(options.wrapper);
}
if (options.toolbar) {
$("#sidebar-footer").append(options.toolbar);
$(options.toolbar).hide();
}
var id = options.id;
RED.menu.addItem("menu-item-view-menu",{
id:"menu-item-view-menu-"+options.id,
label:options.name,
onselect:function() {
showSidebar(options.id);
},
group: "sidebar-tabs"
});
options.iconClass = options.iconClass || "fa fa-square-o"
knownTabs[options.id] = options;
if (options.visible !== false) {
sidebar_tabs.addTab(knownTabs[options.id]);
}
}
function removeTab(id) {
sidebar_tabs.removeTab(id);
$(knownTabs[id].wrapper).remove();
if (knownTabs[id].footer) {
knownTabs[id].footer.remove();
}
delete knownTabs[id];
RED.menu.removeItem("menu-item-view-menu-"+id);
}
var sidebarSeparator = {};
$("#sidebar-separator").draggable({
axis: "x",
start:function(event,ui) {
sidebarSeparator.closing = false;
sidebarSeparator.opening = false;
var winWidth = $(window).width();
sidebarSeparator.start = ui.position.left;
sidebarSeparator.chartWidth = $("#workspace").width();
sidebarSeparator.chartRight = winWidth-$("#workspace").width()-$("#workspace").offset().left-2;
if (!RED.menu.isSelected("menu-item-sidebar")) {
sidebarSeparator.opening = true;
var newChartRight = 7;
$("#sidebar").addClass("closing");
$("#workspace").css("right",newChartRight);
$("#editor-stack").css("right",newChartRight+1);
$("#sidebar").width(0);
RED.menu.setSelected("menu-item-sidebar",true);
RED.events.emit("sidebar:resize");
}
sidebarSeparator.width = $("#sidebar").width();
},
drag: function(event,ui) {
var d = ui.position.left-sidebarSeparator.start;
var newSidebarWidth = sidebarSeparator.width-d;
if (sidebarSeparator.opening) {
newSidebarWidth -= 3;
}
if (newSidebarWidth > 150) {
if (sidebarSeparator.chartWidth+d < 200) {
ui.position.left = 200+sidebarSeparator.start-sidebarSeparator.chartWidth;
d = ui.position.left-sidebarSeparator.start;
newSidebarWidth = sidebarSeparator.width-d;
}
}
if (newSidebarWidth < 150) {
if (!sidebarSeparator.closing) {
$("#sidebar").addClass("closing");
sidebarSeparator.closing = true;
}
if (!sidebarSeparator.opening) {
newSidebarWidth = 150;
ui.position.left = sidebarSeparator.width-(150 - sidebarSeparator.start);
d = ui.position.left-sidebarSeparator.start;
}
} else if (newSidebarWidth > 150 && (sidebarSeparator.closing || sidebarSeparator.opening)) {
sidebarSeparator.closing = false;
$("#sidebar").removeClass("closing");
}
var newChartRight = sidebarSeparator.chartRight-d;
$("#workspace").css("right",newChartRight);
$("#editor-stack").css("right",newChartRight+1);
$("#sidebar").width(newSidebarWidth);
sidebar_tabs.resize();
RED.events.emit("sidebar:resize");
},
stop:function(event,ui) {
if (sidebarSeparator.closing) {
$("#sidebar").removeClass("closing");
RED.menu.setSelected("menu-item-sidebar",false);
if ($("#sidebar").width() < 180) {
$("#sidebar").width(180);
$("#workspace").css("right",187);
$("#editor-stack").css("right",188);
}
}
$("#sidebar-separator").css("left","auto");
$("#sidebar-separator").css("right",($("#sidebar").width()+2)+"px");
RED.events.emit("sidebar:resize");
}
});
function toggleSidebar(state) {
if (!state) {
$("#main-container").addClass("sidebar-closed");
} else {
$("#main-container").removeClass("sidebar-closed");
sidebar_tabs.resize();
}
RED.events.emit("sidebar:resize");
}
function showSidebar(id) {
if (id) {
if (!containsTab(id)) {
sidebar_tabs.addTab(knownTabs[id]);
}
sidebar_tabs.activateTab(id);
if (!RED.menu.isSelected("menu-item-sidebar")) {
RED.menu.setSelected("menu-item-sidebar",true);
}
}
}
function containsTab(id) {
return sidebar_tabs.contains(id);
}
function init () {
RED.actions.add("core:toggle-sidebar",function(state){
if (state === undefined) {
RED.menu.toggleSelected("menu-item-sidebar");
} else {
toggleSidebar(state);
}
});
showSidebar();
RED.sidebar.info.init();
RED.sidebar.config.init();
RED.sidebar.context.init();
// hide info bar at start if screen rather narrow...
if ($(window).width() < 600) { RED.menu.setSelected("menu-item-sidebar",false); }
}
return {
init: init,
addTab: addTab,
removeTab: removeTab,
show: showSidebar,
containsTab: containsTab,
toggleSidebar: toggleSidebar,
}
})();

View File

@@ -1,639 +0,0 @@
/**
* Copyright JS Foundation and other contributors, http://js.foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
**/
RED.subflow = (function() {
var _subflowEditTemplate = '<script type="text/x-red" data-template-name="subflow"><div class="form-row"><label for="node-input-name" data-i18n="[append]editor:common.label.name"><i class="fa fa-tag"></i> </label><input type="text" id="node-input-name"></div></script>';
var _subflowTemplateEditTemplate = '<script type="text/x-red" data-template-name="subflow-template"><div class="form-row"><i class="fa fa-tag"></i><label for="subflow-input-name" data-i18n="common.label.name"></label><input type="text" id="subflow-input-name"></div><div class="form-row" style="margin-bottom: 0px;"><label for="subflow-input-info" data-i18n="editor:subflow.info"></label><a href="https://help.github.com/articles/markdown-basics/" style="font-size: 0.8em; float: right;" data-i18n="[html]subflow.format"></a></div><div class="form-row node-text-editor-row"><div style="height: 250px;" class="node-text-editor" id="subflow-input-info-editor"></div></div><div class="form-row form-tips" id="subflow-dialog-user-count"></div></script>';
function getSubflow() {
return RED.nodes.subflow(RED.workspaces.active());
}
function findAvailableSubflowIOPosition(subflow,isInput) {
var pos = {x:50,y:30};
if (!isInput) {
pos.x += 110;
}
for (var i=0;i<subflow.out.length+subflow.in.length;i++) {
var port;
if (i < subflow.out.length) {
port = subflow.out[i];
} else {
port = subflow.in[i-subflow.out.length];
}
if (port.x == pos.x && port.y == pos.y) {
pos.x += 55;
i=0;
}
}
return pos;
}
function addSubflowInput() {
var subflow = RED.nodes.subflow(RED.workspaces.active());
if (subflow.in.length === 1) {
return;
}
var position = findAvailableSubflowIOPosition(subflow,true);
var newInput = {
type:"subflow",
direction:"in",
z:subflow.id,
i:subflow.in.length,
x:position.x,
y:position.y,
id:RED.nodes.id()
};
var oldInCount = subflow.in.length;
subflow.in.push(newInput);
subflow.dirty = true;
var wasDirty = RED.nodes.dirty();
var wasChanged = subflow.changed;
subflow.changed = true;
var result = refresh(true);
var historyEvent = {
t:'edit',
node:subflow,
dirty:wasDirty,
changed:wasChanged,
subflow: {
inputCount: oldInCount,
instances: result.instances
}
};
RED.history.push(historyEvent);
RED.view.select();
RED.nodes.dirty(true);
RED.view.redraw();
$("#workspace-subflow-input-add").addClass("active");
$("#workspace-subflow-input-remove").removeClass("active");
}
function removeSubflowInput() {
var activeSubflow = RED.nodes.subflow(RED.workspaces.active());
if (activeSubflow.in.length === 0) {
return;
}
var removedInput = activeSubflow.in[0];
var removedInputLinks = [];
RED.nodes.eachLink(function(l) {
if (l.source.type == "subflow" && l.source.z == activeSubflow.id && l.source.i == removedInput.i) {
removedInputLinks.push(l);
} else if (l.target.type == "subflow:"+activeSubflow.id) {
removedInputLinks.push(l);
}
});
removedInputLinks.forEach(function(l) { RED.nodes.removeLink(l)});
activeSubflow.in = [];
$("#workspace-subflow-input-add").removeClass("active");
$("#workspace-subflow-input-remove").addClass("active");
activeSubflow.changed = true;
return {subflowInputs: [ removedInput ], links:removedInputLinks};
}
function addSubflowOutput(id) {
var subflow = RED.nodes.subflow(RED.workspaces.active());
var position = findAvailableSubflowIOPosition(subflow,false);
var newOutput = {
type:"subflow",
direction:"out",
z:subflow.id,
i:subflow.out.length,
x:position.x,
y:position.y,
id:RED.nodes.id()
};
var oldOutCount = subflow.out.length;
subflow.out.push(newOutput);
subflow.dirty = true;
var wasDirty = RED.nodes.dirty();
var wasChanged = subflow.changed;
subflow.changed = true;
var result = refresh(true);
var historyEvent = {
t:'edit',
node:subflow,
dirty:wasDirty,
changed:wasChanged,
subflow: {
outputCount: oldOutCount,
instances: result.instances
}
};
RED.history.push(historyEvent);
RED.view.select();
RED.nodes.dirty(true);
RED.view.redraw();
$("#workspace-subflow-output .spinner-value").text(subflow.out.length);
}
function removeSubflowOutput(removedSubflowOutputs) {
var activeSubflow = RED.nodes.subflow(RED.workspaces.active());
if (activeSubflow.out.length === 0) {
return;
}
if (typeof removedSubflowOutputs === "undefined") {
removedSubflowOutputs = [activeSubflow.out[activeSubflow.out.length-1]];
}
var removedLinks = [];
removedSubflowOutputs.sort(function(a,b) { return b.i-a.i});
for (i=0;i<removedSubflowOutputs.length;i++) {
var output = removedSubflowOutputs[i];
activeSubflow.out.splice(output.i,1);
var subflowRemovedLinks = [];
var subflowMovedLinks = [];
RED.nodes.eachLink(function(l) {
if (l.target.type == "subflow" && l.target.z == activeSubflow.id && l.target.i == output.i) {
subflowRemovedLinks.push(l);
}
if (l.source.type == "subflow:"+activeSubflow.id) {
if (l.sourcePort == output.i) {
subflowRemovedLinks.push(l);
} else if (l.sourcePort > output.i) {
subflowMovedLinks.push(l);
}
}
});
subflowRemovedLinks.forEach(function(l) { RED.nodes.removeLink(l)});
subflowMovedLinks.forEach(function(l) { l.sourcePort--; });
removedLinks = removedLinks.concat(subflowRemovedLinks);
for (var j=output.i;j<activeSubflow.out.length;j++) {
activeSubflow.out[j].i--;
activeSubflow.out[j].dirty = true;
}
}
activeSubflow.changed = true;
return {subflowOutputs: removedSubflowOutputs, links: removedLinks}
}
function refresh(markChange) {
var activeSubflow = RED.nodes.subflow(RED.workspaces.active());
refreshToolbar(activeSubflow);
var subflowInstances = [];
if (activeSubflow) {
RED.nodes.filterNodes({type:"subflow:"+activeSubflow.id}).forEach(function(n) {
subflowInstances.push({
id: n.id,
changed: n.changed
});
if (markChange) {
n.changed = true;
}
n.inputs = activeSubflow.in.length;
n.outputs = activeSubflow.out.length;
while (n.outputs < n.ports.length) {
n.ports.pop();
}
n.resize = true;
n.dirty = true;
RED.editor.updateNodeProperties(n);
});
RED.editor.validateNode(activeSubflow);
return {
instances: subflowInstances
}
}
}
function refreshToolbar(activeSubflow) {
if (activeSubflow) {
$("#workspace-subflow-input-add").toggleClass("active", activeSubflow.in.length !== 0);
$("#workspace-subflow-input-remove").toggleClass("active",activeSubflow.in.length === 0);
$("#workspace-subflow-output .spinner-value").text(activeSubflow.out.length);
}
}
function showWorkspaceToolbar(activeSubflow) {
var toolbar = $("#workspace-toolbar");
toolbar.empty();
$('<a class="button" id="workspace-subflow-edit" href="#" data-i18n="[append]subflow.editSubflowProperties"><i class="fa fa-pencil"></i> </a>').appendTo(toolbar);
$('<span style="margin-left: 5px;" data-i18n="subflow.input"></span> '+
'<div style="display: inline-block;" class="button-group">'+
'<a id="workspace-subflow-input-remove" class="button active" href="#">0</a>'+
'<a id="workspace-subflow-input-add" class="button" href="#">1</a>'+
'</div>').appendTo(toolbar);
$('<span style="margin-left: 5px;" data-i18n="subflow.output"></span> <div id="workspace-subflow-output" style="display: inline-block;" class="button-group spinner-group">'+
'<a id="workspace-subflow-output-remove" class="button" href="#"><i class="fa fa-minus"></i></a>'+
'<div class="spinner-value">3</div>'+
'<a id="workspace-subflow-output-add" class="button" href="#"><i class="fa fa-plus"></i></a>'+
'</div>').appendTo(toolbar);
// $('<a class="button disabled" id="workspace-subflow-add-input" href="#" data-i18n="[append]subflow.input"><i class="fa fa-plus"></i> </a>').appendTo(toolbar);
// $('<a class="button" id="workspace-subflow-add-output" href="#" data-i18n="[append]subflow.output"><i class="fa fa-plus"></i> </a>').appendTo(toolbar);
$('<a class="button" id="workspace-subflow-delete" href="#" data-i18n="[append]subflow.deleteSubflow"><i class="fa fa-trash"></i> </a>').appendTo(toolbar);
toolbar.i18n();
$("#workspace-subflow-output-remove").click(function(event) {
event.preventDefault();
var wasDirty = RED.nodes.dirty();
var wasChanged = activeSubflow.changed;
var result = removeSubflowOutput();
if (result) {
var inst = refresh(true);
RED.history.push({
t:'delete',
links:result.links,
subflowOutputs: result.subflowOutputs,
changed: wasChanged,
dirty:wasDirty,
subflow: {
instances: inst.instances
}
});
RED.view.select();
RED.nodes.dirty(true);
RED.view.redraw(true);
}
});
$("#workspace-subflow-output-add").click(function(event) {
event.preventDefault();
addSubflowOutput();
});
$("#workspace-subflow-input-add").click(function(event) {
event.preventDefault();
addSubflowInput();
});
$("#workspace-subflow-input-remove").click(function(event) {
event.preventDefault();
var wasDirty = RED.nodes.dirty();
var wasChanged = activeSubflow.changed;
activeSubflow.changed = true;
var result = removeSubflowInput();
if (result) {
var inst = refresh(true);
RED.history.push({
t:'delete',
links:result.links,
changed: wasChanged,
subflowInputs: result.subflowInputs,
dirty:wasDirty,
subflow: {
instances: inst.instances
}
});
RED.view.select();
RED.nodes.dirty(true);
RED.view.redraw(true);
}
});
$("#workspace-subflow-edit").click(function(event) {
RED.editor.editSubflow(RED.nodes.subflow(RED.workspaces.active()));
event.preventDefault();
});
$("#workspace-subflow-delete").click(function(event) {
event.preventDefault();
var startDirty = RED.nodes.dirty();
var historyEvent = removeSubflow(RED.workspaces.active());
historyEvent.t = 'delete';
historyEvent.dirty = startDirty;
RED.history.push(historyEvent);
});
refreshToolbar(activeSubflow);
$("#chart").css({"margin-top": "40px"});
$("#workspace-toolbar").show();
}
function hideWorkspaceToolbar() {
$("#workspace-toolbar").hide().empty();
$("#chart").css({"margin-top": "0"});
}
function removeSubflow(id) {
var removedNodes = [];
var removedLinks = [];
var activeSubflow = RED.nodes.subflow(id);
RED.nodes.eachNode(function(n) {
if (n.type == "subflow:"+activeSubflow.id) {
removedNodes.push(n);
}
if (n.z == activeSubflow.id) {
removedNodes.push(n);
}
});
RED.nodes.eachConfig(function(n) {
if (n.z == activeSubflow.id) {
removedNodes.push(n);
}
});
var removedConfigNodes = [];
for (var i=0;i<removedNodes.length;i++) {
var removedEntities = RED.nodes.remove(removedNodes[i].id);
removedLinks = removedLinks.concat(removedEntities.links);
removedConfigNodes = removedConfigNodes.concat(removedEntities.nodes);
}
// TODO: this whole delete logic should be in RED.nodes.removeSubflow..
removedNodes = removedNodes.concat(removedConfigNodes);
RED.nodes.removeSubflow(activeSubflow);
RED.workspaces.remove(activeSubflow);
RED.nodes.dirty(true);
RED.view.redraw();
return {
nodes:removedNodes,
links:removedLinks,
subflow: {
subflow: activeSubflow
}
}
}
function init() {
RED.events.on("workspace:change",function(event) {
var activeSubflow = RED.nodes.subflow(event.workspace);
if (activeSubflow) {
showWorkspaceToolbar(activeSubflow);
} else {
hideWorkspaceToolbar();
}
});
RED.events.on("view:selection-changed",function(selection) {
if (!selection.nodes) {
RED.menu.setDisabled("menu-item-subflow-convert",true);
} else {
RED.menu.setDisabled("menu-item-subflow-convert",false);
}
});
RED.actions.add("core:create-subflow",createSubflow);
RED.actions.add("core:convert-to-subflow",convertToSubflow);
$(_subflowEditTemplate).appendTo(document.body);
$(_subflowTemplateEditTemplate).appendTo(document.body);
}
function createSubflow() {
var lastIndex = 0;
RED.nodes.eachSubflow(function(sf) {
var m = (new RegExp("^Subflow (\\d+)$")).exec(sf.name);
if (m) {
lastIndex = Math.max(lastIndex,m[1]);
}
});
var name = "Subflow "+(lastIndex+1);
var subflowId = RED.nodes.id();
var subflow = {
type:"subflow",
id:subflowId,
name:name,
info:"",
in: [],
out: []
};
RED.nodes.addSubflow(subflow);
RED.history.push({
t:'createSubflow',
subflow: {
subflow:subflow
},
dirty:RED.nodes.dirty()
});
RED.workspaces.show(subflowId);
RED.nodes.dirty(true);
}
function convertToSubflow() {
var selection = RED.view.selection();
if (!selection.nodes) {
RED.notify(RED._("subflow.errors.noNodesSelected"),"error");
return;
}
var i,n;
var nodes = {};
var new_links = [];
var removedLinks = [];
var candidateInputs = [];
var candidateOutputs = [];
var candidateInputNodes = {};
var boundingBox = [selection.nodes[0].x,
selection.nodes[0].y,
selection.nodes[0].x,
selection.nodes[0].y];
for (i=0;i<selection.nodes.length;i++) {
n = selection.nodes[i];
nodes[n.id] = {n:n,outputs:{}};
boundingBox = [
Math.min(boundingBox[0],n.x),
Math.min(boundingBox[1],n.y),
Math.max(boundingBox[2],n.x),
Math.max(boundingBox[3],n.y)
]
}
var center = [(boundingBox[2]+boundingBox[0]) / 2,(boundingBox[3]+boundingBox[1]) / 2];
RED.nodes.eachLink(function(link) {
if (nodes[link.source.id] && nodes[link.target.id]) {
// A link wholely within the selection
}
if (nodes[link.source.id] && !nodes[link.target.id]) {
// An outbound link from the selection
candidateOutputs.push(link);
removedLinks.push(link);
}
if (!nodes[link.source.id] && nodes[link.target.id]) {
// An inbound link
candidateInputs.push(link);
candidateInputNodes[link.target.id] = link.target;
removedLinks.push(link);
}
});
var outputs = {};
candidateOutputs = candidateOutputs.filter(function(v) {
if (outputs[v.source.id+":"+v.sourcePort]) {
outputs[v.source.id+":"+v.sourcePort].targets.push(v.target);
return false;
}
v.targets = [];
v.targets.push(v.target);
outputs[v.source.id+":"+v.sourcePort] = v;
return true;
});
candidateOutputs.sort(function(a,b) { return a.source.y-b.source.y});
if (Object.keys(candidateInputNodes).length > 1) {
RED.notify(RED._("subflow.errors.multipleInputsToSelection"),"error");
return;
}
var lastIndex = 0;
RED.nodes.eachSubflow(function(sf) {
var m = (new RegExp("^Subflow (\\d+)$")).exec(sf.name);
if (m) {
lastIndex = Math.max(lastIndex,m[1]);
}
});
var name = "Subflow "+(lastIndex+1);
var subflowId = RED.nodes.id();
var subflow = {
type:"subflow",
id:subflowId,
name:name,
info:"",
in: Object.keys(candidateInputNodes).map(function(v,i) { var index = i; return {
type:"subflow",
direction:"in",
x:candidateInputNodes[v].x-(candidateInputNodes[v].w/2)-80,
y:candidateInputNodes[v].y,
z:subflowId,
i:index,
id:RED.nodes.id(),
wires:[{id:candidateInputNodes[v].id}]
}}),
out: candidateOutputs.map(function(v,i) { var index = i; return {
type:"subflow",
direction:"in",
x:v.source.x+(v.source.w/2)+80,
y:v.source.y,
z:subflowId,
i:index,
id:RED.nodes.id(),
wires:[{id:v.source.id,port:v.sourcePort}]
}})
};
RED.nodes.addSubflow(subflow);
var subflowInstance = {
id:RED.nodes.id(),
type:"subflow:"+subflow.id,
x: center[0],
y: center[1],
z: RED.workspaces.active(),
inputs: subflow.in.length,
outputs: subflow.out.length,
h: Math.max(30/*node_height*/,(subflow.out.length||0) * 15),
changed:true
}
subflowInstance._def = RED.nodes.getType(subflowInstance.type);
RED.editor.validateNode(subflowInstance);
RED.nodes.add(subflowInstance);
candidateInputs.forEach(function(l) {
var link = {source:l.source, sourcePort:l.sourcePort, target: subflowInstance};
new_links.push(link);
RED.nodes.addLink(link);
});
candidateOutputs.forEach(function(output,i) {
output.targets.forEach(function(target) {
var link = {source:subflowInstance, sourcePort:i, target: target};
new_links.push(link);
RED.nodes.addLink(link);
});
});
subflow.in.forEach(function(input) {
input.wires.forEach(function(wire) {
var link = {source: input, sourcePort: 0, target: RED.nodes.node(wire.id) }
new_links.push(link);
RED.nodes.addLink(link);
});
});
subflow.out.forEach(function(output,i) {
output.wires.forEach(function(wire) {
var link = {source: RED.nodes.node(wire.id), sourcePort: wire.port , target: output }
new_links.push(link);
RED.nodes.addLink(link);
});
});
for (i=0;i<removedLinks.length;i++) {
RED.nodes.removeLink(removedLinks[i]);
}
for (i=0;i<selection.nodes.length;i++) {
n = selection.nodes[i];
if (/^link /.test(n.type)) {
n.links = n.links.filter(function(id) {
var isLocalLink = nodes.hasOwnProperty(id);
if (!isLocalLink) {
var otherNode = RED.nodes.node(id);
if (otherNode && otherNode.links) {
var i = otherNode.links.indexOf(n.id);
if (i > -1) {
otherNode.links.splice(i,1);
}
}
}
return isLocalLink;
});
}
n.z = subflow.id;
}
RED.history.push({
t:'createSubflow',
nodes:[subflowInstance.id],
links:new_links,
subflow: {
subflow: subflow
},
activeWorkspace: RED.workspaces.active(),
removedLinks: removedLinks,
dirty:RED.nodes.dirty()
});
RED.view.select(null);
RED.editor.validateNode(subflow);
RED.nodes.dirty(true);
RED.view.redraw(true);
}
return {
init: init,
createSubflow: createSubflow,
convertToSubflow: convertToSubflow,
removeSubflow: removeSubflow,
refresh: refresh,
removeInput: removeSubflowInput,
removeOutput: removeSubflowOutput
}
})();

View File

@@ -1,292 +0,0 @@
/**
* Copyright JS Foundation and other contributors, http://js.foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
**/
RED.sidebar.context = (function() {
var content;
var sections;
var localCache = {};
var nodeSection;
// var subflowSection;
var flowSection;
var globalSection;
var currentNode;
var currentFlow;
function init() {
content = $("<div>").css({"position":"relative","height":"100%"});
content.className = "sidebar-context"
// var toolbar = $('<div class="sidebar-header">'+
// '</div>').appendTo(content);
var footerToolbar = $('<div>'+
// '<span class="button-group"><a class="sidebar-footer-button" href="#" data-i18n="[title]node-red:debug.sidebar.openWindow"><i class="fa fa-desktop"></i></a></span> ' +
'</div>');
var stackContainer = $("<div>",{class:"sidebar-context-stack"}).appendTo(content);
sections = RED.stack.create({
container: stackContainer
});
nodeSection = sections.add({
title: RED._("sidebar.context.node"),
collapsible: true,
// onexpand: function() {
// updateNode(currentNode,true);
// }
});
nodeSection.expand();
nodeSection.content.css({height:"100%"});
nodeSection.timestamp = $('<div class="sidebar-context-updated">&nbsp;</div>').appendTo(nodeSection.content);
var table = $('<table class="node-info"></table>').appendTo(nodeSection.content);
nodeSection.table = $('<tbody>').appendTo(table);
var bg = $('<div style="float: right"></div>').appendTo(nodeSection.header);
$('<button class="editor-button editor-button-small"><i class="fa fa-refresh"></i></button>')
.appendTo(bg)
.click(function(evt) {
evt.stopPropagation();
evt.preventDefault();
updateNode(currentNode, true);
})
// subflowSection = sections.add({
// title: "Subflow",
// collapsible: true
// });
// subflowSection.expand();
// subflowSection.content.css({height:"100%"});
// bg = $('<div style="float: right"></div>').appendTo(subflowSection.header);
// $('<button class="editor-button editor-button-small"><i class="fa fa-refresh"></i></button>')
// .appendTo(bg)
// .click(function(evt) {
// evt.stopPropagation();
// evt.preventDefault();
// })
//
// subflowSection.container.hide();
flowSection = sections.add({
title: RED._("sidebar.context.flow"),
collapsible: true
});
flowSection.expand();
flowSection.content.css({height:"100%"});
flowSection.timestamp = $('<div class="sidebar-context-updated">&nbsp;</div>').appendTo(flowSection.content);
var table = $('<table class="node-info"></table>').appendTo(flowSection.content);
flowSection.table = $('<tbody>').appendTo(table);
bg = $('<div style="float: right"></div>').appendTo(flowSection.header);
$('<button class="editor-button editor-button-small"><i class="fa fa-refresh"></i></button>')
.appendTo(bg)
.click(function(evt) {
evt.stopPropagation();
evt.preventDefault();
updateFlow(currentFlow);
})
globalSection = sections.add({
title: RED._("sidebar.context.global"),
collapsible: true
});
globalSection.expand();
globalSection.content.css({height:"100%"});
globalSection.timestamp = $('<div class="sidebar-context-updated">&nbsp;</div>').appendTo(globalSection.content);
var table = $('<table class="node-info"></table>').appendTo(globalSection.content);
globalSection.table = $('<tbody>').appendTo(table);
bg = $('<div style="float: right"></div>').appendTo(globalSection.header);
$('<button class="editor-button editor-button-small"><i class="fa fa-refresh"></i></button>')
.appendTo(bg)
.click(function(evt) {
evt.stopPropagation();
evt.preventDefault();
updateEntry(globalSection,"context/global","global");
})
RED.actions.add("core:show-context-tab",show);
RED.sidebar.addTab({
id: "context",
label: RED._("sidebar.context.label"),
name: RED._("sidebar.context.name"),
iconClass: "fa fa-database",
content: content,
toolbar: footerToolbar,
// pinned: true,
enableOnEdit: false
});
// var toggleLiveButton = $("#sidebar-context-toggle-live");
// toggleLiveButton.click(function(evt) {
// evt.preventDefault();
// if ($(this).hasClass("selected")) {
// $(this).removeClass("selected");
// $(this).find("i").removeClass("fa-pause");
// $(this).find("i").addClass("fa-play");
// } else {
// $(this).addClass("selected");
// $(this).find("i").removeClass("fa-play");
// $(this).find("i").addClass("fa-pause");
// }
// });
// RED.popover.tooltip(toggleLiveButton, function() {
// if (toggleLiveButton.hasClass("selected")) {
// return "Pause live updates"
// } else {
// return "Start live updates"
// }
// });
RED.events.on("view:selection-changed", function(event) {
var selectedNode = event.nodes && event.nodes.length === 1 && event.nodes[0];
updateNode(selectedNode);
})
RED.events.on("workspace:change", function(event) {
updateFlow(RED.nodes.workspace(event.workspace));
})
updateEntry(globalSection,"context/global","global");
}
function updateNode(node,force) {
currentNode = node;
if (force) {
if (node) {
updateEntry(nodeSection,"context/node/"+node.id,node.id);
// if (/^subflow:/.test(node.type)) {
// subflowSection.container.show();
// updateEntry(subflowSection,"context/flow/"+node.id,node.id);
// } else {
// subflowSection.container.hide();
// }
} else {
// subflowSection.container.hide();
updateEntry(nodeSection)
}
} else {
$(nodeSection.table).empty();
if (node) {
$('<tr class="node-info-node-row red-ui-search-empty blank" colspan="2"><td data-i18n="sidebar.context.refresh"></td></tr>').appendTo(nodeSection.table).i18n();
} else {
$('<tr class="node-info-node-row red-ui-search-empty blank" colspan="2"><td data-i18n="sidebar.context.none"></td></tr>').appendTo(nodeSection.table).i18n();
}
nodeSection.timestamp.html("&nbsp;");
}
}
function updateFlow(flow) {
currentFlow = flow;
if (flow) {
updateEntry(flowSection,"context/flow/"+flow.id,flow.id);
} else {
updateEntry(flowSection)
}
}
function refreshEntry(section,baseUrl,id) {
var contextStores = RED.settings.context.stores;
var container = section.table;
$.getJSON(baseUrl, function(data) {
$(container).empty();
var sortedData = {};
for (var store in data) {
if (data.hasOwnProperty(store)) {
for (var key in data[store]) {
if (data[store].hasOwnProperty(key)) {
if (!sortedData.hasOwnProperty(key)) {
sortedData[key] = [];
}
data[store][key].store = store;
sortedData[key].push(data[store][key])
}
}
}
}
var keys = Object.keys(sortedData);
keys.sort();
var l = keys.length;
for (var i = 0; i < l; i++) {
sortedData[keys[i]].forEach(function(v) {
var k = keys[i];
var l2 = sortedData[k].length;
var propRow = $('<tr class="node-info-node-row"><td class="sidebar-context-property"></td><td></td></tr>').appendTo(container);
var obj = $(propRow.children()[0]);
obj.text(k);
var tools = $('<span class="debug-message-tools button-group"></span>').appendTo(obj);
var refreshItem = $('<button class="editor-button editor-button-small"><i class="fa fa-refresh"></i></button>').appendTo(tools).click(function(e) {
e.preventDefault();
e.stopPropagation();
$.getJSON(baseUrl+"/"+k+"?store="+v.store, function(data) {
$(propRow.children()[1]).empty();
var payload = data.msg;
var format = data.format;
payload = RED.utils.decodeObject(payload,format);
RED.utils.createObjectElement(payload, {
typeHint: data.format,
sourceId: id+"."+k
}).appendTo(propRow.children()[1]);
})
});
var payload = v.msg;
var format = v.format;
payload = RED.utils.decodeObject(payload,format);
RED.utils.createObjectElement(payload, {
typeHint: v.format,
sourceId: id+"."+k
}).appendTo(propRow.children()[1]);
if (contextStores.length > 1) {
$("<span>",{class:"sidebar-context-property-storename"}).text(v.store).appendTo($(propRow.children()[0]))
}
});
}
if (l === 0) {
$('<tr class="node-info-node-row red-ui-search-empty blank" colspan="2"><td data-i18n="sidebar.context.empty"></td></tr>').appendTo(container).i18n();
}
$(section.timestamp).text(new Date().toLocaleString());
});
}
function updateEntry(section,baseUrl,id) {
var container = section.table;
if (id) {
refreshEntry(section,baseUrl,id);
} else {
$(container).empty();
$('<tr class="node-info-node-row red-ui-search-empty blank" colspan="2"><td data-i18n="sidebar.context.none"></td></tr>').appendTo(container).i18n();
}
}
function show() {
RED.sidebar.show("context");
}
return {
init: init
}
})();

View File

@@ -1,449 +0,0 @@
/**
* Copyright JS Foundation and other contributors, http://js.foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
**/
RED.sidebar.info = (function() {
marked.setOptions({
renderer: new marked.Renderer(),
gfm: true,
tables: true,
breaks: false,
pedantic: false,
sanitize: true,
smartLists: true,
smartypants: false
});
var content;
var sections;
var nodeSection;
var infoSection;
var tipBox;
var expandedSections = {
"property": false
};
function init() {
content = document.createElement("div");
content.className = "sidebar-node-info"
RED.actions.add("core:show-info-tab",show);
var stackContainer = $("<div>",{class:"sidebar-node-info-stack"}).appendTo(content);
sections = RED.stack.create({
container: stackContainer
}).hide();
nodeSection = sections.add({
title: RED._("sidebar.info.info"),
collapsible: true
});
nodeSection.expand();
infoSection = sections.add({
title: RED._("sidebar.info.nodeHelp"),
collapsible: true
});
infoSection.expand();
infoSection.content.css("padding","6px");
infoSection.container.css("border-bottom","none");
var tipContainer = $('<div class="node-info-tips"></div>').appendTo(content);
tipBox = $('<div class="node-info-tip"></div>').appendTo(tipContainer);
var tipButtons = $('<div class="node-info-tips-buttons"></div>').appendTo(tipContainer);
var tipRefresh = $('<a href="#" class="workspace-footer-button"><i class="fa fa-refresh"></a>').appendTo(tipButtons);
tipRefresh.click(function(e) {
e.preventDefault();
tips.next();
})
var tipClose = $('<a href="#" class="workspace-footer-button"><i class="fa fa-times"></a>').appendTo(tipButtons);
tipClose.click(function(e) {
e.preventDefault();
RED.actions.invoke("core:toggle-show-tips");
RED.notify(RED._("sidebar.info.showTips"));
});
RED.sidebar.addTab({
id: "info",
label: RED._("sidebar.info.label"),
name: RED._("sidebar.info.name"),
iconClass: "fa fa-info",
content: content,
pinned: true,
enableOnEdit: true
});
if (tips.enabled()) {
tips.start();
} else {
tips.stop();
}
}
function show() {
RED.sidebar.show("info");
}
// TODO: DRY - projects.js
function addTargetToExternalLinks(el) {
$(el).find("a").each(function(el) {
var href = $(this).attr('href');
if (/^https?:/.test(href)) {
$(this).attr('target','_blank');
}
});
return el;
}
function refresh(node) {
if (node === undefined) {
refreshSelection();
return;
}
sections.show();
$(nodeSection.content).empty();
$(infoSection.content).empty();
var propRow;
var table = $('<table class="node-info"></table>').appendTo(nodeSection.content);
var tableBody = $('<tbody>').appendTo(table);
var subflowNode;
var subflowUserCount;
var activeProject = RED.projects.getActiveProject();
if (activeProject) {
propRow = $('<tr class="node-info-node-row"><td>Project</td><td></td></tr>').appendTo(tableBody);
$(propRow.children()[1]).text(activeProject.name||"");
$('<tr class="node-info-property-expand blank"><td colspan="2"></td></tr>').appendTo(tableBody);
$('<button class="editor-button editor-button-small" style="position:absolute;right:2px;"><i class="fa fa-ellipsis-h"></i></button>')
.appendTo(propRow.children()[1])
.click(function(evt) {
evt.preventDefault();
RED.projects.editProject();
});
}
infoSection.container.show();
if (node === null) {
return;
} else if (Array.isArray(node)) {
infoSection.container.hide();
propRow = $('<tr class="node-info-node-row"><td>'+RED._("sidebar.info.selection")+"</td><td></td></tr>").appendTo(tableBody);
$(propRow.children()[1]).text(RED._("sidebar.info.nodes",{count:node.length}))
} else {
var m = /^subflow(:(.+))?$/.exec(node.type);
if (m) {
if (m[2]) {
subflowNode = RED.nodes.subflow(m[2]);
} else {
subflowNode = node;
}
subflowUserCount = 0;
var subflowType = "subflow:"+subflowNode.id;
RED.nodes.eachNode(function(n) {
if (n.type === subflowType) {
subflowUserCount++;
}
});
}
if (node.type === "tab" || node.type === "subflow") {
propRow = $('<tr class="node-info-node-row"><td>'+RED._("sidebar.info."+(node.type==='tab'?'flow':'subflow'))+'</td><td></td></tr>').appendTo(tableBody);
RED.utils.createObjectElement(node.id).appendTo(propRow.children()[1]);
propRow = $('<tr class="node-info-node-row"><td>'+RED._("sidebar.info.tabName")+"</td><td></td></tr>").appendTo(tableBody);
$(propRow.children()[1]).text(node.label||node.name||"");
if (node.type === "tab") {
propRow = $('<tr class="node-info-node-row"><td>'+RED._("sidebar.info.status")+'</td><td></td></tr>').appendTo(tableBody);
$(propRow.children()[1]).text((!!!node.disabled)?RED._("sidebar.info.enabled"):RED._("sidebar.info.disabled"))
} else if (node.type === "subflow") {
propRow = $('<tr class="node-info-node-row"><td>'+RED._("subflow.category")+'</td><td></td></tr>').appendTo(tableBody);
var category = node.category||"subflows";
$(propRow.children()[1]).text(RED._("palette.label."+category,{defaultValue:category}))
}
} else {
propRow = $('<tr class="node-info-node-row"><td>'+RED._("sidebar.info.node")+"</td><td></td></tr>").appendTo(tableBody);
RED.utils.createObjectElement(node.id).appendTo(propRow.children()[1]);
if (node.type !== "subflow" && node.type !== "unknown" && node.name) {
propRow = $('<tr class="node-info-node-row"><td>'+RED._("common.label.name")+'</td><td></td></tr>').appendTo(tableBody);
$('<span class="bidiAware" dir="'+RED.text.bidi.resolveBaseTextDir(node.name)+'"></span>').text(node.name).appendTo(propRow.children()[1]);
}
if (!m) {
propRow = $('<tr class="node-info-node-row"><td>'+RED._("sidebar.info.type")+"</td><td></td></tr>").appendTo(tableBody);
$(propRow.children()[1]).text((node.type === "unknown")?node._orig.type:node.type);
if (node.type === "unknown") {
$('<span style="float: right; font-size: 0.8em"><i class="fa fa-warning"></i></span>').prependTo($(propRow.children()[1]))
}
}
if (!m && node.type != "subflow" && node.type != "comment") {
var defaults;
if (node.type === 'unknown') {
defaults = {};
Object.keys(node._orig).forEach(function(k) {
if (k !== 'type') {
defaults[k] = {};
}
})
} else if (node._def) {
defaults = node._def.defaults;
}
if (defaults) {
var count = 0;
for (var n in defaults) {
if (n != "name" && defaults.hasOwnProperty(n)) {
var val = node[n];
var type = typeof val;
count++;
propRow = $('<tr class="node-info-property-row'+(expandedSections.property?"":" hide")+'"><td>'+n+"</td><td></td></tr>").appendTo(tableBody);
if (defaults[n].type) {
var configNode = RED.nodes.node(val);
if (!configNode) {
RED.utils.createObjectElement(undefined).appendTo(propRow.children()[1]);
} else {
var configLabel = RED.utils.getNodeLabel(configNode,val);
var container = propRow.children()[1];
var div = $('<span>',{class:""}).appendTo(container);
var nodeDiv = $('<div>',{class:"palette_node palette_node_small"}).appendTo(div);
var colour = RED.utils.getNodeColor(configNode.type,configNode._def);
var icon_url = RED.utils.getNodeIcon(configNode._def);
nodeDiv.css({'backgroundColor':colour, "cursor":"pointer"});
var iconContainer = $('<div/>',{class:"palette_icon_container"}).appendTo(nodeDiv);
$('<div/>',{class:"palette_icon",style:"background-image: url("+icon_url+")"}).appendTo(iconContainer);
var nodeContainer = $('<span></span>').css({"verticalAlign":"top","marginLeft":"6px"}).text(configLabel).appendTo(container);
nodeDiv.on('dblclick',function() {
RED.editor.editConfig("", configNode.type, configNode.id);
})
}
} else {
RED.utils.createObjectElement(val).appendTo(propRow.children()[1]);
}
}
}
if (count > 0) {
$('<tr class="node-info-property-expand blank"><td colspan="2"><a href="#" class=" node-info-property-header'+(expandedSections.property?" expanded":"")+'"><span class="node-info-property-show-more">'+RED._("sidebar.info.showMore")+'</span><span class="node-info-property-show-less">'+RED._("sidebar.info.showLess")+'</span> <i class="fa fa-caret-down"></i></a></td></tr>').appendTo(tableBody);
}
}
}
if (node.type !== 'tab') {
if (m) {
$('<tr class="blank"><th colspan="2">'+RED._("sidebar.info.subflow")+'</th></tr>').appendTo(tableBody);
$('<tr class="node-info-subflow-row"><td>'+RED._("common.label.name")+'</td><td><span class="bidiAware" dir=\"'+RED.text.bidi.resolveBaseTextDir(subflowNode.name)+'">'+subflowNode.name+'</span></td></tr>').appendTo(tableBody);
}
}
}
if (m) {
propRow = $('<tr class="node-info-node-row"><td>'+RED._("subflow.category")+'</td><td></td></tr>').appendTo(tableBody);
var category = subflowNode.category||"subflows";
$(propRow.children()[1]).text(RED._("palette.label."+category,{defaultValue:category}))
$('<tr class="node-info-subflow-row"><td>'+RED._("sidebar.info.instances")+"</td><td>"+subflowUserCount+'</td></tr>').appendTo(tableBody);
}
var infoText = "";
if (!subflowNode && node.type !== "comment" && node.type !== "tab") {
infoSection.title.text(RED._("sidebar.info.nodeHelp"));
var helpText = $("script[data-help-name='"+node.type+"']").html()||('<span class="node-info-none">'+RED._("sidebar.info.none")+'</span>');
infoText = helpText;
} else if (node.type === "tab") {
infoSection.title.text(RED._("sidebar.info.flowDesc"));
infoText = marked(node.info||"")||('<span class="node-info-none">'+RED._("sidebar.info.none")+'</span>');
}
if (subflowNode) {
infoText = infoText + (marked(subflowNode.info||"")||('<span class="node-info-none">'+RED._("sidebar.info.none")+'</span>'));
infoSection.title.text(RED._("sidebar.info.subflowDesc"));
} else if (node._def && node._def.info) {
infoSection.title.text(RED._("sidebar.info.nodeHelp"));
var info = node._def.info;
var textInfo = (typeof info === "function" ? info.call(node) : info);
// TODO: help
infoText = infoText + marked(textInfo);
}
if (infoText) {
setInfoText(infoText);
}
$(".node-info-property-header").click(function(e) {
e.preventDefault();
expandedSections["property"] = !expandedSections["property"];
$(this).toggleClass("expanded",expandedSections["property"]);
$(".node-info-property-row").toggle(expandedSections["property"]);
});
}
}
function setInfoText(infoText) {
var info = addTargetToExternalLinks($('<div class="node-help"><span class="bidiAware" dir=\"'+RED.text.bidi.resolveBaseTextDir(infoText)+'">'+infoText+'</span></div>')).appendTo(infoSection.content);
info.find(".bidiAware").contents().filter(function() { return this.nodeType === 3 && this.textContent.trim() !== "" }).wrap( "<span></span>" );
var foldingHeader = "H3";
info.find(foldingHeader).wrapInner('<a class="node-info-header expanded" href="#"></a>')
.find("a").prepend('<i class="fa fa-angle-right">').click(function(e) {
e.preventDefault();
var isExpanded = $(this).hasClass('expanded');
var el = $(this).parent().next();
while(el.length === 1 && el[0].nodeName !== foldingHeader) {
el.toggle(!isExpanded);
el = el.next();
}
$(this).toggleClass('expanded',!isExpanded);
})
}
var tips = (function() {
var enabled = true;
var startDelay = 1000;
var cycleDelay = 15000;
var startTimeout;
var refreshTimeout;
var tipCount = -1;
RED.actions.add("core:toggle-show-tips",function(state) {
if (state === undefined) {
RED.userSettings.toggle("view-show-tips");
} else {
enabled = state;
if (enabled) {
startTips();
} else {
stopTips();
}
}
});
function setTip() {
var r = Math.floor(Math.random() * tipCount);
var tip = RED._("infotips:info.tip"+r);
var m;
while ((m=/({{(.*?)}})/.exec(tip))) {
var shortcut = RED.keyboard.getShortcut(m[2]);
if (shortcut) {
tip = tip.replace(m[1],RED.keyboard.formatKey(shortcut.key));
} else {
return;
}
}
while ((m=/(\[(.*?)\])/.exec(tip))) {
tip = tip.replace(m[1],RED.keyboard.formatKey(m[2]));
}
tipBox.html(tip).fadeIn(200);
if (startTimeout) {
startTimeout = null;
refreshTimeout = setInterval(cycleTips,cycleDelay);
}
}
function cycleTips() {
tipBox.fadeOut(300,function() {
setTip();
})
}
function startTips() {
$(".sidebar-node-info").addClass('show-tips');
if (enabled) {
if (!startTimeout && !refreshTimeout) {
if (tipCount === -1) {
do {
tipCount++;
} while(RED._("infotips:info.tip"+tipCount)!=="infotips:info.tip"+tipCount);
}
startTimeout = setTimeout(setTip,startDelay);
}
}
}
function stopTips() {
$(".sidebar-node-info").removeClass('show-tips');
clearInterval(refreshTimeout);
clearTimeout(startTimeout);
refreshTimeout = null;
startTimeout = null;
}
function nextTip() {
clearInterval(refreshTimeout);
startTimeout = true;
setTip();
}
return {
start: startTips,
stop: stopTips,
next: nextTip,
enabled: function() { return enabled; }
}
})();
function clear() {
// sections.hide();
refresh(null);
}
function set(html,title) {
// tips.stop();
// sections.show();
// nodeSection.container.hide();
infoSection.title.text(title||"");
refresh(null);
$(infoSection.content).empty();
setInfoText(html);
$(".sidebar-node-info-stack").scrollTop(0);
}
function refreshSelection(selection) {
if (selection === undefined) {
selection = RED.view.selection();
}
if (selection.nodes) {
if (selection.nodes.length == 1) {
var node = selection.nodes[0];
if (node.type === "subflow" && node.direction) {
refresh(RED.nodes.subflow(node.z));
} else {
refresh(node);
}
} else {
refresh(selection.nodes);
}
} else {
var activeWS = RED.workspaces.active();
var flow = RED.nodes.workspace(activeWS) || RED.nodes.subflow(activeWS);
if (flow) {
refresh(flow);
} else {
var workspace = RED.nodes.workspace(RED.workspaces.active());
if (workspace && workspace.info) {
refresh(workspace);
} else {
refresh(null)
// clear();
}
}
}
}
RED.events.on("view:selection-changed",refreshSelection);
return {
init: init,
show: show,
refresh: refresh,
clear: clear,
set: set
}
})();

File diff suppressed because it is too large Load Diff

View File

@@ -1,8 +0,0 @@
.ace_gutter {
border-top-left-radius: 4px;
border-bottom-left-radius: 4px;
}
.ace_scroller {
border-top-right-radius: 4px;
border-bottom-right-radius: 4px;
}

View File

@@ -1,69 +0,0 @@
/**
* Copyright JS Foundation and other contributors, http://js.foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
**/
$background-color: #f3f3f3;
$form-placeholder-color: #bbbbbb;
$form-text-color: #444;
$form-input-focus-color: rgba(85,150,230,0.8);
$form-input-border-color: #ccc;
$form-input-border-selected-color: #aaa;
$node-selected-color: #ff7f0e;
$port-selected-color: #ff7f0e;
$link-color: #888;
$link-link-color: #ccc;
$link-link-active-color: #ff7f0e;
$link-subflow-color: #bbb;
$link-unknown-color: #f00;
$primary-border-color: #bbbbbb;
$secondary-border-color: #dddddd;
$tab-background-active: #fff;
$tab-background-inactive: #f0f0f0;
$tab-background-hover: #ddd;
$palette-header-background: #f3f3f3;
$workspace-button-background: #fff;
$workspace-button-background-hover: #ddd;
$workspace-button-background-active: #efefef;
$workspace-button-color: #888;
$workspace-button-color-disabled: #ccc;
$workspace-button-color-focus: #999;
$workspace-button-color-hover: #666;
$workspace-button-color-active: #666;
$workspace-button-color-selected: #AAA;
$workspace-button-toggle-color: #999;
$workspace-button-toggle-color-selected: #888;
$workspace-button-toggle-color-disabled: #ddd;
$workspace-button-color-focus-outline: rgba(85,150,230,0.2);
$typedInput-button-background: #efefef;
$typedInput-button-background-hover: #ddd;
$typedInput-button-background-active: #ddd;
$editor-button-color-primary: #eee;
$editor-button-background-primary: #AD1625;
$editor-button-background-primary-hover: #6E0A1E;
$editor-button-color: #999;
$editor-button-background: #fff;
$shade-color: rgba(160,160,160,0.5);

View File

@@ -1,262 +0,0 @@
/**
* Copyright JS Foundation and other contributors, http://js.foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
**/
.debug-window {
padding:0;
margin:0;
background: #fff;
line-height: 20px;
}
.debug-window .debug-message-payload {
font-size: 14px;
}
.debug-content {
position: absolute;
top: 43px;
bottom: 0px;
left:0px;
right: 0px;
overflow-y: scroll;
}
.debug-filter-box {
position:absolute;
top: 42px;
left: 0px;
right: 0px;
z-index: 20;
background: #f9f9f9;
padding: 10px;
border-bottom: 1px solid #ddd;
box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.debug-filter-row {
.red-ui-nodeList {
margin: 10px 0;
}
}
.debug-message {
position: relative;
border-bottom: 1px solid #eee;
border-left: 8px solid #eee;
border-right: 8px solid #eee;
padding: 2px;
&>.debug-message-meta .debug-message-tools {
display: none;
}
&.debug-message-hover {
border-right-color: #999;
&>.debug-message-meta .debug-message-tools {
display: inline-block;
}
}
}
.debug-message-row {
.debug-message-tools-pin {
display: none;
}
&.debug-message-row-pinned .debug-message-tools-pin {
display: inline-block;
}
&:hover {
background: #f3f3f3;
&>.debug-message-tools {
.debug-message-tools-copy {
display: inline-block;
}
.debug-message-tools-pin {
display: inline-block;
}
}
}
}
.debug-message-meta .debug-message-tools {
.editor-button-small {
font-size: 11px;
}
}
.debug-message-tools {
.button-group:not(:last-child) {
margin-right: 3px;
}
.editor-button-small {
height: 16px;
line-height: 14px;
font-size: 8px;
border-radius: 1px;
padding: 0 3px;
min-width: 18px;
i.fa-terminal {
// terminal icon is a bit thin, so darken its color for better contrast
color: darken($editor-button-color, 30%) !important;
}
&.selected {
color: darken($workspace-button-color-selected, 10%) !important;
background: darken($workspace-button-background-active,10%);
}
}
}
.debug-message-meta {
background: #fff;
font-size: 11px;
color: #707070;
}
.debug-message-date {
padding: 1px 5px 1px 1px;
}
.debug-message-topic {
display: block;
color: #a66;
}
.debug-message-name {
padding: 1px 5px;
color: #707070;
}
.debug-message-tools {
position: absolute;
top: 3px;
right: 1px;
.debug-message-tools-copy {
display: none;
}
}
.debug-message-payload {
display: block;
padding: 2px;
background: #fff;
}
.debug-message-level-log {
border-left-color: #eee;
border-right-color: #eee;
}
.debug-message-level-30 {
border-left-color: #ffdf9d;
border-right-color: #ffdf9d;
}
.debug-message-level-20 {
border-left-color: #f99;
border-right-color: #f99;
}
.debug-message-object-entry {
position: relative;
padding-left: 15px;
}
.debug-message-element {
color: #333;
font-family: Menlo, monospace;
font-size: 13px !important;
line-height: 1.3em;
}
.debug-message-object-key {
color: #792e90;
}
.debug-message-object-value {
}
.debug-message-object-handle {
color: #666;
font-size: 1em;
width: 1em;
text-align: center;
transition: transform 0.1s ease-in-out;
transform: rotate(90deg);
}
.debug-message-element:not(.debug-message-top-level)>.debug-message-expandable>.debug-message-object-handle {
margin-left: -1em;
}
.debug-message-object-entry>.debug-message-expandable>.debug-message-object-handle {
margin-left: -1em;
}
.debug-message-object-entry.collapsed>span>.debug-message-object-handle {
transform: rotate(0deg);
}
.debug-message-element.collapsed>span>.debug-message-object-handle {
transform: rotate(0deg);
}
.debug-message-object-entry.collapsed > .debug-message-object-entry {
display:none;
}
.debug-message-element.collapsed .debug-message-object-entry {
display:none;
}
.debug-message-element:not(.collapsed)>.debug-message-expandable>.debug-message-object-value>.debug-message-object-header {
display:none;
}
.debug-message-element.collapsed .debug-message-buffer-opts {
display: none;
}
.debug-message-element.collapsed .debug-message-object-type-header {
display:none;
}
.debug-message-object-entry pre {
font-family: Menlo, monospace;
font-size: 13px;
line-height: 1.2em;
margin: 0 0 0 -1em;
}
.debug-message-type-other { color: #2033d6; }
.debug-message-type-string { color: #b72828; }
.debug-message-type-null { color: #666; font-style: italic;}
.debug-message-type-meta { color: #666; font-style: italic;}
.debug-message-type-number { color: #2033d6; };
.debug-message-type-number-toggle { cursor: pointer;}
.debug-message-row {
display: block;
padding: 4px 2px 2px;
position: relative;
&.debug-message-row-pinned {
background: #f6f6f6;
}
}
.debug-message-expandable {
cursor: pointer;
}
.debug-message-expandable:hover .debug-message-object-handle {
color: #b72828 !important;
}
.debug-message-buffer-opts a {
font-size: 9px;
color: #bbb;
border: 1px solid #bbb;
border-radius: 2px;
padding: 2px 5px;
margin-left: 5px;
}
.debug-message-buffer-opts a:hover {
text-decoration: none;
color: #999;
border: 1px solid #999;
background: #f3f3f3;
}
.debug-message-buffer-raw > .debug-message-string-rows {
display: none;
}
.debug-message-buffer-string > .debug-message-array-rows {
display: none;
}
.debug-message-type-string-swatch {
display: inline-block;
width: 1.1em;
height: 0.9em;
vertical-align: middle;
border-radius: 3px;
margin: 0 4px;
}

View File

@@ -1,84 +0,0 @@
/**
* Copyright JS Foundation and other contributors, http://js.foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
**/
.dropdown-menu>li>a:hover, .dropdown-menu>li>a:focus, .dropdown-submenu:hover>a, .dropdown-submenu:focus>a {
background: #999;
}
.dropdown-menu * .fa-check-square {
display: none;
color: #e0e0e0;
margin-left: -25px;
margin-top: 3px;
}
.dropdown-menu * a.active > .fa-check-square {
display: inline-block;
}
.dropdown-menu * .fa-square {
display: inline-block;
color: #e0e0e0;
margin-left: -25px;
margin-top: 3px;
}
.dropdown-menu * a.active > .fa-square {
display: none;
}
.dropdown-menu>li.disabled>a:hover>[class^="icon-"] {
background-image: url("vendor/bootstrap/img/glyphicons-halflings.png") !important;
}
/** Fix for unreachable dropdown menu **/
.dropdown-menu {
border-radius: 0;
width: 200px !important;
margin-left: 0px !important;
}
.dropdown-menu > li > a > i {
width: 10px;
text-align: center;
margin-left: -8px;
}
.dropdown-menu > li > a {
padding-left: 38px ;
text-indent: -8px ;
white-space: normal !important;
}
.dropdown-submenu>a:after {
display: none;
}
.dropdown-submenu>a:before {
display: block;
float: left;
width: 0;
height: 0;
margin-top: 5px;
margin-left: -30px;
border-color: transparent;
border-right-color: #e0e0e0;
border-style: solid;
border-width: 5px 5px 5px 0;
content: " ";
}
.dropdown-submenu.disabled > a:before {
border-right-color: #444;
}
.dropdown-submenu.pull-left>.dropdown-menu {
border-radius: 0;
}

View File

@@ -1,416 +0,0 @@
/**
* Copyright JS Foundation and other contributors, http://js.foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
**/
#editor-stack {
position: absolute;
margin: 0;
top: 0;
bottom: 0px;
right: 323px;
width: 0;
z-index: 5;
}
.editor-tray {
position:absolute;
margin: 0;
top: 0;
//min-width: 500px;
width: auto;
right: -1000px;
bottom: 0;
background: #fff;
border-left: 1px solid $secondary-border-color;
border-bottom: 1px solid $primary-border-color;
box-sizing: content-box;
}
.editor-tray.open {
right: 0;
}
.editor-tray-body-wrapper {
width: 100%;
box-sizing: border-box;
overflow: auto;
}
.editor-tray-body {
position: relative;
box-sizing: border-box;
padding: 0.1px; // prevent margin collapsing
.dialog-form,#dialog-form, #node-config-dialog-edit-form {
margin: 20px;
height: calc(100% - 40px);
}
}
.editor-tray-content {
overflow: auto;
}
.editor-tray-header {
@include disable-selection;
position: relative;
box-sizing: border-box;
font-weight: bold;
border-bottom: 1px solid $secondary-border-color;
background: $palette-header-background;
&:after {
content: "";
display: table;
clear: both;
}
}
.editor-tray-footer {
@include component-footer;
height: 35px;
button {
@include editor-button;
padding: 3px 7px;
font-size: 11px;
}
}
.editor-tray-toolbar {
text-align: right;
padding: 6px;
button {
@include editor-button;
&.toggle {
@include workspace-button-toggle;
}
}
}
.editor-tray-titlebar {
border-bottom: 1px solid $secondary-border-color;
padding: 8px;
}
.editor-tray-breadcrumbs {
list-style-type: none;
margin: 0;
padding:0;
li {
display: inline-block;
padding:0;
margin:0;
&:not(:last-child) {
color: $editor-button-color;
font-weight: normal;
&:after {
display: inline-block;
content: '>';
margin: 0 5px;
}
}
}
}
.editor-tray-resize-handle {
position: absolute;
top: 0px;
bottom: 0px;
width: 7px;
left: -9px;
background: $background-color url(images/grip.png) no-repeat 50% 50%;
cursor: col-resize;
border-left: 1px solid $primary-border-color;
box-shadow: -1px 0 6px rgba(0,0,0,0.1);
&.editor-tray-resize-maximised {
background: $background-color;
cursor: default;
}
}
.editor-tray-resize-button {
@include workspace-button;
display: block;
height: 37px;
line-height: 35px;
border: none;
border-bottom: 1px solid $secondary-border-color;
margin: 0;
background: $background-color;
color: $workspace-button-color;
}
#palette-shade, #editor-shade, #header-shade, #sidebar-shade {
@include shade;
z-index: 2;
}
#sidebar-shade {
left: -8px;
top: -1px;
bottom: -1px;
}
#full-shade {
@include shade;
z-index: 15;
}
.dialog-form,#dialog-form, #node-config-dialog-edit-form {
height: 100%;
}
.input-error {
border-color: rgb(214, 97, 95) !important;
}
.form-row {
clear: both;
color: $form-text-color;
margin-bottom:12px;
}
.form-row label {
display: inline-block;
width: 100px;
}
.form-row input, .form-row div[contenteditable="true"] {
width:70%;
}
.form-tips {
background: #ffe;
padding: 8px;
border-radius: 2px;
border: 1px solid $secondary-border-color;
max-width: 450px;
}
.form-tips code {
border: none;
padding: auto;
}
.form-tips a {
text-decoration: underline;
}
.form-warning {
border-color: #d6615f;
}
.node-text-editor {
border:1px solid #ccc;
border-radius:5px;
overflow: hidden;
font-size: 14px !important;
font-family: Menlo, Consolas, 'DejaVu Sans Mono', Courier, monospace !important;
}
.editor-button {
@include workspace-button;
height: 34px;
line-height: 32px;
font-size: 13px;
border-radius: 2px;
padding: 0 10px;
white-space: nowrap;
text-overflow: ellipsis;
&.toggle {
@include workspace-button-toggle;
}
}
.editor-button-small {
height: 20px;
min-width: 20px;
line-height: 18px;
font-size: 10px;
border-radius: 2px;
padding: 0 5px;
}
#node-config-dialog-scope-container {
cursor: auto;
float: right;
font-size: 12px !important;
line-height: 35px;
}
#node-config-dialog-scope-warning {
display: inline-block;
margin-right: 5px;
color: #AD1625;
vertical-align: middle;
}
#node-config-dialog-scope {
margin: 1px 0 0 0;
padding: 0;
height: 22px;
width: 200px;
}
#node-config-dialog-user-count {
vertical-align: middle;
display:inline-block;
margin-right: 20px;
float:left;
font-size: 12px;
line-height: 35px;
}
.node-input-expression-editor #dialog-form {
margin: 0;
height: 100%;
.red-ui-panel {
&:first-child {
padding: 20px 20px 0;
}
&:last-child {
padding-bottom: 20px;
}
}
}
.node-input-expression-tab-content {
position: relative;
padding: 0 20px;
}
#node-input-expression-help {
position: absolute;
top: 35px;
left:0;
right: 0;
bottom:0;
padding: 0 20px;
overflow: auto;
box-sizing: border-box;
}
#node-input-expression-panel-info {
& > .form-row {
margin: 0;
& > div:first-child {
margin-top: 10px;
}
}
}
.node-input-expression-legacy, .node-input-buffer-type {
font-size: 0.8em;
float: left;
cursor: pointer;
border: 1px solid white;
padding: 2px 5px;
border-radius: 2px;
&:hover {
border-color: $form-input-border-color;
}
}
.node-input-buffer-type {
float: none;
text-align: right;
}
#clipboard-hidden {
position: absolute;
top: -3000px;
}
.node-label-form-row {
margin: 5px 0;
label {
margin-right: 20px;
text-align: right;
width: 30px;
}
button {
margin-left: 10px;
}
input {
width: calc(100% - 100px);
}
#node-settings-icon-module {
width: calc(55% - 50px);
}
#node-settings-icon-file {
width: calc(45% - 55px);
margin-left: 5px;
}
}
.node-label-form-none {
span {
padding-left: 50px;
width: 100px;
color: #999;
}
}
.ace_read-only {
background: #eee !important;
.ace_cursor {
color: transparent !important;
}
}
#node-settings-icon {
margin-left: 10px;
width: calc(100% - 163px);
}
.red-ui-icon-picker {
position: absolute;
border: 1px solid $primary-border-color;
box-shadow: 0 1px 6px -3px black;
background: white;
z-Index: 21;
display: none;
select {
box-sizing: border-box;
margin: 3px;
width: calc(100% - 6px);
}
}
.red-ui-icon-list {
width: 308px;
height: 200px;
overflow-y: scroll;
line-height: 0px;
}
.red-ui-icon-list-icon {
display: inline-block;
margin: 2px;
padding: 4px;
cursor: pointer;
border-radius: 4px;
&:hover {
background: lighten($node-selected-color,20%);
}
&.selected {
background: lighten($node-selected-color,20%);
.red-ui-search-result-node {
border-color: white;
}
}
}
.red-ui-icon-list-module {
background: $palette-header-background;
font-size: 0.9em;
padding: 3px;
color: #666;
clear: both;
i {
margin-right: 5px;
}
}
.red-ui-icon-meta {
border-top: 1px solid $secondary-border-color;
span {
padding: 4px;
color: #666;
font-size: 0.9em;
}
button {
float: right;
margin: 2px;
}
}

View File

@@ -1,296 +0,0 @@
/**
* Copyright JS Foundation and other contributors, http://js.foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
**/
.hidden {
display: none;
}
.lasso {
stroke-width: 1px;
stroke: #ff7f0e;
fill: rgba(20,125,255,0.1);
stroke-dasharray: 10 5;
}
.group-box {
stroke-width: 1px;
stroke: #aaaaaa;
fill: rgba(208, 211, 238, 0.1);
stroke-dasharray: 3 3;
}
.group-box-active {
fill: #fff;
stroke: #ff7f0e;
}
.group_label {
stroke-width: 0;
fill: #999;
font-size: 11px;
pointer-events: none;
-webkit-touch-callout: none;
@include disable-selection;
}
.pull-right {
margin-left: 20px;
}
.node_label_italic {
font-style: italic;
}
.node_label_unknown {
font-style: italic;
fill: #e00 !important;
}
.node_label_white {
fill: #eee !important;
}
.node_label {
stroke-width: 0;
fill: #333;
font-size: 14px;
pointer-events: none;
-webkit-touch-callout: none;
@include disable-selection;
}
.port_label {
stroke-width: 0;
fill: #888;
font-size: 16px;
alignment-baseline: middle;
text-anchor: middle;
pointer-events: none;
-webkit-touch-callout: none;
@include disable-selection;
}
.function_label {
font-size: 12px;
}
.node {
stroke: #999;
cursor: move;
stroke-width: 1;
}
.node_unknown {
stroke-dasharray:10,4;
stroke: #f33;
}
.tool_arrow {
stroke-width: 1;
stroke: #999;
fill: #999;
cursor: pointer;
}
.node_tools {
fill: #ddd;
stroke: #999;
cursor: move;
stroke-width: 1;
cursor: pointer;
}
.node_tools_hovered {
stroke: #ff7f0e;
fill: #eee;
}
.node_button {
fill: inherit;
}
.port {
stroke: #999;
stroke-width: 1;
fill: #ddd;
cursor: crosshair;
}
.port_highlight {
stroke: #6DA332;
stroke-width: 3;
fill: #fff;
pointer-events:none;
fill-opacity: 0.5;
}
.node_error {
stroke: #ff0000;
stroke-width: 2;
fill: #ff7f0e;
}
.node_badge {
stroke: rgb(93, 114, 145);
stroke-width: 1;
fill: rgb(190, 209, 255);
}
.node_badge_label {
stroke-width:0;
fill: #fff;
font-size: 11px;
pointer-events: none;
-webkit-touch-callout: none;
@include disable-selection;
}
.node_invalid {
stroke: #ff0000;
}
.node_selected {
stroke-width: 2;
stroke: $node-selected-color !important;
}
.node_highlighted {
border-color: #dd1616 !important;
border-style: dashed !important;
stroke: #dd1616;
stroke-width: 2;
stroke-dasharray: 10, 4;
}
.node_hovered {
}
.node_subflow .node {
stroke-dasharray:8, 3;
}
.node_quickadd * {
stroke-dasharray: 12,3;
}
.node_status_label {
@include disable-selection;
stroke-width: 0;
fill: #888;
font-size:9pt;
stroke:#000;
text-anchor:start;
}
.port_hovered {
stroke: $port-selected-color;
fill: $port-selected-color;
}
.port_quick_link {
stroke: $port-selected-color;
fill: $port-selected-color;
}
.subflowport {
stroke-dasharray: 5,5;
fill: #eee;
stroke: #999;
}
.drag_line {
stroke: $node-selected-color;
stroke-width: 3;
fill: none;
pointer-events: none;
}
.drag_line_hidden {
stroke: $node-selected-color;
stroke-width: 0;
pointer-events: none;
fill: none;
}
.link_line {
stroke: $link-color;
stroke-width: 3;
fill: none;
pointer-events: none;
}
.link_link {
stroke-width: 2;
stroke-dasharray: 10,5;
stroke: $link-link-color;
fill: none;
stroke-dasharray: 15,2;
pointer-events: none;
}
.link_port {
fill: #fff;
stroke: $link-link-color;
stroke-width: 1;
}
.link_group_active .link_port {
stroke: $link-link-active-color;
}
.link_group:hover {
cursor: pointer;
}
.link_subflow {
stroke: $link-subflow-color;
stroke-dasharray: 10,5;
stroke-width: 2;
}
.link_outline {
stroke: #fff;
stroke-width: 5;
cursor: crosshair;
fill: none;
pointer-events: none;
}
.link_background {
stroke: #fff;
opacity: 0;
stroke-width: 20;
cursor: crosshair;
fill: none;
}
.link_splice > .link_line {
stroke-dasharray: 15,8;
}
g.link_selected path.link_line {
stroke: $node-selected-color;
}
g.link_unknown path.link_line {
stroke: $link-unknown-color;
stroke-width: 2;
stroke-dasharray: 10, 4;
}
@keyframes port_tooltip_fadeIn { from { opacity:0; } to { opacity:1; } }
.port_tooltip {
opacity:0;
animation: 0.1s ease-in 0s 1 normal forwards port_tooltip_fadeIn;
pointer-events: none;
path {
fill: white;
stroke: #999;
stroke-width: 1;
}
}
.port_tooltip_label {
stroke-width: 0;
fill: #666;
font-size: 12px;
pointer-events: none;
-webkit-touch-callout: none;
@include disable-selection;
}

Some files were not shown because too many files have changed in this diff Show More