Committed by
Gerrit Code Review
ONOS-2849: Pre-populate sort so active apps are at the top of the list.
Change-Id: Id21025d5130ee156225fcd367d9ff0680781a930
Showing
2 changed files
with
8 additions
and
3 deletions
| ... | @@ -54,7 +54,7 @@ | ... | @@ -54,7 +54,7 @@ |
| 54 | 54 | ||
| 55 | o.scope.tableData = []; | 55 | o.scope.tableData = []; |
| 56 | o.scope.changedData = []; | 56 | o.scope.changedData = []; |
| 57 | - o.scope.sortParams = {}; | 57 | + o.scope.sortParams = o.sortParams || {}; |
| 58 | o.scope.autoRefresh = true; | 58 | o.scope.autoRefresh = true; |
| 59 | o.scope.autoRefreshTip = 'Toggle auto refresh'; | 59 | o.scope.autoRefreshTip = 'Toggle auto refresh'; |
| 60 | 60 | ||
| ... | @@ -149,7 +149,7 @@ | ... | @@ -149,7 +149,7 @@ |
| 149 | cancelTardy(); | 149 | cancelTardy(); |
| 150 | }); | 150 | }); |
| 151 | 151 | ||
| 152 | - sortCb(); | 152 | + sortCb(o.scope.sortParams); |
| 153 | startRefresh(); | 153 | startRefresh(); |
| 154 | } | 154 | } |
| 155 | 155 | ... | ... |
| ... | @@ -68,7 +68,12 @@ | ... | @@ -68,7 +68,12 @@ |
| 68 | scope: $scope, | 68 | scope: $scope, |
| 69 | tag: 'app', | 69 | tag: 'app', |
| 70 | selCb: selCb, | 70 | selCb: selCb, |
| 71 | - respCb: refreshCtrls | 71 | + respCb: refreshCtrls, |
| 72 | + // pre-populate sort so active apps are at the top of the list | ||
| 73 | + sortParams: { | ||
| 74 | + sortCol: 'state', | ||
| 75 | + sortDir: 'desc' | ||
| 76 | + } | ||
| 72 | }); | 77 | }); |
| 73 | 78 | ||
| 74 | // TODO: reexamine where keybindings should be - directive or controller? | 79 | // TODO: reexamine where keybindings should be - directive or controller? | ... | ... |
-
Please register or login to post a comment