Skip to content

Commit

Permalink
Merge pull request #342 from hashmapinc/Tempus-336
Browse files Browse the repository at this point in the history
Tempus 336
  • Loading branch information
cherrera2001 authored May 16, 2018
2 parents b25ddeb + 8618f80 commit a9ca244
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
8 changes: 7 additions & 1 deletion ui/src/app/device/device.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -368,8 +368,14 @@ export function DeviceController($rootScope,userService, deviceService, customer


if ($scope.query.search != null) {
deviceSortList = $filter('filter')(items.data, {name: $scope.query.search});

deviceSortList = $filter('filter')(items.data, function(data) {
if ($scope.query.search) {
return data.name.toLowerCase().indexOf($scope.query.search.toLowerCase()) > -1 || data.type.toLowerCase().indexOf($scope.query.search.toLowerCase()) > -1;
} else {
return true;
}
});
}

var startIndex = $scope.query.limit * ($scope.query.page - 1);
Expand Down
8 changes: 4 additions & 4 deletions ui/src/app/device/devices.tpl.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,11 @@
<thead md-head md-order="query.order" md-on-reorder="onReorder">
<tr md-row>
<th md-column md-order-by="name"><span translate>Name</span></th>
<th md-column md-order-by="name"><span translate>Type</span></th>
<th md-column md-order-by="createdTime"><span translate>Description</span></th>
<th md-column md-order-by="createdTime"><span translate>Status</span></th>
<th md-column md-order-by="type"><span translate>Type</span></th>
<th md-column><span translate>Description</span></th>
<th md-column><span translate>Status</span></th>
<th md-column><span translate>Age</span></th>
<th md-column md-order-by="createdTime"><span translate>Last Time Received</span></th>
<th md-column><span translate>Last Time Received</span></th>

</tr>
</thead>
Expand Down

0 comments on commit a9ca244

Please sign in to comment.