Sha256: 060ab61ffa63404edc3b2986d954bcc647e0046cd484a92b36d289019d8886cd

Contents?: true

Size: 1.4 KB

Versions: 9

Compression:

Stored size: 1.4 KB

Contents

/**
 * @ngdoc object
 * @name  Bastion.content-hosts.controller:ContentHostBaseSubscriptionsController
 *
 * @requires $scope
 * @requires translate
 * @requires CurrentOrganization
 * @requires Subscription
 * @requires ContentHost
 * @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', 'ContentHost', 'HostSubscription',
    function ($scope, $location, translate, CurrentOrganization, Subscription, ContentHost, 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

9 entries across 9 versions & 1 rubygems

Version Path
katello-3.1.0.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-base-subscriptions.controller.js
katello-3.1.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-base-subscriptions.controller.js
katello-3.1.0.rc2.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-base-subscriptions.controller.js
katello-3.0.2 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-base-subscriptions.controller.js
katello-3.1.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-base-subscriptions.controller.js
katello-3.0.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-base-subscriptions.controller.js
katello-3.0.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-base-subscriptions.controller.js
katello-3.0.0.rc7 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-base-subscriptions.controller.js
katello-3.0.0.rc5 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-base-subscriptions.controller.js