mirror of
https://github.com/node-red/node-red-nodes.git
synced 2025-03-01 10:37:43 +00:00
Update core nodes to pull common msgs from node-red ns
This commit is contained in:
@@ -35,8 +35,8 @@
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="common.label.name"></span></label>
|
||||
<input type="text" id="node-input-name" data-i18n="[placeholder]common.label.name">
|
||||
<label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="node-red:common.label.name"></span></label>
|
||||
<input type="text" id="node-input-name" data-i18n="[placeholder]node-red:common.label.name">
|
||||
</div>
|
||||
<div class="form-tips"><span data-i18n="[html]redisout.tip"></span></div>
|
||||
</script>
|
||||
|
@@ -43,7 +43,7 @@ module.exports = function(RED) {
|
||||
clearTimeout(connection.retry_timer);
|
||||
connection.end();
|
||||
}
|
||||
delete connections[connection._id];
|
||||
delete connections[connection._id];
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -61,17 +61,17 @@ module.exports = function(RED) {
|
||||
this.client = redisConnectionPool.get(this.hostname,this.port);
|
||||
|
||||
if (this.client.connected) {
|
||||
this.status({fill:"green",shape:"dot",text:RED._("common.status.connected")});
|
||||
this.status({fill:"green",shape:"dot",text:RED._("node-red:common.status.connected")});
|
||||
} else {
|
||||
this.status({fill:"red",shape:"ring",text:RED._("common.status.disconnected")},true);
|
||||
this.status({fill:"red",shape:"ring",text:RED._("node-red:common.status.disconnected")},true);
|
||||
}
|
||||
|
||||
var node = this;
|
||||
this.client.on("end", function() {
|
||||
node.status({fill:"red",shape:"ring",text:RED._("common.status.disconnected")});
|
||||
node.status({fill:"red",shape:"ring",text:RED._("node-red:common.status.disconnected")});
|
||||
});
|
||||
this.client.on("connect", function() {
|
||||
node.status({fill:"green",shape:"dot",text:RED._("common.status.connected")});
|
||||
node.status({fill:"green",shape:"dot",text:RED._("node-red:common.status.connected")});
|
||||
});
|
||||
|
||||
this.on("input", function(msg) {
|
||||
|
Reference in New Issue
Block a user