Sha256: 052a14da648ee5a46fc6f56e0948a196eb764da907b85ba3790d0fda7bb083f2

Contents?: true

Size: 1.46 KB

Versions: 72

Compression:

Stored size: 1.46 KB

Contents

/**
 * @ngdoc service
 * @name  Bastion.products.details.repositories.service:OSVersions
 *
 * @description
 *   Helper functions for repo osVersions.
 */

angular
    .module('Bastion.repositories')
    .service('OSVersions', function () {

        this.getOSVersionsOptions = function () {
            return [
                { name: 'No restriction', id: '' },
                { name: 'Red Hat Enterprise Linux 9 ', id: 'rhel-9' },
                { name: 'Red Hat Enterprise Linux 8 ', id: 'rhel-8' },
                { name: 'Red Hat Enterprise Linux 7 ', id: 'rhel-7' },
                { name: 'Red Hat Enterprise Linux 6 ', id: 'rhel-6' }
            ];
        };

        // return an array of OS versions
        this.osVersionsParam = function (osVersion) {
            var param = osVersion;
            if (osVersion && osVersion.hasOwnProperty('id')) {
                param = osVersion.id;
            }
            // exclude null, undefined, and ''
            return [param].filter(function (el) {
                return el && el !== '';
            });
        };

        // return the OS versions as comma-separated string
        this.formatOSVersions = function (osVersionList) {
            var individualVersions, versionStr;
            individualVersions = this.osVersionsParam(osVersionList);
            if (individualVersions) {
                versionStr = individualVersions.join(",");
            }
            return versionStr;
        };

    }
    );

Version data entries

72 entries across 72 versions & 1 rubygems

Version Path
katello-4.14.3 engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/os-versions.service.js
katello-4.14.2 engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/os-versions.service.js
katello-4.15.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/os-versions.service.js
katello-4.15.0.rc2 engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/os-versions.service.js
katello-4.15.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/os-versions.service.js
katello-4.14.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/os-versions.service.js
katello-4.14.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/os-versions.service.js
katello-4.14.0.rc3 engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/os-versions.service.js
katello-4.14.0.rc2 engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/os-versions.service.js
katello-4.14.0.rc1.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/os-versions.service.js
katello-4.14.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/os-versions.service.js
katello-4.13.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/os-versions.service.js
katello-4.13.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/os-versions.service.js
katello-4.12.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/os-versions.service.js
katello-4.13.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/os-versions.service.js
katello-4.12.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/os-versions.service.js
katello-4.12.0.rc3 engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/os-versions.service.js
katello-4.12.0.rc2 engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/os-versions.service.js
katello-4.12.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/os-versions.service.js
katello-4.11.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/os-versions.service.js