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);
diff --git a/web/gui/src/test/_karma/ev/traffic/ev_18_showTraffic_allMix.json b/web/gui/src/test/_karma/ev/traffic/ev_18_showTraffic_allMix.json
new file mode 100644
index 0000000..dd49f0c
--- /dev/null
+++ b/web/gui/src/test/_karma/ev/traffic/ev_18_showTraffic_allMix.json
@@ -0,0 +1,38 @@
+{
+ "event": "showTraffic",
+ "sid": 1,
+ "payload": {
+ "paths": [
+ {
+ "class": "primary",
+ "links": [
+ "of:0000ffffffff0008/2-of:0000ffffffff0003/1"
+ ],
+ "labels": ["primary"]
+ },
+ {
+ "class": "secondary",
+ "links": [
+ "of:0000ffffffff0003/9-of:0000ffffffff0007/2",
+ "of:0000ffffffff0008/4-of:0000ffffffff0007/1"
+ ],
+ "labels": ["secondary", "secondo"]
+ },
+ {
+ "class": "secondary optical",
+ "links": [
+ "of:0000ffffffff0003/4-of:0000ffffffffff03/1",
+ "of:0000ffffffff0008/4-of:0000ffffffffff08/1"
+ ],
+ "labels": ["secondary optical", "secondo optical"]
+ },
+ {
+ "class": "primary optical",
+ "links": [
+ "of:0000ffffffffff08/4-of:0000ffffffffff03/1"
+ ],
+ "labels": ["primary optical"]
+ }
+ ]
+ }
+}
diff --git a/web/gui/src/test/_karma/ev/traffic/ev_18_showTraffic_animated.json b/web/gui/src/test/_karma/ev/traffic/ev_18_showTraffic_animated.json
deleted file mode 100644
index f53b3e4..0000000
--- a/web/gui/src/test/_karma/ev/traffic/ev_18_showTraffic_animated.json
+++ /dev/null
@@ -1,34 +0,0 @@
-{
- "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"
- ]
- }
- ]
- }
-}
diff --git a/web/gui/src/test/_karma/ev/traffic/ev_19_showTraffic_allMix.json b/web/gui/src/test/_karma/ev/traffic/ev_19_showTraffic_allMix.json
deleted file mode 100644
index 941fda9..0000000
--- a/web/gui/src/test/_karma/ev/traffic/ev_19_showTraffic_allMix.json
+++ /dev/null
@@ -1,56 +0,0 @@
-{
- "event": "showTraffic",
- "sid": 1,
- "payload": {
- "paths": [
- {
- "class": "primary",
- "traffic": false,
- "links": [
- "of:0000ffffffff0008/2-of:0000ffffffff0003/1"
- ],
- "labels": ["primary"]
- },
- {
- "class": "secondary",
- "traffic": false,
- "links": [
- "of:0000ffffffff0003/9-of:0000ffffffff0007/2"
- ],
- "labels": ["secondary"]
- },
- {
- "class": "animated",
- "traffic": true,
- "links": [
- "of:0000ffffffff0008/4-of:0000ffffffff0007/1"
- ],
- "labels": ["animated"]
- },
- {
- "class": "animated optical",
- "traffic": true,
- "links": [
- "of:0000ffffffff0008/4-of:0000ffffffffff08/1"
- ],
- "labels": ["animated optical"]
- },
- {
- "class": "secondary optical",
- "traffic": false,
- "links": [
- "of:0000ffffffff0003/4-of:0000ffffffffff03/1"
- ],
- "labels": ["secondary optical"]
- },
- {
- "class": "primary optical",
- "traffic": false,
- "links": [
- "of:0000ffffffffff08/4-of:0000ffffffffff03/1"
- ],
- "labels": ["primary optical"]
- }
- ]
- }
-}
diff --git a/web/gui/src/test/_karma/ev/traffic/ev_20_showTraffic_none.json b/web/gui/src/test/_karma/ev/traffic/ev_19_showTraffic_none.json
similarity index 100%
rename from web/gui/src/test/_karma/ev/traffic/ev_20_showTraffic_none.json
rename to web/gui/src/test/_karma/ev/traffic/ev_19_showTraffic_none.json
diff --git a/web/gui/src/test/_karma/ev/traffic/ev_21_updateDevice_s7offline.json b/web/gui/src/test/_karma/ev/traffic/ev_20_updateDevice_s7offline.json
similarity index 100%
rename from web/gui/src/test/_karma/ev/traffic/ev_21_updateDevice_s7offline.json
rename to web/gui/src/test/_karma/ev/traffic/ev_20_updateDevice_s7offline.json
diff --git a/web/gui/src/test/_karma/ev/traffic/ev_22_updateDevice_s7online.json b/web/gui/src/test/_karma/ev/traffic/ev_21_updateDevice_s7online.json
similarity index 100%
rename from web/gui/src/test/_karma/ev/traffic/ev_22_updateDevice_s7online.json
rename to web/gui/src/test/_karma/ev/traffic/ev_21_updateDevice_s7online.json
diff --git a/web/gui/src/test/_karma/ev/traffic/ev_23_removeDevice_s8.json b/web/gui/src/test/_karma/ev/traffic/ev_22_removeDevice_s8.json
similarity index 100%
rename from web/gui/src/test/_karma/ev/traffic/ev_23_removeDevice_s8.json
rename to web/gui/src/test/_karma/ev/traffic/ev_22_removeDevice_s8.json
diff --git a/web/gui/src/test/_karma/ev/traffic/ev_24_addDevice_s8.json b/web/gui/src/test/_karma/ev/traffic/ev_23_addDevice_s8.json
similarity index 100%
rename from web/gui/src/test/_karma/ev/traffic/ev_24_addDevice_s8.json
rename to web/gui/src/test/_karma/ev/traffic/ev_23_addDevice_s8.json
diff --git a/web/gui/src/test/_karma/ev/traffic/ev_25_removeHost_h7.json b/web/gui/src/test/_karma/ev/traffic/ev_24_removeHost_h7.json
similarity index 100%
rename from web/gui/src/test/_karma/ev/traffic/ev_25_removeHost_h7.json
rename to web/gui/src/test/_karma/ev/traffic/ev_24_removeHost_h7.json