Sha256: f9378ec105d564bbf94d60441e5e9e8ab57f32f7ccfdc5d87722997f62d648b7

Contents?: true

Size: 1.29 KB

Versions: 9

Compression:

Stored size: 1.29 KB

Contents

/**
 * @ngdoc object
 * @name  Bastion.subscriptions.controller:SubscriptionAssociationsContentHostsController
 *
 * @requires $scope
 * @requires translate
 * @requires Subscription
 * @requires ContentHostsHelper
 *
 * @description
 *   Provides the functionality for the subscription details for content host associations.
 */
angular.module('Bastion.subscriptions').controller('SubscriptionAssociationsContentHostsController',
    ['$scope', 'translate', 'Subscription', 'ContentHostsHelper',
    function ($scope, translate, Subscription, ContentHostsHelper) {

        if ($scope.contentHosts) {
            $scope.working = false;
        } else {
            $scope.working = true;
        }

        Subscription.get({id: $scope.$stateParams.subscriptionId}, function (subscription) {
            $scope.contentHosts = subscription.systems;
            $scope.working = false;
        });

        $scope.getStatusColor = ContentHostsHelper.getStatusColor;

        $scope.memory = ContentHostsHelper.memory;

        $scope.virtual = function (facts) {
            if (angular.isUndefined(facts.virt) || angular.isUndefined(facts.virt['is_guest'])) {
                return false;
            }
            return (facts.virt['is_guest'] === true || facts.virt['is_guest'] === 'true');
        };
    }]
);

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
katello-2.4.5 engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/subscription-associations-content-hosts.controller.js
katello-2.4.4 engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/subscription-associations-content-hosts.controller.js
katello-2.4.3 engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/subscription-associations-content-hosts.controller.js
katello-2.4.2 engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/subscription-associations-content-hosts.controller.js
katello-2.4.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/subscription-associations-content-hosts.controller.js
katello-2.4.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/subscription-associations-content-hosts.controller.js
katello-2.4.0.rc3 engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/subscription-associations-content-hosts.controller.js
katello-2.4.0.rc2 engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/subscription-associations-content-hosts.controller.js
katello-2.4.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/subscription-associations-content-hosts.controller.js