Obtaining httpAdminRoot in a function node in a subflow

Hi There!

The background to this question is this decision tree flow:

decisiontree4

I use subflows to create questions that are interconnected so that a questionnaire is generated but also the flow can be used as part of another flow.

What I would like to do is create links to the question nodes, i.e., at the bottom of the dashboard template there should be a link to the node which represents the question.

Using the deeplinking feature of Node-RED 3.1.x, the link would be in the form of http://noderedhost:1880/httpAdminRoot/#node/node-id - the link needs to be generated in the subflow - that's the problem.

Getting the node-id in a subflow isn't the problem, that's just: node.id.split("-")[0] (This is inside a function node inside the subflow, the node id is a combination of two ids, hence the split on minus.)

I haven't yet figured out how to get the httpAdminRoot to complete the link (I would ignore the host put since the dashboard is hosted on the same instance). I can't just do /#node/node-id since the user (like me) might have configured a httpAdminRoot in the settings.js.

Any pointers would be appreciated!

Cheers!

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.