node-red-contrib-services-mentor
Version:
Mentor Services
41 lines (39 loc) • 1.74 kB
HTML
<script type="text/javascript">
RED.nodes.registerType('Interval',{
category: 'Mentor Services',
color: '#b6bbc2',
defaults: {
interval: {value:5},
payload: {value: ""},
name: {value:""},
initialdefer: {value: 0}
},
inputs:0,
outputs:1,
icon: "timer.png",
label: function() {
return this.interval > 0 ? ("Every " + this.interval + " sec(s).") : this.name ||"Interval";
}
});
</script>
<script type="text/x-red" data-template-name="Interval">
<div class="form-row">
<label for="node-input-name"><i class="icon-tag" style="width:40%;"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
<div class="form-row">
<label for="node-input-interval"><i class="icon-repeat" style="width:40%;"></i> Interval [sec.]</label>
<input type="number" id="node-input-interval">
</div>
<div class="form-row">
<label for="node-input-payload"><i class="icon-envelope" style="width:40%;"></i> Payload (defaults to current timestamp)</label>
<input type="text" id="node-input-payload" placeholder="Payload">
</div>
<div class="form-row">
<label for="node-input-initialdefer" style="width:40%;"><i class="fa fa-history"></i> Initial Defer (secs)</label>
<input type="number" id="node-input-initialdefer" style="display: inline-block; width: auto; vertical-align: top;">
</div>
</script>
<script type="text/x-red" data-help-name="Interval">
<p>A interval timer that fires at multiples of the given interval, measured from Jan 1 1970</p>
</script>