Skip to content

Commit

Permalink
Merge pull request #319 from alexhsamuel/feature/gh312
Browse files Browse the repository at this point in the history
Make keyword search case-insensitive.
  • Loading branch information
alexhsamuel authored Dec 27, 2023
2 parents 2f7d944 + 35a56de commit 191a777
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions vue/src/components/JobsList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,10 @@ export default {
}
if (this.labels)
jobs = filter(jobs, job => includesAll(this.labels, job.metadata.labels))
if (this.keywords)
jobs = filter(jobs, job => matchKeywords(this.keywords, job.job_id))
if (this.keywords) {
const keywords = this.keywords.map(s => s.toLowerCase())
jobs = filter(jobs, job => matchKeywords(keywords, job.job_id.toLowerCase()))
}
return jobs
},
Expand Down
6 changes: 4 additions & 2 deletions vue/src/components/RunsList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -370,8 +370,10 @@ export default {
runs = filter(runs, run => includesAll(this.labels, run.labels))
if (this.args)
runs = filter(runs, getArgPredicate(this.args))
if (this.keywords)
runs = filter(runs, run => matchKeywords(this.keywords, run.job_id))
if (this.keywords) {
const keywords = this.keywords.map(s => s.toLowerCase())
runs = filter(runs, run => matchKeywords(keywords, run.job_id.toLowerCase()))
}
return sortBy(runs, r => r.time_key)
},
Expand Down

0 comments on commit 191a777

Please sign in to comment.