- Got a nodeSet that was already created and now want to add new nodes to it. Doing this when the nodeset is expanded. The code goes as follows:
topo.on('beforeExpandNodeSet', (sender, nodeSet) => {
var lanInfo = this._topologyClient.getLANInfo(nodeSet.model().getData().id); //Fetch the information of the nodes
for (var i: number = 0; i < lanInfo.length; i++) {
var node = topo.addNode(lanInfo[i], undefined, nodeSet);
}
})
- This doesn't seem to do it. In fact, if you go through the code of the function addNode, you may find out that it doesn't have a third parameter (parentNodeSet), even though it says it does, in the documentation.
- How to add this newly-created nodes to the nodeset
Refer this : Adding new NodeSet
Comments
0 comments
Please sign in to leave a comment.