Sha256: e3d4fa5fd0f19c3d63071d64a8746ba134f1dbb368b32268a400ad800df8a99c

Contents?: true

Size: 1.95 KB

Versions: 30

Compression:

Stored size: 1.95 KB

Contents

/**
 * @ngdoc object
 * @name  Bastion.content-hosts.controller:ContentHostPackagesApplicableController
 *
 * @requires $scope
 * @resource $timeout
 * @resource $window
 * @requires Package
 * @requires HostPackage
 * @requires translate
 * @requires Nutupane
 *
 * @description
 *   Provides the functionality for the content host packages list and actions.
 */
angular.module('Bastion.content-hosts').controller('ContentHostPackagesApplicableController',
    ['$scope', '$timeout', '$window', 'Package', 'HostPackage', 'translate', 'Nutupane',
    function ($scope, $timeout, $window, Package, HostPackage, translate, Nutupane) {
        var packagesNutupane, openEventInfo;

        $scope.getSelectedPackages = function () {
            var selected = $scope.table.getSelected();
            selected = _.map(selected, function(pkg) {
                return pkg.name + '-' + pkg.version + '-' + pkg.release + '.' + pkg.arch;
            });
            return selected;
        };

        $scope.getRemoteExecutionCommand = function() {
            return $scope.getSelectedPackages().join(' ');
        };

        $scope.getKatelloAgentCommand = function () {
            return $scope.getSelectedPackages().join(',');
        };

        $scope.performDefaultUpdateAction = function () {
            if ($scope.remoteExecutionByDefault) {
                $scope.performViaRemoteExecution('packageUpdate', $scope.getRemoteExecutionCommand(), false);
            } else {
                $scope.performViaKatelloAgent('packageUpdate', $scope.getKatelloAgentCommand());
            }
        };

        packagesNutupane = new Nutupane(Package, {'host_id': $scope.$stateParams.hostId, 'packages_restrict_upgradable': true});
        $scope.controllerName = 'katello_erratum_packages';
        packagesNutupane.primaryOnly = true;
        $scope.table = packagesNutupane.table;
        $scope.table.openEventInfo = openEventInfo;
        $scope.table.contentHost = $scope.contentHost;
    }
]);

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
katello-4.0.3 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-applicable.controller.js
katello-3.18.5 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-applicable.controller.js
katello-4.0.2.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-applicable.controller.js
katello-4.0.2 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-applicable.controller.js
katello-3.18.4 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-applicable.controller.js
katello-4.0.1.2 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-applicable.controller.js
katello-3.18.3.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-applicable.controller.js
katello-4.0.1.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-applicable.controller.js
katello-3.18.3 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-applicable.controller.js
katello-4.0.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-applicable.controller.js
katello-4.0.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-applicable.controller.js
katello-4.0.0.rc3.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-applicable.controller.js
katello-4.0.0.rc3 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-applicable.controller.js
katello-3.18.2.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-applicable.controller.js
katello-3.18.2 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-applicable.controller.js
katello-3.17.3 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-applicable.controller.js
katello-4.0.0.rc2 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-applicable.controller.js
katello-3.18.1.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-applicable.controller.js
katello-3.17.2 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-applicable.controller.js
katello-4.0.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-applicable.controller.js