GUI -- Refactored DeviceTableRow to use abstract super class.
- added type and chassis ID to table data
Change-Id: I5758bfb3f9dcd659325265d734ffe9aa7ae1b0ad
diff --git a/web/gui/src/main/webapp/app/fw/svg/icon.js b/web/gui/src/main/webapp/app/fw/svg/icon.js
index e3f4bdb..51e47b9 100644
--- a/web/gui/src/main/webapp/app/fw/svg/icon.js
+++ b/web/gui/src/main/webapp/app/fw/svg/icon.js
@@ -31,6 +31,8 @@
var glyphMapping = {
deviceOnline: 'checkMark',
deviceOffline: 'xMark',
+ devIcon_SWITCH: 'switch',
+
tableColSortAsc: 'triangleUp',
tableColSortDesc: 'triangleDown',
tableColSortNone: '-'
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 6477018..3d950b8 100644
--- a/web/gui/src/main/webapp/app/fw/widget/table.js
+++ b/web/gui/src/main/webapp/app/fw/widget/table.js
@@ -83,7 +83,7 @@
// if the header has no text in it,
// then make the column the width of the td element.
// (This looks good for icons)
- if (!(thElement.html().length)) {
+ if (!(thElement.text().length)) {
var tdSize = tdElement.style('width');
thElement.style('width', tdSize + 'px');
tdElement.style('width', tdSize + 'px');
@@ -161,6 +161,7 @@
};
}])
+ // TODO: fix header alignment spacing
.directive('onosFixedHeader', ['$window', '$timeout',
'MastService', 'FnService',
function (_$window_, $timeout, mast, _fs_) {
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 2d8dd62..5eb1d32 100644
--- a/web/gui/src/main/webapp/app/view/device/device.html
+++ b/web/gui/src/main/webapp/app/view/device/device.html
@@ -1,6 +1,6 @@
<!-- Device partial HTML -->
<div id="ov-device">
- <h2>Devices</h2>
+ <h2>Devices ({{ctrl.deviceData.length}} total)</h2>
<table class="summary-list"
onos-fixed-header
ng-style="setTableHW()"
@@ -8,13 +8,15 @@
sort-callback="sortCallback(urlSuffix)">
<thead>
<tr>
- <th colId="available"></th>
- <th colId="id" sortable>Device ID</th>
- <th colId="mfr" sortable>Vendor</th>
- <th colId="hw" sortable>Hardware Version</th>
- <th colId="sw" sortable>Software Version</th>
- <th colId="serial" sortable>Serial Number</th>
- <th colId="protocol" sortable>Protocol</th>
+ <th colId="available">.</th>
+ <th colId="type">.</th>
+ <th colId="id" sortable>Device ID </th>
+ <th colId="mfr" sortable>Vendor </th>
+ <th colId="hw" sortable>H/W Version </th>
+ <th colId="sw" sortable>S/W Version </th>
+ <th colId="chassisid" sortable>Chassis ID </th>
+ <th colId="serial" sortable>Serial # </th>
+ <th colId="protocol" sortable>Protocol </th>
</tr>
</thead>
@@ -22,10 +24,12 @@
<tr ng-repeat="dev in ctrl.deviceData"
ng-repeat-done>
<td><div icon icon-id="{{dev._iconid_available}}"></div></td>
+ <td><div icon icon-id="{{dev._iconid_type}}"></div></td>
<td>{{dev.id}}</td>
<td>{{dev.mfr}}</td>
<td>{{dev.hw}}</td>
<td>{{dev.sw}}</td>
+ <td>{{dev.chassisid}}</td>
<td>{{dev.serial}}</td>
<td>{{dev.protocol}}</td>
</tr>