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

Version Path
katello-3.5.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-base-subscriptions.controller.js
katello-3.4.5 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-base-subscriptions.controller.js
katello-3.4.4 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-base-subscriptions.controller.js
katello-3.4.2 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-base-subscriptions.controller.js
katello-3.4.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-base-subscriptions.controller.js
katello-3.4.0.2 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-base-subscriptions.controller.js
katello-3.4.0.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-base-subscriptions.controller.js
katello-3.3.2 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-base-subscriptions.controller.js
katello-3.4.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-base-subscriptions.controller.js
katello-3.4.0.rc2 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-base-subscriptions.controller.js
katello-3.4.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-base-subscriptions.controller.js
katello-3.3.1.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-base-subscriptions.controller.js
katello-3.3.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-base-subscriptions.controller.js
katello-3.3.0.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-base-subscriptions.controller.js
katello-3.3.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-base-subscriptions.controller.js
katello-3.3.0.rc2 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-base-subscriptions.controller.js
katello-3.3.0.rc1.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-base-subscriptions.controller.js
katello-3.3.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-base-subscriptions.controller.js
katello-3.2.1.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-base-subscriptions.controller.js
katello-3.2.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-base-subscriptions.controller.js