Topo2: Key Command 'M' to show and hide offline devices
JIRA Tasks; ONOS-5381

Change-Id: Iab3a837a9bb05a334460e6b9222473bc8bc6b5c5
diff --git a/web/gui/src/main/webapp/app/view/topo2/topo2KeyCommands.js b/web/gui/src/main/webapp/app/view/topo2/topo2KeyCommands.js
index 8dab3ce..a9c9c1c 100644
--- a/web/gui/src/main/webapp/app/view/topo2/topo2KeyCommands.js
+++ b/web/gui/src/main/webapp/app/view/topo2/topo2KeyCommands.js
@@ -33,6 +33,7 @@
             X: [resetNodeLocation, 'Reset Node Location'],
             U: [unpinNode, 'Unpin node (mouse over)'],
             H: [toggleHosts, 'Toggle host visibility'],
+            M: [toggleOfflineDevices, 'Toggle offline visibility'],
             dot: [toggleToolbar, 'Toggle Toolbar'],
 
             esc: handleEscape,
@@ -146,8 +147,18 @@
         t2tbs.toggle();
     }
 
+    function actionedFlashed(action, message) {
+        flash.flash(action + ' ' + message);
+    }
+
     function toggleHosts() {
-        t2rs.toggleHosts();
+        var on = t2rs.toggleHosts();
+        actionedFlashed(on ? 'Show': 'Hide', 'Hosts')
+    }
+
+    function toggleOfflineDevices() {
+        var on = t2rs.toggleOfflineDevices();
+        actionedFlashed(on ? 'Show': 'Hide', 'offline devices')
     }
 
     function notValid(what) {