Files
node-red-contrib-xilica/nodes/xilica-ping.html
2025-12-31 09:56:31 +01:00

78 lines
3.2 KiB
HTML

<script type="text/javascript">
// Global styling for Xilica nodes: black background, white text
(function() {
var css = '' +
'.red-ui-palette-node[data-palette-type="xilica-ping"],' +
'.red-ui-palette-node[data-palette-type="xilica-command"],' +
'.red-ui-palette-node[data-palette-type="xilica-interval"],' +
'.red-ui-palette-node[data-palette-type="xilica-subscribe"],' +
'.red-ui-palette-node[data-palette-type="xilica-listen"]{' +
'background-color:#000000 !important;' +
'color:#ffffff !important;' +
'}' +
'.red-ui-flow-node[data-type="xilica-ping"],' +
'.red-ui-flow-node[data-type="xilica-command"],' +
'.red-ui-flow-node[data-type="xilica-interval"],' +
'.red-ui-flow-node[data-type="xilica-subscribe"],' +
'.red-ui-flow-node[data-type="xilica-listen"]{' +
'fill:#000000 !important;' +
'}' +
'.red-ui-flow-node[data-type="xilica-ping"] .red-ui-flow-node-label,' +
'.red-ui-flow-node[data-type="xilica-command"] .red-ui-flow-node-label,' +
'.red-ui-flow-node[data-type="xilica-interval"] .red-ui-flow-node-label,' +
'.red-ui-flow-node[data-type="xilica-subscribe"] .red-ui-flow-node-label,' +
'.red-ui-flow-node[data-type="xilica-listen"] .red-ui-flow-node-label,' +
'.red-ui-flow-node[data-type="xilica-ping"] text,' +
'.red-ui-flow-node[data-type="xilica-command"] text,' +
'.red-ui-flow-node[data-type="xilica-interval"] text,' +
'.red-ui-flow-node[data-type="xilica-subscribe"] text,' +
'.red-ui-flow-node[data-type="xilica-listen"] text,' +
'.red-ui-flow-node[data-type=\"xilica-ping\"] text tspan,' +
'.red-ui-flow-node[data-type=\"xilica-command\"] text tspan,' +
'.red-ui-flow-node[data-type=\"xilica-interval\"] text tspan,' +
'.red-ui-flow-node[data-type=\"xilica-subscribe\"] text tspan,' +
'.red-ui-flow-node[data-type=\"xilica-listen\"] text tspan{' +
'fill:#ffffff !important;' +
'stroke:#ffffff !important;' +
'color:#ffffff !important;' +
'}' +
'.red-ui-palette-node[data-palette-type="xilica-ping"] *,' +
'.red-ui-palette-node[data-palette-type="xilica-command"] *,' +
'.red-ui-palette-node[data-palette-type="xilica-interval"] *,' +
'.red-ui-palette-node[data-palette-type="xilica-subscribe"] *,' +
'.red-ui-palette-node[data-palette-type="xilica-listen"] *{' +
'color:#ffffff !important;' +
'}';
if (typeof document !== "undefined") {
var styleEl = document.createElement('style');
styleEl.type = 'text/css';
styleEl.appendChild(document.createTextNode(css));
document.head.appendChild(styleEl);
}
}());
RED.nodes.registerType('xilica-ping', {
category: 'Xilica',
color: '#000000',
defaults: {
name: { value: "" }
},
inputs: 1,
outputs: 1,
icon: "font-awesome/fa-plug",
label: function () { return this.name || "xilica ping"; }
});
</script>
<script type="text/x-red" data-template-name="xilica-ping">
<div class="form-row">
<label for="node-input-name">Name</label>
<input type="text" id="node-input-name">
</div>
</script>
<script type="text/x-red" data-help-name="xilica-ping">
<p>Simple test node that returns a fixed payload to confirm the Xilica nodes module is installed.</p>
</script>