Sha256: 7a7e7c074048fd70f7408d2da98e95144a9fb17e01ab39b05e81977a39eb923d

Contents?: true

Size: 950 Bytes

Versions: 248

Compression:

Stored size: 950 Bytes

Contents

/**
 * @ngdoc filter
 * @name  Bastion.errata.filter:errataSeverity
 *
 * @requires translate
 *
 * @description
 *   A filter to turn am errata's severity into an easier to read, translated string.
 *
 * @example
 *   {{ 'moderate' | errataSeverity }} will produce the string "Moderate".
 */
angular.module('Bastion.errata').filter('errataSeverity', ['translate', function (translate) {
    return function (type) {
        var errataSeverity;

        switch (type) {
        case 'Moderate':
            errataSeverity = translate('Moderate');
            break;
        case 'Important':
            errataSeverity = translate('Important');
            break;
        case 'Critical':
            errataSeverity = translate('Critical');
            break;
        case '':
            errataSeverity = translate('N/A');
            break;
        default:
            errataSeverity = type;
        }

        return errataSeverity;
    };

}]);

Version data entries

248 entries across 248 versions & 1 rubygems

Version Path
katello-4.14.2 engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/errata-severity.filter.js
katello-4.15.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/errata-severity.filter.js
katello-4.15.0.rc2 engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/errata-severity.filter.js
katello-4.15.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/errata-severity.filter.js
katello-4.14.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/errata-severity.filter.js
katello-4.14.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/errata-severity.filter.js
katello-4.14.0.rc3 engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/errata-severity.filter.js
katello-4.14.0.rc2 engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/errata-severity.filter.js
katello-4.14.0.rc1.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/errata-severity.filter.js
katello-4.14.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/errata-severity.filter.js
katello-4.13.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/errata-severity.filter.js
katello-4.13.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/errata-severity.filter.js
katello-4.12.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/errata-severity.filter.js
katello-4.13.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/errata-severity.filter.js
katello-4.12.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/errata-severity.filter.js
katello-4.12.0.rc3 engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/errata-severity.filter.js
katello-4.12.0.rc2 engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/errata-severity.filter.js
katello-4.12.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/errata-severity.filter.js
katello-4.11.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/errata-severity.filter.js
katello-4.11.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/errata-severity.filter.js