# cd /usr/lib/node_modules/node-red-dashboard
./node_modules/node-red-dashboard $ sudo svn export https://github.com/node-red/node-red-dashboard.git/tags/2.0.0/src
./node_modules/node-red-dashboard $ sudo npm install angular angular-sanitize angular-animate angular-aria angular-material angular-material-icons svg-morpheus font-awesome sprintf-js jquery jquery-ui raphael justgage d3 nvd3 angularjs-nvd3-directives
./node_modules/node-red-dashboard $ sudo chown -R nobody:pi src node_modules
./node_modules/node-red-dashboard $ sudo mv dist dist_31 Aug 21:16:51 - [info] UI started at /ui
31 Aug 21:16:51 - [info] Using development foldernpm install -g --dev node-red-dashboardThis is the best I got given my limited time,
msg.payload = (msg.payload=='0' ? send({payload: '1'}) : send({payload: '0'}))
<md-button1
ng-style="{background: msg.payload=='1' ?'green':'transparrent'}"
ng-click="msg.payload = (msg.payload=='0' ? '1' : '0'); send(msg) "
>
{{msg.payload == '0' ? 'Off' : 'On'}}
</md-button1>[{"id":"63432ea1.cdf29","type":"ui_template","z":"ba6aa8e3.6fc508","group":"ecba562d.fd9138","name":"","order":0,"width":"2","height":"1","format":"\n\n\n<style>\n:focus {\noutline: 0;\n}\nmd-button1 {\n\t-moz-box-shadow:inset 0px 0px 15px 3px #23395e;\n\t-webkit-box-shadow:inset 0px 0px 15npx 3px #23395e;\n\tbox-shadow:inset 0px 0px 15px 3px #23395e;\n\tbackground:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #2e466e), color-stop(1, #415989));\n\tbackground:-moz-linear-gradient(top, #2e466e 5%, #415989 100%);\n\tbackground:-webkit-linear-gradient(top, #2e466e 5%, #415989 100%);\n\tbackground:-o-linear-gradient(top, #2e466e 5%, #415989 100%);\n\tbackground:-ms-linear-gradient(top, #2e466e 5%, #415989 100%);\n\tbackground:linear-gradient(to bottom, #2e466e 5%, #415989 100%);\n\tfilter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#2e466e', endColorstr='#415989',GradientType=0);\n\tbackground-color:#2e466e;\n\t-moz-border-radius:17px;\n\t-webkit-border-radius:17px;\n\tborder-radius:17px;\n\tborder:1px solid #1f2f47;\n\tdisplay:inline-block;\n\tcursor:pointer;\n\tcolor:#ffffff;\n\tfont-family:Arial;\n\tfont-size:10px;\n\tpadding:10px 10px;\n\ttext-decoration:none;\n\ttext-shadow:0px 1px 0px #263666;\n}\nmd-button1:hover {\n\tbackground:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #415989), color-stop(1, #2e466e));\n\tbackground:-moz-linear-gradient(top, #415989 5%, #2e466e 100%);\n\tbackground:-webkit-linear-gradient(top, #415989 5%, #2e466e 100%);\n\tbackground:-o-linear-gradient(top, #415989 5%, #2e466e 100%);\n\tbackground:-ms-linear-gradient(top, #415989 5%, #2e466e 100%);\n\tbackground:linear-gradient(to bottom, #415989 5%, #2e466e 100%);\n\tfilter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#415989', endColorstr='#2e466e',GradientType=0);\n\tbackground-color:#415989;\n}\nmd-button1:active {\n\tposition:relative;\n\ttop:1px;\n}\n\n// move to md-button code for text color\n// ng-style=\"{color: msg.payload=='1' ?'green':'red'}\" \n\n</style>\n\n\n<md-button1\n ng-style=\"{background: msg.payload=='1' ?'green':'transparrent'}\"\n ng-click=\"msg.payload = (msg.payload=='0' ? '1' : '0'); send(msg) \"\n \n>\n{{msg.payload == '0' ? 'Off' : 'On'}}\n</md-button1>","storeOutMessages":true,"fwdInMessages":true,"x":820,"y":340,"wires":[["15659e9f.d08b31"]]},{"id":"15659e9f.d08b31","type":"debug","z":"ba6aa8e3.6fc508","name":"","active":true,"console":"false","complete":"false","x":987.3888893127441,"y":339.1111145019531,"wires":[]},{"id":"4a642e39.f559e","type":"inject","z":"ba6aa8e3.6fc508","name":"","topic":"","payload":"0","payloadType":"str","repeat":"","crontab":"","once":false,"x":603.5,"y":320,"wires":[["63432ea1.cdf29"]]},{"id":"86a38c3c.9795d","type":"inject","z":"ba6aa8e3.6fc508","name":"","topic":"","payload":"1","payloadType":"str","repeat":"","crontab":"","once":false,"x":604.5,"y":360,"wires":[["63432ea1.cdf29"]]},{"id":"ecba562d.fd9138","type":"ui_group","z":"ba6aa8e3.6fc508","name":"Default","tab":"20b7ae29.e21bf2","disp":true,"width":"6"},{"id":"20b7ae29.e21bf2","type":"ui_tab","z":"ba6aa8e3.6fc508","name":"Home","icon":"dashboard"}] <md-button class="md-cornered" ng-class="msg.payload=='On' ? 'md-accent md-raised md-hue-2' : 'md-primary'" ng-click="msg.payload = (msg.payload=='On' ? 'Off' : 'On');send(msg);" title="Click to turn on/off" > {{(msg.topic.split('/'))[1]}} {{msg.payload}}</md-button>

Thanks Dave, this is what I'm already doing it, but this is only Icons and no TEXT :)
I see in the picture of Toshi he has as well small-text over the LED indicators, this is what I'd like to achieve
--
http://nodered.org
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+unsubscribe@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
For more options, visit https://groups.google.com/d/optout.
ng-style="{color: (msg.payload=='1' ?'black':'white'), background: (msg.payload=='1' ?'orange':'red' ) }" Thanks J
Hi I have started to build a flow to produce a toggle button, I need to be able to update and feedback the state of this button from/to mqtt, blynk and the dashboard.so an input into the button should toggle from 0 to 1 or 1 to 0,on the dashboard it should say Off or On OR red or green or both,if the button is pressed on the dashboard it should toggle the button,and the output from the button should be On / Off OR 0 / 1 to feed back to mqtt etcSo as it stands the button functions as I want BUT I cannot figure out how to change the color of the button when the button state changes 0 or 1 OR change the text on the button when the button state changes 0 or 1 OR preferably bothI have spent hours on this, now I am getting nowhere (or perhaps there's a better way) please help.Thanks[{"id":"5eb00add.679944","type":"ui_template","z":"b3674429.a21f68","group":"b67239fb.725888","name":"Toggle button","order":4,"width":"2","height":"1","format":"\n\n\n<style>\n:focus {\noutline: 0;\n}\nmyButton5 {\n\t-moz-box-shadow:inset 0px 0px 15px 3px #23395e;\n\t-webkit-box-shadow:inset 0px 0px 15px 3px #23395e;\n\tbox-shadow:inset 0px 0px 15px 3px #23395e;\n\tbackground:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #2e466e), color-stop(1, #415989));\n\tbackground:-moz-linear-gradient(top, #2e466e 5%, #415989 100%);\n\tbackground:-webkit-linear-gradient(top, #2e466e 5%, #415989 100%);\n\tbackground:-o-linear-gradient(top, #2e466e 5%, #415989 100%);\n\tbackground:-ms-linear-gradient(top, #2e466e 5%, #415989 100%);\n\tbackground:linear-gradient(to bottom, #2e466e 5%, #415989 100%);\n\tfilter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#2e466e', endColorstr='#415989',GradientType=0);\n\tbackground-color:#2e466e;\n\t-moz-border-radius:17px;\n\t-webkit-border-radius:17px;\n\tborder-radius:17px;\n\tborder:1px solid #1f2f47;\n\tdisplay:inline-block;\n\tcursor:pointer;\n\tcolor:#ffffff;\n\tfont-family:Arial;\n\tfont-size:10px;\n\tpadding:10px 10px;\n\ttext-decoration:none;\n\ttext-shadow:0px 1px 0px #263666;\n}\nmyButton5:hover {\n\tbackground:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #415989), color-stop(1, #2e466e));\n\tbackground:-moz-linear-gradient(top, #415989 5%, #2e466e 100%);\n\tbackground:-webkit-linear-gradient(top, #415989 5%, #2e466e 100%);\n\tbackground:-o-linear-gradient(top, #415989 5%, #2e466e 100%);\n\tbackground:-ms-linear-gradient(top, #415989 5%, #2e466e 100%);\n\tbackground:linear-gradient(to bottom, #415989 5%, #2e466e 100%);\n\tfilter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#415989', endColorstr='#2e466e',GradientType=0);\n\tbackground-color:#415989;\n}\nmyButton5:active {\n\tposition:relative;\n\ttop:1px;\n}\n\n</style>\n<script>\n\nmyDiv5.innerHTML = (\"Off\");\n\n\n\n</script>\n\n<myButton5 ng-click=\"send({payload: 1})\"><div id=\"myDiv5\"></div></myButton5>\n\n","storeOutMessages":false,"fwdInMessages":true,"x":353,"y":125,"wires":[["4c6e85c4.01604c"]]},{"id":"ceb09fb0.52078","type":"debug","z":"b3674429.a21f68","name":"","active":true,"console":"false","complete":"false","x":698,"y":99,"wires":[]},{"id":"4c6e85c4.01604c","type":"function","z":"b3674429.a21f68","name":"","func":"\ncontext.global.u_toggle = context.global.u_toggle || 0;\nmsg1={};\nmsg2={};\nif (context.global.u_toggle === 0){\n node.status({fill:\"gray\",shape:\"ring\",text:\"On\"});\n context.global.u_toggle = 1; \n msg1.payload = 1;\n msg2.payload = \"On\";\n} else {\n node.status({fill:\"gray\",shape:\"dot\",text:\"Off\"}); \n context.global.u_toggle = 0;\n msg1.payload = 0;\n msg2.payload = \"Off\";\n} \n return [msg1,msg2];","outputs":"2","noerr":0,"x":512,"y":125,"wires":[["ceb09fb0.52078"],["906d4625.10a578"]]},{"id":"906d4625.10a578","type":"debug","z":"b3674429.a21f68","name":"","active":true,"console":"false","complete":"false","x":698,"y":159,"wires":[]},{"id":"5444cb83.c23f74","type":"inject","z":"b3674429.a21f68","name":"mqtt Toggle","topic":"","payload":"1","payloadType":"num","repeat":"","crontab":"","once":false,"x":173,"y":125,"wires":[["5eb00add.679944"]]},{"id":"b67239fb.725888","type":"ui_group","z":"b3674429.a21f68","name":"Default","tab":"7f9b3a32.177a94","disp":true,"width":"6"},{"id":"7f9b3a32.177a94","type":"ui_tab","z":"b3674429.a21f68","name":"Home","icon":"dashboard"}]