Sha256: ddb08f2428390577a66be2814e2bb20469b30f0734c2455bf433c08a17401327

Contents?: true

Size: 857 Bytes

Versions: 217

Compression:

Stored size: 857 Bytes

Contents

/**
 * @ngdoc filter
 * @name  Bastion.tasks.filter:taskInputReduce
 *
 * @description
 *   Omits the parts of task humanized input that are not necessary to
 *   show (such as repository name in tasks list or a repository)
 */
angular.module('Bastion.tasks')
    .filter('taskInputReduce', function () {
        return function (humanizedTaskInput, skippedParts) {
            if (_.isString(humanizedTaskInput) || !skippedParts) {
                return humanizedTaskInput;
            }
            if (_.isString(skippedParts)) {
                skippedParts = skippedParts.split(',');
            }
            return _.reject(humanizedTaskInput, function (part) {
                if (part.length === 2) {
                    return _.includes(skippedParts, part[0]);
                }

                return false;
            });
        };
    });

Version data entries

217 entries across 217 versions & 1 rubygems

Version Path
katello-3.17.0.rc2 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-input-reduce.filter.js
katello-3.16.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-input-reduce.filter.js
katello-3.17.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-input-reduce.filter.js
katello-3.16.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-input-reduce.filter.js
katello-3.16.0.rc5.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-input-reduce.filter.js
katello-3.16.0.rc5 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-input-reduce.filter.js
katello-3.16.0.rc4.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-input-reduce.filter.js
katello-3.15.3.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-input-reduce.filter.js
katello-3.15.3 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-input-reduce.filter.js
katello-3.16.0.rc4 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-input-reduce.filter.js
katello-3.16.0.rc3.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-input-reduce.filter.js
katello-3.15.2 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-input-reduce.filter.js
katello-3.16.0.rc3 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-input-reduce.filter.js
katello-3.16.0.rc2.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-input-reduce.filter.js
katello-3.16.0.rc2 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-input-reduce.filter.js
katello-3.15.1.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-input-reduce.filter.js
katello-3.16.0.rc1.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-input-reduce.filter.js
katello-3.15.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-input-reduce.filter.js
katello-3.16.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-input-reduce.filter.js
katello-3.15.0.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-input-reduce.filter.js