Skip to content

Commit

Permalink
Read service root path from the settings
Browse files Browse the repository at this point in the history
Update frontend API's service root path from the Node-RED settings in
order to set a different root path for the whole Node-RED instance in
settings.js.
  • Loading branch information
pkronstrom committed Mar 19, 2019
1 parent ffda4e3 commit e7326b3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/nodes/victron-nodes.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@

<script type="text/javascript">
/* Common functions */
const serviceRoot = '/victron/services/';

const serviceRoot = (RED.settings.httpNodeRoot || RED.settings.httpAdminRoot || "").replace(/\/$/,"") + '/victron/services/';

function buildEditPanel(node, serviceUrl, isOutputNode, nodeLabel) {
let serviceElem = $('#node-input-service');
Expand Down

0 comments on commit e7326b3

Please sign in to comment.