Sha256: 383dd0b76031b61d3ddca515b4cb2c540b950d1543f41f80738bfeef9b35959e
Contents?: true
Size: 1.18 KB
Versions: 71
Compression:
Stored size: 1.18 KB
Contents
/** * @ngdoc object * @name Bastion.pulp-primary.controller:PulpPrimaryController * * @requires $scope * @requires $urlMatcherFactory * @requires $location * @requires PulpPrimary * @requires Notification * * @description * Provides the functionality for the pulp primary page. */ angular.module('Bastion.pulp-primary').controller('PulpPrimaryController', ['$scope', '$urlMatcherFactory', '$location', 'PulpPrimary', 'Notification', function ($scope, $urlMatcherFactory, $location, PulpPrimary, Notification) { var urlMatcher = $urlMatcherFactory.compile("/smart_proxies/:capsuleId"); var capsuleId = urlMatcher.exec($location.path()).capsuleId; var errorHandler = function errorHandler(response) { angular.forEach(response.data.errors, function (error) { Notification.setErrorMessage(error); }); }; $scope.smartProxyId = capsuleId; $scope.reclaimSpace = function () { PulpPrimary.reclaimSpace({id: capsuleId}, function () { Notification.setSuccessMessage("Space reclamation task started in the background."); }, errorHandler); }; }] );
Version data entries
71 entries across 71 versions & 1 rubygems