diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/multi_page_layout/components/bottom_bar.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/multi_page_layout/components/bottom_bar.tsx
index 87a7d8b687980..228a89fa4e495 100644
--- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/multi_page_layout/components/bottom_bar.tsx
+++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/multi_page_layout/components/bottom_bar.tsx
@@ -84,6 +84,40 @@ export const CreatePackagePolicyBottomBar: React.FC<{
);
};
+export const AgentStandaloneBottomBar: React.FC<{
+ cancelClickHandler: React.ReactEventHandler;
+ cancelUrl?: string;
+ onNext: () => void;
+ noAnimation?: boolean;
+}> = ({ onNext, cancelClickHandler, cancelUrl, noAnimation = false }) => {
+ const Bar = noAnimation ? NoAnimationCenteredRoundedBottomBar : CenteredRoundedBottomBar;
+ return (
+
+
+
+
+ {/* eslint-disable-next-line @elastic/eui/href-or-on-click */}
+
+
+
+
+
+
+
+
+
+
+
+
+ );
+};
+
export const CreatePackagePolicyFinalBottomBar: React.FC<{
pkgkey: string;
}> = ({ pkgkey }) => {
diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/multi_page_layout/components/confirming_incoming_data_standalone.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/multi_page_layout/components/confirming_incoming_data_standalone.tsx
new file mode 100644
index 0000000000000..5ad7be6fce71a
--- /dev/null
+++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/multi_page_layout/components/confirming_incoming_data_standalone.tsx
@@ -0,0 +1,50 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0; you may not use this file except in compliance with the Elastic License
+ * 2.0.
+ */
+
+import React from 'react';
+import { EuiCallOut, EuiText, EuiLink } from '@elastic/eui';
+import { FormattedMessage } from '@kbn/i18n-react';
+
+interface Props {
+ troubleshootLink: string;
+}
+
+export const ConfirmIncomingDataStandalone: React.FunctionComponent = ({
+ troubleshootLink,
+}) => {
+ return (
+ <>
+
+
+ }
+ >
+
+
+
+ ),
+ }}
+ />
+
+
+ >
+ );
+};
diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/multi_page_layout/components/index.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/multi_page_layout/components/index.tsx
index 5ef1c7d9d4182..dd13accda1a37 100644
--- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/multi_page_layout/components/index.tsx
+++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/multi_page_layout/components/index.tsx
@@ -12,3 +12,4 @@ export * from './horizontal_page_steps';
export * from './page_steps';
export * from './standalone_mode_warning_callout';
export * from './confirm_incoming_data_with_preview';
+export * from './confirming_incoming_data_standalone';
diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/multi_page_layout/components/page_steps/confirm_data.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/multi_page_layout/components/page_steps/confirm_data.tsx
index ce40b87e4e512..e9231758c1fe3 100644
--- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/multi_page_layout/components/page_steps/confirm_data.tsx
+++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/multi_page_layout/components/page_steps/confirm_data.tsx
@@ -12,17 +12,35 @@ import { useStartServices } from '../../../../../../hooks';
import {
ConfirmIncomingDataWithPreview,
+ ConfirmIncomingDataStandalone,
CreatePackagePolicyFinalBottomBar,
NotObscuredByBottomBar,
} from '..';
export const ConfirmDataPageStep: React.FC = (props) => {
- const { enrolledAgentIds, packageInfo } = props;
+ const { enrolledAgentIds, packageInfo, isManaged } = props;
const core = useStartServices();
const [agentDataConfirmed, setAgentDataConfirmed] = useState(false);
const { docLinks } = core;
const troubleshootLink = docLinks.links.fleet.troubleshooting;
+
+ const bottomBar = (
+ <>
+
+
+ >
+ );
+
+ if (!isManaged) {
+ return (
+ <>
+
+ {bottomBar}
+ >
+ );
+ }
+
return (
<>
= (props) =
troubleshootLink={troubleshootLink}
/>
- {!!agentDataConfirmed && (
- <>
-
-
- >
- )}
+ {!!agentDataConfirmed && bottomBar}
>
);
};
diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/multi_page_layout/components/page_steps/install_agent/install_agent_standalone.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/multi_page_layout/components/page_steps/install_agent/install_agent_standalone.tsx
index 2f2fd06665232..3f84a95239beb 100644
--- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/multi_page_layout/components/page_steps/install_agent/install_agent_standalone.tsx
+++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/multi_page_layout/components/page_steps/install_agent/install_agent_standalone.tsx
@@ -13,7 +13,7 @@ import { safeDump } from 'js-yaml';
import type { FullAgentPolicy } from '../../../../../../../../../../common/types/models/agent_policy';
import {
- CreatePackagePolicyBottomBar,
+ AgentStandaloneBottomBar,
StandaloneModeWarningCallout,
NotObscuredByBottomBar,
} from '../..';
@@ -30,7 +30,6 @@ import {
} from '../../../../../../../../../hooks';
import {
InstallStandaloneAgentStep,
- AgentEnrollmentConfirmationStep,
ConfigureStandaloneAgentStep,
} from '../../../../../../../../../components/agent_enrollment_flyout/steps';
import { StandaloneInstructions } from '../../../../../../../../../components/enrollment_instructions';
@@ -38,12 +37,10 @@ import { StandaloneInstructions } from '../../../../../../../../../components/en
import type { InstallAgentPageProps } from './types';
export const InstallElasticAgentStandalonePageStep: React.FC = (props) => {
- const { onBack, onNext, setIsManaged, agentPolicy, enrolledAgentIds } = props;
+ const { setIsManaged, agentPolicy, cancelUrl, onNext, cancelClickHandler } = props;
const core = useStartServices();
const kibanaVersion = useKibanaVersion();
- const { docLinks } = core;
const [yaml, setYaml] = useState('');
- const link = docLinks.links.fleet.troubleshooting;
const [commandCopied, setCommandCopied] = useState(false);
const [policyCopied, setPolicyCopied] = useState(false);
const [fullAgentPolicy, setFullAgentPolicy] = useState();
@@ -114,12 +111,6 @@ export const InstallElasticAgentStandalonePageStep: React.FC setCommandCopied(true),
}),
- AgentEnrollmentConfirmationStep({
- selectedPolicyId: agentPolicy?.id,
- troubleshootLink: link,
- agentCount: enrolledAgentIds.length,
- showLoading: true,
- }),
];
return (
@@ -127,18 +118,13 @@ export const InstallElasticAgentStandalonePageStep: React.FC
- {!!enrolledAgentIds.length && (
+ {commandCopied && (
<>
-
- }
+ cancelClickHandler={cancelClickHandler}
/>
>
)}
diff --git a/x-pack/plugins/fleet/public/components/agent_enrollment_flyout/steps/configure_standalone_agent_step.tsx b/x-pack/plugins/fleet/public/components/agent_enrollment_flyout/steps/configure_standalone_agent_step.tsx
index decee6601329a..35df59b3bdf19 100644
--- a/x-pack/plugins/fleet/public/components/agent_enrollment_flyout/steps/configure_standalone_agent_step.tsx
+++ b/x-pack/plugins/fleet/public/components/agent_enrollment_flyout/steps/configure_standalone_agent_step.tsx
@@ -103,7 +103,15 @@ export const ConfigureStandaloneAgentStep = ({
-
+ {/* eslint-disable-next-line @elastic/eui/href-or-on-click */}
+ {
+ if (onCopy) onCopy();
+ }}
+ isDisabled={!downloadLink}
+ >
<>{downloadMsg}>