mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Let UDP node better share same port instance if required
This commit is contained in:
@@ -33,7 +33,7 @@
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label for="node-input-port"><i class="fa fa-sign-in"></i> <span data-i18n="udp.label.onport"></span></label>
|
||||
<input type="text" id="node-input-port" style="width: 80px">
|
||||
<input type="text" id="node-input-port" style="width:80px">
|
||||
<span data-i18n="udp.label.using"></span> <select id="node-input-ipv" style="width:80px">
|
||||
<option value="udp4">ipv4</option>
|
||||
<option value="udp6">ipv6</option>
|
||||
@@ -41,7 +41,7 @@
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label for="node-input-datatype"><i class="fa fa-sign-out"></i> <span data-i18n="udp.label.output"></span></label>
|
||||
<select id="node-input-datatype" style="width: 70%;">
|
||||
<select id="node-input-datatype" style="width:70%;">
|
||||
<option value="buffer" data-i18n="udp.output.buffer"></option>
|
||||
<option value="utf8" data-i18n="udp.output.string"></option>
|
||||
<option value="base64" data-i18n="udp.output.base64"></option>
|
||||
@@ -83,7 +83,9 @@
|
||||
if (this.multicast=="false") {
|
||||
return this.name||"udp "+this.port;
|
||||
}
|
||||
else return this.name||"udp "+(this.group+":"+this.port);
|
||||
else {
|
||||
return this.name||"udp "+(this.group+":"+this.port);
|
||||
}
|
||||
},
|
||||
labelStyle: function() {
|
||||
return this.name?"node_label_italic":"";
|
||||
@@ -107,7 +109,7 @@
|
||||
var portsInUse = {};
|
||||
$.getJSON('udp-ports/'+this.id,function(data) {
|
||||
portsInUse = data || {};
|
||||
$('#udpporttip').html(porttip + Object.keys(data||{}));
|
||||
$('#udpporttip').html(porttip + data);
|
||||
});
|
||||
$("#node-input-port").change(function() {
|
||||
var portnew = $("#node-input-port").val();
|
||||
@@ -129,11 +131,11 @@
|
||||
<option value="broad" data-i18n="udp.bcmsg"></option>
|
||||
<option value="multi" data-i18n="udp.mcmsg"></option>
|
||||
</select>
|
||||
<span data-i18n="udp.label.toport"></span> <input type="text" id="node-input-port" style="width: 70px">
|
||||
<span data-i18n="udp.label.toport"></span> <input type="text" id="node-input-port" style="width:70px">
|
||||
</div>
|
||||
<div class="form-row node-input-addr">
|
||||
<label for="node-input-addr" id="node-input-addr-label"><i class="fa fa-list"></i> <span data-i18n="udp.label.address"></span></label>
|
||||
<input type="text" id="node-input-addr" data-i18n="[placeholder]udp.placeholder.address" style="width: 50%;">
|
||||
<input type="text" id="node-input-addr" data-i18n="[placeholder]udp.placeholder.address" style="width:50%;">
|
||||
<select id="node-input-ipv" style="width:70px">
|
||||
<option value="udp4">ipv4</option>
|
||||
<option value="udp6">ipv6</option>
|
||||
@@ -149,12 +151,12 @@
|
||||
<option id="node-input-outport-type-random" value="random" data-i18n="udp.bind.random"></option>
|
||||
<option value="fixed" data-i18n="udp.bind.local"></option>
|
||||
</select>
|
||||
<input type="text" id="node-input-outport" style="width: 70px;">
|
||||
<input type="text" id="node-input-outport" style="width:70px;">
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label> </label>
|
||||
<input type="checkbox" id="node-input-base64" style="display: inline-block; width: auto; vertical-align: top;">
|
||||
<label for="node-input-base64" style="width: 70%;"><span data-i18n="udp.label.decode-base64"></span></label>
|
||||
<input type="checkbox" id="node-input-base64" style="display:inline-block; width:auto; vertical-align:top;">
|
||||
<label for="node-input-base64" style="width:70%;"><span data-i18n="udp.label.decode-base64"></span></label>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="common.label.name"></span></label>
|
||||
@@ -201,7 +203,7 @@
|
||||
var bindrandom = this._("udp.bind.random");
|
||||
var bindtarget = this._("udp.bind.target");
|
||||
|
||||
var type = this.outport==""?"random":"fixed";
|
||||
var type = this.outport===""?"random":"fixed";
|
||||
$("#node-input-outport-type").val(type);
|
||||
|
||||
$("#node-input-outport-type").change(function() {
|
||||
|
Reference in New Issue
Block a user