[ONOS-7885] Adding Terminal_device device Type

Change-Id: I42a8f8aeef73e1d51d4b5128b9eb7e8879d0418c
diff --git a/web/gui/src/main/java/org/onosproject/ui/impl/TopologyViewMessageHandler.java b/web/gui/src/main/java/org/onosproject/ui/impl/TopologyViewMessageHandler.java
index 021e4e1..5f30bf8 100644
--- a/web/gui/src/main/java/org/onosproject/ui/impl/TopologyViewMessageHandler.java
+++ b/web/gui/src/main/java/org/onosproject/ui/impl/TopologyViewMessageHandler.java
@@ -775,14 +775,16 @@
         // Send optical first, others later for layered rendering
         for (Device device : services.device().getDevices()) {
             if ((device.type() == Device.Type.ROADM) ||
-                    (device.type() == Device.Type.OTN) || (device.type() == Device.Type.OLS)) {
+                    (device.type() == Device.Type.OTN) ||
+                    (device.type() == Device.Type.OLS) ||
+                    (device.type() == Device.Type.TERMINAL_DEVICE)) {
                 sendMessage(deviceMessage(new DeviceEvent(DEVICE_ADDED, device)));
             }
         }
         for (Device device : services.device().getDevices()) {
             if ((device.type() != Device.Type.ROADM) &&
                     (device.type() != Device.Type.OTN) && (device.type() != Device.Type.OLS) &&
-                    (device.type() != Device.Type.CONTROLLER)) {
+                    (device.type() != Device.Type.TERMINAL_DEVICE) && (device.type() != Device.Type.CONTROLLER)) {
                 sendMessage(deviceMessage(new DeviceEvent(DEVICE_ADDED, device)));
             }
         }
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 6f370b8..994f014 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
@@ -142,6 +142,7 @@
         DEVICE_GLYPHS.put(Device.Type.ROADM, "m_roadm");
         DEVICE_GLYPHS.put(Device.Type.OLS, "m_roadm");
         DEVICE_GLYPHS.put(Device.Type.OTN, "m_otn");
+        DEVICE_GLYPHS.put(Device.Type.TERMINAL_DEVICE, "m_otn");
         DEVICE_GLYPHS.put(Device.Type.ROADM_OTN, "m_roadm_otn");
         DEVICE_GLYPHS.put(Device.Type.BALANCER, "m_balancer");
         DEVICE_GLYPHS.put(Device.Type.IPS, "m_ips");
diff --git a/web/gui/src/main/webapp/app/view/topo/topoD3.js b/web/gui/src/main/webapp/app/view/topo/topoD3.js
index 15499a5..1b73fbf 100644
--- a/web/gui/src/main/webapp/app/view/topo/topoD3.js
+++ b/web/gui/src/main/webapp/app/view/topo/topoD3.js
@@ -74,6 +74,8 @@
         'switch': 'm_switch',
         roadm: 'm_roadm',
         otn: 'm_otn',
+        ols: 'm_roadm',
+        terminal_device: 'm_otn',
         roadm_otn: 'm_roadm_otn',
         fiber_switch: 'm_fiberSwitch',
         microwave: 'm_microwave',
diff --git a/web/gui/src/main/webapp/app/view/topo/topoFilter.js b/web/gui/src/main/webapp/app/view/topo/topoFilter.js
index b5a5283..5e4d43a 100644
--- a/web/gui/src/main/webapp/app/view/topo/topoFilter.js
+++ b/web/gui/src/main/webapp/app/view/topo/topoFilter.js
@@ -52,6 +52,9 @@
                 router: 'pkt',
                 roadm: 'opt',
                 otn: 'opt',
+                ols: 'opt',
+                terminal_device: 'opt',
+                roadm_otn: 'opt',
             },
             link: {
                 hostLink: 'pkt',