Sha256: 536e6ecade1d826d5109a0bd10f54566c4596f0aa97ba4ca78d69a4cd51ba17e

Contents?: true

Size: 1.37 KB

Versions: 22

Compression:

Stored size: 1.37 KB

Contents

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

        // Labels so breadcrumb strings can be translated
        $scope.label = translate('Advanced Sync');

        $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

22 entries across 22 versions & 1 rubygems

Version Path
katello-4.14.2 engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-advanced-sync.controller.js
katello-4.15.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-advanced-sync.controller.js
katello-4.15.0.rc2 engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-advanced-sync.controller.js
katello-4.15.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-advanced-sync.controller.js
katello-4.14.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-advanced-sync.controller.js
katello-4.14.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-advanced-sync.controller.js
katello-4.14.0.rc3 engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-advanced-sync.controller.js
katello-4.14.0.rc2 engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-advanced-sync.controller.js
katello-4.14.0.rc1.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-advanced-sync.controller.js
katello-4.14.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-advanced-sync.controller.js
katello-4.13.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-advanced-sync.controller.js
katello-4.13.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-advanced-sync.controller.js
katello-4.12.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-advanced-sync.controller.js
katello-4.13.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-advanced-sync.controller.js
katello-4.12.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-advanced-sync.controller.js
katello-4.12.0.rc3 engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-advanced-sync.controller.js
katello-4.12.0.rc2 engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-advanced-sync.controller.js
katello-4.12.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-advanced-sync.controller.js
katello-4.11.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-advanced-sync.controller.js
katello-4.11.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-advanced-sync.controller.js