Sha256: ddbbff7580edac307107f816fab3b2185616edfd056358aeefc6113151dbbccf

Contents?: true

Size: 1.1 KB

Versions: 28

Compression:

Stored size: 1.1 KB

Contents

/**
 * @ngdoc service
 * @name  Bastion.content-hosts.service:ContentHostsHelper
 *
 * @description
 *   Helper service that contains functionality common amongst content hosts.
 */
angular.module('Bastion.content-hosts').service('ContentHostsHelper',
    function () {
        this.getHostStatusIcon = function (globalStatus) {
            var icons;
            var colors = {
                // we can remove 'valid', 'partial', and 'invalid' when http://projects.theforeman.org/issues/15347 is fixed
                'valid': 'green',
                'partial': 'yellow',
                'invalid': 'red',
                0: 'green',
                1: 'yellow',
                2: 'red'
            };

            globalStatus = colors[globalStatus] || "red";
            icons = {
                'green': globalStatus + ' host-status pficon pficon-ok status-ok',
                'yellow': globalStatus + ' host-status pficon pficon-info status-warn',
                'red': globalStatus + ' host-status pficon pficon-error-circle-o status-error'
            };

            return icons[globalStatus];
        };
    }
);

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
katello-3.4.5 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts-helper.service.js
katello-3.4.4 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts-helper.service.js
katello-3.4.2 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts-helper.service.js
katello-3.4.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts-helper.service.js
katello-3.4.0.2 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts-helper.service.js
katello-3.4.0.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts-helper.service.js
katello-3.3.2 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts-helper.service.js
katello-3.4.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts-helper.service.js
katello-3.4.0.rc2 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts-helper.service.js
katello-3.4.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts-helper.service.js
katello-3.3.1.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts-helper.service.js
katello-3.3.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts-helper.service.js
katello-3.3.0.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts-helper.service.js
katello-3.3.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts-helper.service.js
katello-3.3.0.rc2 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts-helper.service.js
katello-3.3.0.rc1.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts-helper.service.js
katello-3.3.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts-helper.service.js
katello-3.2.1.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts-helper.service.js
katello-3.2.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts-helper.service.js
katello-3.2.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts-helper.service.js