GUI -- Device View still had hardcoded sort params - fixed.
- Minor other cleanup of variable names.

Change-Id: I17b40fa087e653fecb49ded4feb7ff1932fb52e9
diff --git a/web/gui/src/main/webapp/app/fw/widget/table.js b/web/gui/src/main/webapp/app/fw/widget/table.js
index 3d2e8b9..2fc3277 100644
--- a/web/gui/src/main/webapp/app/fw/widget/table.js
+++ b/web/gui/src/main/webapp/app/fw/widget/table.js
@@ -166,8 +166,8 @@
                         if (thElem.attr('sortable') === '') {
                             updateSortingIcons(thElem, sortIconAPI);
                             scope.ctrlCallback({
-                                    urlSuffix: sortRequestParams()
-                                });
+                                requestParams: sortRequestParams()
+                            });
                         }
                     });
                 }
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 cff0845..c37f295 100644
--- a/web/gui/src/main/webapp/app/view/device/device.html
+++ b/web/gui/src/main/webapp/app/view/device/device.html
@@ -4,7 +4,7 @@
     <table class="summary-list"
            onos-fixed-header
            onos-sortable-header
-           sort-callback="sortCallback(urlSuffix)">
+           sort-callback="sortCallback(requestParams)">
         <thead>
             <tr>
                 <th colId="available"></th>
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 13601de..d7b3292 100644
--- a/web/gui/src/main/webapp/app/view/device/device.js
+++ b/web/gui/src/main/webapp/app/view/device/device.js
@@ -34,13 +34,8 @@
                 $scope.$apply();
             };
 
-            $scope.sortCallback = function (urlSuffix) {
-                // FIXME: fix hardcoded sort params
-                if (!urlSuffix) {
-                    urlSuffix = '';
-                }
-                var payload = { sortCol: 'id', sortDir: 'asc' };
-                wss.sendEvent('deviceDataRequest', payload);
+            $scope.sortCallback = function (requestParams) {
+                wss.sendEvent('deviceDataRequest', requestParams);
             };
 
             var handlers = {
@@ -53,9 +48,8 @@
                 wss.unbindHandlers(handlers);
             });
 
-            $log.log('OvDeviceCtrl has been created');
-
             $scope.sortCallback();
 
+            $log.log('OvDeviceCtrl has been created');
         }]);
 }());
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 722a92a..3e88f6d 100644
--- a/web/gui/src/main/webapp/app/view/host/host.html
+++ b/web/gui/src/main/webapp/app/view/host/host.html
@@ -4,7 +4,7 @@
     <table class="summary-list"
            onos-fixed-header
            onos-sortable-header
-           sort-callback="sortCallback(urlSuffix)">
+           sort-callback="sortCallback(requestParams)">
         <thead>
             <tr>
                 <th colId="id" sortable>Host ID </th>