Sha256: dff4c70e5fc6b8cfa662260eff9ec8877b5c425a84aa4a4288cf2dee53e3d7c7

Contents?: true

Size: 1.95 KB

Versions: 91

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.masterOnly = true;
        $scope.table = packagesNutupane.table;
        $scope.table.openEventInfo = openEventInfo;
        $scope.table.contentHost = $scope.contentHost;
    }
]);

Version data entries

91 entries across 91 versions & 1 rubygems

Version Path
katello-3.16.2 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-applicable.controller.js
katello-3.16.1.2 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-applicable.controller.js
katello-3.16.1.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-applicable.controller.js
katello-3.16.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-applicable.controller.js
katello-3.17.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-applicable.controller.js
katello-3.16.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-applicable.controller.js
katello-3.16.0.rc5.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-applicable.controller.js
katello-3.16.0.rc5 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-applicable.controller.js
katello-3.16.0.rc4.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-applicable.controller.js
katello-3.15.3.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-applicable.controller.js
katello-3.15.3 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-applicable.controller.js
katello-3.16.0.rc4 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-applicable.controller.js
katello-3.16.0.rc3.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-applicable.controller.js
katello-3.15.2 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-applicable.controller.js
katello-3.16.0.rc3 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-applicable.controller.js
katello-3.16.0.rc2.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-applicable.controller.js
katello-3.16.0.rc2 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-applicable.controller.js
katello-3.15.1.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-applicable.controller.js
katello-3.16.0.rc1.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-applicable.controller.js
katello-3.15.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-applicable.controller.js