diff --git a/website/web/static/minimize1.jpg b/website/web/static/down.jpg similarity index 100% rename from website/web/static/minimize1.jpg rename to website/web/static/down.jpg diff --git a/website/web/static/minimize2.jpg b/website/web/static/down_left.jpg similarity index 100% rename from website/web/static/minimize2.jpg rename to website/web/static/down_left.jpg diff --git a/website/web/static/tree.js b/website/web/static/tree.js index 273f370b..8777cbcb 100644 --- a/website/web/static/tree.js +++ b/website/web/static/tree.js @@ -95,19 +95,23 @@ function LocateNode(urlnode_uuid) { .style('font-size', '16px'); }; +function UnflagAllNodes() { + d3.selectAll('.node_data').select('rect').style('fill', 'white'); + d3.selectAll('.node_data').select('text').style('fill', 'black'); + d3.selectAll('.node_data').select("#flag") + .text("🏁") + .on('click', function(d) { + PermanentNodeHighlight(d.data.uuid); + }); +}; + function UnflagHostNode(hostnode_uuid) { - var to_fill = d3.select("#node_" + hostnode_uuid).select('rect'); - to_fill - .style('fill', 'white'); - - var to_fill = d3.select("#node_" + hostnode_uuid).select('text'); - to_fill - .style('fill', 'black'); - + d3.select("#node_" + hostnode_uuid).select('rect').style('fill', 'white'); + d3.select("#node_" + hostnode_uuid).select('text').style('fill', 'black'); d3.select("#node_" + hostnode_uuid).select("#flag") .text("🏁") .on('click', function(d) { - PermanentNodeHighlight(hostnode_uuid); + PermanentNodeHighlight(d.data.uuid); }); }; @@ -115,18 +119,12 @@ function PermanentNodeHighlight(hostnode_uuid) { var element = document.getElementById("node_" + hostnode_uuid); element.scrollIntoView({behavior: "smooth", block: "center", inline: "nearest"}); - var to_fill = d3.select("#node_" + hostnode_uuid).select('rect'); - to_fill - .style('fill', 'black'); - - var to_fill = d3.select("#node_" + hostnode_uuid).select('text'); - to_fill - .style('fill', 'white'); - + d3.select("#node_" + hostnode_uuid).select('rect').style('fill', 'black'); + d3.select("#node_" + hostnode_uuid).select('text').style('fill', 'white'); d3.select("#node_" + hostnode_uuid).select("#flag") .text('❌') .on('click', function(d) { - UnflagHostNode(hostnode_uuid); + UnflagHostNode(d.data.uuid); }); }; diff --git a/website/web/static/maximize1.jpg b/website/web/static/up.jpg similarity index 100% rename from website/web/static/maximize1.jpg rename to website/web/static/up.jpg diff --git a/website/web/static/maximize2.jpg b/website/web/static/up_right.jpg similarity index 100% rename from website/web/static/maximize2.jpg rename to website/web/static/up_right.jpg diff --git a/website/web/templates/tree.html b/website/web/templates/tree.html index cbb138e5..cc199f7a 100644 --- a/website/web/templates/tree.html +++ b/website/web/templates/tree.html @@ -66,7 +66,7 @@