34 lines
1.1 KiB
HTML
34 lines
1.1 KiB
HTML
|
|
<script type="text/html" data-template-name="my-debounce">
|
|
<div class="form-row">
|
|
<label for="node-input-delay"><i class="fa fa-wrench"></i> Delay</label>
|
|
<input type="text" id="node-input-delay">
|
|
</div>
|
|
|
|
<div class="form-row">
|
|
<label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="node-red:common.label.name"></span></label>
|
|
<input type="text" id="node-input-name" data-i18n="[placeholder]node-red:common.label.name">
|
|
</div>
|
|
</script>
|
|
|
|
<script type="text/html" data-help-name="my-debounce">
|
|
<p>Deduplica messaggi per valore del payload entro <code>delay</code>.</p>
|
|
</script>
|
|
|
|
<script type="text/javascript">
|
|
RED.nodes.registerType('my-debounce',{
|
|
category: 'function',
|
|
color: "#E6E0F8",
|
|
defaults: {
|
|
delay: { value: 1000, required: true, validate: RED.validators.number() },
|
|
name: { value: "" }
|
|
},
|
|
inputs: 1,
|
|
outputs: 1,
|
|
icon: "timer.png",
|
|
label: function() {
|
|
return this.name || "my-debounce";
|
|
}
|
|
});
|
|
</script>
|