Remove 'retined' property from node.status calls

This commit is contained in:
Nick O'Leary
2014-05-30 20:30:26 +01:00
parent 2cdaed1325
commit 70147d0b6b
6 changed files with 32 additions and 32 deletions

View File

@@ -79,7 +79,7 @@ module.exports = function(RED) {
this.brokerConfig = RED.nodes.getNode(this.broker);
var node = this;
if (this.brokerConfig) {
this.status({fill:"red",shape:"ring",text:"disconnected"},true);
this.status({fill:"red",shape:"ring",text:"disconnected"});
this.client = connectionPool.get(this.brokerConfig.broker,this.brokerConfig.port,this.brokerConfig.clientid,this.brokerConfig.username,this.brokerConfig.password);
var node = this;
this.client.subscribe(this.topic,2,function(topic,payload,qos,retain) {
@@ -90,10 +90,10 @@ module.exports = function(RED) {
node.send(msg);
});
this.client.on("connectionlost",function() {
node.status({fill:"red",shape:"ring",text:"disconnected"},true);
node.status({fill:"red",shape:"ring",text:"disconnected"});
});
this.client.on("connect",function() {
node.status({fill:"green",shape:"dot",text:"connected"},true);
node.status({fill:"green",shape:"dot",text:"connected"});
});
this.client.connect();
} else {
@@ -131,10 +131,10 @@ module.exports = function(RED) {
}
});
this.client.on("connectionlost",function() {
node.status({fill:"red",shape:"ring",text:"disconnected"},true);
node.status({fill:"red",shape:"ring",text:"disconnected"});
});
this.client.on("connect",function() {
node.status({fill:"green",shape:"dot",text:"connected"},true);
node.status({fill:"green",shape:"dot",text:"connected"});
});
this.client.connect();