Sha256: 81e7e115cc1efc6cf74fe3f8778f8db8711b9937f72f8324719c1551732f1041
Contents?: true
Size: 1.22 KB
Versions: 179
Compression:
Stored size: 1.22 KB
Contents
/** * @ngdoc object * @name Bastion.repositories.controller:RepositoryAdvancedSyncController * * @requires $scope * @requires $state * @requires Notification * @requires Repository * * @description * Provides the functionality for advanced repository syncing */ angular.module('Bastion.repositories').controller('RepositoryAdvancedSyncController', ['$scope', '$state', 'Notification', 'Repository', function ($scope, $state, Notification, Repository) { var errorHandler = function errorHandler(response) { angular.forEach(response.data.errors, function (error) { Notification.setErrorMessage(error); }); $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
179 entries across 179 versions & 1 rubygems