mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
add port label to file node and update info
This commit is contained in:
parent
59da705b8f
commit
d351aa842c
@ -48,8 +48,10 @@
|
|||||||
<p>Writes <code>msg.payload</code> to the file specified, for example to create a log.</p>
|
<p>Writes <code>msg.payload</code> to the file specified, for example to create a log.</p>
|
||||||
<p>The filename can be configured in the node. If left blank it should be
|
<p>The filename can be configured in the node. If left blank it should be
|
||||||
set by <code>msg.filename</code> on the incoming message.</p>
|
set by <code>msg.filename</code> on the incoming message.</p>
|
||||||
<p>A newline is added to every message. But this can be turned off if required, for example, to allow binary files to be written.</p>
|
<p>A newline is added to every message. But this can be turned off if required, for example,
|
||||||
<p>The default behaviour is to append to the file. This can be changed to overwrite the file each time, for example if you want to output a "static" web page or report.</p>
|
to allow binary files to be written.</p>
|
||||||
|
<p>The default behaviour is to append to the file. This can be changed to overwrite the file
|
||||||
|
each time, for example if you want to output a "static" web page or report.</p>
|
||||||
<p>This node can also be configured to delete a file if required.</p>
|
<p>This node can also be configured to delete a file if required.</p>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -69,6 +71,7 @@
|
|||||||
<label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="common.label.name"></span></label>
|
<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">
|
<input type="text" id="node-input-name" data-i18n="[placeholder]common.label.name">
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-tips"><span data-i18n="file.tip"></span></div>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="text/x-red" data-help-name="file in">
|
<script type="text/x-red" data-help-name="file in">
|
||||||
@ -95,7 +98,7 @@
|
|||||||
align: "right",
|
align: "right",
|
||||||
label: function() {
|
label: function() {
|
||||||
if (this.overwriteFile === "delete") {
|
if (this.overwriteFile === "delete") {
|
||||||
return this.name||this._("file.label.deletelabel",{file:this.filename})
|
return this.name||this._("file.label.deletelabel",{file:this.filename});
|
||||||
} else {
|
} else {
|
||||||
return this.name||this.filename||this._("file.label.filelabel");
|
return this.name||this.filename||this._("file.label.filelabel");
|
||||||
}
|
}
|
||||||
@ -104,10 +107,10 @@
|
|||||||
return this.name?"node_label_italic":"";
|
return this.name?"node_label_italic":"";
|
||||||
},
|
},
|
||||||
oneditprepare: function() {
|
oneditprepare: function() {
|
||||||
$("#node-input-overwriteFile").on("change",function() {
|
$("#node-input-overwriteFile").on("change",function() {
|
||||||
if (this.value === "delete") { $("#node-appline").hide(); }
|
if (this.value === "delete") { $("#node-appline").hide(); }
|
||||||
else { $("#node-appline").show(); }
|
else { $("#node-appline").show(); }
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -121,6 +124,9 @@
|
|||||||
color:"BurlyWood",
|
color:"BurlyWood",
|
||||||
inputs:1,
|
inputs:1,
|
||||||
outputs:1,
|
outputs:1,
|
||||||
|
outputLabels: function(i) {
|
||||||
|
return (this.format === "utf8") ? "UTF8 string" : "binary buffer";
|
||||||
|
},
|
||||||
icon: "file.png",
|
icon: "file.png",
|
||||||
label: function() {
|
label: function() {
|
||||||
return this.name||this.filename||this._("file.label.filelabel");
|
return this.name||this.filename||this._("file.label.filelabel");
|
||||||
|
Loading…
Reference in New Issue
Block a user