mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-26 06:04:05 -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 = (
|
const buildAlertsPageData = (
|
||||||
data: AlertingRulesResult,
|
data: AlertingRulesResult,
|
||||||
debouncedSearch: string,
|
search: string,
|
||||||
stateFilter: (string | null)[]
|
stateFilter: (string | null)[]
|
||||||
) => {
|
) => {
|
||||||
const pageData: AlertsPageData = {
|
const pageData: AlertsPageData = {
|
||||||
|
@ -109,11 +109,9 @@ const buildAlertsPageData = (
|
||||||
}
|
}
|
||||||
|
|
||||||
const filteredRules: AlertingRule[] = (
|
const filteredRules: AlertingRule[] = (
|
||||||
debouncedSearch === ""
|
search === ""
|
||||||
? group.rules
|
? group.rules
|
||||||
: kvSearch
|
: kvSearch.filter(search, group.rules).map((value) => value.original)
|
||||||
.filter(debouncedSearch, group.rules)
|
|
||||||
.map((value) => value.original)
|
|
||||||
).filter((r) => stateFilter.length === 0 || stateFilter.includes(r.state));
|
).filter((r) => stateFilter.length === 0 || stateFilter.includes(r.state));
|
||||||
|
|
||||||
pageData.groups.push({
|
pageData.groups.push({
|
||||||
|
|
Loading…
Reference in a new issue