mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Merge branch 'dev' into fix_html_tags
This commit is contained in:
@@ -108,12 +108,13 @@ in your Node-RED user directory (${RED.settings.userDir}).
|
||||
if (n.proxy && proxyConfig) {
|
||||
proxyOptions.env = {
|
||||
no_proxy: (proxyConfig.noproxy || []).join(','),
|
||||
http_proxy: (proxyConfig.url)
|
||||
http_proxy: (proxyConfig.url),
|
||||
https_proxy: (proxyConfig.url)
|
||||
}
|
||||
}
|
||||
return getProxyForUrl(url, proxyOptions)
|
||||
}
|
||||
let prox = getProxy(nodeUrl || '')
|
||||
let prox = nodeUrl ? getProxy(nodeUrl) : null
|
||||
|
||||
let timingLog = false;
|
||||
if (RED.settings.hasOwnProperty("httpRequestTimingLog")) {
|
||||
@@ -534,9 +535,7 @@ in your Node-RED user directory (${RED.settings.userDir}).
|
||||
opts.headers[clSet] = opts.headers['content-length'];
|
||||
delete opts.headers['content-length'];
|
||||
}
|
||||
if (!opts.headers.hasOwnProperty('user-agent')) {
|
||||
opts.headers['user-agent'] = 'Mozilla/5.0 (Node-RED)';
|
||||
}
|
||||
|
||||
if (proxyUrl) {
|
||||
const match = proxyUrl.match(/^(https?:\/\/)?(.+)?:([0-9]+)?/i);
|
||||
if (match) {
|
||||
@@ -566,7 +565,7 @@ in your Node-RED user directory (${RED.settings.userDir}).
|
||||
//need both incase of http -> https redirect
|
||||
opts.agent = {
|
||||
http: new HttpProxyAgent(proxyOptions),
|
||||
https: new HttpProxyAgent(proxyOptions)
|
||||
https: new HttpsProxyAgent(proxyOptions)
|
||||
};
|
||||
|
||||
} else {
|
||||
|
@@ -17,7 +17,11 @@
|
||||
<script type="text/html" data-template-name="split">
|
||||
<!-- <div class="form-row"><span data-i18n="[html]split.intro"></span></div> -->
|
||||
<div class="form-row">
|
||||
<label for="node-input-property"><i class="fa fa-forward"></i> <span data-i18n="split.split"></span></label>
|
||||
<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">
|
||||
<label for="node-input-property"><i class="fa fa-forward"></i> <span data-i18n="split.splitThe"></span></label>
|
||||
<input type="text" id="node-input-property" style="width:70%;">
|
||||
</div>
|
||||
<div class="form-row"><span data-i18n="[html]split.strBuff"></span></div>
|
||||
@@ -43,10 +47,6 @@
|
||||
<label for="node-input-addname-cb" style="width:auto;" data-i18n="split.addname"></label>
|
||||
<input type="text" id="node-input-addname" style="width:70%">
|
||||
</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>
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
@@ -122,6 +122,10 @@
|
||||
|
||||
|
||||
<script type="text/html" data-template-name="join">
|
||||
<div class="form-row">
|
||||
<label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="common.label.name"></span></label>
|
||||
<input type="text" id="node-input-name" data-i18n="[placeholder]common.label.name">
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label data-i18n="join.mode.mode"></label>
|
||||
<select id="node-input-mode" style="width:200px;">
|
||||
@@ -157,6 +161,12 @@
|
||||
<input type="text" id="node-input-joiner" style="width:70%">
|
||||
<input type="hidden" id="node-input-joinerType">
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<input type="checkbox" id="node-input-useparts" style="margin-left:8px; margin-right:8px; vertical-align:baseline; width:auto;">
|
||||
<label for="node-input-useparts" style="width:auto;" data-i18n="join.useparts"></label>
|
||||
</div>
|
||||
|
||||
<div class="form-row node-row-trigger" id="trigger-row">
|
||||
<label style="width:auto;" data-i18n="join.send"></label>
|
||||
<ul>
|
||||
@@ -195,10 +205,6 @@
|
||||
<label for="node-input-reduceRight" data-i18n="join.reduce.right" style="width:70%; margin-left:10px;"></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="common.label.name"></span></label>
|
||||
<input type="text" id="node-input-name" data-i18n="[placeholder]common.label.name">
|
||||
</div>
|
||||
<div class="form-tips form-tips-auto hide" data-i18n="[html]join.tip"></div>
|
||||
</script>
|
||||
|
||||
@@ -234,6 +240,7 @@
|
||||
},
|
||||
joiner: { value:"\\n"},
|
||||
joinerType: { value:"str"},
|
||||
useparts: { value:false },
|
||||
accumulate: { value:"false" },
|
||||
timeout: {value:""},
|
||||
count: {value:""},
|
||||
@@ -259,6 +266,12 @@
|
||||
},
|
||||
oneditprepare: function() {
|
||||
var node = this;
|
||||
$("#node-input-useparts").on("change", function(e) {
|
||||
if (node.useparts === undefined) {
|
||||
node.useparts = true;
|
||||
$("#node-input-useparts").attr('checked', true);
|
||||
}
|
||||
});
|
||||
|
||||
$("#node-input-mode").on("change", function(e) {
|
||||
var val = $(this).val();
|
||||
|
@@ -444,6 +444,8 @@ module.exports = function(RED) {
|
||||
this.count = Number(n.count || 0);
|
||||
this.joiner = n.joiner||"";
|
||||
this.joinerType = n.joinerType||"str";
|
||||
if (n.useparts === undefined) { this.useparts = true; }
|
||||
else { this.useparts = n.useparts || false; }
|
||||
|
||||
this.reduce = (this.mode === "reduce");
|
||||
if (this.reduce) {
|
||||
@@ -611,7 +613,7 @@ module.exports = function(RED) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (node.mode === 'custom' && msg.hasOwnProperty('parts')) {
|
||||
if (node.mode === 'custom' && msg.hasOwnProperty('parts') && node.useparts === false ) {
|
||||
if (msg.parts.hasOwnProperty('parts')) {
|
||||
msg.parts = { parts: msg.parts.parts };
|
||||
}
|
||||
|
@@ -36,6 +36,10 @@
|
||||
<label style="margin-left: 10px; width: 175px;" for="node-input-overlap" data-i18n="batch.count.overlap"></label>
|
||||
<input type="text" id="node-input-overlap" style="width: 50px;">
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<input type="checkbox" id="node-input-honourParts" style="margin-left: 10px; margin-right:10px; vertical-align:top; width:auto;">
|
||||
<label for="node-input-honourParts" style="width:auto;" data-i18n="batch.honourParts"></label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="node-row-msg-interval">
|
||||
@@ -45,7 +49,7 @@
|
||||
<span data-i18n="batch.interval.seconds"></span>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<input type="checkbox" id="node-input-allowEmptySequence" style="margin-left:20px; margin-right: 10px; vertical-align:top; width:auto;">
|
||||
<input type="checkbox" id="node-input-allowEmptySequence" style="margin-left:20px; margin-right:10px; vertical-align:top; width:auto;">
|
||||
<label for="node-input-allowEmptySequence" style="width:auto;" data-i18n="batch.interval.empty"></label>
|
||||
</div>
|
||||
</div>
|
||||
@@ -101,6 +105,7 @@
|
||||
}
|
||||
},
|
||||
allowEmptySequence: {value:false},
|
||||
honourParts: {value:false},
|
||||
topics: {value:[{topic:""}]}
|
||||
},
|
||||
inputs:1,
|
||||
|
@@ -181,6 +181,8 @@ module.exports = function(RED) {
|
||||
RED.nodes.createNode(this,n);
|
||||
var node = this;
|
||||
var mode = n.mode || "count";
|
||||
var eof = false;
|
||||
node.honourParts = n.honourParts || false;
|
||||
|
||||
node.pending_count = 0;
|
||||
if (mode === "count") {
|
||||
@@ -201,9 +203,12 @@ module.exports = function(RED) {
|
||||
return;
|
||||
}
|
||||
var queue = node.pending;
|
||||
if (node.honourParts && msg.hasOwnProperty("parts")) {
|
||||
if (msg.parts.index + 1 === msg.parts.count) { eof = true; }
|
||||
}
|
||||
queue.push({msg, send, done});
|
||||
node.pending_count++;
|
||||
if (queue.length === count) {
|
||||
if (queue.length === count || eof === true) {
|
||||
send_msgs(node, queue, is_overlap);
|
||||
for (let i = 0; i < queue.length-overlap; i++) {
|
||||
queue[i].done();
|
||||
@@ -211,6 +216,7 @@ module.exports = function(RED) {
|
||||
node.pending =
|
||||
(overlap === 0) ? [] : queue.slice(-overlap);
|
||||
node.pending_count = 0;
|
||||
eof = false;
|
||||
}
|
||||
var max_msgs = max_kept_msgs_count(node);
|
||||
if ((max_msgs > 0) && (node.pending_count > max_msgs)) {
|
||||
|
@@ -20,12 +20,26 @@
|
||||
<dt class="optional">delay <span class="property-type">number</span></dt>
|
||||
<dd>Legt die Verzögerung in Millisekunden fest, die auf die Nachricht angewendet werden soll.
|
||||
Zur Nutzung dieser Option muss <i>Verzög. mit msg.delay überschreibbar</i> aktiviert sein.</dd>
|
||||
<dt class="optional">rate <span class="property-type">number</span></dt>
|
||||
<dd>Setzt die Verzögerung in Millisekunden zwischen den Nachrichten. Diese Node überschreibt die
|
||||
bestehende Verzögerung die in der Node konfiguration, wenn die empfangende Nachricht <code>msg.rate</code>
|
||||
in Millisekunden enthält. Dies trifft nur zu, wenn in der Node konfiguriert ist, das empfangene
|
||||
Nachrichten den konfigurierten Wert überschreiben können.</dd>
|
||||
<dt class="optional">reset</dt>
|
||||
<dd>Wenn bei der empfangenen Nachricht diese Eigenschaft auf einen beliebigen Wert gesetzt ist,
|
||||
werden alle im Node gepufferten Nachrichten gelöscht.</dd>
|
||||
<dt class="optional">flush</dt>
|
||||
<dd>Wenn bei der empfangenen Nachricht diese Eigenschaft auf einen beliebigen Wert gesetzt ist,
|
||||
werden alle im Node gepufferten Nachrichten sofort gesendet.</dd>
|
||||
<dt class="optional">flush</dt>
|
||||
<dd>Wenn bei der empfangenen Nachricht diese Eigenschaft auf einen numerischen Wert gesetzt ist,
|
||||
wird diese Anzahl an Nachrichten sofort gesendet. Wenn ein anderer Typ gesetzt ist (z.B. Boolean),
|
||||
werden alle in der Node gepufferten Nachrichten gesendet.</dd>
|
||||
<dt class="optional">toFront</dt>
|
||||
<dd>Wenn diese Eigenschaft im Ratenbegrenzungsmodus für die empfangene Nachricht auf den booleschen Wert
|
||||
<code>true</code> gesetzt ist, Anschließend wird die Nachricht an den Anfang der Warteschlange verschoben
|
||||
und als nächstes freigegeben. Dies kann in Kombination mit <code>msg.flush=1</code> verwendet werden, um sofort erneut zu senden.
|
||||
</dd>
|
||||
</dl>
|
||||
<h3>Details</h3>
|
||||
<p>Wenn Verzögerung als Nachrichtenaktion eingestellt ist, kann die Verzögerungszeit ein fixer Wert,
|
||||
|
@@ -912,6 +912,7 @@
|
||||
"objectSend": "Sende eine Nachricht für jedes Schlüssel/Wert-Paar",
|
||||
"strBuff": "<b>string</b> / <b>buffer</b>",
|
||||
"array": "<b>array</b>",
|
||||
"splitThe": "Split",
|
||||
"splitUsing": "Aufteilung",
|
||||
"splitLength": "feste Längen von",
|
||||
"stream": "Als Nachrichtenstrom behandeln (Streaming-Modus)",
|
||||
|
@@ -1011,12 +1011,13 @@
|
||||
"tip": "Tip: The filename should be an absolute path, otherwise it will be relative to the working directory of the Node-RED process."
|
||||
},
|
||||
"split": {
|
||||
"split": "Split",
|
||||
"split": "split",
|
||||
"intro": "Split <code>msg.payload</code> based on type:",
|
||||
"object": "<b>Object</b>",
|
||||
"objectSend": "Send a message for each key/value pair",
|
||||
"strBuff": "<b>String</b> / <b>Buffer</b>",
|
||||
"array": "<b>Array</b>",
|
||||
"splitThe": "Split the",
|
||||
"splitUsing": "Split using",
|
||||
"splitLength": "Fixed length of",
|
||||
"stream": "Handle as a stream of messages",
|
||||
@@ -1046,6 +1047,7 @@
|
||||
"joinedUsing": "joined using",
|
||||
"send": "Send the message:",
|
||||
"afterCount": "After a number of message parts",
|
||||
"useparts": "Use existing msg.parts property",
|
||||
"count": "count",
|
||||
"subsequent": "and every subsequent message.",
|
||||
"afterTimeout": "After a timeout following the first message",
|
||||
@@ -1112,6 +1114,7 @@
|
||||
"too-many": "too many pending messages in batch node",
|
||||
"unexpected": "unexpected mode",
|
||||
"no-parts": "no parts property in message",
|
||||
"honourParts": "Allow msg.parts to also complete batch operation.",
|
||||
"error": {
|
||||
"invalid-count": "Invalid count",
|
||||
"invalid-overlap": "Invalid overlap",
|
||||
|
@@ -1017,6 +1017,7 @@
|
||||
"objectSend": "各key/valueペアのメッセージを送信",
|
||||
"strBuff": "<b>文字列</b> / <b>バッファ</b>",
|
||||
"array": "<b>配列</b>",
|
||||
"splitThe": "に基づく",
|
||||
"splitUsing": "分割",
|
||||
"splitLength": "固定長",
|
||||
"stream": "メッセージのストリームとして処理",
|
||||
|
@@ -44,7 +44,7 @@
|
||||
"global": "contexto global",
|
||||
"str": "Cadeia de caracteres",
|
||||
"num": "número",
|
||||
"bool": "booliano",
|
||||
"bool": "booliano",
|
||||
"json": "objeto",
|
||||
"bin": "Armazenamento temporário",
|
||||
"date": "Carimbo de data/hora",
|
||||
@@ -352,8 +352,8 @@
|
||||
}
|
||||
},
|
||||
"trigger": {
|
||||
"send": "Enviar",
|
||||
"then": "então",
|
||||
"send": "Enviar",
|
||||
"then": "então",
|
||||
"then-send": "então enviem",
|
||||
"output": {
|
||||
"string": "a cadeia de caracteres",
|
||||
@@ -446,7 +446,7 @@
|
||||
"staticTopic": "Assinar um tópico único",
|
||||
"dynamicTopic": "Assinatura dinâmica",
|
||||
"auto-connect": "Conectar automaticamente",
|
||||
"auto-mode-depreciated": "Esta opção está deprecada. Favor utilizar o novo modo de auto-detecção."
|
||||
"auto-mode-depreciated": "Esta opção está deprecada. Favor utilizar o novo modo de auto-detecção."
|
||||
},
|
||||
"sections-label": {
|
||||
"birth-message": "Mensagem enviada na conexão (mensagem de nascimento)",
|
||||
@@ -466,8 +466,8 @@
|
||||
"close-topic": "Deixe em branco para desativar a mensagem de fechamento"
|
||||
},
|
||||
"state": {
|
||||
"connected": "Conectado ao negociante: _ broker _",
|
||||
"disconnected": "Desconectado do negociante: _ broker _",
|
||||
"connected": "Conectado ao negociante: _ broker _",
|
||||
"disconnected": "Desconectado do negociante: _ broker _",
|
||||
"connect-failed": "Falha na conexão com o negociante: __broker__",
|
||||
"broker-disconnected": "Cliente de negociante __broker__ desconectado: __reasonCode__ __reasonString__"
|
||||
},
|
||||
@@ -898,7 +898,7 @@
|
||||
"o2j": "Objeto para opções JSON",
|
||||
"pretty": "Formatar cadeia de caracteres JSON",
|
||||
"action": "Ação",
|
||||
"property": "Propriedade",
|
||||
"property": "Propriedade",
|
||||
"actions": {
|
||||
"toggle": "Converter entre cadeia de caracteres JSON e Objeto",
|
||||
"str": "Sempre converter em cadeia de caracteres JSON",
|
||||
@@ -929,7 +929,7 @@
|
||||
"write": "escrever arquivo",
|
||||
"read": "ler arquivo",
|
||||
"filename": "Nome do arquivo",
|
||||
"path": "caminho",
|
||||
"path": "caminho",
|
||||
"action": "Ação",
|
||||
"addnewline": "Adicionar nova linha (\\n) a cada carga útil?",
|
||||
"createdir": "Criar diretório se não existir?",
|
||||
@@ -994,6 +994,7 @@
|
||||
"objectSend": "Envia uma mensagem para cada par chave/valor",
|
||||
"strBuff": "<b>Cadeia de caracteres</b> / <b>Armazenamento Temporário</b>",
|
||||
"array": "<b>Matriz</b>",
|
||||
"splitThe": "Dividir",
|
||||
"splitUsing": "Dividir usando",
|
||||
"splitLength": "Comprimento fixo de",
|
||||
"stream": "Tratar como uma transmissão de mensagens",
|
||||
@@ -1066,9 +1067,9 @@
|
||||
"batch" : {
|
||||
"batch": "lote",
|
||||
"mode": {
|
||||
"label": "Modo",
|
||||
"num-msgs": "Agrupar por número de mensagens",
|
||||
"interval": "Agrupar por intervalo de tempo",
|
||||
"label": "Modo",
|
||||
"num-msgs": "Agrupar por número de mensagens",
|
||||
"interval": "Agrupar por intervalo de tempo",
|
||||
"concat": "Concatenar sequências"
|
||||
},
|
||||
"count": {
|
||||
|
@@ -874,6 +874,7 @@
|
||||
"objectSend":"Отправлять сообщение для каждой пары ключ/значение",
|
||||
"strBuff":"<b>Строка</b> / <b>Буфер</b>",
|
||||
"array":"<b>Массив</b>",
|
||||
"splitThe": "Pазделить",
|
||||
"splitUsing":"С помощью",
|
||||
"splitLength":"Фикс. длина",
|
||||
"stream":"Обрабатывать как поток сообщений",
|
||||
|
@@ -997,6 +997,7 @@
|
||||
"objectSend": "每个键值对作为单个消息发送",
|
||||
"strBuff": "<b>字符串</b> / <b>Buffer</b>",
|
||||
"array": "<b>数组</b>",
|
||||
"splitThe": "Split",
|
||||
"splitUsing": "拆分使用",
|
||||
"splitLength": "固定长度",
|
||||
"stream": "作为消息流处理",
|
||||
|
@@ -866,6 +866,7 @@
|
||||
"objectSend": "每個鍵值對作為單個消息發送",
|
||||
"strBuff": "<b>字串</b> / <b>Buffer</b>",
|
||||
"array": "<b>陣列</b>",
|
||||
"splitThe": "Split",
|
||||
"splitUsing": "拆分使用",
|
||||
"splitLength": "固定長度",
|
||||
"stream": "作為消息流處理",
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@node-red/nodes",
|
||||
"version": "4.0.0",
|
||||
"version": "4.1.0-beta.0",
|
||||
"license": "Apache-2.0",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
Reference in New Issue
Block a user