Track subflow instances on the subflow node itself

This commit is contained in:
Nick O'Leary
2020-06-08 11:49:43 +01:00
parent 34dfd50702
commit 21866634b3
3 changed files with 25 additions and 12 deletions

View File

@@ -883,13 +883,13 @@ RED.editor = (function() {
var userCount = 0;
var subflowType = "subflow:"+node.id;
RED.nodes.eachNode(function(n) {
if (n.type === subflowType) {
userCount++;
}
});
// RED.nodes.eachNode(function(n) {
// if (n.type === subflowType) {
// userCount++;
// }
// });
$("#red-ui-editor-subflow-user-count")
.text(RED._("subflow.subflowInstances", {count:userCount})).show();
.text(RED._("subflow.subflowInstances", {count:node.instances.length})).show();
}
$('<div class="form-row">'+

View File

@@ -240,13 +240,8 @@ RED.sidebar.info = (function() {
subflowNode = node;
}
subflowUserCount = 0;
var subflowType = "subflow:"+subflowNode.id;
RED.nodes.eachNode(function(n) {
if (n.type === subflowType) {
subflowUserCount++;
}
});
subflowUserCount = subflowNode.instances.length;
}
propertiesPanelHeaderIcon.empty();