Files
stf-DeviceFarmer/res/app/device-list/shell-controller.js

17 lines
388 B
JavaScript

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()
})
}
}