mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Add ability to find modified nodes/flows
This commit is contained in:
parent
5c87a6cb76
commit
6431c43d0e
@ -674,7 +674,8 @@
|
||||
"invalidNodes": "Invalid nodes",
|
||||
"uknownNodes": "Unknown nodes",
|
||||
"unusedSubflows": "Unused subflows",
|
||||
"hiddenFlows": "Hidden flows"
|
||||
"hiddenFlows": "Hidden flows",
|
||||
"modifiedNodes": "Modified nodes and flows"
|
||||
}
|
||||
},
|
||||
"help": {
|
||||
|
@ -119,6 +119,7 @@ RED.search = (function() {
|
||||
val = extractFlag(val,"config",flags);
|
||||
val = extractFlag(val,"subflow",flags);
|
||||
val = extractFlag(val,"hidden",flags);
|
||||
val = extractFlag(val,"modified",flags);
|
||||
// uses:<node-id>
|
||||
val = extractValue(val,"uses",flags);
|
||||
|
||||
@ -164,6 +165,11 @@ RED.search = (function() {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (flags.hasOwnProperty("modified")) {
|
||||
if (!node.node.changed && !node.node.moved) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (flags.hasOwnProperty("hidden")) {
|
||||
// Only tabs can be hidden
|
||||
if (node.node.type !== 'tab') {
|
||||
|
@ -271,6 +271,7 @@ RED.sidebar.info.outliner = (function() {
|
||||
options: [
|
||||
{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.modifiedNodes"), value:"is:modified"},
|
||||
{label:RED._("sidebar.info.search.invalidNodes"), value: "is:invalid"},
|
||||
{label:RED._("sidebar.info.search.uknownNodes"), value: "type:unknown"},
|
||||
{label:RED._("sidebar.info.search.unusedSubflows"), value:"is:subflow is:unused"},
|
||||
|
@ -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.invoke("core:search","is:hidden ");
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user