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-4.15.0.rc2 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-input-reduce.filter.js
katello-4.15.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-input-reduce.filter.js
katello-4.14.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-input-reduce.filter.js
katello-4.14.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-input-reduce.filter.js
katello-4.14.0.rc3 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-input-reduce.filter.js
katello-4.14.0.rc2 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-input-reduce.filter.js
katello-4.14.0.rc1.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-input-reduce.filter.js
katello-4.14.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-input-reduce.filter.js
katello-4.13.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-input-reduce.filter.js
katello-4.13.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-input-reduce.filter.js
katello-4.12.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-input-reduce.filter.js
katello-4.13.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-input-reduce.filter.js
katello-4.12.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-input-reduce.filter.js
katello-4.12.0.rc3 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-input-reduce.filter.js
katello-4.12.0.rc2 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-input-reduce.filter.js
katello-4.12.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-input-reduce.filter.js
katello-4.11.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-input-reduce.filter.js
katello-4.11.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-input-reduce.filter.js
katello-4.11.0.rc2 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-input-reduce.filter.js
katello-4.11.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-input-reduce.filter.js