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.4.5 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-input-reduce.filter.js
katello-3.4.4 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-input-reduce.filter.js
katello-3.4.2 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-input-reduce.filter.js
katello-3.4.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-input-reduce.filter.js
katello-3.4.0.2 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-input-reduce.filter.js
katello-3.4.0.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-input-reduce.filter.js
katello-3.3.2 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-input-reduce.filter.js
katello-3.4.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-input-reduce.filter.js
katello-3.4.0.rc2 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-input-reduce.filter.js
katello-3.4.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-input-reduce.filter.js
katello-3.3.1.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-input-reduce.filter.js
katello-3.3.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-input-reduce.filter.js
katello-3.3.0.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-input-reduce.filter.js
katello-3.3.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-input-reduce.filter.js
katello-3.3.0.rc2 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-input-reduce.filter.js
katello-3.3.0.rc1.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-input-reduce.filter.js
katello-3.3.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-input-reduce.filter.js