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 d1493e58..7da350ac 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 @@ -37,6 +37,10 @@ function start() { let links = []; for (let i=0; i maxDepth) { + continue; + } let name = data[i][1].name; let bytes = data[i][1].current_throughput[0]; let bytesAsMegabits = bytes / 1000000; @@ -84,6 +88,28 @@ function start() { }); } +function getMaxDepth() { + let maxDepth = 10; + let storedDepth = localStorage.getItem("atsDepth"); + if (storedDepth !== null) { + maxDepth = parseInt(storedDepth); + } else { + localStorage.setItem("atsDepth", maxDepth.toString()); + } + return maxDepth; +} + +function bindMaxDepth() { + let d = document.getElementById("maxDepth"); + d.value = maxDepth; + d.onclick = () => { + maxDepth = parseInt(d.value); + localStorage.setItem("atsDepth", maxDepth.toString()); + }; +} + +let maxDepth = getMaxDepth(); +bindMaxDepth(); let graph = new AllTreeSankey("sankey"); start(); \ No newline at end of file diff --git a/src/rust/lqosd/src/node_manager/static2/all_tree_sankey.html b/src/rust/lqosd/src/node_manager/static2/all_tree_sankey.html index 4781f811..6a4aa63b 100644 --- a/src/rust/lqosd/src/node_manager/static2/all_tree_sankey.html +++ b/src/rust/lqosd/src/node_manager/static2/all_tree_sankey.html @@ -1,4 +1,7 @@
+
+ +
\ No newline at end of file