UNPKG

node-red-contrib-dashbored

Version:
58 lines (50 loc) 1.92 kB
<script type="text/x-red" data-template-name="dashbored-widget-node"> <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-widget"><i class="icon-bookmark"></i> Widget</label> <input type="text" id="node-input-widget"> </div> <div class="form-row"> <label for="node-input-onlyOutputOnInput">Only output when a input is received</label> <input type="checkbox" id="node-input-onlyOutputOnInput"> </div> <div class="form-row"> <label for="node-input-sendSetToOutput">When a set message is sent to the input output the set message</label> <input type="checkbox" id="node-input-sendSetToOutput"> </div> <div class="form-row"> <label for="node-input-getOutputOthers">When another node sends get to the input output the get request here</label> <input type="checkbox" id="node-input-getOutputOthers"> </div> </script> <script type="text/javascript"> RED.nodes.registerType("dashbored-widget-node", { category: "Dashbored", color: "#F5F5DC", defaults: { name: {value: ""}, widget: {value: "", required: true, type: "dashbored-widget"}, onlyOutputOnInput: { value: false }, sendSetToOutput: { value: false }, getOutputOthers: { value: false } }, inputs: 1, outputs: 2, align: "right", paletteLabel: "Widget", icon: "debug.svg", label: function() { return (this.name || "Widget" ); }, outputLabels: ["output", "get"] }); </script>