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