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:
		| @@ -30,8 +30,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]arduino.tip.io"></span></div> | ||||
| </script> | ||||
| @@ -86,8 +86,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]arduino.tip.io"></span></div> | ||||
| </script> | ||||
|   | ||||
| @@ -75,9 +75,9 @@ module.exports = function(RED) { | ||||
|         if (typeof this.serverConfig === "object") { | ||||
|             this.board = this.serverConfig.board; | ||||
|             var node = this; | ||||
|             node.status({fill:"red",shape:"ring",text:RED._("common.status.connecting")}); | ||||
|             node.status({fill:"red",shape:"ring",text:RED._("node-red:common.status.connecting")}); | ||||
|             node.board.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")}); | ||||
|                 //console.log("i",node.state,node.pin); | ||||
|                 if (node.state == "ANALOG") { | ||||
|                     node.board.on('analogChange', function(e) { | ||||
| @@ -122,10 +122,10 @@ module.exports = function(RED) { | ||||
|         if (typeof this.serverConfig === "object") { | ||||
|             this.board = this.serverConfig.board; | ||||
|             var node = this; | ||||
|             node.status({fill:"red",shape:"ring",text:RED._("common.status.connecting")}); | ||||
|             node.status({fill:"red",shape:"ring",text:RED._("node-red:common.status.connecting")}); | ||||
|  | ||||
|             node.board.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")}); | ||||
|                 //console.log("o",node.state,node.pin); | ||||
|                 node.board.pinMode(node.pin, node.state); | ||||
|                 node.on("input", function(msg) { | ||||
|   | ||||
| @@ -20,8 +20,8 @@ | ||||
|         <input type="text" id="node-input-serial"> | ||||
|     </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> | ||||
| </script> | ||||
|  | ||||
| @@ -61,8 +61,8 @@ | ||||
|         <input type="text" id="node-input-serial"> | ||||
|     </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> | ||||
| </script> | ||||
|  | ||||
|   | ||||
| @@ -76,10 +76,10 @@ module.exports = function(RED) { | ||||
|                 } | ||||
|             }); | ||||
|             node.port.on('ready', 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")}); | ||||
|             }); | ||||
|             node.port.on('closed', function() { | ||||
|                 node.status({fill:"red",shape:"ring",text:RED._("common.status.not-connected")}); | ||||
|                 node.status({fill:"red",shape:"ring",text:RED._("node-red:common.status.not-connected")}); | ||||
|             }); | ||||
|         } else { | ||||
|             this.error(RED._("serial.errors.missing-conf")); | ||||
| @@ -108,7 +108,7 @@ module.exports = function(RED) { | ||||
|             if (node.serialConfig.out != "count") { buf = new Buffer(bufMaxSize); } | ||||
|             else { buf = new Buffer(Number(node.serialConfig.newline)); } | ||||
|             var i = 0; | ||||
|             node.status({fill:"grey",shape:"dot",text:RED._("common.status.not-connected")}); | ||||
|             node.status({fill:"grey",shape:"dot",text:RED._("node-red:common.status.not-connected")}); | ||||
|             node.port = serialPool.get(this.serialConfig.serialport, | ||||
|                 this.serialConfig.serialbaud, | ||||
|                 this.serialConfig.databits, | ||||
| @@ -179,10 +179,10 @@ module.exports = function(RED) { | ||||
|                 } | ||||
|             }); | ||||
|             this.port.on('ready', 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.port.on('closed', function() { | ||||
|                 node.status({fill:"red",shape:"ring",text:RED._("common.status.not-connected")}); | ||||
|                 node.status({fill:"red",shape:"ring",text:RED._("node-red:common.status.not-connected")}); | ||||
|             }); | ||||
|         } else { | ||||
|             this.error(RED._("serial.errors.missing-conf")); | ||||
|   | ||||
| @@ -62,8 +62,8 @@ | ||||
|     </div> | ||||
|     <br/> | ||||
|     <div class="form-row"> | ||||
|         <label for="node-input-dname"><i class="fa fa-tag"></i> <span data-i18n="common.label.name"></span></label> | ||||
|         <input type="text" id="node-input-dname" data-i18n="[placeholder]common.label.name"> | ||||
|         <label for="node-input-dname"><i class="fa fa-tag"></i> <span data-i18n="node-red:common.label.name"></span></label> | ||||
|         <input type="text" id="node-input-dname" data-i18n="[placeholder]node-red:common.label.name"> | ||||
|     </div> | ||||
|     <div class="form-tips" id="node-tip"><span data-i18n="[html]email.tip.cred"></span></div> | ||||
| </script> | ||||
| @@ -144,8 +144,8 @@ | ||||
|     </div> | ||||
|     <br/> | ||||
|     <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" id="node-tip"><span data-i18n="[html]email.tip.cred"></span></div> | ||||
|     <div id="node-input-tip" class="form-tips"><span data-i18n="[html]email.tip.recent"></span></div> | ||||
|   | ||||
| @@ -73,7 +73,7 @@ module.exports = function(RED) { | ||||
|                 if (smtpTransport) { | ||||
|                     node.status({fill:"blue",shape:"dot",text:RED._("email.status.sending")}); | ||||
|                     if (msg.to && node.name && (msg.to !== node.name)) { | ||||
|                         node.warn(RED._("common.errors.nooverride")); | ||||
|                         node.warn(RED._("node-red:common.errors.nooverride")); | ||||
|                     } | ||||
|                     var sendopts = { from: node.userid };   // sender address | ||||
|                     sendopts.to = node.name || msg.to; // comma separated list of addressees | ||||
| @@ -237,20 +237,20 @@ module.exports = function(RED) { | ||||
|                                     node.log(RED._("email.status.newemail",{topic:pay.topic})); | ||||
|                                 } | ||||
|                                 else { node.log(RED._("email.status.duplicate",{topic:pay.topic})); } | ||||
|                                 //node.status({fill:"green",shape:"dot",text:RED._("common.status.ok")}); | ||||
|                                 //node.status({fill:"green",shape:"dot",text:RED._("node-red:common.status.ok")}); | ||||
|                                 node.status({}); | ||||
|                             }); | ||||
|                         } | ||||
|                         else { | ||||
|                             node.log(RED._("email.status.inboxzero")); | ||||
|                             //node.status({fill:"green",shape:"dot",text:RED._("common.status.ok")}); | ||||
|                             //node.status({fill:"green",shape:"dot",text:RED._("node-red:common.status.ok")}); | ||||
|                             node.status({}); | ||||
|                         } | ||||
|                     } | ||||
|                     imap.end(); | ||||
|                 }); | ||||
|             }); | ||||
|             node.status({fill:"grey",shape:"dot",text:RED._("common.status.connecting")}); | ||||
|             node.status({fill:"grey",shape:"dot",text:RED._("node-red:common.status.connecting")}); | ||||
|             imap.connect(); | ||||
|         }); | ||||
|  | ||||
|   | ||||
| @@ -24,8 +24,8 @@ | ||||
|         <input type="text" id="node-input-interval" style="width: 50px"> <span data-i18n="feedparse.label.minutes"></span> | ||||
|     </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> | ||||
| </script> | ||||
|  | ||||
|   | ||||
| @@ -24,8 +24,8 @@ | ||||
|         <input type="text" id="node-input-channel" placeholder="#nodered"> | ||||
|     </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]irc.tip.in"></span></div> | ||||
| </script> | ||||
| @@ -133,8 +133,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]irc.tip.out"></span></div> | ||||
| </script> | ||||
|   | ||||
| @@ -48,7 +48,7 @@ module.exports = function(RED) { | ||||
|         var node = this; | ||||
|         if (node.serverConfig.ircclient === null) { | ||||
|             node.log(RED._("irc.errors.connect")+": "+node.serverConfig.server); | ||||
|             node.status({fill:"grey",shape:"dot",text:RED._("common.status.connecting")}); | ||||
|             node.status({fill:"grey",shape:"dot",text:RED._("node-red:common.status.connecting")}); | ||||
|             var options = {autoConnect:true,autoRejoin:false,floodProtection:true,secure:node.serverConfig.ssl,selfSigned:node.serverConfig.cert,port:node.serverConfig.port,retryDelay:20000}; | ||||
|             node.serverConfig.ircclient = new irc.Client(node.serverConfig.server, node.serverConfig.nickname, options); | ||||
|             node.serverConfig.ircclient.setMaxListeners(0); | ||||
| @@ -58,7 +58,7 @@ module.exports = function(RED) { | ||||
|             node.serverConfig.ircclient.addListener('netError', function(message) { | ||||
|                 node.serverConfig.lastseen = Date.now(); | ||||
|                 if (RED.settings.verbose) { node.log(RED._("irc.errors.net")+": "+JSON.stringify(message)); } | ||||
|                 node.status({fill:"red",shape:"ring",text:RED._("common.status.neterror")}); | ||||
|                 node.status({fill:"red",shape:"ring",text:RED._("node-red:common.status.neterror")}); | ||||
|             }); | ||||
|             node.serverConfig.ircclient.addListener('connect', function() { | ||||
|                 node.serverConfig.lastseen = Date.now(); | ||||
| @@ -67,21 +67,21 @@ module.exports = function(RED) { | ||||
|             node.serverConfig.ircclient.addListener('registered', function(message) { | ||||
|                 node.serverConfig.lastseen = Date.now(); | ||||
|                 node.log(node.serverConfig.ircclient.nick+" "+RED._("irc.errors.online")+": "+message.server); | ||||
|                 node.status({fill:"yellow",shape:"dot",text:RED._("common.status.connected")}); | ||||
|                 node.status({fill:"yellow",shape:"dot",text:RED._("node-red:common.status.connected")}); | ||||
|                 node.serverConfig.ircclient.join( node.channel, function(data) { | ||||
|                     node.log(data+" "+RED._("irc.errors.joined")+": "+node.channel); | ||||
|                     node.status({fill:"green",shape:"dot",text:RED._("common.status.joined")}); | ||||
|                     node.status({fill:"green",shape:"dot",text:RED._("node-red:common.status.joined")}); | ||||
|                 }); | ||||
|             }); | ||||
|             node.serverConfig.ircclient.addListener('ping', function(server) { | ||||
|                 node.serverConfig.lastseen = Date.now(); | ||||
|                 if (RED.settings.verbose) { node.log(RED._("irc.errors.ping")+" "+JSON.stringify(server)); } | ||||
|                 node.status({fill:"green",shape:"dot",text:RED._("common.status.ok")}); | ||||
|                 node.status({fill:"green",shape:"dot",text:RED._("node-red:common.status.ok")}); | ||||
|             }); | ||||
|             node.serverConfig.ircclient.addListener('quit', function(nick, reason, channels, message) { | ||||
|                 node.serverConfig.lastseen = Date.now(); | ||||
|                 if (RED.settings.verbose) { node.log(RED._("irc.errors.quit")+": "+nick+" "+reason+" "+channels+" "+JSON.stringify(message)); } | ||||
|                 node.status({fill:"grey",shape:"ring",text:RED._("common.status.quit")}); | ||||
|                 node.status({fill:"grey",shape:"ring",text:RED._("node-red:common.status.quit")}); | ||||
|                 //node.serverConfig.ircclient.disconnect( function() { | ||||
|                 //    node.serverConfig.ircclient.connect(); | ||||
|                 //}); | ||||
| @@ -102,7 +102,7 @@ module.exports = function(RED) { | ||||
|                 if ((Date.now()-node.serverConfig.lastseen) > 300000) {     // If more than 5 mins | ||||
|                     //node.serverConfig.ircclient.disconnect(); | ||||
|                     //node.serverConfig.ircclient.connect(); | ||||
|                     node.status({fill:"grey",shape:"ring",text:RED._("common.status.noconnection")}); | ||||
|                     node.status({fill:"grey",shape:"ring",text:RED._("node-red:common.status.noconnection")}); | ||||
|                     if (RED.settings.verbose) { node.log(RED._("irc.errors.connectionlost")); } | ||||
|                 } | ||||
|                 //node.serverConfig.ircclient.send.apply(node.serverConfig.ircclient,["TIME"]); // request time to check link | ||||
| @@ -114,10 +114,10 @@ module.exports = function(RED) { | ||||
|  | ||||
|         node.ircclient.addListener('registered', function(message) { | ||||
|             //node.log(node.ircclient.nick+" "+RED._("irc.errors.online")); | ||||
|             node.status({fill:"yellow",shape:"dot",text:RED._("common.status.connected")}); | ||||
|             node.status({fill:"yellow",shape:"dot",text:RED._("node-red:common.status.connected")}); | ||||
|             node.ircclient.join( node.channel, function(data) { | ||||
|                 // node.log(data+" "+RED._("irc.errors.joined")+" "+node.channel); | ||||
|                 node.status({fill:"green",shape:"dot",text:RED._("common.status.joined")}); | ||||
|                 node.status({fill:"green",shape:"dot",text:RED._("node-red:common.status.joined")}); | ||||
|             }); | ||||
|         }); | ||||
|         node.ircclient.addListener('message', function (from, to, message) { | ||||
| @@ -183,7 +183,7 @@ module.exports = function(RED) { | ||||
|         var node = this; | ||||
|         if (node.serverConfig.ircclient === null) { | ||||
|             node.log(RED._("irc.errors.connect")+": "+node.serverConfig.server); | ||||
|             node.status({fill:"grey",shape:"dot",text:RED._("common.status.connecting")}); | ||||
|             node.status({fill:"grey",shape:"dot",text:RED._("node-red:common.status.connecting")}); | ||||
|             var options = {autoConnect:true,autoRejoin:false,floodProtection:true,secure:node.serverConfig.ssl,selfSigned:node.serverConfig.cert,port:node.serverConfig.port,retryDelay:20000}; | ||||
|             node.serverConfig.ircclient = new irc.Client(node.serverConfig.server, node.serverConfig.nickname, options); | ||||
|             node.serverConfig.ircclient.setMaxListeners(0); | ||||
| @@ -193,7 +193,7 @@ module.exports = function(RED) { | ||||
|             node.serverConfig.ircclient.addListener('netError', function(message) { | ||||
|                 node.serverConfig.lastseen = Date.now(); | ||||
|                 if (RED.settings.verbose) { node.log(RED._("irc.errors.net")+": "+JSON.stringify(message)); } | ||||
|                 node.status({fill:"red",shape:"ring",text:RED._("common.status.neterror")}); | ||||
|                 node.status({fill:"red",shape:"ring",text:RED._("node-red:common.status.neterror")}); | ||||
|             }); | ||||
|             node.serverConfig.ircclient.addListener('connect', function() { | ||||
|                 node.serverConfig.lastseen = Date.now(); | ||||
| @@ -202,21 +202,21 @@ module.exports = function(RED) { | ||||
|             node.serverConfig.ircclient.addListener('registered', function(message) { | ||||
|                 node.serverConfig.lastseen = Date.now(); | ||||
|                 node.log(node.serverConfig.ircclient.nick+" "+RED._("irc.errors.online")+": "+message.server); | ||||
|                 node.status({fill:"yellow",shape:"dot",text:RED._("common.status.connected")}); | ||||
|                 node.status({fill:"yellow",shape:"dot",text:RED._("node-red:common.status.connected")}); | ||||
|                 node.serverConfig.ircclient.join( node.channel, function(data) { | ||||
|                     node.log(data+" "+RED._("irc.errors.joined")+": "+node.channel); | ||||
|                     node.status({fill:"green",shape:"dot",text:RED._("common.status.joined")}); | ||||
|                     node.status({fill:"green",shape:"dot",text:RED._("node-red:common.status.joined")}); | ||||
|                 }); | ||||
|             }); | ||||
|             node.serverConfig.ircclient.addListener('ping', function(server) { | ||||
|                 node.serverConfig.lastseen = Date.now(); | ||||
|                 if (RED.settings.verbose) { node.log(RED._("irc.errors.ping")+" "+JSON.stringify(server)); } | ||||
|                 node.status({fill:"green",shape:"dot",text:RED._("common.status.ok")}); | ||||
|                 node.status({fill:"green",shape:"dot",text:RED._("node-red:common.status.ok")}); | ||||
|             }); | ||||
|             node.serverConfig.ircclient.addListener('quit', function(nick, reason, channels, message) { | ||||
|                 node.serverConfig.lastseen = Date.now(); | ||||
|                 if (RED.settings.verbose) { node.log(RED._("irc.errors.quit")+": "+nick+" "+reason+" "+channels+" "+JSON.stringify(message)); } | ||||
|                 node.status({fill:"grey",shape:"ring",text:RED._("common.status.quit")}); | ||||
|                 node.status({fill:"grey",shape:"ring",text:RED._("node-red:common.status.quit")}); | ||||
|                 //node.serverConfig.ircclient.disconnect( function() { | ||||
|                 //    node.serverConfig.ircclient.connect(); | ||||
|                 //}); | ||||
| @@ -237,7 +237,7 @@ module.exports = function(RED) { | ||||
|                 if ((Date.now()-node.serverConfig.lastseen) > 300000) {     // If more than 5 mins | ||||
|                     //node.serverConfig.ircclient.disconnect(); | ||||
|                     //node.serverConfig.ircclient.connect(); | ||||
|                     node.status({fill:"grey",shape:"ring",text:RED._("common.status.noconnection")}); | ||||
|                     node.status({fill:"grey",shape:"ring",text:RED._("node-red:common.status.noconnection")}); | ||||
|                     if (RED.settings.verbose) { node.log(RED._("irc.errors.connectionlost")); } | ||||
|                 } | ||||
|                 //node.serverConfig.ircclient.send.apply(node.serverConfig.ircclient,["TIME"]); // request time to check link | ||||
|   | ||||
| @@ -111,8 +111,8 @@ | ||||
|         <input type="text" id="node-input-tags" data-i18n="[placeholder]twitter.placeholder.for"> | ||||
|     </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]twitter.tip"></span></div> | ||||
| </script> | ||||
| @@ -194,8 +194,8 @@ | ||||
|         <input type="text" id="node-input-twitter"> | ||||
|     </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> | ||||
| </script> | ||||
|  | ||||
|   | ||||
| @@ -34,8 +34,8 @@ | ||||
|         <input type="password" id="node-config-input-password"> | ||||
|     </div> | ||||
|     <div class="form-row"> | ||||
|         <label for="node-config-input-name"><i class="fa fa-tag"></i> <span data-i18n="common.label.name"></span></label> | ||||
|         <input type="text" id="node-config-input-name" data-i18n="[placeholder]common.label.name"> | ||||
|         <label for="node-config-input-name"><i class="fa fa-tag"></i> <span data-i18n="node-red:common.label.name"></span></label> | ||||
|         <input type="text" id="node-config-input-name" data-i18n="[placeholder]node-red:common.label.name"> | ||||
|     </div> | ||||
| </script> | ||||
|  | ||||
| @@ -94,8 +94,8 @@ | ||||
|         <label for="node-input-multi" style="width: 70%;"><span data-i18n="mongodb.label.updateall"></span></label> | ||||
|     </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" id="node-warning" style="display: none"><span data-i18n="[html]mongodb.tip"></span></div> | ||||
| </script> | ||||
| @@ -187,8 +187,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" id="node-warning" style="display: none"><span data-i18n="[html]mongodb.tip"></span></div> | ||||
| </script> | ||||
|   | ||||
| @@ -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> | ||||
|   | ||||
| @@ -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