Skip to content

Commit

Permalink
Use correct environment in anomaly detection setup link (#91877) (#93232
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 Mar 2, 2021
1 parent ae95f69 commit 88aadc3
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 88aadc3

Please sign in to comment.