diff --git a/releasenotes/notes/substring-web-search-362ede4088338005.yaml b/releasenotes/notes/substring-web-search-362ede4088338005.yaml
new file mode 100644
index 0000000000..ae3ddf3471
--- /dev/null
+++ b/releasenotes/notes/substring-web-search-362ede4088338005.yaml
@@ -0,0 +1,7 @@
+---
+features:
+ - |
+ Zuul now supports substring searches on the Builds and Buildsets pages on
+ its web UI. This is supported by placing asterisk (*) placeholders anywhere
+ in the search term, representing any characters. This is enabled for job
+ name, branch, project, and pipeline filters.
diff --git a/web/src/containers/FilterToolbar.jsx b/web/src/containers/FilterToolbar.jsx
index e1b0dd9986..0577dbdfd6 100644
--- a/web/src/containers/FilterToolbar.jsx
+++ b/web/src/containers/FilterToolbar.jsx
@@ -30,6 +30,7 @@ import {
ToolbarGroup,
ToolbarItem,
ToolbarToggleGroup,
+ Tooltip,
} from '@patternfly/react-core'
import { FilterIcon, SearchIcon } from '@patternfly/react-icons'
@@ -149,6 +150,7 @@ function FilterToolbar(props) {
isOpen={isCategoryDropdownOpen}
dropdownItems={filterCategories.filter(
(category) => (category.type === 'search' ||
+ category.type === 'fuzzy-search' ||
category.type === 'select' ||
category.type === 'ternary' ||
category.type === 'checkbox')
@@ -185,6 +187,31 @@ function FilterToolbar(props) {
)
+ } else if (category.type === 'fuzzy-search') {
+ return (
+
+
+ handleInputSend(event, category)}
+ />
+
+
+
+ )
} else if (category.type === 'select') {
return (
diff --git a/web/src/pages/Builds.jsx b/web/src/pages/Builds.jsx
index a569a8945c..404af00cc1 100644
--- a/web/src/pages/Builds.jsx
+++ b/web/src/pages/Builds.jsx
@@ -43,25 +43,25 @@ class BuildsPage extends React.Component {
key: 'job_name',
title: 'Job',
placeholder: 'Filter by Job...',
- type: 'search',
+ type: 'fuzzy-search',
},
{
key: 'project',
title: 'Project',
placeholder: 'Filter by Project...',
- type: 'search',
+ type: 'fuzzy-search',
},
{
key: 'branch',
title: 'Branch',
placeholder: 'Filter by Branch...',
- type: 'search',
+ type: 'fuzzy-search',
},
{
key: 'pipeline',
title: 'Pipeline',
placeholder: 'Filter by Pipeline...',
- type: 'search',
+ type: 'fuzzy-search',
},
{
key: 'change',
@@ -195,7 +195,7 @@ class BuildsPage extends React.Component {
this.updateData(filters)
}
}
-
+
filterInputValidation = (filterKey, filterValue) => {
// Input value should not be empty for all cases
if (!filterValue) {
diff --git a/web/src/pages/Buildsets.jsx b/web/src/pages/Buildsets.jsx
index 6ae75b52b6..ab6b9d3369 100644
--- a/web/src/pages/Buildsets.jsx
+++ b/web/src/pages/Buildsets.jsx
@@ -42,19 +42,19 @@ class BuildsetsPage extends React.Component {
key: 'project',
title: 'Project',
placeholder: 'Filter by Project...',
- type: 'search',
+ type: 'fuzzy-search',
},
{
key: 'branch',
title: 'Branch',
placeholder: 'Filter by Branch...',
- type: 'search',
+ type: 'fuzzy-search',
},
{
key: 'pipeline',
title: 'Pipeline',
placeholder: 'Filter by Pipeline...',
- type: 'search',
+ type: 'fuzzy-search',
},
{
key: 'change',