Node status

Whilst running, a node is able to share status information with the editor UI. For example, the MQTT nodes can indicate if they are currently connected or not.

To set its current status, a node uses the status function. For example, the following two calls are used by the MQTT node to set the statuses seen in the image above:

this.status({fill:"red",shape:"ring",text:"disconnected"});

this.status({fill:"green",shape:"dot",text:"connected"});

By default, the node status information is not displayed in the editor. It can be enabled by selecting the Status option in the drop-down menu.

Status object

A status object consists of three properties: fill, shape and text.

The first two define the appearance of the status icon and the third is an optional short piece of text (under <20 characters) to display alongside the icon.

The shape property can be: ring or dot.

The fill property can be: red, green, yellow, blue or grey

This allows for the following icons to be used:

Additional shapes and colours may get added in the future.

If the status object is an empty object, {}, then the status entry is cleared from the node.