Skip to content

Commit

Permalink
Use correct environment in anomaly detection setup link (elastic#91877)
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.
  • Loading branch information
smith authored and kibanamachine committed Feb 18, 2021
1 parent 758bc96 commit f435ec8
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 f435ec8

Please sign in to comment.