mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Merge branch 'dev' into function-modules
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
color:"#c0edc0",
|
||||
defaults: {
|
||||
name: {value:""},
|
||||
scope: {value:[]},
|
||||
scope: {value:[], type:"*[]"},
|
||||
uncaught: {value:false}
|
||||
},
|
||||
inputs:0,
|
||||
|
@@ -30,7 +30,7 @@
|
||||
color:"#e49191",
|
||||
defaults: {
|
||||
name: {value:""},
|
||||
scope: {value:null},
|
||||
scope: {value:null, type:"*[]"},
|
||||
uncaught: {value:false}
|
||||
},
|
||||
inputs:0,
|
||||
|
@@ -26,7 +26,7 @@
|
||||
color:"#94c1d0",
|
||||
defaults: {
|
||||
name: {value:""},
|
||||
scope: {value:null}
|
||||
scope: {value:null, type:"*[]"}
|
||||
},
|
||||
inputs:0,
|
||||
outputs:1,
|
||||
|
@@ -187,7 +187,7 @@
|
||||
color:"#ddd",//"#87D8CF",
|
||||
defaults: {
|
||||
name: {value:""},
|
||||
links: { value: [] }
|
||||
links: { value: [], type:"link out[]" }
|
||||
},
|
||||
inputs:0,
|
||||
outputs:1,
|
||||
@@ -216,7 +216,7 @@
|
||||
color:"#ddd",//"#87D8CF",
|
||||
defaults: {
|
||||
name: {value:""},
|
||||
links: { value: []}
|
||||
links: { value: [], type:"link in[]"}
|
||||
},
|
||||
align:"right",
|
||||
inputs:1,
|
||||
|
@@ -168,6 +168,10 @@ module.exports = function(RED) {
|
||||
return getFromValueType(RED.util.getMessageProperty(msg,rule.from),done);
|
||||
} else if (rule.fromt === 'flow' || rule.fromt === 'global') {
|
||||
var contextKey = RED.util.parseContextStore(rule.from);
|
||||
if (/\[msg\./.test(context.key)) {
|
||||
// The key has a nest msg. reference to evaluate first
|
||||
context.key = RED.util.normalisePropertyExpression(contextKey.key,msg,true);
|
||||
}
|
||||
node.context()[rule.fromt].get(contextKey.key, contextKey.store, (err,fromValue) => {
|
||||
if (err) {
|
||||
done(err)
|
||||
@@ -243,6 +247,10 @@ module.exports = function(RED) {
|
||||
return done(undefined,msg);
|
||||
} else if (rule.pt === 'flow' || rule.pt === 'global') {
|
||||
var contextKey = RED.util.parseContextStore(property);
|
||||
if (/\[msg/.test(contextKey.key)) {
|
||||
// The key has a nest msg. reference to evaluate first
|
||||
contextKey.key = RED.util.normalisePropertyExpression(contextKey.key, msg, true)
|
||||
}
|
||||
var target = node.context()[rule.pt];
|
||||
var callback = err => {
|
||||
if (err) {
|
||||
|
@@ -52,7 +52,7 @@
|
||||
color:"darksalmon",
|
||||
defaults: {
|
||||
command: {value:""},
|
||||
addpay: {value:true},
|
||||
addpay: {value:false},
|
||||
append: {value:""},
|
||||
useSpawn: {value:"false"},
|
||||
timer: {value:""},
|
||||
|
@@ -31,12 +31,12 @@ module.exports = function(RED) {
|
||||
this.timer = Number(n.timer || 0)*1000;
|
||||
this.activeProcesses = {};
|
||||
this.oldrc = (n.oldrc || false).toString();
|
||||
this.execOpt = {encoding:'binary', maxBuffer:10000000};
|
||||
this.execOpt = {encoding:'binary', maxBuffer:RED.settings.execMaxBufferSize||10000000};
|
||||
var node = this;
|
||||
|
||||
if (process.platform === 'linux' && fs.existsSync('/bin/bash')) { node.execOpt.shell = '/bin/bash'; }
|
||||
|
||||
var cleanup = function(p) {
|
||||
if (process.platform === 'linux' && fs.existsSync('/bin/bash')) { node.execOpt.shell = '/bin/bash'; }
|
||||
|
||||
var cleanup = function(p) {
|
||||
node.activeProcesses[p].kill();
|
||||
//node.status({fill:"red",shape:"dot",text:"timeout"});
|
||||
//node.error("Exec node timeout");
|
||||
|
@@ -235,6 +235,7 @@
|
||||
oneditprepare: function() {
|
||||
var previous = null;
|
||||
$("#node-input-out").on('focus', function () { previous = this.value; }).on("change", function() {
|
||||
$("#node-input-splitc").show();
|
||||
if (previous === null) { previous = $("#node-input-out").val(); }
|
||||
if ($("#node-input-out").val() == "char") {
|
||||
if (previous != "char") { $("#node-input-splitc").val("\\n"); }
|
||||
@@ -247,6 +248,7 @@
|
||||
else if ($("#node-input-out").val() == "immed") {
|
||||
if (previous != "immed") { $("#node-input-splitc").val(" "); }
|
||||
$("#node-units").text("");
|
||||
$("#node-input-splitc").hide();
|
||||
}
|
||||
else if ($("#node-input-out").val() == "count") {
|
||||
if (previous != "count") { $("#node-input-splitc").val("12"); }
|
||||
@@ -255,6 +257,7 @@
|
||||
else {
|
||||
if (previous != "sit") { $("#node-input-splitc").val(" "); }
|
||||
$("#node-units").text("");
|
||||
$("#node-input-splitc").hide();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@@ -737,7 +737,10 @@ module.exports = function(RED) {
|
||||
group.msg = Object.assign(group.msg, msg);
|
||||
group.send = send;
|
||||
var tcnt = group.targetCount;
|
||||
if (msg.hasOwnProperty("parts")) { tcnt = group.targetCount || msg.parts.count; }
|
||||
if (msg.hasOwnProperty("parts")) {
|
||||
tcnt = group.targetCount || msg.parts.count;
|
||||
group.targetCount = tcnt;
|
||||
}
|
||||
if ((tcnt > 0 && group.currentCount >= tcnt) || msg.hasOwnProperty('complete')) {
|
||||
completeSend(partId);
|
||||
}
|
||||
@@ -759,3 +762,4 @@ module.exports = function(RED) {
|
||||
}
|
||||
RED.nodes.registerType("join",JoinNode);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user