forked from peterstrapp/node-red-contrib-deduplicate
-
Notifications
You must be signed in to change notification settings - Fork 3
/
deduplicate.html
65 lines (56 loc) · 3 KB
/
deduplicate.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<script type="text/javascript">
RED.nodes.registerType('deduplicate', {
category: 'function',
color: '#dd99ff',
defaults: {
name: {value:""},
keyproperty: {keyproperty:""},
expirypolicy: {value:"keep"},
registryclass: {value:""},
noderole: {value:"standalone"},
expiry: {value: "5"}
},
inputs: 1,
outputs: 2,
icon: "switch.png",
label: function() {
return this.name || "Deduplicate";
}
});
</script>
<script type="text/x-red" data-template-name="deduplicate">
<div class="form-row">
<label for="node-input-name"><i class="icon-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
<div class="form-row">
<label for="node-input-noderole"><i class="icon-tag"></i> Node role</label>
<select id="node-input-noderole" style="width:60%; margin-right:5px;">
<option value="standalone">Add+Deduplicate within node</option>
<option value="save">Add values to group registry class</option>
<option value="deduplicate">Deduplicate based on registry class</option>
</select>
</div>
<div class="form-row">
<label for="node-input-registryclass"><i class="icon-tag"></i> Registry Class name</label>
<input type="text" id="node-input-registryclass" placeholder="Registry class (optional)">
</div>
<div class="form-row">
<label for="node-input-keyproperty"><i class="icon-tag"></i> Payload Key Property for analysis</label>
<input type="text" id="node-input-keyproperty" placeholder="Payload Key Property (optional)">
</div>
<div class="form-row">
<label for="node-input-expiry"><i class="icon-tag"></i> Expiry (seconds) as digit or Msg Key property</label>
<input type="text" id="node-input-expiry" placeholder="Msg Key or Value for Cache expiry (seconds)">
</div>
<div class="form-row">
<label for="node-input-expirypolicy"><i class="icon-tag"></i> Upon duplicate found</label>
<select id="node-input-expirypolicy" style="width:60%; margin-right:5px;">
<option value="keep">Keep initial cache expiry time</option>
<option value="extend">Extend cache expiry with new time</option>
</select>
</div>
</script>
<script type="text/x-red" data-help-name="deduplicate">
<p><b>Node-RED node that filters duplicate messages.</b><br> First output will return non-duplicated values, second one will output duplicated.<br><br><b>Analysis will be done grouped by topic if defined.</b><br>By default payload value is considered for analysis - specific key can be specified in "Msg Key Property".<br><br><b>Node role may be:</b><ul><li><u>Add+Deduplicate within node:</u> analysis within given inputs of node</li><li><u>Registry class</u> Allow addition or analysis upon a centrally managed list of values, cross nodes and based on the defined registry name</li></ul> </p>
</script>