mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Compare commits
21 Commits
fix-link-i
...
junction-l
Author | SHA1 | Date | |
---|---|---|---|
|
81d4c60cbd | ||
|
010c8eccc8 | ||
|
4b89619ef1 | ||
|
e5054d306e | ||
|
08eaa9274f | ||
|
3306cdede5 | ||
|
e7f650a9eb | ||
|
2804794f7a | ||
|
781eaf058b | ||
|
b4c155bdb8 | ||
|
7c3e045a57 | ||
|
d4f4c7b8c6 | ||
|
9e6d501009 | ||
|
07f2f0cef3 | ||
|
662b1a8100 | ||
|
25b6e214dd | ||
|
bbc1a82c2a | ||
|
2ddbb44992 | ||
|
363a8b8588 | ||
|
96cd823fea | ||
|
2e57d80959 |
4
.github/workflows/tests.yml
vendored
4
.github/workflows/tests.yml
vendored
@@ -17,7 +17,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [14, 16]
|
||||
node-version: [16, 18]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
@@ -30,7 +30,7 @@ jobs:
|
||||
run: |
|
||||
npm run test
|
||||
- name: Publish to coveralls.io
|
||||
if: ${{ matrix.node-version == 14 }}
|
||||
if: ${{ matrix.node-version == 16 }}
|
||||
uses: coverallsapp/github-action@v1.1.2
|
||||
with:
|
||||
github-token: ${{ github.token }}
|
||||
|
26
package.json
26
package.json
@@ -26,16 +26,16 @@
|
||||
}
|
||||
],
|
||||
"dependencies": {
|
||||
"acorn": "8.8.1",
|
||||
"acorn": "8.8.2",
|
||||
"acorn-walk": "8.2.0",
|
||||
"ajv": "8.11.2",
|
||||
"ajv": "8.12.0",
|
||||
"async-mutex": "0.4.0",
|
||||
"basic-auth": "2.0.1",
|
||||
"bcryptjs": "2.4.3",
|
||||
"body-parser": "1.20.1",
|
||||
"body-parser": "1.20.2",
|
||||
"cheerio": "1.0.0-rc.10",
|
||||
"clone": "2.1.2",
|
||||
"content-type": "1.0.4",
|
||||
"content-type": "1.0.5",
|
||||
"cookie": "0.5.0",
|
||||
"cookie-parser": "1.4.6",
|
||||
"cors": "2.8.5",
|
||||
@@ -45,7 +45,7 @@
|
||||
"express-session": "1.17.3",
|
||||
"form-data": "4.0.0",
|
||||
"fs-extra": "10.1.0",
|
||||
"got": "11.8.5",
|
||||
"got": "11.8.6",
|
||||
"hash-sum": "2.0.0",
|
||||
"hpagent": "1.2.0",
|
||||
"https-proxy-agent": "5.0.1",
|
||||
@@ -60,7 +60,7 @@
|
||||
"memorystore": "1.6.7",
|
||||
"mime": "3.0.0",
|
||||
"moment": "2.29.4",
|
||||
"moment-timezone": "0.5.39",
|
||||
"moment-timezone": "0.5.41",
|
||||
"mqtt": "4.3.7",
|
||||
"multer": "1.4.5-lts.1",
|
||||
"mustache": "4.2.0",
|
||||
@@ -72,12 +72,12 @@
|
||||
"passport": "0.6.0",
|
||||
"passport-http-bearer": "1.0.1",
|
||||
"passport-oauth2-client-password": "0.1.2",
|
||||
"raw-body": "2.5.1",
|
||||
"raw-body": "2.5.2",
|
||||
"semver": "7.3.8",
|
||||
"tar": "6.1.12",
|
||||
"tar": "6.1.13",
|
||||
"tough-cookie": "4.1.2",
|
||||
"uglify-js": "3.17.4",
|
||||
"uuid": "8.3.2",
|
||||
"uuid": "9.0.0",
|
||||
"ws": "7.5.6",
|
||||
"xml2js": "0.4.23"
|
||||
},
|
||||
@@ -86,7 +86,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"dompurify": "2.4.1",
|
||||
"grunt": "1.5.3",
|
||||
"grunt": "1.6.1",
|
||||
"grunt-chmod": "~1.1.1",
|
||||
"grunt-cli": "~1.4.3",
|
||||
"grunt-concurrent": "3.0.0",
|
||||
@@ -108,18 +108,18 @@
|
||||
"i18next-http-backend": "1.4.1",
|
||||
"jquery-i18next": "1.2.1",
|
||||
"jsdoc-nr-template": "github:node-red/jsdoc-nr-template",
|
||||
"marked": "4.2.3",
|
||||
"marked": "4.2.12",
|
||||
"mermaid": "^9.3.0",
|
||||
"minami": "1.2.3",
|
||||
"mocha": "9.2.2",
|
||||
"node-red-node-test-helper": "^0.3.0",
|
||||
"nodemon": "2.0.20",
|
||||
"proxy": "^1.0.2",
|
||||
"sass": "1.56.1",
|
||||
"sass": "1.58.3",
|
||||
"should": "13.2.3",
|
||||
"sinon": "11.1.2",
|
||||
"stoppable": "^1.1.0",
|
||||
"supertest": "6.2.4"
|
||||
"supertest": "6.3.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
|
@@ -19,7 +19,7 @@
|
||||
"@node-red/util": "3.1.0-beta.1",
|
||||
"@node-red/editor-client": "3.1.0-beta.1",
|
||||
"bcryptjs": "2.4.3",
|
||||
"body-parser": "1.20.1",
|
||||
"body-parser": "1.20.2",
|
||||
"clone": "2.1.2",
|
||||
"cors": "2.8.5",
|
||||
"express-session": "1.17.3",
|
||||
|
@@ -1382,6 +1382,7 @@
|
||||
"copy-item-edit-url": "要素の編集URLをコピー",
|
||||
"move-flow-to-start": "フローを先頭に移動",
|
||||
"move-flow-to-end": "フローを末尾に移動",
|
||||
"show-global-env": "大域環境変数を表示",
|
||||
"lock-flow": "フローを固定",
|
||||
"unlock-flow": "フローの固定を解除",
|
||||
"show-node-help": "ノードのヘルプを表示"
|
||||
|
@@ -378,7 +378,8 @@ RED.history = (function() {
|
||||
if (ev.addToGroup) {
|
||||
RED.group.removeFromGroup(ev.addToGroup,ev.nodes.map(function(n) { return n.n }),false);
|
||||
inverseEv.removeFromGroup = ev.addToGroup;
|
||||
} else if (ev.removeFromGroup) {
|
||||
}
|
||||
if (ev.removeFromGroup) {
|
||||
RED.group.addToGroup(ev.removeFromGroup,ev.nodes.map(function(n) { return n.n }));
|
||||
inverseEv.addToGroup = ev.removeFromGroup;
|
||||
}
|
||||
@@ -421,6 +422,9 @@ RED.history = (function() {
|
||||
ev.node[i] = ev.changes[i];
|
||||
}
|
||||
}
|
||||
ev.node.dirty = true;
|
||||
ev.node.changed = ev.changed;
|
||||
|
||||
var eventType;
|
||||
switch(ev.node.type) {
|
||||
case 'tab': eventType = "flows"; break;
|
||||
@@ -511,8 +515,6 @@ RED.history = (function() {
|
||||
inverseEv.links.push(ev.createdLinks[i]);
|
||||
}
|
||||
}
|
||||
ev.node.dirty = true;
|
||||
ev.node.changed = ev.changed;
|
||||
} else if (ev.t == "createSubflow") {
|
||||
inverseEv = {
|
||||
t: "deleteSubflow",
|
||||
@@ -648,6 +650,12 @@ RED.history = (function() {
|
||||
ev.groups[i].nodes = [];
|
||||
RED.nodes.addGroup(ev.groups[i]);
|
||||
RED.group.addToGroup(ev.groups[i],nodes);
|
||||
if (ev.groups[i].g) {
|
||||
const parentGroup = RED.nodes.group(ev.groups[i].g)
|
||||
if (parentGroup) {
|
||||
RED.group.addToGroup(parentGroup, ev.groups[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (ev.t == "addToGroup") {
|
||||
|
@@ -46,6 +46,9 @@ RED.nodes = (function() {
|
||||
|
||||
function setDirty(d) {
|
||||
dirty = d;
|
||||
if (!d) {
|
||||
allNodes.clearState()
|
||||
}
|
||||
RED.events.emit("workspace:dirty",{dirty:dirty});
|
||||
}
|
||||
|
||||
@@ -68,7 +71,6 @@ RED.nodes = (function() {
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
var exports = {
|
||||
setModulePendingUpdated: function(module,version) {
|
||||
moduleList[module].pending_version = version;
|
||||
@@ -238,22 +240,72 @@ RED.nodes = (function() {
|
||||
|
||||
// allNodes holds information about the Flow nodes.
|
||||
var allNodes = (function() {
|
||||
// Map node.id -> node
|
||||
var nodes = {};
|
||||
// Map tab.id -> Array of nodes on that tab
|
||||
var tabMap = {};
|
||||
// Map tab.id -> Set of dirty object ids on that tab
|
||||
var tabDirtyMap = {};
|
||||
// Map tab.id -> Set of object ids of things deleted from the tab that weren't otherwise dirty
|
||||
var tabDeletedNodesMap = {};
|
||||
// Set of object ids of things added to a tab after initial import
|
||||
var addedDirtyObjects = new Set()
|
||||
|
||||
function changeCollectionDepth(tabNodes, toMove, direction, singleStep) {
|
||||
const result = []
|
||||
const moved = new Set();
|
||||
const startIndex = direction ? tabNodes.length - 1 : 0
|
||||
const endIndex = direction ? -1 : tabNodes.length
|
||||
const step = direction ? -1 : 1
|
||||
let target = startIndex // Only used for all-the-way moves
|
||||
for (let i = startIndex; i != endIndex; i += step) {
|
||||
if (toMove.size === 0) {
|
||||
break;
|
||||
}
|
||||
const n = tabNodes[i]
|
||||
if (toMove.has(n)) {
|
||||
if (singleStep) {
|
||||
if (i !== startIndex && !moved.has(tabNodes[i - step])) {
|
||||
tabNodes.splice(i, 1)
|
||||
tabNodes.splice(i - step, 0, n)
|
||||
n._reordered = true
|
||||
result.push(n)
|
||||
}
|
||||
} else {
|
||||
if (i !== target) {
|
||||
tabNodes.splice(i, 1)
|
||||
tabNodes.splice(target, 0, n)
|
||||
n._reordered = true
|
||||
result.push(n)
|
||||
}
|
||||
target += step
|
||||
}
|
||||
toMove.delete(n);
|
||||
moved.add(n);
|
||||
}
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
var api = {
|
||||
addTab: function(id) {
|
||||
tabMap[id] = [];
|
||||
tabDirtyMap[id] = new Set();
|
||||
tabDeletedNodesMap[id] = new Set();
|
||||
},
|
||||
hasTab: function(z) {
|
||||
return tabMap.hasOwnProperty(z)
|
||||
},
|
||||
removeTab: function(id) {
|
||||
delete tabMap[id];
|
||||
delete tabDirtyMap[id];
|
||||
delete tabDeletedNodesMap[id];
|
||||
},
|
||||
addNode: function(n) {
|
||||
nodes[n.id] = n;
|
||||
if (tabMap.hasOwnProperty(n.z)) {
|
||||
tabMap[n.z].push(n);
|
||||
api.addObjectToWorkspace(n.z, n.id, n.changed || n.moved)
|
||||
} else {
|
||||
console.warn("Node added to unknown tab/subflow:",n);
|
||||
tabMap["_"] = tabMap["_"] || [];
|
||||
@@ -267,8 +319,37 @@ RED.nodes = (function() {
|
||||
if (i > -1) {
|
||||
tabMap[n.z].splice(i,1);
|
||||
}
|
||||
api.removeObjectFromWorkspace(n.z, n.id)
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Add an object to our dirty/clean tracking state
|
||||
* @param {String} z
|
||||
* @param {String} id
|
||||
* @param {Boolean} isDirty
|
||||
*/
|
||||
addObjectToWorkspace: function (z, id, isDirty) {
|
||||
if (isDirty) {
|
||||
addedDirtyObjects.add(id)
|
||||
}
|
||||
if (tabDeletedNodesMap[z].has(id)) {
|
||||
tabDeletedNodesMap[z].delete(id)
|
||||
}
|
||||
api.markNodeDirty(z, id, isDirty)
|
||||
},
|
||||
/**
|
||||
* Remove an object from our dirty/clean tracking state
|
||||
* @param {String} z
|
||||
* @param {String} id
|
||||
*/
|
||||
removeObjectFromWorkspace: function (z, id) {
|
||||
if (!addedDirtyObjects.has(id)) {
|
||||
tabDeletedNodesMap[z].add(id)
|
||||
} else {
|
||||
addedDirtyObjects.delete(id)
|
||||
}
|
||||
api.markNodeDirty(z, id, false)
|
||||
},
|
||||
hasNode: function(id) {
|
||||
return nodes.hasOwnProperty(id);
|
||||
},
|
||||
@@ -280,152 +361,54 @@ RED.nodes = (function() {
|
||||
n.z = newZ;
|
||||
api.addNode(n)
|
||||
},
|
||||
moveNodesForwards: function(nodes) {
|
||||
var result = [];
|
||||
/**
|
||||
* @param {array} nodes
|
||||
* @param {boolean} direction true:forwards false:back
|
||||
* @param {boolean} singleStep true:single-step false:all-the-way
|
||||
*/
|
||||
changeDepth: function(nodes, direction, singleStep) {
|
||||
if (!Array.isArray(nodes)) {
|
||||
nodes = [nodes]
|
||||
}
|
||||
// Can only do this for nodes on the same tab.
|
||||
// Use nodes[0] to get the z
|
||||
var tabNodes = tabMap[nodes[0].z];
|
||||
var toMove = new Set(nodes.filter(function(n) { return n.type !== "group" && n.type !== "subflow" }));
|
||||
var moved = new Set();
|
||||
for (var i = tabNodes.length-1; i >= 0; i--) {
|
||||
if (toMove.size === 0) {
|
||||
break;
|
||||
}
|
||||
var n = tabNodes[i];
|
||||
if (toMove.has(n)) {
|
||||
// This is a node to move.
|
||||
if (i < tabNodes.length-1 && !moved.has(tabNodes[i+1])) {
|
||||
// Remove from current position
|
||||
tabNodes.splice(i,1);
|
||||
// Add it back one position higher
|
||||
tabNodes.splice(i+1,0,n);
|
||||
n._reordered = true;
|
||||
result.push(n);
|
||||
}
|
||||
toMove.delete(n);
|
||||
moved.add(n);
|
||||
let result = []
|
||||
const tabNodes = tabMap[nodes[0].z];
|
||||
const toMove = new Set(nodes.filter(function(n) { return n.type !== "group" && n.type !== "subflow" }));
|
||||
if (toMove.size > 0) {
|
||||
result = result.concat(changeCollectionDepth(tabNodes, toMove, direction, singleStep))
|
||||
if (result.length > 0) {
|
||||
RED.events.emit('nodes:reorder',{
|
||||
z: nodes[0].z,
|
||||
nodes: result
|
||||
});
|
||||
}
|
||||
}
|
||||
if (result.length > 0) {
|
||||
RED.events.emit('nodes:reorder',{
|
||||
z: nodes[0].z,
|
||||
nodes: result
|
||||
});
|
||||
|
||||
const groupNodes = groupsByZ[nodes[0].z] || []
|
||||
const groupsToMove = new Set(nodes.filter(function(n) { return n.type === 'group'}))
|
||||
if (groupsToMove.size > 0) {
|
||||
const groupResult = changeCollectionDepth(groupNodes, groupsToMove, direction, singleStep)
|
||||
if (groupResult.length > 0) {
|
||||
result = result.concat(groupResult)
|
||||
RED.events.emit('groups:reorder',{
|
||||
z: nodes[0].z,
|
||||
nodes: groupResult
|
||||
});
|
||||
}
|
||||
}
|
||||
return result;
|
||||
RED.view.redraw(true)
|
||||
return result
|
||||
},
|
||||
moveNodesForwards: function(nodes) {
|
||||
return api.changeDepth(nodes, true, true)
|
||||
},
|
||||
moveNodesBackwards: function(nodes) {
|
||||
var result = [];
|
||||
if (!Array.isArray(nodes)) {
|
||||
nodes = [nodes]
|
||||
}
|
||||
// Can only do this for nodes on the same tab.
|
||||
// Use nodes[0] to get the z
|
||||
var tabNodes = tabMap[nodes[0].z];
|
||||
var toMove = new Set(nodes.filter(function(n) { return n.type !== "group" && n.type !== "subflow" }));
|
||||
var moved = new Set();
|
||||
for (var i = 0; i < tabNodes.length; i++) {
|
||||
if (toMove.size === 0) {
|
||||
break;
|
||||
}
|
||||
var n = tabNodes[i];
|
||||
if (toMove.has(n)) {
|
||||
// This is a node to move.
|
||||
if (i > 0 && !moved.has(tabNodes[i-1])) {
|
||||
// Remove from current position
|
||||
tabNodes.splice(i,1);
|
||||
// Add it back one position lower
|
||||
tabNodes.splice(i-1,0,n);
|
||||
n._reordered = true;
|
||||
result.push(n);
|
||||
}
|
||||
toMove.delete(n);
|
||||
moved.add(n);
|
||||
}
|
||||
}
|
||||
if (result.length > 0) {
|
||||
RED.events.emit('nodes:reorder',{
|
||||
z: nodes[0].z,
|
||||
nodes: result
|
||||
});
|
||||
}
|
||||
return result;
|
||||
return api.changeDepth(nodes, false, true)
|
||||
},
|
||||
moveNodesToFront: function(nodes) {
|
||||
var result = [];
|
||||
if (!Array.isArray(nodes)) {
|
||||
nodes = [nodes]
|
||||
}
|
||||
// Can only do this for nodes on the same tab.
|
||||
// Use nodes[0] to get the z
|
||||
var tabNodes = tabMap[nodes[0].z];
|
||||
var toMove = new Set(nodes.filter(function(n) { return n.type !== "group" && n.type !== "subflow" }));
|
||||
var target = tabNodes.length-1;
|
||||
for (var i = tabNodes.length-1; i >= 0; i--) {
|
||||
if (toMove.size === 0) {
|
||||
break;
|
||||
}
|
||||
var n = tabNodes[i];
|
||||
if (toMove.has(n)) {
|
||||
// This is a node to move.
|
||||
if (i < target) {
|
||||
// Remove from current position
|
||||
tabNodes.splice(i,1);
|
||||
tabNodes.splice(target,0,n);
|
||||
n._reordered = true;
|
||||
result.push(n);
|
||||
}
|
||||
target--;
|
||||
toMove.delete(n);
|
||||
}
|
||||
}
|
||||
if (result.length > 0) {
|
||||
RED.events.emit('nodes:reorder',{
|
||||
z: nodes[0].z,
|
||||
nodes: result
|
||||
});
|
||||
}
|
||||
return result;
|
||||
return api.changeDepth(nodes, true, false)
|
||||
},
|
||||
moveNodesToBack: function(nodes) {
|
||||
var result = [];
|
||||
if (!Array.isArray(nodes)) {
|
||||
nodes = [nodes]
|
||||
}
|
||||
// Can only do this for nodes on the same tab.
|
||||
// Use nodes[0] to get the z
|
||||
var tabNodes = tabMap[nodes[0].z];
|
||||
var toMove = new Set(nodes.filter(function(n) { return n.type !== "group" && n.type !== "subflow" }));
|
||||
var target = 0;
|
||||
for (var i = 0; i < tabNodes.length; i++) {
|
||||
if (toMove.size === 0) {
|
||||
break;
|
||||
}
|
||||
var n = tabNodes[i];
|
||||
if (toMove.has(n)) {
|
||||
// This is a node to move.
|
||||
if (i > target) {
|
||||
// Remove from current position
|
||||
tabNodes.splice(i,1);
|
||||
// Add it back one position lower
|
||||
tabNodes.splice(target,0,n);
|
||||
n._reordered = true;
|
||||
result.push(n);
|
||||
}
|
||||
target++;
|
||||
toMove.delete(n);
|
||||
}
|
||||
}
|
||||
if (result.length > 0) {
|
||||
RED.events.emit('nodes:reorder',{
|
||||
z: nodes[0].z,
|
||||
nodes: result
|
||||
});
|
||||
}
|
||||
return result;
|
||||
return api.changeDepth(nodes, false, false)
|
||||
},
|
||||
getNodes: function(z) {
|
||||
return tabMap[z];
|
||||
@@ -433,6 +416,33 @@ RED.nodes = (function() {
|
||||
clear: function() {
|
||||
nodes = {};
|
||||
tabMap = {};
|
||||
tabDirtyMap = {};
|
||||
tabDeletedNodesMap = {};
|
||||
addedDirtyObjects = new Set();
|
||||
},
|
||||
/**
|
||||
* Clear all internal state on what is dirty.
|
||||
*/
|
||||
clearState: function () {
|
||||
// Called when a deploy happens, we can forget about added/remove
|
||||
// items as they have now been deployed.
|
||||
addedDirtyObjects = new Set()
|
||||
const flowsToCheck = new Set()
|
||||
for (const [z, set] of Object.entries(tabDeletedNodesMap)) {
|
||||
if (set.size > 0) {
|
||||
set.clear()
|
||||
flowsToCheck.add(z)
|
||||
}
|
||||
}
|
||||
for (const [z, set] of Object.entries(tabDirtyMap)) {
|
||||
if (set.size > 0) {
|
||||
set.clear()
|
||||
flowsToCheck.add(z)
|
||||
}
|
||||
}
|
||||
for (const z of flowsToCheck) {
|
||||
api.checkTabState(z)
|
||||
}
|
||||
},
|
||||
eachNode: function(cb) {
|
||||
var nodeList,i,j;
|
||||
@@ -498,7 +508,7 @@ RED.nodes = (function() {
|
||||
return result;
|
||||
},
|
||||
getNodeOrder: function(z) {
|
||||
return tabMap[z].map(function(n) { return n.id })
|
||||
return (groupsByZ[z] || []).concat(tabMap[z]).map(n => n.id)
|
||||
},
|
||||
setNodeOrder: function(z, order) {
|
||||
var orderMap = {};
|
||||
@@ -510,6 +520,41 @@ RED.nodes = (function() {
|
||||
B._reordered = true;
|
||||
return orderMap[A.id] - orderMap[B.id];
|
||||
})
|
||||
if (groupsByZ[z]) {
|
||||
groupsByZ[z].sort(function(A,B) {
|
||||
return orderMap[A.id] - orderMap[B.id];
|
||||
})
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Update our records if an object is dirty or not
|
||||
* @param {String} z tab id
|
||||
* @param {String} id object id
|
||||
* @param {Boolean} dirty whether the object is dirty or not
|
||||
*/
|
||||
markNodeDirty: function(z, id, dirty) {
|
||||
if (tabDirtyMap[z]) {
|
||||
if (dirty) {
|
||||
tabDirtyMap[z].add(id)
|
||||
} else {
|
||||
tabDirtyMap[z].delete(id)
|
||||
}
|
||||
api.checkTabState(z)
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Check if a tab should update its contentsChange flag
|
||||
* @param {String} z tab id
|
||||
*/
|
||||
checkTabState: function (z) {
|
||||
const ws = workspaces[z]
|
||||
if (ws) {
|
||||
const contentsChanged = tabDirtyMap[z].size > 0 || tabDeletedNodesMap[z].size > 0
|
||||
if (Boolean(ws.contentsChanged) !== contentsChanged) {
|
||||
ws.contentsChanged = contentsChanged
|
||||
RED.events.emit("flows:change", ws);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return api;
|
||||
@@ -597,6 +642,11 @@ RED.nodes = (function() {
|
||||
throw new Error(`Cannot modified property '${prop}' of locked object '${node.type}:${node.id}'`)
|
||||
}
|
||||
}
|
||||
if (node.z && (prop === 'changed' || prop === 'moved')) {
|
||||
setTimeout(() => {
|
||||
allNodes.markNodeDirty(node.z, node.id, node.changed || node.moved)
|
||||
}, 0)
|
||||
}
|
||||
node[prop] = value;
|
||||
return true
|
||||
}
|
||||
@@ -666,10 +716,16 @@ RED.nodes = (function() {
|
||||
}
|
||||
if (l.source.z === l.target.z && linkTabMap[l.source.z]) {
|
||||
linkTabMap[l.source.z].push(l);
|
||||
allNodes.addObjectToWorkspace(l.source.z, getLinkId(l), true)
|
||||
}
|
||||
RED.events.emit("links:add",l);
|
||||
}
|
||||
|
||||
function getLinkId(link) {
|
||||
return link.source.id + ':' + link.sourcePort + ':' + link.target.id
|
||||
}
|
||||
|
||||
|
||||
function getNode(id) {
|
||||
if (id in configNodes) {
|
||||
return configNodes[id];
|
||||
@@ -864,6 +920,7 @@ RED.nodes = (function() {
|
||||
if (index !== -1) {
|
||||
linkTabMap[l.source.z].splice(index,1)
|
||||
}
|
||||
allNodes.removeObjectFromWorkspace(l.source.z, getLinkId(l))
|
||||
}
|
||||
}
|
||||
RED.events.emit("links:remove",l);
|
||||
@@ -1033,6 +1090,11 @@ RED.nodes = (function() {
|
||||
return false;
|
||||
}
|
||||
|
||||
function getDownstreamNodes(node) {
|
||||
const downstreamLinks = nodeLinks[node.id].out
|
||||
const downstreamNodes = new Set(downstreamLinks.map(l => l.target))
|
||||
return Array.from(downstreamNodes)
|
||||
}
|
||||
function getAllDownstreamNodes(node) {
|
||||
return getAllFlowNodes(node,'down').filter(function(n) { return n !== node });
|
||||
}
|
||||
@@ -1688,6 +1750,7 @@ RED.nodes = (function() {
|
||||
* Options:
|
||||
* - generateIds - whether to replace all node ids
|
||||
* - addFlow - whether to import nodes to a new tab
|
||||
* - markChanged - whether to set changed=true on all newly imported objects
|
||||
* - reimport - if node has a .z property, dont overwrite it
|
||||
* Only applicible when `generateIds` is false
|
||||
* - importMap - how to resolve any conflicts.
|
||||
@@ -1696,7 +1759,7 @@ RED.nodes = (function() {
|
||||
* - id:replace - import over the top of existing
|
||||
*/
|
||||
function importNodes(newNodesObj,options) { // createNewIds,createMissingWorkspace) {
|
||||
const defOpts = { generateIds: false, addFlow: false, reimport: false, importMap: {} }
|
||||
const defOpts = { generateIds: false, addFlow: false, markChanged: false, reimport: false, importMap: {} }
|
||||
options = Object.assign({}, defOpts, options)
|
||||
options.importMap = options.importMap || {}
|
||||
const createNewIds = options.generateIds;
|
||||
@@ -1722,7 +1785,7 @@ RED.nodes = (function() {
|
||||
newNodes = newNodesObj;
|
||||
}
|
||||
|
||||
if (!$.isArray(newNodes)) {
|
||||
if (!Array.isArray(newNodes)) {
|
||||
newNodes = [newNodes];
|
||||
}
|
||||
|
||||
@@ -2020,6 +2083,9 @@ RED.nodes = (function() {
|
||||
if (!n.z) {
|
||||
delete configNode.z;
|
||||
}
|
||||
if (options.markChanged) {
|
||||
configNode.changed = true
|
||||
}
|
||||
if (n.hasOwnProperty('d')) {
|
||||
configNode.d = n.d;
|
||||
}
|
||||
@@ -2082,6 +2148,9 @@ RED.nodes = (function() {
|
||||
if (n.hasOwnProperty('g')) {
|
||||
node.g = n.g;
|
||||
}
|
||||
if (options.markChanged) {
|
||||
node.changed = true
|
||||
}
|
||||
if (createNewIds || options.importMap[n.id] === "copy") {
|
||||
if (subflow_denylist[n.z]) {
|
||||
continue;
|
||||
@@ -2595,6 +2664,7 @@ RED.nodes = (function() {
|
||||
groupsByZ[group.z] = groupsByZ[group.z] || [];
|
||||
groupsByZ[group.z].push(group);
|
||||
groups[group.id] = group;
|
||||
allNodes.addObjectToWorkspace(group.z, group.id, group.changed || group.moved)
|
||||
RED.events.emit("groups:add",group);
|
||||
return group
|
||||
}
|
||||
@@ -2611,10 +2681,14 @@ RED.nodes = (function() {
|
||||
}
|
||||
}
|
||||
RED.group.markDirty(group);
|
||||
|
||||
allNodes.removeObjectFromWorkspace(group.z, group.id)
|
||||
delete groups[group.id];
|
||||
RED.events.emit("groups:remove",group);
|
||||
}
|
||||
function getGroupOrder(z) {
|
||||
const groups = groupsByZ[z]
|
||||
return groups.map(g => g.id)
|
||||
}
|
||||
|
||||
function addJunction(junction) {
|
||||
if (!junction.__isProxy__) {
|
||||
@@ -2626,6 +2700,7 @@ RED.nodes = (function() {
|
||||
if (!nodeLinks[junction.id]) {
|
||||
nodeLinks[junction.id] = {in:[],out:[]};
|
||||
}
|
||||
allNodes.addObjectToWorkspace(junction.z, junction.id, junction.changed || junction.moved)
|
||||
RED.events.emit("junctions:add", junction)
|
||||
return junction
|
||||
}
|
||||
@@ -2637,6 +2712,7 @@ RED.nodes = (function() {
|
||||
}
|
||||
delete junctions[junction.id]
|
||||
delete nodeLinks[junction.id];
|
||||
allNodes.removeObjectFromWorkspace(junction.z, junction.id)
|
||||
RED.events.emit("junctions:remove", junction)
|
||||
|
||||
var removedLinks = links.filter(function(l) { return (l.source === junction) || (l.target === junction); });
|
||||
@@ -2874,6 +2950,9 @@ RED.nodes = (function() {
|
||||
RED.view.redraw(true);
|
||||
}
|
||||
});
|
||||
RED.events.on('deploy', function () {
|
||||
allNodes.clearState()
|
||||
})
|
||||
},
|
||||
registry:registry,
|
||||
setNodeList: registry.setNodeList,
|
||||
@@ -2976,6 +3055,20 @@ RED.nodes = (function() {
|
||||
}
|
||||
}
|
||||
},
|
||||
eachGroup: function(cb) {
|
||||
for (var group of Object.values(groups)) {
|
||||
if (cb(group) === false) {
|
||||
break
|
||||
}
|
||||
}
|
||||
},
|
||||
eachJunction: function(cb) {
|
||||
for (var junction of Object.values(junctions)) {
|
||||
if (cb(junction) === false) {
|
||||
break
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
node: getNode,
|
||||
|
||||
@@ -2998,6 +3091,7 @@ RED.nodes = (function() {
|
||||
getAllFlowNodes: getAllFlowNodes,
|
||||
getAllUpstreamNodes: getAllUpstreamNodes,
|
||||
getAllDownstreamNodes: getAllDownstreamNodes,
|
||||
getDownstreamNodes: getDownstreamNodes,
|
||||
getNodeIslands: getNodeIslands,
|
||||
createExportableNodeSet: createExportableNodeSet,
|
||||
createCompleteNodeSet: createCompleteNodeSet,
|
||||
|
@@ -417,6 +417,9 @@
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
},
|
||||
cancel: function() {
|
||||
this.element.sortable("cancel");
|
||||
}
|
||||
});
|
||||
})(jQuery);
|
||||
|
@@ -845,7 +845,6 @@ RED.tabs = (function() {
|
||||
|
||||
var badges = $('<span class="red-ui-tabs-badges"></span>').appendTo(li);
|
||||
if (options.onselect) {
|
||||
$('<i class="red-ui-tabs-badge-changed fa fa-circle"></i>').appendTo(badges);
|
||||
$('<i class="red-ui-tabs-badge-selected fa fa-check-circle"></i>').appendTo(badges);
|
||||
}
|
||||
|
||||
|
@@ -79,17 +79,18 @@ RED.contextMenu = (function () {
|
||||
w: 0, h: 0,
|
||||
outputs: 1,
|
||||
inputs: 1,
|
||||
dirty: true
|
||||
dirty: true,
|
||||
moved: true
|
||||
}
|
||||
const junction = RED.nodes.addJunction(nn);
|
||||
const historyEvent = {
|
||||
dirty: RED.nodes.dirty(),
|
||||
t: 'add',
|
||||
junctions: [nn]
|
||||
junctions: [junction]
|
||||
}
|
||||
RED.nodes.addJunction(nn);
|
||||
RED.history.push(historyEvent);
|
||||
RED.nodes.dirty(true);
|
||||
RED.view.select({nodes: [nn] });
|
||||
RED.view.select({nodes: [junction] });
|
||||
RED.view.redraw(true)
|
||||
},
|
||||
disabled: !canEdit
|
||||
@@ -127,17 +128,24 @@ RED.contextMenu = (function () {
|
||||
options: [
|
||||
{ onselect: 'core:group-selection' },
|
||||
{ onselect: 'core:ungroup-selection', disabled: !hasGroup },
|
||||
null,
|
||||
{ onselect: 'core:copy-group-style', disabled: !hasGroup },
|
||||
{ onselect: 'core:paste-group-style', disabled: !hasGroup}
|
||||
]
|
||||
})
|
||||
if (hasGroup) {
|
||||
menuItems[menuItems.length - 1].options.push(
|
||||
{ onselect: 'core:merge-selection-to-group', label: RED._("menu.label.groupMergeSelection") }
|
||||
)
|
||||
|
||||
}
|
||||
if (canRemoveFromGroup) {
|
||||
menuItems[menuItems.length - 1].options.push(
|
||||
null,
|
||||
{ onselect: 'core:remove-selection-from-group', label: RED._("menu.label.groupRemoveSelection") }
|
||||
)
|
||||
}
|
||||
menuItems[menuItems.length - 1].options.push(
|
||||
null,
|
||||
{ onselect: 'core:copy-group-style', disabled: !hasGroup },
|
||||
{ onselect: 'core:paste-group-style', disabled: !hasGroup}
|
||||
)
|
||||
}
|
||||
if (canEdit && hasMultipleSelection) {
|
||||
menuItems.push({
|
||||
|
@@ -557,12 +557,17 @@ RED.deploy = (function() {
|
||||
} else {
|
||||
RED.notify('<p>' + RED._("deploy.successfulDeploy") + '</p>', "success");
|
||||
}
|
||||
RED.nodes.eachNode(function (node) {
|
||||
const flow = node.z && (RED.nodes.workspace(node.z) || RED.nodes.subflow(node.z) || null);
|
||||
const flowsToLock = new Set()
|
||||
function ensureUnlocked(id) {
|
||||
const flow = id && (RED.nodes.workspace(id) || RED.nodes.subflow(id) || null);
|
||||
const isLocked = flow ? flow.locked : false;
|
||||
if (flow && isLocked) {
|
||||
flow.locked = false;
|
||||
flowsToLock.add(flow)
|
||||
}
|
||||
}
|
||||
RED.nodes.eachNode(function (node) {
|
||||
ensureUnlocked(node.z)
|
||||
if (node.changed) {
|
||||
node.dirty = true;
|
||||
node.changed = false;
|
||||
@@ -574,11 +579,33 @@ RED.deploy = (function() {
|
||||
if (node.credentials) {
|
||||
delete node.credentials;
|
||||
}
|
||||
if (flow && isLocked) {
|
||||
flow.locked = isLocked;
|
||||
}
|
||||
});
|
||||
RED.nodes.eachGroup(function (node) {
|
||||
ensureUnlocked(node.z)
|
||||
if (node.changed) {
|
||||
node.dirty = true;
|
||||
node.changed = false;
|
||||
}
|
||||
if (node.moved) {
|
||||
node.dirty = true;
|
||||
node.moved = false;
|
||||
}
|
||||
})
|
||||
RED.nodes.eachJunction(function (node) {
|
||||
ensureUnlocked(node.z)
|
||||
if (node.changed) {
|
||||
node.dirty = true;
|
||||
node.changed = false;
|
||||
}
|
||||
if (node.moved) {
|
||||
node.dirty = true;
|
||||
node.moved = false;
|
||||
}
|
||||
})
|
||||
RED.nodes.eachConfig(function (confNode) {
|
||||
if (confNode.z) {
|
||||
ensureUnlocked(confNode.z)
|
||||
}
|
||||
confNode.changed = false;
|
||||
if (confNode.credentials) {
|
||||
delete confNode.credentials;
|
||||
@@ -588,8 +615,16 @@ RED.deploy = (function() {
|
||||
subflow.changed = false;
|
||||
});
|
||||
RED.nodes.eachWorkspace(function (ws) {
|
||||
ws.changed = false;
|
||||
if (ws.changed || ws.added) {
|
||||
ensureUnlocked(ws.z)
|
||||
ws.changed = false;
|
||||
delete ws.added
|
||||
RED.events.emit("flows:change", ws)
|
||||
}
|
||||
});
|
||||
flowsToLock.forEach(flow => {
|
||||
flow.locked = true
|
||||
})
|
||||
// Once deployed, cannot undo back to a clean state
|
||||
RED.history.markAllDirty();
|
||||
RED.view.redraw();
|
||||
|
@@ -166,6 +166,10 @@ RED.envVar = (function() {
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
RED.actions.add("core:show-global-env", function() {
|
||||
RED.userSettings.show('envvar');
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
|
@@ -325,7 +325,7 @@ RED.group = (function() {
|
||||
var selection = RED.view.selection();
|
||||
if (selection.nodes) {
|
||||
var newSelection = [];
|
||||
groups = selection.nodes.filter(function(n) { return n.type === "group" });
|
||||
let groups = selection.nodes.filter(function(n) { return n.type === "group" });
|
||||
|
||||
var historyEvent = {
|
||||
t:"ungroup",
|
||||
@@ -473,9 +473,17 @@ RED.group = (function() {
|
||||
if (nodes.length === 0) {
|
||||
return;
|
||||
}
|
||||
if (nodes.filter(function(n) { return n.type === "subflow" }).length > 0) {
|
||||
RED.notify(RED._("group.errors.cannotAddSubflowPorts"),"error");
|
||||
return;
|
||||
const existingGroup = nodes[0].g
|
||||
for (let i = 0; i < nodes.length; i++) {
|
||||
const n = nodes[i]
|
||||
if (n.type === 'subflow') {
|
||||
RED.notify(RED._("group.errors.cannotAddSubflowPorts"),"error");
|
||||
return;
|
||||
}
|
||||
if (n.g !== existingGroup) {
|
||||
console.warn("Cannot add nooes with different z properties")
|
||||
return
|
||||
}
|
||||
}
|
||||
// nodes is an array
|
||||
// each node must be on the same tab (z)
|
||||
@@ -488,12 +496,17 @@ RED.group = (function() {
|
||||
y: Number.POSITIVE_INFINITY,
|
||||
w: 0,
|
||||
h: 0,
|
||||
_def: RED.group.def
|
||||
_def: RED.group.def,
|
||||
changed: true
|
||||
}
|
||||
|
||||
group.z = nodes[0].z;
|
||||
group = RED.nodes.addGroup(group);
|
||||
|
||||
if (existingGroup) {
|
||||
addToGroup(RED.nodes.group(existingGroup), group)
|
||||
}
|
||||
|
||||
try {
|
||||
addToGroup(group,nodes);
|
||||
} catch(err) {
|
||||
@@ -517,7 +530,7 @@ RED.group = (function() {
|
||||
if (!z) {
|
||||
z = n.z;
|
||||
} else if (z !== n.z) {
|
||||
throw new Error("Cannot add nooes with different z properties")
|
||||
throw new Error("Cannot add nodes with different z properties")
|
||||
}
|
||||
if (n.g) {
|
||||
// This is already in a group.
|
||||
@@ -534,14 +547,10 @@ RED.group = (function() {
|
||||
throw new Error(RED._("group.errors.cannotCreateDiffGroups"))
|
||||
}
|
||||
}
|
||||
// The nodes are already in a group. The assumption is they should be
|
||||
// wrapped in the newly provided group, and that group added to in their
|
||||
// place to the existing containing group.
|
||||
// The nodes are already in a group - so we need to remove them first
|
||||
if (g) {
|
||||
g = RED.nodes.group(g);
|
||||
g.nodes.push(group);
|
||||
g.dirty = true;
|
||||
group.g = g.id;
|
||||
}
|
||||
// Second pass - add them to the group
|
||||
for (i=0;i<nodes.length;i++) {
|
||||
@@ -593,7 +602,7 @@ RED.group = (function() {
|
||||
n.dirty = true;
|
||||
var index = group.nodes.indexOf(n);
|
||||
group.nodes.splice(index,1);
|
||||
if (reparent && group.g) {
|
||||
if (reparent && parentGroup) {
|
||||
n.g = group.g
|
||||
parentGroup.nodes.push(n);
|
||||
} else {
|
||||
|
@@ -145,17 +145,19 @@ RED.sidebar.config = (function() {
|
||||
} else {
|
||||
var currentType = "";
|
||||
nodes.forEach(function(node) {
|
||||
var label = RED.utils.getNodeLabel(node,node.id);
|
||||
var labelText = RED.utils.getNodeLabel(node,node.id);
|
||||
if (node.type != currentType) {
|
||||
$('<li class="red-ui-palette-node-config-type">'+node.type+'</li>').appendTo(list);
|
||||
currentType = node.type;
|
||||
}
|
||||
|
||||
if (node.changed) {
|
||||
labelText += "!!"
|
||||
}
|
||||
var entry = $('<li class="red-ui-palette-node_id_'+node.id.replace(/\./g,"-")+'"></li>').appendTo(list);
|
||||
var nodeDiv = $('<div class="red-ui-palette-node-config red-ui-palette-node"></div>').appendTo(entry);
|
||||
entry.data('node',node.id);
|
||||
nodeDiv.data('node',node.id);
|
||||
var label = $('<div class="red-ui-palette-label"></div>').text(label).appendTo(nodeDiv);
|
||||
var label = $('<div class="red-ui-palette-label"></div>').text(labelText).appendTo(nodeDiv);
|
||||
if (node.d) {
|
||||
nodeDiv.addClass("red-ui-palette-node-config-disabled");
|
||||
$('<i class="fa fa-ban"></i>').prependTo(label);
|
||||
|
@@ -448,9 +448,9 @@ RED.view.tools = (function() {
|
||||
}
|
||||
|
||||
function alignSelectionToEdge(direction) {
|
||||
// if (RED.workspaces.isLocked()) {
|
||||
// return
|
||||
// }
|
||||
if (RED.workspaces.isLocked()) {
|
||||
return;
|
||||
}
|
||||
var selection = RED.view.selection();
|
||||
|
||||
if (selection.nodes && selection.nodes.length > 1) {
|
||||
@@ -721,9 +721,8 @@ RED.view.tools = (function() {
|
||||
var nodesToMove = [];
|
||||
selection.nodes.forEach(function(n) {
|
||||
if (n.type === "group") {
|
||||
nodesToMove = nodesToMove.concat(RED.group.getNodes(n, true).filter(function(n) {
|
||||
return n.type !== "group";
|
||||
}))
|
||||
nodesToMove.push(n)
|
||||
nodesToMove = nodesToMove.concat(RED.group.getNodes(n, true))
|
||||
} else if (n.type !== "subflow"){
|
||||
nodesToMove.push(n);
|
||||
}
|
||||
@@ -1191,7 +1190,8 @@ RED.view.tools = (function() {
|
||||
w: 0, h: 0,
|
||||
outputs: 1,
|
||||
inputs: 1,
|
||||
dirty: true
|
||||
dirty: true,
|
||||
moved: true
|
||||
}
|
||||
links = links.filter(function(l) { return !removedLinks.has(l) })
|
||||
if (links.length === 0) {
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -82,8 +82,11 @@ RED.workspaces = (function() {
|
||||
info: "",
|
||||
label: RED._('workspace.defaultName',{number:workspaceIndex}),
|
||||
env: [],
|
||||
hideable: true
|
||||
hideable: true,
|
||||
};
|
||||
if (!skipHistoryEntry) {
|
||||
ws.added = true
|
||||
}
|
||||
RED.nodes.addWorkspace(ws,targetIndex);
|
||||
workspace_tabs.addTab(ws,targetIndex);
|
||||
|
||||
@@ -93,8 +96,7 @@ RED.workspaces = (function() {
|
||||
RED.nodes.dirty(true);
|
||||
}
|
||||
}
|
||||
$("#red-ui-tab-"+(ws.id.replace(".","-"))).attr("flowname",ws.label)
|
||||
|
||||
$("#red-ui-tab-"+(ws.id.replace(".","-"))).attr("flowname",ws.label).toggleClass('red-ui-workspace-changed',!!(ws.contentsChanged || ws.changed || ws.added));
|
||||
RED.view.focus();
|
||||
return ws;
|
||||
}
|
||||
@@ -375,6 +377,12 @@ RED.workspaces = (function() {
|
||||
$("#red-ui-tab-"+(tab.id.replace(".","-"))).addClass('red-ui-workspace-locked');
|
||||
}
|
||||
|
||||
const changeBadgeContainer = $('<svg class="red-ui-flow-tab-changed red-ui-flow-node-changed" width="10" height="10" viewBox="-1 -1 12 12"></svg>').appendTo("#red-ui-tab-"+(tab.id.replace(".","-")))
|
||||
const changeBadge = document.createElementNS("http://www.w3.org/2000/svg","circle");
|
||||
changeBadge.setAttribute("cx",5);
|
||||
changeBadge.setAttribute("cy",5);
|
||||
changeBadge.setAttribute("r",5);
|
||||
changeBadgeContainer.append(changeBadge)
|
||||
|
||||
RED.menu.setDisabled("menu-item-workspace-delete",activeWorkspace === 0 || workspaceTabCount <= 1);
|
||||
if (workspaceTabCount === 1) {
|
||||
@@ -637,6 +645,11 @@ RED.workspaces = (function() {
|
||||
RED.workspaces.show(viewStack[++viewStackPos],true);
|
||||
}
|
||||
})
|
||||
|
||||
RED.events.on("flows:change", (ws) => {
|
||||
$("#red-ui-tab-"+(ws.id.replace(".","-"))).toggleClass('red-ui-workspace-changed',!!(ws.contentsChanged || ws.changed || ws.added));
|
||||
})
|
||||
|
||||
hideWorkspace();
|
||||
}
|
||||
|
||||
|
@@ -91,10 +91,13 @@
|
||||
|
||||
.red-ui-flow-group {
|
||||
&.red-ui-flow-group-hovered {
|
||||
.red-ui-flow-group-outline-select {
|
||||
.red-ui-flow-group-outline-select-line {
|
||||
stroke-opacity: 0.8 !important;
|
||||
stroke-dasharray: 10 4 !important;
|
||||
}
|
||||
.red-ui-flow-group-outline-select-outline {
|
||||
stroke-opacity: 0.8 !important;
|
||||
}
|
||||
}
|
||||
&.red-ui-flow-group-active-hovered:not(.red-ui-flow-group-hovered) {
|
||||
.red-ui-flow-group-outline-select {
|
||||
@@ -113,15 +116,35 @@
|
||||
.red-ui-flow-group-outline-select {
|
||||
fill: none;
|
||||
stroke: var(--red-ui-node-selected-color);
|
||||
pointer-events: stroke;
|
||||
pointer-events: none;
|
||||
stroke-opacity: 0;
|
||||
stroke-width: 3;
|
||||
stroke-width: 2;
|
||||
|
||||
&.red-ui-flow-group-outline-select-background {
|
||||
&.red-ui-flow-group-outline-select-outline {
|
||||
stroke: var(--red-ui-view-background);
|
||||
stroke-width: 6;
|
||||
stroke-width: 4;
|
||||
}
|
||||
&.red-ui-flow-group-outline-select-background {
|
||||
fill: white;
|
||||
fill-opacity: 0;
|
||||
pointer-events: stroke;
|
||||
stroke-width: 16;
|
||||
}
|
||||
}
|
||||
|
||||
svg:not(.red-ui-workspace-lasso-active) {
|
||||
.red-ui-flow-group:not(.red-ui-flow-group-selected) {
|
||||
.red-ui-flow-group-outline-select.red-ui-flow-group-outline-select-background:hover {
|
||||
~ .red-ui-flow-group-outline-select {
|
||||
stroke-opacity: 0.4 !important;
|
||||
}
|
||||
~ .red-ui-flow-group-outline-select-line {
|
||||
stroke-dasharray: 10 4 !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.red-ui-flow-group-body {
|
||||
pointer-events: none;
|
||||
fill: var(--red-ui-group-default-fill);
|
||||
|
@@ -105,6 +105,15 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
.red-ui-tab:not(.red-ui-workspace-changed) .red-ui-flow-tab-changed {
|
||||
display: none;
|
||||
}
|
||||
.red-ui-tab.red-ui-workspace-changed .red-ui-flow-tab-changed {
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
top: 1px;
|
||||
right: 1px;
|
||||
}
|
||||
|
||||
.red-ui-workspace-locked-icon {
|
||||
display: none;
|
||||
|
@@ -478,7 +478,7 @@ module.exports = function(RED) {
|
||||
var completeSend = function(partId) {
|
||||
var group = inflight[partId];
|
||||
if (group.timeout) { clearTimeout(group.timeout); }
|
||||
if ((node.accumulate !== true) || group.msg.hasOwnProperty("complete")) { delete inflight[partId]; }
|
||||
if (node.mode === 'auto' || node.accumulate !== true || group.msg.hasOwnProperty("complete")) { delete inflight[partId]; }
|
||||
if (group.type === 'array' && group.arrayLen > 1) {
|
||||
var newArray = [];
|
||||
group.payload.forEach(function(n) {
|
||||
|
@@ -15,12 +15,12 @@
|
||||
}
|
||||
],
|
||||
"dependencies": {
|
||||
"acorn": "8.8.1",
|
||||
"acorn": "8.8.2",
|
||||
"acorn-walk": "8.2.0",
|
||||
"ajv": "8.11.2",
|
||||
"body-parser": "1.20.1",
|
||||
"ajv": "8.12.0",
|
||||
"body-parser": "1.20.2",
|
||||
"cheerio": "1.0.0-rc.10",
|
||||
"content-type": "1.0.4",
|
||||
"content-type": "1.0.5",
|
||||
"cookie-parser": "1.4.6",
|
||||
"cookie": "0.5.0",
|
||||
"cors": "2.8.5",
|
||||
@@ -28,7 +28,7 @@
|
||||
"denque": "2.1.0",
|
||||
"form-data": "4.0.0",
|
||||
"fs-extra": "10.1.0",
|
||||
"got": "11.8.5",
|
||||
"got": "11.8.6",
|
||||
"hash-sum": "2.0.0",
|
||||
"hpagent": "1.2.0",
|
||||
"https-proxy-agent": "5.0.1",
|
||||
@@ -40,9 +40,9 @@
|
||||
"mustache": "4.2.0",
|
||||
"node-watch": "0.7.3",
|
||||
"on-headers": "1.0.2",
|
||||
"raw-body": "2.5.1",
|
||||
"raw-body": "2.5.2",
|
||||
"tough-cookie": "4.1.2",
|
||||
"uuid": "8.3.2",
|
||||
"uuid": "9.0.0",
|
||||
"ws": "7.5.6",
|
||||
"xml2js": "0.4.23",
|
||||
"iconv-lite": "0.6.3"
|
||||
|
@@ -20,7 +20,7 @@
|
||||
"clone": "2.1.2",
|
||||
"fs-extra": "10.1.0",
|
||||
"semver": "7.3.8",
|
||||
"tar": "6.1.12",
|
||||
"tar": "6.1.13",
|
||||
"uglify-js": "3.17.4"
|
||||
}
|
||||
}
|
||||
|
@@ -21,6 +21,6 @@
|
||||
"jsonata": "1.8.6",
|
||||
"lodash.clonedeep": "^4.5.0",
|
||||
"moment": "2.29.4",
|
||||
"moment-timezone": "0.5.39"
|
||||
"moment-timezone": "0.5.41"
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user