mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00: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:
@@ -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":"";
|
||||
@@ -285,7 +288,7 @@
|
||||
$(".inject-time-row").hide();
|
||||
$("#inject-time-type-select option").filter(function() {return $(this).val() == repeattype;}).attr('selected',true);
|
||||
$("#inject-time-row-"+repeattype).show();
|
||||
|
||||
|
||||
if (this.payloadType == null) {
|
||||
if (this.payload == "") {
|
||||
this.payloadType = "date";
|
||||
@@ -293,7 +296,7 @@
|
||||
this.payloadType = "string";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$("#node-input-payloadType").change(function() {
|
||||
var id = $("#node-input-payloadType option:selected").val();
|
||||
if (id == "string") {
|
||||
@@ -303,7 +306,7 @@
|
||||
}
|
||||
});
|
||||
$("#node-input-payloadType").val(this.payloadType);
|
||||
|
||||
$("#node-input-payloadType").change();
|
||||
|
||||
},
|
||||
oneditsave: function() {
|
||||
|
Reference in New Issue
Block a user