Compare commits

...

3374 Commits

Author SHA1 Message Date
Nick O'Leary
4f77bbeb2b Update for 1.3.5 2021-05-18 11:52:49 +01:00
Nick O'Leary
be9521f659 Revert some of #2967 to fix treeList gutter width calculation 2021-05-14 21:17:47 +01:00
Nick O'Leary
90761fd840 Fix 'SyntaxError' in Function node when last line of on-stop is a comment 2021-05-13 17:23:25 +01:00
Nick O'Leary
d7dc7c4eda Fix error handling in runtime/lib/api/nodes 2021-05-13 15:46:56 +01:00
Nick O'Leary
2bbdc85a29 Prevent unknown node from breaking editor
If a node provides a .js file that registers a type
but its .html is empty, then the editor will know about
the type, but there will be no node definition.

This fix handles that in some of the utility functions
for generating node appearance.

This wasn't an exhaustive check for these things - just
some obvious candidates that I hit in testing 'bad' nodes
2021-05-13 14:28:01 +01:00
Nick O'Leary
15aa249f64 Stop module with missing types from preventing editor load 2021-05-13 14:06:43 +01:00
Nick O'Leary
866f305686 Open subflow tab next to active tab rather than at the end 2021-05-13 13:57:29 +01:00
Nick O'Leary
c8653f19bf Merge pull request #2985 from node-red-hitachi/update-function-node-info-text
Update Japanese info text of function node
2021-05-12 09:41:09 +01:00
Hiroyasu Nishiyama
b01100d818 Update Japanese info text of function node 2021-05-12 08:54:32 +09:00
Nick O'Leary
d4096a9026 Merge pull request #2984 from node-red/migrate-sass
Migrate to sass module from node-sass
2021-05-11 18:56:06 +01:00
Nick O'Leary
b9e780cdcd Add Node 16 with sass fixed 2021-05-11 18:14:05 +01:00
Nick O'Leary
b77cd56a01 Migrate from node-sass to sass
node-sass is deprecated and doesn't work on Node 16.
sass is actively maintained and considered the canonical sass
implementation.
2021-05-11 18:13:21 +01:00
Nick O'Leary
9cdec156dc Merge pull request #2974 from aheissenberger/fix-bundle-error
Fixed esbuild bundle error "installRetry" was declared a constant and changed
2021-05-11 17:45:07 +01:00
Nick O'Leary
6aa5968863 Fix Function tab label names in the node help text
Closes #2978
2021-05-11 17:15:27 +01:00
Nick O'Leary
8f7686cd7b Handle sidebar tab that no longer exists when setting first active 2021-05-11 16:42:32 +01:00
Nick O'Leary
d8d384a979 Fix plugin loading when browser sends unrecognised lang 2021-05-11 16:42:00 +01:00
Nick O'Leary
ade318bb78 Support mousewheel scroll in tab bar 2021-05-11 15:58:01 +01:00
Nick O'Leary
ed3aa8189f Shrink default notification box
Also reduces Inject/Debug notification display time as 5 seconds is a
long time for a message telling you it worked
2021-05-11 14:45:53 +01:00
Nick O'Leary
3e43597617 Prevent error whilst drag/drop importing from leaving dropTarget visible
Fixes #2982
2021-05-11 14:10:40 +01:00
Nick O'Leary
e641b0a965 Fix scaling issues when dragging nodes into scaled workspace 2021-05-10 21:03:27 +01:00
Hiroyasu Nishiyama
eddddc6c9b fix duplicate csv node example (#2980) 2021-05-10 15:39:23 +01:00
Nick O'Leary
f249d6306f Merge pull request #2976 from kazuhitoyokoi/master-fixinfotips
Fix incorrect shortcut keys in info tips
2021-05-10 09:42:59 +01:00
Kazuhito Yokoi
5c31bd54e4 Fix incorrect shortcut keys in info tips 2021-05-06 20:09:35 +09:00
Nick O'Leary
db0ff74857 Reduce code duplication around node/label generation 2021-05-04 11:12:55 +01:00
Andreas Heissenberger
54c9d27fd8 fix 2021-05-03 17:35:50 +02:00
Andreas Heissenberger
01888ff078 fix "installRetry" was declared a constant and changed 2021-05-03 17:23:27 +02:00
Nick O'Leary
1af21735a9 Fix theme handling when no editorTheme.page setting 2021-04-29 15:32:26 +01:00
Nick O'Leary
9886af3cec Fix jshint error in treeList 2021-04-29 14:09:21 +01:00
Nick O'Leary
1eb8f9ad97 Update changelog 2021-04-29 14:01:40 +01:00
Nick O'Leary
08e73d9d7d Merge pull request #2967 from hanc2006/master
Fixed remove item when depth=0 and wrong gutter calc treeList widget
2021-04-29 14:00:02 +01:00
Nick O'Leary
b0e349b215 Update for 1.3.4 2021-04-29 11:22:22 +01:00
Dave Conway-Jones
9ee8c1c791 Give delay node random mina nd max more space so you can see complete value 2021-04-29 10:36:13 +01:00
Nick O'Leary
cd3aba2b89 Allow nodes to access resolved theme files
Fixes #2968
2021-04-29 10:17:07 +01:00
Daniele
a150d8e289 Update packages/node_modules/@node-red/editor-client/src/js/ui/common/treeList.js
Thanks for the tip, I'll remember next time.

Co-authored-by: Nick O'Leary <nick.oleary@gmail.com>
2021-04-28 23:37:26 +02:00
Nick O'Leary
6da8e92f20 Fix inject node output tooltip extra property count 2021-04-28 22:01:39 +01:00
Nick O'Leary
7df1a03b4b Handle subflow modules that contain subflows 2021-04-28 21:50:00 +01:00
Nick O'Leary
ad316ffd37 Merge pull request #2964 from node-red-hitachi/fix-grunt-error-on-exec-node
fix grunt fail on exec node test
2021-04-28 21:02:23 +01:00
Nick O'Leary
91f5542a57 Fix importing node to currently flow rather than match its old z value
If you import a node whose z value is a known existing tab, it is getting
imported to that tab, rather than the expected behaviour of being imported
to the current tab.

This commit fixes that by checked if the node is being imported to a tab
that was included in the import, rather than pre-existing.
2021-04-28 20:54:31 +01:00
GitHub
d47a8aa562 Fix remove item when depth=0 and wrong gutter calc 2021-04-28 17:25:26 +02:00
Hiroyasu Nishiyama
70433f3d05 fix grunt fail on exec node test 2021-04-28 21:40:17 +09:00
Dave Conway-Jones
0e02d03d9a Merge branch 'master' of https://github.com/node-red/node-red 2021-04-27 11:12:10 +01:00
Nick O'Leary
8e7efd98b2 Don't let 'escape' whilst moving nodes interrupt things
Fixes #2960
2021-04-26 16:48:21 +01:00
Nick O'Leary
f5a1c8bc49 Merge pull request #2957 from node-red-hitachi/fix-error-on-git-auto-commit
fix error on auto commit for no flow change
2021-04-26 11:54:05 +01:00
Nick O'Leary
4cb8e99430 Timeout http upgrade requests that are not otherwise handled
Fixes #2956
2021-04-26 11:45:28 +01:00
Nick O'Leary
bbac49ff38 Ensure function expand button is above vertical scrollbar
Fixes #2955
2021-04-26 10:18:25 +01:00
Nick O'Leary
1d12017f11 Sort context stores in TypedInput and ensure default first
Fixes #2954
2021-04-26 10:13:57 +01:00
Hiroyasu Nishiyama
a480919ec3 fix error on auto commit for no flow change 2021-04-26 09:05:53 +09:00
Dave Conway-Jones
f8abf9fce1 add another test to csv 2021-04-25 08:53:18 +01:00
Dave Conway-Jones
9f1deb0c36 CSV Add couple more special character tests just to make sure 2021-04-23 11:19:23 +01:00
Dave Conway-Jones
4cebbf8d22 Fix CSV handling of special chars as separators
(ie escape regex special chars)
and add tests
to close #2950
2021-04-23 10:47:23 +01:00
Nick O'Leary
e57ebdb583 Merge pull request #2947 from kazuhitoyokoi/master
Fix margin between nodes on palette
2021-04-21 09:42:43 +01:00
Kazuhito Yokoi
372122037f Fix margin between nodes on palette 2021-04-21 13:14:46 +09:00
Nick O'Leary
23a5cb1917 Ensure typedInput option is selected in dropdown menu
Part of #2945
2021-04-20 23:39:21 +01:00
Nick O'Leary
f8d5fef3c4 Ensure typedInput without value has focus class removed
Closes #2945
2021-04-20 23:25:56 +01:00
Nick O'Leary
0e06da6c63 Update for 1.3.3 2021-04-20 11:06:23 +01:00
Nick O'Leary
9eb668ab30 Prevent TypedInput label overflowing element
Also adds title attribute to the button for the label so it gets a tooltip
2021-04-19 15:28:17 +01:00
Nick O'Leary
233a74c146 Remove TypedInput from tab focus when only one type available 2021-04-19 15:27:47 +01:00
Nick O'Leary
ff00afb5d7 Fix project credential secret reset handling
Part of #2868
2021-04-19 11:32:26 +01:00
Nick O'Leary
3f43dc1855 Fix jshint error 2021-04-19 10:43:01 +01:00
Nick O'Leary
4a4e7fc7cb Make typedInput.disable more consistent in behaviour
Fixes #2942
2021-04-19 10:39:58 +01:00
Dave Conway-Jones
0253dc9623 ensure CSV node can send false as string 2021-04-19 10:03:11 +01:00
Nick O'Leary
374ef3902c Merge pull request #2938 from hardillb/dev
Fix for #2935
2021-04-16 13:27:22 +01:00
Ben Hardill
235690064f Fix for #2935 2021-04-16 13:26:11 +01:00
Nick O'Leary
0167c25e08 Export package version in Grunt file so docs template can access 2021-04-16 11:56:23 +01:00
Nick O'Leary
04a3c4bb22 Ensure mqtt-close message is published when closing mqtt nodes
The change in 1.3 where we ensure config nodes are closed last broke this behaviour. Previously, the config node would get closed triggering the close message. With the new 1.3 behaviour, the flow nodes are stopped and as soon as the last flow node deregisters itself, the broker node would disconnect without sending the close message.

The fix is to send the close message as part of the deregister flow as that will handle all cases properly
2021-04-14 22:28:25 +01:00
Nick O'Leary
b5fda5642f Fix package semver comparison to allow >1 version increment 2021-04-14 18:06:59 +01:00
Nick O'Leary
b0955705be Update to 1.3.2 2021-04-13 13:34:16 +01:00
Nick O'Leary
a4a624d537 Update changelog 2021-04-13 13:33:41 +01:00
Nick O'Leary
6a8cf1b768 Fix variable reference error in editableList
Fixes #2933
2021-04-13 13:24:54 +01:00
Kazuhito Yokoi
39274b0c5d Add Japanese translations for Node-RED v1.3.1 (#2930) 2021-04-12 14:15:07 +01:00
Dave Conway-Jones
55c2430671 Merge branch 'master' of https://github.com/node-red/node-red 2021-04-12 12:16:32 +01:00
Dave Conway-Jones
023486e175 File out node - fix timing of msg.send to be after close., and...
allow msg.encoding to set encoding if desired.
To close #2921
2021-04-12 12:16:23 +01:00
Nick O'Leary
8227643741 Merge branch 'pr_2920' 2021-04-12 12:08:32 +01:00
Nick O'Leary
e44131f97a Update function node help reference to node properties 2021-04-12 12:08:07 +01:00
Nick O'Leary
5028377d45 Fix MQTT Broker TLS config row layout
Fixes #2927
2021-04-12 11:48:10 +01:00
Nick O'Leary
51aaf1b150 Handle package.json without dependencies section 2021-04-12 10:34:43 +01:00
Nick O'Leary
13406e76de Ensure theme login image is passed through to api response
Fixes #2929
2021-04-12 10:06:35 +01:00
Dave Conway-Jones
4672d98e8a split node - add comment to info re $N being number of messages arriving 2021-04-12 09:47:18 +01:00
Dave Conway-Jones
858b3d640a fix CSV parsing with other than , separator
(and joining as well...
and add tests
to close #2925
2021-04-10 22:17:31 +01:00
Nick O'Leary
6087002562 Fix handling of user-provided keymap
Fixes #2926
2021-04-10 21:34:26 +01:00
Kristian Heljas
ad788fbed1 Function node: describe node.outputCount in help text 2021-04-08 21:09:44 +03:00
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
Nick O'Leary
06abe63fb1 Merge branch 'master' into runtime-api 2018-07-30 10:13:51 +01:00
Nick O'Leary
5155770213 Ensure add/remove modules are handled sequentially 2018-07-30 10:08:39 +01:00
Nick O'Leary
9d507b09ca Skip context tests until they migrate to runtimeAPI structure 2018-07-29 23:54:43 +01:00
Nick O'Leary
9c4a712dc7 Merge branch 'master' into runtime-api 2018-07-29 23:47:19 +01:00
Nick O'Leary
f1d5bbb036 Remove type editors from master template 2018-07-28 22:36:31 +01:00
Nick O'Leary
69ed0aebc3 Merge pull request #1850 from node-red-hitachi/without-callback
Allow `get` and `keys` to be called without callback
2018-07-28 22:08:36 +01:00
Nick O'Leary
549e56e220 Add editorTheme.palette.theme to allow overriding colours 2018-07-27 22:05:42 +01:00
Nick O'Leary
450f4d9a5a Fix error reporting of invalid jsonata in Join/reduce 2018-07-27 22:05:42 +01:00
HirokiUchikawa
6533a9793c Allow get and keys to be called without callback 2018-07-27 21:33:38 +09:00
Nick O'Leary
2000cadb17 Merge pull request #1847 from node-red-hitachi/update-uitest
Add UItest for http endpoints
2018-07-27 13:21:20 +01:00
Nick O'Leary
083c321efa Merge pull request #1848 from node-red-hitachi/grunt-on-windows
Fix test cases on windows and under proxy
2018-07-27 13:21:06 +01:00
Nick O'Leary
f64c4a981f Merge pull request #1846 from node-red-hitachi/remove-html-element
Fix to remove unnecessary typedInput option element
2018-07-27 13:20:44 +01:00
Nick O'Leary
3ac8ce03bf Merge pull request #1845 from node-red-hitachi/fix-file-node-test-for-ordering-assumption-of-output-message
Update file node test to cope with occasional failure
2018-07-27 13:20:27 +01:00
nakanishi
66fca8710e Fix test cases on windows and under proxy 2018-07-27 15:40:55 +09:00
Yuma Matsuura
1e245ece46 Update cookbook uitest 2018-07-27 13:48:43 +09:00
Hiroyasu Nishiyama
81efce03ba update file node test to cope with occasional failure 2018-07-27 08:30:03 +09:00
Nick O'Leary
4e549dd426 Add function tests for multiple-set access to context 2018-07-26 21:15:32 +01:00
Nick O'Leary
52f74ff7e0 Join: reduce fails if count not in first msg received 2018-07-26 14:13:12 +01:00
HirokiUchikawa
3c71b815f5 Fix to remove unnecessary typedInput element 2018-07-26 20:13:08 +09:00
Nick O'Leary
9efd48fe51 Fixup Join node to apply reduce_fixup asynchronously 2018-07-25 11:08:03 +01:00
Nick O'Leary
4609ee75b6 Revert jsonata sync access to context stores
- store access only possible with callback
2018-07-25 11:07:29 +01:00
Nick O'Leary
963ea4177e Add store arg to sync $flowContext/$globalContext 2018-07-25 10:18:59 +01:00
Nick O'Leary
17e6940a42 Update context plugins to use get/setObjectProperty 2018-07-25 09:59:26 +01:00
Nick O'Leary
315a9ceba3 Add RED.util.get/setObjectProperty to avoid stripping msg. 2018-07-25 09:27:27 +01:00
Nick O'Leary
a2bdeedb09 Merge pull request #1843 from node-red-hitachi/test-runtime-util
Add tests for runtime util
2018-07-25 09:16:50 +01:00
Nick O'Leary
da5700d2d7 Merge pull request #1842 from node-red-hitachi/runtime-message-jp
Update Japanese message catalogue of runtime.json
2018-07-25 09:15:18 +01:00
nakanishi
90e7f30247 Add tests for runtime util 2018-07-25 09:15:27 +09:00
Hiroyasu Nishiyama
3ccf6ba892 update Japanese message catalogue of runtime.json 2018-07-24 21:53:59 +09:00
Nick O'Leary
e50cd5b745 Bump bcrypt dependency 2018-07-24 10:21:08 +01:00
Nick O'Leary
db77be5d72 Update i18next in runtime 2018-07-23 23:25:57 +01:00
Nick O'Leary
c36870c23e Bump sem-ver minor dependencies 2018-07-23 15:52:02 +01:00
Nick O'Leary
e9be007040 Tidy up context store error messages 2018-07-23 15:20:13 +01:00
Nick O'Leary
9e400d9aa6 Merge pull request #1838 from node-red-hitachi/translate-node-jp
Update Japanese translation(MQTT node and editor.json)
2018-07-23 13:37:09 +01:00
Nick O'Leary
490c8dae75 Merge pull request #1837 from node-red-hitachi/master-switch-change-test
Fix and add test cases for persistable context
2018-07-23 13:29:23 +01:00
Nick O'Leary
3bcffe375d Merge pull request #1834 from node-red-hitachi/add-tests-for-context-admin-api
Add tests for context admin api
2018-07-23 13:29:10 +01:00
Nick O'Leary
9f81a591e1 Move multiple-get/set logic into individual context stores 2018-07-23 13:28:06 +01:00
Yuma Matsuura
3db5306c70 Update Japanese text of type input 2018-07-23 10:11:35 +09:00
Yuma Matsuura
45029dd084 Update Japanese text of type input 2018-07-23 10:11:23 +09:00
Yuma Matsuura
b01cd30339 Update Japanease text of mqtt node 2018-07-23 10:11:10 +09:00
Hiroyasu Nishiyama
09329e1104 add tests for context admin api 2018-07-21 12:00:54 +09:00
Nick O'Leary
ab0fc2ecfa Merge pull request #1818 from node-red-hitachi/context-store-logging
Add logging of context store
2018-07-20 20:23:32 +01:00
Nick O'Leary
bf5d36d6bd Merge branch 'master' into context-store-logging 2018-07-20 20:23:19 +01:00
Hiroyasu Nishiyama
a29527ec96 use implicit logging of context store 2018-07-20 23:26:47 +09:00
Nick O'Leary
45e7ad8049 Merge pull request #1831 from node-red-hitachi/update-info-of-file-node
Update info text of file node (English & Japanese)
2018-07-20 12:47:17 +01:00
Nick O'Leary
4d54663efd Merge pull request #1832 from node-red-hitachi/fix-isempty-rule
Fix bugs about "isEmpty" rule in Switch node
2018-07-20 12:45:53 +01:00
Nick O'Leary
29d386cc51 Merge pull request #1833 from node-red-hitachi/update-test-for-file-node
Update test for file node for new output port
2018-07-20 11:45:39 +01:00
Nick O'Leary
ba1a67969b Merge pull request #1825 from node-red-hitachi/add-types-to-trigger-node
Add support of bin, data, and env type to trigger node
2018-07-20 11:45:17 +01:00
Nick O'Leary
390ea5419e Merge pull request #1826 from node-red-hitachi/update-join-httpreq-info-jp
Update Japanese info text of JSON and HTTP Request node
2018-07-20 11:45:03 +01:00
Nick O'Leary
0fdeec7cc4 Merge pull request #1827 from node-red-hitachi/context-test-localfile
Add test cases for localfilesystem context
2018-07-20 11:44:39 +01:00
Nick O'Leary
e34d883e50 Merge pull request #1828 from node-red-hitachi/master-editorjson
Update Japanese translation (editor.json)
2018-07-20 11:44:19 +01:00
Nick O'Leary
507871687b Merge pull request #1830 from node-red-hitachi/translate-switch
Translate switch and batch nodes and icon palette
2018-07-20 11:44:13 +01:00
Nick O'Leary
ed58f62cd1 Merge pull request #1824 from node-red-hitachi/update-exec-node-info-jp
Update Japanese info text of exec node
2018-07-20 11:43:11 +01:00
Nick O'Leary
94bc4e7125 Merge pull request #1822 from node-red-hitachi/context-test-memory
Add test cases for memory context
2018-07-20 11:42:45 +01:00
Nick O'Leary
5832f7930d Merge pull request #1821 from node-red-hitachi/uitest-httprequest
Add UItest for http request
2018-07-20 11:42:28 +01:00
Nick O'Leary
0066a20c22 Merge pull request #1820 from node-red-hitachi/context-test-index
Add test cases for index.js of context
2018-07-20 11:42:10 +01:00
Nick O'Leary
774e4bfced Merge pull request #1819 from node-red-hitachi/fix-template-node-test
Fix test for template node for persistable context
2018-07-20 11:41:41 +01:00
Hiroyasu Nishiyama
054c7a76a4 update test for file node for new output port 2018-07-20 18:28:49 +09:00
HirokiUchikawa
c7f3b77aac Fix test cases of empty rule 2018-07-20 17:04:49 +09:00
HirokiUchikawa
a6a4620374 Fix an error that occurs when evaluating null on isEmpty rule. 2018-07-20 17:03:23 +09:00
HirokiUchikawa
5148c62d1c Fix appearance about Empty rules. 2018-07-20 16:53:30 +09:00
HirokiUchikawa
6fc863a91e Fix wrong test cases 2018-07-20 15:24:44 +09:00
Hiroyasu Nishiyama
e066a154a1 update info text of file node (English & Japanese) 2018-07-20 14:59:52 +09:00
nakanishi
d432edaed2 Translate icon palette parts into Japanese 2018-07-20 13:36:59 +09:00
nakanishi
8f34f4e80b Update Japanese translation for switch and batch nodes 2018-07-20 13:35:24 +09:00
nakanishi
39b751acf5 Add test cases for localfilesystem context 2018-07-20 11:23:37 +09:00
Kazuhito Yokoi
bd5e8ba961 Add test case of persistalbe context for switch node 2018-07-20 10:34:43 +09:00
HirokiUchikawa
ed20327c41 Update Japanese text of editor.json 2018-07-20 10:23:28 +09:00
Kazuhito Yokoi
991c68c394 Update Japanese translation (editor.json) 2018-07-20 10:23:27 +09:00
HirokiUchikawa
2acc31a4e7 Update Japanese info text of json node 2018-07-19 21:35:00 +09:00
Hiroyasu Nishiyama
b9733e3dfa add support of bin, data, and env to trigger node 2018-07-19 21:20:02 +09:00
Hiroyasu Nishiyama
bb106bfce7 small update of Japanese info text of exec node 2018-07-19 20:13:27 +09:00
HirokiUchikawa
daf1388a6a Update Japanese info text of http request node 2018-07-19 19:32:53 +09:00
Nick O'Leary
8226f1fa75 Merge pull request #1823 from node-red-hitachi/fix-referenceerror
Fix the ReferenceError in change node
2018-07-19 10:08:36 +01:00
HirokiUchikawa
e675512fa3 Fix ReferenceError in change node
and add a test case
2018-07-19 14:44:21 +09:00
Hiroyasu Nishiyama
65e67b6c3e add a space to align position of ":" 2018-07-19 14:18:27 +09:00
Hiroyasu Nishiyama
7612481570 ignore default store from logging 2018-07-19 14:12:01 +09:00
nakanishi
f6c7cb5804 Add test cases for global context of memory context 2018-07-19 13:49:36 +09:00
Yuma Matsuura
2201c9062f Add UItest for http request 2018-07-19 13:17:41 +09:00
nakanishi
ca3da262da Add test cases for index.js of context 2018-07-19 12:58:42 +09:00
Hiroyasu Nishiyama
5847f92bef fix test for template node for persistable context 2018-07-19 11:06:57 +09:00
Hiroyasu Nishiyama
31ee1be81e add logging of context store 2018-07-19 07:40:52 +09:00
Nick O'Leary
6bccdd015f Update changelog 2018-07-18 22:17:11 +01:00
Nick O'Leary
cecea318da Merge branch 'master' into 0.19 2018-07-18 13:22:35 +01:00
Nick O'Leary
8663ec6880 Merge pull request #1817 from node-red-hitachi/0.19-add-test-cases-for-inject-node
Add test cases for inject node
2018-07-18 11:35:51 +01:00
Nick O'Leary
9b03f128aa Merge pull request #1815 from node-red-hitachi/0.19-add-tests-for-function-node
Add persistable context tests for function node
2018-07-18 11:35:35 +01:00
Nick O'Leary
8a51f97616 Merge pull request #1816 from node-red-hitachi/0.19-update-info-text-for-function-node
update Japanese info text of function node
2018-07-18 11:35:17 +01:00
Hiroyasu Nishiyama
ee74ed9ce9 add test cases for inject node 2018-07-18 18:13:07 +09:00
Hiroyasu Nishiyama
0f947c756e update Japanese info text of function node 2018-07-18 17:17:23 +09:00
Hiroyasu Nishiyama
cae7949a48 add persistable context tests for function node 2018-07-18 16:43:12 +09:00
Nick O'Leary
be58b614e1 Index all node properties when searching
Fixes #1446
2018-07-17 20:58:10 +01:00
Nick O'Leary
b0a01fa4b2 Merge pull request #1813 from node-red-hitachi/0.19-jsonata-persistablecontext
Add context store support to JSONata functions
2018-07-17 20:34:53 +01:00
Nick O'Leary
9734228001 Merge branch 'boneskull-issue/1414' into 0.19 2018-07-17 20:29:36 +01:00
Nick O'Leary
9df1d44bc4 Merge branch 'issue/1414' of https://github.com/boneskull/node-red into boneskull-issue/1414 2018-07-17 20:28:40 +01:00
HirokiUchikawa
13d887028a Add test cases accessing context with JSONata to Sort Node 2018-07-17 18:43:10 +09:00
HirokiUchikawa
83a8979309 Add test cases accessing context with JSONata to Switch Node 2018-07-17 17:46:21 +09:00
Nick O'Leary
75c29f1cb7 Disallow store names that are not A-Za-z0-9_ 2018-07-16 16:44:33 +01:00
Nick O'Leary
d9d15e41c7 Support multiple stores in context sidebar 2018-07-16 16:36:05 +01:00
Nick O'Leary
d3598d5854 NLS Context sidebar 2018-07-16 13:17:18 +01:00
HirokiUchikawa
3a8aaee5d7 Add test cases accessing context with JSONata to Join Node 2018-07-16 18:42:16 +09:00
HirokiUchikawa
4fcf57d42c Add test cases accessing context with JSONata to Change Node 2018-07-16 18:25:03 +09:00
HirokiUchikawa
adb0891335 Allow the JSONata Expression to handle persistable store. 2018-07-16 18:00:57 +09:00
Nick O'Leary
d21e719cc1 Merge pull request #1812 from node-red-hitachi/0.19-add-env-var-support-for-split-node
Allow environment variable as reduce init value in split node
2018-07-16 09:38:26 +01:00
Nick O'Leary
5807ab82c1 Merge pull request #1811 from node-red-hitachi/0.19-fix-typo-in-utils
Fix typos in util.js
2018-07-16 08:36:13 +01:00
Hiroyasu Nishiyama
65cb04da63 fix typos in utils.js 2018-07-16 16:09:15 +09:00
Hiroyasu Nishiyama
312e3611b1 allow environment variable as reduce init value 2018-07-16 13:45:59 +09:00
Nick O'Leary
46acc62279 Make Trigger node timeout test 1ms more tolerable 2018-07-15 21:13:02 +01:00
Nick O'Leary
529b358c9b Split out expandable editors and add JS editor 2018-07-15 21:06:51 +01:00
Nick O'Leary
7fca04404e Fix debug test for _enc_ change 2018-07-14 23:18:55 +01:00
Nick O'Leary
3a1cc6a2be Change __encoded__ to __enc__ for debug message encoding 2018-07-14 23:06:15 +01:00
Nick O'Leary
5b76c91004 Merge pull request #1806 from node-red-hitachi/0.19-template-node-for-persistable-context
Add support of persistable context to template node
2018-07-14 22:40:50 +01:00
Nick O'Leary
cf87837f7d Merge pull request #1810 from node-red-hitachi/0.19-fix-inject-node-notification-for-persistable-context
Fix context access appearance of inject node in editor
2018-07-14 22:40:19 +01:00
Nick O'Leary
5a0a7b907b Merge pull request #1809 from node-red-hitachi/0.19-fix-tests-for-trigger-node
Add multiple persistable store tests for trigger node
2018-07-14 22:39:05 +01:00
Nick O'Leary
6a2b1669b3 Merge pull request #1808 from node-red-hitachi/0.19-fix-tests-for-inject-node
Add multiple persistable store tests for inject node
2018-07-14 22:38:58 +01:00
Nick O'Leary
ca8264b3f4 Merge pull request #1807 from node-red-hitachi/0.19-fix-tests-for-change-node
Add multiple persistable store tests for change node
2018-07-14 22:38:17 +01:00
Hiroyasu Nishiyama
b44ecd8819 fix context access appearance of inject node in editor 2018-07-14 14:47:40 +09:00
Hiroyasu Nishiyama
987942959e empty commit to rerun travis 2018-07-14 12:37:30 +09:00
Hiroyasu Nishiyama
91992b48c1 add multiple persistable store tests 2018-07-14 12:15:26 +09:00
Hiroyasu Nishiyama
c9a335a6f9 add multiple persistable store tests 2018-07-14 11:50:49 +09:00
Hiroyasu Nishiyama
b7ed159b50 add multiple persistable context tests 2018-07-14 11:00:57 +09:00
Hiroyasu Nishiyama
c72961a52a add support of persistable context to template node 2018-07-14 00:11:59 +09:00
Nick O'Leary
afe6afca36 Merge pull request #1801 from node-red-hitachi/0.19-multi-values
Make it possible to set multiple values
2018-07-13 14:03:03 +01:00
HirokiUchikawa
050acd239c Allow arrays of different lengths to be passed to set. 2018-07-13 20:59:45 +09:00
Nick O'Leary
24505ee4f5 Merge pull request #1803 from kazuhitoyokoi/0.19-addtestcases
Add test cases of persistable context for trigger node
2018-07-13 11:59:40 +01:00
Nick O'Leary
63a249aba3 Merge pull request #1802 from kazuhitoyokoi/0.19-updatejapanese
Update Japanese language files (messages.json and jsonata.json)
2018-07-13 11:59:09 +01:00
Nick O'Leary
7bd94df2a0 Merge pull request #1804 from node-red-hitachi/0.19-fix-cache-error
Fix the error that the parent directory of the context does not exist
2018-07-13 11:58:14 +01:00
Kazuhito Yokoi
761161a8e5 Fix async problem in test cases 2018-07-13 17:34:04 +09:00
Kazuhito Yokoi
513579a7ee Empty commit to run travis again 2018-07-13 15:53:47 +09:00
Kazuhito Yokoi
7165483d83 Empty commit to run travis again 2018-07-13 15:40:21 +09:00
Kazuhito Yokoi
f8bcf219cb Empty commit to run travis again 2018-07-13 15:37:50 +09:00
Kazuhito Yokoi
590506e306 Add test cases of persistable context for trigger node 2018-07-13 15:26:07 +09:00
Kazuhito Yokoi
9a5439c580 Update Japanese language files (message.json and jsonata.json) 2018-07-13 15:17:30 +09:00
HirokiUchikawa
6b2f5fbb19 Allow multiple keys and values to be passed to set 2018-07-12 19:19:55 +09:00
Nick O'Leary
051c147b41 Merge pull request #1800 from node-red-hitachi/0.19-callback-called-twice
Prevent the callback to be called twice
2018-07-12 10:45:58 +01:00
HirokiUchikawa
9111adf15f Use ensureDir() insted of mkdir()
and add test case
2018-07-12 18:20:47 +09:00
HirokiUchikawa
ba18b27371 Prevent the callback to be called twice
and add test cases
2018-07-12 18:12:30 +09:00
Nick O'Leary
2a287b2ae6 Merge pull request #1796 from node-red-hitachi/0.19-multiple-values
Make it possible to get multiple values
2018-07-12 10:01:18 +01:00
Nick O'Leary
fc9040f715 Merge pull request #1799 from kazuhitoyokoi/0.19-addtestcases4persistablecontext
Add test cases of persistable context for inject node
2018-07-12 08:41:27 +01:00
Nick O'Leary
0029022ef6 Merge pull request #1797 from node-red-hitachi/0.19-uitest-flowcontrol
Added test cases of flow control on cookbook
2018-07-12 08:40:30 +01:00
Nick O'Leary
94f728d3fd Merge pull request #1798 from kazuhitoyokoi/0.19-updatelanguagefiles
Update Japanese language file (editor.json)
2018-07-12 08:39:29 +01:00
Kazuhito Yokoi
d53ced7830 Add test cases of persistable context for inject node 2018-07-12 16:26:16 +09:00
Kazuhito Yokoi
053d8c44c2 Update Japanese language file (editor.json) 2018-07-12 16:14:25 +09:00
nakanishi
9f5767ea16 Added test cases of flow control on cookbook 2018-07-12 15:28:40 +09:00
HirokiUchikawa
e8d76b0555 Allow multiple values to be passed to get 2018-07-12 14:05:36 +09:00
Nick O'Leary
c2675600f6 Fix Switch msg sequence test 2018-07-11 16:37:18 +01:00
Nick O'Leary
6f087b4ec1 Merge pull request #1795 from node-red-hitachi/0.19-fix-change-for-persistable-context
Fix persistable context handling of switch node
2018-07-11 16:17:26 +01:00
Nick O'Leary
e94708606d Add isEmpty check to switch node 2018-07-11 16:14:09 +01:00
Hiroyasu Nishiyama
c248f1a762 fix persistable context handling of switch node 2018-07-11 23:39:34 +09:00
Nick O'Leary
28402b0894 Add sidebar tab icons to drop-down menu 2018-07-11 14:15:31 +01:00
Nick O'Leary
7dd98e99f9 Node errors should be Strings not Errors
Fixes #1781
2018-07-11 13:40:53 +01:00
Nick O'Leary
dba195b396 Add detection of connection timeout in git communication
Fixes #1770
2018-07-11 13:26:45 +01:00
Nick O'Leary
88b153bc12 Merge pull request #1794 from kazuhitoyokoi/0.19-fixi18n
Remove and change keys in language files
2018-07-11 13:25:08 +01:00
Kazuhito Yokoi
d4a47dc974 Empty commit to run travis again 2018-07-11 16:13:32 +09:00
Kazuhito Yokoi
fe3ea6edfd : 2018-07-11 16:12:56 +09:00
Kazuhito Yokoi
6c8fc4846b Fix i18n bugs in projects 2018-07-11 15:33:25 +09: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
Nick O'Leary
54d9656f09 Add servername option to TLS config node for SNI 2018-07-10 23:24:32 +01: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
Nick O'Leary
49da324c5d Fix jsonata err reporting in sort node 2018-07-10 17:26:54 +01:00
Nick O'Leary
9bf87697fd Merge pull request #1780 from natcl/json-schema
Add JSON schema validation to JSON node
2018-07-10 17:06:17 +01:00
Nathanaël Lécaudé
f368f5a9c4 JSON node: Add link to JSON schema spec in node help 2018-07-10 11:29:01 -04:00
Nathanaël Lécaudé
eea85485e6 Merge remote-tracking branch 'upstream/0.19' into json-schema 2018-07-10 11:11:15 -04:00
YumaMatsuura
1a544b3b82 Headless option for ui test (#1784) 2018-07-10 12:42:56 +01:00
Kazuhito Yokoi
8b38fe9fe0 Support i18n in websocket node (#1785) 2018-07-10 12:42:32 +01:00
Hiroki Uchikawa
1bf4addf63 Fix an error when initializing the cache (#1788)
* Fix a error when initializing the cache

* Make context directory if it is not there  in initialization
2018-07-10 12:41:16 +01:00
Hiroyasu Nishiyama
407e16e900 Fix appearrence of switch node port label for flow/global ref. (#1793)
* fix appearrence of switch node port label for flow/global ref

* use RED.utils.parseContextKey
2018-07-10 12:40:52 +01:00
Hiroyasu Nishiyama
6e9fe3248a Fix appearrence of change node label for flow/global ref (#1792)
* fix appearence of change node label for flow/global ref

* use RED.utils.parseContextKey
2018-07-10 12:40:31 +01:00
Nick O'Leary
d8cf86fd6f Add RED.utils.parseContextKey 2018-07-10 11:41:46 +01:00
Nick O'Leary
f8aa4a9588 Merge branch 'async-split' into 0.19 2018-07-10 11:30:38 +01:00
Nick O'Leary
c249907846 Merge pull request #1791 from node-red/join-node-keep-top-level-properties
join-node-keep-top-level-properties
2018-07-10 11:28:55 +01:00
Nick O'Leary
57c1524a9a Add async jsonata support to join node 2018-07-10 11:24:57 +01:00
Nick O'Leary
d8d82e2ba3 Update sort node for async use of jsonata 2018-07-09 23:06:51 +01:00
Nick O'Leary
807b512ef7 Add JSONata async support to Switch and Change nodes 2018-07-09 21:56:39 +01:00
Nick O'Leary
b2f06b6777 Add async mode to evaluateJSONataExpression 2018-07-09 15:12:09 +01:00
Nick O'Leary
d7adff9a65 Add async message handling to Trigger node 2018-07-09 14:12:44 +01:00
Nick O'Leary
b0d7e11d48 Fix evaluateNodeProperty handling of unknown types 2018-07-09 12:40:25 +01:00
Nick O'Leary
fc9cdb61f2 Add async property handling to Switch node 2018-07-09 11:31:10 +01:00
Nick O'Leary
9c00492dc2 WIP: create async Switch node helper functions 2018-07-09 11:31:10 +01:00
Nick O'Leary
1a6babd199 Lint Switch code 2018-07-09 11:31:10 +01:00
Nick O'Leary
1b693eed37 Add async context support to Change node 2018-07-09 11:31:10 +01:00
Nick O'Leary
afb566b6b4 Add async context support to Inject node 2018-07-09 11:31:10 +01:00
Dave Conway-Jones
f870e9ed3e Let Join node accumulate top level properties
Last in is still most significant
2018-07-08 16:52:30 +01:00
Dave Conway-Jones
4bcf13cb58 Let nrgpio code work with python 3
(just in case that becomes default)
2018-07-07 19:01:14 +01: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
Nick O'Leary
946a6d6041 Update RED.util.evaluateNodeProperty to support context stores 2018-07-05 10:43:33 +01:00
Nick O'Leary
372c213c2c Still parse/export typedInput values even when no options set 2018-07-04 14:23:18 +01:00
Nick O'Leary
a5a79d3ab7 Merge branch '0.19' into typedInput-context 2018-07-04 13:37:05 +01:00
Nick O'Leary
e6c5cfb703 Do not show TypedInput context options if there's only one available 2018-07-04 13:36:23 +01:00
Nick O'Leary
7843eccae8 Merge pull request #1786 from node-red-hitachi/0.19-fix-typedInput-error
Fix typedInput error on initialization
2018-07-04 13:35:55 +01:00
Hiroyasu Nishiyama
7ca153abd0 fix error on typedInput initialization 2018-07-04 20:50:33 +09:00
Nick O'Leary
33b4774c49 Load typedinput context list from settings 2018-07-03 21:40:58 +01:00
Nick O'Leary
c243481432 Add sub options to Inject node 2018-07-03 21:40:58 +01:00
Nick O'Leary
80873e4ea9 fix settings api test for context stores 2018-07-03 21:27:55 +01:00
Nick O'Leary
4e4a1f11e6 Fix context admin api for empty contexts 2018-07-03 21:18:43 +01:00
Nick O'Leary
9bbe405cd0 Do not show blank popovers 2018-07-03 21:18:15 +01:00
Nick O'Leary
c440a4c730 Expose list of context stores to the editor 2018-07-03 14:17:42 +01:00
Nick O'Leary
a1251371d7 Avoid unnecessary re-reading of file context when caching is enabled 2018-07-03 11:29:45 +01:00
Nick O'Leary
7d702e8332 Remove console.log 2018-07-02 22:38:37 +01:00
Nick O'Leary
43d7c8d48c Add caching to localfilesystem context 2018-07-02 22:32:20 +01:00
Nick O'Leary
7423583508 Create default store for node tests to use 2018-07-02 15:47:47 +01:00
Nick O'Leary
08b0838f9a Fix linting in view.js 2018-07-02 15:32:29 +01:00
Nick O'Leary
038d821a7c Apply fGC to all global contexts for default values 2018-07-02 15:21:13 +01:00
Nathanaël Lécaudé
6a218814d3 Merge remote-tracking branch 'upstream/0.19' into json-schema 2018-06-30 16:20:13 -07:00
Nathanaël Lécaudé
905f89b0f5 JSON node: finalize JSON Schema validation 2018-06-30 16:19:39 -07:00
Nick O'Leary
14882bda78 Ensure runtime errors in Change node can be caught
Fixes #1769
2018-06-29 11:50:16 +01:00
Nick O'Leary
781fa4634b Merge pull request #1777 from node-red-hitachi/uitest-typedinput
Follow the change of typedinput interface for UI test
2018-06-29 10:53:27 +01:00
Nick O'Leary
cdb173fd6e Handle NaN and Infinity properly in debug sidebar
Fixes #1778 #1779
2018-06-29 10:50:07 +01:00
Nick O'Leary
466cb4be89 Small tidy up on context plugin loading 2018-06-29 09:48:38 +01:00
Nathanaël Lécaudé
c39e2ffd56 JSON node: add JSON schema validation via msg.schema 2018-06-28 23:16:43 -07:00
Kazuki-Nakanishi
17bf09e276 Follow the change of typedinput interface for UI test 2018-06-29 10:41:44 +09:00
Nick O'Leary
bc01f9f8fd add placeholder api/admin/context_spec 2018-06-28 17:00:17 +01:00
Nick O'Leary
c0870c5694 Merge branch '0.19' into context-tab 2018-06-27 16:05:17 +01:00
Nick O'Leary
3b5174a2ea Merge branch '0.19' of github.com:node-red/node-red into 0.19 2018-06-27 15:56:57 +01:00
Nick O'Leary
af6885f3e8 Merge pull request #1720 from node-red-hitachi/persistablecontext
Add persistable context backend
2018-06-27 15:37:46 +01:00
Nick O'Leary
e01996095f Add refresh timestamp to context sidebar 2018-06-27 10:00:23 +01:00
Nick O'Leary
5d86f7b6ba Refresh context sidebar tab based on selection 2018-06-26 23:34:32 +01:00
Nick O'Leary
8d6ac6406d Initial context sidebar tab 2018-06-26 11:32:24 +01:00
HirokiUchikawa
40ff54f67e Improve context storage handling 2018-06-26 11:43:37 +09:00
HirokiUchikawa
cce7ac09d0 Add callback handling to memory plugin 2018-06-26 11:36:37 +09:00
Nick O'Leary
73a18891c5 Add RED.popover.tooltip for common reuse 2018-06-25 22:32:34 +01:00
Nick O'Leary
fe22cedc1d Move debug encode/decode to utils for reuse 2018-06-25 22:32:34 +01:00
Nick O'Leary
fa09c7c8b2 Merge branch '0.19' of github.com:node-red/node-red into 0.19 2018-06-25 13:55:21 +01:00
Nick O'Leary
15e28e3cc0 Merge branch 'pr_1766' into 0.19 2018-06-25 13:55:07 +01:00
Nick O'Leary
2cb4f6b1fc Prevent horizontal scroll when palette name cannot wrap 2018-06-25 13:54:34 +01:00
Nick O'Leary
b17a483b85 Merge pull request #1771 from node-red-hitachi/0.19-fix-i18n-project-message
Fix appearance of retry button of remote branch management dialog
2018-06-25 13:50:11 +01:00
Nick O'Leary
7c3e5443ab Merge pull request #1772 from node-red-hitachi/uitest-debugtab
Follow the change of tab interface for UI test
2018-06-25 13:37:53 +01:00
Nick O'Leary
f95a2851c8 Ignore middle-click on node/ports to enable panning 2018-06-25 13:36:58 +01:00
Nick O'Leary
2b2eee352f Better wire layout when looping back 2018-06-25 13:18:37 +01:00
Kazuki-Nakanishi
11569d8056 Follow the change of tab interface for UI test 2018-06-25 18:48:01 +09:00
Nick O'Leary
bdf87452b6 Reset typedInput option when type changes 2018-06-25 10:39:20 +01:00
Hiroyasu Nishiyama
0c6bf81c24 fix appearence of retry button of remote branch management dialog 2018-06-23 12:49:09 +09:00
HirokiUchikawa
f2fa26fb07 Use the callback instead of Promise in context API
and remove unnecessary functions
2018-06-22 17:11:54 +09:00
Nick O'Leary
f5e212ff1e Refresh type options properly when typedInput.types called 2018-06-21 10:49:39 +01:00
Nick O'Leary
461e6562ca Allow typedInputs to have options plus value 2018-06-21 10:47:30 +01:00
HirokiUchikawa
fd67d08402 Remove unnecessary module
and skip persistable context test cases temporally
2018-06-20 20:09:02 +09:00
HirokiUchikawa
e6411d11b1 Remove unnecessary context storage APIs
and rename context storage APIs
2018-06-20 20:00:39 +09:00
HirokiUchikawa
dd81d947fc Use native Promise instead of when.js 2018-06-20 19:50:55 +09:00
HirokiUchikawa
23b887c30e Add a test case for context/index 2018-06-20 19:42:09 +09:00
HirokiUchikawa
c4eae3f130 Fix file extension 2018-06-20 19:42:08 +09:00
HirokiUchikawa
41a04a2849 Add async API to context
and add test cases for async
2018-06-20 19:42:07 +09:00
HirokiUchikawa
ed1d34e678 Use fs-extra instead of node-json-db 2018-06-20 19:42:06 +09:00
HirokiUchikawa
f44487338d Fix a wrong statement 2018-06-20 19:42:05 +09:00
Hiroki Uchikawa
7aced85a31 Use Array.indexOf() instead of Array.includes() 2018-06-20 19:42:04 +09:00
HirokiUchikawa
fbe0e2d6eb Delete async function in context/index 2018-06-20 19:42:03 +09:00
HirokiUchikawa
6e34f0697c Allow .get/set/keys to return asynchronous results 2018-06-20 19:42:02 +09:00
HirokiUchikawa
a835f9f0cb Fix ENOENT error in LocalFileSystem.clean() 2018-06-20 19:42:01 +09:00
HirokiUchikawa
16715673c3 Add test case 2018-06-20 19:42:00 +09:00
HirokiUchikawa
c48c74f173 Delete unused variables 2018-06-20 19:42:00 +09:00
HirokiUchikawa
f262348497 Add clean to context plugin
and don't delete local context unless the context is deleted by a user
2018-06-20 19:41:59 +09:00
HirokiUchikawa
7185bcd51f Add open/close API for context 2018-06-20 19:41:58 +09:00
HirokiUchikawa
28d05e2449 Allow multiple instances of a given storage module to exist 2018-06-20 19:41:57 +09:00
Hiroki Uchikawa
7fafa21a1b Change the order of arguments 2018-06-20 19:41:56 +09:00
HirokiUchikawa
84f598e143 Change prefix from $ to # 2018-06-20 19:41:51 +09:00
HirokiUchikawa
e30f8628db Revert runtime/util 2018-06-20 19:41:02 +09:00
Hiroki Uchikawa
0be9c88106 Improve processing when default is an alias
and fix test cases
2018-06-20 19:41:01 +09:00
Kazuki-Nakanishi
e046fc1ac5 Refactor parseKey and implement parseStorage 2018-06-20 19:41:00 +09:00
Kazuki-Nakanishi
3a476ac493 Implemented error handlings 2018-06-20 19:40:54 +09:00
Hiroki Uchikawa
e33ec0cf50 update external context
- Implement `delete` function
- Swap default easily
- Change memory context as a plugin
- Update localfilesystem plugin
  -  Change file/folder structure
2018-06-20 19:40:26 +09:00
Hiroki Uchikawa
b4b70a988e Change delimiter to "_" from ":" 2018-06-20 19:40:25 +09:00
Hiroki Uchikawa
e66b381070 add external context files 2018-06-20 19:40:25 +09:00
Hiroki Uchikawa
771b598c09 Add persistable context
and avoid exception when arg is undefined in util/getMessageProperty
2018-06-20 19:40:24 +09:00
Hiroki Uchikawa
cd44f13171 Move context_spec.js to context folder
and rename context_spec.js -> index_spec.js
2018-06-20 19:40:23 +09:00
Hiroki Uchikawa
aa6b72ac87 Move context.js to context folder
and rename context.js -> index.js
2018-06-20 19:40:22 +09:00
Nick O'Leary
a467fe5ed7 Reposition tab menu before opening 2018-06-19 10:49:50 +01:00
Hiroyasu Nishiyama
467411c6c3 merge 0.19 2018-06-17 01:26:31 +09:00
Nick O'Leary
2648b7ca54 Handle releasing ctrl when using quick-add node dialog 2018-06-15 22:33:53 +01:00
Nick O'Leary
de35c7024a Tab buttons should use editor-button-toggle style 2018-06-15 17:28:29 +01:00
Dave Conway-Jones
9d219c163d Don't accidentally re-use udp port when set to not do so
to close Issue #1764
2018-06-15 14:53:02 +01:00
Nick O'Leary
f7434b5ec8 Add output to File Out node and update icons 2018-06-15 13:25:28 +01:00
Nick O'Leary
5ed3360c0b Fix css for single toggle buttons 2018-06-15 13:25:28 +01:00
Dave Conway-Jones
6f5974f875 Fix join node manual mode array
msg.complete was adding an unwanted null to the array (if no payload)
Added tests for msg.complete with array and object
2018-06-14 20:00:42 +01:00
Nick O'Leary
56db1da3cf Merge pull request #1732 from node-red/pi-nodes-editable-when-na
let Pi nodes be visible/editable on all platforms
2018-06-13 15:46:21 +01:00
Nick O'Leary
fef71f29c4 Merge pull request #1750 from node-red-hitachi/logic-nodes-test
Add test cases for logic nodes
2018-06-13 15:45:13 +01:00
Nick O'Leary
d46b66878a Show unknown node properties in info tab 2018-06-13 14:56:09 +01:00
Nick O'Leary
6cad80c4ad Add node icon picker widget 2018-06-12 23:46:06 +01:00
Nick O'Leary
68779caa2e Only edit nodes on dbl click on primary button with no modifiers 2018-06-12 15:34:08 +01:00
Nick O'Leary
2a122ed283 Allow subflows to be put in any palette category 2018-06-12 12:54:32 +01:00
Nick O'Leary
17c5fdf0d5 Add flow navigator widget 2018-06-08 23:32:17 +01:00
Nick O'Leary
0835fdd0d1 Merge branch '0.19' into runtime-api 2018-06-06 21:59:46 +01:00
Nick O'Leary
f6274445a2 Merge branch 'master' into 0.19 2018-06-06 21:41:48 +01:00
Nick O'Leary
3b0300b834 Cache flow library result to improve response time
Fixes #1753
2018-06-06 21:38:44 +01:00
Nick O'Leary
4fbf1fe780 Add middle-button-drag to pan the workspace 2018-06-06 20:51:30 +01:00
Hiroyasu Nishiyama
dcf44fed58 allow multi-line category name in editor 2018-06-05 20:18:40 +09:00
Nick O'Leary
7136dc1c72 Merge pull request #1749 from kazuhitoyokoi/0.19
Add i18n support for projectSettings.js
2018-06-04 23:32:55 +01:00
Kazuhito Yokoi
0e4cedbc5e Remove new lines 2018-06-04 07:21:48 +09:00
Kazuhito Yokoi
dc139bcc30 Remove new line 2018-06-04 07:15:26 +09:00
KatsuyaHoshii
b204b183de Add logic nodes test cases 2018-06-01 14:33:20 +09:00
Kazuhito Yokoi
ab788bc1e3 Add i18n support for projectSettings.js 2018-06-01 12:58:09 +09:00
Nick O'Leary
95b4c8d515 Merge pull request #1748 from node-red-hitachi/0.19-editor-diff-i18n-jp
Add i18n support for project
2018-05-31 10:44:36 +01:00
Nick O'Leary
b025644525 Merge pull request #1744 from node-red-hitachi/0.19-i18n-defaultFileSet
Add i18n support for default file set for a project
2018-05-31 08:51:53 +01:00
Yuma Matsuura
9e87a60597 modify translate project diff 2018-05-31 16:47:03 +09:00
Yuma Matsuura
5a70bea67a add translate project diff 2018-05-31 16:46:46 +09:00
Hiroyasu Nishiyama
2a95af3928 merged 0.19-allow-i18n-translation-in-runtime 2018-05-30 21:59:20 +09:00
Nick O'Leary
0a0ca380d3 Ensure apiMaxLength applies to HTTP Nodes
Fixes #1278
2018-05-30 13:32:38 +01:00
Nick O'Leary
4cfbf7f71c Merge pull request #1743 from node-red-hitachi/0.19-allow-i18n-translation-in-runtime
Allow i18n translation in runtime
2018-05-30 13:20:05 +01:00
Hiroyasu Nishiyama
de43148341 change current_locale to getCurrentLocale 2018-05-30 20:32:56 +09:00
Nick O'Leary
0a2aab7d68 Merge pull request #1746 from node-red-hitachi/0.19-user-settings-projects-i18n-jp
Modify i18n support for user settings of project
2018-05-30 10:30:25 +01:00
Nick O'Leary
745821c420 Merge pull request #1745 from node-red-hitachi/0.19-version-projects-i18n-jp
Add i18n support for version control of project
2018-05-30 10:30:12 +01:00
Nick O'Leary
57c4c754d0 Merge pull request #1742 from node-red-hitachi/0.19-editor-main-i18n-jp
Update i18n support for main editor interface and Japanese message …
2018-05-30 10:22:38 +01:00
Nick O'Leary
4b5c437533 Merge pull request #1741 from node-red-hitachi/0.19-editor-projects-i18n-jp
Add i18n support for projects interface and Japanese message catalogue
2018-05-30 10:21:29 +01:00
Nick O'Leary
8d63b6a1ed Merge pull request #1734 from node-red-hitachi/0.19-fix-icon-scan-test-for-win
Fix test failure of icon scan on Windows
2018-05-30 10:18:57 +01:00
Nick O'Leary
245a8adbf9 Merge pull request #1736 from node-red-hitachi/0.19-httpreq
Move to request module
2018-05-30 10:18:21 +01:00
Yuma Matsuura
4f7d98aace modify translate user settings 2018-05-29 10:12:52 +09:00
Kazuki-Nakanishi
b0c693cc3a move comment from json to js 2018-05-28 17:06:38 +09:00
Kazuki-Nakanishi
b2cca10e8b Add i18n support for version control of project 2018-05-28 17:01:53 +09:00
Hiroyasu Nishiyama
a84b2ab5bb update defaultFileSet test for i18n support 2018-05-27 22:30:05 +09:00
Hiroyasu Nishiyama
4565342b05 add i18n support for project default files generation 2018-05-27 01:38:54 +09:00
Hiroyasu Nishiyama
0ad54cc2d1 allow i18n translation in runtime 2018-05-27 01:05:50 +09:00
Hiroyasu Nishiyama
865853da19 add some i18n support for main editor interface and Japanese message catalogue 2018-05-26 20:08:39 +09:00
Hiroyasu Nishiyama
392ed706fd add i18n support for projects interface and Japanese message catalogue 2018-05-26 14:21:30 +09:00
Nick O'Leary
0ff0f25aaf Merge branch 'master' into 0.19 2018-05-25 13:58:15 +01:00
Nick O'Leary
c157960846 Change debug sidebar icon 2018-05-25 13:55:35 +01:00
YumaMatsuura
a5c00b5c81 add translate-user-settings (#1740) 2018-05-25 13:55:03 +01:00
Nick O'Leary
472bbdb59f Fix typo in CHANGELOG 2018-05-25 13:27:58 +01:00
Nick O'Leary
7877093713 Bump 0.18.7 2018-05-25 13:23:18 +01:00
Nick O'Leary
8cb2e51407 Relax twitter node version ready for major version bump 2018-05-25 11:40:14 +01:00
Nick O'Leary
d5cee81fb6 Merge branch 'pr_1739' 2018-05-25 11:37:37 +01:00
Nick O'Leary
bca020bc4d Tidy up default grunt task and fixup test break due to reorder
Fixes #1738
2018-05-25 11:36:17 +01:00
Nick O'Leary
5069f2844c Bump jsonata version 2018-05-25 10:55:44 +01:00
Nick O'Leary
252df81f59 Pass Date into the Function node sandbox to fix instanceof tests 2018-05-25 10:55:44 +01:00
KatsuyaHoshii
7f89a4a26f Update .travis.yml 2018-05-25 11:48:33 +09:00
Dave Conway-Jones
40f4167894 let TCP in node report remote ip and port when in single packet mode 2018-05-24 21:39:46 +01:00
Nick O'Leary
0ef16989cd Do not trim wires if node declares outputs in defaults but misses value
Fixes #1737
2018-05-24 20:27:07 +01:00
Dave Conway-Jones
3df3d6f516 add debug to trigger test to help work out fails 2018-05-24 10:02:51 +01:00
Edward Vielmetti
10395ef254 typo fix *hierarchy (#1735) 2018-05-24 09:48:05 +01:00
Hiroyasu Nishiyama
83854c28db fix test failure of icon scan on windows 2018-05-24 12:06:39 +09:00
Nick O'Leary
fcbea2629c Support flow.disabled and .info in /flow API 2018-05-23 22:41:39 +01:00
Nick O'Leary
522360dcb7 merge to latest 2018-05-23 12:45:29 +01:00
Nick O'Leary
26bc142cc2 Handle loading empty nodesDir 2018-05-23 10:59:08 +01:00
Nick O'Leary
a4eb8e11c3 Collapse sidebar tabs 2018-05-23 10:25:47 +01:00
HirokiUchikawa
9fd5d1db56 Move to request module 2018-05-23 17:16:20 +09:00
Dave Conway-Jones
1d05b4c981 relax test spec slightly 2018-05-23 08:58:04 +01:00
HirokiUchikawa
61f6535be8 Add test case for preventing following redirect 2018-05-23 16:54:03 +09:00
Dave Conway-Jones
7dd329b5ee Add basic loading tests for GPIO nodes 2018-05-22 17:26:52 +01:00
Dave Conway-Jones
b761904424 let Pi nodes be visible/editable on all platforms
even where they are not physically available.
2018-05-22 15:48:24 +01:00
Nick O'Leary
36105412b1 Add 'private' property to userDir generated package.json
This stops the warnings from npm about missing repo and license fields.
As there's no expectation for a user to publish their userDir to npm, then
setting private is entirely appropriate.
2018-05-22 11:41:22 +01:00
Nick O'Leary
184b1b018c Add missing resource file 2018-05-21 22:38:07 +01:00
Nick O'Leary
f3e1b85d82 Add RED.require to allow nodes to access other modules 2018-05-21 22:08:04 +01:00
Nick O'Leary
626d012775 Do not disable the export-clipboard menu option with empty selection 2018-05-21 16:14:43 +01:00
Nick O'Leary
9ad9c0ec6a Add $env function to JSONata expressions 2018-05-21 15:28:15 +01:00
Nick O'Leary
e13fed9fc6 Widen support for env var to use ${} or $() syntax 2018-05-21 15:19:50 +01:00
Nick O'Leary
eb6d093e56 Add env-var support to TypedInput 2018-05-21 15:10:06 +01:00
Nick O'Leary
979713c4db merge 0.19 2018-05-21 12:28:06 +01:00
Hiroyasu Nishiyama
af1ea610ea allow id and name reference in function node code (#1731) 2018-05-21 11:34:56 +01:00
Nick O'Leary
d4d9190919 Bump version 2018-05-18 11:03:49 +01:00
Nick O'Leary
4d3d1a02a8 Add editorTheme.projects.enabled to default settings.js 2018-05-18 11:03:00 +01:00
Nick O'Leary
30c2aa96d6 Update changelog 2018-05-17 12:21:06 +01:00
Nick O'Leary
4edb1f80b0 Update mailing list references to new forum 2018-05-17 12:17:55 +01:00
Nick O'Leary
0a82459233 Handle a node having wires in the editor on ports it no longer has
Fixes #1724
2018-05-17 11:28:35 +01:00
Dave Conway-Jones
db87b0dfa5 Add missing ACE snippet files
to stop 404 in console
2018-05-15 22:10:14 +01:00
Nick O'Leary
e41d5c249f WIP - url rewriting to support debug 2018-05-14 14:32:58 +01:00
Nick O'Leary
f82a779817 merge master 2018-05-14 09:14:35 +01:00
Nick O'Leary
cd42cf7583 Fix wireClippedNodes is not defined
Fixes #1726
2018-05-12 17:02:07 +01:00
Nick O'Leary
2d5980ff2a Split node html to isolate bad nodes when loading 2018-05-11 22:30:57 +01:00
Nick O'Leary
df8a8ea204 Connect comms to apiRootUrl 2018-05-11 22:13:13 +01:00
Nick O'Leary
8957d33e49 Merge branch 'master' into runtime-api 2018-05-11 14:17:46 +01:00
Nick O'Leary
d49c7a3adb Avoid unnecessary use of .html() where .text() will do 2018-05-11 14:05:52 +01:00
Nick O'Leary
28fe1e4c8f Allow the editor to use a custom admin api url root 2018-05-11 13:26:26 +01:00
Nick O'Leary
0c7f4e2168 Merge 0.18.5 2018-05-10 21:45:25 +01:00
Nick O'Leary
4fdd09a262 Changelog tidy 2018-05-10 13:04:37 +01:00
Nick O'Leary
d6878512c4 Bump version for 0.18.5 2018-05-10 13:02:59 +01:00
Nick O'Leary
8b1b8250ff update changelog 2018-05-10 11:29:20 +01:00
Hiroyasu Nishiyama
9dccbf747e Japanese message catalogue update (#1723)
* update Japanese message catalogue for mqtt node

* update Japanese message catalogue for udp node

* update Japanese message catalogue for html node

* update Japanese message catalogue for rpi-gpio node
2018-05-10 11:26:56 +01:00
Nick O'Leary
08727e1938 Show node load errors in the palette manager 2018-05-10 11:21:59 +01:00
Nick O'Leary
7584820987 Filter req.user in /settings to prevent leaking info 2018-05-09 10:03:22 +01:00
Nick O'Leary
d572356642 Update to latest test-helper module 2018-05-08 23:44:39 +01:00
Nick O'Leary
3b5a2815a9 Merge master 2018-05-08 23:27:27 +01:00
Nick O'Leary
f3cf01df25 Update changelog 2018-05-08 22:06:32 +01:00
Nick O'Leary
63e6e64ad3 Merge branch 'pr_1719' 2018-05-08 17:23:57 +01:00
Nick O'Leary
e8d7b48bff Fix up sizing of mqtt message inputs 2018-05-08 17:23:28 +01:00
mblackstock
12944d1ebd add back removed Retain message 2018-05-08 08:30:10 -07:00
Nick O'Leary
fa1ff6e393 Update changelog 2018-05-08 15:41:25 +01:00
Nick O'Leary
98546b6e6a Fixup Function node error line reporting 2018-05-08 11:40:16 +01:00
Nick O'Leary
2fef6fd1fa Fix proper closing of http request test ssl/proxy servers 2018-05-08 11:26:28 +01:00
Nick O'Leary
20cf91f1dc Merge branch 'pr_1700' 2018-05-08 10:47:35 +01:00
Nick O'Leary
2efa78d590 Fix up function stack issues 2018-05-08 10:47:20 +01:00
Nick O'Leary
880af0671a Merge branch 'pr_1706' 2018-05-08 10:44:35 +01:00
Nick O'Leary
62471e4531 Handle null error object in Flow.handleError
Fixes #1721
2018-05-08 10:37:41 +01:00
mblackstock
b15f8535f8 document close message 2018-05-06 20:02:20 -07:00
mblackstock
7a3a4493da tighten vertically, change section order 2018-05-06 15:38:45 -07:00
mblackstock
11078235c4 added deleted 'retain' in tip 2018-05-06 15:08:15 -07:00
mblackstock
f3e05cd08a set default expand behaviour 2018-05-04 16:52:21 -07:00
Nick O'Leary
0ca3cabbe8 Refector how Project object is instantiated 2018-05-04 16:24:00 +01:00
mblackstock
44a75c1291 move to two lines, add publish on close 2018-05-03 13:47:14 -07:00
Dave Conway-Jones
4a4513a746 Add type checks to switch node options (#1714)
* Add type checks to switch node options

* add isType to messages.json
2018-05-03 11:24:44 +01:00
iurly
60ff8660de node-red-pi: fix behavior with old bash version (#1713)
For some reason the following will result
in an endless loop under bash-4.3.42:

while([ -h "${SCRIPT_PATH}" ])

Just remove the round brackets (parentheses) to fix the issue.
They're not needed anyway.
2018-05-03 09:41:37 +01:00
Nathan Allen
6fa0d671c0 Fix ENOENT error on first start when no user dir (#1711)
* Fix ENOENT error on first start when no user dir

Write backup using `copySync` and move it below the `fsync` to ensure file is present when backup is made.

* Check for path to exist before attempting backup
2018-05-03 09:40:51 +01:00
mblackstock
f478d7c9f0 experiments with mqtt ui (wip) 2018-05-02 16:02:53 -07:00
Nick O'Leary
53e3e08d70 Handle cloning a project without package.json 2018-05-02 16:24:58 +01:00
Nick O'Leary
c4d1ccb6f5 Keep remote branch state in sync between editor and runtime 2018-05-02 13:59:39 +01:00
Nick O'Leary
e3520309fc Add clone project to welcome screen 2018-05-02 13:38:50 +01:00
Martin Guillon
27bf72372e fix after comments 2018-05-01 14:00:05 +02:00
Nick O'Leary
ae4b1b17a9 Increase trigger node test timings 2018-05-01 12:59:53 +01:00
Dave Conway-Jones
94cb03f4b5 bind to correct port when doing udp broadcast/multicast (#1686)
* bind to correct port when doing broadcast/multicast

to allow better re-use of ports.

* allow udp multicast to work out if ip address

makes life easier for mortals

* udp also handle bind to ipv6 multicast if

tidy prompts to suit new function

* udp node, add face to debug log for multicast if known
2018-05-01 12:43:51 +01:00
Dave Conway-Jones
e691351976 update settings comments to describe how to setup for ipv6 (#1675)
* change default server bind to support ipv6 and ipv4

to close #1674

* Add comment re ipv6 so folk know it's capable

* slightly more words re ipv6 config

* Leave defaults as ipv4 but add doc to settings
2018-05-01 12:43:10 +01:00
Dave Conway-Jones
3190de873e add output property select to HTML parse node (#1701) 2018-05-01 12:42:27 +01:00
Nick O'Leary
b22956bd99 Remove old locales test 2018-05-01 12:28:16 +01:00
Nick O'Leary
42516206d9 Move module message catalogs under runtime api 2018-05-01 12:28:16 +01:00
Nick O'Leary
fc4edde6e6 Add runtime-api tests 2018-05-01 12:28:15 +01:00
Nick O'Leary
54cc04fd96 Tweak the initialisation of the editor js 2018-05-01 12:28:15 +01:00
Nick O'Leary
80062b6a62 Move type editors into their own files 2018-05-01 12:28:15 +01:00
Nick O'Leary
99af79fcf3 Add missing test resources 2018-05-01 12:28:15 +01:00
Nick O'Leary
11d87205d7 Move node registry to its own top level dir 2018-05-01 12:28:15 +01:00
Nick O'Leary
5866d414ce Replace some instances of when with Promise 2018-05-01 12:28:15 +01:00
Nick O'Leary
9a972b0b8a Increase test coverage 2018-05-01 12:28:15 +01:00
Nick O'Leary
e6aeeea8c1 Add better docs tasks 2018-05-01 12:28:15 +01:00
Nick O'Leary
5d064aa1d7 Fixup all the tests 2018-05-01 12:28:15 +01:00
Nick O'Leary
34832d5942 Fix up runtime tests 2018-05-01 12:28:15 +01:00
Nick O'Leary
e3b1179a21 Start bringing the tests back from the brink 2018-05-01 12:28:15 +01:00
Nick O'Leary
f94a36613c Split comms across api and runtime 2018-05-01 12:28:14 +01:00
Nick O'Leary
efc3cc24f4 Fixup projects import after file move 2018-05-01 12:28:14 +01:00
Nick O'Leary
b47f8aaf70 Rename projects.js 2018-05-01 12:28:14 +01:00
Nick O'Leary
94ca4607bc Add projects to runtime-api 2018-05-01 12:28:14 +01:00
Nick O'Leary
2dab1d3e6e Fix up merge issue on api/nodes 2018-05-01 12:28:14 +01:00
Nick O'Leary
825b0fb22f Update locales module to new structure 2018-05-01 12:28:14 +01:00
Nick O'Leary
1cdb039ea2 Move log and i18n to their own utils module 2018-05-01 12:28:14 +01:00
Nick O'Leary
7409cb3abb Separate library api and runtime components 2018-05-01 12:28:14 +01:00
Nick O'Leary
e8e8f70c27 WIP: create new runtime-api 2018-05-01 12:28:14 +01:00
Christopher Hiller
e8a637498d add Node.js v10 to build matrix (#1708)
* add Node.js v10 to build matrix

Signed-off-by: Christopher Hiller <boneskull@boneskull.com>

* only compute coverage once

We have to pick *which* version of Node.js to run coverage on, so I just
picked the latest.

Signed-off-by: Christopher Hiller <boneskull@boneskull.com>
2018-04-24 23:21:34 +01:00
Christopher Hiller
e1195ac00a fix many test problems (#1677)
* fix many test problems

- adds [stoppable](https://npm.im/stoppable) to force-stop net & http
  servers
- upgrades to latest mocha
- much cleanup of servers
- some removal of useless code

Signed-off-by: Christopher Hiller <boneskull@boneskull.com>

* increase wait time to hack at race condition

* PoC with fork of stoppable

Signed-off-by: Christopher Hiller <boneskull@boneskull.com>

* fix custom stoppable url for newer npm

* make travis go faster; attempt to avoid npm troubles

* fix coveralls executable path

* add extra time for flake to trigger spec

Signed-off-by: Christopher Hiller <boneskull@boneskull.com>
2018-04-23 12:37:26 +01:00
KatsuyaHoshii
6cd9ccc37c Refactor test cases 2018-04-23 14:31:37 +09:00
Nick O'Leary
25345302e8 Only add _alias/z to log messages if they are defined 2018-04-18 10:28:51 +01:00
Nick O'Leary
eccd5e9801 Handle additional debug msg props in Node_spec 2018-04-17 23:29:56 +01:00
mblackstock
ff355af9f2 use newer test helper 2018-04-17 11:59:47 -07:00
Martin Guillon
5967f4b0d4 fix error stack 2018-04-17 15:46:09 +02:00
Nick O'Leary
ff18618032 Highlight subflow node when log msg comes from inside
Fixes #1698
2018-04-17 12:44:58 +01:00
Martin Guillon
20f03c356c better script error handling.
Also pass the error in msg so that it can handled later
2018-04-17 10:52:53 +02:00
Nick O'Leary
27fdc9e56e Remove credential props after diffing flow to prevent future false positives
Fixes #1359
2018-04-16 15:36:23 +01:00
Nick O'Leary
52d9578a19 Log error if settings unavailable when saving user settings
Fixes #1645
2018-04-16 15:02:28 +01:00
Nick O'Leary
f4c2938b41 Ensure node wires array is not longer than outputs value
Fixes #1678
2018-04-16 13:23:36 +01:00
Nick O'Leary
9f703de5ec Allow importing an unknown config node to be undone
Fixes #1681
2018-04-16 11:20:37 +01:00
Dave Conway-Jones
a327fd85e2 Fix template to default typed input field
to close #1697
2018-04-16 11:14:15 +01:00
Dave Conway-Jones
9d22a86ec8 fix typo in switch label, make function label consistent 2018-04-16 11:12:21 +01:00
Ted
29e0b194dd Handle and display for invalid flow credentials when project is disabled #1689 (#1694)
* Handle and display for invalid flow credentials when project is disabled #1689

* fixed extra character

* fixed whitespace
2018-04-15 11:51:26 +01:00
Nick O'Leary
ae9cf13fc2 Fix http request doc type
Fixes #1690
2018-04-15 11:46:10 +01:00
Nick O'Leary
64ae67586a Ensure keyboard shortcuts get saved in runtime settings
Fixes #1696
2018-04-15 11:43:03 +01:00
Dave Conway-Jones
838c7a5e89 make debug slightly larger to pass WCAG AA rating 2018-04-05 11:25:08 +01:00
Dave Conway-Jones
89bfc90f40 Make core nodes labels more consistent, to close #1673
and make them translateable
2018-03-30 14:31:59 +01:00
Dave Conway-Jones
acad9f57f9 Add "not available" to common messages 2018-03-30 14:03:04 +01:00
Fabien Marchewka
0d08dc410e Prevent Following Redirect (#615) (#1684) 2018-03-29 08:28:44 +01:00
Nick O'Leary
ebb3fb96cd Merge pull request #1670 from node-red-hitachi/subflow-icon-change
Enable user defined icon for subflow
2018-03-27 10:22:20 +01:00
Nick O'Leary
f31f23ff07 Allow template node to be updated more than once
Fixes #1671
2018-03-27 10:14:39 +01:00
KatsuyaHoshii
d2aa3d1868 Add SSL server certificate 2018-03-27 17:07:29 +09:00
KatsuyaHoshii
c9e2fce94d test for httprequest node 2018-03-27 16:09:04 +09:00
Kazuki-Nakanishi
8b0e76dd55 Hide the subflow check logic inside getDefaultNodeIcon function 2018-03-22 14:14:09 +09:00
Dave Conway-Jones
884618adfe remove down carat from typed input with only 1 type 2018-03-20 21:01:10 +00:00
Christopher Hiller
6e2e36e7a0 tcp: queue messages while connecting; closes #1414
- queues messages on a per-client basis while waiting for TCP server
  connection
- add `denque` package for performance (`shift()` happens in constant
  instead of `Array`'s linear time)
- add tests
- remove a duplicate test in `31-tcp_request.spec.js`
- cap queue at value specified in settings (`tcpMsgQueueSize`); default
  to 1000
- add `tcpMsgQueueSize` to `settings.js`

Signed-off-by: Christopher Hiller <boneskull@boneskull.com>
2018-03-20 13:45:44 -07:00
Christopher Hiller
9994df9601 tcprequest tests: normalize indents 2018-03-20 13:45:44 -07:00
Nick O'Leary
98f7271ac8 Merge pull request #1657 from node-red-hitachi/move-i18n-info-text
move i18n info text of core nodes under nodes/core/locales directory
2018-03-20 20:44:54 +00:00
Dave Conway-Jones
087cd121b8 add debug and trace to function node (#1654) 2018-03-20 20:40:36 +00:00
Kazuki Nakanishi
2d52527fb4 Don't mark a subflow changed when actually modified nothing (#1665) 2018-03-20 20:39:46 +00:00
Kazuki Nakanishi
fe289e62b5 Fix the problem that output labels of switch node sometimes disappear (#1664) 2018-03-20 20:37:29 +00:00
Nick O'Leary
2845475e3f Keep backup of .config.json 2018-03-20 00:04:52 +00:00
Nick O'Leary
b307492487 Add warning if using _credentialSecret 2018-03-20 00:04:52 +00:00
Nick O'Leary
d48284f7ea Remove unused references to settings 2018-03-20 00:04:52 +00:00
Dave Conway-Jones
7e416797e9 make trigger test a bit more robust 2018-03-19 17:33:18 +00:00
Kroderia
5d54ca7477 Chinese translations for core nodes (#1607)
* Fix typo

* Fix and Update some Chinese translations.

* Fix and Add Chinese translations to match all en-US's items
2018-03-17 17:49:17 +00:00
Qi Xiu
b979b4e61a Master chinese3 (#1666)
* Translated jsonata.json to Chinese

* Translated file jsonata.json to Chinese
2018-03-17 17:48:01 +00:00
Kazuki Nakanishi
2527f7984a Translate rpi-gpio node (#1669)
Thanks
2018-03-17 17:46:44 +00:00
Kazuki-Nakanishi
d9350b2362 Enable user defined icon for subflow 2018-03-14 13:51:50 +09:00
Kazuhito Yokoi
bd0b903f1a Fix typo in info messages of file node 2018-03-14 01:19:37 +00:00
Kazuhito Yokoi
f243c0df19 Fix typo in info messages of json node 2018-03-14 01:18:00 +00:00
Kazuhito Yokoi
7482978953 Fix typo in info messages of html node 2018-03-14 01:16:59 +00:00
Kazuhito Yokoi
77966689d4 Fix typo in info messages of csv node 2018-03-14 01:15:36 +00:00
Kazuhito Yokoi
cf43939d65 Fix typo in info messages of split node 2018-03-14 01:11:11 +00:00
Kazuhito Yokoi
391ac4b351 Fix typo in info messages of change node 2018-03-14 01:09:29 +00:00
Kazuhito Yokoi
e1e48aadd9 Fix typo in info messages of switch node 2018-03-14 01:08:10 +00:00
Kazuhito Yokoi
0681f206c4 Fix typo in info messages of udp node 2018-03-14 01:05:38 +00:00
Kazuhito Yokoi
d257c6f3d3 Fix typo in info messages of tcpin node 2018-03-14 01:04:21 +00:00
Kazuhito Yokoi
fa45c82cdc Fix typo in info messages of watch node 2018-03-14 01:01:58 +00:00
Kazuhito Yokoi
e805b58da6 Fix typo in info messages of websocket node 2018-03-14 01:00:13 +00:00
Kazuhito Yokoi
943976d207 Fix typo in info messages of trigger node 2018-03-14 00:49:44 +00:00
Kazuhito Yokoi
3a2e5a6ccd Fix typo in info messages of exec node 2018-03-14 00:47:50 +00:00
Kazuhito Yokoi
35ef036246 Fix typo in info messages of debug node 2018-03-14 00:46:07 +00:00
Kazuhito Yokoi
e09c3bbdd3 Fix typo in info messages of inject node 2018-03-14 00:41:07 +00:00
Nick O'Leary
3b12076d4b Ignore subflow debug nodes when building filter
Fixes #1660

As the editor doesn't know the ids of subflow instance debug nodes
there's no easy way to build a list of them as part of the filter
options. So for now, disable the filter option if we don't know
about the debug node.
2018-03-03 22:41:02 +00:00
Hiroyasu Nishiyama
cfcf78ae28 fix failure of node installation (#1658) 2018-03-03 07:35:17 +00:00
Hiroyasu Nishiyama
341ff9bf5c move i18n info text of core nodes under nodes/core/locales directory 2018-03-03 10:39:11 +09:00
mblackstock
10d8ca30b0 use node-red-node-test-helper for node tests 2018-03-01 20:41:16 -08:00
Dave Conway-Jones
4ebb5d099e add trigger reset test for null on 2nd output 2018-03-01 14:00:14 +00:00
Dave Conway-Jones
1e82b66bf0 remove octalbonescript example line from settings as no longer supported 2018-03-01 11:41:53 +00:00
Nick O'Leary
06a5e4273b Move all event emitting into runtime side, not api side 2018-02-28 11:24:12 +00:00
Dave Conway-Jones
e123e7b0b0 Fix pi gpio output of boolean to actually send 1/0
rather than true/false
2018-02-27 23:26:32 +00:00
Nick O'Leary
aeadc40c65 Bump for 0.18.4 2018-02-27 16:41:10 +00:00
Nick O'Leary
7ef418ec52 Ensure sshkey file path is properly escaped on Windows 2018-02-27 13:05:10 +00:00
Nick O'Leary
2ed52820b6 Fix fs/fspath reference 2018-02-27 11:11:02 +00:00
Nick O'Leary
e8fd7484b6 Normalize ssh key paths for Windows file names 2018-02-27 10:58:54 +00:00
Nick O'Leary
ce5242cfe8 Ensure userDir is an absolute path when used with sshkeygen 2018-02-26 23:46:08 +00:00
Nick O'Leary
af947879d8 Merge pull request #1614 from node-red-hitachi/no-tabs
Fix the problem that the last flow tab can be deleted
2018-02-22 19:02:12 -08:00
Kazuki-Nakanishi
3ed112cde6 Changed coding style 2018-02-23 11:48:40 +09:00
Nick O'Leary
99c6a9eccd Merge pull request #1646 from node-red-hitachi/no-defaults-node
Fixed the problems when using a node without defaults
2018-02-22 18:12:41 -08:00
Nick O'Leary
2029f6ea0a Merge pull request #1638 from node-red-hitachi/i18n-info-jp
add Japanese info text of core nodes
2018-02-22 18:01:56 -08:00
Nick O'Leary
e984e1f30f Merge pull request #1616 from node-red-hitachi/fix-i18n-message-lookup
fix message lookup for core nodes in case of i18 locales directory ex…
2018-02-22 17:59:52 -08:00
Kazuki-Nakanishi
f21260370f Fixed the problems when using a node without defaults 2018-02-22 14:10:31 +09:00
Dave Conway-Jones
fdae75c99b ensure trigger gets reset when 2nd output is null
to fix #1644
2018-02-21 21:56:03 +00:00
Nick O'Leary
a0489f2a0d Fix tests for existing file flag in settings 2018-02-21 08:38:52 -08:00
Nick O'Leary
0123eacbdb Merge pull request #1642 from node-red-hitachi/subflow-icon
Disable user defined icon for subflow
2018-02-21 08:24:41 -08:00
Nick O'Leary
53401b6aa7 Fix merging a remote diff 2018-02-20 15:01:45 -08:00
Nick O'Leary
9a5139f452 Detect if there are no existing flows to migrate into a project 2018-02-20 14:30:37 -08:00
Nick O'Leary
2ee0c8c228 Use relative urls when retriving flow history 2018-02-20 14:27:47 -08:00
Kazuki-Nakanishi
c53562cc9c Disable user defined icon for subflow 2018-02-20 15:29:52 +09:00
Nick O'Leary
ec5d7c2e5c Add credentialSecret to clone pane 2018-02-18 17:09:19 +00:00
Nick O'Leary
d6fc258485 Delay clearing inflight when changing credentials key 2018-02-18 16:43:40 +00:00
Nick O'Leary
f953612695 Mark deploy inflight when reverting a file change 2018-02-18 16:30:47 +00:00
Kazuki-Nakanishi
2ab93acca8 Revise the fix for the problem that the last flow tab can be deleted 2018-02-16 11:54:52 +09:00
Nick O'Leary
326c6c496e Handle missing_flow_file error on clone properly 2018-02-15 22:47:07 +00:00
Nick O'Leary
9f7f50664c Remote project from cached list on delete so it can be reused 2018-02-15 22:46:36 +00:00
Nick O'Leary
f6f1436123 getDefaultNodeIcon should handle subflow instance nodes
Fixes #1635
2018-02-15 15:34:15 +00:00
Hiroyasu Nishiyama
c3c519419d merge i18n-info-jp-storage 2018-02-15 22:47:15 +09:00
Hiroyasu Nishiyama
e569a80b72 merge i18n-info-jp-parsers 2018-02-15 22:47:05 +09:00
Hiroyasu Nishiyama
284f437c1a merge i18n-info-jp-logic 2018-02-15 22:46:58 +09:00
Hiroyasu Nishiyama
1fd44a9958 merge i18n-info-jp-io 2018-02-15 22:46:46 +09:00
Hiroyasu Nishiyama
cad34742f6 merge i18n-info-jp-core 2018-02-15 22:46:18 +09:00
Hiroyasu Nishiyama
323359b3c8 merge i18n-info-jp-analysis 2018-02-15 22:46:10 +09:00
Hiroyasu Nishiyama
35db8b45f0 add Japanese info text for io category nodes 2018-02-15 22:39:46 +09:00
Nick O'Leary
50ae815ceb Update changelog 2018-02-14 13:53:55 +00:00
Nick O'Leary
1a4389c90d Fix offset calculation when dragging node from palette 2018-02-14 13:37:24 +00:00
Nick O'Leary
fdaa5ce1da Merge pull request #1624 from node-red/library-extra-element
let library createUi accept elements other than node-input-name
2018-02-14 13:16:39 +00:00
Nick O'Leary
09d9936aed Change remote-diff shortcut and add it to keymap
Fixes #1628
2018-02-14 09:54:07 +00:00
Nick O'Leary
b3f6109b1c Update changelog and bump package 2018-02-13 23:51:16 +00:00
Nick O'Leary
5fb3ffc240 Merge pull request #1627 from node-red-hitachi/fix-batch-concat-mode-msg-modification
fixed message modificcation of concat mode of BATCH node
2018-02-13 23:45:19 +00:00
Nick O'Leary
360db252bb Merge pull request #1626 from node-red-hitachi/fix-typo-in-jp-message-catalog
fix typo in Japanese message catalog
2018-02-13 23:44:48 +00:00
Nick O'Leary
0b6e290271 Merge pull request #1625 from node-red-hitachi/fix-typo-in-info-text
Fix typo in info text
2018-02-13 23:44:35 +00:00
Nick O'Leary
7f0174e6db Merge pull request #1617 from node-red-hitachi/fix-backquote-in-info
Fix backquote in info text
2018-02-13 23:43:56 +00:00
Nick O'Leary
a25dad6c2e Ensure debug tools show for 'complete msg object' 2018-02-13 23:42:22 +00:00
Nick O'Leary
6191a49ed3 Use flow-diff to resolve merge conflicts 2018-02-13 23:09:51 +00:00
Hiroyasu Nishiyama
6252b075bc fixed message modificcation of concat mode of BATCH node 2018-02-13 20:55:03 +09:00
Hiroyasu Nishiyama
7face138fd add Japanese info text for analysis category nodes 2018-02-12 14:04:29 +09:00
Hiroyasu Nishiyama
382b83b093 add Japanese info text for parsers category nodes 2018-02-12 12:24:03 +09:00
Hiroyasu Nishiyama
691687d1bc add Japanese info text for storage category nodes 2018-02-11 23:07:07 +09:00
Hiroyasu Nishiyama
5814b80a72 add Japanese info text for logic category nodes 2018-02-11 20:59:01 +09:00
Hiroyasu Nishiyama
e147fbb1fa add Japanese info text for core category nodes 2018-02-11 20:52:44 +09:00
Hiroyasu Nishiyama
b9e256adfa fix typo in Japanese message catalog 2018-02-11 02:11:29 +09:00
Hiroyasu Nishiyama
3b7bf04e22 fix typo in info text of DELAY node 2018-02-11 02:07:51 +09:00
Hiroyasu Nishiyama
43408a724c fix unmatched tag in info text of BATCH node 2018-02-11 02:06:28 +09:00
Dave Conway-Jones
5fbd5bf9e2 handle other fields in library - by only changing prefix
(rather than whole property  - so ...-name is still the name required)
2018-02-10 16:49:47 +00:00
Dave Conway-Jones
5e87828b29 let library createUi accept elements other than node-input-name 2018-02-10 16:16:49 +00:00
Nick O'Leary
9066cedc29 Better merge-conflict commit button layout 2018-02-09 09:35:47 +00:00
Nick O'Leary
aa1cf0b228 Avoid git fetch when refreshing local status 2018-02-08 23:30:07 +00:00
Nick O'Leary
06a6a4408f Handle allow-unrelated-histories option on pull 2018-02-08 23:21:14 +00:00
Nick O'Leary
d5619d2b9d Fix up merge conflict handling 2018-02-08 22:22:58 +00:00
Nick O'Leary
2f6ac42efe Add comment blocks to GitHub templates to reduce clutter 2018-02-08 14:39:58 +00:00
Hiroyasu Nishiyama
0bba3dd83d merge upstream/master 2018-02-08 23:22:00 +09:00
Hiroyasu Nishiyama
abe60b62e6 change backquote in info text to <code>...</code> 2018-02-08 23:20:53 +09:00
Nick O'Leary
555b7df986 Handle more git 2.1 differences 2018-02-07 13:47:09 +00:00
Nick O'Leary
b3786700e6 Handle changing case of git error messages between versions 2018-02-07 13:10:04 +00:00
Hiroyasu Nishiyama
ce9643d21b fix message lookup for core nodes in case of i18 locales directory exists 2018-02-07 21:59:58 +09:00
Nick O'Leary
4a5cb7f2f5 Ensure commit list has a refs object even if empty 2018-02-07 11:33:07 +00:00
Nick O'Leary
42a7e902e6 Handle host key verification as auth error 2018-02-07 11:32:50 +00:00
Nick O'Leary
aebe080e85 Add support for GIT_SSH on older levels of git 2018-02-07 10:50:32 +00:00
Kazuki-Nakanishi
c316284924 Fix the problem that the last flow tab can be deleted 2018-02-07 14:19:18 +09:00
Nick O'Leary
8d98b228ab Bump 0.18.2 2018-02-06 15:28:43 +00:00
Nick O'Leary
5b4c42ff05 Update changelog 2018-02-06 14:30:31 +00:00
Dave Conway-Jones
a596a4551a undo exec node change (investigate test fail) 2018-02-06 11:42:33 +00:00
Dave Conway-Jones
0968f96982 add a default keepalive to tcp client mode
to address #1469
2018-02-06 11:36:14 +00:00
Dave Conway-Jones
5931e13b9c move node.send in exec and httprequest nodes
just in case
2018-02-06 11:36:13 +00:00
Nick O'Leary
415c768ae4 Filter out %D from git log command for older git versions 2018-02-06 11:00:11 +00:00
Nick O'Leary
b4c8bf21d5 Ensure projects are created as logged in user 2018-02-06 10:38:41 +00:00
Nick O'Leary
5fe5db603d Better error handling/reporting in project creation 2018-02-05 15:59:11 +00:00
Nick O'Leary
9f7dd7f5d4 Add Project Settings menu option 2018-02-05 10:58:09 +00:00
Nick O'Leary
e6d32aab7b Refresh vc sidebar on remote add/remove 2018-02-05 10:10:26 +00:00
Dave Conway-Jones
08bd6d963c Ensure send is last thing trigger does 2018-02-04 21:25:25 +00:00
Dave Conway-Jones
ff05fb14a6 ensure trigger doesn't set two simultaneous timeouts 2018-02-04 20:17:43 +00:00
Nick O'Leary
22d942b705 Fix auth prompt for ssh repos 2018-02-03 23:44:19 +00:00
Nick O'Leary
0526372f28 Bump rbe dependency 2018-02-03 20:48:43 +00:00
Dave Conway-Jones
f99051906a add missing property select var to HTML node 2018-02-02 23:40:01 +00:00
Nick O'Leary
d1f7fd8bfd Prevent http git urls from including username/pword 2018-02-02 22:43:29 +00:00
Nick O'Leary
fc1436a96d Fix fetch auth handling on non-default remote 2018-02-02 16:26:55 +00:00
Nick O'Leary
d21568497b Avoid exception if git not installed 2018-02-02 13:46:22 +00:00
Nick O'Leary
df4beef060 Check version of git client on startup 2018-02-02 11:37:18 +00:00
Dave Conway-Jones
a52f195d41 undo dumb non-fix to trigger. 2018-02-02 10:28:22 +00:00
Dave Conway-Jones
419019a656 add check for property to trigger (temporary fix for debug) 2018-02-02 10:23:28 +00:00
Nick O'Leary
42b5635485 Merge pull request #1603 from Kroderia/master
Fix and Add some Chinese translations
2018-02-01 22:42:19 +00:00
Nick O'Leary
a8fc5b01f3 Don't assume node has defaults when exporting icon property 2018-02-01 22:28:05 +00:00
Nick O'Leary
ead841d844 Update CHANGELOG 2018-02-01 20:37:06 +00:00
Nick O'Leary
67d7930aef Remember to disable projects in editor when git not found 2018-02-01 20:35:18 +00:00
Nick O'Leary
6f69995f4e Update sort/batch docs 2018-02-01 20:21:36 +00:00
Kroderia
05252fa239 Fix and Add some Chinese translations 2018-02-02 02:57:11 +08:00
Nick O'Leary
1377439bb0 Fix pull/push when no tracked branch 2018-02-01 17:08:22 +00:00
Nick O'Leary
407123a280 Add git_pull_unrelated_history handling 2018-02-01 17:07:46 +00:00
Nick O'Leary
750dd590c8 Handle delete of last remote in project settings 2018-02-01 11:25:56 +00:00
Nick O'Leary
44112a9d18 Bump packte to 0.18.1 2018-02-01 10:54:16 +00:00
Nick O'Leary
b220bf0d99 Update changelog 2018-02-01 10:53:48 +00:00
Nick O'Leary
d0d93d7070 Handle more repo clone error cases 2018-02-01 10:42:14 +00:00
Nick O'Leary
4117961236 Relax validation of git urls 2018-02-01 10:42:04 +00:00
Nick O'Leary
68a3d71ee6 Revalidate project name on return to project-details view 2018-02-01 09:47:29 +00:00
Dave Conway-Jones
bf5d741f0d Trigger node migration - ensure bytopic not blank 2018-02-01 09:21:16 +00:00
Nick O'Leary
55a33bc408 Add HEAD to list of methods with no body in http req node 2018-01-31 23:54:06 +00:00
Nick O'Leary
3ec35ed119 Do not include payload in GET requests
Fixes #1598

This regression was caused by #1531 - allowing the http request node
use any method.

The full fix is to identify which common verbs must not include a payload
and exclude them. GET needs fixing right now.
2018-01-31 23:39:26 +00:00
Nick O'Leary
3d8d6953ec Avoid unecessary project refresh on branch-switch
Fixes #1597
2018-01-31 23:16:38 +00:00
Nick O'Leary
528db67c34 Add support for file:// git urls 2018-01-31 22:34:18 +00:00
Nick O'Leary
b847e962aa Handle project first-run without existing flow file 2018-01-31 21:31:45 +00:00
Nick O'Leary
bbb9a3c63b Merge pull request #1595 from kazuhitoyokoi/master
Update messages in jsonata.json
2018-01-31 14:07:55 +00:00
Kazuhito Yokoi
322cebc48c Update messages in jsonata.json 2018-01-31 10:45:31 +00:00
Nick O'Leary
1cceb3d880 Merge pull request #1594 from kazuhitoyokoi/master-japanese
Update Japanese translations in messages.json
2018-01-31 09:50:54 +00:00
Kazuhito Yokoi
effc64db9a Update Japanese translations in messages.json 2018-01-31 05:02:20 +00:00
Nick O'Leary
7e5bd5f2c1 Update to JSONata 1.5.0 2018-01-30 20:36:23 +00:00
Nick O'Leary
e32cc4d1af Fix typo in CSV node help 2018-01-30 20:23:06 +00:00
Dave Conway-Jones
09a3cd850e mention parts in css, yams 2018-01-30 16:11:26 +00:00
Dave Conway-Jones
b0c876019a let HTML node use alternative msg property 2018-01-30 16:11:25 +00:00
Nick O'Leary
6725f870d2 Merge pull request #1591 from node-red-hitachi/fix-reduce-init
fix reduce mode of JOIN node with JSONata $append function
2018-01-30 13:37:07 +00:00
Hiroyasu Nishiyama
0e5adc1f0a merge upstream/master 2018-01-30 22:15:24 +09:00
Dave Conway-Jones
57ebb93dc0 trigger node - add mention of per topic capability to info. 2018-01-30 11:16:04 +00:00
Nick O'Leary
05dc0bfa1d Merge pull request #1590 from camlow325/allow-at-sign-in-module-examples-path
Allow at sign in module examples path
2018-01-30 10:33:24 +00:00
Jeremy Barlow
2d0264116c Handle at sign in module example path for UI import menu
This commit allows an example from an npm package that has
an org scoped name (which includes an @ character) to be abbreviated
properly in the import menu - i.e., showing 'myexample' for a package
name of '@myorg/node-red-contrib-myexample' rather than
'@myorg/node red-contrib-myexample'.
2018-01-29 15:27:34 -08:00
Jeremy Barlow
3938550ea8 Support at sign in module examples path for flows endpoint
This commit allows an example from an npm package that has
an org scoped name (which includes an @ character) to be retrieved and
loaded properly through the flows endpoint.
2018-01-29 15:23:19 -08:00
Nick O'Leary
9f0c567794 Fix authWriter test again 2018-01-29 21:58:53 +00:00
Nick O'Leary
8672fcd2bb Fix authServer on Windows path
Fixes #1588
2018-01-29 21:47:20 +00:00
Hiroyasu Nishiyama
3f2a92e801 evaluate init value on each reduction 2018-01-29 22:30:47 +09:00
Nick O'Leary
771e43583a Typo in Batch node help 2018-01-29 11:21:43 +00:00
Nick O'Leary
9353d5c1c4 Merge pull request #1585 from node-red-hitachi/fix-HTML
fix HTML node not to reuse message object for multiple output messages
2018-01-29 11:16:20 +00:00
Nick O'Leary
5e462f0f02 Merge pull request #1586 from node-red-hitachi/fix-file-in-parts
fix behavior of "a msg per line" mode of FILE IN node with empty line
2018-01-29 11:14:07 +00:00
Nick O'Leary
a25f6fec9f Merge pull request #1587 from node-red-hitachi/master-pj-cred
Fix the problem that does not encrypt credential file
2018-01-29 11:13:19 +00:00
Nick O'Leary
519edce0ed Replace when.otherwise() with Promise.catch()
Fixes #1584
2018-01-29 09:51:38 +00:00
Kazuki-Nakanishi
0bc7702d95 Fix the problem that the project other than the first project does not encrypt a credential file 2018-01-29 15:51:16 +09:00
Hiroyasu Nishiyama
18be0d6d26 merge upstream/master 2018-01-29 14:44:17 +09:00
Dave Conway-Jones
1d4a435f20 Use a properly random is for parts.id
to close #1583
2018-01-28 21:15:59 +00:00
Hiroyasu Nishiyama
34e46fc6d3 fix behavior of msg per line mode of FILE IN node with empty line 2018-01-28 21:27:15 +09:00
Nick O'Leary
50956c51f7 Wrap notification messages in <p> when needed 2018-01-28 10:57:05 +00:00
Nick O'Leary
dd7bb28b6a Fix debug comms batching with multiple connections 2018-01-28 10:44:02 +00:00
Hiroyasu Nishiyama
8516f41ba8 do not reuse message object for multiple outputs 2018-01-28 14:37:34 +09:00
Nick O'Leary
15c3cc60f6 Update changelog 2018-01-26 15:22:31 +00:00
Nick O'Leary
716bca211b Update link to core team
Fixes #1540
2018-01-26 15:08:42 +00:00
Dave Conway-Jones
8179813fe1 let HTML node return empty array for no matching input.
to Close #1582
2018-01-26 14:26:54 +00:00
Nick O'Leary
d355de509b Merge pull request #1580 from node-red-hitachi/0.18-parts-ext-switch-fix
fix bugs in SWITCH updates
2018-01-26 08:18:10 +00:00
Nick O'Leary
b04a2d4c08 Merge pull request #1581 from kazuhitoyokoi/0.18-jsonnode
Add icons into property UI of JSON node
2018-01-26 08:17:48 +00:00
Kazuhito Yokoi
6d3232a4f0 Add icons into property UI of json node 2018-01-26 07:31:48 +00:00
Hiroyasu Nishiyama
2753075180 fix bugs in SWITCH updates 2018-01-26 12:39:07 +09:00
Nick O'Leary
d0166b25e4 Update Changelog 2018-01-25 22:03:54 +00:00
Nick O'Leary
73ee657d74 Add TLS options to WebSocket client 2018-01-25 20:26:35 +00:00
Nick O'Leary
45913e5ee8 Don't end mqtt client on first error
Fixes #1566
2018-01-25 16:58:42 +00:00
Nick O'Leary
e6369820a9 SIGINT handler should wait for stop to complete before exit 2018-01-25 14:04:38 +00:00
Nick O'Leary
22a5b339f7 Stop list items from overflowing to new lines in node ui
Fixes #1408
2018-01-25 14:02:41 +00:00
Nick O'Leary
2cea3b6435 Merge pull request #1557 from node-red/inject-node-spinner-and-hours-fixes
remove inject node at specific time spinner
2018-01-25 13:51:27 +00:00
Nick O'Leary
5d2d06fb3e Type editors should inherit the width of their parent tray 2018-01-25 13:50:35 +00:00
Nick O'Leary
0dd7bc7fb9 Better default README.md content and edit button 2018-01-25 13:30:27 +00:00
Dave Conway-Jones
0b0005337c Decrement connected client count rather than show disconnected
to close #1577
2018-01-25 13:27:47 +00:00
Hiroyasu Nishiyama
d26fb02bb9 Japanese message catalog update of core nodes for 0.18 (#1579)
* Japanese message catalog update for 0.18

* update Japanese message catalog

* change tabs to spaces
2018-01-25 11:34:51 +00:00
Nick O'Leary
af683835d9 Add optional header to markdown editor 2018-01-25 11:24:30 +00:00
Nick O'Leary
c43647ca86 Handle null profile flow file name 2018-01-25 11:14:16 +00:00
Nick O'Leary
6d02e70025 Ensure existing files are migrated to first project 2018-01-25 10:13:07 +00:00
Kazuhito Yokoi
5498c6f87d Update Japanese translations in editor.json (#1573)
* Update Japanese translations in editor.json

* Update Japanese translations in editor.json
2018-01-25 08:12:28 +00:00
Kazuhito Yokoi
11f59bc3ac Move Chinese language files to correct path (#1574) 2018-01-25 08:12:15 +00:00
Kazuki Nakanishi
94cb7de79f Fix the problem when using projects feature without git setting (#1575) 2018-01-25 08:11:46 +00:00
Nick O'Leary
838f45775b Merge pull request #1576 from node-red-hitachi/0.18-pj-open
Enable the project open button when creating a first project
2018-01-25 08:10:03 +00:00
Kazuki-Nakanishi
1c1422e4b5 Enable a project open button when creating a first project 2018-01-25 12:46:37 +09:00
Nick O'Leary
cd8ca6fc62 Merge pull request #1552 from node-red/ace-editor-annotations
Changes to ACE editor annotations
2018-01-24 23:16:53 +00:00
Nick O'Leary
b7a0a9d7c2 Merge branch 'master' into 0.18 2018-01-24 23:08:14 +00:00
Nick O'Leary
7822ab113a Merge pull request #1571 from node-red/projects
Projects 🎉
2018-01-24 23:07:04 +00:00
Nick O'Leary
e250a91f09 Merge branch '0.18' into projects 2018-01-24 23:06:27 +00:00
Nick O'Leary
92a65dcda5 Update installer tests for spawn 2018-01-24 22:56:54 +00:00
Nick O'Leary
4b129d94e4 Move node install to spawn to allow for big stdout
Fixes #1488
2018-01-24 22:41:26 +00:00
Nick O'Leary
e7960d1d44 Rewording some of the message sequence nodes (#1564)
* Rewording some of the message sequence nodes

* Fix batch test for overlap renaming

* Finish msg-sequence node help rewording

* Rename maxKeptMsgsCount to nodeMessageBufferMaxLength

* Rename nodeMessageBufferMaxLength in tests

* Remove Join-merge mode for later rework
2018-01-24 22:01:07 +00:00
Nick O'Leary
95589307cd Better reporting of project-not-found 2018-01-24 21:54:18 +00:00
Nick O'Leary
20a0e4f3e0 Update settings test for global git user 2018-01-24 21:24:54 +00:00
Nick O'Leary
6a9213da64 Add project-exists checks on first-run dialog 2018-01-24 21:21:01 +00:00
Nick O'Leary
7a89e3cf33 Check the global git config to ensure its setup 2018-01-24 21:05:48 +00:00
Nick O'Leary
64607df929 Ensure git username/email are set on project creation 2018-01-24 15:51:11 +00:00
Nick O'Leary
a62a1012fa Handle scoped modules via palette editor 2018-01-24 15:07:43 +00:00
Nick O'Leary
14efd0b2f9 Merge pull request #1529 from btsimonh/websocketsnonadmin
Fix WebSockets not working when httpAdminRoot false
2018-01-24 11:00:48 +00:00
Nick O'Leary
7ad2192df8 Merge pull request #1475 from thiagobustamante/patch-1
Fix #1456
2018-01-23 23:12:16 +00:00
Nick O'Leary
3cb5cbd8d5 Allow adminAuth.user to be a Function
Fixes #1461
2018-01-23 23:08:11 +00:00
Nick O'Leary
cc9011cd68 oneditdelete should be available to all node types
Closes #1346
2018-01-23 21:29:39 +00:00
Nick O'Leary
dc3d89008d Merge pull request #1561 from node-red/add-property-select
Add property select to various core nodes
2018-01-23 17:06:31 +00:00
Nick O'Leary
1893642187 Sort typeSearch results based on position of match 2018-01-23 15:40:41 +00:00
Nick O'Leary
a9ece5772d Remove extra editor logging 2018-01-23 11:29:09 +00:00
Nick O'Leary
cf34716a57 Tidy up project first-run experience 2018-01-23 11:26:05 +00:00
Nick O'Leary
1337831061 Better interaction with view-ssh-key list 2018-01-23 10:25:19 +00:00
Nick O'Leary
757e72100d Put Projects behind feature flag within editor 2018-01-22 23:33:05 +00:00
Hiroyasu Nishiyama
a75b819858 reduce *MaxKeptMsgsCount property to one maxKeptMsgsCount (#1563) 2018-01-22 23:26:17 +00:00
Kazuki Nakanishi
da4a0f09ed Add a button to restore user defined icon (#1569) 2018-01-22 23:25:43 +00:00
Hiroyasu Nishiyama
87d847a074 delete useless logging code from SWITCH node (#1570) 2018-01-22 23:25:02 +00:00
Nick O'Leary
84711beec0 Merge branch '0.18' into projects 2018-01-22 23:17:28 +00:00
Nick O'Leary
f3cf58c8ff Remove mqtt debug 2018-01-22 23:15:20 +00:00
Nick O'Leary
cf40497e6e Flip logic for opt-in to projects 2018-01-22 23:14:38 +00:00
Nick O'Leary
dfebc4b78d Migrate deploy confirmations to notifications 2018-01-22 23:04:05 +00:00
Nick O'Leary
15f41a2e7c Relax localfilesystem fsync tests 2018-01-22 14:16:31 +00:00
Nick O'Leary
ad6e55ca17 Allow a user to install missing modules from project settings 2018-01-22 13:46:11 +00:00
Hiroyasu Nishiyama
6b466d217a update UI for SORT node (#1567)
* update UI of SORT node

* fix maxKeptMsgsCount of SORT node
2018-01-22 00:23:22 +00:00
Dave Conway-Jones
00dcb304c7 add default values as placeholders to trigger so no-one is suprised. 2018-01-21 11:49:06 +00:00
Hiroyasu Nishiyama
c6fb3d6f41 make selector of "joined using" filed shown correctly (#1568)
make selector of "joined using" field shown correctly
2018-01-21 11:46:57 +00:00
Dave Conway-Jones
ac3143811f don't fail icon check if it's not there (allows delete of missing config node) 2018-01-19 22:48:03 +00:00
Nick O'Leary
7e27dd7678 Don't rely on ssh-keygen output to prevent known errors 2018-01-19 22:31:41 +00:00
Nick O'Leary
c2508296a5 Add debug to sshkeygen 2018-01-19 22:10:29 +00:00
Nick O'Leary
a9b50ce6fc Collapse create/open/delete project dialogs into one 2018-01-19 21:51:29 +00:00
Nick O'Leary
eac98a6d4d Prevent ssh-keygen prompting for passphrase when blank 2018-01-19 13:12:22 +00:00
Nick O'Leary
7e2b2a9a02 Timeout sshkey-gen calls 2018-01-19 12:57:37 +00:00
Nick O'Leary
353de471eb Add debug to sshkeygen for travis 2018-01-19 12:50:12 +00:00
Nick O'Leary
85fc20b52d Fix unhandled promise warnings in sshkeys/node8 2018-01-19 11:42:19 +00:00
Nick O'Leary
cc25a781f8 Increase timeouts on sshkeygen tests for travis 2018-01-19 11:21:12 +00:00
Nick O'Leary
fc3012ba72 Add notification button to title bar 2018-01-19 10:36:57 +00:00
Nick O'Leary
d93a92c1c8 Rearrange ssh logic to bring it together 2018-01-18 23:13:55 +00:00
Nick O'Leary
f7f795f58a Fixup SSH key auth for project repos 2018-01-18 22:17:48 +00:00
Nick O'Leary
2700f8cdd2 Try to surpress the system context menu on Ctrl-Click in canvas 2018-01-17 23:14:18 +00:00
Hiroyasu Nishiyama
6310de0d20 Initial support of sequence rules for SWITCH node (#1545)
* new UI for parts support of SWITCH node

* update UI of SWITCH node for parts support

* add server side code of new SWITCH node

* update info document of SWITCH node

* add tests for new SWITCH node features

* add test for too many pending messages & related fixes

* fix handling when msg is undefined

* tabs -> spaces

* fixed meaning of "repair sequence" in SWITCH node docs

* add a note on restricting internally kept messages

* change label and position in menu of "pos. between" rule

* fixed typos (again, sorry)
2018-01-17 10:08:58 +00:00
Hiroyasu Nishiyama
218794be77 Initial support of merge & reduce mode for JOIN node (#1546)
* initial support of merge mode of JOIN node

* initial support of reduce mode of JOIN node

* update info document of JOIN node

* add tests for merge & reduce mode of JOIN node

* tidy tabs & spaces

* add test for too many pending messages & related fixes

* add an test for reduce mode of JOIN node

* change order of modes of SWITCH node

* add initial topics entry of merge mode

* fixed descriptions on "reduce right" checkbox

* fixed update of typedInput field of reduce mode

* fixed a typo in info document of JOIN node

* allow empty string in JSONata input field of reduce mode

* fixed a typo

* fixed error in reduce mode description
2018-01-17 10:08:23 +00:00
Hiroyasu Nishiyama
af71ae649b Initial support of new BATCH node (#1548)
* initial support of BATCH node

* add concat mode & fix for docs and js code

* add tests for BATCH node

* minor correction of typo

* allow interval in float

* fixed message catalog

* add test for too many pending messages & related fixes

* update info document on batchMaxKeptMsgsCount

* fixed close callback

* fixed info document

* add initial topics entry of concat mode
2018-01-17 10:05:01 +00:00
Dave Conway-Jones
9bc72c1a06 let trigger node be reset by boolean message (#1554)
* let trigger node be reset by boolean message

with test

* fix trigger node boolean reset check to work with false

and add test
2018-01-17 09:51:53 +00:00
Kazuki Nakanishi
8d7c157751 Add UI test cases for messages on cookbook (#1562) 2018-01-17 09:50:46 +00:00
Dave Conway-Jones
558a66fbe5 restrict inject interval to less that 2^31 millisecs
(596 hrs, 24 days) to stop overflow causing fast loop. (defaults to 0)
to close #1485
2018-01-17 09:35:47 +00:00
Nick O'Leary
f95b414d22 First pass of projects test coverage 2018-01-16 23:04:39 +00:00
Dave Conway-Jones
e793a1e1aa add property choice to xml, sentiment nodes
add tests
2018-01-16 21:43:37 +00:00
Nick O'Leary
b76010cb5a Add sshkeygen test 2018-01-16 16:38:53 +00:00
Nick O'Leary
52475df783 Fix various tests due to projects rework 2018-01-16 16:18:18 +00:00
Nick O'Leary
1f3f32d377 Improve checks for missing _spec files 2018-01-16 13:15:47 +00:00
Nick O'Leary
3f5ba10354 Fix up merge 2018-01-16 11:25:13 +00:00
Nick O'Leary
25f4a018d9 Merge branch '0.18' into projects 2018-01-16 11:21:54 +00:00
Dave Conway-Jones
a11a279c00 add msg. select to range and yaml nodes,
re-order son node (name to bottom)
add common.label.property to messages list
2018-01-16 10:59:44 +00:00
Nick O'Leary
fd4fdb31b5 Better error reporting when module provides duplicate type 2018-01-15 23:20:20 +00:00
Dave Conway-Jones
1921796d6d slight inject css adjust to line up text 2018-01-15 09:02:52 +00:00
Nick O'Leary
543a2b9dc7 Update json node docs to add caveat on ensuring JSON 2018-01-14 23:37:39 +00:00
Nick O'Leary
dd23e03342 Add option to JSON node to ensure particular encoding 2018-01-14 23:19:01 +00:00
Dave Conway-Jones
5307c74f85 remove inject node at specific time spinner
to close #1406
perform better validation / truncation of input for crontab,
adult spacing on page to be less cramped/more aligned
2018-01-14 22:16:51 +00:00
Dave Conway-Jones
d701c406e2 Update ACE editor (#1555) 2018-01-14 21:05:22 +00:00
Dave Conway-Jones
3ba56a0a65 add missing CSV node messages (#1551) 2018-01-14 21:02:46 +00:00
Dave Conway-Jones
4adafb6d1e Changes to ACE editor annotations
relax errors for missing semi-colons, [] syntax warnings, max errors.
And also ignore missing doctype error for html templates.
2018-01-14 13:24:12 +00:00
Nick O'Leary
4453a51211 Tidy up properly between file node tests 2018-01-14 01:06:55 +00:00
Nick O'Leary
14429d2943 Remove node 7 from travis 2018-01-14 00:54:45 +00:00
Nick O'Leary
1a62a7831b Handle undefined/null in log functions
Fixes #1418
2018-01-14 00:50:58 +00:00
Nick O'Leary
242e35c212 Fix file tests now the node properly creates directories 2018-01-14 00:44:33 +00:00
Nick O'Leary
ea763fdfd5 File out - create dirs synchronously to ensure they exist
Fixes #1489
2018-01-14 00:33:25 +00:00
Nick O'Leary
e762b7ff48 TypedInput: handle user defined value/labels options
Fixes #1549
2018-01-14 00:24:36 +00:00
Nick O'Leary
298068b2b9 Clear mouse state when typeSearch cancelled
Fixes #1517
2018-01-13 23:46:16 +00:00
Nick O'Leary
cb4120ec4b Watch node - filter subdir events in tests because fs.notify is inconsistent 2018-01-13 23:24:41 +00:00
Nick O'Leary
5cfbb87bee Fix global leak in watch tests (again x2) 2018-01-13 23:14:01 +00:00
Nick O'Leary
9e472ed83c Fix global leak in watch tests (again) 2018-01-13 23:00:05 +00:00
Nick O'Leary
ebca753fc4 Fix global leak in watch tests 2018-01-13 22:59:05 +00:00
Nick O'Leary
548f45cd56 Publish null/undefined to mqtt as blank not toString
Fixes #1521
2018-01-13 22:53:58 +00:00
Nick O'Leary
8ffabf1813 Make Watch node test more reliable
- tidied up some unnecessary code
 - removed the 'size' check as that is highly prone to timing issues
2018-01-13 22:48:35 +00:00
Nick O'Leary
1f40d4f941 Update package dependencies 2018-01-13 22:00:43 +00:00
Nick O'Leary
41582045d0 Tidy-up inject node once-timer on close 2018-01-13 21:17:14 +00:00
Nick O'Leary
fd9e3fc03a Update jsonata to 1.4.1 2018-01-13 20:42:23 +00:00
Nick O'Leary
8c42b2bdb4 Add passphrase to TLS node 2018-01-13 20:27:54 +00:00
Dave Conway-Jones
7b1787fdbb Debug to status option (#1499)
* Let debug optionally target the status line (32 chars only)

* Add batching of messages to debug ws comms

* let Debug handle simple case of NaN

would also close #1530

* Fixup debug tests for batch comms (no new tests yet)

* mixup comms/api test to match new batch mode (no new tests)

* Add test for NaN being sent OK.

* redo original fix to padding / labels for new debug options

* fix debug test (re-add fix from #1444)

* Fix up merge issues in debug tests
2018-01-13 16:14:03 +00:00
Colin Law
71fee0025d Add description of Timeout field in exec node info tab (#1550) 2018-01-13 15:33:15 +00:00
Nick O'Leary
1204cf1ba0 Better permission handling in editor 2018-01-12 21:00:11 +00:00
Nick O'Leary
7bd8d8c3ae Give in to npm's insistent reformatting of package.json 2018-01-11 23:04:39 +00:00
Rocco Musolino
2c4d5fa38d add express-session memorystore without leaks (#1435)
* add express-session memorystore without leaks

* Bump memorystore to v1.6.0
2018-01-11 22:51:05 +00:00
Nick O'Leary
bedb2d943e Merge branch 'pr_1231' into 0.18 2018-01-11 22:46:18 +00:00
Dave Conway-Jones
a3640bd9bf tag UDP ports in use properly so they get closed correctly (#1508)
* tag ports in use properly so they get closed correctly

to close #1470

* redo test for udp port in use

* check port in use correctly on close
2018-01-11 22:03:59 +00:00
Dave Conway-Jones
7c0b9ffe06 Add skip first n lines capability to csv node (#1535)
* Initial implementation of skip first lines for css node

* add css skip lines tests
2018-01-11 22:02:58 +00:00
Nick O'Leary
161c7d30ca Add support for rejectUnauthorized msg property 2018-01-11 22:00:10 +00:00
Klaus Landsdorf
4ff6e792cd Inject node - let once delay be editable (#1541)
* inject once with delay

* test for inject delay at once works

* give access to the once delay of the inject node

* change event not needed in HTML

* code review with Dave

* rename test

* tests for default and optional delay

* test once with delay and repeat
2018-01-11 21:50:53 +00:00
delbozkester
af5df890a5 Add MQTT via WebSocket communication option (#1544)
* Add MQTT via WebSocket communication option

Add option in MQTT broker configuration node to enable MQTT via WebSoket comunication

* MQTT over WS error correction

Minimal correction of values and erase debug console.log unnecessary

* original package.json

Erase some changes on grunt build at package.json. Erase package-lock.json and back to the original package.json

* .gitignore

* .gitignore again

* No tabs
2018-01-11 21:22:02 +00:00
Nick O'Leary
9ba011003a Merge branch 'master' into 0.18 2018-01-11 21:20:51 +00:00
Nick O'Leary
bb168d35a8 Add warning if no sshkeys configured when cloning 2018-01-11 12:56:49 +00:00
Nick O'Leary
3306d30094 Get proper path to local keyfile when selected 2018-01-11 11:19:04 +00:00
Nick O'Leary
6516e0dfd2 Allow a user to pick existing sshkeys from ~/.ssh 2018-01-10 17:37:41 +00:00
Nick O'Leary
00a396014b Fix editor-button toggle css 2018-01-10 10:02:35 +00:00
Nick O'Leary
13356047dc Better handling of empty projects and lifecycle 2018-01-09 15:06:05 +00:00
Nick O'Leary
8a6488b067 Move editor project files and add search to open dialog 2018-01-08 23:14:37 +00:00
Nick O'Leary
1c2ea56f42 Allow a project to be specified on the command-line
Reuses the existing flowFile - if its value is found
to be the name of an existing project, that project
is set as the active one.

If it is not the name of an existing project, it is
ignored.
2018-01-08 16:10:54 +00:00
Nick O'Leary
1d7ae300e2 Handle cloning a bare repository 2018-01-08 14:46:56 +00:00
Nick O'Leary
6013e186ed Add placeholder when a repo has no local branches 2018-01-08 14:46:56 +00:00
Hideki Nakamura
207d3d3340 Clear debug message when switching projects (#1523)
* Clear debug sidebar when switching project

* Delete a unnecessary comment

* Clear any filters the users has enabled

* Clear filter settings only when the user opens a project
2018-01-05 16:13:02 +00:00
Hideki Nakamura
5a6cde1446 Refactoring ssh-keygen function (#1533) 2018-01-05 16:12:01 +00:00
Kazuki Nakanishi
63f7d826bc Enable it to store icon files in {settings.userDir}/lib/icons directory for dynamic nodes's icon feature (#1536) 2018-01-05 14:23:47 +00:00
Kazuki Nakanishi
ff8773f6bd Fix the problem that occurs by grunt coverage (#1537) 2018-01-05 14:22:49 +00:00
Colin Law
a868cb97d9 Move all node.send to end of timer functions in trigger node (issue #1527) (#1539) 2018-01-02 08:28:08 +00:00
Nick O'Leary
915d73e6f2 Ensure node.outputs remains a number type
Closes #1532
2017-12-22 21:14:47 +00:00
Hugobox
5f4f6e37b5 HTTP REQUEST: Adding PROPPATCH and PROPFIND http methods (#1531)
* HTTP REQUEST: Adding PROPPATCH and PROPFIND http methods

* Removed method check
2017-12-22 10:16:39 +00:00
Nick O'Leary
9c350311e8 Fix reauthentication of remote repositories 2017-12-21 17:40:24 +00:00
Hideki Nakamura
3c6ba72a2a Change z-index property of "notification" to a larger than z-index property of "dialog" (#1528) 2017-12-21 08:20:41 +00:00
Nick O'Leary
816442f5f0 Update sshey UI to use common list style 2017-12-20 23:45:17 +00:00
Nick O'Leary
3b51d18ce7 Change default user filename prefix for sshkeys 2017-12-20 16:08:57 +00:00
Simon Hailes
6696b6661a When creating 'redserver' for a node, use runtime.server rather than runtime.adminApi.server, and fill runtime.server at startup with the valid http server regardless of adminApi being available.
This resolves websockets not working when the adminApi (httpAdminRoot) is disabled in settings.
2017-12-20 16:04:32 +00:00
Nick O'Leary
8c87478636 Merge sshkeys 2017-12-20 15:12:10 +00:00
Nick O'Leary
d870b072d7 Tidy up branch/remote list in projectSettings 2017-12-20 14:37:34 +00:00
Hideki Nakamura
2ea2af7d2a Use a fixed string instead of os.hostname() 2017-12-20 19:44:57 +09:00
Dave Conway-Jones
f737ea96f3 Don't send message if it doesn't exist. and give it time not to exist.
to close #1527
2017-12-19 17:54:26 +00:00
Nick O'Leary
05f90394db Flag misconfigured project credentialSecret 2017-12-19 14:00:58 +00:00
Hideki Nakamura
c24b0c6bb4 Change "generateSSHKey" function signature 2017-12-19 22:57:40 +09:00
Hideki Nakamura
e07a4dc7ba Change the implementation of visible check 2017-12-19 22:30:42 +09:00
Kazuki Nakanishi
fc6748a46b [UI test] Split test script into scenario and browser operation (#1516) 2017-12-19 11:11:51 +00:00
Kazuki Nakanishi
7697c46652 Fixed name conflict of icon property for dashboard node (#1524) 2017-12-19 11:11:10 +00:00
Hideki Nakamura
ed52e5afd1 Avoid reformatting package.json 2017-12-19 10:32:05 +09:00
Nick O'Leary
33a5b84181 Add first-run dialog to migrate files to project 2017-12-19 00:56:02 +00:00
Hideki Nakamura
c09a407f4c Delete unnecessary comments & add trace mock function 2017-12-18 21:37:09 +09:00
Hideki Nakamura
d35784ec61 Delete unnecessary comment & Add a logic of the error case 2017-12-18 20:46:07 +09:00
Hideki Nakamura
53e012f296 Add delete SSH Key dialog 2017-12-18 00:53:03 +09:00
Hideki Nakamura
2a9d0a5e7d Merge branch 'projects' into sshkey-management 2017-12-17 23:54:44 +09:00
Nick O'Leary
474f4572f2 Fix conditional initialisation of projects 2017-12-16 23:43:08 +00:00
Hideki Nakamura
bf57cb209f Delete unnecessary logs 2017-12-16 00:46:05 +09:00
Hideki Nakamura
9bc41c1709 Merge branch "projects" 2017-12-16 00:33:08 +09:00
Hideki Nakamura
fe10b8650f Add Git access feature via SSH and Enhance SSH Key management 2017-12-16 00:07:47 +09:00
Hideki Nakamura
3a311c9584 Detect a SSH key generation error 2017-12-15 23:48:52 +09:00
Hideki Nakamura
d1106f53e0 Pass email data into the SSH Key generation API 2017-12-15 21:41:14 +09:00
Nick O'Leary
a3a1bba5ef Add projects editorTheme flag to disable the feature 2017-12-13 09:44:48 +00:00
Nick O'Leary
028d66befc Add suitable message when not displaying binary files 2017-12-11 17:05:27 +00:00
Nick O'Leary
bb59cd5742 Allow unstaged files to be reverted 2017-12-11 17:05:12 +00:00
Nick O'Leary
604e3068b2 Add full-screen shade that covers everything but notfications 2017-12-10 22:35:57 +00:00
Nick O'Leary
27f1d3b704 Add delete local branch option 2017-12-08 16:31:42 +00:00
Nick O'Leary
d007623347 Return more detailed information on /project/branches api 2017-12-07 22:24:57 +00:00
Hideki Nakamura
6a5cf7a1fa Merge branch 'projects' into sshkey-management 2017-12-07 23:29:58 +09:00
Hideki Nakamura
3adfe249b0 Support to delete project feature (#1509)
* First commit to support to delete projects

* Add delete project menu & Implement delete project API

* Correspond to the PR feedback
2017-12-07 14:28:26 +00:00
Hideki Nakamura
923893e160 Add SSH key management API 2017-12-07 23:11:24 +09:00
Dave Conway-Jones
256e5360d4 ensure core node labels are italic when named (#1498) 2017-12-06 22:47:13 +00:00
Nick O'Leary
304c597a2f Store repo credentials per-user 2017-12-06 22:39:30 +00:00
Nick O'Leary
f86d3a69d2 Fix merge-abort button 2017-12-06 22:39:20 +00:00
Hiroyasu Nishiyama
d7c8adfd82 Fix handling of too many pending messages in SORT node (#1514)
* initial support of SORT node

minor fix of sort node

fixed error message of sort node

fixed error handling of SORT node

add test case for SORT node

make limit of messages count computed once in SORT node

* update type in message & info description

* fix handling of pending messages in SORT node
2017-12-06 19:44:46 +00:00
Hideki Nakamura
55cd069043 Fix the error that "otherwise is not a function" (#1513) 2017-12-06 13:20:38 +00:00
Hideki Nakamura
3ca0e9c420 Fix the property "users" access error in runtime.start test caces (#1511) 2017-12-06 13:20:22 +00:00
Hideki Nakamura
1dd4323613 Fix the errors in credentials test cases (#1512) 2017-12-06 13:19:07 +00:00
Hideki Nakamura
d78916f85f Fix the error occuring during permission check (#1510) 2017-12-06 13:18:36 +00:00
Nick O'Leary
1840d15397 Restructure how editor/git settings are saved in userSettings 2017-12-05 23:50:32 +00:00
Dave Conway-Jones
b98d1216b1 ignore _msgid when merging full objects
to hand code and close #1423
2017-12-05 21:45:43 +00:00
Dave Conway-Jones
27db727321 Let CSV correct parts if we remove header row.
and add test
2017-12-05 17:34:49 +00:00
Nick O'Leary
3f6b1f6ccb Fix loading of userSettings
Closes #1505
2017-12-05 16:23:55 +00:00
Hideki Nakamura
6d633b372a Add git config UI (#1506)
* Add Git config tab

* Get usersetting data via admin HTTP API

* Delete git committer edit form in Project Settings tab

* Corresponding to the PR feedback
2017-12-05 16:14:20 +00:00
Nick O'Leary
91352e855a Handle overwrite warning on local branch change 2017-12-05 16:12:07 +00:00
Qi Xiu
8bb9b594cf Add Chinese translation of jsonata.json (#1504) 2017-12-05 15:58:11 +00:00
Hiroyasu Nishiyama
6d2fd2e641 add parts support for CSV node (#1496)
* add parts support for CSV node

* make CSV node to preserve incoming parts property
2017-12-05 15:39:51 +00:00
Dave Conway-Jones
422fbcb0b7 add error msg to sort node 2017-12-05 15:01:58 +00:00
Hiroyasu Nishiyama
afce106186 initial support of SORT node (#1500)
* initial support of SORT node

minor fix of sort node

fixed error message of sort node

fixed error handling of SORT node

add test case for SORT node

make limit of messages count computed once in SORT node

* update type in message & info description
2017-12-05 14:54:03 +00:00
Ross Cruickshank
f21c8154ed enable template config via msg.template for stored or generated templates (#1503)
* updates to 80-template to allow setting template with msg.template

* updated 80-template_spec test for msg.template support

* fixed 80-template.js test
2017-12-05 12:24:06 +00:00
Dave Conway-Jones
3988a648d6 Merge branch 'master' into 0.18 2017-12-05 12:22:20 +00:00
Nick O'Leary
1b632894d3 Save editor settings in /settings/user 2017-12-05 10:20:13 +00:00
Nick O'Leary
5e128f89f6 Ensure strategy login button uses relative URL
Fixes #1481
2017-12-04 21:13:07 +00:00
Nick O'Leary
fff0b15ae5 Add /settings/user end point 2017-12-04 17:15:17 +00:00
Nick O'Leary
a7e14f1093 Handle a local branch that does not yet track a remote 2017-12-04 13:26:47 +00:00
Nick O'Leary
94eeaeb8d3 Allow committer details to be set per-user 2017-12-04 11:42:44 +00:00
Nick O'Leary
64191e8303 Merge master to 0.18 2017-12-03 22:32:28 +00:00
Nick O'Leary
21cfb71617 Add modal notification type with buttons 2017-12-03 22:26:17 +00:00
Hiroyasu Nishiyama
806457063f add parts support for HTML node (#1495)
* add parts support for HTML node

* add parts.{type,ch} to output of HTML node
2017-12-01 13:09:05 +00:00
Kazuki Nakanishi
b9213b73bd first step of ui test (#1497) 2017-12-01 10:50:59 +00:00
Hiroyasu Nishiyama
d7f0102aa2 add test for WATCH node (#1493) 2017-11-30 13:48:52 +00:00
Nathanaël Lécaudé
f09e61a59a Added parsed YAML support for template node (#1443) 2017-11-30 13:38:50 +00:00
Mike Blackstock
d426aaa88a add —unsafe-perm option to npm install to match documentation (#1486) 2017-11-30 13:38:22 +00:00
tilleul
19e45389e1 Updated regex so custom width using calc() work (#1487)
So far, for typedInput "<input type=text>" fields, only custom styles like "width:100%" or "width:75px" worked. Proposed change allows to use calc() as well like in "width:calc(100% - 120px)"
2017-11-30 13:38:03 +00:00
Kazuki Nakanishi
6d2389945b allow a node's icon to be set dynamically (#1490)
* create a proto type

* Fixed some problems after reviewing
2017-11-30 13:13:35 +00:00
Nick O'Leary
14c48253f6 Confirm actions that would overwrite dirty workspace 2017-11-24 23:12:35 +00:00
Nick O'Leary
e5ff25b92d Fix project pull with authentication 2017-11-23 20:52:15 +00:00
Nick O'Leary
5c88888e02 Better auth handling in projects 2017-11-23 00:27:13 +00:00
Nick O'Leary
10057de9b3 A big projects update
Includes:

 - change local/remote branches
 - basic support for username/password handling
2017-11-21 23:31:41 +00:00
Dave Conway-Jones
cc88ebd2b9 Let trigger node support per topic mode (#1398)
* Let trigger node support per topic mode

* ensure trigger node clones repeating message

* Add some tests for trigger by topic

* test trigger repeat for pass by ref error

* trigger test - add missing try/catch to all test with callback

* boost trigger node test coverage
2017-11-17 17:35:18 +00:00
Jim Turner
6baedf909d Fix #1478 - Project files are not being flushed to disk after being written (#1479)
* Call fsync() before closing file

* Fix race condition in tests due to incorrect stub.

The startFlows() function wasn't really being stubbed, so it was still being called. But there was no corresponding call to stopFlows().

In later tests, the check in Flows.init() was throwing the "Cannot init without a stop" error.

* Test coverage for fsync() calls

For issue #1478

* Revert "Fix race condition in tests due to incorrect stub."

This reverts commit 4f71d7851b.

* Fix race condition in tests due to incorrect stub.

The startFlows() function wasn't really being stubbed, so it was still being called. But there was no corresponding call to stopFlows().

In later tests, the check in Flows.init() was throwing the "Cannot init without a stop" error.

* Fix intermittent test failure in Exec node.

Occasionally, the error text on stderr will come in more than one piece. The test only worked correctly if a single message was received.
2017-11-17 17:29:33 +00:00
Dave Conway-Jones
f39d9d6f1b clone messages before delayed send (#1474)
and accept floats for delay interval.
2017-11-17 17:27:29 +00:00
Kazuhito Yokoi
ab61a95f83 Add test cases for change node (#1476) 2017-11-17 17:26:36 +00:00
Thiago Bustamante
10ceed30c6 Fix #1456
When importing new nodes, it is necessary to check the 'exclusive' flag
2017-11-03 11:34:41 -02:00
Dave Conway-Jones
2b9aa94f3a Add rc property to exec node outputs 1 and 2 (#1401)
* Add rc property to exec node outputs 1 and 2

to close #1399

* improve test coverage and add tests for new msg.rc

* make spawn test slightly more robust to different environments

* added debug for spawn test

* let spawn error test be even more relaxed

* don't necessarily clone msg.payload in exec node stderr

as per suggestion
2017-11-02 16:55:44 +00:00
Kazuki Nakanishi
848fb975ed Fix a problem of file append test on Windows (#1431)
* Fix a problem of file append test on Windows

* Skip the test case of file node that fails on Windows

* Remove close() call

* Fixed a recreated file test case on Windows
2017-11-02 16:51:40 +00:00
Hiroki Uchikawa
d7f59dac84 Make it possible to save formatting choices separately by the type of object (#1458) 2017-11-02 16:50:35 +00:00
Dave Conway-Jones
dd47e615ee Fix css template with spaces , and add test (#1462)
to close #1460
2017-11-02 16:50:13 +00:00
Hiroyasu Nishiyama
8f2f7ea1a5 Add test script for link node (#1463)
* fixed unmatched HTML tags

* add test for link node & red.js fix for it
2017-11-02 16:47:12 +00:00
Hiroyasu Nishiyama
80a8efd8ce Add test script for "tcp in" node (#1465)
* fixed unmatched HTML tags

* add test for "tcp in" node
2017-11-02 16:47:01 +00:00
Hiroyasu Nishiyama
d9dce77ef4 add test script for "udp in" node (#1466)
* add test script for "udp in" node

* use old socket.send API for Node4.X compatibility
2017-11-02 16:46:51 +00:00
Hiroyasu Nishiyama
ce7053a1fe add test script for "udp out" node (#1467) 2017-11-02 16:46:38 +00:00
Hiroyasu Nishiyama
0db1530171 add test script for "tcp request" node (#1468)
* add test script for "http request" node

* change let -> var
2017-11-02 16:46:26 +00:00
Nick O'Leary
3745504107 Keep version sidebar in sync with project 2017-10-25 15:36:41 +01:00
Nick O'Leary
57533fd831 Add commit-diff view 2017-10-25 15:26:24 +01:00
Kazuhito Yokoi
f57a0d4d6b Remove unused variables in test cases of change node (#1455)
* Remove unused variables in test cases of change node

* Empty commit to run test cases again

* Empty commit to run test cases again
2017-10-25 12:23:28 +02:00
Hiroki Uchikawa
22772ca33e Fix debug message format for Buffer (#1444)
and add a test case
2017-10-23 12:13:28 +02:00
jmikerq
dba6ff1d51 added chinese messages.json locale file (#1452)
* modified the wording in the chinese editor.json 

change the wording closer to their meanings in chinese

* added chinese messages.json
2017-10-23 11:55:26 +02:00
Qi Xiu
40146dedaf Add Chinese version of infotips.json (#1449) 2017-10-23 11:55:08 +02:00
jmikerq
387b822f53 clean up naming for chinese software naming convention (#1453) 2017-10-23 11:54:49 +02:00
Nick O'Leary
b9a3563e5b Handle 'No newline' message in text diffs 2017-10-20 21:29:43 +02:00
Nick O'Leary
3d6468326a Allow a project's flow file to be changed 2017-10-19 21:38:53 +01:00
Kazuhito Yokoi
298e37ec53 Fix problem in node pull-down menu (#1448) 2017-10-19 13:52:25 +01:00
Kazuhito Yokoi
5b137c457b Fix invalid from property error in change node (#1442)
* Fix invalid from property error in change node

* Empty commit to run test cases again
2017-10-17 22:17:27 +01:00
Nick O'Leary
5218a3fbac Add custom project.toJSON to simplify state mangement 2017-10-17 10:14:50 +01:00
Nick O'Leary
4569cb432d Add Project object in runtime 2017-10-16 23:23:50 +01:00
Kazuhito Yokoi
611e598756 Add test cases for function node (#1402)
* Add test cases for function node

* Remove test case for keys() in global context
2017-10-12 20:47:52 +01:00
Hiroki Uchikawa
937d79d28f Add test cases for debug node (#1438) 2017-10-12 20:47:13 +01:00
Hiroyasu Nishiyama
23c2a771d3 fixed unmatched HTML tags (#1437) 2017-10-11 13:31:37 +01:00
Dave Conway-Jones
58a890e836 completely remove unnecessary callback
to Fix #1436
2017-10-11 08:52:28 +01:00
Dave Conway-Jones
6a869e120c speed up debug window - only process required number of messages (#1378)
* speed up debug window - only process required number of messages

* tiny optimisation to debug utils stack handler

* remove unnecessary callback

(and rename function)
2017-10-10 21:53:25 +01:00
Dave Conway-Jones
ae7c298b1a let default apply if msg.delay not set in override mode. (#1397)
* let default apply if msg.delay not set in override mode.

* Update tests to match

* allow msg.delay to be 0 if wanted

and test for that
2017-10-10 21:40:09 +01:00
Hiroki Uchikawa
53bfe12ac1 Add test cases for switch node (#1426) 2017-10-10 21:37:34 +01:00
Henri Bouvier
140ea683a6 [fix] github oauth strategy when Root is not / (#1430) 2017-10-10 21:24:44 +01:00
Kazuhito Yokoi
0634a97598 Fix global.keys() bug in function node (#1417)
* Fix global.keys() bug in function node

* Filter set(), get() and keys() in global.keys() method
2017-10-10 21:13:38 +01:00
Kazuhito Yokoi
3479c794de Modify JSONata Expression editor to refer to language files (#1433) 2017-10-10 20:21:41 +01:00
Kazuhito Yokoi
89cad116f7 Update translation file for JSONata (jsonata.json) (#1432) 2017-10-10 20:21:19 +01:00
Nick O'Leary
19c84eb694 Add commit history view in sidebar 2017-10-09 23:37:19 +01:00
Nick O'Leary
eae390acf5 Disable view-diff button for deletes/unknown files 2017-10-09 12:10:00 +01:00
Nick O'Leary
10567afbb9 Add unified diff view to version control tab 2017-10-09 00:11:07 +01:00
Nick O'Leary
51bad3bf3c Add dual text-diff 2017-10-08 22:03:06 +01:00
Nick O'Leary
9134d8841d Update ISSUE_TEMPLATE.md 2017-10-08 14:04:35 +01:00
Nick O'Leary
e9a026c131 Add issue/pr templates 2017-10-08 14:02:05 +01:00
Nick O'Leary
9a2fd0e2b2 Add initial version control sidebar with commit function 2017-10-07 00:18:20 +01:00
Nick O'Leary
522f7e6844 Do not include creds when calculating flow revision hash 2017-09-28 22:34:21 +01:00
Hiroki Uchikawa
cb4f46decc Fix circular reference in join node (#1412)
and add a test case
2017-09-28 19:09:54 +01:00
Hiroki Uchikawa
81256279a8 Fix wrong argument in change node (#1415)
and add test cases
2017-09-28 10:06:31 +01:00
Dave Conway-Jones
039bd1ddc0 Auto hide empty palette categories (#1395)
to close #1382
2017-09-27 17:05:18 +01:00
Dave Conway-Jones
0791d4797f Update ACE to test and add python highlighter (#1373) 2017-09-27 17:04:01 +01:00
Nick O'Leary
6a06142e1e Allow credSecret to be managed via project settings 2017-09-26 22:51:08 +01:00
Kazuhito Yokoi
ef53dca062 Handle escape characters in template node which uses Mustache format and JSON output mode (#1377)
* Handle escape characters in template node which uses Mustache format and JSON output mode

* Handle escape characters in template node which uses Mustache format and JSON output mode
2017-09-21 13:38:45 +01:00
Richlv
6ce761edda Update settings.js (#1404)
fix typo in a comment
2017-09-21 13:37:34 +01:00
Nick O'Leary
d8fd218409 Allow project dependencies to be edited in dialog 2017-09-21 11:19:24 +01:00
Nick O'Leary
edc2310599 Move project sidebar to project settings dialog 2017-09-20 22:51:28 +01:00
Nick O'Leary
b1cd13d629 Initial projects implementation 2017-09-20 10:30:07 +01:00
btsimonh
b81940351f Allow port zero for Express (#1363)
* Allow uiPort to be 0 (i.e. distinguish from undefined).  When Express runs up, catch the real port number to settings.serverPort, and use that in getListenPath if set, else use uiPort.
2017-09-17 09:30:39 +01:00
Kazuki Nakanishi
a42e99c4aa Fix the appearance of 'is between' rule on switch node property (#1383) 2017-09-17 08:46:47 +01:00
HirokiUchikawa
ff40b521b7 Fix problem with multi-byte character (#1391) 2017-09-17 08:46:14 +01:00
Nick O'Leary
85392496e7 Allow setTimeout in Function node to be promisified in node 8 2017-09-12 15:13:13 +01:00
Jeston Tigchon
29cae9975e Upgrade JSONata to v1.3.0 (#1386) 2017-09-07 21:58:29 +01:00
Kosuke Akizuki
170d6b28f8 Change font family (#1357)
thanks  @k4zzk
2017-08-24 12:14:55 +01:00
Nick O'Leary
9a8b404054 Split localfilesystem storage plugin into component parts 2017-08-23 17:31:33 +01:00
Nick O'Leary
41af5187aa Reorganise red/api layout to better componentise 2017-08-22 22:26:29 +01:00
Simon Hailes
8dcc114873 MQTT node - if Server/URL config contains '//' use it as a complete url; enabled ws:// and wss:// 2017-04-12 18:31:49 +01:00
Ben Hardill
8cc9aeba4a Fix docs 2017-03-23 20:06:11 +00:00
Ben Hardill
ba0823c38c Add support for rejectUnauthorized msg property
This update lets you pass msg.rejectUnauthorized=false
to allow you to connect to https sites that don't have
certs signed by recognised CAs
2017-03-23 19:48:48 +00:00
1308 changed files with 159114 additions and 52933 deletions

1
.gitattributes vendored Normal file
View File

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

35
.github/ISSUE_TEMPLATE.md vendored Normal file
View File

@@ -0,0 +1,35 @@
<!--
## Before you hit that Submit button....
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.
## So you have a real issue to raise...
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:
- [ ] 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.

34
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View File

@@ -0,0 +1,34 @@
<!--
## Before you hit that Submit button....
Please read our [contribution guidelines](https://github.com/node-red/node-red/blob/master/CONTRIBUTING.md)
before submitting a pull-request.
## Types of changes
What types of changes does your code introduce?
Put an `x` in the boxes that apply
-->
- [ ] Bugfix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
<!--
If you want to raise a pull-request with a new feature, or a refactoring
of existing code, it **may well get rejected** if it hasn't been discussed on
the [forum](https://discourse.nodered.org) or
[slack team](https://nodered.org/slack) first.
-->
## Proposed changes
<!-- Describe the nature of this change. What problem does it address? -->
## Checklist
<!-- 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 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,21 +1,24 @@
sudo: false
language: node_js
env:
- CXX="g++-4.8"
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.8
- gcc-4.8
node_js:
- "8"
- "7"
- "6"
- "4"
script:
- istanbul cover ./node_modules/.bin/grunt --report lcovonly && istanbul report text && ( cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js || true ) && rm -rf coverage
before_script:
- npm install -g istanbul
- npm install coveralls
chrome: stable
language: node_js
matrix:
include:
- node_js: "16"
script:
- ./node_modules/.bin/grunt no-coverage
- 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 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

@@ -9,7 +9,7 @@ We welcome contributions, but request you follow these guidelines.
This project adheres to the [Contributor Covenant 1.4](http://contributor-covenant.org/version/1/4/).
By participating, you are expected to uphold this code. Please report unacceptable
behavior to any of the [project's core team](https://github.com/orgs/node-red/teams/core).
behavior to the project's core team at team@nodered.org.
## Raising issues
@@ -26,17 +26,17 @@ 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
For feature requests, please raise them on the [mailing list](https://groups.google.com/forum/#!forum/node-red).
For feature requests, please raise them on the [forum](https://discourse.nodered.org).
## Pull-Requests
If you want to raise a pull-request with a new feature, or a refactoring
of existing code, it may well get rejected if you haven't discussed it on
the [mailing list](https://groups.google.com/forum/#!forum/node-red) first.
the [forum](https://discourse.nodered.org) first.
All contributors need to sign the JS Foundation's Contributor License Agreement.
It is an online process and quick to do. You can read the details of the agreement

View File

@@ -15,17 +15,36 @@
**/
var path = require("path");
var fs = require("fs-extra");
var sass = require("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;
}
let packageFile = grunt.file.readJSON('package.json')
process.env.NODE_RED_PACKAGE_VERSION = packageFile.version;
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
pkg: packageFile,
paths: {
dist: ".dist"
},
@@ -37,20 +56,28 @@ 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"]}
},
mocha_istanbul: {
webdriver: {
all: {
configFile: 'test/editor/wdio.conf.js'
}
},
nyc: {
options: {
globals: ['expect'],
timeout: 3000,
ignoreLeaks: false,
ui: 'bdd',
reportFormats: ['lcov'],
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
},
coverage: { src: ['test/**/*_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: {
@@ -66,22 +93,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' ]
@@ -89,7 +114,7 @@ module.exports = function(grunt) {
},
editor: {
files: {
src: [ 'editor/js/**/*.js' ]
src: [ 'packages/node_modules/@node-red/editor-client/src/js/**/*.js' ]
}
},
tests: {
@@ -109,74 +134,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/sidebar.js",
"editor/js/ui/palette.js",
"editor/js/ui/tab-info.js",
"editor/js/ui/tab-config.js",
"editor/js/ui/palette-editor.js",
"editor/js/ui/editor.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/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"
]
}
}
@@ -184,63 +231,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: {
@@ -252,27 +296,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']
},
@@ -287,12 +331,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'
]
}
}
@@ -311,69 +356,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: {
@@ -381,20 +413,96 @@ module.exports = function(grunt) {
mode: '755'
},
release: {
// Target-specific file/dir lists and/or options go here.
src: [
path.resolve('<%= paths.dist %>/node-red-<%= pkg.version %>/nodes/core/hardware/nrgpio*')
"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 : {
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',
fred: "hi there"
}
},
_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: [
'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'
}
}
});
@@ -407,12 +515,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');
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;
@@ -454,6 +587,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 () {
@@ -462,33 +627,61 @@ module.exports = function(grunt) {
grunt.registerTask('default',
'Builds editor content then runs code style checks and unit tests on all components',
['build','test-core','test-editor','test-nodes']);
['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',
['jshint:core','simplemocha:core']);
['build','nyc:core']);
grunt.registerTask('test-editor',
'Runs code style check on editor code',
['jshint:editor']);
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',
['simplemocha: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']);
['build','nyc:all']);
grunt.registerTask('docs',
'Generates API documentation',
['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,19 +2,19 @@
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
Check out http://nodered.org/docs/getting-started/ for full instructions on getting
started.
1. `sudo npm install -g node-red`
1. `sudo npm install -g --unsafe-perm node-red`
2. `node-red`
3. Open <http://localhost:1880>
@@ -22,8 +22,7 @@ started.
More documentation can be found [here](http://nodered.org/docs).
For further help, or general discussion, please use the
[mailing list](https://groups.google.com/forum/#!forum/node-red).
For further help, or general discussion, please use the [Node-RED Forum](https://discourse.nodered.org) or [slack team](https://nodered.org/slack).
## Developers
@@ -45,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
@@ -56,11 +52,11 @@ Before raising a pull-request, please read our
This project adheres to the [Contributor Covenant 1.4](http://contributor-covenant.org/version/1/4/).
By participating, you are expected to uphold this code. Please report unacceptable
behavior to any of the [project's core team](https://github.com/orgs/node-red/teams/core).
behavior to any of the project's core team at team@nodered.org.
## 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/).
@@ -71,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: 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: 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: 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: 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,327 +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[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.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);
});
} 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];
}
}
})();

View File

@@ -1,86 +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.i18n = (function() {
return {
init: function(done) {
i18n.init({
resGetPath: 'locales/__ns__?lng=__lng__',
dynamicLoad: false,
load:'current',
ns: {
namespaces: ["editor","node-red","jsonata","infotips"],
defaultNs: "editor"
},
fallbackLng: ['en-US'],
useCookie: false
},function() {
done();
});
RED["_"] = function() {
return i18n.t.apply(null,arguments);
}
},
loadCatalog: function(namespace,done) {
var languageList = i18n.functions.toLanguages(i18n.detectLanguage());
var toLoad = languageList.length;
languageList.forEach(function(lang) {
$.ajax({
headers: {
"Accept":"application/json"
},
cache: false,
url: 'locales/'+namespace+'?lng='+lang,
success: function(data) {
i18n.addResourceBundle(lang,namespace,data);
toLoad--;
if (toLoad === 0) {
done();
}
}
});
})
},
loadNodeCatalogs: function(done) {
var languageList = i18n.functions.toLanguages(i18n.detectLanguage());
var toLoad = languageList.length;
languageList.forEach(function(lang) {
$.ajax({
headers: {
"Accept":"application/json"
},
cache: false,
url: 'locales/nodes?lng='+lang,
success: function(data) {
var namespaces = Object.keys(data);
namespaces.forEach(function(ns) {
i18n.addResourceBundle(lang,ns,data[ns]);
});
toLoad--;
if (toLoad === 0) {
done();
}
}
});
})
}
}
})();

View File

@@ -1,39 +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-e": "core:show-export-dialog",
"ctrl-i": "core:show-import-dialog",
"ctrl-space": "core:toggle-sidebar",
"ctrl-,": "core:show-user-settings"
},
"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"
}
}

View File

@@ -1,277 +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() {
function loadNodeList() {
$.ajax({
headers: {
"Accept":"application/json"
},
cache: false,
url: 'nodes',
success: function(data) {
RED.nodes.setNodeList(data);
RED.i18n.loadNodeCatalogs(loadNodes);
}
});
}
function loadNodes() {
$.ajax({
headers: {
"Accept":"text/html"
},
cache: false,
url: 'nodes',
success: function(data) {
$("body").append(data);
$("body").i18n();
$("#palette > .palette-spinner").hide();
$(".palette-scroll").removeClass("hide");
$("#palette-search").removeClass("hide");
loadFlows();
}
});
}
function loadFlows() {
$.ajax({
headers: {
"Accept":"application/json",
},
cache: false,
url: 'flows',
success: function(nodes) {
var currentHash = window.location.hash;
RED.nodes.version(nodes.rev);
RED.nodes.import(nodes.flows);
RED.nodes.dirty(false);
RED.view.redraw(true);
if (/^#flow\/.+$/.test(currentHash)) {
RED.workspaces.show(currentHash.substring(6));
}
var persistentNotifications = {};
RED.comms.subscribe("notification/#",function(topic,msg) {
var parts = topic.split("/");
var notificationId = parts[1];
if (notificationId === "runtime-deploy") {
// handled in ui/deploy.js
return;
}
if (notificationId === "node") {
// handled below
return;
}
if (msg.text) {
var text = RED._(msg.text,{default:msg.text});
if (!persistentNotifications.hasOwnProperty(notificationId)) {
persistentNotifications[notificationId] = RED.notify(text,msg.type,msg.timeout === undefined,msg.timeout);
} else {
persistentNotifications[notificationId].update(text,msg.timeout);
}
} else if (persistentNotifications.hasOwnProperty(notificationId)) {
persistentNotifications[notificationId].close();
delete persistentNotifications[notificationId];
}
});
RED.comms.subscribe("status/#",function(topic,msg) {
var parts = topic.split("/");
var node = RED.nodes.node(parts[1]);
if (node) {
if (msg.hasOwnProperty("text")) {
if (msg.text[0] !== ".") {
msg.text = node._(msg.text.toString(),{defaultValue:msg.text.toString()});
}
}
node.status = msg;
node.dirty = true;
RED.view.redraw();
}
});
RED.comms.subscribe("notification/node/#",function(topic,msg) {
var i,m;
var typeList;
var info;
if (topic == "notification/node/added") {
var addedTypes = [];
msg.forEach(function(m) {
var id = m.id;
RED.nodes.addNodeSet(m);
addedTypes = addedTypes.concat(m.types);
RED.i18n.loadCatalog(id, function() {
$.get('nodes/'+id, function(data) {
$("body").append(data);
});
});
});
if (addedTypes.length) {
typeList = "<ul><li>"+addedTypes.join("</li><li>")+"</li></ul>";
RED.notify(RED._("palette.event.nodeAdded", {count:addedTypes.length})+typeList,"success");
}
} else if (topic == "notification/node/removed") {
for (i=0;i<msg.length;i++) {
m = msg[i];
info = RED.nodes.removeNodeSet(m.id);
if (info.added) {
typeList = "<ul><li>"+m.types.join("</li><li>")+"</li></ul>";
RED.notify(RED._("palette.event.nodeRemoved", {count:m.types.length})+typeList,"success");
}
}
} else if (topic == "notification/node/enabled") {
if (msg.types) {
info = RED.nodes.getNodeSet(msg.id);
if (info.added) {
RED.nodes.enableNodeSet(msg.id);
typeList = "<ul><li>"+msg.types.join("</li><li>")+"</li></ul>";
RED.notify(RED._("palette.event.nodeEnabled", {count:msg.types.length})+typeList,"success");
} else {
$.get('nodes/'+msg.id, function(data) {
$("body").append(data);
typeList = "<ul><li>"+msg.types.join("</li><li>")+"</li></ul>";
RED.notify(RED._("palette.event.nodeAdded", {count:msg.types.length})+typeList,"success");
});
}
}
} else if (topic == "notification/node/disabled") {
if (msg.types) {
RED.nodes.disableNodeSet(msg.id);
typeList = "<ul><li>"+msg.types.join("</li><li>")+"</li></ul>";
RED.notify(RED._("palette.event.nodeDisabled", {count:msg.types.length})+typeList,"success");
}
} else if (topic == "node/upgraded") {
RED.notify(RED._("palette.event.nodeUpgraded", {module:msg.module,version:msg.version}),"success");
RED.nodes.registry.setModulePendingUpdated(msg.module,msg.version);
}
// Refresh flow library to ensure any examples are updated
RED.library.loadFlowLibrary();
});
}
});
}
function showAbout() {
$.get('red/about', function(data) {
var aboutHeader = '<div style="text-align:center;">'+
'<img width="50px" src="red/images/node-red-icon.svg" />'+
'</div>';
RED.sidebar.info.set(aboutHeader+marked(data));
RED.sidebar.info.show();
});
}
function loadEditor() {
var menuOptions = [];
menuOptions.push({id:"menu-item-view-menu",label:RED._("menu.label.view.view"),options:[
// {id:"menu-item-view-show-grid",setting:"view-show-grid",label:RED._("menu.label.view.showGrid"),toggle:true,onselect:"core:toggle-show-grid"},
// {id:"menu-item-view-snap-grid",setting:"view-snap-grid",label:RED._("menu.label.view.snapGrid"),toggle:true,onselect:"core:toggle-snap-grid"},
// {id:"menu-item-status",setting:"node-show-status",label:RED._("menu.label.displayStatus"),toggle:true,onselect:"core:toggle-status", selected: true},
//null,
// {id:"menu-item-bidi",label:RED._("menu.label.view.textDir"),options:[
// {id:"menu-item-bidi-default",toggle:"text-direction",label:RED._("menu.label.view.defaultDir"),selected: true, onselect:function(s) { if(s){RED.text.bidi.setTextDirection("")}}},
// {id:"menu-item-bidi-ltr",toggle:"text-direction",label:RED._("menu.label.view.ltr"), onselect:function(s) { if(s){RED.text.bidi.setTextDirection("ltr")}}},
// {id:"menu-item-bidi-rtl",toggle:"text-direction",label:RED._("menu.label.view.rtl"), onselect:function(s) { if(s){RED.text.bidi.setTextDirection("rtl")}}},
// {id:"menu-item-bidi-auto",toggle:"text-direction",label:RED._("menu.label.view.auto"), onselect:function(s) { if(s){RED.text.bidi.setTextDirection("auto")}}}
// ]},
// null,
{id:"menu-item-sidebar",label:RED._("menu.label.sidebar.show"),toggle:true,onselect:"core:toggle-sidebar", selected: true},
null
]});
menuOptions.push(null);
menuOptions.push({id:"menu-item-import",label:RED._("menu.label.import"),options:[
{id:"menu-item-import-clipboard",label:RED._("menu.label.clipboard"),onselect:"core:show-import-dialog"},
{id:"menu-item-import-library",label:RED._("menu.label.library"),options:[]}
]});
menuOptions.push({id:"menu-item-export",label:RED._("menu.label.export"),disabled:true,options:[
{id:"menu-item-export-clipboard",label:RED._("menu.label.clipboard"),disabled:true,onselect:"core:show-export-dialog"},
{id:"menu-item-export-library",label:RED._("menu.label.library"),disabled:true,onselect:"core:library-export"}
]});
menuOptions.push(null);
menuOptions.push({id:"menu-item-search",label:RED._("menu.label.search"),onselect:"core:search"});
menuOptions.push(null);
menuOptions.push({id:"menu-item-config-nodes",label:RED._("menu.label.displayConfig"),onselect:"core:show-config-tab"});
menuOptions.push({id:"menu-item-workspace",label:RED._("menu.label.flows"),options:[
{id:"menu-item-workspace-add",label:RED._("menu.label.add"),onselect:"core:add-flow"},
{id:"menu-item-workspace-edit",label:RED._("menu.label.rename"),onselect:"core:edit-flow"},
{id:"menu-item-workspace-delete",label:RED._("menu.label.delete"),onselect:"core:remove-flow"}
]});
menuOptions.push({id:"menu-item-subflow",label:RED._("menu.label.subflows"), options: [
{id:"menu-item-subflow-create",label:RED._("menu.label.createSubflow"),onselect:"core:create-subflow"},
{id:"menu-item-subflow-convert",label:RED._("menu.label.selectionToSubflow"),disabled:true,onselect:"core:convert-to-subflow"},
]});
menuOptions.push(null);
if (RED.settings.theme('palette.editable') !== false) {
menuOptions.push({id:"menu-item-edit-palette",label:RED._("menu.label.editPalette"),onselect:"core:manage-palette"});
menuOptions.push(null);
}
menuOptions.push({id:"menu-item-user-settings",label:RED._("menu.label.settings"),onselect:"core:show-user-settings"});
menuOptions.push(null);
menuOptions.push({id:"menu-item-keyboard-shortcuts",label:RED._("menu.label.keyboardShortcuts"),onselect:"core:show-help"});
menuOptions.push({id:"menu-item-help",
label: RED.settings.theme("menu.menu-item-help.label",RED._("menu.label.help")),
href: RED.settings.theme("menu.menu-item-help.url","http://nodered.org/docs")
});
menuOptions.push({id:"menu-item-node-red-version", label:"v"+RED.settings.version, onselect: "core:show-about" });
RED.view.init();
RED.userSettings.init();
RED.user.init();
RED.library.init();
RED.keyboard.init();
RED.palette.init();
if (RED.settings.theme('palette.editable') !== false) {
RED.palette.editor.init();
}
RED.sidebar.init();
RED.subflow.init();
RED.workspaces.init();
RED.clipboard.init();
RED.search.init();
RED.editor.init();
RED.diff.init();
RED.menu.init({id:"btn-sidemenu",options: menuOptions});
RED.deploy.init(RED.settings.theme("deployButton",null));
RED.actions.add("core:show-about", showAbout);
RED.nodes.init();
RED.comms.connect();
$("#main-container").show();
$(".header-toolbar").show();
loadNodeList();
}
$(function() {
if ((window.location.hostname !== "localhost") && (window.location.hostname !== "127.0.0.1")) {
document.title = document.title+" : "+window.location.hostname;
}
ace.require("ace/ext/language_tools");
RED.i18n.init(function() {
RED.settings.init(loadEditor);
})
});
})();

File diff suppressed because it is too large Load Diff

View File

@@ -1,380 +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.__encoded__ && value.hasOwnProperty('data') && value.hasOwnProperty('length')) {
truncated = value.data.length !== value.length;
return value.data;
}
}
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.events.on("view:selection-changed",function(selection) {
if (!selection.nodes) {
RED.menu.setDisabled("menu-item-export",true);
RED.menu.setDisabled("menu-item-export-clipboard",true);
RED.menu.setDisabled("menu-item-export-library",true);
} else {
RED.menu.setDisabled("menu-item-export",false);
RED.menu.setDisabled("menu-item-export-clipboard",false);
RED.menu.setDisabled("menu-item-export-library",false);
}
});
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,135 +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
},
"small": {
top: 5,
leftRight: 8,
leftLeft: 16
}
}
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 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() {
if (active) {
div = $('<div class="red-ui-popover red-ui-popover-'+direction+'"></div>').appendTo("body");
if (size !== "default") {
div.addClass("red-ui-popover-size-"+size);
}
if (typeof content === 'function') {
content.call(res).appendTo(div);
} else {
div.html(content);
}
if (width !== "auto") {
div.width(width);
}
var targetPos = target.offset();
var targetWidth = target.width();
var targetHeight = target.height();
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});
}
div.fadeIn("fast");
}
}
var closePopup = function() {
if (!active) {
if (div) {
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();
}
});
}
var res = {
setContent: function(_content) {
content = _content;
},
open: function () {
active = true;
openPopup();
},
close: function () {
active = false;
closePopup();
}
}
return res;
}
return {
create: createPopover
}
})();

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,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.tabs = (function() {
function createTabs(options) {
var tabs = {};
var currentTabWidth;
var currentActiveTabWidth = 0;
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();});
}
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");
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 = (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;
}
}
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 (options.onremove) {
options.onremove(tabs[id]);
}
delete tabs[id];
updateTabWidths();
}
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);
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);
}
var span = $('<span/>',{class:"bidiAware"}).text(tab.label).appendTo(link);
span.attr('dir', RED.text.bidi.resolveBaseTextDir(tab.label));
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);
});
}
updateTabWidths();
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'));
}
})
}
},
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,472 +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 allOptions = {
msg: {value:"msg",label:"msg.",validate:RED.utils.validatePropertyExpression},
flow: {value:"flow",label:"flow.",validate:RED.utils.validatePropertyExpression},
global: {value:"global",label:"global.",validate:RED.utils.validatePropertyExpression},
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);
}
})
}
}
};
var nlsd = false;
$.widget( "nodered.typedInput", {
_create: function() {
if (!nlsd && RED && RED._) {
for (var i in allOptions) {
if (allOptions.hasOwnProperty(i)) {
allOptions[i].label = RED._("typedInput.type."+i,{defaultValue:allOptions[i].label});
}
}
}
nlsd = true;
var that = this;
this.disarmClick = false;
this.element.addClass('red-ui-typedInput');
this.uiWidth = this.element.outerWidth();
this.elementDiv = this.element.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*(\d+(%|px))/i.exec(attrStyle)) !== null) {
this.element.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.element.css("margin"+d,0);
});
this.uiSelect.addClass("red-ui-typedInput-container");
this.options.types = this.options.types||Object.keys(allOptions);
this.selectTrigger = $('<button tabindex="0"></button>').prependTo(this.uiSelect);
$('<i class="fa fa-sort-desc"></i>').appendTo(this.selectTrigger);
this.selectLabel = $('<span></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.element.on('focus', function() {
that.uiSelect.addClass('red-ui-typedInput-focus');
});
this.element.on('blur', function() {
that.uiSelect.removeClass('red-ui-typedInput-focus');
});
this.element.on('change', function() {
that.validate();
})
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="fa fa-sort-desc"></i></span></button>').appendTo(this.uiSelect);
this.optionSelectLabel = $('<span class="red-ui-typedInput-option-label"></span>').prependTo(this.optionSelectTrigger);
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="fa fa-ellipsis-h"></i></button>').appendTo(this.uiSelect);
this.type(this.options.default||this.typeList[0].value);
},
_showTypeMenu: function() {
if (this.typeList.length > 1) {
this._showMenu(this.menu,this.selectTrigger);
this.menu.find("[value='"+this.propertyType+"']").focus();
} else {
this.element.focus();
}
},
_showOptionSelectMenu: function() {
if (this.optionMenu) {
this.optionMenu.css({
minWidth:this.optionSelectLabel.width()
});
this._showMenu(this.optionMenu,this.optionSelectLabel);
var selectedOption = this.optionMenu.find("[value='"+this.value()+"']");
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.element.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) {
$('<img>',{src:opt.icon,style:"margin-right: 4px; height: 18px;"}).prependTo(op);
} else {
op.css({paddingLeft: "18px"});
}
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);
}
if (this.typeMap[this.propertyType] && this.typeMap[this.propertyType].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');
}
if (this.optionSelectTrigger) {
this.optionSelectTrigger.css({'left':(labelWidth)+"px",'width':'calc( 100% - '+labelWidth+'px )'});
}
}
},
_destroy: function() {
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);
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);
}
},
width: function(desiredWidth) {
this.uiWidth = desiredWidth;
this._resize();
},
value: function(value) {
if (!arguments.length) {
return this.element.val();
} else {
if (this.typeMap[this.propertyType].options) {
if (this.typeMap[this.propertyType].options.indexOf(value) === -1) {
value = "";
}
this.optionSelectLabel.text(value);
}
this.element.val(value);
this.element.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;
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();
this.elementDiv.hide();
this.optionMenu = this._createMenu(opt.options,function(v){
that.optionSelectLabel.text(v);
that.value(v);
});
var currentVal = this.element.val();
if (opt.options.indexOf(currentVal) !== -1) {
this.optionSelectLabel.text(currentVal);
} else {
this.value(opt.options[0]);
}
}
} else {
if (this.optionMenu) {
this.optionMenu.remove();
this.optionMenu = null;
}
if (this.optionSelectTrigger) {
this.optionSelectTrigger.hide();
}
if (opt.hasValue === false) {
this.oldValue = this.element.val();
this.element.val("");
this.elementDiv.hide();
} else {
if (this.oldValue !== undefined) {
this.element.val(this.oldValue);
delete this.oldValue;
}
this.elementDiv.show();
}
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.element.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,442 +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.deploy = (function() {
var deploymentTypes = {
"full":{img:"red/images/deploy-full-o.png"},
"nodes":{img:"red/images/deploy-nodes-o.png"},
"flows":{img:"red/images/deploy-flows-o.png"}
}
var ignoreDeployWarnings = {
unknown: false,
unusedConfig: false,
invalid: false
}
var deploymentType = "full";
var deployInflight = false;
var currentDiff = null;
function changeDeploymentType(type) {
deploymentType = type;
$("#btn-deploy-icon").attr("src",deploymentTypes[type].img);
}
/**
* options:
* type: "default" - Button with drop-down options - no further customisation available
* type: "simple" - Button without dropdown. Customisations:
* label: the text to display - default: "Deploy"
* icon : the icon to use. Null removes the icon. default: "red/images/deploy-full-o.png"
*/
function init(options) {
options = options || {};
var type = options.type || "default";
if (type == "default") {
$('<li><span class="deploy-button-group button-group">'+
'<a id="btn-deploy" class="deploy-button disabled" href="#">'+
'<span class="deploy-button-content">'+
'<img id="btn-deploy-icon" src="red/images/deploy-full-o.png"> '+
'<span>'+RED._("deploy.deploy")+'</span>'+
'</span>'+
'<span class="deploy-button-spinner hide">'+
'<img src="red/images/spin.svg"/>'+
'</span>'+
'</a>'+
'<a id="btn-deploy-options" data-toggle="dropdown" class="deploy-button" href="#"><i class="fa fa-caret-down"></i></a>'+
'</span></li>').prependTo(".header-toolbar");
RED.menu.init({id:"btn-deploy-options",
options: [
{id:"deploymenu-item-full",toggle:"deploy-type",icon:"red/images/deploy-full.png",label:RED._("deploy.full"),sublabel:RED._("deploy.fullDesc"),selected: true, onselect:function(s) { if(s){changeDeploymentType("full")}}},
{id:"deploymenu-item-flow",toggle:"deploy-type",icon:"red/images/deploy-flows.png",label:RED._("deploy.modifiedFlows"),sublabel:RED._("deploy.modifiedFlowsDesc"), onselect:function(s) {if(s){changeDeploymentType("flows")}}},
{id:"deploymenu-item-node",toggle:"deploy-type",icon:"red/images/deploy-nodes.png",label:RED._("deploy.modifiedNodes"),sublabel:RED._("deploy.modifiedNodesDesc"),onselect:function(s) { if(s){changeDeploymentType("nodes")}}}
]
});
} else if (type == "simple") {
var label = options.label || RED._("deploy.deploy");
var icon = 'red/images/deploy-full-o.png';
if (options.hasOwnProperty('icon')) {
icon = options.icon;
}
$('<li><span class="deploy-button-group button-group">'+
'<a id="btn-deploy" class="deploy-button disabled" href="#">'+
'<span class="deploy-button-content">'+
(icon?'<img id="btn-deploy-icon" src="'+icon+'"> ':'')+
'<span>'+label+'</span>'+
'</span>'+
'<span class="deploy-button-spinner hide">'+
'<img src="red/images/spin.svg"/>'+
'</span>'+
'</a>'+
'</span></li>').prependTo(".header-toolbar");
}
$('#btn-deploy').click(function(event) {
event.preventDefault();
save();
});
RED.actions.add("core:deploy-flows",save);
$( "#node-dialog-confirm-deploy" ).dialog({
title: RED._('deploy.confirm.button.confirm'),
modal: true,
autoOpen: false,
width: 550,
height: "auto",
buttons: [
{
text: RED._("common.label.cancel"),
click: function() {
$( this ).dialog( "close" );
}
},
{
id: "node-dialog-confirm-deploy-review",
text: RED._("deploy.confirm.button.review"),
class: "primary disabled",
click: function() {
if (!$("#node-dialog-confirm-deploy-review").hasClass('disabled')) {
RED.diff.showRemoteDiff();
$( this ).dialog( "close" );
}
}
},
{
id: "node-dialog-confirm-deploy-merge",
text: RED._("deploy.confirm.button.merge"),
class: "primary disabled",
click: function() {
RED.diff.mergeDiff(currentDiff);
$( this ).dialog( "close" );
}
},
{
id: "node-dialog-confirm-deploy-deploy",
text: RED._("deploy.confirm.button.confirm"),
class: "primary",
click: function() {
var ignoreChecked = $( "#node-dialog-confirm-deploy-hide" ).prop("checked");
if (ignoreChecked) {
ignoreDeployWarnings[$( "#node-dialog-confirm-deploy-type" ).val()] = true;
}
save(true,/conflict/.test($("#node-dialog-confirm-deploy-type" ).val()));
$( this ).dialog( "close" );
}
},
{
id: "node-dialog-confirm-deploy-overwrite",
text: RED._("deploy.confirm.button.overwrite"),
class: "primary",
click: function() {
save(true,/conflict/.test($("#node-dialog-confirm-deploy-type" ).val()));
$( this ).dialog( "close" );
}
}
],
create: function() {
$("#node-dialog-confirm-deploy").parent().find("div.ui-dialog-buttonpane")
.prepend('<div style="height:0; vertical-align: middle; display:inline-block; margin-top: 13px; float:left;">'+
'<input style="vertical-align:top;" type="checkbox" id="node-dialog-confirm-deploy-hide"> '+
'<label style="display:inline;" for="node-dialog-confirm-deploy-hide" data-i18n="deploy.confirm.doNotWarn"></label>'+
'<input type="hidden" id="node-dialog-confirm-deploy-type">'+
'</div>');
},
open: function() {
var deployType = $("#node-dialog-confirm-deploy-type" ).val();
if (/conflict/.test(deployType)) {
$( "#node-dialog-confirm-deploy" ).dialog('option','title', RED._('deploy.confirm.button.review'));
$("#node-dialog-confirm-deploy-deploy").hide();
$("#node-dialog-confirm-deploy-review").addClass('disabled').show();
$("#node-dialog-confirm-deploy-merge").addClass('disabled').show();
$("#node-dialog-confirm-deploy-overwrite").toggle(deployType === "deploy-conflict");
currentDiff = null;
$("#node-dialog-confirm-deploy-conflict-checking").show();
$("#node-dialog-confirm-deploy-conflict-auto-merge").hide();
$("#node-dialog-confirm-deploy-conflict-manual-merge").hide();
var now = Date.now();
RED.diff.getRemoteDiff(function(diff) {
var ellapsed = Math.max(1000 - (Date.now()-now), 0);
currentDiff = diff;
setTimeout(function() {
$("#node-dialog-confirm-deploy-conflict-checking").hide();
var d = Object.keys(diff.conflicts);
if (d.length === 0) {
$("#node-dialog-confirm-deploy-conflict-auto-merge").show();
$("#node-dialog-confirm-deploy-merge").removeClass('disabled')
} else {
$("#node-dialog-confirm-deploy-conflict-manual-merge").show();
}
$("#node-dialog-confirm-deploy-review").removeClass('disabled')
},ellapsed);
})
$("#node-dialog-confirm-deploy-hide").parent().hide();
} else {
$( "#node-dialog-confirm-deploy" ).dialog('option','title', RED._('deploy.confirm.button.confirm'));
$("#node-dialog-confirm-deploy-deploy").show();
$("#node-dialog-confirm-deploy-overwrite").hide();
$("#node-dialog-confirm-deploy-review").hide();
$("#node-dialog-confirm-deploy-merge").hide();
$("#node-dialog-confirm-deploy-hide").parent().show();
}
}
});
RED.events.on('nodes:change',function(state) {
if (state.dirty) {
window.onbeforeunload = function() {
return RED._("deploy.confirm.undeployedChanges");
}
$("#btn-deploy").removeClass("disabled");
} else {
window.onbeforeunload = null;
$("#btn-deploy").addClass("disabled");
}
});
var activeNotifyMessage;
RED.comms.subscribe("notification/runtime-deploy",function(topic,msg) {
if (!activeNotifyMessage) {
var currentRev = RED.nodes.version();
if (currentRev === null || deployInflight || currentRev === msg.revision) {
return;
}
var message = $('<div>'+RED._('deploy.confirm.backgroundUpdate')+
'<br><br><div class="ui-dialog-buttonset">'+
'<button>'+RED._('deploy.confirm.button.ignore')+'</button>'+
'<button class="primary">'+RED._('deploy.confirm.button.review')+'</button>'+
'</div></div>');
$(message.find('button')[0]).click(function(evt) {
evt.preventDefault();
activeNotifyMessage.close();
activeNotifyMessage = null;
})
$(message.find('button')[1]).click(function(evt) {
evt.preventDefault();
activeNotifyMessage.close();
var nns = RED.nodes.createCompleteNodeSet();
resolveConflict(nns,false);
activeNotifyMessage = null;
})
activeNotifyMessage = RED.notify(message,null,true);
}
});
}
function getNodeInfo(node) {
var tabLabel = "";
if (node.z) {
var tab = RED.nodes.workspace(node.z);
if (!tab) {
tab = RED.nodes.subflow(node.z);
tabLabel = tab.name;
} else {
tabLabel = tab.label;
}
}
var label = RED.utils.getNodeLabel(node,node.id);
return {tab:tabLabel,type:node.type,label:label};
}
function sortNodeInfo(A,B) {
if (A.tab < B.tab) { return -1;}
if (A.tab > B.tab) { return 1;}
if (A.type < B.type) { return -1;}
if (A.type > B.type) { return 1;}
if (A.name < B.name) { return -1;}
if (A.name > B.name) { return 1;}
return 0;
}
function resolveConflict(currentNodes, activeDeploy) {
$( "#node-dialog-confirm-deploy-config" ).hide();
$( "#node-dialog-confirm-deploy-unknown" ).hide();
$( "#node-dialog-confirm-deploy-unused" ).hide();
$( "#node-dialog-confirm-deploy-conflict" ).show();
$( "#node-dialog-confirm-deploy-type" ).val(activeDeploy?"deploy-conflict":"background-conflict");
$( "#node-dialog-confirm-deploy" ).dialog( "open" );
}
function save(skipValidation,force) {
if (!$("#btn-deploy").hasClass("disabled")) {
if (!skipValidation) {
var hasUnknown = false;
var hasInvalid = false;
var hasUnusedConfig = false;
var unknownNodes = [];
var invalidNodes = [];
RED.nodes.eachNode(function(node) {
hasInvalid = hasInvalid || !node.valid;
if (!node.valid) {
invalidNodes.push(getNodeInfo(node));
}
if (node.type === "unknown") {
if (unknownNodes.indexOf(node.name) == -1) {
unknownNodes.push(node.name);
}
}
});
hasUnknown = unknownNodes.length > 0;
var unusedConfigNodes = [];
RED.nodes.eachConfig(function(node) {
if (node.users.length === 0 && (node._def.hasUsers !== false)) {
unusedConfigNodes.push(getNodeInfo(node));
hasUnusedConfig = true;
}
});
$( "#node-dialog-confirm-deploy-config" ).hide();
$( "#node-dialog-confirm-deploy-unknown" ).hide();
$( "#node-dialog-confirm-deploy-unused" ).hide();
$( "#node-dialog-confirm-deploy-conflict" ).hide();
var showWarning = false;
if (hasUnknown && !ignoreDeployWarnings.unknown) {
showWarning = true;
$( "#node-dialog-confirm-deploy-type" ).val("unknown");
$( "#node-dialog-confirm-deploy-unknown" ).show();
$( "#node-dialog-confirm-deploy-unknown-list" )
.html("<li>"+unknownNodes.join("</li><li>")+"</li>");
} else if (hasInvalid && !ignoreDeployWarnings.invalid) {
showWarning = true;
$( "#node-dialog-confirm-deploy-type" ).val("invalid");
$( "#node-dialog-confirm-deploy-config" ).show();
invalidNodes.sort(sortNodeInfo);
$( "#node-dialog-confirm-deploy-invalid-list" )
.html("<li>"+invalidNodes.map(function(A) { return (A.tab?"["+A.tab+"] ":"")+A.label+" ("+A.type+")"}).join("</li><li>")+"</li>");
} else if (hasUnusedConfig && !ignoreDeployWarnings.unusedConfig) {
// showWarning = true;
// $( "#node-dialog-confirm-deploy-type" ).val("unusedConfig");
// $( "#node-dialog-confirm-deploy-unused" ).show();
//
// unusedConfigNodes.sort(sortNodeInfo);
// $( "#node-dialog-confirm-deploy-unused-list" )
// .html("<li>"+unusedConfigNodes.map(function(A) { return (A.tab?"["+A.tab+"] ":"")+A.label+" ("+A.type+")"}).join("</li><li>")+"</li>");
}
if (showWarning) {
$( "#node-dialog-confirm-deploy-hide" ).prop("checked",false);
$( "#node-dialog-confirm-deploy" ).dialog( "open" );
return;
}
}
var nns = RED.nodes.createCompleteNodeSet();
var startTime = Date.now();
$(".deploy-button-content").css('opacity',0);
$(".deploy-button-spinner").show();
$("#btn-deploy").addClass("disabled");
var data = {flows:nns};
if (!force) {
data.rev = RED.nodes.version();
}
deployInflight = true;
$("#header-shade").show();
$("#editor-shade").show();
$("#palette-shade").show();
$("#sidebar-shade").show();
$.ajax({
url:"flows",
type: "POST",
data: JSON.stringify(data),
contentType: "application/json; charset=utf-8",
headers: {
"Node-RED-Deployment-Type":deploymentType
}
}).done(function(data,textStatus,xhr) {
RED.nodes.dirty(false);
RED.nodes.version(data.rev);
RED.nodes.originalFlow(nns);
if (hasUnusedConfig) {
RED.notify(
'<p>'+RED._("deploy.successfulDeploy")+'</p>'+
'<p>'+RED._("deploy.unusedConfigNodes")+' <a href="#" onclick="RED.sidebar.config.show(true); return false;">'+RED._("deploy.unusedConfigNodesLink")+'</a></p>',"success",false,6000);
} else {
RED.notify(RED._("deploy.successfulDeploy"),"success");
}
RED.nodes.eachNode(function(node) {
if (node.changed) {
node.dirty = true;
node.changed = false;
}
if (node.moved) {
node.dirty = true;
node.moved = false;
}
if(node.credentials) {
delete node.credentials;
}
});
RED.nodes.eachConfig(function (confNode) {
confNode.changed = false;
if (confNode.credentials) {
delete confNode.credentials;
}
});
RED.nodes.eachWorkspace(function(ws) {
ws.changed = false;
})
// Once deployed, cannot undo back to a clean state
RED.history.markAllDirty();
RED.view.redraw();
RED.events.emit("deploy");
}).fail(function(xhr,textStatus,err) {
RED.nodes.dirty(true);
$("#btn-deploy").removeClass("disabled");
if (xhr.status === 401) {
RED.notify(RED._("deploy.deployFailed",{message:RED._("user.notAuthorized")}),"error");
} else if (xhr.status === 409) {
resolveConflict(nns, true);
} else if (xhr.responseText) {
RED.notify(RED._("deploy.deployFailed",{message:xhr.responseText}),"error");
} else {
RED.notify(RED._("deploy.deployFailed",{message:RED._("deploy.errors.noResponse")}),"error");
}
}).always(function() {
deployInflight = false;
var delta = Math.max(0,300-(Date.now()-startTime));
setTimeout(function() {
$(".deploy-button-content").css('opacity',1);
$(".deploy-button-spinner").hide();
$("#header-shade").hide();
$("#editor-shade").hide();
$("#palette-shade").hide();
$("#sidebar-shade").hide();
},delta);
});
}
}
return {
init: init
}
})();

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,493 +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;
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(/^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;
// 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;
}
$('#node-input-name').css("width","66%").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 = $("#node-input-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];
$("#node-input-"+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 = $("#node-input-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] = $("#node-input-"+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() {
RED.actions.add("core:library-export",exportFlow);
RED.events.on("view:selection-changed",function(selection) {
if (!selection.nodes) {
RED.menu.setDisabled("menu-item-export",true);
RED.menu.setDisabled("menu-item-export-clipboard",true);
RED.menu.setDisabled("menu-item-export-library",true);
} else {
RED.menu.setDisabled("menu-item-export",false);
RED.menu.setDisabled("menu-item-export-clipboard",false);
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,87 +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.notify = (function() {
var currentNotifications = [];
var c = 0;
return function(msg,type,fixed,timeout) {
if (currentNotifications.length > 4) {
var ll = currentNotifications.length;
for (var i = 0;ll > 4 && i<currentNotifications.length;i+=1) {
var notifiction = currentNotifications[i];
if (!notifiction.fixed) {
window.clearTimeout(notifiction.timeoutid);
notifiction.close();
ll -= 1;
}
}
}
var n = document.createElement("div");
n.id="red-notification-"+c;
n.className = "notification";
n.fixed = fixed;
if (type) {
n.className = "notification notification-"+type;
}
n.style.display = "none";
if (typeof msg === "string") {
n.innerHTML = msg;
} else {
$(n).append(msg);
}
$("#notifications").append(n);
$(n).slideDown(300);
n.close = (function() {
var nn = n;
return function() {
currentNotifications.splice(currentNotifications.indexOf(nn),1);
$(nn).slideUp(300, function() {
nn.parentNode.removeChild(nn);
});
};
})();
n.update = (function() {
var nn = n;
return function(msg,timeout) {
if (typeof msg === "string") {
nn.innerHTML = msg;
} else {
$(nn).empty().append(msg);
}
if (timeout !== undefined && timeout > 0) {
window.clearTimeout(nn.timeoutid);
nn.timeoutid = window.setTimeout(nn.close,timeout);
} else {
window.clearTimeout(nn.timeoutid);
}
}
})();
if (!fixed) {
$(n).click((function() {
var nn = n;
return function() {
nn.close();
window.clearTimeout(nn.timeoutid);
};
})());
n.timeoutid = window.setTimeout(n.close,timeout||3000);
}
currentNotifications.push(n);
c+=1;
return n;
}
})();

View File

@@ -1,956 +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.editor = (function() {
var disabled = false;
var editorTabs;
var filterInput;
var searchInput;
var nodeList;
var packageList;
var loadedList = [];
var filteredList = [];
var loadedIndex = {};
var typesInUse = {};
var nodeEntries = {};
var eventTimers = {};
var activeFilter = "";
function semVerCompare(A,B) {
var aParts = A.split(".").map(function(m) { return parseInt(m);});
var bParts = B.split(".").map(function(m) { return parseInt(m);});
for (var i=0;i<3;i++) {
var j = aParts[i]-bParts[i];
if (j<0) { return -1 }
if (j>0) { return 1 }
}
return 0;
}
function delayCallback(start,callback) {
var delta = Date.now() - start;
if (delta < 300) {
delta = 300;
} else {
delta = 0;
}
setTimeout(function() {
callback();
},delta);
}
function changeNodeState(id,state,shade,callback) {
shade.show();
var start = Date.now();
$.ajax({
url:"nodes/"+id,
type: "PUT",
data: JSON.stringify({
enabled: state
}),
contentType: "application/json; charset=utf-8"
}).done(function(data,textStatus,xhr) {
delayCallback(start,function() {
shade.hide();
callback();
});
}).fail(function(xhr,textStatus,err) {
delayCallback(start,function() {
shade.hide();
callback(xhr);
});
})
}
function installNodeModule(id,version,shade,callback) {
var requestBody = {
module: id
};
if (callback === undefined) {
callback = shade;
shade = version;
} else {
requestBody.version = version;
}
shade.show();
$.ajax({
url:"nodes",
type: "POST",
data: JSON.stringify(requestBody),
contentType: "application/json; charset=utf-8"
}).done(function(data,textStatus,xhr) {
shade.hide();
callback();
}).fail(function(xhr,textStatus,err) {
shade.hide();
callback(xhr);
});
}
function removeNodeModule(id,callback) {
$.ajax({
url:"nodes/"+id,
type: "DELETE"
}).done(function(data,textStatus,xhr) {
callback();
}).fail(function(xhr,textStatus,err) {
callback(xhr);
})
}
function refreshNodeModuleList() {
for (var id in nodeEntries) {
if (nodeEntries.hasOwnProperty(id)) {
_refreshNodeModule(id);
}
}
}
function refreshNodeModule(module) {
if (!eventTimers.hasOwnProperty(module)) {
eventTimers[module] = setTimeout(function() {
delete eventTimers[module];
_refreshNodeModule(module);
},100);
}
}
function getContrastingBorder(rgbColor){
var parts = /^rgba?\(\s*(\d+),\s*(\d+),\s*(\d+)[,)]/.exec(rgbColor);
if (parts) {
var r = parseInt(parts[1]);
var g = parseInt(parts[2]);
var b = parseInt(parts[3]);
var yiq = ((r*299)+(g*587)+(b*114))/1000;
if (yiq > 160) {
r = Math.floor(r*0.8);
g = Math.floor(g*0.8);
b = Math.floor(b*0.8);
return "rgb("+r+","+g+","+b+")";
}
}
return rgbColor;
}
function formatUpdatedAt(dateString) {
var now = new Date();
var d = new Date(dateString);
var delta = (Date.now() - new Date(dateString).getTime())/1000;
if (delta < 60) {
return RED._('palette.editor.times.seconds');
}
delta = Math.floor(delta/60);
if (delta < 10) {
return RED._('palette.editor.times.minutes');
}
if (delta < 60) {
return RED._('palette.editor.times.minutesV',{count:delta});
}
delta = Math.floor(delta/60);
if (delta < 24) {
return RED._('palette.editor.times.hoursV',{count:delta});
}
delta = Math.floor(delta/24);
if (delta < 7) {
return RED._('palette.editor.times.daysV',{count:delta})
}
var weeks = Math.floor(delta/7);
var days = delta%7;
if (weeks < 4) {
return RED._('palette.editor.times.weeksV',{count:weeks})
}
var months = Math.floor(weeks/4);
weeks = weeks%4;
if (months < 12) {
return RED._('palette.editor.times.monthsV',{count:months})
}
var years = Math.floor(months/12);
months = months%12;
if (months === 0) {
return RED._('palette.editor.times.yearsV',{count:years})
} else {
return RED._('palette.editor.times.year'+(years>1?'s':'')+'MonthsV',{y:years,count:months})
}
}
function _refreshNodeModule(module) {
if (!nodeEntries.hasOwnProperty(module)) {
nodeEntries[module] = {info:RED.nodes.registry.getModule(module)};
var index = [module];
for (var s in nodeEntries[module].info.sets) {
if (nodeEntries[module].info.sets.hasOwnProperty(s)) {
index.push(s);
index = index.concat(nodeEntries[module].info.sets[s].types)
}
}
nodeEntries[module].index = index.join(",").toLowerCase();
nodeList.editableList('addItem', nodeEntries[module]);
} else {
var moduleInfo = nodeEntries[module].info;
var nodeEntry = nodeEntries[module].elements;
if (nodeEntry) {
var activeTypeCount = 0;
var typeCount = 0;
nodeEntries[module].totalUseCount = 0;
nodeEntries[module].setUseCount = {};
for (var setName in moduleInfo.sets) {
if (moduleInfo.sets.hasOwnProperty(setName)) {
var inUseCount = 0;
var set = moduleInfo.sets[setName];
var setElements = nodeEntry.sets[setName];
if (set.enabled) {
activeTypeCount += set.types.length;
}
typeCount += set.types.length;
for (var i=0;i<moduleInfo.sets[setName].types.length;i++) {
var t = moduleInfo.sets[setName].types[i];
inUseCount += (typesInUse[t]||0);
var swatch = setElements.swatches[t];
if (set.enabled) {
var def = RED.nodes.getType(t);
if (def && def.color) {
swatch.css({background:def.color});
swatch.css({border: "1px solid "+getContrastingBorder(swatch.css('backgroundColor'))})
} else {
swatch.css({background:"#eee",border:"1px dashed #999"})
}
} else {
swatch.css({background:"#eee",border:"1px dashed #999"})
}
}
nodeEntries[module].setUseCount[setName] = inUseCount;
nodeEntries[module].totalUseCount += inUseCount;
if (inUseCount > 0) {
setElements.enableButton.html(RED._('palette.editor.inuse'));
setElements.enableButton.addClass('disabled');
} else {
setElements.enableButton.removeClass('disabled');
if (set.enabled) {
setElements.enableButton.html(RED._('palette.editor.disable'));
} else {
setElements.enableButton.html(RED._('palette.editor.enable'));
}
}
setElements.setRow.toggleClass("palette-module-set-disabled",!set.enabled);
}
}
var nodeCount = (activeTypeCount === typeCount)?typeCount:activeTypeCount+" / "+typeCount;
nodeEntry.setCount.html(RED._('palette.editor.nodeCount',{count:typeCount,label:nodeCount}));
if (nodeEntries[module].totalUseCount > 0) {
nodeEntry.enableButton.html(RED._('palette.editor.inuse'));
nodeEntry.enableButton.addClass('disabled');
nodeEntry.removeButton.hide();
} else {
nodeEntry.enableButton.removeClass('disabled');
if (moduleInfo.local) {
nodeEntry.removeButton.css('display', 'inline-block');
}
if (activeTypeCount === 0) {
nodeEntry.enableButton.html(RED._('palette.editor.enableall'));
} else {
nodeEntry.enableButton.html(RED._('palette.editor.disableall'));
}
nodeEntry.container.toggleClass("disabled",(activeTypeCount === 0));
}
}
if (moduleInfo.pending_version) {
nodeEntry.versionSpan.html(moduleInfo.version+' <i class="fa fa-long-arrow-right"></i> '+moduleInfo.pending_version).appendTo(nodeEntry.metaRow)
nodeEntry.updateButton.html(RED._('palette.editor.updated')).addClass('disabled').show();
} else if (loadedIndex.hasOwnProperty(module)) {
if (semVerCompare(loadedIndex[module].version,moduleInfo.version) === 1) {
nodeEntry.updateButton.show();
nodeEntry.updateButton.html(RED._('palette.editor.update',{version:loadedIndex[module].version}));
} else {
nodeEntry.updateButton.hide();
}
} else {
nodeEntry.updateButton.hide();
}
}
}
function filterChange(val) {
activeFilter = val.toLowerCase();
var visible = nodeList.editableList('filter');
var size = nodeList.editableList('length');
if (val === "") {
filterInput.searchBox('count');
} else {
filterInput.searchBox('count',visible+" / "+size);
}
}
var catalogueCount;
var catalogueLoadStatus = [];
var catalogueLoadStart;
var catalogueLoadErrors = false;
var activeSort = sortModulesAZ;
function handleCatalogResponse(err,catalog,index,v) {
catalogueLoadStatus.push(err||v);
if (!err) {
if (v.modules) {
v.modules.forEach(function(m) {
loadedIndex[m.id] = m;
m.index = [m.id];
if (m.keywords) {
m.index = m.index.concat(m.keywords);
}
if (m.updated_at) {
m.timestamp = new Date(m.updated_at).getTime();
} else {
m.timestamp = 0;
}
m.index = m.index.join(",").toLowerCase();
})
loadedList = loadedList.concat(v.modules);
}
searchInput.searchBox('count',loadedList.length);
} else {
catalogueLoadErrors = true;
}
if (catalogueCount > 1) {
$(".palette-module-shade-status").html(RED._('palette.editor.loading')+"<br>"+catalogueLoadStatus.length+"/"+catalogueCount);
}
if (catalogueLoadStatus.length === catalogueCount) {
if (catalogueLoadErrors) {
RED.notify(RED._('palette.editor.errors.catalogLoadFailed',{url: catalog}),"error",false,8000);
}
var delta = 250-(Date.now() - catalogueLoadStart);
setTimeout(function() {
$("#palette-module-install-shade").hide();
},Math.max(delta,0));
}
}
function initInstallTab() {
if (loadedList.length === 0) {
loadedList = [];
loadedIndex = {};
packageList.editableList('empty');
$(".palette-module-shade-status").html(RED._('palette.editor.loading'));
var catalogues = RED.settings.theme('palette.catalogues')||['https://catalogue.nodered.org/catalogue.json'];
catalogueLoadStatus = [];
catalogueLoadErrors = false;
catalogueCount = catalogues.length;
if (catalogues.length > 1) {
$(".palette-module-shade-status").html(RED._('palette.editor.loading')+"<br>0/"+catalogues.length);
}
$("#palette-module-install-shade").show();
catalogueLoadStart = Date.now();
var handled = 0;
catalogues.forEach(function(catalog,index) {
$.getJSON(catalog, {_: new Date().getTime()},function(v) {
handleCatalogResponse(null,catalog,index,v);
refreshNodeModuleList();
}).fail(function(jqxhr, textStatus, error) {
handleCatalogResponse(jqxhr,catalog,index);
}).always(function() {
handled++;
if (handled === catalogueCount) {
searchInput.searchBox('change');
}
})
});
}
}
function refreshFilteredItems() {
packageList.editableList('empty');
var currentFilter = searchInput.searchBox('value').trim();
if (currentFilter === ""){
packageList.editableList('addItem',{count:loadedList.length})
return;
}
filteredList.sort(activeSort);
for (var i=0;i<Math.min(10,filteredList.length);i++) {
packageList.editableList('addItem',filteredList[i]);
}
if (filteredList.length === 0) {
packageList.editableList('addItem',{});
}
if (filteredList.length > 10) {
packageList.editableList('addItem',{start:10,more:filteredList.length-10})
}
}
function sortModulesAZ(A,B) {
return A.info.id.localeCompare(B.info.id);
}
function sortModulesRecent(A,B) {
return -1 * (A.info.timestamp-B.info.timestamp);
}
function init() {
if (RED.settings.theme('palette.editable') === false) {
return;
}
createSettingsPane();
RED.userSettings.add({
id:'palette',
title: RED._("palette.editor.palette"),
get: getSettingsPane,
close: function() {
settingsPane.detach();
},
focus: function() {
editorTabs.resize();
setTimeout(function() {
filterInput.focus();
},200);
}
})
RED.actions.add("core:manage-palette",function() {
RED.userSettings.show('palette');
});
RED.events.on('registry:module-updated', function(ns) {
refreshNodeModule(ns.module);
});
RED.events.on('registry:node-set-enabled', function(ns) {
refreshNodeModule(ns.module);
});
RED.events.on('registry:node-set-disabled', function(ns) {
refreshNodeModule(ns.module);
});
RED.events.on('registry:node-type-added', function(nodeType) {
if (!/^subflow:/.test(nodeType)) {
var ns = RED.nodes.registry.getNodeSetForType(nodeType);
refreshNodeModule(ns.module);
}
});
RED.events.on('registry:node-type-removed', function(nodeType) {
if (!/^subflow:/.test(nodeType)) {
var ns = RED.nodes.registry.getNodeSetForType(nodeType);
refreshNodeModule(ns.module);
}
});
RED.events.on('registry:node-set-added', function(ns) {
refreshNodeModule(ns.module);
for (var i=0;i<filteredList.length;i++) {
if (filteredList[i].info.id === ns.module) {
var installButton = filteredList[i].elements.installButton;
installButton.addClass('disabled');
installButton.html(RED._('palette.editor.installed'));
break;
}
}
});
RED.events.on('registry:node-set-removed', function(ns) {
var module = RED.nodes.registry.getModule(ns.module);
if (!module) {
var entry = nodeEntries[ns.module];
if (entry) {
nodeList.editableList('removeItem', entry);
delete nodeEntries[ns.module];
for (var i=0;i<filteredList.length;i++) {
if (filteredList[i].info.id === ns.module) {
var installButton = filteredList[i].elements.installButton;
installButton.removeClass('disabled');
installButton.html(RED._('palette.editor.install'));
break;
}
}
}
}
});
RED.events.on('nodes:add', function(n) {
if (!/^subflow:/.test(n.type)) {
typesInUse[n.type] = (typesInUse[n.type]||0)+1;
if (typesInUse[n.type] === 1) {
var ns = RED.nodes.registry.getNodeSetForType(n.type);
refreshNodeModule(ns.module);
}
}
})
RED.events.on('nodes:remove', function(n) {
if (typesInUse.hasOwnProperty(n.type)) {
typesInUse[n.type]--;
if (typesInUse[n.type] === 0) {
delete typesInUse[n.type];
var ns = RED.nodes.registry.getNodeSetForType(n.type);
refreshNodeModule(ns.module);
}
}
})
}
var settingsPane;
function getSettingsPane() {
initInstallTab();
editorTabs.activateTab('nodes');
return settingsPane;
}
function createSettingsPane() {
settingsPane = $('<div id="user-settings-tab-palette"></div>');
var content = $('<div id="palette-editor">'+
'<ul id="palette-editor-tabs"></ul>'+
'</div>').appendTo(settingsPane);
editorTabs = RED.tabs.create({
element: settingsPane.find('#palette-editor-tabs'),
onchange:function(tab) {
content.find(".palette-editor-tab").hide();
tab.content.show();
if (filterInput) {
filterInput.searchBox('value',"");
}
if (searchInput) {
searchInput.searchBox('value',"");
}
if (tab.id === 'install') {
if (searchInput) {
searchInput.focus();
}
} else {
if (filterInput) {
filterInput.focus();
}
}
},
minimumActiveTabWidth: 110
});
var modulesTab = $('<div>',{class:"palette-editor-tab"}).appendTo(content);
editorTabs.addTab({
id: 'nodes',
label: RED._('palette.editor.tab-nodes'),
content: modulesTab
})
var filterDiv = $('<div>',{class:"palette-search"}).appendTo(modulesTab);
filterInput = $('<input type="text" data-i18n="[placeholder]palette.filter"></input>')
.appendTo(filterDiv)
.searchBox({
delay: 200,
change: function() {
filterChange($(this).val());
}
});
nodeList = $('<ol>',{id:"palette-module-list", style:"position: absolute;top: 35px;bottom: 0;left: 0;right: 0px;"}).appendTo(modulesTab).editableList({
addButton: false,
scrollOnAdd: false,
sort: function(A,B) {
return A.info.name.localeCompare(B.info.name);
},
filter: function(data) {
if (activeFilter === "" ) {
return true;
}
return (activeFilter==="")||(data.index.indexOf(activeFilter) > -1);
},
addItem: function(container,i,object) {
var entry = object.info;
if (entry) {
var headerRow = $('<div>',{class:"palette-module-header"}).appendTo(container);
var titleRow = $('<div class="palette-module-meta palette-module-name"><i class="fa fa-cube"></i></div>').appendTo(headerRow);
$('<span>').html(entry.name).appendTo(titleRow);
var metaRow = $('<div class="palette-module-meta palette-module-version"><i class="fa fa-tag"></i></div>').appendTo(headerRow);
var versionSpan = $('<span>').html(entry.version).appendTo(metaRow);
var buttonRow = $('<div>',{class:"palette-module-meta"}).appendTo(headerRow);
var setButton = $('<a href="#" class="editor-button editor-button-small palette-module-set-button"><i class="fa fa-angle-right palette-module-node-chevron"></i> </a>').appendTo(buttonRow);
var setCount = $('<span>').appendTo(setButton);
var buttonGroup = $('<div>',{class:"palette-module-button-group"}).appendTo(buttonRow);
var updateButton = $('<a href="#" class="editor-button editor-button-small"></a>').html(RED._('palette.editor.update')).appendTo(buttonGroup);
updateButton.attr('id','up_'+Math.floor(Math.random()*1000000000));
updateButton.click(function(evt) {
evt.preventDefault();
if ($(this).hasClass('disabled')) {
return;
}
$("#palette-module-install-confirm").data('module',entry.name);
$("#palette-module-install-confirm").data('version',loadedIndex[entry.name].version);
$("#palette-module-install-confirm").data('shade',shade);
$("#palette-module-install-confirm-body").html(entry.local?
RED._("palette.editor.confirm.update.body"):
RED._("palette.editor.confirm.cannotUpdate.body")
);
$(".palette-module-install-confirm-button-install").hide();
$(".palette-module-install-confirm-button-remove").hide();
if (entry.local) {
$(".palette-module-install-confirm-button-update").show();
} else {
$(".palette-module-install-confirm-button-update").hide();
}
$("#palette-module-install-confirm")
.dialog('option', 'title',RED._("palette.editor.confirm.update.title"))
.dialog('open');
})
var removeButton = $('<a href="#" class="editor-button editor-button-small"></a>').html(RED._('palette.editor.remove')).appendTo(buttonGroup);
removeButton.attr('id','up_'+Math.floor(Math.random()*1000000000));
removeButton.click(function(evt) {
evt.preventDefault();
$("#palette-module-install-confirm").data('module',entry.name);
$("#palette-module-install-confirm").data('shade',shade);
$("#palette-module-install-confirm-body").html(RED._("palette.editor.confirm.remove.body"));
$(".palette-module-install-confirm-button-install").hide();
$(".palette-module-install-confirm-button-remove").show();
$(".palette-module-install-confirm-button-update").hide();
$("#palette-module-install-confirm")
.dialog('option', 'title', RED._("palette.editor.confirm.remove.title"))
.dialog('open');
})
if (!entry.local) {
removeButton.hide();
}
var enableButton = $('<a href="#" class="editor-button editor-button-small"></a>').html(RED._('palette.editor.disableall')).appendTo(buttonGroup);
var contentRow = $('<div>',{class:"palette-module-content"}).appendTo(container);
var shade = $('<div class="palette-module-shade hide"><img src="red/images/spin.svg" class="palette-spinner"/></div>').appendTo(container);
object.elements = {
updateButton: updateButton,
removeButton: removeButton,
enableButton: enableButton,
setCount: setCount,
container: container,
shade: shade,
versionSpan: versionSpan,
sets: {}
}
setButton.click(function(evt) {
evt.preventDefault();
if (container.hasClass('expanded')) {
container.removeClass('expanded');
contentRow.slideUp();
} else {
container.addClass('expanded');
contentRow.slideDown();
}
})
var setList = Object.keys(entry.sets)
setList.sort(function(A,B) {
return A.toLowerCase().localeCompare(B.toLowerCase());
});
setList.forEach(function(setName) {
var set = entry.sets[setName];
var setRow = $('<div>',{class:"palette-module-set"}).appendTo(contentRow);
var buttonGroup = $('<div>',{class:"palette-module-set-button-group"}).appendTo(setRow);
var typeSwatches = {};
set.types.forEach(function(t) {
var typeDiv = $('<div>',{class:"palette-module-type"}).appendTo(setRow);
typeSwatches[t] = $('<span>',{class:"palette-module-type-swatch"}).appendTo(typeDiv);
$('<span>',{class:"palette-module-type-node"}).html(t).appendTo(typeDiv);
})
var enableButton = $('<a href="#" class="editor-button editor-button-small"></a>').appendTo(buttonGroup);
enableButton.click(function(evt) {
evt.preventDefault();
if (object.setUseCount[setName] === 0) {
var currentSet = RED.nodes.registry.getNodeSet(set.id);
shade.show();
var newState = !currentSet.enabled
changeNodeState(set.id,newState,shade,function(xhr){
if (xhr) {
if (xhr.responseJSON) {
RED.notify(RED._('palette.editor.errors.'+(newState?'enable':'disable')+'Failed',{module: id,message:xhr.responseJSON.message}));
}
}
});
}
})
object.elements.sets[set.name] = {
setRow: setRow,
enableButton: enableButton,
swatches: typeSwatches
};
});
enableButton.click(function(evt) {
evt.preventDefault();
if (object.totalUseCount === 0) {
changeNodeState(entry.name,(container.hasClass('disabled')),shade,function(xhr){
if (xhr) {
if (xhr.responseJSON) {
RED.notify(RED._('palette.editor.errors.installFailed',{module: id,message:xhr.responseJSON.message}));
}
}
});
}
})
refreshNodeModule(entry.name);
} else {
$('<div>',{class:"red-ui-search-empty"}).html(RED._('search.empty')).appendTo(container);
}
}
});
var installTab = $('<div>',{class:"palette-editor-tab hide"}).appendTo(content);
editorTabs.addTab({
id: 'install',
label: RED._('palette.editor.tab-install'),
content: installTab
})
var toolBar = $('<div>',{class:"palette-editor-toolbar"}).appendTo(installTab);
var searchDiv = $('<div>',{class:"palette-search"}).appendTo(installTab);
searchInput = $('<input type="text" data-i18n="[placeholder]palette.search"></input>')
.appendTo(searchDiv)
.searchBox({
delay: 300,
change: function() {
var searchTerm = $(this).val().trim().toLowerCase();
if (searchTerm.length > 0) {
filteredList = loadedList.filter(function(m) {
return (m.index.indexOf(searchTerm) > -1);
}).map(function(f) { return {info:f}});
refreshFilteredItems();
searchInput.searchBox('count',filteredList.length+" / "+loadedList.length);
} else {
searchInput.searchBox('count',loadedList.length);
packageList.editableList('empty');
packageList.editableList('addItem',{count:loadedList.length});
}
}
});
$('<span>').html(RED._("palette.editor.sort")+' ').appendTo(toolBar);
var sortGroup = $('<span class="button-group"></span>').appendTo(toolBar);
var sortAZ = $('<a href="#" class="sidebar-header-button-toggle selected" data-i18n="palette.editor.sortAZ"></a>').appendTo(sortGroup);
var sortRecent = $('<a href="#" class="sidebar-header-button-toggle" data-i18n="palette.editor.sortRecent"></a>').appendTo(sortGroup);
sortAZ.click(function(e) {
e.preventDefault();
if ($(this).hasClass("selected")) {
return;
}
$(this).addClass("selected");
sortRecent.removeClass("selected");
activeSort = sortModulesAZ;
refreshFilteredItems();
});
sortRecent.click(function(e) {
e.preventDefault();
if ($(this).hasClass("selected")) {
return;
}
$(this).addClass("selected");
sortAZ.removeClass("selected");
activeSort = sortModulesRecent;
refreshFilteredItems();
});
var refreshSpan = $('<span>').appendTo(toolBar);
var refreshButton = $('<a href="#" class="sidebar-header-button"><i class="fa fa-refresh"></i></a>').appendTo(refreshSpan);
refreshButton.click(function(e) {
e.preventDefault();
loadedList = [];
loadedIndex = {};
initInstallTab();
})
packageList = $('<ol>',{style:"position: absolute;top: 78px;bottom: 0;left: 0;right: 0px;"}).appendTo(installTab).editableList({
addButton: false,
scrollOnAdd: false,
addItem: function(container,i,object) {
if (object.count) {
$('<div>',{class:"red-ui-search-empty"}).html(RED._('palette.editor.moduleCount',{count:object.count})).appendTo(container);
return
}
if (object.more) {
container.addClass('palette-module-more');
var moreRow = $('<div>',{class:"palette-module-header palette-module"}).appendTo(container);
var moreLink = $('<a href="#"></a>').html(RED._('palette.editor.more',{count:object.more})).appendTo(moreRow);
moreLink.click(function(e) {
e.preventDefault();
packageList.editableList('removeItem',object);
for (var i=object.start;i<Math.min(object.start+10,object.start+object.more);i++) {
packageList.editableList('addItem',filteredList[i]);
}
if (object.more > 10) {
packageList.editableList('addItem',{start:object.start+10, more:object.more-10})
}
})
return;
}
if (object.info) {
var entry = object.info;
var headerRow = $('<div>',{class:"palette-module-header"}).appendTo(container);
var titleRow = $('<div class="palette-module-meta"><i class="fa fa-cube"></i></div>').appendTo(headerRow);
$('<span>',{class:"palette-module-name"}).html(entry.name||entry.id).appendTo(titleRow);
$('<a target="_blank" class="palette-module-link"><i class="fa fa-external-link"></i></a>').attr('href',entry.url).appendTo(titleRow);
var descRow = $('<div class="palette-module-meta"></div>').appendTo(headerRow);
$('<div>',{class:"palette-module-description"}).html(entry.description).appendTo(descRow);
var metaRow = $('<div class="palette-module-meta"></div>').appendTo(headerRow);
$('<span class="palette-module-version"><i class="fa fa-tag"></i> '+entry.version+'</span>').appendTo(metaRow);
$('<span class="palette-module-updated"><i class="fa fa-calendar"></i> '+formatUpdatedAt(entry.updated_at)+'</span>').appendTo(metaRow);
var buttonRow = $('<div>',{class:"palette-module-meta"}).appendTo(headerRow);
var buttonGroup = $('<div>',{class:"palette-module-button-group"}).appendTo(buttonRow);
var shade = $('<div class="palette-module-shade hide"><img src="red/images/spin.svg" class="palette-spinner"/></div>').appendTo(container);
var installButton = $('<a href="#" class="editor-button editor-button-small"></a>').html(RED._('palette.editor.install')).appendTo(buttonGroup);
installButton.click(function(e) {
e.preventDefault();
if (!$(this).hasClass('disabled')) {
$("#palette-module-install-confirm").data('module',entry.id);
$("#palette-module-install-confirm").data('version',entry.version);
$("#palette-module-install-confirm").data('url',entry.url);
$("#palette-module-install-confirm").data('shade',shade);
$("#palette-module-install-confirm-body").html(RED._("palette.editor.confirm.install.body"));
$(".palette-module-install-confirm-button-install").show();
$(".palette-module-install-confirm-button-remove").hide();
$(".palette-module-install-confirm-button-update").hide();
$("#palette-module-install-confirm")
.dialog('option', 'title', RED._("palette.editor.confirm.install.title"))
.dialog('open');
}
})
if (nodeEntries.hasOwnProperty(entry.id)) {
installButton.addClass('disabled');
installButton.html(RED._('palette.editor.installed'));
}
object.elements = {
installButton:installButton
}
} else {
$('<div>',{class:"red-ui-search-empty"}).html(RED._('search.empty')).appendTo(container);
}
}
});
$('<div id="palette-module-install-shade" class="palette-module-shade hide"><div class="palette-module-shade-status"></div><img src="red/images/spin.svg" class="palette-spinner"/></div>').appendTo(installTab);
$('<div id="palette-module-install-confirm" class="hide"><form class="form-horizontal"><div id="palette-module-install-confirm-body" class="node-dialog-confirm-row"></div></form></div>').appendTo(document.body);
$("#palette-module-install-confirm").dialog({
title: RED._('palette.editor.confirm.title'),
modal: true,
autoOpen: false,
width: 550,
height: "auto",
buttons: [
{
text: RED._("common.label.cancel"),
click: function() {
$( this ).dialog( "close" );
}
},
{
text: RED._("palette.editor.confirm.button.review"),
class: "primary palette-module-install-confirm-button-install",
click: function() {
var url = $(this).data('url');
window.open(url);
}
},
{
text: RED._("palette.editor.confirm.button.install"),
class: "primary palette-module-install-confirm-button-install",
click: function() {
var id = $(this).data('module');
var version = $(this).data('version');
var shade = $(this).data('shade');
installNodeModule(id,version,shade,function(xhr) {
if (xhr) {
if (xhr.responseJSON) {
RED.notify(RED._('palette.editor.errors.installFailed',{module: id,message:xhr.responseJSON.message}));
}
}
});
$( this ).dialog( "close" );
}
},
{
text: RED._("palette.editor.confirm.button.remove"),
class: "primary palette-module-install-confirm-button-remove",
click: function() {
var id = $(this).data('module');
var shade = $(this).data('shade');
shade.show();
removeNodeModule(id, function(xhr) {
shade.hide();
if (xhr) {
if (xhr.responseJSON) {
RED.notify(RED._('palette.editor.errors.removeFailed',{module: id,message:xhr.responseJSON.message}));
}
}
})
$( this ).dialog( "close" );
}
},
{
text: RED._("palette.editor.confirm.button.update"),
class: "primary palette-module-install-confirm-button-update",
click: function() {
var id = $(this).data('module');
var version = $(this).data('version');
var shade = $(this).data('shade');
shade.show();
installNodeModule(id,version,shade,function(xhr) {
if (xhr) {
if (xhr.responseJSON) {
RED.notify(RED._('palette.editor.errors.updateFailed',{module: id,message:xhr.responseJSON.message}));
}
}
});
$( this ).dialog( "close" );
}
}
]
})
}
return {
init: init
}
})();

View File

@@ -1,479 +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 createCategoryContainer(category, label){
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");
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 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 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 = def.color;
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);
}
if ($("#palette-base-category-"+rootCategory).length === 0) {
if(coreCategories.indexOf(rootCategory) !== -1){
createCategoryContainer(rootCategory, RED._("node-red:palette.label."+rootCategory, {defaultValue:rootCategory}));
} else {
var ns = def.set.id;
createCategoryContainer(rootCategory, RED._(ns+":palette.label."+rootCategory, {defaultValue:rootCategory}));
}
}
$("#palette-container-"+rootCategory).show();
if ($("#palette-"+category).length === 0) {
$("#palette-base-category-"+rootCategory).append('<div id="palette-'+category+'"></div>');
}
$("#palette-"+category).append(d);
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||"");
} else {
helpText = $("script[data-help-name='"+d.type+"']").html()||"";
}
RED.sidebar.info.set(helpText);
});
var chart = $("#chart");
var chartOffset = chart.offset();
var chartSVG = $("#chart>svg").get(0);
var activeSpliceLink;
var mouseX;
var mouseY;
var spliceTimer;
$(d).draggable({
helper: 'clone',
appendTo: 'body',
revert: true,
revertDuration: 50,
containment:'#main-container',
start: function() {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+(ui.helper.width()/2) - chartOffset.left + chart.scrollLeft();
mouseY = ui.position.top+(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 (def.category == "subflows") {
$(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);
$("#palette_node_"+nodeTypeId).hide();
}
function showNodeType(nt) {
var nodeTypeId = escapeNodeType(nt);
$("#palette_node_"+nodeTypeId).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||""));
});
}
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.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.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.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, RED._("palette.label."+category,{defaultValue: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();
}
}
});
}
return {
init: init,
add:addNodeType,
remove:removeNodeType,
hide:hideNodeType,
show:showNodeType,
refresh:refreshNodeTypes
};
})();

View File

@@ -1,286 +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 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])) {
var v = n[properties[i]];
if (typeof v === 'string' || typeof v === 'number') {
v = (""+v).toLowerCase();
index[v] = index[v] || {};
index[v][n.id] = {node:n,label:l};
}
}
}
}
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"}).html(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 = def.color;
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"}).html(workspace).appendTo(contentDiv);
}
$('<div>',{class:"red-ui-search-result-node-label"}).html(object.label || node.id).appendTo(contentDiv);
$('<div>',{class:"red-ui-search-result-node-type"}).html(node.type).appendTo(contentDiv);
$('<div>',{class:"red-ui-search-result-node-id"}).html(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,228 +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: 110
});
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;
}
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"
});
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();
// 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,631 +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() {
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").html(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").html(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);
}
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,394 +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.node"),
collapsible: false
});
infoSection = sections.add({
title: RED._("sidebar.info.information"),
collapsible: false
});
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"),
content: content,
enableOnEdit: true
});
if (tips.enabled()) {
tips.start();
} else {
tips.stop();
}
}
function show() {
RED.sidebar.show("info");
}
function jsonFilter(key,value) {
if (key === "") {
return value;
}
var t = typeof value;
if ($.isArray(value)) {
return "[array:"+value.length+"]";
} else if (t === "object") {
return "[object]"
} else if (t === "string") {
if (value.length > 30) {
return value.substring(0,30)+" ...";
}
}
return value;
}
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) {
sections.show();
$(nodeSection.content).empty();
$(infoSection.content).empty();
var table = $('<table class="node-info"></table>');
var tableBody = $('<tbody>').appendTo(table);
var propRow;
var subflowNode;
if (node.type === "tab") {
nodeSection.title.html(RED._("sidebar.info.flow"));
propRow = $('<tr class="node-info-node-row"><td>'+RED._("sidebar.info.tabName")+'</td><td></td></tr>').appendTo(tableBody);
$(propRow.children()[1]).html('&nbsp;'+(node.label||""))
propRow = $('<tr class="node-info-node-row"><td>'+RED._("sidebar.info.id")+"</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.status")+'</td><td></td></tr>').appendTo(tableBody);
$(propRow.children()[1]).html((!!!node.disabled)?RED._("sidebar.info.enabled"):RED._("sidebar.info.disabled"))
} else {
nodeSection.title.html(RED._("sidebar.info.node"));
if (node.type !== "subflow" && node.name) {
$('<tr class="node-info-node-row"><td>'+RED._("common.label.name")+'</td><td>&nbsp;<span class="bidiAware" dir="'+RED.text.bidi.resolveBaseTextDir(node.name)+'">'+node.name+'</span></td></tr>').appendTo(tableBody);
}
$('<tr class="node-info-node-row"><td>'+RED._("sidebar.info.type")+"</td><td>&nbsp;"+node.type+"</td></tr>").appendTo(tableBody);
propRow = $('<tr class="node-info-node-row"><td>'+RED._("sidebar.info.id")+"</td><td></td></tr>").appendTo(tableBody);
RED.utils.createObjectElement(node.id).appendTo(propRow.children()[1]);
var m = /^subflow(:(.+))?$/.exec(node.type);
if (!m && node.type != "subflow" && node.type != "comment") {
if (node._def) {
var count = 0;
var defaults = node._def.defaults;
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 = configNode._def.color;
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"}).html(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 (m) {
if (m[2]) {
subflowNode = RED.nodes.subflow(m[2]);
} else {
subflowNode = node;
}
$('<tr class="blank"><th colspan="2">'+RED._("sidebar.info.subflow")+'</th></tr>').appendTo(tableBody);
var userCount = 0;
var subflowType = "subflow:"+subflowNode.id;
RED.nodes.eachNode(function(n) {
if (n.type === subflowType) {
userCount++;
}
});
$('<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);
$('<tr class="node-info-subflow-row"><td>'+RED._("sidebar.info.instances")+"</td><td>"+userCount+'</td></tr>').appendTo(tableBody);
}
}
$(table).appendTo(nodeSection.content);
var infoText = "";
if (!subflowNode && node.type !== "comment" && node.type !== "tab") {
var helpText = $("script[data-help-name='"+node.type+"']").html()||"";
infoText = helpText;
} else if (node.type === "tab") {
infoText = marked(node.info||"");
}
if (subflowNode) {
infoText = infoText + marked(subflowNode.info||"");
} else if (node._def && node._def.info) {
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();
//
}
function set(html) {
// tips.stop();
sections.show();
nodeSection.container.hide();
$(infoSection.content).empty();
setInfoText(html);
$(".sidebar-node-info-stack").scrollTop(0);
}
RED.events.on("view:selection-changed",function(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 {
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 {
clear();
}
}
}
});
return {
init: init,
show: show,
refresh: refresh,
clear: clear,
set: set
}
})();

View File

@@ -1,741 +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.utils = (function() {
function formatString(str) {
return str.replace(/\r?\n/g,"&crarr;").replace(/\t/g,"&rarr;");
}
function sanitize(m) {
return m.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");
}
function buildMessageSummaryValue(value) {
var result;
if (Array.isArray(value)) {
result = $('<span class="debug-message-object-value debug-message-type-meta"></span>').html('array['+value.length+']');
} else if (value === null) {
result = $('<span class="debug-message-object-value debug-message-type-null">null</span>');
} else if (typeof value === 'object') {
if (value.hasOwnProperty('type') && value.type === 'Buffer' && value.hasOwnProperty('data')) {
result = $('<span class="debug-message-object-value debug-message-type-meta"></span>').html('buffer['+value.length+']');
} else if (value.hasOwnProperty('type') && value.type === 'array' && value.hasOwnProperty('data')) {
result = $('<span class="debug-message-object-value debug-message-type-meta"></span>').html('array['+value.length+']');
} else {
result = $('<span class="debug-message-object-value debug-message-type-meta">object</span>');
}
} else if (typeof value === 'string') {
var subvalue;
if (value.length > 30) {
subvalue = sanitize(value.substring(0,30))+"&hellip;";
} else {
subvalue = sanitize(value);
}
result = $('<span class="debug-message-object-value debug-message-type-string"></span>').html('"'+formatString(subvalue)+'"');
} else {
result = $('<span class="debug-message-object-value debug-message-type-other"></span>').text(""+value);
}
return result;
}
function makeExpandable(el,onbuild,ontoggle,expand) {
el.addClass("debug-message-expandable");
el.prop('toggle',function() {
return function(state) {
var parent = el.parent();
if (parent.hasClass('collapsed')) {
if (state) {
if (onbuild && !parent.hasClass('built')) {
onbuild();
parent.addClass('built');
}
parent.removeClass('collapsed');
return true;
}
} else {
if (!state) {
parent.addClass('collapsed');
return true;
}
}
return false;
}
});
el.click(function(e) {
var parent = $(this).parent();
var currentState = !parent.hasClass('collapsed');
if ($(this).prop('toggle')(!currentState)) {
if (ontoggle) {
ontoggle(!currentState);
}
}
// if (parent.hasClass('collapsed')) {
// if (onbuild && !parent.hasClass('built')) {
// onbuild();
// parent.addClass('built');
// }
// if (ontoggle) {
// ontoggle(true);
// }
// parent.removeClass('collapsed');
// } else {
// parent.addClass('collapsed');
// if (ontoggle) {
// ontoggle(false);
// }
// }
e.preventDefault();
});
if (expand) {
el.click();
}
}
var pinnedPaths = {};
var formattedPaths = {};
function addMessageControls(obj,sourceId,key,msg,rootPath,strippedKey) {
if (!pinnedPaths.hasOwnProperty(sourceId)) {
pinnedPaths[sourceId] = {}
}
var tools = $('<span class="debug-message-tools"></span>').appendTo(obj);
var copyTools = $('<span class="debug-message-tools-copy button-group"></span>').appendTo(tools);
if (!!key) {
var copyPath = $('<button class="editor-button editor-button-small"><i class="fa fa-terminal"></i></button>').appendTo(copyTools).click(function(e) {
e.preventDefault();
e.stopPropagation();
RED.clipboard.copyText(key,copyPath,"clipboard.copyMessagePath");
})
}
var copyPayload = $('<button class="editor-button editor-button-small"><i class="fa fa-clipboard"></i></button>').appendTo(copyTools).click(function(e) {
e.preventDefault();
e.stopPropagation();
RED.clipboard.copyText(msg,copyPayload,"clipboard.copyMessageValue");
})
if (strippedKey !== '') {
var isPinned = pinnedPaths[sourceId].hasOwnProperty(strippedKey);
var pinPath = $('<button class="editor-button editor-button-small debug-message-tools-pin"><i class="fa fa-map-pin"></i></button>').appendTo(tools).click(function(e) {
e.preventDefault();
e.stopPropagation();
if (pinnedPaths[sourceId].hasOwnProperty(strippedKey)) {
delete pinnedPaths[sourceId][strippedKey];
$(this).removeClass("selected");
obj.removeClass("debug-message-row-pinned");
} else {
var rootedPath = "$"+(strippedKey[0] === '['?"":".")+strippedKey;
pinnedPaths[sourceId][strippedKey] = normalisePropertyExpression(rootedPath);
$(this).addClass("selected");
obj.addClass("debug-message-row-pinned");
}
}).toggleClass("selected",isPinned);
obj.toggleClass("debug-message-row-pinned",isPinned);
}
}
function checkExpanded(strippedKey,expandPaths,minRange,maxRange) {
if (expandPaths && expandPaths.length > 0) {
if (strippedKey === '' && minRange === undefined) {
return true;
}
for (var i=0;i<expandPaths.length;i++) {
var p = expandPaths[i];
if (p.indexOf(strippedKey) === 0 && (p[strippedKey.length] === "." || p[strippedKey.length] === "[") ) {
if (minRange !== undefined && p[strippedKey.length] === "[") {
var subkey = p.substring(strippedKey.length);
var m = (/\[(\d+)\]/.exec(subkey));
if (m) {
var index = parseInt(m[1]);
return minRange<=index && index<=maxRange;
}
} else {
return true;
}
}
}
}
return false;
}
function formatNumber(element,obj,sourceId,path,cycle,initialFormat) {
var format = (formattedPaths[sourceId] && formattedPaths[sourceId][path]) || initialFormat || "dec";
if (cycle) {
if (format === 'dec') {
if ((obj.toString().length===13) && (obj<=2147483647000)) {
format = 'dateMS';
} else if ((obj.toString().length===10) && (obj<=2147483647)) {
format = 'dateS';
} else {
format = 'hex'
}
} else if (format === 'dateMS' || format == 'dateS') {
format = 'hex';
} else {
format = 'dec';
}
formattedPaths[sourceId] = formattedPaths[sourceId]||{};
formattedPaths[sourceId][path] = format;
} else if (initialFormat !== undefined){
formattedPaths[sourceId] = formattedPaths[sourceId]||{};
formattedPaths[sourceId][path] = format;
}
if (format === 'dec') {
element.text(""+obj);
} else if (format === 'dateMS') {
element.text((new Date(obj)).toISOString());
} else if (format === 'dateS') {
element.text((new Date(obj*1000)).toISOString());
} else if (format === 'hex') {
element.text("0x"+(obj).toString(16));
}
}
function formatBuffer(element,button,sourceId,path,cycle) {
var format = (formattedPaths[sourceId] && formattedPaths[sourceId][path]) || "raw";
if (cycle) {
if (format === 'raw') {
format = 'string';
} else {
format = 'raw';
}
formattedPaths[sourceId] = formattedPaths[sourceId]||{};
formattedPaths[sourceId][path] = format;
}
if (format === 'raw') {
button.text('raw');
element.removeClass('debug-message-buffer-string').addClass('debug-message-buffer-raw');
} else if (format === 'string') {
button.text('string');
element.addClass('debug-message-buffer-string').removeClass('debug-message-buffer-raw');
}
}
function buildMessageElement(obj,options) {
options = options || {};
var key = options.key;
var typeHint = options.typeHint;
var hideKey = options.hideKey;
var path = options.path;
var sourceId = options.sourceId;
var rootPath = options.rootPath;
var expandPaths = options.expandPaths;
var ontoggle = options.ontoggle;
var exposeApi = options.exposeApi;
var subElements = {};
var i;
var e;
var entryObj;
var expandableHeader;
var header;
var headerHead;
var value;
var strippedKey;
if (path !== undefined && rootPath !== undefined) {
strippedKey = path.substring(rootPath.length+(path[rootPath.length]==="."?1:0));
}
var element = $('<span class="debug-message-element"></span>');
element.collapse = function() {
element.find(".debug-message-expandable").parent().addClass("collapsed");
}
header = $('<span class="debug-message-row"></span>').appendTo(element);
if (sourceId) {
addMessageControls(header,sourceId,path,obj,rootPath,strippedKey);
}
if (!key) {
element.addClass("debug-message-top-level");
if (sourceId) {
var pinned = pinnedPaths[sourceId];
expandPaths = [];
if (pinned) {
for (var pinnedPath in pinned) {
if (pinned.hasOwnProperty(pinnedPath)) {
try {
var res = getMessageProperty({$:obj},pinned[pinnedPath]);
if (res !== undefined) {
expandPaths.push(pinnedPath);
}
} catch(err) {
}
}
}
expandPaths.sort();
}
element.clearPinned = function() {
element.find(".debug-message-row-pinned").removeClass("debug-message-row-pinned");
pinnedPaths[sourceId] = {};
}
}
} else {
if (!hideKey) {
$('<span class="debug-message-object-key"></span>').text(key).appendTo(header);
$('<span>: </span>').appendTo(header);
}
}
entryObj = $('<span class="debug-message-object-value"></span>').appendTo(header);
var isArray = Array.isArray(obj);
var isArrayObject = false;
if (obj && typeof obj === 'object' && obj.hasOwnProperty('type') && obj.hasOwnProperty('data') && ((obj.__encoded__ && obj.type === 'array') || obj.type === 'Buffer')) {
isArray = true;
isArrayObject = true;
}
if (obj === null || obj === undefined) {
$('<span class="debug-message-type-null">'+obj+'</span>').appendTo(entryObj);
} else if (typeof obj === 'string') {
if (/[\t\n\r]/.test(obj)) {
element.addClass('collapsed');
$('<i class="fa fa-caret-right debug-message-object-handle"></i> ').prependTo(header);
makeExpandable(header, function() {
$('<span class="debug-message-type-meta debug-message-object-type-header"></span>').html(typeHint||'string').appendTo(header);
var row = $('<div class="debug-message-object-entry collapsed"></div>').appendTo(element);
$('<pre class="debug-message-type-string"></pre>').text(obj).appendTo(row);
},function(state) {if (ontoggle) { ontoggle(path,state);}}, checkExpanded(strippedKey,expandPaths));
}
e = $('<span class="debug-message-type-string debug-message-object-header"></span>').html('"'+formatString(sanitize(obj))+'"').appendTo(entryObj);
if (/^#[0-9a-f]{6}$/i.test(obj)) {
$('<span class="debug-message-type-string-swatch"></span>').css('backgroundColor',obj).appendTo(e);
}
} else if (typeof obj === 'number') {
e = $('<span class="debug-message-type-number"></span>').appendTo(entryObj);
if (Number.isInteger(obj) && (obj >= 0)) { // if it's a +ve integer
e.addClass("debug-message-type-number-toggle");
e.click(function(evt) {
evt.preventDefault();
formatNumber($(this), obj, sourceId, path, true);
});
}
formatNumber(e,obj,sourceId,path,false,typeHint==='hex'?'hex':undefined);
} else if (isArray) {
element.addClass('collapsed');
var originalLength = obj.length;
if (typeHint) {
var m = /\[(\d+)\]/.exec(typeHint);
if (m) {
originalLength = parseInt(m[1]);
}
}
var data = obj;
var type = 'array';
if (isArrayObject) {
data = obj.data;
if (originalLength === undefined) {
originalLength = data.length;
}
if (data.__encoded__) {
data = data.data;
}
type = obj.type.toLowerCase();
} else if (/buffer/.test(typeHint)) {
type = 'buffer';
}
var fullLength = data.length;
if (originalLength > 0) {
$('<i class="fa fa-caret-right debug-message-object-handle"></i> ').prependTo(header);
var arrayRows = $('<div class="debug-message-array-rows"></div>').appendTo(element);
element.addClass('debug-message-buffer-raw');
}
if (key) {
headerHead = $('<span class="debug-message-type-meta"></span>').html(typeHint||(type+'['+originalLength+']')).appendTo(entryObj);
} else {
headerHead = $('<span class="debug-message-object-header"></span>').appendTo(entryObj);
$('<span>[ </span>').appendTo(headerHead);
var arrayLength = Math.min(originalLength,10);
for (i=0;i<arrayLength;i++) {
buildMessageSummaryValue(data[i]).appendTo(headerHead);
if (i < arrayLength-1) {
$('<span>, </span>').appendTo(headerHead);
}
}
if (originalLength > arrayLength) {
$('<span> &hellip;</span>').appendTo(headerHead);
}
if (arrayLength === 0) {
$('<span class="debug-message-type-meta">empty</span>').appendTo(headerHead);
}
$('<span> ]</span>').appendTo(headerHead);
}
if (originalLength > 0) {
makeExpandable(header,function() {
if (!key) {
headerHead = $('<span class="debug-message-type-meta debug-message-object-type-header"></span>').html(typeHint||(type+'['+originalLength+']')).appendTo(header);
}
if (type === 'buffer') {
var stringRow = $('<div class="debug-message-string-rows"></div>').appendTo(element);
var sr = $('<div class="debug-message-object-entry collapsed"></div>').appendTo(stringRow);
var stringEncoding = "";
try {
stringEncoding = String.fromCharCode.apply(null, new Uint16Array(data))
} catch(err) {
console.log(err);
}
$('<pre class="debug-message-type-string"></pre>').text(stringEncoding).appendTo(sr);
var bufferOpts = $('<span class="debug-message-buffer-opts"></span>').appendTo(headerHead);
var switchFormat = $('<a href="#"></a>').addClass('selected').html('raw').appendTo(bufferOpts).click(function(e) {
e.preventDefault();
e.stopPropagation();
formatBuffer(element,$(this),sourceId,path,true);
});
formatBuffer(element,switchFormat,sourceId,path,false);
}
var row;
if (fullLength <= 10) {
for (i=0;i<fullLength;i++) {
row = $('<div class="debug-message-object-entry collapsed"></div>').appendTo(arrayRows);
subElements[path+"["+i+"]"] = buildMessageElement(
data[i],
{
key: ""+i,
typeHint: type==='buffer'?'hex':false,
hideKey: false,
path: path+"["+i+"]",
sourceId: sourceId,
rootPath: rootPath,
expandPaths: expandPaths,
ontoggle: ontoggle,
exposeApi: exposeApi
}
).appendTo(row);
}
} else {
for (i=0;i<fullLength;i+=10) {
var minRange = i;
row = $('<div class="debug-message-object-entry collapsed"></div>').appendTo(arrayRows);
header = $('<span></span>').appendTo(row);
$('<i class="fa fa-caret-right debug-message-object-handle"></i> ').appendTo(header);
makeExpandable(header, (function() {
var min = minRange;
var max = Math.min(fullLength-1,(minRange+9));
var parent = row;
return function() {
for (var i=min;i<=max;i++) {
var row = $('<div class="debug-message-object-entry collapsed"></div>').appendTo(parent);
subElements[path+"["+i+"]"] = buildMessageElement(
data[i],
{
key: ""+i,
typeHint: type==='buffer'?'hex':false,
hideKey: false,
path: path+"["+i+"]",
sourceId: sourceId,
rootPath: rootPath,
expandPaths: expandPaths,
ontoggle: ontoggle,
exposeApi: exposeApi
}
).appendTo(row);
}
}
})(),
(function() { var path = path+"["+i+"]"; return function(state) {if (ontoggle) { ontoggle(path,state);}}})(),
checkExpanded(strippedKey,expandPaths,minRange,Math.min(fullLength-1,(minRange+9))));
$('<span class="debug-message-object-key"></span>').html("["+minRange+" &hellip; "+Math.min(fullLength-1,(minRange+9))+"]").appendTo(header);
}
if (fullLength < originalLength) {
$('<div class="debug-message-object-entry collapsed"><span class="debug-message-object-key">['+fullLength+' &hellip; '+originalLength+']</span></div>').appendTo(arrayRows);
}
}
},
function(state) {if (ontoggle) { ontoggle(path,state);}},
checkExpanded(strippedKey,expandPaths));
}
} else if (typeof obj === 'object') {
element.addClass('collapsed');
var keys = Object.keys(obj);
if (key || keys.length > 0) {
$('<i class="fa fa-caret-right debug-message-object-handle"></i> ').prependTo(header);
makeExpandable(header, function() {
if (!key) {
$('<span class="debug-message-type-meta debug-message-object-type-header"></span>').html('object').appendTo(header);
}
for (i=0;i<keys.length;i++) {
var row = $('<div class="debug-message-object-entry collapsed"></div>').appendTo(element);
var newPath = path;
if (newPath) {
if (/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(keys[i])) {
newPath += (newPath.length > 0?".":"")+keys[i];
} else {
newPath += "[\""+keys[i].replace(/"/,"\\\"")+"\"]"
}
}
subElements[newPath] = buildMessageElement(
obj[keys[i]],
{
key: keys[i],
typeHint: false,
hideKey: false,
path: newPath,
sourceId: sourceId,
rootPath: rootPath,
expandPaths: expandPaths,
ontoggle: ontoggle,
exposeApi: exposeApi
}
).appendTo(row);
}
if (keys.length === 0) {
$('<div class="debug-message-object-entry debug-message-type-meta collapsed"></div>').text("empty").appendTo(element);
}
},
function(state) {if (ontoggle) { ontoggle(path,state);}},
checkExpanded(strippedKey,expandPaths));
}
if (key) {
$('<span class="debug-message-type-meta"></span>').html('object').appendTo(entryObj);
} else {
headerHead = $('<span class="debug-message-object-header"></span>').appendTo(entryObj);
$('<span>{ </span>').appendTo(headerHead);
var keysLength = Math.min(keys.length,5);
for (i=0;i<keysLength;i++) {
$('<span class="debug-message-object-key"></span>').text(keys[i]).appendTo(headerHead);
$('<span>: </span>').appendTo(headerHead);
buildMessageSummaryValue(obj[keys[i]]).appendTo(headerHead);
if (i < keysLength-1) {
$('<span>, </span>').appendTo(headerHead);
}
}
if (keys.length > keysLength) {
$('<span> &hellip;</span>').appendTo(headerHead);
}
if (keysLength === 0) {
$('<span class="debug-message-type-meta">empty</span>').appendTo(headerHead);
}
$('<span> }</span>').appendTo(headerHead);
}
} else {
$('<span class="debug-message-type-other"></span>').text(""+obj).appendTo(entryObj);
}
if (exposeApi) {
element.prop('expand', function() { return function(targetPath, state) {
if (path === targetPath) {
if (header.prop('toggle')) {
header.prop('toggle')(state);
}
} else if (subElements[targetPath] && subElements[targetPath].prop('expand') ) {
subElements[targetPath].prop('expand')(targetPath,state);
} else {
for (var p in subElements) {
if (subElements.hasOwnProperty(p)) {
if (targetPath.indexOf(p) === 0) {
if (subElements[p].prop('expand') ) {
subElements[p].prop('expand')(targetPath,state);
}
break;
}
}
}
}
}});
}
return element;
}
function normalisePropertyExpression(str) {
// This must be kept in sync with validatePropertyExpression
// in editor/js/ui/utils.js
var length = str.length;
if (length === 0) {
throw new Error("Invalid property expression: zero-length");
}
var parts = [];
var start = 0;
var inString = false;
var inBox = false;
var quoteChar;
var v;
for (var i=0;i<length;i++) {
var c = str[i];
if (!inString) {
if (c === "'" || c === '"') {
if (i != start) {
throw new Error("Invalid property expression: unexpected "+c+" at position "+i);
}
inString = true;
quoteChar = c;
start = i+1;
} else if (c === '.') {
if (i===0) {
throw new Error("Invalid property expression: unexpected . at position 0");
}
if (start != i) {
v = str.substring(start,i);
if (/^\d+$/.test(v)) {
parts.push(parseInt(v));
} else {
parts.push(v);
}
}
if (i===length-1) {
throw new Error("Invalid property expression: unterminated expression");
}
// Next char is first char of an identifier: a-z 0-9 $ _
if (!/[a-z0-9\$\_]/i.test(str[i+1])) {
throw new Error("Invalid property expression: unexpected "+str[i+1]+" at position "+(i+1));
}
start = i+1;
} else if (c === '[') {
if (i === 0) {
throw new Error("Invalid property expression: unexpected "+c+" at position "+i);
}
if (start != i) {
parts.push(str.substring(start,i));
}
if (i===length-1) {
throw new Error("Invalid property expression: unterminated expression");
}
// Next char is either a quote or a number
if (!/["'\d]/.test(str[i+1])) {
throw new Error("Invalid property expression: unexpected "+str[i+1]+" at position "+(i+1));
}
start = i+1;
inBox = true;
} else if (c === ']') {
if (!inBox) {
throw new Error("Invalid property expression: unexpected "+c+" at position "+i);
}
if (start != i) {
v = str.substring(start,i);
if (/^\d+$/.test(v)) {
parts.push(parseInt(v));
} else {
throw new Error("Invalid property expression: unexpected array expression at position "+start);
}
}
start = i+1;
inBox = false;
} else if (c === ' ') {
throw new Error("Invalid property expression: unexpected ' ' at position "+i);
}
} else {
if (c === quoteChar) {
if (i-start === 0) {
throw new Error("Invalid property expression: zero-length string at position "+start);
}
parts.push(str.substring(start,i));
// If inBox, next char must be a ]. Otherwise it may be [ or .
if (inBox && !/\]/.test(str[i+1])) {
throw new Error("Invalid property expression: unexpected array expression at position "+start);
} else if (!inBox && i+1!==length && !/[\[\.]/.test(str[i+1])) {
throw new Error("Invalid property expression: unexpected "+str[i+1]+" expression at position "+(i+1));
}
start = i+1;
inString = false;
}
}
}
if (inBox || inString) {
throw new Error("Invalid property expression: unterminated expression");
}
if (start < length) {
parts.push(str.substring(start));
}
return parts;
}
function validatePropertyExpression(str) {
try {
var parts = normalisePropertyExpression(str);
return true;
} catch(err) {
return false;
}
}
function getMessageProperty(msg,expr) {
var result = null;
var msgPropParts;
if (typeof expr === 'string') {
if (expr.indexOf('msg.')===0) {
expr = expr.substring(4);
}
msgPropParts = normalisePropertyExpression(expr);
} else {
msgPropParts = expr;
}
var m;
msgPropParts.reduce(function(obj, key) {
result = (typeof obj[key] !== "undefined" ? obj[key] : undefined);
if (result === undefined && obj.hasOwnProperty('type') && obj.hasOwnProperty('data')&& obj.hasOwnProperty('length')) {
result = (typeof obj.data[key] !== "undefined" ? obj.data[key] : undefined);
}
return result;
}, msg);
return result;
}
function getNodeIcon(def,node) {
if (def.category === 'config') {
return "icons/node-red/cog.png"
} else if (node && node.type === 'tab') {
return "icons/node-red/subflow.png"
} else if (node && node.type === 'unknown') {
return "icons/node-red/alert.png"
} else if (node && node.type === 'subflow') {
return "icons/node-red/subflow.png"
}
var icon_url;
if (typeof def.icon === "function") {
try {
icon_url = def.icon.call(node);
} catch(err) {
console.log("Definition error: "+def.type+".icon",err);
icon_url = "arrow-in.png";
}
} else {
icon_url = def.icon;
}
return "icons/"+def.set.module+"/"+icon_url;
}
function getNodeLabel(node,defaultLabel) {
defaultLabel = defaultLabel||"";
var l;
if (node.type === 'tab') {
l = node.label || defaultLabel
} else {
l = node._def.label;
try {
l = (typeof l === "function" ? l.call(node) : l)||defaultLabel;
} catch(err) {
console.log("Definition error: "+node.type+".label",err);
l = defaultLabel;
}
}
return RED.text.bidi.enforceTextDirectionWithUCC(l);
}
return {
createObjectElement: buildMessageElement,
getMessageProperty: getMessageProperty,
normalisePropertyExpression: normalisePropertyExpression,
validatePropertyExpression: validatePropertyExpression,
getNodeIcon: getNodeIcon,
getNodeLabel: getNodeLabel,
}
})();

File diff suppressed because it is too large Load Diff

View File

@@ -1,348 +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.workspaces = (function() {
var activeWorkspace = 0;
var workspaceIndex = 0;
function addWorkspace(ws,skipHistoryEntry) {
if (ws) {
workspace_tabs.addTab(ws);
workspace_tabs.resize();
} else {
var tabId = RED.nodes.id();
do {
workspaceIndex += 1;
} while ($("#workspace-tabs a[title='"+RED._('workspace.defaultName',{number:workspaceIndex})+"']").size() !== 0);
ws = {type:"tab",id:tabId,disabled: false,info:"",label:RED._('workspace.defaultName',{number:workspaceIndex})};
RED.nodes.addWorkspace(ws);
workspace_tabs.addTab(ws);
workspace_tabs.activateTab(tabId);
if (!skipHistoryEntry) {
RED.history.push({t:'add',workspaces:[ws],dirty:RED.nodes.dirty()});
RED.nodes.dirty(true);
}
}
RED.view.focus();
return ws;
}
function deleteWorkspace(ws) {
if (workspace_tabs.count() == 1) {
return;
}
removeWorkspace(ws);
var historyEvent = RED.nodes.removeWorkspace(ws.id);
historyEvent.t = 'delete';
historyEvent.dirty = RED.nodes.dirty();
historyEvent.workspaces = [ws];
RED.history.push(historyEvent);
RED.nodes.dirty(true);
RED.sidebar.config.refresh();
}
function showRenameWorkspaceDialog(id) {
var workspace = RED.nodes.workspace(id);
RED.view.state(RED.state.EDITING);
var tabflowEditor;
var trayOptions = {
title: RED._("workspace.editFlow",{name:workspace.label}),
buttons: [
{
id: "node-dialog-delete",
class: 'leftButton'+((workspace_tabs.count() == 1)?" disabled":""),
text: RED._("common.label.delete"), //'<i class="fa fa-trash"></i>',
click: function() {
deleteWorkspace(workspace);
RED.tray.close();
}
},
{
id: "node-dialog-cancel",
text: RED._("common.label.cancel"),
click: function() {
RED.tray.close();
}
},
{
id: "node-dialog-ok",
class: "primary",
text: RED._("common.label.done"),
click: function() {
var label = $( "#node-input-name" ).val();
var changed = false;
var changes = {};
if (workspace.label != label) {
changes.label = workspace.label;
changed = true;
workspace.label = label;
workspace_tabs.renameTab(workspace.id,label);
}
var disabled = $("#node-input-disabled").prop("checked");
if (workspace.disabled !== disabled) {
changes.disabled = workspace.disabled;
changed = true;
workspace.disabled = disabled;
}
var info = tabflowEditor.getValue();
if (workspace.info !== info) {
changes.info = workspace.info;
changed = true;
workspace.info = info;
}
$("#red-ui-tab-"+(workspace.id.replace(".","-"))).toggleClass('workspace-disabled',workspace.disabled);
// $("#workspace").toggleClass("workspace-disabled",workspace.disabled);
if (changed) {
var historyEvent = {
t: "edit",
changes:changes,
node: workspace,
dirty: RED.nodes.dirty()
}
workspace.changed = true;
RED.history.push(historyEvent);
RED.nodes.dirty(true);
RED.sidebar.config.refresh();
var selection = RED.view.selection();
if (!selection.nodes && !selection.links) {
RED.sidebar.info.refresh(workspace);
}
}
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")));
height -= 28;
$(".node-text-editor").css("height",height+"px");
tabflowEditor.resize();
},
open: function(tray) {
var trayBody = tray.find('.editor-tray-body');
var dialogForm = $('<form id="dialog-form" class="form-horizontal"></form>').appendTo(trayBody);
$('<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>').appendTo(dialogForm);
$('<div class="form-row">'+
'<label for="node-input-disabled-btn" data-i18n="editor:workspace.status"></label>'+
'<button id="node-input-disabled-btn" class="editor-button"><i class="fa fa-toggle-on"></i> <span id="node-input-disabled-label"></span></button> '+
'<input type="checkbox" id="node-input-disabled" style="display: none;"/>'+
'</div>').appendTo(dialogForm);
$('<div class="form-row node-text-editor-row">'+
'<label for="node-input-info" data-i18n="editor:workspace.info" style="width:300px;"></label>'+
'<div style="height:250px;" class="node-text-editor" id="node-input-info"></div>'+
'</div>').appendTo(dialogForm);
tabflowEditor = RED.editor.createEditor({
id: 'node-input-info',
mode: 'ace/mode/markdown',
value: ""
});
$('<div class="form-tips" data-i18n="editor:workspace.tip"></div>').appendTo(dialogForm);
dialogForm.find('#node-input-disabled-btn').on("click",function(e) {
var i = $(this).find("i");
if (i.hasClass('fa-toggle-off')) {
i.addClass('fa-toggle-on');
i.removeClass('fa-toggle-off');
$("#node-input-disabled").prop("checked",false);
$("#node-input-disabled-label").html(RED._("editor:workspace.enabled"));
} else {
i.addClass('fa-toggle-off');
i.removeClass('fa-toggle-on');
$("#node-input-disabled").prop("checked",true);
$("#node-input-disabled-label").html(RED._("editor:workspace.disabled"));
}
})
if (workspace.hasOwnProperty("disabled")) {
$("#node-input-disabled").prop("checked",workspace.disabled);
if (workspace.disabled) {
dialogForm.find("#node-input-disabled-btn i").removeClass('fa-toggle-on').addClass('fa-toggle-off');
$("#node-input-disabled-label").html(RED._("editor:workspace.disabled"));
} else {
$("#node-input-disabled-label").html(RED._("editor:workspace.enabled"));
}
} else {
workspace.disabled = false;
$("#node-input-disabled-label").html(RED._("editor:workspace.enabled"));
}
$('<input type="text" style="display: none;" />').prependTo(dialogForm);
dialogForm.submit(function(e) { e.preventDefault();});
$("#node-input-name").val(workspace.label);
RED.text.bidi.prepareInput($("#node-input-name"));
tabflowEditor.getSession().setValue(workspace.info || "", -1);
dialogForm.i18n();
},
close: function() {
if (RED.view.state() != RED.state.IMPORT_DRAGGING) {
RED.view.state(RED.state.DEFAULT);
}
RED.sidebar.info.refresh(workspace);
tabflowEditor.destroy();
}
}
RED.tray.show(trayOptions);
}
var workspace_tabs;
function createWorkspaceTabs() {
workspace_tabs = RED.tabs.create({
id: "workspace-tabs",
onchange: function(tab) {
var event = {
old: activeWorkspace
}
activeWorkspace = tab.id;
event.workspace = activeWorkspace;
// $("#workspace").toggleClass("workspace-disabled",tab.disabled);
RED.events.emit("workspace:change",event);
window.location.hash = 'flow/'+tab.id;
RED.sidebar.config.refresh();
RED.view.focus();
},
onclick: function(tab) {
RED.view.focus();
},
ondblclick: function(tab) {
if (tab.type != "subflow") {
showRenameWorkspaceDialog(tab.id);
} else {
RED.editor.editSubflow(RED.nodes.subflow(tab.id));
}
},
onadd: function(tab) {
$('<span class="workspace-disabled-icon"><i class="fa fa-ban"></i> </span>').prependTo("#red-ui-tab-"+(tab.id.replace(".","-"))+" .red-ui-tab-label");
if (tab.disabled) {
$("#red-ui-tab-"+(tab.id.replace(".","-"))).addClass('workspace-disabled');
}
RED.menu.setDisabled("menu-item-workspace-delete",workspace_tabs.count() == 1);
},
onremove: function(tab) {
RED.menu.setDisabled("menu-item-workspace-delete",workspace_tabs.count() == 1);
},
onreorder: function(oldOrder, newOrder) {
RED.history.push({t:'reorder',order:oldOrder,dirty:RED.nodes.dirty()});
RED.nodes.dirty(true);
setWorkspaceOrder(newOrder);
},
minimumActiveTabWidth: 150,
scrollable: true,
addButton: function() {
addWorkspace();
}
});
}
function init() {
createWorkspaceTabs();
RED.events.on("sidebar:resize",workspace_tabs.resize);
RED.actions.add("core:show-next-tab",workspace_tabs.nextTab);
RED.actions.add("core:show-previous-tab",workspace_tabs.previousTab);
RED.menu.setAction('menu-item-workspace-delete',function() {
deleteWorkspace(RED.nodes.workspace(activeWorkspace));
});
$(window).resize(function() {
workspace_tabs.resize();
});
RED.actions.add("core:add-flow",addWorkspace);
RED.actions.add("core:edit-flow",editWorkspace);
RED.actions.add("core:remove-flow",removeWorkspace);
}
function editWorkspace(id) {
showRenameWorkspaceDialog(id||activeWorkspace);
}
function removeWorkspace(ws) {
if (!ws) {
deleteWorkspace(RED.nodes.workspace(activeWorkspace));
} else {
if (workspace_tabs.contains(ws.id)) {
workspace_tabs.removeTab(ws.id);
}
}
}
function setWorkspaceOrder(order) {
RED.nodes.setWorkspaceOrder(order.filter(function(id) {
return RED.nodes.workspace(id) !== undefined;
}));
workspace_tabs.order(order);
}
return {
init: init,
add: addWorkspace,
remove: removeWorkspace,
order: setWorkspaceOrder,
edit: editWorkspace,
contains: function(id) {
return workspace_tabs.contains(id);
},
count: function() {
return workspace_tabs.count();
},
active: function() {
return activeWorkspace
},
show: function(id) {
if (!workspace_tabs.contains(id)) {
var sf = RED.nodes.subflow(id);
if (sf) {
addWorkspace({type:"subflow",id:id,icon:"red/images/subflow_tab.png",label:sf.name, closeable: true});
} else {
return;
}
}
workspace_tabs.activateTab(id);
},
refresh: function() {
RED.nodes.eachWorkspace(function(ws) {
workspace_tabs.renameTab(ws.id,ws.label);
})
RED.nodes.eachSubflow(function(sf) {
if (workspace_tabs.contains(sf.id)) {
workspace_tabs.renameTab(sf.id,sf.name);
}
});
RED.sidebar.config.refresh();
},
resize: function() {
workspace_tabs.resize();
}
}
})();

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(200,200,200,0.5);

View File

@@ -1,265 +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: 10px;
color: #777;
}
.debug-message-date {
padding: 1px 5px 1px 1px;
}
.debug-message-topic {
display: block;
color: #a66;
}
.debug-message-name {
padding: 1px 5px;
color: #777;
}
.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: 12px !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: 12px;
line-height: 1.4em;
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,536 +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.
**/
#node-dialog-view-diff {
.red-ui-editableList-container {
border-radius:1px;
padding:0;
background: #f9f9f9;
}
#node-dialog-view-diff-diff {
position: absolute;
top:80px;
bottom:10px;
left:10px;
right:10px;
li {
background: #f9f9f9;
padding: 0px;
border: none;
min-height: 0;
}
}
.red-ui-editableList-item-content {
padding: 5px;
// padding-bottom: 5px;
}
}
#node-dialog-view-diff-headers {
position: absolute;
left:237px;
right:18px;
top: 55px;
height: 25px;
div {
height: 25px;
display: inline-block;
box-sizing: border-box;
width: 50%;
background: #f9f9f9;
text-align: center;
border-top: 1px solid $secondary-border-color;
border-color:$secondary-border-color;
border-left: 1px solid $secondary-border-color;
}
div:last-child {
border-right: 1px solid $secondary-border-color;
}
}
.node-diff-toolbar {
position:absolute;
top:0;
left:0;
right:0;
height: 43px;
box-sizing: border-box;
color: #666;
text-align: right;
padding: 8px 10px;
background: #f3f3f3;
border-bottom: 1px solid $secondary-border-color;
white-space: nowrap;
}
.node-diff-tab {
background: #fff;
border: 1px solid #ddd;
border-radius: 1px;
overflow: hidden;
&.collapsed {
.node-diff-tab-title .node-diff-chevron {
transform: rotate(-90deg);
}
.node-diff-node-entry {
display: none;
}
}
}
.node-diff-tab-stats {
font-size: 0.9em;
}
.node-diff-chevron {
display: inline-block;
width: 15px;
text-align: center;
margin-left: 3px;
transition: transform 0.1s ease-in-out;
}
.node-diff-node-entry {
margin-left: 20px;
font-size: 0.9em;
&:first-child {
border-top: 1px solid $secondary-border-color;
}
&:not(:last-child) {
border-bottom: 1px solid $secondary-border-color;
}
&.collapsed {
.node-diff-chevron {
transform: rotate(-90deg);
}
.node-diff-node-entry-properties {
display: none;
}
}
&:not(.collapsed) {
.node-diff-node-entry-cell:not(:first-child) {
//display: none;
}
.node-diff-node-entry-cell:first-child {
//width: 100%
}
}
table {
border-collapse: collapse;
table-layout:fixed;
width: calc(100% - 20px);
margin-left: 20px;
}
col:first-child {
width: 180px;
}
col:not(:first-child) {
width: 100%;
}
td, th {
border-top: 1px solid #f3f3f3;
border-left: 1px solid $secondary-border-color;
&:first-child {
border-left: none;
}
padding: 0 0 0 3px;
text-align: left;
overflow-x: auto;
}
tr {
vertical-align: top;
&:first-child td {
white-space:nowrap;
overflow:hidden;
}
&:hover {
background: #f9f9f9;
}
}
td {
.node-diff-status {
margin-left: 0;
}
}
tr:not(.node-diff-property-header) {
.node-diff-status {
width: 12px;
margin-left: 0;
margin-top: 0;
margin-bottom: 0;
margin-right: 5px;
}
}
}
.node-diff-three-way {
.node-diff-node-entry-cell {
width: calc((100% - 220px) / 2);
&:first-child {
width: 220px;
}
}
col:not(:first-child) {
width:50%;
}
.node-diff-node-entry {
.node-diff-node-entry-cell {
width: calc((100% + 20px - 220px) / 2);
&:first-child {
width: 200px;
}
}
}
}
.node-diff-column {
display:inline-block;
height:100%;
width:50%;
box-sizing: border-box;
white-space:nowrap;
overflow: hidden;
&:first-child {
border-right: 1px solid $secondary-border-color
}
}
.node-diff-tab-title {
cursor: pointer;
padding: 0;
// background: #f6f6f6;
&:hover {
background: #f9f9f9;
}
}
.node-diff-tab-title-meta {
vertical-align: middle;
display: inline-block;
padding-top: 2px;
}
.node-diff-node-entry-header {
cursor: pointer;
&:hover {
background: #f9f9f9;
}
}
.node-diff-node-entry-node {
vertical-align: middle;
display: inline-block;
margin: 5px;
width: 18px;
height: 15px;
background: #ddd;
border-radius: 2px;
border: 1px solid #999;
background-position: 5% 50%;
background-repeat: no-repeat;
background-size: contain;
position: relative;
.palette_icon {
background-position: 49% 50%;
width: 15px;
}
.palette_icon_container {
width: 18px;
}
}
.node-diff-tab-empty {
.node-diff-chevron i {
display: none;
}
.node-diff-tab-title {
cursor: default;
&:hover {
background: none;
}
}
}
.node-diff-node-deleted {
//background: #fadddd;
cursor: default !important;
.node-diff-status {
color: #f80000;
}
.node-diff-node-entry-node {
opacity: 0.5;
}
.node-diff-node-description {
opacity: 0.5;
text-decoration: line-through;
}
}
.node-diff-node-added {
//background: #eefaee;
cursor: default !important;
.node-diff-status {
color: #009900;
}
}
.node-diff-node-moved {
//background: #eefaee;
.node-diff-status {
color: #3f81b3;
}
}
.node-diff-node-changed {
//background: #fff2ca;
.node-diff-status {
color: #f89406;
}
}
.node-diff-node-unchanged {
//background: #fff2ca;
.node-diff-status {
color: #bbb;
}
}
.node-diff-node-conflict {
.node-diff-status {
color: #9b45ce;
}
}
.node-diff-node-entry-title {
display: inline-block;
.node-diff-status {
margin-left: 15px;
}
}
.node-diff-node-entry-properties {
margin: 0;
color: #666;
}
.node-diff-status {
display: inline-block;
height: 20px;
margin-left: 5px;
vertical-align: top;
margin-top: 6px;
margin-bottom: 6px;
text-align: center;
}
.node-diff-element {
display: inline-block;
width: calc(100% - 20px);
}
.node-diff-node-description {
color: $form-text-color;
margin-right: 5px;
padding-top: 5px;
display: inline-block;
&:after {
content: "";
display: table;
clear: both;
}
}
.node-diff-node-meta {
float: right;
//font-size: 0.9em;
color: #999;
margin-top: 7px;
margin-right: 10px;
}
.node-diff-count { color: #999}
.node-diff-added { color: #009900}
.node-diff-deleted { color: #f80000}
.node-diff-changed { color: #f89406}
.node-diff-conflicted { color: purple}
.node-diff-node-entry-cell {
display: inline-block;
vertical-align: top;
box-sizing: border-box;
width: calc( (100% - 20px) / 2);
height: 32px;
border-left: 1px solid $secondary-border-color;
padding-top: 2px;
white-space: nowrap;
overflow: hidden;
position: relative;
}
.node-diff-empty {
background: #f3f3f3;
background: repeating-linear-gradient(
20deg,
#fff, #fff 5px,
#f6f6f6 5px,
#f6f6f6 10px
);
}
.node-diff-node-entry-cell:first-child {
border-left: none;
}
.node-diff-property-cell-label {
margin-left: 20px;
vertical-align: top;
box-sizing: border-box;
padding-left: 8px;
width: 120px;
}
.node-diff-property-wires {
display: inline-block;
.node-diff-node-entry-node {
width: 18px;
height: 15px;
}
.palette_icon_container {
width: 18px;
}
.palette_icon {
width: 15px;
}
ul,li,ol {
background: none !important;
}
ul {
vertical-align: middle;
display: inline-block;
margin-left: 5px;
}
li {
list-style-type: none !important;
}
ol {
font-size: 0.9em;
margin: 0;
& > span {
vertical-align: middle;
display: inline-block;
width: 30px;
text-align: center;
}
& > li:not(:last-child) {
border-bottom: 1px solid #999;
}
}
}
.node-diff-node-props .node-diff-node-entry-cell:first-child {
padding: 6px 0px;
span:not(.node-diff-chevron) {
margin-left: 5px;
}
}
.node-diff-property-cell {
// vertical-align: top;
// display:inline-block;
//
// box-sizing: border-box;
// padding: 1px 5px;
//min-height: 30px;
&.node-diff-node-changed {
background: #fff2e1 !important;
}
&.node-diff-node-conflict {
background: #ffdad4 !important;
}
}
.node-diff-selectbox {
position: absolute;
top:0;
right:0;
bottom:0;
width: 35px;
text-align: center;
border-left: 1px solid #eee;
margin:0;
input {
margin-top: 8px;
}
&:hover {
background: #f3f3f3;
}
}
.node-diff-node-entry-conflict.node-diff-select-remote {
.node-diff-node-remote {
background: #e7ffe3;
label {
border-left-color: #b8daad;
}
}
.node-diff-node-local {
background: #ffe1e1;
label {
border-left-color: #e4bcbc;
}
}
}
.node-diff-node-entry-conflict.node-diff-select-local {
.node-diff-node-local {
background: #e7ffe3;
label {
border-left-color: #b8daad;
}
}
.node-diff-node-remote {
background: #ffe1e1;
label {
border-left-color: #e4bcbc;
}
}
}
#node-dialog-confirm-deploy {
.node-dialog-confirm-row {
text-align: left; padding-top: 10px;
}
ul {
font-size: 0.9em;
width: 400px;
margin: 10px auto;
text-align: left;
}
.node-dialog-confirm-conflict-row {
img {
vertical-align:middle;
height: 30px;
margin-right: 10px;
}
i {
vertical-align:middle;
text-align: center;
font-size: 30px;
width: 30px;
margin-right: 10px;
}
div {
vertical-align: middle;
width: calc(100% - 60px);
display:inline-block;
}
}
}
#node-diff-toolbar-resolved-conflicts .node-diff-status {
margin:0;
}

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