Fixed labels issue.
Change-Id: I9d213392c5ca337b1732ad23bfcb40d196a2acb8
Showing
3 changed files
with
6 additions
and
7 deletions
... | @@ -302,6 +302,7 @@ public abstract class TopologyViewMessages { | ... | @@ -302,6 +302,7 @@ public abstract class TopologyViewMessages { |
302 | // Generate labels: id, chassis id, no-label, optional-name | 302 | // Generate labels: id, chassis id, no-label, optional-name |
303 | String name = device.annotations().value("name"); | 303 | String name = device.annotations().value("name"); |
304 | ArrayNode labels = mapper.createArrayNode(); | 304 | ArrayNode labels = mapper.createArrayNode(); |
305 | + labels.add(""); | ||
305 | labels.add(isNullOrEmpty(name) ? device.id().toString() : name); | 306 | labels.add(isNullOrEmpty(name) ? device.id().toString() : name); |
306 | labels.add(device.id().toString()); | 307 | labels.add(device.id().toString()); |
307 | 308 | ... | ... |
... | @@ -95,7 +95,7 @@ | ... | @@ -95,7 +95,7 @@ |
95 | "a5 5 0 0 1 5 5 v65 a5 5 0 0 1 -5 5 z M-41 -32.5 l11 -11 " + | 95 | "a5 5 0 0 1 5 5 v65 a5 5 0 0 1 -5 5 z M-41 -32.5 l11 -11 " + |
96 | "a10 3 0 0 1 10 -2 h40 a10 3 0 0 1 10 2 l11 11 z M-39 -20 " + | 96 | "a10 3 0 0 1 10 -2 h40 a10 3 0 0 1 10 2 l11 11 z M-39 -20 " + |
97 | "a5 5 0 0 1 10 0 a5 5 0 0 1 -10 0 z ", | 97 | "a5 5 0 0 1 10 0 a5 5 0 0 1 -10 0 z ", |
98 | - host: "M-45 -40 a5 5 0 0 1 5 -5 h65 a5 5 0 0 1 5 5 v80 " + | 98 | + endstation: "M-45 -40 a5 5 0 0 1 5 -5 h65 a5 5 0 0 1 5 5 v80 " + |
99 | "a5 5 0 0 1 -5 5 h-65 a5 5 0 0 1 -5 -5 z M32.5 -41 l11 11 " + | 99 | "a5 5 0 0 1 -5 5 h-65 a5 5 0 0 1 -5 -5 z M32.5 -41 l11 11 " + |
100 | "a3 10 0 0 1 2 10 v40 a3 10 0 0 1 -2 10 l-11 11 z M-38 -36 " + | 100 | "a3 10 0 0 1 2 10 v40 a3 10 0 0 1 -2 10 l-11 11 z M-38 -36 " + |
101 | "a2 2 0 0 1 2 -2 h56 a2 2 0 0 1 2 2 v26 a2 2 0 0 1 -2 2 h-56 " + | 101 | "a2 2 0 0 1 2 -2 h56 a2 2 0 0 1 2 2 v26 a2 2 0 0 1 -2 2 h-56 " + | ... | ... |
... | @@ -175,7 +175,7 @@ | ... | @@ -175,7 +175,7 @@ |
175 | }, | 175 | }, |
176 | webSock, | 176 | webSock, |
177 | sid = 0, | 177 | sid = 0, |
178 | - deviceLabelCount = 2, | 178 | + deviceLabelCount = 3, |
179 | hostLabelCount = 2, | 179 | hostLabelCount = 2, |
180 | deviceLabelIndex = 0, | 180 | deviceLabelIndex = 0, |
181 | hostLabelIndex = 0, | 181 | hostLabelIndex = 0, |
... | @@ -314,7 +314,7 @@ | ... | @@ -314,7 +314,7 @@ |
314 | } | 314 | } |
315 | 315 | ||
316 | function cycleLabels() { | 316 | function cycleLabels() { |
317 | - deviceLabelIndex = (deviceLabelIndex === network.deviceLabelCount - 1) | 317 | + deviceLabelIndex = (deviceLabelIndex === 2) |
318 | ? 0 : deviceLabelIndex + 1; | 318 | ? 0 : deviceLabelIndex + 1; |
319 | 319 | ||
320 | network.nodes.forEach(function (d) { | 320 | network.nodes.forEach(function (d) { |
... | @@ -1237,8 +1237,6 @@ | ... | @@ -1237,8 +1237,6 @@ |
1237 | svgCls = type ? 'node device ' + type : 'node device', | 1237 | svgCls = type ? 'node device ' + type : 'node device', |
1238 | labels = device.labels || []; | 1238 | labels = device.labels || []; |
1239 | 1239 | ||
1240 | - labels.unshift(''); // add 'no-label' to front of cycle | ||
1241 | - | ||
1242 | // Augment as needed... | 1240 | // Augment as needed... |
1243 | node.class = 'device'; | 1241 | node.class = 'device'; |
1244 | node.svgClass = device.online ? svgCls + ' online' : svgCls; | 1242 | node.svgClass = device.online ? svgCls + ' online' : svgCls; |
... | @@ -1517,12 +1515,12 @@ | ... | @@ -1517,12 +1515,12 @@ |
1517 | hostRadius = { | 1515 | hostRadius = { |
1518 | bgpSpeaker: 14, | 1516 | bgpSpeaker: 14, |
1519 | router: 14, | 1517 | router: 14, |
1520 | - host: 14 | 1518 | + endstation: 14 |
1521 | }, | 1519 | }, |
1522 | hostGlyphId = { | 1520 | hostGlyphId = { |
1523 | bgpSpeaker: 'bgpSpeaker', | 1521 | bgpSpeaker: 'bgpSpeaker', |
1524 | router: 'router', | 1522 | router: 'router', |
1525 | - host: 'host' | 1523 | + endstation: 'endstation' |
1526 | }; | 1524 | }; |
1527 | 1525 | ||
1528 | 1526 | ... | ... |
-
Please register or login to post a comment