UNPKG

node-red-contrib-motechat

Version:

ultranet topic and payload communication

42 lines (40 loc) 1.41 kB
<script type="text/x-red" data-template-name="config-storage"> <div class="form-row"> <label for="node-input-name"><i class="icon-tag"></i> Name</label> <input type="text" id="node-input-name" placeholder="sender"> </div> <div class="form-row display"> <label for="node-input-func"><i class="fa fa-wrench"></i> Func</label> <select type="text" id="node-input-func" style="display: inline-block; vertical-align: top;" > <option value="get" id="get-func" style="font-style: italic;">Get</option> <option value="set" id="set-func" style="font-style: italic;">Set</option> </select> </div> </script> <script type="text/javascript"> RED.nodes.registerType('config-storage', { category: 'motebus-storage', color: '#25a2dd', defaults: { name: { value: 'Config_Storage' }, func: { value: "set" }, }, inputs: 1, outputs: 2, icon: "db.png", label: function () { return this.name || "config-storage"; } }); </script> <script type="text/x-red" data-help-name="config-storage"> <p>Calls a Motebus config methods based on the selected operator.</p> <br> <p>* Get *</p> <p>Queries a collection using the 'msg.payload' as the query statement .</p> <p>{ catalog, idname }</p> <br> <p>* Set *</p> <p>Creates or Update a obj.</p> <p>{ catalog, idname, data }</p> </script>