Simon Hunt

GUI -- Empty table now has a "no items found" row, and table width set to track window width.

Change-Id: I32d3403926fe3c3686fc0219b4880dcb15888e61
......@@ -30,6 +30,11 @@ table.summary-list tbody {
border-radius: 0 0 8px 8px;
}
table.summary-list td.nodata {
text-align: center;
font-style: italic;
}
.light table.summary-list tr:nth-child(even) {
background-color: #ddd;
}
......
......@@ -167,9 +167,13 @@
w: window.innerWidth
};
}, function (newVal) {
var wsz = fs.windowSize(0, 30);
scope.windowHeight = newVal.h;
scope.windowWidth = newVal.w;
// default table size in case no data elements
table.style('width', wsz.width + 'px');
scope.$on('LastElement', function () {
// only adjust the table once it's completely loaded
fixTable(table, thead, tbody);
......
......@@ -21,6 +21,12 @@
</thead>
<tbody>
<tr ng-hide="ctrl.tableData.length">
<td class="nodata" colspan="10">
No Devices found
</td>
</tr>
<tr ng-repeat="dev in ctrl.tableData"
ng-repeat-done>
<td class="table-icon">
......
......@@ -17,17 +17,23 @@
</thead>
<tbody>
<tr ng-repeat="host in ctrl.tableData"
ng-repeat-done>
<td class="table-icon">
<div icon icon-id="{{host._iconid_type}}"></div>
</td>
<td>{{host.id}}</td>
<td>{{host.mac}}</td>
<td>{{host.vlan}}</td>
<td>{{host.ips}}</td>
<td>{{host.location}}</td>
</tr>
<tr ng-hide="ctrl.tableData.length">
<td class="nodata" colspan="6">
No Hosts found
</td>
</tr>
<tr ng-repeat="host in ctrl.tableData"
ng-repeat-done>
<td class="table-icon">
<div icon icon-id="{{host._iconid_type}}"></div>
</td>
<td>{{host.id}}</td>
<td>{{host.mac}}</td>
<td>{{host.vlan}}</td>
<td>{{host.ips}}</td>
<td>{{host.location}}</td>
</tr>
</tbody>
</table>
......
......@@ -31,18 +31,24 @@
</thead>
<tbody>
<tr ng-repeat-start="intent in ctrl.tableData">
<td>{{intent.appId}}</td>
<td>{{intent.key}}</td>
<td>{{intent.type}}</td>
<td>{{intent.priority}}</td>
</tr>
<tr>
<td class="resources" colspan="4">{{intent.resources}}</td>
</tr>
<tr ng-repeat-end ng-repeat-done>
<td class="details" colspan="4">{{intent.details}}</td>
</tr>
<tr ng-hide="ctrl.tableData.length">
<td class="nodata" colspan="4">
No Intents found
</td>
</tr>
<tr ng-repeat-start="intent in ctrl.tableData">
<td>{{intent.appId}}</td>
<td>{{intent.key}}</td>
<td>{{intent.type}}</td>
<td>{{intent.priority}}</td>
</tr>
<tr>
<td class="resources" colspan="4">{{intent.resources}}</td>
</tr>
<tr ng-repeat-end ng-repeat-done>
<td class="details" colspan="4">{{intent.details}}</td>
</tr>
</tbody>
</table>
......