Skip to content

Commit 37ed16f

Browse files
authored
Merge branch 'main' into 7031-immersive-developer-mode-tab
2 parents 87a7f3a + df3ee49 commit 37ed16f

3 files changed

Lines changed: 22 additions & 24 deletions

File tree

docs/user/envvar.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,17 @@ The image below shows an instance with the following environment variables:
4949
Standard environment variables are set for all Node-RED instances running
5050
within the platform:
5151

52-
- `FF_INSTANCE_ID`
53-
- `FF_INSTANCE_NAME`
54-
- `FF_INSTANCE_URL`
52+
- `FF_INSTANCE_ID` - The unique identifier of the instance
53+
- `FF_INSTANCE_NAME` - The name of the instance as set in FlowFuse
54+
- `FF_INSTANCE_URL` - The full URL of the instance (e.g. `https://my-instance.flowfuse.cloud`)
5555

5656
In addition, the following variables are set when running on a device:
5757

58-
- `FF_DEVICE_ID`
59-
- `FF_DEVICE_NAME`
60-
- `FF_DEVICE_TYPE`
61-
- `FF_SNAPSHOT_ID`
62-
- `FF_SNAPSHOT_NAME`
58+
- `FF_DEVICE_ID` - The unique identifier of the device
59+
- `FF_DEVICE_NAME` - The name of the device as set in FlowFuse
60+
- `FF_DEVICE_TYPE` - The device type label assigned in FlowFuse
61+
- `FF_SNAPSHOT_ID` - The unique identifier of the snapshot currently deployed to the device
62+
- `FF_SNAPSHOT_NAME` - The name of the snapshot currently deployed to the device
6363

6464
When deploying the same set of flows out to multiple devices, these variables can
6565
be used by the flows to identify the specific device being run on.

forge/db/controllers/Project.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,8 +318,8 @@ module.exports = {
318318
let customHostname
319319
if (app.config.features.enabled('customHostnames')) {
320320
const projectURL = URL.parse(project.url)
321-
const hostnameSetting = project.ProjectSettings?.filter(setting => setting.key === KEY_CUSTOM_HOSTNAME) || []
322-
customHostname = hostnameSetting[0]?.value ? `${projectURL.protocol}//${hostnameSetting[0].value}` : undefined
321+
const hostnameSetting = project.ProjectSettings?.find(setting => setting.key === KEY_CUSTOM_HOSTNAME)
322+
customHostname = hostnameSetting?.value ? `${projectURL.protocol}//${hostnameSetting.value}` : undefined
323323
}
324324

325325
const result = []

package-lock.json

Lines changed: 12 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)