Sha256: c1e02d2c0601a2b4787dee473cf2ba84b8ddbf97354365300367f23cd6ceb12d

Contents?: true

Size: 1.4 KB

Versions: 138

Compression:

Stored size: 1.4 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);
        };

        resource.prototype.isRpmEnabled = function() {
            return !this.isDebEnabled();
        };

        resource.prototype.isDebEnabled = function() {
            return _.isString(this.operatingsystem_name) && (this.operatingsystem_name.indexOf("Debian") >= 0 || this.operatingsystem_name.indexOf("Ubuntu") >= 0);
        };

        return resource;
    }]
);

Version data entries

138 entries across 138 versions & 1 rubygems

Version Path
katello-4.7.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host.factory.js
katello-4.6.2.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host.factory.js
katello-4.6.2 engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host.factory.js
katello-4.7.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host.factory.js
katello-4.6.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host.factory.js
katello-4.7.0.rc2 engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host.factory.js
katello-4.7.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host.factory.js
katello-4.4.2.2 engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host.factory.js
katello-4.4.2.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host.factory.js
katello-4.4.2 engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host.factory.js
katello-4.5.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host.factory.js
katello-4.6.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host.factory.js
katello-4.6.0.rc2 engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host.factory.js
katello-4.6.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host.factory.js
katello-4.5.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host.factory.js
katello-4.5.0.rc2 engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host.factory.js
katello-4.4.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host.factory.js
katello-4.5.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host.factory.js
katello-4.4.0.2 engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host.factory.js
katello-4.4.0.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host.factory.js