[ONOS-7907] Glyph specified for device not used in device table or device detail boxes

Change-Id: I87ed2926462627d12af401e45a734a8bfac59276
(cherry picked from commit 794d250740dcf2bdad65ad0f5ebe473d3093a266)
diff --git a/web/gui/src/main/java/org/onosproject/ui/impl/DeviceViewMessageHandler.java b/web/gui/src/main/java/org/onosproject/ui/impl/DeviceViewMessageHandler.java
index fa03537..7f6c253 100644
--- a/web/gui/src/main/java/org/onosproject/ui/impl/DeviceViewMessageHandler.java
+++ b/web/gui/src/main/java/org/onosproject/ui/impl/DeviceViewMessageHandler.java
@@ -128,6 +128,10 @@
     }
 
     private static String getTypeIconId(Device d) {
+        String uiType = d.annotations().value(AnnotationKeys.UI_TYPE);
+        if (uiType != null && !uiType.isEmpty()) {
+            return uiType;
+        }
         return DEV_ICON_PREFIX + d.type().toString();
     }
 
diff --git a/web/gui/src/main/webapp/app/fw/svg/icon.js b/web/gui/src/main/webapp/app/fw/svg/icon.js
index af61e52..b1fd371 100644
--- a/web/gui/src/main/webapp/app/fw/svg/icon.js
+++ b/web/gui/src/main/webapp/app/fw/svg/icon.js
@@ -151,7 +151,11 @@
     // svgClass is the CSS class used to identify the SVG layer.
     //      Defaults to 'embeddedIcon'.
     function loadIconByClass(div, iconCls, size, installGlyph, svgClass) {
-        loadIcon(div, glyphMapping[iconCls], size, installGlyph, svgClass);
+        if (glyphMapping[iconCls]) {
+            loadIcon(div, glyphMapping[iconCls], size, installGlyph, svgClass);
+        } else {
+            loadIcon(div, iconCls, size, installGlyph, svgClass);
+        }
         div.select('svg g').classed(iconCls, true);
     }