Import Flow problem

500 views
Skip to first unread message

Toshi Bass

unread,
Jun 16, 2015, 2:04:45 PM6/16/15
to node...@googlegroups.com
Did I screw up this new installation of node-red on a pi b+ everything works fine except I cannot import a flow (any flow) I paste in the code but the OK button stays greyed out, any ideas ? 
Capture.PNG

Nicholas O'Leary

unread,
Jun 16, 2015, 2:16:18 PM6/16/15
to node...@googlegroups.com

The button stays greyed out if the text in the box doesn't parse as valid json so that's the first thing to check.

If you think it is valid, it is possible the event handling hasn't fired to get it to try parsing it. Type a couple characters in the box (and delete them). If that then enables the button, please let me know what browser you're using so I can investigate.

Nick


On Tue, 16 Jun 2015 19:04 Toshi Bass <toshib...@gmail.com> wrote:
Did I screw up this new installation of node-red on a pi b+ everything works fine except I cannot import a flow (any flow) I paste in the code but the OK button stays greyed out, any ideas ? 

--
http://nodered.org
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Toshi Bass

unread,
Jun 16, 2015, 2:34:15 PM6/16/15
to node...@googlegroups.com
Hi Nick

Tried several flows from  http://flows.nodered.org/  none will import, tried typing in a couple characters in the box and deleted them as sugested, same same all I can do is press cancel OK stays grayed out.

Using google chrome  version 43.0.2357.124 m  don't think that's the problem I have another instance of node-red running on a different pi and I can open that in a separate window on the same browser and import the same flows to that one, no problem. 

Toshi

Max Hadley

unread,
Jun 16, 2015, 3:09:15 PM6/16/15
to node...@googlegroups.com
I got caught by this one: seemingly it isn't valid JSON unless it ends with a newline. Move the cursor past the end of the pasted text and press return. The OK button should be enabled. I've been meaning to file a bug report about this. Also, IIRC, the dialog text refers to pasting a node, not a flow, which we found confusing. Naturally, this happened while demonstrating Node-RED to a neophyte...

Max

Nicholas O'Leary

unread,
Jun 16, 2015, 3:45:45 PM6/16/15
to Node-RED Mailing LIst
Toshi - I assume you are running v0.10.6 on the other Pi as well? The enabling of the button was introduced in 0.10.6, so if your other pi was still running an earlier version, that wouldn't help us figure out what is happening here.

I've tried both Chrome (39) and Firefox (38) and cannot get it to misbehave. White space before/after the flow itself makes no difference.

 - starting from a blank input, I type "[ ]" - as soon as I type the closing bracket, the okay button enables.
 - I paste a flow from the library, the okay button enables straight away - no new line needed.

Nick


On 16 June 2015 at 20:09, Max Hadley <m...@zepler.org> wrote:
I got caught by this one: seemingly it isn't valid JSON unless it ends with a newline. Move the cursor past the end of the pasted text and press return. The OK button should be enabled. I've been meaning to file a bug report about this. Also, IIRC, the dialog text refers to pasting a node, not a flow, which we found confusing. Naturally, this happened while demonstrating Node-RED to a neophyte...

Max

Toshi Bass

unread,
Jun 16, 2015, 4:12:27 PM6/16/15
to node...@googlegroups.com

OK problem solved.

Nick your right when I type [ and as soon as I type ] the OK button does becomes available.

Max your right when I copy a flow from  http://flows.nodered.org/  and paste it into the import node box the OK button is grayed out .. the cursor is already positioned after the last ] if I now press the return key the OK button becomes available and I can import the flow.

This is not what happens in my previous install but that is not a up to date version of node-red so I guess something changed.

Thanks

Toshi

Max Hadley

unread,
Jun 16, 2015, 4:57:29 PM6/16/15
to node...@googlegroups.com
It's a bit more subtle than I thought. If I paste into the dialog using the right-button menu, I get the behaviour where a <return> (or a space) is needed to enable the button, but if I paste using the cmd-V keyboard shortcut, the button is enabled immediately. This happens on both Safari & Chrome (on Mac OS X). It looks as if the button enable is being triggered by a keyup or keydown event (presumably via jQuery) not the contents actually changing.

Max

Nicholas O'Leary

unread,
Jun 16, 2015, 5:02:29 PM6/16/15
to Node-RED Mailing LIst
Ah yes - well spotted. Shame I've just shipped 0.10.8.... will fix it for 0.11 :)

Max Hadley

unread,
Jun 16, 2015, 5:04:54 PM6/16/15
to node...@googlegroups.com
Timing is everything - unfortunately! :)

Nicholas O'Leary

unread,
Jun 17, 2015, 5:22:07 PM6/17/15
to Node-RED Mailing LIst
You'll be glad to hear the dialog now handles mouse-only pastes. Will be in the next release.

Nick
Reply all
Reply to author
Forward
0 new messages