Sha256: 90873bc7f048d02a56ed85ddb1608f8a7474d47ac26d5eeec747bf68d98ccd44

Contents?: true

Size: 1.6 KB

Versions: 155

Compression:

Stored size: 1.6 KB

Contents

/**
 * @ngdoc object
 * @name  Bastion.errata.controller:ErratumController
 *
 * @requires $scope
 * @requires Errata
 * @requires ApiErrorHandler
 *
 * @description
 *   Provides the functionality for the errata pages.
 */
angular.module('Bastion.errata').controller('ErratumController', ['$scope', 'Erratum', 'ApiErrorHandler',
    function ($scope, Erratum, ApiErrorHandler) {
        $scope.panel = {
            error: false,
            loading: true
        };

        $scope.moduleStreamShowMap = {};

        if ($scope.errata) {
            $scope.panel.loading = false;
        }

        $scope.errata = Erratum.get({id: $scope.$stateParams.errataId}, function () {
            $scope.panel.loading = false;
        }, function (response) {
            $scope.panel.loading = false;
            ApiErrorHandler.handleGETRequestErrors(response, $scope);
        });

        $scope.showModuleStreamList = function (moduleStreamId) {
            return (!$scope.moduleStreamShowMap.hasOwnProperty(moduleStreamId) ||
                     $scope.moduleStreamShowMap[moduleStreamId]);
        };

        $scope.toggleModuleStreamList = function (moduleStreamId) {
            if ($scope.moduleStreamShowMap.hasOwnProperty(moduleStreamId)) {
                $scope.moduleStreamShowMap[moduleStreamId] = !$scope.moduleStreamShowMap[moduleStreamId];
            } else {
                $scope.moduleStreamShowMap[moduleStreamId] = false;
            }
        };

        $scope.moduleStreamChevron = function (moduleStreamId) {
            return $scope.showModuleStreamList(moduleStreamId) ? 'down' : 'right';
        };
    }
]);

Version data entries

155 entries across 155 versions & 1 rubygems

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