1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

debug node - show ring at start until first msg

This commit is contained in:
Dave Conway-Jones 2018-09-05 09:45:34 +01:00
parent 8123828113
commit c667a0e74c
No known key found for this signature in database
GPG Key ID: 9E7F9C73F5168CD4

View File

@ -20,7 +20,7 @@ module.exports = function(RED) {
this.severity = n.severity || 40; this.severity = n.severity || 40;
this.active = (n.active === null || typeof n.active === "undefined") || n.active; this.active = (n.active === null || typeof n.active === "undefined") || n.active;
if (this.tostatus) { if (this.tostatus) {
this.oldStatus = {fill:"grey", shape:this.active?"dot":"ring"}; this.oldStatus = {fill:"grey", shape:"ring"};
this.status(this.oldStatus); this.status(this.oldStatus);
} }
else { this.status({}); } else { this.status({}); }
@ -131,7 +131,7 @@ module.exports = function(RED) {
node.active = false; node.active = false;
res.sendStatus(201); res.sendStatus(201);
if (node.tostatus && node.hasOwnProperty("oldStatus")) { if (node.tostatus && node.hasOwnProperty("oldStatus")) {
node.oldStatus.shape = "ring"; node.oldStatus.shape = "dot";
node.status(node.oldStatus); node.status(node.oldStatus);
} }
} else { } else {