summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2019-03-15 15:15:43 +0000
committerGerrit Code Review <review@openstack.org>2019-03-15 15:15:43 +0000
commita095e41e917a34dcc27c0752d7e28b003eb8b333 (patch)
tree6a4474073328d0865d78a06794352fdfc647160c
parentc91335b5279872d90b285b087a0c2ddb85fc4f77 (diff)
parenta88aad34236d64eebdc286f5a6072f84ced7809b (diff)
Merge "web: support more than one job in the filter"
-rw-r--r--web/src/containers/jobs/Jobs.jsx12
-rw-r--r--web/src/containers/status/Pipeline.jsx2
2 files changed, 9 insertions, 5 deletions
diff --git a/web/src/containers/jobs/Jobs.jsx b/web/src/containers/jobs/Jobs.jsx
index fd7cd8d..7f28433 100644
--- a/web/src/containers/jobs/Jobs.jsx
+++ b/web/src/containers/jobs/Jobs.jsx
@@ -102,11 +102,15 @@ class JobsList extends React.Component {
102 let filtered = false 102 let filtered = false
103 if (filter) { 103 if (filter) {
104 filtered = true 104 filtered = true
105 let filters = filter.replace(/ +/, ',').split(',')
105 for (let job of jobs) { 106 for (let job of jobs) {
106 if (job.name.indexOf(filter) !== -1 || 107 filters.forEach(jobFilter => {
107 (job.description && job.description.indexOf(filter) !== -1)) { 108 if (jobFilter && (
108 getNode(job, !filtered) 109 (job.name.indexOf(jobFilter) !== -1) ||
109 } 110 (job.description && job.description.indexOf(jobFilter) !== -1))) {
111 getNode(job, !filtered)
112 }
113 })
110 } 114 }
111 } 115 }
112 // process job list 116 // process job list
diff --git a/web/src/containers/status/Pipeline.jsx b/web/src/containers/status/Pipeline.jsx
index 7b585ee..b6ce648 100644
--- a/web/src/containers/status/Pipeline.jsx
+++ b/web/src/containers/status/Pipeline.jsx
@@ -90,7 +90,7 @@ class Pipeline extends React.Component {
90 90
91 filterQueue(queue, filter) { 91 filterQueue(queue, filter) {
92 let found = false 92 let found = false
93 let filters = filter.replace(' ', ',').split(',') 93 let filters = filter.replace(/ +/, ',').split(',')
94 queue.heads.forEach(changes => { 94 queue.heads.forEach(changes => {
95 changes.forEach(change => { 95 changes.forEach(change => {
96 filters.forEach(changeFilter => { 96 filters.forEach(changeFilter => {