mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-22 22:05:21 +02:00
32 lines
657 B
JavaScript
32 lines
657 B
JavaScript
module.exports = function LogsCtrl($scope, LogcatService) {
|
|
|
|
var filters = []
|
|
|
|
$scope.logEntries = LogcatService.entries
|
|
|
|
$scope.filters = LogcatService.filters
|
|
|
|
$scope.started = LogcatService.started
|
|
|
|
$scope.$watch('started', function (newValue, oldValue) {
|
|
if (newValue !== oldValue) {
|
|
LogcatService.started = newValue
|
|
if (newValue) {
|
|
$scope.control.startLogcat(filters).then(function (result) {
|
|
})
|
|
} else {
|
|
$scope.control.stopLogcat()
|
|
}
|
|
}
|
|
})
|
|
|
|
$scope.$on('$destroy', function () {
|
|
// $scope.control.stopLogcat()
|
|
})
|
|
|
|
$scope.clear = function () {
|
|
LogcatService.clear()
|
|
}
|
|
|
|
}
|