Sha256: 32d311e694d2492c25105d3ea3eb91cc779c4b1772aa3eaa9b7fb651bd01658d

Contents?: true

Size: 1.58 KB

Versions: 50

Compression:

Stored size: 1.58 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.
     */
    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;
        $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

50 entries across 50 versions & 1 rubygems

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