node-red-contrib-motechat
Version:
ultranet topic and payload communication
107 lines (97 loc) • 3.03 kB
HTML
<script type="text/x-red" data-template-name="onEvent">
<div class="form-row">
<label for="node-input-name"><i class="icon-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="onEvent">
</div>
<div class="form-row node-input-targets-container-row">
<label for="node-input-event"><i class="fa fa-tasks"></i>OnEvent</label>
<select id="node-input-event">
<option value="message" selected>message</option>
<option value="status">status</option>
</select>
</div>
</script>
<script type="text/x-red" data-help-name="onEvent">
<p>motechat onEvent node</p>
<h3>Inputs</h3>
<dl class="message-properties">
<dt class="optional">name
<span class="property-type">string</span>
</dt>
<dd>The name of the node.</dd>
<dt class="optional"> OnEvent signal
<span class="property-type">option</span>
</dt>
<dd>Set the motechat OnEvent.</dd>
</dl>
<h3>Outputs</h3>
<dl class="message-properties">
<dt>msg
<span class="property-type">object</span>
</dt>
</dl>
</script>
<script type="text/x-red" data-template-name="retEvent">
<div class="form-row">
<label for="node-input-name"><i class="icon-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="retEvent">
</div>
</script>
<script type="text/x-red" data-help-name="retEvent">
<p>motechat retEvent node</p>
<h3>Inputs</h3>
<dl class="message-properties">
<dt class="optional">name
<span class="property-type">string</span>
</dt>
<dd>The name of the node.</dd>
<dt class="optional"> error code
<span class="property-type">number</span>
</dt>
<dd>Set the motechat retEvent error code</dd>
<dt class="optional"> error message
<span class="property-type">string</span>
</dt>
<dd>Set the motechat retEvent error message</dd>
</dl>
</script>
<script type="text/javascript">
RED.nodes.registerType('onEvent', {
category: 'motechat',
color: '#94CCC6',
defaults: {
event: {
value: 'message'
},
name: {
value: 'onEvent'
}
},
inputs: 1,
outputs: 1,
icon: "onEvent.png",
label: function() {
return this.name || "onEvent";
}
});
RED.nodes.registerType('retEvent', {
category: 'motechat',
color: '#94CCC6',
defaults: {
name: {
value: 'retEvent'
},
ErrCode: {
value: 0
},
ErrMsg: {
value: 'OK'
}
},
inputs: 1,
icon: "retEvent.png",
label: function() {
return this.name || "retEvent";
}
});
</script>