GUI -- TopoView - don't add source port on host link.
Change-Id: Ia1a298eb6cab9da1c209c8365b244025468f1a20
Showing
1 changed file
with
13 additions
and
10 deletions
| ... | @@ -198,21 +198,24 @@ | ... | @@ -198,21 +198,24 @@ |
| 198 | d.el.classed('enhanced', true); | 198 | d.el.classed('enhanced', true); |
| 199 | $log.debug('[' + (d.srcPort || 'H') + '] ---> [' + d.tgtPort + ']', d.key); | 199 | $log.debug('[' + (d.srcPort || 'H') + '] ---> [' + d.tgtPort + ']', d.key); |
| 200 | 200 | ||
| 201 | - // define port label data objects | 201 | + // Define port label data objects. |
| 202 | - var data = [ | 202 | + // NOTE: src port is absent in the case of host-links. |
| 203 | - { | 203 | + |
| 204 | - id: 'topo-port-src', | 204 | + var data = [{ |
| 205 | - num: d.srcPort, | ||
| 206 | - baseX: d.source.x, | ||
| 207 | - baseY: d.source.y | ||
| 208 | - }, | ||
| 209 | - { | ||
| 210 | id: 'topo-port-tgt', | 205 | id: 'topo-port-tgt', |
| 211 | num: d.tgtPort, | 206 | num: d.tgtPort, |
| 212 | baseX: d.target.x, | 207 | baseX: d.target.x, |
| 213 | baseY: d.target.y | 208 | baseY: d.target.y |
| 209 | + }]; | ||
| 210 | + | ||
| 211 | + if (d.srcPort) { | ||
| 212 | + data.push({ | ||
| 213 | + id: 'topo-port-src', | ||
| 214 | + num: d.srcPort, | ||
| 215 | + baseX: d.source.x, | ||
| 216 | + baseY: d.source.y | ||
| 217 | + }); | ||
| 214 | } | 218 | } |
| 215 | - ]; | ||
| 216 | 219 | ||
| 217 | td3.applyPortLabels(data, api.portLabelG()); | 220 | td3.applyPortLabels(data, api.portLabelG()); |
| 218 | } | 221 | } | ... | ... |
-
Please register or login to post a comment