Sha256: 64294a0a96796c619b5eca20be15fbaf9343ad0e324de15b6d06e9c11c798eab
Contents?: true
Size: 1.39 KB
Versions: 42
Compression:
Stored size: 1.39 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 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
42 entries across 42 versions & 1 rubygems