GUI -- Device View still had hardcoded sort params - fixed.
- Minor other cleanup of variable names. Change-Id: I17b40fa087e653fecb49ded4feb7ff1932fb52e9
Showing
4 changed files
with
7 additions
and
13 deletions
... | @@ -166,8 +166,8 @@ | ... | @@ -166,8 +166,8 @@ |
166 | if (thElem.attr('sortable') === '') { | 166 | if (thElem.attr('sortable') === '') { |
167 | updateSortingIcons(thElem, sortIconAPI); | 167 | updateSortingIcons(thElem, sortIconAPI); |
168 | scope.ctrlCallback({ | 168 | scope.ctrlCallback({ |
169 | - urlSuffix: sortRequestParams() | 169 | + requestParams: sortRequestParams() |
170 | - }); | 170 | + }); |
171 | } | 171 | } |
172 | }); | 172 | }); |
173 | } | 173 | } | ... | ... |
... | @@ -4,7 +4,7 @@ | ... | @@ -4,7 +4,7 @@ |
4 | <table class="summary-list" | 4 | <table class="summary-list" |
5 | onos-fixed-header | 5 | onos-fixed-header |
6 | onos-sortable-header | 6 | onos-sortable-header |
7 | - sort-callback="sortCallback(urlSuffix)"> | 7 | + sort-callback="sortCallback(requestParams)"> |
8 | <thead> | 8 | <thead> |
9 | <tr> | 9 | <tr> |
10 | <th colId="available"></th> | 10 | <th colId="available"></th> | ... | ... |
... | @@ -34,13 +34,8 @@ | ... | @@ -34,13 +34,8 @@ |
34 | $scope.$apply(); | 34 | $scope.$apply(); |
35 | }; | 35 | }; |
36 | 36 | ||
37 | - $scope.sortCallback = function (urlSuffix) { | 37 | + $scope.sortCallback = function (requestParams) { |
38 | - // FIXME: fix hardcoded sort params | 38 | + wss.sendEvent('deviceDataRequest', requestParams); |
39 | - if (!urlSuffix) { | ||
40 | - urlSuffix = ''; | ||
41 | - } | ||
42 | - var payload = { sortCol: 'id', sortDir: 'asc' }; | ||
43 | - wss.sendEvent('deviceDataRequest', payload); | ||
44 | }; | 39 | }; |
45 | 40 | ||
46 | var handlers = { | 41 | var handlers = { |
... | @@ -53,9 +48,8 @@ | ... | @@ -53,9 +48,8 @@ |
53 | wss.unbindHandlers(handlers); | 48 | wss.unbindHandlers(handlers); |
54 | }); | 49 | }); |
55 | 50 | ||
56 | - $log.log('OvDeviceCtrl has been created'); | ||
57 | - | ||
58 | $scope.sortCallback(); | 51 | $scope.sortCallback(); |
59 | 52 | ||
53 | + $log.log('OvDeviceCtrl has been created'); | ||
60 | }]); | 54 | }]); |
61 | }()); | 55 | }()); | ... | ... |
... | @@ -4,7 +4,7 @@ | ... | @@ -4,7 +4,7 @@ |
4 | <table class="summary-list" | 4 | <table class="summary-list" |
5 | onos-fixed-header | 5 | onos-fixed-header |
6 | onos-sortable-header | 6 | onos-sortable-header |
7 | - sort-callback="sortCallback(urlSuffix)"> | 7 | + sort-callback="sortCallback(requestParams)"> |
8 | <thead> | 8 | <thead> |
9 | <tr> | 9 | <tr> |
10 | <th colId="id" sortable>Host ID </th> | 10 | <th colId="id" sortable>Host ID </th> | ... | ... |
-
Please register or login to post a comment