From 0c13603185e69376a33ff4ef38fb5370d2a560e1 Mon Sep 17 00:00:00 2001 From: Dave Conway-Jones Date: Sun, 7 Apr 2019 16:23:17 +0100 Subject: [PATCH] let status be simple text if wanted --- packages/node_modules/@node-red/runtime/lib/nodes/Node.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/node_modules/@node-red/runtime/lib/nodes/Node.js b/packages/node_modules/@node-red/runtime/lib/nodes/Node.js index b7d44c7b5..b1003d717 100644 --- a/packages/node_modules/@node-red/runtime/lib/nodes/Node.js +++ b/packages/node_modules/@node-red/runtime/lib/nodes/Node.js @@ -306,8 +306,11 @@ Node.prototype.metric = function(eventname, msg, metricValue) { /** * status: { fill:"red|green", shape:"dot|ring", text:"blah" } + * or + * status: "simple text status" */ Node.prototype.status = function(status) { + if (typeof(status) === "string") { status = {text:status}; } this._flow.handleStatus(this,status); };