From 6609f397eb11b5217958b22785d4f1c3185f17df Mon Sep 17 00:00:00 2001 From: Herbert Wolverson Date: Fri, 19 Jul 2024 11:11:20 -0500 Subject: [PATCH] Clicking links for reparenting now works, too. --- .../js_build/src/all_tree_sankey.js | 28 ++++++++++++------- 1 file changed, 18 insertions(+), 10 deletions(-) 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;