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-3.12.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/erratum.controller.js
katello-3.11.2 engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/erratum.controller.js
katello-3.10.2 engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/erratum.controller.js
katello-3.12.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/erratum.controller.js
katello-3.12.0.rc2 engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/erratum.controller.js
katello-3.10.1.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/erratum.controller.js
katello-3.12.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/erratum.controller.js
katello-3.10.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/erratum.controller.js
katello-3.11.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/erratum.controller.js
katello-3.11.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/erratum.controller.js
katello-3.11.0.rc2 engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/erratum.controller.js
katello-3.11.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/erratum.controller.js
katello-3.10.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/erratum.controller.js
katello-3.10.0.rc1.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/erratum.controller.js
katello-3.10.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/erratum.controller.js