Implement navigate-to-region (topo2navRegion) event; update scaffolding view (topoX) to exercise.
Change-Id: Ib342f791854664b31bd1724a446008c960231784
diff --git a/web/gui/src/main/java/org/onosproject/ui/impl/topo/UiTopoSession.java b/web/gui/src/main/java/org/onosproject/ui/impl/topo/UiTopoSession.java
index f6552dd..2b27347 100644
--- a/web/gui/src/main/java/org/onosproject/ui/impl/topo/UiTopoSession.java
+++ b/web/gui/src/main/java/org/onosproject/ui/impl/topo/UiTopoSession.java
@@ -250,4 +250,18 @@
public void refreshModel() {
sharedModel.refresh();
}
+
+ /**
+ * Navigates to the specified region by setting the associated layout as
+ * current.
+ *
+ * @param regionId region identifier
+ */
+ public void navToRegion(String regionId) {
+ // 1. find the layout corresponding to the region ID
+ // 2. set this layout to be "current"
+ RegionId r = RegionId.regionId(regionId);
+ UiTopoLayout layout = layoutService.getLayout(r);
+ setCurrentLayout(layout);
+ }
}