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
1 changed files with 2 additions and 2 deletions

View File

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