mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
make nodes with only group change not deployed by nodes deploy mode
This commit is contained in:
parent
f5da2eb633
commit
1be337fbc5
@ -148,7 +148,8 @@ function setFlows(_config,_credentials,type,muteLog,forceStart,user) {
|
|||||||
// Parse the configuration
|
// Parse the configuration
|
||||||
newFlowConfig = flowUtil.parseConfig(clone(config));
|
newFlowConfig = flowUtil.parseConfig(clone(config));
|
||||||
// Generate a diff to identify what has changed
|
// Generate a diff to identify what has changed
|
||||||
diff = flowUtil.diffConfigs(activeFlowConfig,newFlowConfig);
|
diff = flowUtil.diffConfigs(activeFlowConfig,newFlowConfig,
|
||||||
|
(type === "nodes"));
|
||||||
|
|
||||||
// Now the flows have been compared, remove any credentials from newFlowConfig
|
// Now the flows have been compared, remove any credentials from newFlowConfig
|
||||||
// so they don't cause false-positive diffs the next time a flow is deployed
|
// so they don't cause false-positive diffs the next time a flow is deployed
|
||||||
|
@ -271,7 +271,7 @@ module.exports = {
|
|||||||
|
|
||||||
parseConfig: parseConfig,
|
parseConfig: parseConfig,
|
||||||
|
|
||||||
diffConfigs: function(oldConfig, newConfig) {
|
diffConfigs: function(oldConfig, newConfig, ignoreGroup) {
|
||||||
var id;
|
var id;
|
||||||
var node;
|
var node;
|
||||||
var nn;
|
var nn;
|
||||||
@ -438,6 +438,9 @@ module.exports = {
|
|||||||
if (newConfig.allNodes.hasOwnProperty(id)) {
|
if (newConfig.allNodes.hasOwnProperty(id)) {
|
||||||
node = newConfig.allNodes[id];
|
node = newConfig.allNodes[id];
|
||||||
for (var prop in node) {
|
for (var prop in node) {
|
||||||
|
if (ignoreGroup && (prop === "g")) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (node.hasOwnProperty(prop) && prop != "z" && prop != "id" && prop != "wires") {
|
if (node.hasOwnProperty(prop) && prop != "z" && prop != "id" && prop != "wires") {
|
||||||
// This node has a property that references a changed/removed node
|
// This node has a property that references a changed/removed node
|
||||||
// Assume it is a config node change and mark this node as
|
// Assume it is a config node change and mark this node as
|
||||||
|
Loading…
Reference in New Issue
Block a user