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:
commit
fba95e6a42
@ -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": {
|
||||||
|
@ -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') {
|
||||||
|
@ -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"},
|
||||||
|
@ -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 ");
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user