mirror of
https://github.com/openstf/stf
synced 2025-10-05 10:39:25 +02:00
Hide offline devices.
This commit is contained in:
parent
36f62f3276
commit
6dda78884e
2 changed files with 5 additions and 4 deletions
|
@ -1,4 +1,4 @@
|
|||
module.exports = function DeviceListCtrlDetails($scope, DeviceService, GroupService, ControlService, ngTableParams, SettingsService, $filter, $location, gettext, $q) {
|
||||
module.exports = function DeviceListCtrlDetails($scope, DeviceService, GroupService, ControlService, ngTableParams, SettingsService, $filter, $location, gettext, $q, $filter) {
|
||||
|
||||
// TODO: this is not working, why?
|
||||
$scope.filterEnabled = false
|
||||
|
@ -11,7 +11,7 @@ module.exports = function DeviceListCtrlDetails($scope, DeviceService, GroupServ
|
|||
$scope.statusFilter = function () {
|
||||
var def = $q.defer()
|
||||
var statuses = [
|
||||
{ id: true, title: gettext('Available')
|
||||
{ id: true, title: $filter('translate')(gettext('Available'))
|
||||
}
|
||||
,
|
||||
{ id: false, title: gettext('N/A')
|
||||
|
|
|
@ -43,7 +43,7 @@ div.stf-device-list
|
|||
.line
|
||||
ul.devices-icon-view
|
||||
li(ng-repeat='device in tracker.devices | filter:{usable:false} | filter:{name:deviceSearch} | orderBy:"name" track by device.serial',
|
||||
ng-disabled='true',
|
||||
ng-disabled='true', ng-show='device.state == "busy"'
|
||||
).cursor-select.pointer.thumbnail.device-is-busy
|
||||
.device-photo-small
|
||||
img(ng-src='/static/devices/icon/x120/{{ device.image || "_default.jpg" }}')
|
||||
|
@ -87,7 +87,8 @@ div.stf-device-list
|
|||
span {{ device[column.field] }}
|
||||
|
||||
table.table.table-hover.dataTable(ng-table='tableParams', show-filter='filterEnabled', ng-show='tracker.devices.length').device-list-details
|
||||
tr(ng-repeat='device in $data', ng-class='{ "device-not-usable": !device.usable }')
|
||||
tr(ng-repeat='device in $data', ng-class='{ "device-not-usable": !device.usable }',
|
||||
ng-show='device.usable || device.state == "busy"')
|
||||
|
||||
td(data-title="'Status'|translate", sortable='"stateSorting"', filter="{ 'usable': 'select' }", filter-data="statusFilter($column)")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue