summaryrefslogtreecommitdiff
path: root/web/src/containers/jobs/Jobs.jsx
diff options
context:
space:
mode:
authorJames E. Blair <jeblair@redhat.com>2019-03-14 09:06:01 -0700
committerJames E. Blair <corvus@inaugust.com>2019-03-14 17:16:15 +0000
commita88aad34236d64eebdc286f5a6072f84ced7809b (patch)
tree894e28271f2d7aeb761901b6495a357cab1466f2 /web/src/containers/jobs/Jobs.jsx
parent88b16685a3177eecba3eb46c880b2aabac22d23e (diff)
downloadzuul-a88aad34236d64eebdc286f5a6072f84ced7809b.tar.gz
web: support more than one job in the filter
This allows you to enter: requirements-tox-py35-check-uc cross-cinder-py35 In the job filter and see the common ancestry in the tree view. The status page filter is also updated to support multiple spaces between items. Both filters now support this in order to deal with common copy/paste errors. Depends-On: https://review.openstack.org/643397 Change-Id: I38cc6cdc8b5373dc8f29804f5bb35e9594a000bf
Diffstat (limited to 'web/src/containers/jobs/Jobs.jsx')
-rw-r--r--web/src/containers/jobs/Jobs.jsx12
1 files changed, 8 insertions, 4 deletions
diff --git a/web/src/containers/jobs/Jobs.jsx b/web/src/containers/jobs/Jobs.jsx
index fd7cd8d41..7f28433c7 100644
--- a/web/src/containers/jobs/Jobs.jsx
+++ b/web/src/containers/jobs/Jobs.jsx
@@ -102,11 +102,15 @@ class JobsList extends React.Component {
let filtered = false
if (filter) {
filtered = true
+ let filters = filter.replace(/ +/, ',').split(',')
for (let job of jobs) {
- if (job.name.indexOf(filter) !== -1 ||
- (job.description && job.description.indexOf(filter) !== -1)) {
- getNode(job, !filtered)
- }
+ filters.forEach(jobFilter => {
+ if (jobFilter && (
+ (job.name.indexOf(jobFilter) !== -1) ||
+ (job.description && job.description.indexOf(jobFilter) !== -1))) {
+ getNode(job, !filtered)
+ }
+ })
}
}
// process job list