diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/common/monitor_filters/filter_group.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/common/monitor_filters/filter_group.tsx index 7e19abbf758ce..a59a26613a427 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/common/monitor_filters/filter_group.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/common/monitor_filters/filter_group.tsx @@ -61,7 +61,18 @@ export const FilterGroup = ({ label: LOCATION_LABEL, field: 'locations', values: getSyntheticsFilterDisplayValues( - mixUrlValues(data.locations, urlParams.locations), + mixUrlValues( + data.locations.map((locationData) => { + const matchingLocation = locations.find( + (location) => location.id === locationData.label + ); + return { + label: matchingLocation ? matchingLocation.label : locationData.label, + count: locationData.count, + }; + }), + urlParams.locations + ), 'locations', locations ), diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/common/monitor_filters/use_filters.ts b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/common/monitor_filters/use_filters.ts index 014966f31bbc0..0e3fe38566f34 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/common/monitor_filters/use_filters.ts +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/common/monitor_filters/use_filters.ts @@ -132,7 +132,7 @@ export const useFilters = (): FiltersList => { })) ?? [], schedules: schedules?.buckets?.map(({ key, doc_count: count }) => ({ - label: key, + label: String(key), count, })) ?? [], };