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/device/device.css b/web/gui/src/main/webapp/app/view/device/device.css
index a0894bb..9a1a1c8 100644
--- a/web/gui/src/main/webapp/app/view/device/device.css
+++ b/web/gui/src/main/webapp/app/view/device/device.css
@@ -18,6 +18,14 @@
ONOS GUI -- Device View -- CSS file
*/
+#ov-device h2 {
+ display: inline-block;
+}
+
+#ov-device div.ctrl-btns {
+ width: 45px;
+}
+
/* More in generic panel.css */
#device-details-panel.floatpanel {
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 d68dbed..7fad0ad 100644
--- a/web/gui/src/main/webapp/app/view/device/device.html
+++ b/web/gui/src/main/webapp/app/view/device/device.html
@@ -2,6 +2,11 @@
<div id="ov-device">
<div class="tabular-header">
<h2>Devices ({{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/device/device.js b/web/gui/src/main/webapp/app/view/device/device.js
index c600e89..38953d7 100644
--- a/web/gui/src/main/webapp/app/view/device/device.js
+++ b/web/gui/src/main/webapp/app/view/device/device.js
@@ -203,12 +203,12 @@
angular.module('ovDevice', [])
.controller('OvDeviceCtrl',
- ['$log', '$scope', 'TableBuilderService', 'FnService',
+ ['$log', '$scope', 'TableService', 'TableBuilderService', 'FnService',
'MastService', 'PanelService', 'WebSocketService', 'IconService',
'ButtonService', 'NavService', 'TooltipService',
function (_$log_, _$scope_,
- tbs, _fs_, _mast_, _ps_, _wss_, _is_, _bns_, _ns_, _ttip_) {
+ ts, tbs, _fs_, _mast_, _ps_, _wss_, _is_, _bns_, _ns_, _ttip_) {
$log = _$log_;
$scope = _$scope_;
fs = _fs_;
@@ -243,6 +243,12 @@
tag: 'device',
selCb: selCb
});
+
+ $scope.refresh = function () {
+ $log.debug('Refreshing devices page');
+ ts.resetSortIcons();
+ $scope.sortCallback();
+ };
createDetailsPane();
// details panel handlers