Displaying the value above the node

Is there a way to display the value of the node above the node itself.
Lets say u have inject node set to boolean(true). Is there a way or a node that will display the msg.payload above the node.


Something like this
Like websocket node has text connected or disconnected underneath it

Sounds like you want something along the lines of the below in your function node, which looks like the image. Documentation here: Adding Status

if(msg.payload === true) {
    node.status({fill:"green", shape:"dot", text:msg.payload});
}
else {
    node.status({fill:"red", shape:"ring", text:msg.payload});
}

Exactly that! Can i somehow make the font size bigger tho?
And can i get the status above the subflow node?

With a bit of difficulty!

You'll need to edit your settings.js to use a custom theme file (code block 1), then add code block 2 to said css file. The path is platform dependent, but for this a file that is simply called themes.css in your NR directory will suffice. Ignore my dark theme, you'll just get the transformed label. Feel free to play with it in terms of size, colour and position. This does affect ALL statuses on ALL nodes, which may or may not be what you want.

    editorTheme: {
		page: {
			css: [
				"C:/Users/jake123/.node-red/theme.css"
			]
		},
        projects: {
            // To enable the Projects feature, set this value to true
            enabled: false
        }
    }
.red-ui-flow-node-status-group {
	transform: translateY(-15px);
}
.red-ui-flow-node-status-label {
	font-size: x-large;
}

image

I worked this out using inspect element in chrome, get a bit familiar with that and you can work out how to theme the entire editor!

1 Like

Just don't get carried away :slight_smile: The Editor is not designed as a dashboard.

Also, don't forget that the debug node also has status on it so you don't need a function node for that.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.