Sha256: ec2f828e284ff365d114b83128e6e3713d16f6070d2fa5df6c75553f9c7771fc

Contents?: true

Size: 1.07 KB

Versions: 25

Compression:

Stored size: 1.07 KB

Contents

/**
 * @ngdoc service
 * @name  Bastion.hosts.factory:Host
 *
 * @requires BastionResource
 *
 * @description
 *   Provides a BastionResource for one or more hosts.
 */
angular.module('Bastion.hosts').factory('Host',
    ['BastionResource', function (BastionResource) {
        var resource = BastionResource('/api/v2/hosts/:id/:action', {id: '@id'}, {
            postIndex: {method: 'POST', params: {action: 'post_index'}},
            update: {method: 'PUT'},
            updateHostCollections: {method: 'PUT', params: {action: 'host_collections'}},
            autocomplete: {method: 'GET', isArray: true, params: {id: 'auto_complete_search'}}
        });
        resource.prototype.hasContent = function () {
            return angular.isDefined(this.content_facet_attributes) && angular.isDefined(this.content_facet_attributes.uuid);
        };
        resource.prototype.hasSubscription = function () {
            return angular.isDefined(this.subscription_facet_attributes) && angular.isDefined(this.subscription_facet_attributes.uuid);
        };
        return resource;
    }]
);

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
katello-3.5.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host.factory.js
katello-3.4.5 engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host.factory.js
katello-3.4.4 engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host.factory.js
katello-3.4.2 engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host.factory.js
katello-3.4.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host.factory.js
katello-3.4.0.2 engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host.factory.js
katello-3.4.0.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host.factory.js
katello-3.3.2 engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host.factory.js
katello-3.4.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host.factory.js
katello-3.4.0.rc2 engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host.factory.js
katello-3.4.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host.factory.js
katello-3.3.1.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host.factory.js
katello-3.3.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host.factory.js
katello-3.3.0.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host.factory.js
katello-3.3.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host.factory.js
katello-3.3.0.rc2 engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host.factory.js
katello-3.3.0.rc1.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host.factory.js
katello-3.3.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host.factory.js
katello-3.2.1.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host.factory.js
katello-3.2.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host.factory.js