Sha256: 1697dd4e9aa31358c05fd70a7bcc072cb47c3574fb492a11a3469b1a7836b45b

Contents?: true

Size: 1.5 KB

Versions: 10

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

10 entries across 10 versions & 1 rubygems

Version Path
katello-3.5.2 engines/bastion_katello/app/assets/javascripts/bastion_katello/gpg-keys/gpg-key.factory.js
katello-3.6.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/gpg-keys/gpg-key.factory.js
katello-3.6.0.1.rc2 engines/bastion_katello/app/assets/javascripts/bastion_katello/gpg-keys/gpg-key.factory.js
katello-3.6.0.rc2 engines/bastion_katello/app/assets/javascripts/bastion_katello/gpg-keys/gpg-key.factory.js
katello-3.6.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/gpg-keys/gpg-key.factory.js
katello-3.5.1.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/gpg-keys/gpg-key.factory.js
katello-3.5.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/gpg-keys/gpg-key.factory.js
katello-3.5.0.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/gpg-keys/gpg-key.factory.js
katello-3.5.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/gpg-keys/gpg-key.factory.js
katello-3.5.0.rc2 engines/bastion_katello/app/assets/javascripts/bastion_katello/gpg-keys/gpg-key.factory.js