From 289815e12878aabb4bdae86375295440771f765d Mon Sep 17 00:00:00 2001 From: Hiroyasu Nishiyama Date: Tue, 25 Jan 2022 20:46:01 +0900 Subject: [PATCH] add support of FLOW_ID & FLOW_NAME --- packages/node_modules/@node-red/runtime/lib/flows/Flow.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/node_modules/@node-red/runtime/lib/flows/Flow.js b/packages/node_modules/@node-red/runtime/lib/flows/Flow.js index 5fb21157e..62ec10ce3 100644 --- a/packages/node_modules/@node-red/runtime/lib/flows/Flow.js +++ b/packages/node_modules/@node-red/runtime/lib/flows/Flow.js @@ -498,7 +498,13 @@ class Flow { * @return {[type]} [description] */ getSetting(key) { - const flow = this.flow; + const flow = this.flow; + if (key === "FLOW_NAME") { + return flow.label; + } + if (key === "FLOW_ID") { + return flow.id; + } if (flow.credentials === undefined) { flow.credentials = credentials.get(flow.id) || {}; }