let status be simple text if wanted

This commit is contained in:
Dave Conway-Jones 2019-04-07 16:23:17 +01:00
parent 59fb4ea6f8
commit 0c13603185
No known key found for this signature in database
GPG Key ID: 9E7F9C73F5168CD4
1 changed files with 3 additions and 0 deletions

View File

@ -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);
};