move name field to top for a bunch of nodes

This commit is contained in:
Dave Conway-Jones
2023-11-28 17:56:07 +00:00
parent 54dc363490
commit 5371f9bb92
40 changed files with 177 additions and 177 deletions

View File

@@ -1,5 +1,9 @@
<script type="text/html" data-template-name="discovery">
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
<div class="form-row">
<label for="node-input-service"><i class="fa fa-gear"></i> Service</label>
<input type="text" id="node-input-service" placeholder="_http._tcp">
@@ -8,10 +12,6 @@
<label for="node-input-topic"><i class="fa fa-tasks"></i> Topic</label>
<input type="text" id="node-input-topic" placeholder="Topic">
</div>
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
<div class="form-tips">The service <i>must</i> start with an underscore _ and end ._tcp or ._udp</div>
</script>
@@ -52,6 +52,10 @@
</script>
<script type="text/html" data-template-name="announce">
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name of service">
</div>
<div class="form-row">
<label for="node-input-service"><i class="fa fa-gear"></i> Service</label>
<input type="text" id="node-input-service" placeholder="_http._tcp">
@@ -64,10 +68,6 @@
<label for="node-input-txt"><i class="fa fa-tasks"></i> TxtRecord</label>
<input type="text" id="node-input-txt" placeholder='"name":"value","name2":"value2"'>
</div>
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name of service">
</div>
<div class="form-tips">%h in the name will be replaced by the machine hostname.</div>
</script>

View File

@@ -1,6 +1,6 @@
{
"name" : "node-red-node-discovery",
"version" : "0.0.23",
"version" : "0.0.24",
"description" : "A Node-RED node that uses Bonjour / Avahi to discover nearby services.",
"dependencies" : {
"mdns" : "^2.5.1"
@@ -19,7 +19,7 @@
},
"author": {
"name": "Dave Conway-Jones",
"email": "ceejay@vnet.ibm.com",
"email": "dceejay@gmail.com",
"url": "http://nodered.org"
}
}

View File

@@ -1,5 +1,9 @@
<script type="text/html" data-template-name="ping">
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="node-red:common.label.name"></span></label>
<input type="text" id="node-input-name" data-i18n="[placeholder]node-red:common.label.name">
</div>
<div class="form-row" id="div-node-input-host">
<label for="node-input-host"><i class="fa fa-dot-circle-o"></i> <span data-i18n="ping.label.target"></span></label>
<input type="text" id="node-input-host" placeholder="192.168.0.1, www.google.com">
@@ -23,10 +27,6 @@
<label for="node-input-timer"><i class="fa fa-repeat"></i> <span data-i18n="ping.label.ping"></label>
<input type="text" id="node-input-timer" placeholder="20">
</div>
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="node-red:common.label.name"></span></label>
<input type="text" id="node-input-name" data-i18n="[placeholder]node-red:common.label.name">
</div>
<div class="form-tips" id="node-ping-tip"><span data-i18n="ping.label.tip"></span></div>
</script>

View File

@@ -1,6 +1,6 @@
{
"name" : "node-red-node-ping",
"version" : "0.3.3",
"version" : "0.3.4",
"description" : "A Node-RED node to ping a remote server, for use as a keep-alive check.",
"dependencies" : {
},
@@ -18,7 +18,7 @@
},
"author": {
"name": "Dave Conway-Jones",
"email": "ceejay@vnet.ibm.com",
"email": "dceejay@gmail.com",
"url": "http://nodered.org"
},
"contributors": [

View File

@@ -1,13 +1,13 @@
<script type="text/html" data-template-name="serial in">
<div class="form-row node-input-serial">
<label for="node-input-serial"><i class="fa fa-random"></i> <span data-i18n="serial.label.serialport"></span></label>
<input type="text" id="node-input-serial">
</div>
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="node-red:common.label.name"></span></label>
<input type="text" id="node-input-name" data-i18n="[placeholder]node-red:common.label.name">
</div>
<div class="form-row node-input-serial">
<label for="node-input-serial"><i class="fa fa-random"></i> <span data-i18n="serial.label.serialport"></span></label>
<input type="text" id="node-input-serial">
</div>
</script>
<script type="text/javascript">
@@ -33,14 +33,14 @@
</script>
<script type="text/html" data-template-name="serial out">
<div class="form-row node-input-serial">
<label for="node-input-serial"><i class="fa fa-random"></i> <span data-i18n="serial.label.serialport"></span></label>
<input type="text" id="node-input-serial">
</div>
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="node-red:common.label.name"></span></label>
<input type="text" id="node-input-name" data-i18n="[placeholder]node-red:common.label.name">
</div>
<div class="form-row node-input-serial">
<label for="node-input-serial"><i class="fa fa-random"></i> <span data-i18n="serial.label.serialport"></span></label>
<input type="text" id="node-input-serial">
</div>
</script>
<script type="text/javascript">
@@ -66,14 +66,14 @@
</script>
<script type="text/html" data-template-name="serial request">
<div class="form-row node-input-serial">
<label for="node-input-serial"><i class="fa fa-random"></i> <span data-i18n="serial.label.serialport"></span></label>
<input type="text" id="node-input-serial">
</div>
<div class="form-row">
<label for="node-inputoutput-name"><i class="fa fa-tag"></i> <span data-i18n="node-red:common.label.name"></span></label>
<input type="text" id="node-input-name" data-i18n="[placeholder]node-red:common.label.name">
</div>
<div class="form-row node-input-serial">
<label for="node-input-serial"><i class="fa fa-random"></i> <span data-i18n="serial.label.serialport"></span></label>
<input type="text" id="node-input-serial">
</div>
</script>
<script type="text/javascript">
@@ -367,14 +367,14 @@
</script>
<script type="text/html" data-template-name="serial control">
<div class="form-row node-input-serial">
<label for="node-input-serial"><i class="fa fa-random"></i> <span data-i18n="serial.label.serialport"></span></label>
<input type="text" id="node-input-serial">
</div>
<div class="form-row">
<label for="node-inputoutput-name"><i class="fa fa-tag"></i> <span data-i18n="node-red:common.label.name"></span></label>
<input type="text" id="node-input-name" data-i18n="[placeholder]node-red:common.label.name">
</div>
<div class="form-row node-input-serial">
<label for="node-input-serial"><i class="fa fa-random"></i> <span data-i18n="serial.label.serialport"></span></label>
<input type="text" id="node-input-serial">
</div>
</script>
<script type="text/javascript">

View File

@@ -1,5 +1,6 @@
module.exports = function(RED) {
/*jshint -W082 */
"use strict";
var settings = RED.settings;
var events = require("events");
@@ -44,7 +45,7 @@ module.exports = function(RED) {
this.out = serialPort.out || this.out;
}
};
}
RED.nodes.registerType("serial-port",SerialPortNode);
// receives msgs and sends them to the serial port
@@ -138,7 +139,7 @@ module.exports = function(RED) {
node.port.on('stopped', function() {
node.status({fill:"grey",shape:"ring",text:"serial.status.stopped"});
});
};
}
setCallback(node)
}
RED.nodes.registerType("serial in",SerialInNode);
@@ -212,7 +213,7 @@ module.exports = function(RED) {
node.port.on('stopped', function() {
node.status({fill:"grey",shape:"ring",text:"serial.status.stopped"});
});
};
}
setCallback(node);
}
else {

View File

@@ -1,6 +1,6 @@
{
"name" : "node-red-node-serialport",
"version" : "2.0.0",
"version" : "2.0.1",
"description" : "Node-RED nodes to talk to serial ports",
"dependencies" : {
"serialport" : "^12.0.0"

View File

@@ -1,6 +1,6 @@
{
"name" : "node-red-node-snmp",
"version" : "2.0.0",
"version" : "2.0.1",
"description" : "A Node-RED node that gets and sets SNMP oid values. Supports v1, v2c and v3",
"dependencies" : {
"net-snmp" : "^3.9.0"
@@ -19,7 +19,7 @@
},
"author": {
"name": "Dave Conway-Jones",
"email": "ceejay@vnet.ibm.com",
"email": "dceejay@gmail.com",
"url": "http://nodered.org"
},
"contributors": [

View File

@@ -53,6 +53,10 @@
}
</script>
<script type="text/html" data-template-name="snmp">
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
<div class="form-row">
<label for="node-input-host"><i class="fa fa-globe"></i> Host</label>
<input type="text" id="node-input-host" placeholder="ip address(:optional port)">
@@ -111,10 +115,6 @@
<label for="node-input-oids"><i class="fa fa-tags"></i> OIDs</label>
<textarea rows="4" cols="60" id="node-input-oids" placeholder="e.g. 1.3.6.1.2.1.1.5.0" style="width:70%;"></textarea>
</div>
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
<div class="form-tips">Tip: Multiple OIDs can be separated by commas.</div>
</script>
@@ -166,6 +166,10 @@
</script>
<script type="text/html" data-template-name="snmp set">
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
<div class="form-row">
<label for="node-input-host"><i class="fa fa-globe"></i> Host</label>
<input type="text" id="node-input-host" placeholder="ip address(:optional port)">
@@ -227,10 +231,6 @@
<textarea rows="10" cols="60" id="node-input-varbinds" placeholder="e.g. [ { &quot;oid&quot;: &quot;1.3.6.1.2.1.1.5.0&quot;, &quot;type&quot;: &quot;OctetString&quot;, &quot;value&quot;: &quot;host1&quot;}, { &quot;oid&quot;: &quot;1.3.6.1.2.1.1.6.0&quot;, &quot;type&quot;: &quot;OctetString&quot;, value: &quot;somewhere&quot; } ]"
style="width:70%;"></textarea>
</div>
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
<div class="form-tips">Tip: Numeric inputs must be numbers not strings, e.g. 1 not "1".</div>
</script>
@@ -298,6 +298,10 @@
</script>
<script type="text/html" data-template-name="snmp table">
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
<div class="form-row">
<label for="node-input-host"><i class="fa fa-globe"></i> Host</label>
<input type="text" id="node-input-host" placeholder="ip address(:optional port)">
@@ -358,10 +362,6 @@
<label for="node-input-oids"><i class="fa fa-tags"></i> OID</label>
<input type="text" id="node-input-oids" placeholder="e.g. 1.3.6.1.2.1.1.5.0">
</div>
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
<div class="form-tips">Tip: ONLY accepts a single OID.</div>
</script>
@@ -413,6 +413,10 @@
</script>
<script type="text/html" data-template-name="snmp subtree">
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
<div class="form-row">
<label for="node-input-host"><i class="fa fa-globe"></i> Host</label>
<input type="text" id="node-input-host" placeholder="ip address(:optional port)">
@@ -473,10 +477,6 @@
<label for="node-input-oids"><i class="fa fa-tags"></i> OID</label>
<input type="text" id="node-input-oids" placeholder="e.g. 1.3.6.1.2.1.1.5.0">
</div>
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
<div class="form-tips">Tip: ONLY accepts a single OID (node).</div>
</script>
@@ -529,6 +529,10 @@
<script type="text/html" data-template-name="snmp walker">
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
<div class="form-row">
<label for="node-input-host"><i class="fa fa-globe"></i> Host</label>
<input type="text" id="node-input-host" placeholder="ip address(:optional port)">
@@ -589,10 +593,6 @@
<label for="node-input-oids"><i class="fa fa-tags"></i> OID</label>
<input type="text" id="node-input-oids" placeholder="e.g. 1.3.6.1.2.1.1.5.0">
</div>
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
<div class="form-tips">Tip: ONLY accepts a single OID (node).</div>
</script>

View File

@@ -1,5 +1,9 @@
<script type="text/html" data-template-name="stomp in">
<div class="form-row">
<label for="node-input-name" style="width: 110px;"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
<div class="form-row">
<label for="node-input-server" style="width: 110px;"><i class="fa fa-bookmark"></i> Server</label>
<input type="text" id="node-input-server">
@@ -17,13 +21,9 @@
</select>
</div>
<div class="form-tips" style="margin-bottom: 12px;">
Enabling the ACK (acknowledgment) will set the <code>ack</code> header to <code>client</code> while subscribing to topics.
Enabling the ACK (acknowledgment) will set the <code>ack</code> header to <code>client</code> while subscribing to topics.
This means the items on the broker queue will not be dequeue'd unless an ACK message is sent using the <code>ack</code> node.
</div>
<div class="form-row">
<label for="node-input-name" style="width: 110px;"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
</script>
<script type="text/html" data-help-name="stomp in">
@@ -61,6 +61,10 @@
</script>
<script type="text/html" data-template-name="stomp out">
<div class="form-row">
<label for="node-input-name" style="width: 110px;"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
<div class="form-row">
<label for="node-input-server" style="width: 110px;"><i class="fa fa-bookmark"></i> Server</label>
<input type="text" id="node-input-server">
@@ -69,10 +73,6 @@
<label for="node-input-topic" style="width: 110px;"><i class="fa fa-envelope"></i> Destination</label>
<input type="text" id="node-input-topic" placeholder="topic or queue">
</div>
<div class="form-row">
<label for="node-input-name" style="width: 110px;"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
<div class="form-tips" style="margin-bottom: 12px;">The <b>Destination</b> field is optional. If not set uses the <code>msg.topic</code>
property of the message.</div>
</script>
@@ -113,6 +113,10 @@
</script>
<script type="text/html" data-template-name="stomp-server">
<div class="form-row">
<label for="node-config-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-config-input-name" placeholder="Name">
</div>
<div class="form-row node-input-server">
<label for="node-config-input-server"><i class="fa fa-bookmark"></i> Server</label>
<input class="input-append-left" type="text" id="node-config-input-server" placeholder="localhost" style="width: 45%;" >
@@ -150,10 +154,6 @@
<div class="form-tips" style="margin-bottom: 12px;">
Reconnection timings are calculated using exponential backoff. The first reconnection happens immediately, the second reconnection happens at +delay ms, the third at + 2*delay ms, etc.
</div>
<div class="form-row">
<label for="node-config-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-config-input-name" placeholder="Name">
</div>
</script>
<script type="text/javascript">
@@ -179,6 +179,10 @@
</script>
<script type="text/html" data-template-name="stomp ack">
<div class="form-row">
<label for="node-input-name" style="width: 110px;"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
<div class="form-row">
<label for="node-input-server" style="width: 110px;"><i class="fa fa-bookmark"></i> Server</label>
<input type="text" id="node-input-server">
@@ -187,10 +191,6 @@
<label for="node-input-topic" style="width: 110px;"><i class="fa fa-envelope"></i> Destination</label>
<input type="text" id="node-input-topic" placeholder="topic or queue">
</div>
<div class="form-row">
<label for="node-input-name" style="width: 110px;"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
</script>
<script type="text/html" data-help-name="stomp ack">

View File

@@ -1,4 +1,4 @@
/* jshint ignore:start */
module.exports = function(RED) {
"use strict";
var StompClient = require('stomp-client');
@@ -136,7 +136,7 @@ module.exports = function(RED) {
*/
node.register = function(stompNode, callback = () => {}) {
node.users[stompNode.id] = stompNode;
if (!node.connected) {
node.connectedCallbacks.push(callback);
}
@@ -158,7 +158,7 @@ module.exports = function(RED) {
* Remove registered STOMP processing nodes from the connection.
* @param { StompInNode | StompOutNode | StompAckNode } stompNode The STOMP processing node to unregister
* @param { Boolean } autoDisconnect Automatically disconnect from the STOM server when no processing nodes registered to the connection
* @param { Function } callback
* @param { Function } callback
*/
node.deregister = function(stompNode, autoDisconnect, callback = () => {}) {
delete node.users[stompNode.id];
@@ -179,7 +179,7 @@ module.exports = function(RED) {
/**
* Connect to the STOMP server.
* @param {Function} callback
* @param {Function} callback
*/
node.connect = function(callback = () => {}) {
if (node.canConnect()) {
@@ -195,7 +195,7 @@ module.exports = function(RED) {
}
node.client = new StompClient(node.options);
node.client.on("connect", function(sessionId) {
node.closing = false;
node.connecting = false;
@@ -206,7 +206,7 @@ module.exports = function(RED) {
setStatusConnected(node, true);
callback();
});
node.client.on("reconnect", function(sessionId, numOfRetries) {
node.closing = false;
node.connecting = false;
@@ -246,7 +246,7 @@ module.exports = function(RED) {
/**
* Disconnect from the STOMP server.
* @param {Function} callback
* @param {Function} callback
*/
node.disconnect = function(callback = () => {}) {
const waitDisconnect = (client, timeout) => {
@@ -295,7 +295,7 @@ module.exports = function(RED) {
* Subscribe to a given STOMP queue.
* @param { String} queue The queue to subscribe to
* @param { "auto" | "client" | "client-individual" } clientAck Can be `auto`, `client` or `client-individual` (the latter only starting from STOMP v1.1)
* @param { Function } callback
* @param { Function } callback
*/
node.subscribe = function(queue, acknowledgment, callback) {
node.log(`Subscribe to: ${queue}`);
@@ -308,7 +308,7 @@ module.exports = function(RED) {
const headers = {
id: node.subscriptionIds[queue],
// Only set client-individual if not v1.0
ack: acknowledgment === "client-individual" && node.options.protocolVersion === "1.0" ? "client" : acknowledgment
ack: acknowledgment === "client-individual" && node.options.protocolVersion === "1.0" ? "client" : acknowledgment
}
node.client.subscribe(queue, headers, function(body, responseHeaders) {
@@ -544,4 +544,5 @@ module.exports = function(RED) {
//JavaScript does not protect the property name hasOwnProperty
//Object.prototype.hasOwnProperty.call is the recommended/safer test
return Object.prototype.hasOwnProperty.call(obj, propName);
}
}
/* jshint ignore:end */

View File

@@ -1,6 +1,6 @@
{
"name" : "node-red-node-stomp",
"version" : "1.0.5",
"version" : "1.0.6",
"description" : "A Node-RED node to publish and subscribe to/from a Stomp server",
"dependencies" : {
"stomp-client" : "^0.9.0"

View File

@@ -1,5 +1,9 @@
<script type="text/html" data-template-name="wake on lan">
<div class="form-row">
<label for="node-input-name" style="width:120px;"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
<div class="form-row">
<label for="node-input-mac" style="width:120px;"><i class="fa fa-address-card-o"></i> MAC Address</label>
<input type="text" id="node-input-mac" placeholder="e.g. DE:AD:BE:EF:FE:ED">
@@ -20,10 +24,6 @@
<label for="node-input-interval" style="width:120px;"><i class="fa fa-clock-o"></i> Interval Between Packets (ms)</label>
<input type="number" id="node-input-interval" placeholder="100">
</div>
<div class="form-row">
<label for="node-input-name" style="width:120px;"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
<div class="form-tips">Tip: leave blank if you want to use <code>msg.mac</code> or <code>msg.host</code> to dynamically set target information.</div>
</script>

View File

@@ -1,6 +1,6 @@
{
"name": "node-red-node-wol",
"version": "0.2.0",
"version": "0.2.1",
"description": "A Node-RED node to send Wake-On-LAN (WOL) magic packets",
"dependencies": {
"wake_on_lan": "^1.0.0"
@@ -23,7 +23,7 @@
},
"author": {
"name": "Dave Conway-Jones",
"email": "ceejay@vnet.ibm.com",
"email": "dceejay@gmail.com",
"url": "http://nodered.org"
}
}