node-red-contrib-password-g.../lib/ValueChangeDetectorNode.html
2021-07-11 09:57:55 +02:00

37 lines
1.2 KiB
HTML

<script type="text/javascript">
RED.nodes.registerType('value-change-detector', {
category: 'function',
color: '#a6bbcf',
defaults: {
name: { value: "" },
key: { value: "", required: true },
value: { value: "", required: true },
},
inputs: 1,
outputs: 1,
icon: "file.png",
label: function () {
return this.name || "value-change-detector";
}
});
</script>
<script type="text/html" data-template-name="value-change-detector">
<div class="form-row">
<label for="node-input-key"><i class="fa fa-tag"></i> Key prop</label>
<input type="text" id="node-input-key" placeholder="payload.key">
</div>
<div class="form-row">
<label for="node-input-value"><i class="fa fa-tag"></i> Value prop</label>
<input type="text" id="node-input-value" placeholder="payload.value">
</div>
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
</script>
<script type="text/html" data-help-name="value-change-detector">
<p>Send incoming message only when the value changes.</p>
</script>