Partial revert of hosts/regions work to fix NPE with null provider.
Change-Id: I7dacad818ca9ffa2ea8085c499990c8e92644607
diff --git a/web/gui/src/main/java/org/onosproject/ui/impl/UiExtensionManager.java b/web/gui/src/main/java/org/onosproject/ui/impl/UiExtensionManager.java
index 0cbc848..17188cb 100644
--- a/web/gui/src/main/java/org/onosproject/ui/impl/UiExtensionManager.java
+++ b/web/gui/src/main/java/org/onosproject/ui/impl/UiExtensionManager.java
@@ -133,6 +133,7 @@
new UiView(NETWORK, "topo", "Topology", "nav_topo"),
// FIXME: leave commented out for now, while still under development
+ // (remember to also comment out inclusions in index.html)
// new UiView(NETWORK, "topo2", "New-Topo"),
// new UiView(NETWORK, "topoX", "Topo-X"),
diff --git a/web/gui/src/main/java/org/onosproject/ui/impl/topo/model/ModelCache.java b/web/gui/src/main/java/org/onosproject/ui/impl/topo/model/ModelCache.java
index 684be94..69c8c8f 100644
--- a/web/gui/src/main/java/org/onosproject/ui/impl/topo/model/ModelCache.java
+++ b/web/gui/src/main/java/org/onosproject/ui/impl/topo/model/ModelCache.java
@@ -573,14 +573,13 @@
Set<HostId> hostIds = services.region().getRegionHosts(rid);
region.reconcileHosts(hostIds);
- hostIds.forEach(hId -> {
- UiHost h = uiTopology.findHost(hId);
+ hostIds.forEach(hid -> {
+ UiHost h = uiTopology.findHost(hid);
if (h != null) {
h.setRegionId(r.id());
allHosts.remove(h);
} else {
- log.warn("Region host ID {} but no UiHost in topology",
- hId);
+ log.warn("Region host ID {} but no UiHost in topology", hid);
}
});
}
diff --git a/web/gui/src/main/webapp/app/view/topo2/topo2NodePosition.js b/web/gui/src/main/webapp/app/view/topo2/topo2NodePosition.js
index 7381f6b..6dedcd9 100644
--- a/web/gui/src/main/webapp/app/view/topo2/topo2NodePosition.js
+++ b/web/gui/src/main/webapp/app/view/topo2/topo2NodePosition.js
@@ -115,7 +115,7 @@
angular.module('ovTopo2')
.factory('Topo2NodePositionService',
- ['RandomService',
+ ['RandomService', 'Topo2MapConfigService',
function (_rs_, _t2mcs_) {
rs = _rs_;