bartbutenaers / node-red-contrib-ui-svg

A Node-RED widget node to show interactive SVG (vector graphics) in the dashboard
Apache License 2.0
93 stars 27 forks source link

Refresh required when incorrect url #62

Closed bartbutenaers closed 4 years ago

bartbutenaers commented 4 years ago

When the dashboard is being used over https but the drawsvg url is http (in Settings tab) then then iframe stays empty. And a browser refresh is required to get back to the flow editor :-(

Changing the Drawsvg from http to https is a workaround ...

See for example this discussion.

boisei0 commented 4 years ago

Bart, can the URL field be populated dynamically? Like checking if the browser viewing the form is connecting over http or https and creating and filling the URL based on that.

bartbutenaers commented 4 years ago

Hey Lena, Thanks for your feedback!

image

The user needs to enter the url of the cloud service, or the url of the local service (if node-red-contrib-drawsvg is being used). The refresh button - after the url input fields - updates the field with the default (http) url.

But there are some issues with CORS unfortunately. I have described those issues at the time being on the readme page. Therefore I have no general solution yet. If you have any ideas or suggestions, don't hesitate to let me know!

BTW. Whatever reason the URL cannot be reached, it should at least show an alert popup and return to the Node-RED editor (instead of freezing). But need to dig into this whenever I find time, because @Steve-Mcl was the jschannel expert of this node ;-)

Bart

boisei0 commented 4 years ago

The gears have started spinning in my head. I’ve a couple (vague) ideas that could work, but I’ll let you know when I’ve more clarity.

bartbutenaers commented 4 years ago

Solved. See other issue.