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

Version Path
katello-4.14.2 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-details.controller.js
katello-4.15.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-details.controller.js
katello-4.15.0.rc2 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-details.controller.js
katello-4.15.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-details.controller.js
katello-4.14.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-details.controller.js
katello-4.14.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-details.controller.js
katello-4.14.0.rc3 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-details.controller.js
katello-4.14.0.rc2 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-details.controller.js
katello-4.14.0.rc1.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-details.controller.js
katello-4.14.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-details.controller.js
katello-4.13.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-details.controller.js
katello-4.13.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-details.controller.js
katello-4.12.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-details.controller.js
katello-4.13.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-details.controller.js
katello-4.12.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-details.controller.js
katello-4.12.0.rc3 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-details.controller.js
katello-4.12.0.rc2 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-details.controller.js
katello-4.12.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-details.controller.js
katello-4.11.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-details.controller.js
katello-4.11.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-details.controller.js