ONOS-5784: Empty latitude/longitude in ONOS Web UI
- (part one)
- Enhanced HostManager to react to NetworkConfigEvents such that
it applies annotations to relevant host instances from the
config data.
- A little refactoring in DeviceManager.
- Updated topoModel.js to use updated field names latOrY/longOrX.
Change-Id: I06536a6b2279291ffe638549a80b56a9fe94f48a
diff --git a/web/gui/src/main/webapp/app/view/topo/topoModel.js b/web/gui/src/main/webapp/app/view/topo/topoModel.js
index 887635d..3236ae5 100644
--- a/web/gui/src/main/webapp/app/view/topo/topoModel.js
+++ b/web/gui/src/main/webapp/app/view/topo/topoModel.js
@@ -47,8 +47,7 @@
function coordFromLngLat(loc) {
var p = api.projection();
- // suspected cause of ONOS-2109
- return p ? p([loc.lng, loc.lat]) : [0, 0];
+ return p ? p([loc.longOrX, loc.latOrY]) : [0, 0];
}
function lngLatFromCoord(coord) {
@@ -115,7 +114,7 @@
var loc = node.location,
coord;
- if (loc && loc.type === 'geo') {
+ if (loc && loc.locType === 'geo') {
coord = coordFromLngLat(loc);
node.fixed = true;
node.px = node.x = coord[0];