diff --git a/src/rust/lqosd/src/node_manager/js_build/src/all_tree_sankey.js b/src/rust/lqosd/src/node_manager/js_build/src/all_tree_sankey.js index 0ce6adf2..ae853171 100644 --- a/src/rust/lqosd/src/node_manager/js_build/src/all_tree_sankey.js +++ b/src/rust/lqosd/src/node_manager/js_build/src/all_tree_sankey.js @@ -4,6 +4,16 @@ import {isRedacted} from "./helpers/redact"; var allNodes = []; let rootId = 0; +let lastRtt = {}; + +function idOfNode(name) { + for (let i=0; i, it's a link if (name.indexOf(" > ") === -1) { - for (let i=0; i { rootId = 0; }); @@ -43,8 +51,6 @@ class AllTreeSankey extends DashboardGraph { } } -let lastRtt = {}; - function start() { $.get("/local-api/networkTree", (data) => { allNodes = data; @@ -55,13 +61,15 @@ function start() { let nodes = []; let links = []; + let startDepth = data[rootId][1].parents.length - 1; + for (let i=0; i maxDepth) { continue; } // If data[i][1].parents does not contain rootId, skip - if (!data[i][1].parents.includes(rootId)) { + if (rootId !== 0 && !data[i][1].parents.includes(rootId)) { continue; } let name = data[i][1].name;