GUI -- TopoView - Labels on host links now hidden when hosts are hidden.
- removed 'animated' class from links.
- fixed link label colors (text and rect) for both themes.
Change-Id: Iee638839090b64685d40296985e980f4e6105d82
diff --git a/web/gui/src/main/webapp/app/view/topo/topo.css b/web/gui/src/main/webapp/app/view/topo/topo.css
index f725634..12d3beb 100644
--- a/web/gui/src/main/webapp/app/view/topo/topo.css
+++ b/web/gui/src/main/webapp/app/view/topo/topo.css
@@ -457,13 +457,6 @@
stroke: #D58E0F;
}
-.light #ov-topo svg .link.animated {
- stroke: #ffA300;
-}
-.dark #ov-topo svg .link.animated {
- stroke: #D58E0F;
-}
-
#ov-topo svg .link.secondary.optical {
stroke-width: 4px;
}
@@ -484,16 +477,6 @@
stroke: #7352CD;
}
-#ov-topo svg .link.animated.optical {
- stroke-width: 10px;
-}
-.light #ov-topo svg .link.animated.optical {
- stroke: #74f;
-}
-.dark #ov-topo svg .link.animated.optical {
- stroke: #7352CD;
-}
-
#ov-topo svg .linkLabel rect {
stroke: none;
}
@@ -501,7 +484,7 @@
fill: #eee;
}
.dark #ov-topo svg .linkLabel rect {
- fill: #eee;
+ fill: #555;
}
#ov-topo svg .linkLabel text {
@@ -510,10 +493,10 @@
font-size: 9pt;
}
.light #ov-topo svg .linkLabel text {
- stroke: #777;
+ fill: #444;
}
.dark #ov-topo svg .linkLabel text {
- stroke: #777;
+ fill: #eee;
}
diff --git a/web/gui/src/main/webapp/app/view/topo/topoForce.js b/web/gui/src/main/webapp/app/view/topo/topoForce.js
index e2d1809..bddfdaa 100644
--- a/web/gui/src/main/webapp/app/view/topo/topoForce.js
+++ b/web/gui/src/main/webapp/app/view/topo/topoForce.js
@@ -368,10 +368,12 @@
function updateHostVisibility() {
sus.visible(nodeG.selectAll('.host'), showHosts);
sus.visible(linkG.selectAll('.hostLink'), showHosts);
+ sus.visible(linkLabelG.selectAll('.hostLinkLabel'), showHosts);
}
function updateOfflineVisibility(dev) {
function updDev(d, show) {
+ var b;
sus.visible(d.el, show);
tms.findAttachedLinks(d.id).forEach(function (link) {
@@ -925,6 +927,11 @@
y2: d.ldata.y2
};
+ if (d.ldata.type() === 'hostLink') {
+ el.classed('hostLinkLabel', true);
+ sus.visible(el, showHosts);
+ }
+
d.el = el;
rect = el.append('rect');
text = el.append('text').text(d.label);