Sha256: 43a04b3ccc7b9f260175e5aa3ab175e47bd09a6de60d71dcefdb2f61d6cee669

Contents?: true

Size: 1.5 KB

Versions: 18

Compression:

Stored size: 1.5 KB

Contents

/**
 * @ngdoc service
 * @name  Katello.gpg-keys.factory:GPGKey
 *
 * @requires BastionResource
 *
 * @description
 *   Provides a BastionResource for GPG keys.
 */
angular.module('Bastion.gpg-keys').factory('GPGKey',
    ['BastionResource', 'CurrentOrganization',
    function (BastionResource, CurrentOrganization) {

        return BastionResource('/katello/api/v2/gpg_keys/:id/:action',
            {id: '@id', 'organization_id': CurrentOrganization},
            {
                autocomplete: {method: 'GET', isArray: true, params: {id: 'auto_complete_search'}},
                update: {method: 'PUT'},
                products: {method: 'GET', transformResponse:
                    function (data) {
                        var gpgKey = angular.fromJson(data);
                        return {
                            total: gpgKey.products.length,
                            subtotal: gpgKey.products.length,
                            results: gpgKey.products
                        };
                    }
                },
                repositories: {method: 'GET', transformResponse:
                    function (data) {
                        var gpgKey = angular.fromJson(data);
                        return {
                            total: gpgKey.repositories.length,
                            subtotal: gpgKey.repositories.length,
                            results: gpgKey.repositories
                        };
                    }
                }
            }
        );

    }]
);

Version data entries

18 entries across 18 versions & 1 rubygems

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