Sha256: 918b2f6634c5ce3a20c878e4893b96155f9edf6065cbe27db4c1f5516c9e71b1
Contents?: true
Size: 1.22 KB
Versions: 22
Compression:
Stored size: 1.22 KB
Contents
/** * @ngdoc object * @name Bastion.tasks.controller:TaskDetailsController * * @requires $scope * @requires $rootScope * @requires Task * @requires translate * * @description * Provides the functionality for the details of a task. */ angular.module('Bastion.tasks').controller('TaskDetailsController', ['$scope', '$rootScope', 'Task', 'translate', function ($scope, $rootScope, Task, translate) { var taskId; taskId = $scope.$stateParams.taskId; // Labels so breadcrumb strings can be translated $scope.label = translate('Bulk Task'); $scope.unregisterSearch = function () { Task.unregisterSearch($scope.searchId); $scope.searchId = undefined; }; $scope.updateTask = function (task) { $scope.task = task; if (!$scope.task.pending) { $rootScope.$broadcast('TaskFinished', $scope.task); $scope.unregisterSearch(); } }; $scope.isArray = _.isArray; $scope.$on('$destroy', function () { $scope.unregisterSearch(); }); $scope.searchId = Task.registerSearch({ 'type': 'task', 'task_id': taskId }, $scope.updateTask); } ]);
Version data entries
22 entries across 22 versions & 1 rubygems