mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Recursively validate nodes after editing config node directly
This commit is contained in:
parent
e56da17957
commit
bac8a3092f
@ -898,9 +898,19 @@ RED.editor = (function() {
|
|||||||
updateNodeCredentials(editing_config_node,configTypeDef.credentials,"node-config-input");
|
updateNodeCredentials(editing_config_node,configTypeDef.credentials,"node-config-input");
|
||||||
}
|
}
|
||||||
validateNode(editing_config_node);
|
validateNode(editing_config_node);
|
||||||
for (var i=0;i<editing_config_node.users.length;i++) {
|
var validatedNodes = {};
|
||||||
var user = editing_config_node.users[i];
|
validatedNodes[editing_config_node.id] = true;
|
||||||
validateNode(user);
|
|
||||||
|
var userStack = editing_config_node.users.slice();
|
||||||
|
while(userStack.length > 0) {
|
||||||
|
var user = userStack.pop();
|
||||||
|
if (!validatedNodes[user.id]) {
|
||||||
|
validatedNodes[user.id] = true;
|
||||||
|
if (user.users) {
|
||||||
|
userStack = userStack.concat(user.users);
|
||||||
|
}
|
||||||
|
validateNode(user);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
RED.nodes.dirty(true);
|
RED.nodes.dirty(true);
|
||||||
RED.view.redraw(true);
|
RED.view.redraw(true);
|
||||||
|
Loading…
Reference in New Issue
Block a user