1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Merge pull request #3392 from Steve-Mcl/search-ismodified

New Feature: Add ability to find modified nodes/flows.
This commit is contained in:
Nick O'Leary 2022-02-14 23:19:27 +00:00 committed by GitHub
commit fba95e6a42
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 1 deletions

View File

@ -674,7 +674,8 @@
"invalidNodes": "Invalid nodes", "invalidNodes": "Invalid nodes",
"uknownNodes": "Unknown nodes", "uknownNodes": "Unknown nodes",
"unusedSubflows": "Unused subflows", "unusedSubflows": "Unused subflows",
"hiddenFlows": "Hidden flows" "hiddenFlows": "Hidden flows",
"modifiedNodes": "Modified nodes and flows"
} }
}, },
"help": { "help": {

View File

@ -119,6 +119,7 @@ RED.search = (function() {
val = extractFlag(val,"config",flags); val = extractFlag(val,"config",flags);
val = extractFlag(val,"subflow",flags); val = extractFlag(val,"subflow",flags);
val = extractFlag(val,"hidden",flags); val = extractFlag(val,"hidden",flags);
val = extractFlag(val,"modified",flags);
// uses:<node-id> // uses:<node-id>
val = extractValue(val,"uses",flags); val = extractValue(val,"uses",flags);
@ -164,6 +165,11 @@ RED.search = (function() {
continue; continue;
} }
} }
if (flags.hasOwnProperty("modified")) {
if (!node.node.changed && !node.node.moved) {
continue;
}
}
if (flags.hasOwnProperty("hidden")) { if (flags.hasOwnProperty("hidden")) {
// Only tabs can be hidden // Only tabs can be hidden
if (node.node.type !== 'tab') { if (node.node.type !== 'tab') {

View File

@ -271,6 +271,7 @@ RED.sidebar.info.outliner = (function() {
options: [ options: [
{label:RED._("sidebar.info.search.configNodes"), value:"is:config"}, {label:RED._("sidebar.info.search.configNodes"), value:"is:config"},
{label:RED._("sidebar.info.search.unusedConfigNodes"), value:"is:config is:unused"}, {label:RED._("sidebar.info.search.unusedConfigNodes"), value:"is:config is:unused"},
{label:RED._("sidebar.info.search.modifiedNodes"), value:"is:modified"},
{label:RED._("sidebar.info.search.invalidNodes"), value: "is:invalid"}, {label:RED._("sidebar.info.search.invalidNodes"), value: "is:invalid"},
{label:RED._("sidebar.info.search.uknownNodes"), value: "type:unknown"}, {label:RED._("sidebar.info.search.uknownNodes"), value: "type:unknown"},
{label:RED._("sidebar.info.search.unusedSubflows"), value:"is:subflow is:unused"}, {label:RED._("sidebar.info.search.unusedSubflows"), value:"is:subflow is:unused"},

View File

@ -428,6 +428,9 @@ RED.workspaces = (function() {
} }
} }
}) })
RED.actions.add("core:list-modified-nodes",function() {
RED.actions.invoke("core:search","is:modified ");
})
RED.actions.add("core:list-hidden-flows",function() { RED.actions.add("core:list-hidden-flows",function() {
RED.actions.invoke("core:search","is:hidden "); RED.actions.invoke("core:search","is:hidden ");
}) })