ONOS-1783 - GUI -- Refresh buttons for tabular views added. Minor table.js refactor.
Change-Id: Iee6c65fa8477b367e40a556c3c820ca454601a5f
diff --git a/web/gui/src/main/webapp/app/view/flow/flow.css b/web/gui/src/main/webapp/app/view/flow/flow.css
index 7a91837..ecbd217 100644
--- a/web/gui/src/main/webapp/app/view/flow/flow.css
+++ b/web/gui/src/main/webapp/app/view/flow/flow.css
@@ -18,6 +18,14 @@
ONOS GUI -- Flow View -- CSS file
*/
+#ov-flow h2 {
+ display: inline-block;
+}
+
+#ov-flow div.ctrl-btns {
+ width: 45px;
+}
+
.light #ov-flow tr:nth-child(6n + 2),
.light #ov-flow tr:nth-child(6n + 3),
.light #ov-flow tr:nth-child(6n + 4) {
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 40b6946..540ee9c 100644
--- a/web/gui/src/main/webapp/app/view/flow/flow.html
+++ b/web/gui/src/main/webapp/app/view/flow/flow.html
@@ -2,9 +2,14 @@
<div id="ov-flow">
<div class="tabular-header">
<h2>
- Flows for Device {{ctrl.devId || "none"}}
+ Flows for Device {{ctrl.devId || "(No device selected)"}}
({{ctrl.tableData.length}} total)
</h2>
+ <div class="ctrl-btns">
+ <div class="refresh active"
+ icon icon-size="36" icon-id="crown"
+ ng-click="refresh()"></div>
+ </div>
</div>
<table class="summary-list"
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 239ebda..bcd471b 100644
--- a/web/gui/src/main/webapp/app/view/flow/flow.js
+++ b/web/gui/src/main/webapp/app/view/flow/flow.js
@@ -22,19 +22,21 @@
'use strict';
// injected references
- var $log, $scope, $location, fs, tbs;
+ var $log, $scope, $location, fs, ts, tbs;
angular.module('ovFlow', [])
.controller('OvFlowCtrl',
- ['$log', '$scope', '$location', 'FnService', 'TableBuilderService',
+ ['$log', '$scope', '$location',
+ 'FnService', 'TableService', 'TableBuilderService',
- function (_$log_, _$scope_, _$location_, _fs_, _tbs_) {
+ function (_$log_, _$scope_, _$location_, _fs_, _ts_, _tbs_) {
var self = this,
params;
$log = _$log_;
$scope = _$scope_;
$location = _$location_;
fs = _fs_;
+ ts = _ts_;
tbs = _tbs_;
params = $location.search();
@@ -48,6 +50,12 @@
tag: 'flow',
query: params
});
+
+ $scope.refresh = function () {
+ $log.debug('Refreshing flows page');
+ ts.resetSortIcons();
+ $scope.sortCallback();
+ };
$log.log('OvFlowCtrl has been created');
}]);