mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-19 00:23:25 +02:00
Initial version of transactions. Shell command implemented as an example. Still needs channel cleanup on app side, handling a device dying in the middle of a transaction, and getting device list back to normal.
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
module.exports = function DeviceControlCtrl($scope, $routeParams, DeviceService, ControlService) {
|
||||
$scope.device = null
|
||||
$scope.control = null
|
||||
|
||||
$scope.promiseOfDevice = DeviceService.get($routeParams.serial)
|
||||
.then(function (device) {
|
||||
$scope.device = device
|
||||
$scope.control = ControlService.forChannel(device.channel)
|
||||
return device
|
||||
})
|
||||
}
|
||||
$scope.device = {
|
||||
promise: DeviceService.get($routeParams.serial)
|
||||
.then(function(device) {
|
||||
$scope.device.value = device
|
||||
$scope.control = ControlService.forOne(device, device.channel)
|
||||
return device
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user