Commit Graph

106 Commits

Author SHA1 Message Date
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
Kazuhito Yokoi 67c268e13d Add test cases for red/api/editor/settings.js 2018-09-26 10:22:01 +09: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
Nick O'Leary db77be5d72
Update i18next in runtime 2018-07-23 23:25:57 +01:00
Hiroyasu Nishiyama 09329e1104 add tests for context admin api 2018-07-21 12:00:54 +09:00
Nick O'Leary 80873e4ea9
fix settings api test for context stores 2018-07-03 21:27:55 +01:00
Nick O'Leary bc01f9f8fd
add placeholder api/admin/context_spec 2018-06-28 17:00:17 +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 7584820987
Filter req.user in /settings to prevent leaking info 2018-05-09 10:03:22 +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
Nick O'Leary a0489f2a0d
Fix tests for existing file flag in settings 2018-02-21 08:38:52 -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 20a0e4f3e0
Update settings test for global git user 2018-01-24 21:24:54 +00:00
Nick O'Leary 85fc20b52d
Fix unhandled promise warnings in sshkeys/node8 2018-01-19 11:42:19 +00:00
Nick O'Leary d93a92c1c8
Rearrange ssh logic to bring it together 2018-01-18 23:13:55 +00:00
Nick O'Leary 52475df783
Fix various tests due to projects rework 2018-01-16 16:18:18 +00:00
Nick O'Leary 25f4a018d9
Merge branch '0.18' into projects 2018-01-16 11:21: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
Nick O'Leary 9c350311e8
Fix reauthentication of remote repositories 2017-12-21 17:40:24 +00:00
Hideki Nakamura c09a407f4c Delete unnecessary comments & add trace mock function 2017-12-18 21:37:09 +09:00
Hideki Nakamura 3a311c9584 Detect a SSH key generation error 2017-12-15 23:48:52 +09:00
Hideki Nakamura 923893e160 Add SSH key management API 2017-12-07 23:11:24 +09:00
Hideki Nakamura d78916f85f Fix the error occuring during permission check (#1510) 2017-12-06 13:18:36 +00:00
Nick O'Leary fff0b15ae5
Add /settings/user end point 2017-12-04 17:15:17 +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 b1cd13d629
Initial projects implementation 2017-09-20 10:30:07 +01:00
Nick O'Leary 41af5187aa
Reorganise red/api layout to better componentise 2017-08-22 22:26:29 +01:00
Nick O'Leary f9769a73fe
Retry auto-install of modules that fail
- introduces autoInstallModulesRetry - default 30000
 - backs off interval if repeated failures
 - fixes notification to the editor of an auto-reinstall
2017-07-08 17:30:17 +01:00
Nick O'Leary 1542f73fa5
Fix global leaks in theme.js 2017-07-04 09:43:16 +01:00
Nick O'Leary 70a22187f7
editorTheme not setting custom css/scripts properly 2017-07-04 09:33:27 +01:00
Nick O'Leary e13d410b4a
Update tests for oauth -> strategy rename 2017-04-21 22:06:12 +01:00
Nick O'Leary c54cf26848
Add support for oauth adminAuth configs 2017-04-12 10:09:03 +01:00
David 62b29ecb65 Make theme able to load custom javascript (#1211)
* Make theme able to load custom javascript
- Look for the field 'customScript' in editorTheme (settings.js)
- Add it to mustach context
- Load list on template side (index.mst)

* Add unit tests for customScripts

* Code review edits : generic behavior for theme.page.[css|scripts]
- Use the same way to share css and javascript files from a theme
- Allow string instead of array for theme.page.scripts
- Remove old customScript field
2017-04-10 15:46:44 +01:00
Nick O'Leary fca77a868f
Allow a node to declare settings that should be exported 2017-03-01 15:01:07 +00:00
Nick O'Leary 869fdbcc6a
Remove event passing for icons/examples from the api layer 2017-02-15 23:07:50 +00:00
Nick O'Leary 0857f979ff
Update ui_spec for icon module path 2017-01-18 13:14:12 +00:00
Nick O'Leary 0a96259ddf
Update copyright header for JS Foundation 2017-01-11 15:24:33 +00:00
Nick O'Leary 49f72881f4 Disable palette editor if npm not found 2016-10-12 22:30:32 +01:00
Nick O'Leary b3796a8e24 Fix unit tests for /flows 2016-10-12 10:33:51 +01:00
Nick O'Leary 42f7dc1947 Fix type checking in unit tests 2016-10-10 13:27:43 +01:00
Nick O'Leary b4be1184fd Add v2 /flows api and deploy-overwrite protection 2016-10-09 22:02:40 +01:00
Nick O'Leary 78b1bf8f25 Merge branch '0.14.0' 2016-06-17 21:30:09 +01:00
Dave Conway-Jones 7fc056c8e3 remove extraneous udp console.log
and two tiny whitespace changes
2016-06-17 08:18:26 +01:00
Nick O'Leary b5d3f505e3 Defer loading of token sessions until they are accessed
Fixes #895
2016-05-31 14:39:50 +01:00
Josh 3454e5ac77 Flows lib honours flowFilePretty setting (#837)
* Flow lib now adheres to pretty flow file, ui also adheres to this as well

* added settings mock object in flows_spec get api test

* reverted api changes, fixed parse of flow only

* try spell flows correctly
2016-05-17 22:09:57 +01:00
Nick O'Leary 9e26aeea1d Handle scoped node modules in the api 2016-05-17 21:56:03 +01:00
Dave Conway-Jones 4bc482bc85 update load of grunt related versions
and mqtt and fs-extra and should. Fix tests to keep working.
2016-04-18 12:40:08 +01:00
Nick O'Leary 44693dd23a Enable finer grained permissions in adminAuth 2016-04-10 15:30:13 +01:00
Nick O'Leary 0cd4a2b4ec Add api/flow_spec tests
Part of #840
2016-03-18 21:01:21 +00:00
Nick O'Leary e941c22f6c Warn if editor routes are accessed but runtime not started
Closes #816
2016-03-12 00:03:50 +00:00