ONOS-6327: Implement details panel for host view.
ONOS-6326: Add friendly names to hosts.
- PLENTY more YakShaving:
* some cleanup of the device view handler
* introduce navPath field to PropertyPanel
* introduce "-" name annotation to represent "use default"
* (and more...)
Change-Id: I2afc0f1f29c726b90e97e492527edde2d1345ece
diff --git a/core/api/src/main/java/org/onosproject/ui/topo/TopoJson.java b/core/api/src/main/java/org/onosproject/ui/topo/TopoJson.java
index 653b0f9..13e131d 100644
--- a/core/api/src/main/java/org/onosproject/ui/topo/TopoJson.java
+++ b/core/api/src/main/java/org/onosproject/ui/topo/TopoJson.java
@@ -47,6 +47,7 @@
static final String TITLE = "title";
static final String TYPE = "type";
+ static final String NAV_PATH = "navPath";
static final String PROP_ORDER = "propOrder";
static final String PROPS = "props";
static final String BUTTONS = "buttons";
@@ -63,7 +64,8 @@
}
// non-instantiable
- private TopoJson() { }
+ private TopoJson() {
+ }
/**
* Returns a formatted message ready to send to the topology view
@@ -179,6 +181,10 @@
.put(TYPE, pp.typeId())
.put(ID, pp.id());
+ if (pp.navPath() != null) {
+ result.put(NAV_PATH, pp.navPath());
+ }
+
ObjectNode pnode = objectNode();
ArrayNode porder = arrayNode();
for (PropertyPanel.Prop p : pp.properties()) {