diff --git a/src/webui/service/templates/base.html b/src/webui/service/templates/base.html index 8bded20ffee4e01f2d234199f80eb1aad297f15c..d2eadf121b4857c035f24746787c05a1c9f070be 100644 --- a/src/webui/service/templates/base.html +++ b/src/webui/service/templates/base.html @@ -192,7 +192,7 @@ <div class="container"> <div class="row"> <div class="col-md-12"> - <p class="text-center" style="color: white;">© 2022-2024 <a href="https://tfs.etsi.org/">ETSI OSG/SDG TeraFlowSDN (TFS)</a></p> + <p class="text-center" style="color: white;">© 2022-2024 <a href="https://tfs.etsi.org/">ETSI SDG TeraFlowSDN (TFS)</a></p> </div> </div> <div class="row"> diff --git a/src/webui/service/templates/js/topology.js b/src/webui/service/templates/js/topology.js index 3e0a766ee6f7bfbcad3a76c64c0f260514b092ef..8a8ba0e40eda2f677b4efee6130ac5dc9cc64206 100644 --- a/src/webui/service/templates/js/topology.js +++ b/src/webui/service/templates/js/topology.js @@ -86,21 +86,21 @@ d3.json("{{ url_for('main.topology') }}", function(data) { return l.name.toLowerCase().includes('mgmt') ? "5,5" : "0"; }); - optical_link = svg.append("g").attr("class", "links").style('stroke', '#aaa') - .selectAll("line") - .data(data.optical_links) - .enter() - .append("line") - .attr("opacity", 1) - .attr("stroke", function(l) { - return l.name.toLowerCase().includes('mgmt') ? '#AAAAAA' : '#555555'; - }) - .attr("stroke-width", function(l) { - return l.name.toLowerCase().includes('mgmt') ? 1 : 2; - }) - .attr("stroke-dasharray", function(l) { - return l.name.toLowerCase().includes('mgmt') ? "5,5" : "0"; - }); + optical_link = svg.append("g").attr("class", "links")//.style('stroke', '#aaa') + .selectAll("line") + .data(data.optical_links) + .enter() + .append("line") + .attr("opacity", 1) + .attr("stroke", function(l) { + return l.name.toLowerCase().includes('mgmt') ? '#AAAAAA' : '#555555'; + }) + .attr("stroke-width", function(l) { + return l.name.toLowerCase().includes('mgmt') ? 1 : 2; + }) + .attr("stroke-dasharray", function(l) { + return l.name.toLowerCase().includes('mgmt') ? "5,5" : "0"; + }); node = svg.append("g").attr("class", "devices").attr('r', 20).style('fill', '#69b3a2') .selectAll("circle") @@ -130,18 +130,19 @@ d3.json("{{ url_for('main.topology') }}", function(data) { simulation.nodes(data.devices); // add forces, associate each with a name, and set their properties + // Experimental : Optical link part + all_links = data.links.concat(data.optical_links) simulation .force("link", d3.forceLink() .id(function(d) {return d.id;}) .distance(forceProperties.link.distance) .iterations(forceProperties.link.iterations) - .links(forceProperties.link.enabled ? data.links.length>0? data.links :[]:[])) -// ------------------ Experimental : Optical link part - .force("link", d3.forceLink() - .id(function(d) {return d.id;}) - .distance(forceProperties.link.distance) - .iterations(forceProperties.link.iterations) - .links(forceProperties.link.enabled ? data.optical_links.length>0?data.optical_links:[]:[])) + .links( + forceProperties.link.enabled ? ( + (all_links.length > 0) ? all_links : [] + ) : [] + ) + ) .force("charge", d3.forceManyBody() .strength(forceProperties.charge.strength * forceProperties.charge.enabled)