Sha256: 7c09363e4ee81b8c3b465eebfbae6c961d119c6e249eede0016b14924df3f0ae

Contents?: true

Size: 1.84 KB

Versions: 10

Compression:

Stored size: 1.84 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'}},
                repositoryTypes: {method: 'GET', isArray: true, params: {id: 'repository_types'}},
                republish: {method: 'PUT', params: { action: 'republish' }}
            }
        );

    }]
);

/**
 * @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

10 entries across 10 versions & 1 rubygems

Version Path
katello-3.5.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/repository.factory.js
katello-3.4.5 engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/repository.factory.js
katello-3.4.4 engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/repository.factory.js
katello-3.4.2 engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/repository.factory.js
katello-3.4.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/repository.factory.js
katello-3.4.0.2 engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/repository.factory.js
katello-3.4.0.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/repository.factory.js
katello-3.4.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/repository.factory.js
katello-3.4.0.rc2 engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/repository.factory.js
katello-3.4.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/repository.factory.js