1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

tiny tweak to inject to fix name and hide un-needed text box.

tweak exec node text to be less alarmist
This commit is contained in:
Dave C-J 2014-02-02 18:12:28 +00:00
parent b882846516
commit e19f2956a8
2 changed files with 16 additions and 13 deletions

View File

@ -203,7 +203,10 @@
outputs:1, outputs:1,
icon: "inject.png", icon: "inject.png",
label: function() { label: function() {
if (this.payloadType == "string") {
return this.name||this.topic||this.payload||"inject"; return this.name||this.topic||this.payload||"inject";
}
else { return this.name||"inject"; }
}, },
labelStyle: function() { labelStyle: function() {
return this.name?"node_label_italic":""; return this.name?"node_label_italic":"";
@ -303,7 +306,7 @@
} }
}); });
$("#node-input-payloadType").val(this.payloadType); $("#node-input-payloadType").val(this.payloadType);
$("#node-input-payloadType").change();
}, },
oneditsave: function() { oneditsave: function() {

View File

@ -35,11 +35,11 @@
</script> </script>
<script type="text/x-red" data-help-name="exec"> <script type="text/x-red" data-help-name="exec">
<p>Call to a system command.<br/>This can be very dangerous...</p> <p>Calls out to a system command.<br/></p>
<p>Provides 3 outputs... stdout, stderr, and return code.</p> <p>Provides 3 outputs... stdout, stderr, and return code.</p>
<p>By default uses exec() which calls the command, waits for completion and then returns the complete result in one go. Along with any errors.</p> <p>By default uses exec() which calls the command, blocks while waiting for completion, and then returns the complete result in one go, along with any errors.</p>
<p>Optionally can use spawn() instead, which returns output from stdout and stderr as the command runs (ie one line at a time). On completion then returns a return code (on the 3rd output).</p> <p>Optionally can use spawn() instead, which returns output from stdout and stderr as the command runs (ie one line at a time). On completion it then returns a return code (on the 3rd output).</p>
<p>The optional append gets added to the command after the <b>msg.payload</b> (so you can do things like pipe etc.)</p> <p>The optional append gets added to the command after the <b>msg.payload</b> - so you can do things like pipe the result to another command.</p>
</script> </script>
<script type="text/javascript"> <script type="text/javascript">