mirror of https://github.com/node-red/node-red.git
Merge branch 'master' into 5348/preserve-search-dialog-casing
commit
58b7fc745b
|
|
@ -32,7 +32,7 @@
|
|||
"async-mutex": "0.5.0",
|
||||
"basic-auth": "2.0.1",
|
||||
"bcryptjs": "3.0.2",
|
||||
"body-parser": "1.20.3",
|
||||
"body-parser": "1.20.4",
|
||||
"chalk": "^4.1.2",
|
||||
"cheerio": "1.0.0-rc.10",
|
||||
"clone": "2.1.2",
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
"@node-red/util": "4.1.2",
|
||||
"@node-red/editor-client": "4.1.2",
|
||||
"bcryptjs": "3.0.2",
|
||||
"body-parser": "1.20.3",
|
||||
"body-parser": "1.20.4",
|
||||
"clone": "2.1.2",
|
||||
"cors": "2.8.5",
|
||||
"express-session": "1.18.2",
|
||||
|
|
|
|||
|
|
@ -340,8 +340,10 @@
|
|||
var deleteButton = $('<a/>',{href:"#",class:"red-ui-editableList-item-remove red-ui-button red-ui-button-small"}).appendTo(li);
|
||||
$('<i/>',{class:"fa fa-remove"}).appendTo(deleteButton);
|
||||
li.addClass("red-ui-editableList-item-removable");
|
||||
var removeTip = RED.popover.tooltip(deleteButton, RED._("common.label.delete"));
|
||||
deleteButton.on("click", function(evt) {
|
||||
evt.preventDefault();
|
||||
removeTip.close();
|
||||
var data = row.data('data');
|
||||
li.addClass("red-ui-editableList-item-deleting")
|
||||
li.fadeOut(300, function() {
|
||||
|
|
|
|||
|
|
@ -443,12 +443,18 @@ RED.tabs = (function() {
|
|||
}
|
||||
function activatePreviousTab() {
|
||||
var previous = findPreviousVisibleTab();
|
||||
if (previous.length === 0) {
|
||||
previous = ul.find("li.red-ui-tab:not(.hide-tab)").last();
|
||||
}
|
||||
if (previous.length > 0) {
|
||||
activateTab(previous.find("a"));
|
||||
}
|
||||
}
|
||||
function activateNextTab() {
|
||||
var next = findNextVisibleTab();
|
||||
if (next.length === 0) {
|
||||
next = ul.find("li.red-ui-tab:not(.hide-tab)").first();
|
||||
}
|
||||
if (next.length > 0) {
|
||||
activateTab(next.find("a"));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -327,7 +327,7 @@ RED.library = (function() {
|
|||
icon: 'fa fa-cube',
|
||||
label: options.type,
|
||||
path: "",
|
||||
expanded: false,
|
||||
expanded: true,
|
||||
children: function(done, item) {
|
||||
loadLibraryFolder(lib.id, options.url, "", function(children) {
|
||||
item.children = children;
|
||||
|
|
|
|||
|
|
@ -720,7 +720,7 @@ RED.projects = (function() {
|
|||
var validateForm = function() {
|
||||
var valid = true;
|
||||
var flowFile = projectFlowFileInput.val();
|
||||
if (flowFile === "" || !/\.json$/.test(flowFile)) {
|
||||
if (flowFile === "" || !/^[a-zA-Z0-9\-_]+\.json$/.test(flowFile)) {
|
||||
valid = false;
|
||||
if (!projectFlowFileInput.hasClass("input-error")) {
|
||||
projectFlowFileInput.addClass("input-error");
|
||||
|
|
@ -1142,7 +1142,7 @@ RED.projects = (function() {
|
|||
|
||||
} else if (projectType === 'empty') {
|
||||
var flowFile = projectFlowFileInput.val();
|
||||
if (flowFile === "" || !/\.json$/.test(flowFile)) {
|
||||
if (flowFile === "" || !/^[a-zA-Z0-9\-_]+\.json$/.test(flowFile)) {
|
||||
valid = false;
|
||||
if (!projectFlowFileInput.hasClass("input-error")) {
|
||||
projectFlowFileInput.addClass("input-error");
|
||||
|
|
|
|||
|
|
@ -265,7 +265,13 @@ RED.utils = (function() {
|
|||
var copyPayload = $('<button class="red-ui-button red-ui-button-small"><i class="fa fa-clipboard"></i></button>').appendTo(copyTools).on("click", function(e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
RED.clipboard.copyText(msg,copyPayload,"clipboard.copyMessageValue");
|
||||
var payloadToCopy;
|
||||
if (typeof msg === "number") {
|
||||
payloadToCopy = obj.find(".red-ui-debug-msg-type-number").first().text();
|
||||
} else {
|
||||
payloadToCopy = msg;
|
||||
}
|
||||
RED.clipboard.copyText(payloadToCopy, copyPayload, "clipboard.copyMessageValue");
|
||||
})
|
||||
RED.popover.tooltip(copyPayload,RED._("node-red:debug.sidebar.copyPayload"));
|
||||
if (enablePinning && strippedKey !== undefined && strippedKey !== '') {
|
||||
|
|
@ -593,7 +599,7 @@ RED.utils = (function() {
|
|||
var sr = $('<div class="red-ui-debug-msg-object-entry collapsed"></div>').appendTo(stringRow);
|
||||
var stringEncoding = "";
|
||||
try {
|
||||
stringEncoding = String.fromCharCode.apply(null, new Uint16Array(data))
|
||||
stringEncoding = new TextDecoder().decode(new Uint8Array(data));
|
||||
} catch(err) {
|
||||
console.log(err);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6545,6 +6545,9 @@ RED.view = (function() {
|
|||
suggestedNodes = [suggestedNodes]
|
||||
}
|
||||
suggestedNodes = suggestedNodes.filter(n => {
|
||||
if (n.type === 'junction') {
|
||||
return true
|
||||
}
|
||||
const def = RED.nodes.getType(n.type)
|
||||
if (def?.set && def.set.enabled === false) {
|
||||
// Exclude disabled node set
|
||||
|
|
|
|||
|
|
@ -755,6 +755,7 @@ div.red-ui-projects-dialog-ssh-public-key {
|
|||
}
|
||||
|
||||
.red-ui-projects-dialog-list {
|
||||
display: block;
|
||||
position: relative;
|
||||
.red-ui-editableList-container {
|
||||
padding: 1px;
|
||||
|
|
@ -830,7 +831,13 @@ div.red-ui-projects-dialog-ssh-public-key {
|
|||
}
|
||||
|
||||
#red-ui-settings-tab-gitconfig {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
padding: 8px 20px 20px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.red-ui-settings-section-description {
|
||||
color: var(--red-ui-secondary-text-color);
|
||||
|
|
|
|||
|
|
@ -80,6 +80,7 @@
|
|||
width: 18px;
|
||||
height: 15px;
|
||||
margin-top: 1px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.red-ui-search-result-node-port {
|
||||
position: absolute;
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
padding: 2px 16px 2px 4px;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
overflow-x: hidden;
|
||||
}
|
||||
.red-ui-editableList-container {
|
||||
padding: 5px;
|
||||
|
|
|
|||
|
|
@ -20,13 +20,15 @@ module.exports = function(RED) {
|
|||
function StatusNode(n) {
|
||||
RED.nodes.createNode(this,n);
|
||||
var node = this;
|
||||
this.scope = n.scope || [];
|
||||
this.scope = n.scope;
|
||||
|
||||
// auto-filter out any directly connected nodes to avoid simple loopback
|
||||
const w = this.wires.flat();
|
||||
for (let i=0; i < this.scope.length; i++) {
|
||||
if (w.includes(this.scope[i])) {
|
||||
this.scope.splice(i, 1);
|
||||
if (Array.isArray(this.scope)) {
|
||||
const w = this.wires.flat();
|
||||
for (let i = 0; i < this.scope.length; i++) {
|
||||
if (w.includes(this.scope[i])) {
|
||||
this.scope.splice(i, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -167,12 +167,15 @@
|
|||
$("#tls-config-button-cert-clear").on("click", function() {
|
||||
clearNameData("cert");
|
||||
});
|
||||
RED.popover.tooltip($("#tls-config-button-cert-clear"), RED._("common.label.delete"));
|
||||
$("#tls-config-button-key-clear").on("click", function() {
|
||||
clearNameData("key");
|
||||
});
|
||||
RED.popover.tooltip($("#tls-config-button-key-clear"), RED._("common.label.delete"));
|
||||
$("#tls-config-button-ca-clear").on("click", function() {
|
||||
clearNameData("ca");
|
||||
});
|
||||
RED.popover.tooltip($("#tls-config-button-ca-clear"), RED._("common.label.delete"));
|
||||
|
||||
if (RED.settings.tlsConfigDisableLocalFiles) {
|
||||
$("#node-config-row-uselocalfiles").hide();
|
||||
|
|
|
|||
|
|
@ -688,6 +688,7 @@ in your Node-RED user directory (${RED.settings.userDir}).
|
|||
if (!sendErrorsToCatch) {
|
||||
nodeSend(msg);
|
||||
}
|
||||
node.count--;
|
||||
nodeDone();
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
"acorn": "8.15.0",
|
||||
"acorn-walk": "8.3.4",
|
||||
"ajv": "8.17.1",
|
||||
"body-parser": "1.20.3",
|
||||
"body-parser": "1.20.4",
|
||||
"cheerio": "1.0.0-rc.10",
|
||||
"content-type": "1.0.5",
|
||||
"cookie-parser": "1.4.7",
|
||||
|
|
|
|||
|
|
@ -699,6 +699,13 @@ class Flow {
|
|||
let toSend = msg;
|
||||
this.completeNodeMap[node.id].forEach((completeNode,index) => {
|
||||
toSend = redUtil.cloneMessage(msg);
|
||||
toSend.complete = {
|
||||
source: {
|
||||
id: node.id,
|
||||
type: node.type,
|
||||
name: node.name
|
||||
}
|
||||
};
|
||||
completeNode.receive(toSend);
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
**/
|
||||
|
||||
var should = require("should");
|
||||
var catchNode = require("nr-test-utils").require("@node-red/nodes/core/common/25-status.js");
|
||||
var statusNode = require("nr-test-utils").require("@node-red/nodes/core/common/25-status.js");
|
||||
var helper = require("node-red-node-test-helper");
|
||||
|
||||
describe('status Node', function() {
|
||||
|
|
@ -27,7 +27,7 @@ describe('status Node', function() {
|
|||
it('should output a message when called', function(done) {
|
||||
var flow = [ { id:"n1", type:"status", name:"status", wires:[["n2"]], scope:[] },
|
||||
{id:"n2", type:"helper"} ];
|
||||
helper.load(catchNode, flow, function() {
|
||||
helper.load(statusNode, flow, function() {
|
||||
var n1 = helper.getNode("n1");
|
||||
var n2 = helper.getNode("n2");
|
||||
n1.should.have.property('name', 'status');
|
||||
|
|
|
|||
Loading…
Reference in New Issue