Sha256: 7f5ae03cbb0517946a0ccdfd566c9c803f10ca8470f4ec1d7a35f40c237af21c

Contents?: true

Size: 1.56 KB

Versions: 209

Compression:

Stored size: 1.56 KB

Contents

(function () {
    /**
     * @ngdoc run
     * @name Bastion.run:ContentOverrideHelper
     *
     * @description
     *  Provides common functionality for repository sets content overrides.
     */
    function ContentOverrideHelper() {
        var self = this;

        this.getContentOverrides = function (productRepositorySets, overrideName, overrideValue, remove) {
            var contentOverrides = [];

            angular.forEach(productRepositorySets, function (productRepositorySet) {
                var repositorySet = {
                    'content_label': productRepositorySet.content.label,
                    name: overrideName,
                    value: overrideValue
                };

                if (remove) {
                    repositorySet.remove = true;
                }

                contentOverrides.push(repositorySet);
            });

            return {'content_overrides': contentOverrides};
        };

        this.getEnabledContentOverrides = function (productRepositorySets) {
            return self.getContentOverrides(productRepositorySets, 'enabled', true);
        };

        this.getDisabledContentOverrides = function (productRepositorySets) {
            return self.getContentOverrides(productRepositorySets, 'enabled', false);
        };

        this.getDefaultContentOverrides = function (productRepositorySets) {
            return self.getContentOverrides(productRepositorySets, 'enabled', false, true);

        };
    }

    angular.module('Bastion.repository-sets').service('ContentOverrideHelper', ContentOverrideHelper);
})();

Version data entries

209 entries across 209 versions & 1 rubygems

Version Path
katello-4.15.0.rc2 engines/bastion_katello/app/assets/javascripts/bastion_katello/repository-sets/content-override-helper.service.js
katello-4.15.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/repository-sets/content-override-helper.service.js
katello-4.14.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/repository-sets/content-override-helper.service.js
katello-4.14.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/repository-sets/content-override-helper.service.js
katello-4.14.0.rc3 engines/bastion_katello/app/assets/javascripts/bastion_katello/repository-sets/content-override-helper.service.js
katello-4.14.0.rc2 engines/bastion_katello/app/assets/javascripts/bastion_katello/repository-sets/content-override-helper.service.js
katello-4.14.0.rc1.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/repository-sets/content-override-helper.service.js
katello-4.14.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/repository-sets/content-override-helper.service.js
katello-4.13.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/repository-sets/content-override-helper.service.js
katello-4.13.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/repository-sets/content-override-helper.service.js
katello-4.12.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/repository-sets/content-override-helper.service.js
katello-4.13.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/repository-sets/content-override-helper.service.js
katello-4.12.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/repository-sets/content-override-helper.service.js
katello-4.12.0.rc3 engines/bastion_katello/app/assets/javascripts/bastion_katello/repository-sets/content-override-helper.service.js
katello-4.12.0.rc2 engines/bastion_katello/app/assets/javascripts/bastion_katello/repository-sets/content-override-helper.service.js
katello-4.12.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/repository-sets/content-override-helper.service.js
katello-4.11.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/repository-sets/content-override-helper.service.js
katello-4.11.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/repository-sets/content-override-helper.service.js
katello-4.11.0.rc2 engines/bastion_katello/app/assets/javascripts/bastion_katello/repository-sets/content-override-helper.service.js
katello-4.11.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/repository-sets/content-override-helper.service.js