Sha256: f0cb6d6a5c196145d70d253e7e852415e0f7a6243e20cd8ab8c863d8def57cd1

Contents?: true

Size: 1.08 KB

Versions: 10

Compression:

Stored size: 1.08 KB

Contents

/**
 * @ngdoc object
 * @name  Bastion.repositories.controller:RepositoryAdvancedSyncController
 *
 * @requires $scope
 * @requires $state
 * @requires Repository
 *
 * @description
 *   Provides the functionality for advanced repository syncing
 */
angular.module('Bastion.repositories').controller('RepositoryAdvancedSyncController',
    ['$scope', '$state', 'Repository',
    function ($scope, $state, Repository) {
        var errorHandler = function errorHandler(response) {
            $scope.errorMessages = response.data.errors;
            $scope.working = false;
        };

        $scope.advancedSync = function (syncType) {
            var params = {id: $scope.repository.id};
            if (syncType === "skipMetadataCheck") {
                params['skip_metadata_check'] = true;
            } else if (syncType === "validateContents") {
                params['validate_contents'] = true;
            }

            Repository.sync(params, function (task) {
                $state.go('product.repository.tasks.details', {taskId: task.id});
            }, errorHandler);
        };
    }]
);

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/details/repository-details-advanced-sync.controller.js
katello-3.4.5 engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-advanced-sync.controller.js
katello-3.4.4 engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-advanced-sync.controller.js
katello-3.4.2 engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-advanced-sync.controller.js
katello-3.4.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-advanced-sync.controller.js
katello-3.4.0.2 engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-advanced-sync.controller.js
katello-3.4.0.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-advanced-sync.controller.js
katello-3.4.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-advanced-sync.controller.js
katello-3.4.0.rc2 engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-advanced-sync.controller.js
katello-3.4.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-advanced-sync.controller.js