mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-20 12:55:26 +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:
16
res/app/device-list/shell-controller.js
Normal file
16
res/app/device-list/shell-controller.js
Normal file
@@ -0,0 +1,16 @@
|
||||
module.exports = function ShellCommandCtrl($scope) {
|
||||
$scope.results = []
|
||||
|
||||
$scope.run = function(command) {
|
||||
var cmd = $scope.control.shell(command)
|
||||
return cmd.promise
|
||||
.progressed(function(results) {
|
||||
$scope.results = results
|
||||
$scope.$digest()
|
||||
})
|
||||
.then(function(results) {
|
||||
$scope.results = results
|
||||
$scope.$digest()
|
||||
})
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user