From 39d90fe88172e0b33312fbf1cc4c650d5959ad52 Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Mon, 19 Sep 2016 09:36:38 +0100 Subject: [PATCH] Update mqtt-broker node to use fully name-space qualified status messages --- nodes/core/io/10-mqtt.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/nodes/core/io/10-mqtt.js b/nodes/core/io/10-mqtt.js index 118bfc78c..985620c35 100644 --- a/nodes/core/io/10-mqtt.js +++ b/nodes/core/io/10-mqtt.js @@ -175,7 +175,7 @@ module.exports = function(RED) { node.log(RED._("mqtt.state.connected",{broker:(node.clientid?node.clientid+"@":"")+node.brokerurl})); for (var id in node.users) { if (node.users.hasOwnProperty(id)) { - node.users[id].status({fill:"green",shape:"dot",text:"common.status.connected"}); + node.users[id].status({fill:"green",shape:"dot",text:"node-red:common.status.connected"}); } } // Remove any existing listeners before resubscribing to avoid duplicates in the event of a re-connection @@ -205,7 +205,7 @@ module.exports = function(RED) { node.client.on("reconnect", function() { for (var id in node.users) { if (node.users.hasOwnProperty(id)) { - node.users[id].status({fill:"yellow",shape:"ring",text:"common.status.connecting"}); + node.users[id].status({fill:"yellow",shape:"ring",text:"node-red:common.status.connecting"}); } } }) @@ -216,7 +216,7 @@ module.exports = function(RED) { node.log(RED._("mqtt.state.disconnected",{broker:(node.clientid?node.clientid+"@":"")+node.brokerurl})); for (var id in node.users) { if (node.users.hasOwnProperty(id)) { - node.users[id].status({fill:"red",shape:"ring",text:"common.status.disconnected"}); + node.users[id].status({fill:"red",shape:"ring",text:"node-red:common.status.disconnected"}); } } } else if (node.connecting) { @@ -329,7 +329,7 @@ module.exports = function(RED) { } var node = this; if (this.brokerConn) { - this.status({fill:"red",shape:"ring",text:"common.status.disconnected"}); + this.status({fill:"red",shape:"ring",text:"node-red:common.status.disconnected"}); if (this.topic) { node.brokerConn.register(this); this.brokerConn.subscribe(this.topic,this.qos,function(topic,payload,packet) { @@ -341,7 +341,7 @@ module.exports = function(RED) { node.send(msg); }, this.id); if (this.brokerConn.connected) { - node.status({fill:"green",shape:"dot",text:"common.status.connected"}); + node.status({fill:"green",shape:"dot",text:"node-red:common.status.connected"}); } } else { @@ -369,7 +369,7 @@ module.exports = function(RED) { var node = this; if (this.brokerConn) { - this.status({fill:"red",shape:"ring",text:"common.status.disconnected"}); + this.status({fill:"red",shape:"ring",text:"node-red:common.status.disconnected"}); this.on("input",function(msg) { if (msg.qos) { msg.qos = parseInt(msg.qos); @@ -391,7 +391,7 @@ module.exports = function(RED) { } }); if (this.brokerConn.connected) { - node.status({fill:"green",shape:"dot",text:"common.status.connected"}); + node.status({fill:"green",shape:"dot",text:"node-red:common.status.connected"}); } node.brokerConn.register(node); this.on('close', function(done) {