Sha256: e102bb67fe68c6b8f6a84d70af818bbcaa300faa8a7d2fdd89f8a27ce3f373d4

Contents?: true

Size: 1.72 KB

Versions: 22

Compression:

Stored size: 1.72 KB

Contents

(function () {
    'use strict';

    /**
     * @ngdoc controller
     * @name  Bastion.debs.controller:DebsController
     *
     * @description
     *   Handles fetching deb packages and populating Nutupane based on the current
     *   ui-router state.
     *
     * @requires translate
     *
     */
    function DebsController($scope, $location, translate, Nutupane, Deb, CurrentOrganization) {
        var nutupane;

        var params = {
            'organization_id': CurrentOrganization,
            'search': $location.search().search || "",
            'paged': true,
            'sort_by': 'name',
            'sort_order': 'ASC'
        };

        nutupane = new Nutupane(Deb, params);
        nutupane.primaryOnly = true;

        $scope.table = nutupane.table;

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

        $scope.controllerName = 'katello_debs';

        Deb.queryPaged({'organization_id': CurrentOrganization}, function (result) {
            $scope.packageCount = result.total;
        });

        $scope.showApplicable = false;
        $scope.showUpgradable = false;

        $scope.toggleFilters = function () {
            if ($scope.showUpgradable === true) {
                $scope.showApplicable = true;
            }

            nutupane.table.params['packages_restrict_applicable'] = $scope.showApplicable;
            nutupane.table.params['packages_restrict_upgradable'] = $scope.showUpgradable;
            nutupane.refresh();
        };

    }

    angular
        .module('Bastion.debs')
        .controller('DebsController', DebsController);

    DebsController.$inject = ['$scope', '$location', 'translate', 'Nutupane', 'Deb', 'CurrentOrganization'];

})();

Version data entries

22 entries across 22 versions & 1 rubygems

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