diff --git a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/policies/package_policies.tsx b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/policies/package_policies.tsx
index 8ec5fd83a1254..b7f044040e43f 100644
--- a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/policies/package_policies.tsx
+++ b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/policies/package_policies.tsx
@@ -273,6 +273,7 @@ export const PackagePoliciesPage = ({ name, version }: PackagePoliciesPanelProps
agentPolicy={agentPolicy}
packagePolicy={packagePolicy}
viewDataStep={viewDataStep}
+ showAddAgent={true}
/>
);
},
diff --git a/x-pack/plugins/fleet/public/components/package_policy_actions_menu.tsx b/x-pack/plugins/fleet/public/components/package_policy_actions_menu.tsx
index 7b0a300ac9dc8..01e2df6cc4102 100644
--- a/x-pack/plugins/fleet/public/components/package_policy_actions_menu.tsx
+++ b/x-pack/plugins/fleet/public/components/package_policy_actions_menu.tsx
@@ -23,7 +23,8 @@ export const PackagePolicyActionsMenu: React.FunctionComponent<{
agentPolicy: AgentPolicy;
packagePolicy: PackagePolicy;
viewDataStep?: EuiStepProps;
-}> = ({ agentPolicy, packagePolicy, viewDataStep }) => {
+ showAddAgent?: boolean;
+}> = ({ agentPolicy, packagePolicy, viewDataStep, showAddAgent }) => {
const [isEnrollmentFlyoutOpen, setIsEnrollmentFlyoutOpen] = useState(false);
const { getHref } = useLink();
const hasWriteCapabilities = useCapabilities().write;
@@ -47,19 +48,23 @@ export const PackagePolicyActionsMenu: React.FunctionComponent<{
// defaultMessage="View integration"
// />
// ,
- {
- setIsActionsMenuOpen(false);
- setIsEnrollmentFlyoutOpen(true);
- }}
- key="addAgent"
- >
-
- ,
+ ...(showAddAgent
+ ? [
+ {
+ setIsActionsMenuOpen(false);
+ setIsEnrollmentFlyoutOpen(true);
+ }}
+ key="addAgent"
+ >
+
+ ,
+ ]
+ : []),