mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-20 06:53:39 +02:00
31 lines
620 B
JavaScript
31 lines
620 B
JavaScript
define(['./_module'], function(controllers) {
|
|
function DeviceListCtrl($scope, deviceService, groupService) {
|
|
$scope.devices = deviceService.devices
|
|
|
|
$scope.invite = function(device) {
|
|
groupService.invite({
|
|
serial: {
|
|
value: device.serial
|
|
, match: 'exact'
|
|
}
|
|
})
|
|
}
|
|
|
|
$scope.kick = function(device) {
|
|
groupService.kick({
|
|
serial: {
|
|
value: device.serial
|
|
, match: 'exact'
|
|
}
|
|
})
|
|
}
|
|
}
|
|
|
|
controllers.controller('DeviceListCtrl'
|
|
, [ '$scope'
|
|
, 'DeviceService'
|
|
, 'GroupService'
|
|
, DeviceListCtrl
|
|
])
|
|
})
|