Hi folks,
Got an issue on Github for my node-red-contrib-ui-heatmap node. After some discussions and digging into the code, it seems there are a few things incorrect in my node, but I'm running out of ideas ...
This is the second problem:
My heatmap UI widget tries to load a javascript library heatmap.min.js (from the Node-RED server):
<script src="heatmap/js/heatmap.min.js"></script>
The server side will return the heatmap.min.js as soon as a request arrives:
RED.httpNode.get('/ui/heatmap/js/*', function(req, res){
In my case this works fine, but the other user's dashboard couldn't load the case:
- In my case the request is http://.../ui/heatmap/js/heatmap.min.js, which matches the required pattern and the file is loaded without problems.
- In the user's case the request is http://.../dashboard/heatmap/js/heatmap.min.js which doesn't match, so it will never be redirected to the request handler...
The cause seemed to be that the user had changed the path (in the settings.js file) to 'dashboard' instead of 'ui':
// If you installed the optional node-red-dashboard you can set it's path
// relative to httpRoot
//ui: { path: "ui" },
Is there an easy way to support such custom paths? Should I remove the 'ui' from my path, or should I load the path from the settings and use it in my path automatically, or ... ?
Thanks !
Bart