Skip to content

Commit

Permalink
[Uptime] Rename Whitelist to Allowlist in parse_filter_map
Browse files Browse the repository at this point in the history
Fixes #71583
  • Loading branch information
andrewvc committed Jul 14, 2020
1 parent 835c13d commit d933c80
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 d933c80

Please sign in to comment.