GUI -- TopoView - Fixed problem of labels on hostlinks not being positioned correctly.
- updated traffic scenario.
Change-Id: I452e0e81327a9006c20e00a843c6096432a1efac
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 bddfdaa..da42832 100644
--- a/web/gui/src/main/webapp/app/view/topo/topoForce.js
+++ b/web/gui/src/main/webapp/app/view/topo/topoForce.js
@@ -846,13 +846,6 @@
})
.style('opacity', 0.0)
.remove();
-
- // NOTE: invoke a single tick to force the labels to position
- // onto their links.
- tick();
- // TODO: this causes undesirable behavior when in oblique view
- // It causes the nodes to jump into "overhead" view positions, even
- // though the oblique planes are still showing...
}
// ==========================
@@ -921,10 +914,10 @@
rect,
text,
parms = {
- x1: d.ldata.x1,
- y1: d.ldata.y1,
- x2: d.ldata.x2,
- y2: d.ldata.y2
+ x1: d.ldata.source.x,
+ y1: d.ldata.source.y,
+ x2: d.ldata.target.x,
+ y2: d.ldata.target.y
};
if (d.ldata.type() === 'hostLink') {
diff --git a/web/gui/src/test/_karma/ev/traffic/ev_16_addDevice_r4.json b/web/gui/src/test/_karma/ev/traffic/ev_16_addDevice_r4.json
new file mode 100644
index 0000000..fc354f0
--- /dev/null
+++ b/web/gui/src/test/_karma/ev/traffic/ev_16_addDevice_r4.json
@@ -0,0 +1,18 @@
+{
+ "event": "addDevice",
+ "payload": {
+ "id": "of:0000ffffffffff04",
+ "type": "roadm",
+ "online": true,
+ "master": "myInstB",
+ "labels": [
+ "",
+ "opt-4",
+ "0000ffffffffff04"
+ ],
+ "metaUi": {
+ "x": 1100,
+ "y": 600
+ }
+ }
+}
diff --git a/web/gui/src/test/_karma/ev/traffic/ev_16_showTraffic_primary.json b/web/gui/src/test/_karma/ev/traffic/ev_16_showTraffic_primary.json
deleted file mode 100644
index 3b76e53..0000000
--- a/web/gui/src/test/_karma/ev/traffic/ev_16_showTraffic_primary.json
+++ /dev/null
@@ -1,32 +0,0 @@
-{
- "event": "showTraffic",
- "sid": 1,
- "payload": {
- "paths": [
- {
- "class": "primary",
- "links": [
- "0E:2A:69:30:13:86/-1/0-of:0000ffffffff0003/101",
- "0E:2A:69:30:13:aa/-1/0-of:0000ffffffff0008/101"
- ],
- "labels": [
- "20 bytes",
- "20 bytes"
- ]
- },
- {
- "class": "primary optical",
- "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_17_addLink_r8-r4.json b/web/gui/src/test/_karma/ev/traffic/ev_17_addLink_r8-r4.json
new file mode 100644
index 0000000..4cd11af
--- /dev/null
+++ b/web/gui/src/test/_karma/ev/traffic/ev_17_addLink_r8-r4.json
@@ -0,0 +1,16 @@
+{
+ "event": "addLink",
+ "payload": {
+ "id": "of:0000ffffffffff08/4-of:0000ffffffffff04/1",
+ "type": "optical",
+ "online": true,
+ "linkWidth": 2,
+ "src": "of:0000ffffffffff08",
+ "srcPort": "4",
+ "dst": "of:0000ffffffffff04",
+ "dstPort": "1",
+ "props" : {
+ "BW": "90 Gb"
+ }
+ }
+}
diff --git a/web/gui/src/test/_karma/ev/traffic/ev_17_showTraffic_secondary.json b/web/gui/src/test/_karma/ev/traffic/ev_17_showTraffic_secondary.json
deleted file mode 100644
index 4f42d41..0000000
--- a/web/gui/src/test/_karma/ev/traffic/ev_17_showTraffic_secondary.json
+++ /dev/null
@@ -1,32 +0,0 @@
-{
- "event": "showTraffic",
- "sid": 1,
- "payload": {
- "paths": [
- {
- "class": "secondary",
- "links": [
- "0E:2A:69:30:13:86/-1/0-of:0000ffffffff0003/101",
- "0E:2A:69:30:13:aa/-1/0-of:0000ffffffff0008/101"
- ],
- "labels": [
- "35 bytes",
- "35 bytes"
- ]
- },
- {
- "class": "secondary optical",
- "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_18_showTraffic_primary.json b/web/gui/src/test/_karma/ev/traffic/ev_18_showTraffic_primary.json
new file mode 100644
index 0000000..fbe6597
--- /dev/null
+++ b/web/gui/src/test/_karma/ev/traffic/ev_18_showTraffic_primary.json
@@ -0,0 +1,34 @@
+{
+ "event": "showTraffic",
+ "sid": 1,
+ "payload": {
+ "paths": [
+ {
+ "class": "primary",
+ "links": [
+ "0E:2A:69:30:13:86/-1/0-of:0000ffffffff0003/101",
+ "0E:2A:69:30:13:aa/-1/0-of:0000ffffffff0008/101",
+ "of:0000ffffffff0003/4-of:0000ffffffffff03/1",
+ "of:0000ffffffff0008/4-of:0000ffffffffff08/1"
+ ],
+ "labels": [
+ "20 bytes",
+ "20 bytes",
+ "24 bytes",
+ "some bits"
+ ]
+ },
+ {
+ "class": "primary optical",
+ "links": [
+ "of:0000ffffffffff08/4-of:0000ffffffffff03/1",
+ "of:0000ffffffffff08/4-of:0000ffffffffff04/1"
+ ],
+ "labels": [
+ "foo bars",
+ "boo fars"
+ ]
+ }
+ ]
+ }
+}
diff --git a/web/gui/src/test/_karma/ev/traffic/ev_19_showTraffic_secondary.json b/web/gui/src/test/_karma/ev/traffic/ev_19_showTraffic_secondary.json
new file mode 100644
index 0000000..5ee1b35
--- /dev/null
+++ b/web/gui/src/test/_karma/ev/traffic/ev_19_showTraffic_secondary.json
@@ -0,0 +1,35 @@
+{
+ "event": "showTraffic",
+ "sid": 1,
+ "payload": {
+ "paths": [
+ {
+ "class": "secondary",
+ "links": [
+ "0E:2A:69:30:13:86/-1/0-of:0000ffffffff0003/101",
+ "0E:2A:69:30:13:aa/-1/0-of:0000ffffffff0008/101",
+ "of:0000ffffffff0003/4-of:0000ffffffffff03/1",
+ "of:0000ffffffff0008/4-of:0000ffffffffff08/1"
+ ],
+ "labels": [
+ "35 bytes",
+ "35 bytes",
+ "24 bytes",
+ "some bits"
+ ]
+ },
+ {
+ "class": "secondary optical",
+ "links": [
+ "of:0000ffffffffff08/4-of:0000ffffffffff03/1",
+ "of:0000ffffffffff08/4-of:0000ffffffffff04/1"
+
+ ],
+ "labels": [
+ "foo bars",
+ "bar foos"
+ ]
+ }
+ ]
+ }
+}
diff --git a/web/gui/src/test/_karma/ev/traffic/ev_18_showTraffic_allMix.json b/web/gui/src/test/_karma/ev/traffic/ev_20_showTraffic_allMix.json
similarity index 78%
rename from web/gui/src/test/_karma/ev/traffic/ev_18_showTraffic_allMix.json
rename to web/gui/src/test/_karma/ev/traffic/ev_20_showTraffic_allMix.json
index dd49f0c..6a781a0 100644
--- a/web/gui/src/test/_karma/ev/traffic/ev_18_showTraffic_allMix.json
+++ b/web/gui/src/test/_karma/ev/traffic/ev_20_showTraffic_allMix.json
@@ -14,17 +14,18 @@
"class": "secondary",
"links": [
"of:0000ffffffff0003/9-of:0000ffffffff0007/2",
- "of:0000ffffffff0008/4-of:0000ffffffff0007/1"
+ "of:0000ffffffff0008/4-of:0000ffffffff0007/1",
+ "of:0000ffffffff0003/4-of:0000ffffffffff03/1",
+ "of:0000ffffffff0008/4-of:0000ffffffffff08/1"
],
- "labels": ["secondary", "secondo"]
+ "labels": ["secondary", "secondo", "deux", "zwei"]
},
{
"class": "secondary optical",
"links": [
- "of:0000ffffffff0003/4-of:0000ffffffffff03/1",
- "of:0000ffffffff0008/4-of:0000ffffffffff08/1"
+ "of:0000ffffffffff08/4-of:0000ffffffffff04/1"
],
- "labels": ["secondary optical", "secondo optical"]
+ "labels": ["secondary optical"]
},
{
"class": "primary optical",
diff --git a/web/gui/src/test/_karma/ev/traffic/ev_19_showTraffic_none.json b/web/gui/src/test/_karma/ev/traffic/ev_21_showTraffic_none.json
similarity index 100%
rename from web/gui/src/test/_karma/ev/traffic/ev_19_showTraffic_none.json
rename to web/gui/src/test/_karma/ev/traffic/ev_21_showTraffic_none.json
diff --git a/web/gui/src/test/_karma/ev/traffic/ev_20_updateDevice_s7offline.json b/web/gui/src/test/_karma/ev/traffic/ev_22_updateDevice_s7offline.json
similarity index 100%
rename from web/gui/src/test/_karma/ev/traffic/ev_20_updateDevice_s7offline.json
rename to web/gui/src/test/_karma/ev/traffic/ev_22_updateDevice_s7offline.json
diff --git a/web/gui/src/test/_karma/ev/traffic/ev_21_updateDevice_s7online.json b/web/gui/src/test/_karma/ev/traffic/ev_23_updateDevice_s7online.json
similarity index 100%
rename from web/gui/src/test/_karma/ev/traffic/ev_21_updateDevice_s7online.json
rename to web/gui/src/test/_karma/ev/traffic/ev_23_updateDevice_s7online.json
diff --git a/web/gui/src/test/_karma/ev/traffic/ev_22_removeDevice_s8.json b/web/gui/src/test/_karma/ev/traffic/ev_24_removeDevice_s8.json
similarity index 100%
rename from web/gui/src/test/_karma/ev/traffic/ev_22_removeDevice_s8.json
rename to web/gui/src/test/_karma/ev/traffic/ev_24_removeDevice_s8.json
diff --git a/web/gui/src/test/_karma/ev/traffic/ev_23_addDevice_s8.json b/web/gui/src/test/_karma/ev/traffic/ev_25_addDevice_s8.json
similarity index 100%
rename from web/gui/src/test/_karma/ev/traffic/ev_23_addDevice_s8.json
rename to web/gui/src/test/_karma/ev/traffic/ev_25_addDevice_s8.json
diff --git a/web/gui/src/test/_karma/ev/traffic/ev_24_removeHost_h7.json b/web/gui/src/test/_karma/ev/traffic/ev_26_removeHost_h7.json
similarity index 100%
rename from web/gui/src/test/_karma/ev/traffic/ev_24_removeHost_h7.json
rename to web/gui/src/test/_karma/ev/traffic/ev_26_removeHost_h7.json