Sha256: 17fdab891b02799a98b9a06530d84c708b9effc3550d0b876615a7f2047d7002
Contents?: true
Size: 1.35 KB
Versions: 25
Compression:
Stored size: 1.35 KB
Contents
/** * @ngdoc object * @name Bastion.content-hosts.controller:ContentHostBaseSubscriptionsController * * @requires $scope * @requires translate * @requires CurrentOrganization * @requires Subscription * @requires Nutupane * * @description * Provides the functionality for the content host details action pane. */ angular.module('Bastion.content-hosts').controller('ContentHostBaseSubscriptionsController', ['$scope', '$location', 'translate', 'CurrentOrganization', 'Subscription', 'HostSubscription', function ($scope, $location, translate, CurrentOrganization, Subscription, HostSubscription) { function success() { $scope.subscription.workingMode = false; $scope.$parent.successMessages = [translate('Successfully updated subscriptions.')]; $scope.host.$get(); } function failure() { $scope.subscription.workingMode = false; $scope.$parent.errorMessages = [translate('An error occurred trying to auto-attach subscriptions. Please check your log for further information.')]; } $scope.subscription = { workingMode: false }; $scope.autoAttachSubscriptions = function () { $scope.subscription.workingMode = true; HostSubscription.autoAttach({id: $scope.host.id}, success, failure); }; }] );
Version data entries
25 entries across 25 versions & 1 rubygems