Big "Status" node for node-red.
[{"id":"85ae4fd9.7a51b","type":"bigstatus","z":"f14e3f02.0eb1c","name":"final status","locale":"fr","show_duration":true,"x":470,"y":1160,"wires":[[]]},{"id":"1c132ddd.e3ecd2","type":"inject","z":"f14e3f02.0eb1c","name":"manual","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":90,"y":1200,"wires":[["66f14cb0.990eb4"]]},{"id":"66f14cb0.990eb4","type":"function","z":"f14e3f02.0eb1c","name":"manual","func":"msg.control = { \"start\": msg.payload, \"end\": new Date(), \"state\": \"end\", \"message\": \"Le travail est fait en ... \" };\nreturn msg;","outputs":1,"noerr":0,"x":260,"y":1200,"wires":[["85ae4fd9.7a51b"]]},{"id":"29478e0f.d6b872","type":"inject","z":"f14e3f02.0eb1c","name":"reset","topic":"","payload":"","payloadType":"str","repeat":"","crontab":"","once":false,"x":90,"y":1160,"wires":[["85ae4fd9.7a51b"]]},{"id":"52c20565.ad3dfc","type":"bigstatus","z":"f14e3f02.0eb1c","name":"","locale":"","x":470,"y":1440,"wires":[["c7867de3.38798"]]},{"id":"b2230bc0.4ddcf8","type":"inject","z":"f14e3f02.0eb1c","name":"ok!","topic":"","payload":"Everything if fine!","payloadType":"str","repeat":"","crontab":"","once":false,"x":90,"y":1280,"wires":[["33ced4cb.cc312c"]]},{"id":"33ced4cb.cc312c","type":"function","z":"f14e3f02.0eb1c","name":"green dot","func":"msg = { shape: \"dot\", fill: \"green\", text: msg.payload }\nreturn msg;","outputs":1,"noerr":0,"x":260,"y":1280,"wires":[["52c20565.ad3dfc"]]},{"id":"c7867de3.38798","type":"debug","z":"f14e3f02.0eb1c","name":"text","active":true,"console":"false","complete":"payload","x":630,"y":1440,"wires":[]},{"id":"6dd4ca24.922b34","type":"inject","z":"f14e3f02.0eb1c","name":"warn!","topic":"","payload":"Beware, this is a warning!","payloadType":"str","repeat":"","crontab":"","once":false,"x":90,"y":1400,"wires":[["5ffc6fc7.a0039"]]},{"id":"5ffc6fc7.a0039","type":"function","z":"f14e3f02.0eb1c","name":"yellow !","func":"msg = { shape: \"ring\", fill: \"yellow\", text: msg.payload }\nreturn msg;","outputs":1,"noerr":0,"x":260,"y":1400,"wires":[["52c20565.ad3dfc"]]},{"id":"447f3aa6.bb80c4","type":"inject","z":"f14e3f02.0eb1c","name":"error!","topic":"","payload":"Something went wrong, oh damn!","payloadType":"str","repeat":"","crontab":"","once":false,"x":90,"y":1340,"wires":[["42faad24.bd0554"]]},{"id":"42faad24.bd0554","type":"function","z":"f14e3f02.0eb1c","name":"red ring","func":"msg = { shape: \"ring\", fill: \"red\", text: msg.payload }\nreturn msg;","outputs":1,"noerr":0,"x":260,"y":1340,"wires":[["52c20565.ad3dfc"]]},{"id":"364464d9.c9bb9c","type":"inject","z":"f14e3f02.0eb1c","name":"blue!","topic":"","payload":"I'm blue!","payloadType":"str","repeat":"","crontab":"","once":false,"x":90,"y":1480,"wires":[["4dd3bd6f.b22c44"]]},{"id":"fba5ceac.045a3","type":"inject","z":"f14e3f02.0eb1c","name":"grey!","topic":"","payload":"I'm grey!","payloadType":"str","repeat":"","crontab":"","once":false,"x":90,"y":1540,"wires":[["67e5971c.981a68"]]},{"id":"4dd3bd6f.b22c44","type":"function","z":"f14e3f02.0eb1c","name":"blue ring","func":"msg = { shape: \"ring\", fill: \"blue\", text: msg.payload }\nreturn msg;","outputs":1,"noerr":0,"x":260,"y":1480,"wires":[["52c20565.ad3dfc"]]},{"id":"67e5971c.981a68","type":"function","z":"f14e3f02.0eb1c","name":"grey ring","func":"msg = { shape: \"ring\", fill: \"grey\", text: msg.payload }\nreturn msg;","outputs":1,"noerr":0,"x":260,"y":1540,"wires":[["52c20565.ad3dfc"]]},{"id":"57cf2558.a830dc","type":"comment","z":"f14e3f02.0eb1c","name":"Big Status sample","info":"","x":120,"y":1120,"wires":[]},{"id":"be20898b.41df78","type":"inject","z":"f14e3f02.0eb1c","name":"Black","topic":"","payload":"Black!","payloadType":"str","repeat":"","crontab":"","once":false,"x":90,"y":1600,"wires":[["931d9e22.6ce26"]]},{"id":"931d9e22.6ce26","type":"function","z":"f14e3f02.0eb1c","name":"grey ring","func":"msg = { shape: \"ring\", text: msg.payload }\nreturn msg;","outputs":1,"noerr":0,"x":260,"y":1600,"wires":[["52c20565.ad3dfc"]]}]
[{"id":"989581aa.676a8","type":"comment","z":"f14e3f02.0eb1c","name":"Status sample with Big Nodes","info":"","x":160,"y":860,"wires":[]},{"id":"62543d4d.9dabc4","type":"inject","z":"f14e3f02.0eb1c","name":"cron","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":110,"y":960,"wires":[["6212bdba.9ded44","54baa663.ab4558"]]},{"id":"6212bdba.9ded44","type":"moment","z":"f14e3f02.0eb1c","name":"last","topic":"","input":"payload","format":"fromNow","locale":"fr","output":"payload","x":270,"y":900,"wires":[["2ac993de.d5366c"]]},{"id":"2ac993de.d5366c","type":"bigstatus","z":"f14e3f02.0eb1c","name":"last run","locale":"","x":420,"y":900,"wires":[[]]},{"id":"f203749d.0dfc88","type":"bigstatus","z":"f14e3f02.0eb1c","name":"final status","locale":"","x":690,"y":1020,"wires":[["52cb0970.ad34f8"]]},{"id":"ef05ac63.10fa5","type":"status","z":"f14e3f02.0eb1c","name":"reset","scope":["4f77483e.b088b8","2ac993de.d5366c"],"x":530,"y":1060,"wires":[["f203749d.0dfc88"]]},{"id":"54baa663.ab4558","type":"bigexec","z":"f14e3f02.0eb1c","name":"Some job","command":"sh","commandArgs":"-c 'sleep 2; exit $(expr $(date +%s) % 2);'","minError":1,"minWarning":1,"cwd":"","shell":"","extraArgumentProperty":"","envProperty":"","format":"utf8","limiter":true,"payloadIs":"triggerNoStdin","x":280,"y":1020,"wires":[[],["f203749d.0dfc88"],[]]},{"id":"52cb0970.ad34f8","type":"debug","z":"f14e3f02.0eb1c","name":"","active":true,"console":"false","complete":"true","x":850,"y":1020,"wires":[]},{"id":"71872656.8e78d8","type":"comment","z":"f14e3f02.0eb1c","name":"Big Status is connected to the second output","info":"","x":530,"y":980,"wires":[]}]
This code is Open Source under an Apache 2 License.
You may not use this code except in compliance with the License. You may obtain an original copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. Please see the
License for the specific language governing permissions and limitations under the License.