mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9ec7bb8d41 | ||
|
|
2b9bfbc309 | ||
|
|
e50d04077b | ||
|
|
b6fcaacb77 | ||
|
|
939da4e551 | ||
|
|
f30ce1f9eb | ||
|
|
343588b2a0 | ||
|
|
77b13ce9d4 | ||
|
|
7cb41d2ca9 | ||
|
|
8bbc9e6502 | ||
|
|
e29a0df3fd |
23
CHANGELOG.md
23
CHANGELOG.md
@@ -1,3 +1,26 @@
|
||||
#### 0.14.3: Maintenance Release
|
||||
|
||||
Fixes
|
||||
|
||||
- Create default setting.js in user-specified directory. Fixes #908
|
||||
- MQTT In subscription qos not defaulting properly
|
||||
- Let exec node handle 0 as well as "0"
|
||||
|
||||
#### 0.14.2: Maintenance Release
|
||||
|
||||
Fixes
|
||||
|
||||
- Cannot add new twitter credentials. Fixes #913
|
||||
- Support array references in Debug property field
|
||||
|
||||
#### 0.14.1: Maintenance Release
|
||||
|
||||
Fixes
|
||||
|
||||
- Handle undefined property that led to missing wires in the editor
|
||||
- Remove duplicate 'Delete' entry in keyboard shortcut window. Closes #911
|
||||
- Add 'exec' to node-red-pi launch script. Closes #910
|
||||
|
||||
#### 0.14.0: Milestone Release
|
||||
|
||||
Editor
|
||||
|
||||
@@ -40,4 +40,4 @@ SCRIPT_PATH="`pwd`";
|
||||
cd $CURRENT_PATH
|
||||
|
||||
# Run Node-RED
|
||||
/usr/bin/env node $OPTIONS $SCRIPT_PATH/../red.js $ARGS
|
||||
exec /usr/bin/env node $OPTIONS $SCRIPT_PATH/../red.js $ARGS
|
||||
|
||||
@@ -903,7 +903,7 @@ RED.nodes = (function() {
|
||||
if (configNode && configNode.users.indexOf(n) === -1) {
|
||||
configNode.users.push(n);
|
||||
}
|
||||
} else if (nodeTypeArrayReferences.hasOwnProperty(n.type) && nodeTypeArrayReferences[n.type] === d3 && n[d3] !== null) {
|
||||
} else if (nodeTypeArrayReferences.hasOwnProperty(n.type) && nodeTypeArrayReferences[n.type] === d3 && n[d3] !== undefined && n[d3] !== null) {
|
||||
for (var j = 0;j<n[d3].length;j++) {
|
||||
if (node_map[n[d3][j]]) {
|
||||
n[d3][j] = node_map[n[d3][j]].id;
|
||||
|
||||
@@ -110,7 +110,6 @@ RED.keyboard = (function() {
|
||||
'<tr><td><span class="help-key">Ctrl/⌘</span> + <span class="help-key">a</span></td><td>'+RED._("keyboard.selectAll")+'</td></tr>'+
|
||||
'<tr><td><span class="help-key">Shift</span> + <span class="help-key">Click</span></td><td>'+RED._("keyboard.selectAllConnected")+'</td></tr>'+
|
||||
'<tr><td><span class="help-key">Ctrl/⌘</span> + <span class="help-key">Click</span></td><td>'+RED._("keyboard.addRemoveNode")+'</td></tr>'+
|
||||
'<tr><td><span class="help-key">Delete</span></td><td>'+RED._("keyboard.deleteSelected")+'</td></tr>'+
|
||||
'<tr><td> </td><td></td></tr>'+
|
||||
'<tr><td><span class="help-key">Ctrl/⌘</span> + <span class="help-key">i</span></td><td>'+RED._("keyboard.importNode")+'</td></tr>'+
|
||||
'<tr><td><span class="help-key">Ctrl/⌘</span> + <span class="help-key">e</span></td><td>'+RED._("keyboard.exportNode")+'</td></tr>'+
|
||||
|
||||
@@ -39,8 +39,7 @@ RED.tray = (function() {
|
||||
if (options.buttons) {
|
||||
for (var i=0;i<options.buttons.length;i++) {
|
||||
var button = options.buttons[i];
|
||||
|
||||
var b = $('<button>').appendTo(buttonBar);
|
||||
var b = $('<button>').button().appendTo(buttonBar);
|
||||
if (button.id) {
|
||||
b.attr('id',button.id);
|
||||
}
|
||||
|
||||
@@ -83,8 +83,12 @@
|
||||
border-color: $editor-button-background-primary;
|
||||
color: $editor-button-color-primary;
|
||||
background: $editor-button-background-primary;
|
||||
|
||||
&:not(.disabled):hover {
|
||||
&.disabled, &.ui-state-disabled {
|
||||
background: none;
|
||||
color: $editor-button-color;
|
||||
border-color: $form-input-border-color;
|
||||
}
|
||||
&:not(.disabled):not(.ui-button-disabled):hover {
|
||||
border-color: $editor-button-background-primary-hover;
|
||||
background: $editor-button-background-primary-hover;
|
||||
color: $editor-button-color-primary !important;
|
||||
@@ -101,8 +105,6 @@
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
&.leftButton {
|
||||
float: left;
|
||||
margin-top: 1px;
|
||||
@@ -110,6 +112,9 @@
|
||||
&:not(.leftButton):not(:last-child) {
|
||||
margin-right: 16px;
|
||||
}
|
||||
&.ui-state-disabled {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -50,12 +50,9 @@ module.exports = function(RED) {
|
||||
var output = msg[property];
|
||||
if (this.complete !== "false" && typeof this.complete !== "undefined") {
|
||||
property = this.complete;
|
||||
var propertyParts = property.split(".");
|
||||
try {
|
||||
output = propertyParts.reduce(function (obj, i) {
|
||||
return obj[i];
|
||||
}, msg);
|
||||
} catch (err) {
|
||||
output = RED.util.getMessageProperty(msg,this.complete);
|
||||
} catch(err) {
|
||||
output = undefined;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@ module.exports = function(RED) {
|
||||
this.useSpawn = n.useSpawn;
|
||||
this.timer = Number(n.timer || 0)*1000;
|
||||
this.activeProcesses = {};
|
||||
var node = this;
|
||||
|
||||
var cleanup = function(p) {
|
||||
//console.log("CLEANUP!!!",p);
|
||||
@@ -37,7 +38,6 @@ module.exports = function(RED) {
|
||||
node.error("Exec node timeout");
|
||||
}
|
||||
|
||||
var node = this;
|
||||
this.on("input", function(msg) {
|
||||
var child;
|
||||
node.status({fill:"blue",shape:"dot",text:" "});
|
||||
@@ -45,8 +45,8 @@ module.exports = function(RED) {
|
||||
// make the extra args into an array
|
||||
// then prepend with the msg.payload
|
||||
var arg = node.cmd;
|
||||
if (node.addpay) { arg += " "+msg.payload; }
|
||||
arg += " "+node.append;
|
||||
if ((node.addpay === true) && msg.hasOwnProperty("payload")) { arg += " "+msg.payload; }
|
||||
if (node.append.trim() !== "") { arg += " "+node.append; }
|
||||
// slice whole line by spaces (trying to honour quotes);
|
||||
arg = arg.match(/(?:[^\s"]+|"[^"]*")+/g);
|
||||
var cmd = arg.shift();
|
||||
@@ -88,7 +88,7 @@ module.exports = function(RED) {
|
||||
}
|
||||
else {
|
||||
var cl = node.cmd;
|
||||
if ((node.addpay === true) && ((msg.payload || "").toString().trim() !== "")) { cl += " "+msg.payload; }
|
||||
if ((node.addpay === true) && msg.hasOwnProperty("payload")) { cl += " "+msg.payload; }
|
||||
if (node.append.trim() !== "") { cl += " "+node.append; }
|
||||
/* istanbul ignore else */
|
||||
if (RED.settings.verbose) { node.log(cl); }
|
||||
|
||||
@@ -314,8 +314,10 @@ module.exports = function(RED) {
|
||||
function MQTTInNode(n) {
|
||||
RED.nodes.createNode(this,n);
|
||||
this.topic = n.topic;
|
||||
this.qos = parseInt(n.qos===undefined?"2":n.qos);
|
||||
|
||||
this.qos = parseInt(n.qos);
|
||||
if (isNaN(this.qos) || this.qos < 0 || this.qos > 2) {
|
||||
this.qos = 2;
|
||||
}
|
||||
this.broker = n.broker;
|
||||
this.brokerConn = RED.nodes.getNode(this.broker);
|
||||
if (!/^(#$|(\+|[^+#]*)(\/(\+|[^+#]*))*(\/(\+|#|[^+#]*))?$)/.test(this.topic)) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name" : "node-red",
|
||||
"version" : "0.14.0",
|
||||
"version" : "0.14.3",
|
||||
"description" : "A visual tool for wiring the Internet of Things",
|
||||
"homepage" : "http://nodered.org",
|
||||
"license" : "Apache-2.0",
|
||||
|
||||
2
red.js
2
red.js
@@ -81,7 +81,7 @@ if (parsedArgs.settings) {
|
||||
// NODE_RED_HOME contains user data - use its settings.js
|
||||
settingsFile = path.join(process.env.NODE_RED_HOME,"settings.js");
|
||||
} else {
|
||||
var userDir = path.join(parsedArgs.userDir || process.env.HOME || process.env.HOMEPATH || process.env.USERPROFILE,".node-red");
|
||||
var userDir = parsedArgs.userDir || path.join(process.env.HOME || process.env.HOMEPATH || process.env.USERPROFILE,".node-red");
|
||||
var userSettingsFile = path.join(userDir,"settings.js");
|
||||
if (fs.existsSync(userSettingsFile)) {
|
||||
// $HOME/.node-red/settings.js exists
|
||||
|
||||
Reference in New Issue
Block a user