mirror of
https://github.com/openstf/stf
synced 2025-10-04 02:09:32 +02:00
16 lines
388 B
JavaScript
16 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()
|
|
})
|
|
}
|
|
}
|