From 010e52d3ce2a1c62da3237b18a478ff9a23acc07 Mon Sep 17 00:00:00 2001 From: cauemarcondes Date: Tue, 12 May 2020 09:39:31 +0200 Subject: [PATCH] addressing PR comments --- .../components/shared/EnvironmentFilter/index.tsx | 9 +++++++-- .../shared/ErrorRateAlertTrigger/index.tsx | 5 ++++- .../TransactionDurationAlertTrigger/index.tsx | 4 +++- x-pack/plugins/apm/public/hooks/useEnvironments.tsx | 13 +++++++++---- 4 files changed, 23 insertions(+), 8 deletions(-) diff --git a/x-pack/plugins/apm/public/components/shared/EnvironmentFilter/index.tsx b/x-pack/plugins/apm/public/components/shared/EnvironmentFilter/index.tsx index 6d59635c85232..5d03dbbfdf4ff 100644 --- a/x-pack/plugins/apm/public/components/shared/EnvironmentFilter/index.tsx +++ b/x-pack/plugins/apm/public/components/shared/EnvironmentFilter/index.tsx @@ -67,10 +67,15 @@ function getOptions(environments: string[]) { export const EnvironmentFilter: React.FC = () => { const location = useLocation(); - const { uiFilters } = useUrlParams(); + const { uiFilters, urlParams } = useUrlParams(); const { environment } = uiFilters; - const { environments, status = 'loading' } = useEnvironments(); + const { serviceName, start, end } = urlParams; + const { environments, status = 'loading' } = useEnvironments({ + serviceName, + start, + end + }); return ( { if (start && end) {