| 332 | }; |
| 333 | |
| 334 | function findNodeById(config, graph_name, id) { |
| 335 | for (const node of Object.values(config.graphs[graph_name].nodes)) { |
| 336 | if ((id in node.link) && node.link.id === id) { |
| 337 | return node; |
| 338 | } |
| 339 | } |
| 340 | for (const node of Object.values(config.nodes)) { |
| 341 | if ((id in node.link) && node.link.id === id) { |
| 342 | return node; |
| 343 | } |
| 344 | } |
| 345 | for (const graph of Object.values(config.graphs)) { |
| 346 | if (graph.name === graph_name) continue; |
| 347 | for (const node of Object.values(graph.nodes)) { |
| 348 | if ((id in node.link) && node.link.id === id) { |
| 349 | return node; |
| 350 | } |
| 351 | } |
| 352 | } |
| 353 | return null; |
| 354 | } |
| 355 | |
| 356 | export const splitQpsNode = (config, graph_name, node) => { |
| 357 | let splitNode = (cfg) => { |