Sha256: a8b25ccf1f4934c5e62c74261d20765d7331e1081a2bf42009acfdb385c47143
Contents?: true
Size: 1.4 KB
Versions: 201
Compression:
Stored size: 1.4 KB
Contents
/** * @ngdoc object * @name Bastion.content-hosts.controller:ContentHostBaseSubscriptionsController * * @requires $scope * @requires translate * @requires CurrentOrganization * @requires Subscription * @requires Nutupane * @requires Notification * * @description * Provides the functionality for the content host details action pane. */ angular.module('Bastion.content-hosts').controller('ContentHostBaseSubscriptionsController', ['$scope', '$location', 'translate', 'CurrentOrganization', 'Subscription', 'HostSubscription', 'Notification', function ($scope, $location, translate, CurrentOrganization, Subscription, HostSubscription, Notification) { function success() { $scope.subscription.workingMode = false; Notification.setSuccessMessage(translate('Successfully updated subscriptions.')); $scope.host.$get(); } function failure() { $scope.subscription.workingMode = false; Notification.setErrorMessage(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
201 entries across 201 versions & 1 rubygems