Simon Hunt

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
......@@ -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;
}
......
......@@ -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);
......
......@@ -5,7 +5,6 @@
"paths": [
{
"class": "primary",
"traffic": false,
"links": [
"of:0000ffffffff0008/2-of:0000ffffffff0003/1"
],
......@@ -13,39 +12,22 @@
},
{
"class": "secondary",
"traffic": false,
"links": [
"of:0000ffffffff0003/9-of:0000ffffffff0007/2"
],
"labels": ["secondary"]
},
{
"class": "animated",
"traffic": true,
"links": [
"of:0000ffffffff0003/9-of:0000ffffffff0007/2",
"of:0000ffffffff0008/4-of:0000ffffffff0007/1"
],
"labels": ["animated"]
},
{
"class": "animated optical",
"traffic": true,
"links": [
"of:0000ffffffff0008/4-of:0000ffffffffff08/1"
],
"labels": ["animated optical"]
"labels": ["secondary", "secondo"]
},
{
"class": "secondary optical",
"traffic": false,
"links": [
"of:0000ffffffff0003/4-of:0000ffffffffff03/1"
"of:0000ffffffff0003/4-of:0000ffffffffff03/1",
"of:0000ffffffff0008/4-of:0000ffffffffff08/1"
],
"labels": ["secondary optical"]
"labels": ["secondary optical", "secondo optical"]
},
{
"class": "primary optical",
"traffic": false,
"links": [
"of:0000ffffffffff08/4-of:0000ffffffffff03/1"
],
......
{
"event": "showTraffic",
"sid": 1,
"payload": {
"paths": [
{
"class": "animated",
"traffic": true,
"links": [
"0E:2A:69:30:13:86/-1/0-of:0000ffffffff0003/101",
"0E:2A:69:30:13:aa/-1/0-of:0000ffffffff0008/101"
],
"labels": [
"47 bytes",
"47 bytes"
]
},
{
"class": "animated optical",
"traffic": true,
"links": [
"of:0000ffffffff0003/4-of:0000ffffffffff03/1",
"of:0000ffffffff0008/4-of:0000ffffffffff08/1",
"of:0000ffffffffff08/4-of:0000ffffffffff03/1"
],
"labels": [
"24 bytes",
"some bits",
"foo bars"
]
}
]
}
}