first commit
This commit is contained in:
17
nodes/xilica-ping.html
Normal file
17
nodes/xilica-ping.html
Normal file
@@ -0,0 +1,17 @@
|
||||
<script type="text/javascript">
|
||||
RED.nodes.registerType('xilica-ping',{
|
||||
category: 'Xilica',
|
||||
color: '#D8E7FF',
|
||||
defaults: { name: {value:""} },
|
||||
inputs: 1,
|
||||
outputs: 1,
|
||||
icon: "font-awesome/fa-plug",
|
||||
label: function() { return this.name || "xilica ping"; }
|
||||
});
|
||||
</script>
|
||||
|
||||
<div class="form-row">
|
||||
<label for="node-input-name">Name</label>
|
||||
<input type="text" id="node-input-name">
|
||||
</div>
|
||||
|
||||
12
nodes/xilica-ping.js
Normal file
12
nodes/xilica-ping.js
Normal file
@@ -0,0 +1,12 @@
|
||||
module.exports = function(RED) {
|
||||
function XilicaPing(config) {
|
||||
RED.nodes.createNode(this, config);
|
||||
this.on("input", (msg, send, done) => {
|
||||
msg.payload = "xilica-ping node is alive";
|
||||
send(msg);
|
||||
done();
|
||||
});
|
||||
}
|
||||
RED.nodes.registerType("xilica-ping", XilicaPing);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user