GUI Changed lookup of GlyphId to check uiType first
Change-Id: Iff62806df8882d91d068223b34ca35e8c00b4c86
(cherry picked from commit ddb972d11474a46a0f388b4b746f5ae3cfa403a8)
diff --git a/web/gui/src/main/java/org/onosproject/ui/impl/TopologyViewMessageHandlerBase.java b/web/gui/src/main/java/org/onosproject/ui/impl/TopologyViewMessageHandlerBase.java
index 08311ed..455e42d 100644
--- a/web/gui/src/main/java/org/onosproject/ui/impl/TopologyViewMessageHandlerBase.java
+++ b/web/gui/src/main/java/org/onosproject/ui/impl/TopologyViewMessageHandlerBase.java
@@ -71,6 +71,7 @@
import static com.google.common.base.Strings.isNullOrEmpty;
import static org.onosproject.net.AnnotationKeys.DRIVER;
+import static org.onosproject.net.AnnotationKeys.UI_TYPE;
import static org.onosproject.net.PortNumber.portNumber;
import static org.onosproject.net.config.basics.BasicElementConfig.LOC_TYPE_GEO;
import static org.onosproject.net.config.basics.BasicElementConfig.LOC_TYPE_GRID;
@@ -441,7 +442,12 @@
// Create models of the data to return, that overlays can adjust / augment
private String lookupGlyph(Device device) {
- return DEVICE_GLYPHS.get(device.type());
+ String uiType = device.annotations().value(UI_TYPE);
+ if (uiType != null && !uiType.equalsIgnoreCase("undefined")) {
+ return uiType;
+ } else {
+ return DEVICE_GLYPHS.get(device.type());
+ }
}