mirror of
https://github.com/node-red/node-red-nodes.git
synced 2025-03-01 10:37:43 +00:00
add msg.property option to rbe, randon, smooth and base64 nodes
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
|
||||
<script type="text/x-red" data-template-name="smooth">
|
||||
<div class="form-row">
|
||||
<label for="node-input-action"><i class="fa fa-bolt"></i> Action</label>
|
||||
<label for="node-input-property"><i class="fa fa-ellipsis-h"></i> <span data-i18n="node-red:common.label.property"></span></label>
|
||||
<input type="text" id="node-input-property" style="width:70%;"/>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label for="node-input-action"><i class="fa fa-bolt"></i> Action</label>
|
||||
<select id="node-input-action" style="width:60%; margin-right:5px;">
|
||||
<option value="max">Return the maximum value seen</option>
|
||||
<option value="min">Return the minimum value seen</option>
|
||||
@@ -53,6 +57,7 @@
|
||||
category: 'function',
|
||||
defaults: {
|
||||
name: {value:""},
|
||||
property: {value:"payload",required:true},
|
||||
action: {value:"mean"},
|
||||
count: {value:"10",required:true,validate:RED.validators.number()},
|
||||
round: {value:""},
|
||||
@@ -68,6 +73,10 @@
|
||||
return this.name ? "node_label_italic" : "";
|
||||
},
|
||||
oneditprepare: function() {
|
||||
if (this.property === undefined) {
|
||||
$("#node-input-property").val("payload");
|
||||
}
|
||||
$("#node-input-property").typedInput({default:'msg',types:['msg']});
|
||||
$("#node-input-count").spinner({
|
||||
min:1
|
||||
});
|
||||
|
Reference in New Issue
Block a user