Sha256: 483aaa17db5aac34ff551716b0df9c3b6018476dc9ce7e3b9e0d91ea61745e57

Contents?: true

Size: 1.76 KB

Versions: 22

Compression:

Stored size: 1.76 KB

Contents

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

        $scope.moduleStreamShowMap = {};

        // Labels so breadcrumb strings can be translated
        $scope.packagesLabel = translate('Packages');

        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

22 entries across 22 versions & 1 rubygems

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