Sha256: 81013d439c81365f386a8d555bdf5d1d46a5d8110f2a0b5edb2c73299db3af86
Contents?: true
Size: 997 Bytes
Versions: 14
Compression:
Stored size: 997 Bytes
Contents
(function () { 'use strict'; /** * @ngdoc controller * @name Bastion.host-collections.controller:HostCollectionCopyController * * @description * For copying a host collection. */ function HostCollectionCopyController($scope, HostCollection) { $scope.successMessages = []; $scope.errorMessages = []; $scope.copy = function (newName) { HostCollection.copy({id: $scope.$stateParams.hostCollectionId, 'host_collection': {name: newName}}, function (response) { $scope.transitionTo('host-collection.info', {hostCollectionId: response.id}); }, function (response) { $scope.errorMessages.push(response.data.displayMessage); }); }; } angular .module('Bastion.host-collections') .controller('HostCollectionCopyController', HostCollectionCopyController); HostCollectionCopyController.$inject = ['$scope', 'HostCollection']; })();
Version data entries
14 entries across 14 versions & 1 rubygems