Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions x-pack/plugins/apm/public/components/app/Home/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ interface Props {

export function Home({ tab }: Props) {
const { config, core } = useApmPluginContext();
const isMLEnabled = !!core.application.capabilities.ml;
const canAccessML = !!core.application.capabilities.ml?.canAccessML;
const homeTabs = getHomeTabs(config);
const selectedTab = homeTabs.find(
(homeTab) => homeTab.name === tab
Expand All @@ -106,7 +106,7 @@ export function Home({ tab }: Props) {
</EuiButtonEmpty>
</SettingsLink>
</EuiFlexItem>
{isMLEnabled && (
{canAccessML && (
<EuiFlexItem grow={false}>
<AnomalyDetectionSetupLink />
</EuiFlexItem>
Expand Down
4 changes: 2 additions & 2 deletions x-pack/plugins/apm/public/components/app/Settings/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { useApmPluginContext } from '../../../hooks/useApmPluginContext';

export function Settings(props: { children: ReactNode }) {
const plugin = useApmPluginContext();
const isMLEnabled = !!plugin.core.application.capabilities.ml;
const canAccessML = !!plugin.core.application.capabilities.ml?.canAccessML;
const { search, pathname } = useLocation();
return (
<>
Expand Down Expand Up @@ -51,7 +51,7 @@ export function Settings(props: { children: ReactNode }) {
'/settings/agent-configuration'
),
},
...(isMLEnabled
...(canAccessML
? [
{
name: i18n.translate(
Expand Down