GUI -- Directive for tooltips on icon elements created. Control buttons on table views now have tooltips.

Change-Id: I77d73efa25bfc3adeb5519d5ca087475f5523c7d
diff --git a/web/gui/src/main/webapp/app/view/app/app.html b/web/gui/src/main/webapp/app/view/app/app.html
index 8bfd202..9df05b8 100644
--- a/web/gui/src/main/webapp/app/view/app/app.html
+++ b/web/gui/src/main/webapp/app/view/app/app.html
@@ -5,6 +5,7 @@
         <div class="ctrl-btns">
             <div class="refresh" ng-class="{active: autoRefresh}"
                  icon icon-size="36" icon-id="refresh"
+                 tooltip tt-msg="autoRefreshTip"
                  ng-click="toggleRefresh()"></div>
             <div class="separator"></div>
 
@@ -14,18 +15,22 @@
                        file-model="appFile">
             </form>
             <div icon icon-size="36" icon-id="plus"
-                 class="active" trigger-form>
+                 class="active" trigger-form
+                 tooltip tt-msg="uploadTip">
             </div>
             <div icon icon-size="36" icon-id="play"
                  ng-click="appAction('activate')"
+                 tooltip tt-msg="activateTip"
                  ng-class="{active: ctrlBtnState.installed}">
             </div>
             <div icon icon-size="36" icon-id="stop"
                  ng-click="appAction('deactivate')"
+                 tooltip tt-msg="deactivateTip"
                  ng-class="{active: ctrlBtnState.active}">
             </div>
             <div icon icon-size="36" icon-id="garbage"
                  ng-click="appAction('uninstall')"
+                 tooltip tt-msg="uninstallTip"
                  ng-class="{active: ctrlBtnState.selection}">
             </div>
         </div>
diff --git a/web/gui/src/main/webapp/app/view/app/app.js b/web/gui/src/main/webapp/app/view/app/app.js
index 55ccd94..c5a7961 100644
--- a/web/gui/src/main/webapp/app/view/app/app.js
+++ b/web/gui/src/main/webapp/app/view/app/app.js
@@ -34,6 +34,10 @@
 
     function ($log, $scope, $http, fs, tbs, wss, ufs) {
         $scope.ctrlBtnState = {};
+        $scope.uploadTip = 'Upload an application';
+        $scope.activateTip = 'Activate selected application';
+        $scope.deactivateTip = 'Deactivate selected application';
+        $scope.uninstallTip = 'Uninstall selected application';
 
         function selCb($event, row) {
             // selId comes from tableBuilder
diff --git a/web/gui/src/main/webapp/app/view/cluster/cluster.html b/web/gui/src/main/webapp/app/view/cluster/cluster.html
index e1db4ee..d51bb43 100644
--- a/web/gui/src/main/webapp/app/view/cluster/cluster.html
+++ b/web/gui/src/main/webapp/app/view/cluster/cluster.html
@@ -21,6 +21,7 @@
         <div class="ctrl-btns">
             <div class="refresh" ng-class="{active: autoRefresh}"
                  icon icon-size="36" icon-id="refresh"
+                 tooltip tt-msg="autoRefreshTip"
                  ng-click="toggleRefresh()"></div>
         </div>
     </div>
diff --git a/web/gui/src/main/webapp/app/view/device/device.html b/web/gui/src/main/webapp/app/view/device/device.html
index 4a63519..b9adfea 100644
--- a/web/gui/src/main/webapp/app/view/device/device.html
+++ b/web/gui/src/main/webapp/app/view/device/device.html
@@ -5,19 +5,23 @@
         <div class="ctrl-btns">
             <div class="refresh" ng-class="{active: autoRefresh}"
                  icon icon-id="refresh" icon-size="36"
+                 tooltip tt-msg="autoRefreshTip"
                  ng-click="toggleRefresh()"></div>
             <div class="separator"></div>
 
             <div ng-class="{active: !!selId}"
                  icon icon-id="flowTable" icon-size="36"
+                 tooltip tt-msg="flowTip"
                  ng-click="nav('flow')"></div>
 
             <div ng-class="{active: !!selId}"
                  icon icon-id="portTable" icon-size="36"
+                 tooltip tt-msg="portTip"
                  ng-click="nav('port')"></div>
 
             <div ng-class="{active: !!selId}"
                  icon icon-id="groupTable" icon-size="36"
+                 tooltip tt-msg="groupTip"
                  ng-click="nav('group')"></div>
         </div>
     </div>
diff --git a/web/gui/src/main/webapp/app/view/device/device.js b/web/gui/src/main/webapp/app/view/device/device.js
index baf1e96..1f8f1cfb 100644
--- a/web/gui/src/main/webapp/app/view/device/device.js
+++ b/web/gui/src/main/webapp/app/view/device/device.js
@@ -203,6 +203,9 @@
             ns = _ns_;
             var handlers = {};
             $scope.panelData = [];
+            $scope.flowTip = 'Show flow view for selected device';
+            $scope.portTip = 'Show port view for selected device';
+            $scope.groupTip = 'Show group view for selected device';
 
             function selCb($event, row) {
                 selRow = angular.element($event.currentTarget);
diff --git a/web/gui/src/main/webapp/app/view/flow/flow.html b/web/gui/src/main/webapp/app/view/flow/flow.html
index da22520..2003698 100644
--- a/web/gui/src/main/webapp/app/view/flow/flow.html
+++ b/web/gui/src/main/webapp/app/view/flow/flow.html
@@ -8,6 +8,7 @@
         <div class="ctrl-btns">
             <div class="refresh" ng-class="{active: autoRefresh}"
                  icon icon-size="36" icon-id="refresh"
+                 tooltip tt-msg="autoRefreshTip"
                  ng-click="toggleRefresh()"></div>
 
             <div class="separator"></div>
@@ -17,10 +18,12 @@
 
             <div class="active"
                  icon icon-id="portTable" icon-size="36"
+                 tooltip tt-msg="portTip"
                  ng-click="nav('port')"></div>
 
             <div class="active"
                  icon icon-id="groupTable" icon-size="36"
+                 tooltip tt-msg="groupTip"
                  ng-click="nav('group')"></div>
         </div>
     </div>
diff --git a/web/gui/src/main/webapp/app/view/flow/flow.js b/web/gui/src/main/webapp/app/view/flow/flow.js
index b9ef0fb..15678d5 100644
--- a/web/gui/src/main/webapp/app/view/flow/flow.js
+++ b/web/gui/src/main/webapp/app/view/flow/flow.js
@@ -37,6 +37,8 @@
             fs = _fs_;
             tbs = _tbs_;
             ns = _ns_;
+            $scope.portTip = 'Show port view for this device';
+            $scope.groupTip = 'Show group view for this device';
 
             params = $location.search();
             if (params.hasOwnProperty('devId')) {
diff --git a/web/gui/src/main/webapp/app/view/group/group.html b/web/gui/src/main/webapp/app/view/group/group.html
index 2b09b94..d5811fb 100644
--- a/web/gui/src/main/webapp/app/view/group/group.html
+++ b/web/gui/src/main/webapp/app/view/group/group.html
@@ -24,16 +24,19 @@
         <div class="ctrl-btns">
             <div class="refresh" ng-class="{active: autoRefresh}"
                  icon icon-size="36" icon-id="refresh"
+                 tooltip tt-msg="autoRefreshTip"
                  ng-click="toggleRefresh()"></div>
 
             <div class="separator"></div>
 
             <div class="active"
                  icon icon-id="flowTable" icon-size="36"
+                 tooltip tt-msg="flowTip"
                  ng-click="nav('flow')"></div>
 
             <div class="active"
                  icon icon-id="portTable" icon-size="36"
+                 tooltip tt-msg="portTip"
                  ng-click="nav('port')"></div>
 
             <div class="current-view"
diff --git a/web/gui/src/main/webapp/app/view/group/group.js b/web/gui/src/main/webapp/app/view/group/group.js
index b8f4d45..2510190 100644
--- a/web/gui/src/main/webapp/app/view/group/group.js
+++ b/web/gui/src/main/webapp/app/view/group/group.js
@@ -37,6 +37,8 @@
             fs = _fs_;
             tbs = _tbs_;
             ns = _ns_;
+            $scope.flowTip = 'Show flow view for this device';
+            $scope.portTip = 'Show port view for this device';
 
             params = $location.search();
             if (params.hasOwnProperty('devId')) {
diff --git a/web/gui/src/main/webapp/app/view/host/host.html b/web/gui/src/main/webapp/app/view/host/host.html
index 0baeccd..c5f98e7 100644
--- a/web/gui/src/main/webapp/app/view/host/host.html
+++ b/web/gui/src/main/webapp/app/view/host/host.html
@@ -5,6 +5,7 @@
         <div class="ctrl-btns">
             <div class="refresh" ng-class="{active: autoRefresh}"
                  icon icon-size="36" icon-id="refresh"
+                 tooltip tt-msg="autoRefreshTip"
                  ng-click="toggleRefresh()"></div>
         </div>
     </div>
diff --git a/web/gui/src/main/webapp/app/view/intent/intent.html b/web/gui/src/main/webapp/app/view/intent/intent.html
index 9c754fd..c065285 100644
--- a/web/gui/src/main/webapp/app/view/intent/intent.html
+++ b/web/gui/src/main/webapp/app/view/intent/intent.html
@@ -21,6 +21,7 @@
         <div class="ctrl-btns">
             <div class="refresh" ng-class="{active: autoRefresh}"
                  icon icon-size="36" icon-id="refresh"
+                 tooltip tt-msg="autoRefreshTip"
                  ng-click="toggleRefresh()"></div>
         </div>
     </div>
diff --git a/web/gui/src/main/webapp/app/view/link/link.html b/web/gui/src/main/webapp/app/view/link/link.html
index 1431772..595a1f7 100644
--- a/web/gui/src/main/webapp/app/view/link/link.html
+++ b/web/gui/src/main/webapp/app/view/link/link.html
@@ -21,6 +21,7 @@
         <div class="ctrl-btns">
             <div class="refresh" ng-class="{active: autoRefresh}"
                  icon icon-size="36" icon-id="refresh"
+                 tooltip tt-msg="autoRefreshTip"
                  ng-click="toggleRefresh()"></div>
         </div>
     </div>
diff --git a/web/gui/src/main/webapp/app/view/port/port.html b/web/gui/src/main/webapp/app/view/port/port.html
index 326aebb..ebf5311 100644
--- a/web/gui/src/main/webapp/app/view/port/port.html
+++ b/web/gui/src/main/webapp/app/view/port/port.html
@@ -24,12 +24,14 @@
         <div class="ctrl-btns">
             <div class="refresh" ng-class="{active: autoRefresh}"
                  icon icon-size="36" icon-id="refresh"
+                 tooltip tt-msg="autoRefreshTip"
                  ng-click="toggleRefresh()"></div>
 
             <div class="separator"></div>
 
             <div class="active"
                  icon icon-id="flowTable" icon-size="36"
+                 tooltip tt-msg="flowTip"
                  ng-click="nav('flow')"></div>
 
             <div class="current-view"
@@ -37,6 +39,7 @@
 
             <div class="active"
                  icon icon-id="groupTable" icon-size="36"
+                 tooltip tt-msg="groupTip"
                  ng-click="nav('group')"></div>
         </div>
     </div>
diff --git a/web/gui/src/main/webapp/app/view/port/port.js b/web/gui/src/main/webapp/app/view/port/port.js
index 9cb8a04..a157c5b 100644
--- a/web/gui/src/main/webapp/app/view/port/port.js
+++ b/web/gui/src/main/webapp/app/view/port/port.js
@@ -37,6 +37,8 @@
             fs = _fs_;
             tbs = _tbs_;
             ns = _ns_;
+            $scope.flowTip = 'Show flow view for this device';
+            $scope.groupTip = 'Show group view for this device';
 
             params = $location.search();
             if (params.hasOwnProperty('devId')) {
diff --git a/web/gui/src/main/webapp/app/view/settings/settings.html b/web/gui/src/main/webapp/app/view/settings/settings.html
index c5d87ba..ae909cd 100644
--- a/web/gui/src/main/webapp/app/view/settings/settings.html
+++ b/web/gui/src/main/webapp/app/view/settings/settings.html
@@ -5,6 +5,7 @@
         <div class="ctrl-btns">
             <div class="refresh" ng-class="{active: autoRefresh}"
                  icon icon-size="36" icon-id="refresh"
+                 tooltip tt-msg="autoRefreshTip"
                  ng-click="toggleRefresh()"></div>
         </div>
     </div>