Skip to content

Commit

Permalink
[Uptime] Rename Whitelist to Allowlist in parse_filter_map (#71584)
Browse files Browse the repository at this point in the history
Fixes #71583

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
  • Loading branch information
andrewvc and elasticmachine authored Jul 22, 2020
1 parent 1a1d704 commit 6f40528
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ interface FilterField {
* If your code needs to support custom fields, introduce a second parameter to
* `parseFiltersMap` to take a list of FilterField objects.
*/
const filterWhitelist: FilterField[] = [
const filterAllowList: FilterField[] = [
{ name: 'ports', fieldName: 'url.port' },
{ name: 'locations', fieldName: 'observer.geo.name' },
{ name: 'tags', fieldName: 'tags' },
Expand All @@ -28,7 +28,7 @@ export const parseFiltersMap = (filterMapString: string) => {
const filterSlices: { [key: string]: any } = {};
try {
const map = new Map<string, string[]>(JSON.parse(filterMapString));
filterWhitelist.forEach(({ name, fieldName }) => {
filterAllowList.forEach(({ name, fieldName }) => {
filterSlices[name] = map.get(fieldName) ?? [];
});
return filterSlices;
Expand Down

0 comments on commit 6f40528

Please sign in to comment.