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

@ -180,10 +180,10 @@
</style>
<script type="text/x-red" data-help-name="inject">
<p>Pressing the button on the left side of the node allows a message on a topic to be injected into the flow. This is mainly for test purposes.</p>
<p>If no payload is specified the payload is set to the current time in millisecs since 1970. This allows subsequent functions to perform time based actions.</p>
<p>The repeat function does what it says on the tin and continuously sends the payload every x seconds.</p>
<p>The Fire once at start option actually waits 50mS before firing to give other nodes a chance to instantiate properly.</p>
<p>Pressing the button on the left side of the node allows a message on a topic to be injected into the flow. This is mainly for test purposes.</p>
<p>If no payload is specified the payload is set to the current time in millisecs since 1970. This allows subsequent functions to perform time based actions.</p>
<p>The repeat function does what it says on the tin and continuously sends the payload every x seconds.</p>
<p>The Fire once at start option actually waits 50mS before firing to give other nodes a chance to instantiate properly.</p>
</script>
<script type="text/javascript">
@ -203,7 +203,10 @@
outputs:1,
icon: "inject.png",
label: function() {
return this.name||this.topic||this.payload||"inject";
if (this.payloadType == "string") {
return this.name||this.topic||this.payload||"inject";
}
else { return this.name||"inject"; }
},
labelStyle: function() {
return this.name?"node_label_italic":"";
@ -303,7 +306,7 @@
}
});
$("#node-input-payloadType").val(this.payloadType);
$("#node-input-payloadType").change();
},
oneditsave: function() {

View File

@ -35,11 +35,11 @@
</script>
<script type="text/x-red" data-help-name="exec">
<p>Call to a system command.<br/>This can be very dangerous...</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>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>The optional append gets added to the command after the <b>msg.payload</b> (so you can do things like pipe etc.)</p>
<p>Calls out to a system command.<br/></p>
<p>Provides 3 outputs... stdout, stderr, and return code.</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 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 the result to another command.</p>
</script>
<script type="text/javascript">