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

Version Path
katello-4.14.2 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-base-subscriptions.controller.js
katello-4.15.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-base-subscriptions.controller.js
katello-4.15.0.rc2 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-base-subscriptions.controller.js
katello-4.15.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-base-subscriptions.controller.js
katello-4.14.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-base-subscriptions.controller.js
katello-4.14.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-base-subscriptions.controller.js
katello-4.14.0.rc3 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-base-subscriptions.controller.js
katello-4.14.0.rc2 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-base-subscriptions.controller.js
katello-4.14.0.rc1.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-base-subscriptions.controller.js
katello-4.14.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-base-subscriptions.controller.js
katello-4.13.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-base-subscriptions.controller.js
katello-4.13.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-base-subscriptions.controller.js
katello-4.12.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-base-subscriptions.controller.js
katello-4.13.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-base-subscriptions.controller.js
katello-4.12.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-base-subscriptions.controller.js
katello-4.12.0.rc3 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-base-subscriptions.controller.js
katello-4.12.0.rc2 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-base-subscriptions.controller.js
katello-4.12.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-base-subscriptions.controller.js
katello-4.11.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-base-subscriptions.controller.js
katello-4.11.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-base-subscriptions.controller.js