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.3.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/erratum.controller.js
katello-4.4.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/erratum.controller.js
katello-4.4.0.rc2 engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/erratum.controller.js
katello-4.4.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/erratum.controller.js
katello-4.2.2 engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/erratum.controller.js
katello-4.3.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/erratum.controller.js
katello-4.3.0.rc4 engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/erratum.controller.js
katello-4.3.0.rc3 engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/erratum.controller.js
katello-4.3.0.rc2.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/erratum.controller.js
katello-4.3.0.rc2 engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/erratum.controller.js
katello-4.3.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/erratum.controller.js
katello-4.2.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/erratum.controller.js
katello-4.2.0.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/erratum.controller.js
katello-4.1.4 engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/erratum.controller.js
katello-4.0.3 engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/erratum.controller.js
katello-4.2.0.1.rc3 engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/erratum.controller.js
katello-3.18.5 engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/erratum.controller.js
katello-4.2.0.1.rc2 engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/erratum.controller.js
katello-4.2.0.rc2 engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/erratum.controller.js
katello-4.1.3 engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/erratum.controller.js