Sha256: 409bfd038a88900d9a2fb49eed772fe0330084d14603f6425ae1af693d97f6bb

Contents?: true

Size: 1.67 KB

Versions: 9

Compression:

Stored size: 1.67 KB

Contents

/**
 * @ngdoc service
 * @name  Bastion.repositories.factory:Repository
 *
 * @requires BastionResource
 * @requires CurrentOrganization
 *
 * @description
 *   Provides a BastionResource for product or list of repositories.
 */
angular.module('Bastion.repositories').factory('Repository',
    ['BastionResource', 'CurrentOrganization',
    function (BastionResource, CurrentOrganization) {

        return BastionResource('/katello/api/v2/repositories/:id/:action',
            {id: '@id', 'organization_id': CurrentOrganization},
            {
                update: { method: 'PUT' },
                sync: { method: 'POST', params: { action: 'sync' } },
                removePackages: { method: 'PUT', params: { action: 'remove_packages'}},
                removeContent: { method: 'PUT', params: { action: 'remove_content'}},
                autocomplete: {method: 'GET', isArray: true, params: {id: 'auto_complete_search'}}
            }
        );

    }]
);

/**
 * @ngdoc service
 * @name  Bastion.repositories.factory:RepositoryBulkAction
 *
 * @requires BastionResource
 * @requires CurrentOrganization
 *
 * @description
 *   Provides a BastionResource for bulk actions on repositories.
 */
angular.module('Bastion.repositories').factory('RepositoryBulkAction',
    ['BastionResource', 'CurrentOrganization', function (BastionResource, CurrentOrganization) {

        return BastionResource('/katello/api/v2/repositories/bulk/:action',
            {'organization_id': CurrentOrganization},
            {
                removeRepositories: {method: 'PUT', params: {action: 'destroy'}},
                syncRepositories: {method: 'POST', params: {action: 'sync'}}
            }
        );

    }]
);

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
katello-2.4.5 engines/bastion_katello/app/assets/javascripts/bastion_katello/repositories/repository.factory.js
katello-2.4.4 engines/bastion_katello/app/assets/javascripts/bastion_katello/repositories/repository.factory.js
katello-2.4.3 engines/bastion_katello/app/assets/javascripts/bastion_katello/repositories/repository.factory.js
katello-2.4.2 engines/bastion_katello/app/assets/javascripts/bastion_katello/repositories/repository.factory.js
katello-2.4.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/repositories/repository.factory.js
katello-2.4.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/repositories/repository.factory.js
katello-2.4.0.rc3 engines/bastion_katello/app/assets/javascripts/bastion_katello/repositories/repository.factory.js
katello-2.4.0.rc2 engines/bastion_katello/app/assets/javascripts/bastion_katello/repositories/repository.factory.js
katello-2.4.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/repositories/repository.factory.js