Skip to content
Snippets Groups Projects
Commit 1df8f6ad authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

WebUI component:

- Corrected home page copyright message
- Corrected topology.js
parent 92a038f4
No related branches found
No related tags found
1 merge request!294Release TeraFlowSDN 4.0
......@@ -192,7 +192,7 @@
<div class="container">
<div class="row">
<div class="col-md-12">
<p class="text-center" style="color: white;">&copy; 2022-2024 <a href="https://tfs.etsi.org/">ETSI OSG/SDG TeraFlowSDN (TFS)</a></p>
<p class="text-center" style="color: white;">&copy; 2022-2024 <a href="https://tfs.etsi.org/">ETSI SDG TeraFlowSDN (TFS)</a></p>
</div>
</div>
<div class="row">
......
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment