Skip to content

Commit

Permalink
Use correct environment in anomaly detection setup link (#91877) (#91930
Browse files Browse the repository at this point in the history
)

This was still using `uiFilters.environment` instead of environment, so the warning would never show.

Co-authored-by: Nathan L Smith <nathan.smith@elastic.co>
  • Loading branch information
kibanamachine and smith authored Feb 18, 2021
1 parent 6c42f2c commit 2366598
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ export type AnomalyDetectionApiResponse = APIReturnType<'GET /api/apm/settings/a
const DEFAULT_DATA = { jobs: [], hasLegacyJobs: false };

export function AnomalyDetectionSetupLink() {
const { uiFilters } = useUrlParams();
const environment = uiFilters.environment;
const {
urlParams: { environment },
} = useUrlParams();
const { core } = useApmPluginContext();
const canGetJobs = !!core.application.capabilities.ml?.canGetJobs;
const license = useLicenseContext();
Expand Down

0 comments on commit 2366598

Please sign in to comment.