Sha256: eb2f32a9fc7da2fff2d999afd227536d1f7552780f342eeafed2a432acf8fa77

Contents?: true

Size: 1.07 KB

Versions: 114

Compression:

Stored size: 1.07 KB

Contents

/**
 * @ngdoc object
 * @name  Bastion.tasks.controller:TaskDetailsController
 *
 * @requires $scope
 * @requires $rootScope
 * @requires Task
 *
 * @description
 *   Provides the functionality for the details of a task.
 */
angular.module('Bastion.tasks').controller('TaskDetailsController',
    ['$scope', '$rootScope', 'Task',
    function ($scope, $rootScope, Task) {
        var taskId;

        taskId = $scope.$stateParams.taskId;

        $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

114 entries across 114 versions & 1 rubygems

Version Path
katello-4.10.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-details.controller.js
katello-4.9.2 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-details.controller.js
katello-4.10.0.rc2 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-details.controller.js
katello-4.10.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-details.controller.js
katello-4.8.4 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-details.controller.js
katello-4.9.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-details.controller.js
katello-4.8.3 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-details.controller.js
katello-4.9.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-details.controller.js
katello-4.7.6 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-details.controller.js
katello-4.8.2 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-details.controller.js
katello-4.9.0.rc2 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-details.controller.js
katello-4.9.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-details.controller.js
katello-4.8.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-details.controller.js
katello-4.7.5 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-details.controller.js
katello-4.8.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-details.controller.js
katello-4.8.0.rc2 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-details.controller.js
katello-4.7.4 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-details.controller.js
katello-4.8.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-details.controller.js
katello-4.7.3 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-details.controller.js
katello-4.7.2 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-details.controller.js