Sha256: 271a69ff358345192e3013f6856c99203c6d25dc1e7990870a9315bb4517aa2d

Contents?: true

Size: 993 Bytes

Versions: 8

Compression:

Stored size: 993 Bytes

Contents

/**
 *@ngdoc service
 *@name Bastion.organizations.service:FencedPages
 *
 *@descriptions
 * Service that keeps track of pages that require an organization to be selected
 */

angular.module('Bastion.organizations').service('FencedPages',
    [function () {
        var fencedPages = [
            'products',
            'activation-keys',
            'environments',
            'subscriptions',
            'gpg-keys',
            'sync-plans',
            'sync-plan',
            'content-views',
            'errata',
            'content-hosts',
            'host-collections',
            'puppet-modules',
            'packages'
        ];

        this.addPages = function (pages) {
            fencedPages = _.uniq(fencedPages.concat(pages));
        };

        this.list = function () {
            return fencedPages.slice();
        };

        this.isFenced = function (toState) {
            return this.list().indexOf(toState.name.split('.')[0]) !== -1;
        };
    }]
);

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
katello-3.3.2 engines/bastion_katello/app/assets/javascripts/bastion_katello/organizations/fenced-pages.service.js
katello-3.3.1.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/organizations/fenced-pages.service.js
katello-3.3.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/organizations/fenced-pages.service.js
katello-3.3.0.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/organizations/fenced-pages.service.js
katello-3.3.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/organizations/fenced-pages.service.js
katello-3.3.0.rc2 engines/bastion_katello/app/assets/javascripts/bastion_katello/organizations/fenced-pages.service.js
katello-3.3.0.rc1.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/organizations/fenced-pages.service.js
katello-3.3.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/organizations/fenced-pages.service.js