ONOS-1479 -- GUI - augmenting topology view for extensibility:
- Implemented server-side topo panel button descriptors, with overlay ability to remove core buttons and add custom buttons.
Change-Id: Id9ecc4c5e2d2db942232d2156ecf3bc858c0c61f
diff --git a/core/api/src/main/java/org/onosproject/ui/topo/TopoConstants.java b/core/api/src/main/java/org/onosproject/ui/topo/TopoConstants.java
index d44ba9f..a48c253 100644
--- a/core/api/src/main/java/org/onosproject/ui/topo/TopoConstants.java
+++ b/core/api/src/main/java/org/onosproject/ui/topo/TopoConstants.java
@@ -79,6 +79,8 @@
* details panels.
*/
public static final class Properties {
+ public static final String SEPARATOR = "-";
+
// summary panel
public static final String DEVICES = "Devices";
public static final String LINKS = "Links";
@@ -106,4 +108,30 @@
public static final String VLAN = "VLAN";
}
+ private static final class CoreButton extends ButtonDescriptor {
+ private CoreButton(String tag, String glyphId, boolean extra) {
+ super("show" + tag + "View",
+ glyphId,
+ "Show " + tag + " View" + (extra ? " for this Device" : ""));
+ }
+ }
+
+ /**
+ * Defines constants for core buttons that appear on the topology
+ * details panel.
+ */
+ public static final class CoreButtons {
+ public static final ButtonDescriptor SHOW_DEVICE_VIEW =
+ new CoreButton("Device", Glyphs.SWITCH, false);
+
+ public static final ButtonDescriptor SHOW_FLOW_VIEW =
+ new CoreButton("Flow", Glyphs.FLOW_TABLE, true);
+
+ public static final ButtonDescriptor SHOW_PORT_VIEW =
+ new CoreButton("Port", Glyphs.PORT_TABLE, true);
+
+ public static final ButtonDescriptor SHOW_GROUP_VIEW =
+ new CoreButton("Group", Glyphs.GROUP_TABLE, true);
+ }
+
}