mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-25 21:54:10 -08:00
Rename debouncedSearch -> search in buildAlertsPageData
Signed-off-by: Julius Volz <julius.volz@gmail.com>
This commit is contained in:
parent
d3b6b0f288
commit
4ce71af1b9
|
@ -68,7 +68,7 @@ const kvSearch = new KVSearch<AlertingRule>({
|
|||
|
||||
const buildAlertsPageData = (
|
||||
data: AlertingRulesResult,
|
||||
debouncedSearch: string,
|
||||
search: string,
|
||||
stateFilter: (string | null)[]
|
||||
) => {
|
||||
const pageData: AlertsPageData = {
|
||||
|
@ -109,11 +109,9 @@ const buildAlertsPageData = (
|
|||
}
|
||||
|
||||
const filteredRules: AlertingRule[] = (
|
||||
debouncedSearch === ""
|
||||
search === ""
|
||||
? group.rules
|
||||
: kvSearch
|
||||
.filter(debouncedSearch, group.rules)
|
||||
.map((value) => value.original)
|
||||
: kvSearch.filter(search, group.rules).map((value) => value.original)
|
||||
).filter((r) => stateFilter.length === 0 || stateFilter.includes(r.state));
|
||||
|
||||
pageData.groups.push({
|
||||
|
|
Loading…
Reference in a new issue