diff --git a/storage/tail/28-tail.html b/storage/tail/28-tail.html index 80c50fb0..b0542d03 100644 --- a/storage/tail/28-tail.html +++ b/storage/tail/28-tail.html @@ -48,10 +48,10 @@ filetype: {value:"text"}, split: {value:"[\\r]{0,1}\\n"}, filename: {value:""}, - inputs: {value:1} + inputs: {value:0} }, color:"BurlyWood", - inputs:1, + inputs:0, outputs:1, icon: "file.png", label: function() { @@ -68,11 +68,8 @@ }, oneditsave: function() { var that = this; - if($("#node-input-filename").val()===""){ - that.inputs = 1; - } else { - that.inputs = 0; - } + if ($("#node-input-filename").val()==="") { that.inputs = 1; } + else { that.inputs = 0; } } }); diff --git a/storage/tail/28-tail.js b/storage/tail/28-tail.js index d1c4ba7d..aa44bbcf 100644 --- a/storage/tail/28-tail.js +++ b/storage/tail/28-tail.js @@ -30,7 +30,6 @@ module.exports = function(RED) { } else { msg.payload = Buffer.from(data,"binary"); - //msg.payload = data; node.send(msg); } } @@ -55,8 +54,6 @@ module.exports = function(RED) { node.on('input', function (msg) { if (!msg.hasOwnProperty("filename")) { node.error(RED._("tail.state.nofilename")); - }else if (msg.filename === node.filename) { - node.warn(RED._("tail.state.nofilechange")); } else if (msg.filename === "") { node.filename = ""; if (node.tail) { node.tail.unwatch(); } @@ -67,7 +64,7 @@ module.exports = function(RED) { if (node.tail) { node.tail.unwatch(); } if (!node.tout) { fileTail(); } node.status({ fill: "green", text: node.filename }); - } + } }); } diff --git a/storage/tail/package.json b/storage/tail/package.json index bea82fe7..baef8e1b 100644 --- a/storage/tail/package.json +++ b/storage/tail/package.json @@ -1,6 +1,6 @@ { "name": "node-red-node-tail", - "version": "0.0.3", + "version": "0.1.0", "description": "A node to tail files for Node-RED", "dependencies": { "tail": "^2.0.2"