Sha256: 9f1995ebf8451a1d0521c8f3fb811527842fcc8c76261a2bf2d8bd39aa50cabf

Contents?: true

Size: 914 Bytes

Versions: 4

Compression:

Stored size: 914 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',
            'content-views',
            'errata',
            'content-hosts',
            'host-collections'
        ];

        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

4 entries across 4 versions & 1 rubygems

Version Path
katello-3.0.0.rc5 engines/bastion_katello/app/assets/javascripts/bastion_katello/organizations/fenced-pages.service.js
katello-3.0.0.rc4 engines/bastion_katello/app/assets/javascripts/bastion_katello/organizations/fenced-pages.service.js
katello-3.0.0.rc3 engines/bastion_katello/app/assets/javascripts/bastion_katello/organizations/fenced-pages.service.js
katello-3.0.0.rc2 engines/bastion_katello/app/assets/javascripts/bastion_katello/organizations/fenced-pages.service.js