diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/index.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/index.tsx
index 1f7fa0ceb354..5e00bce5d6c6 100644
--- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/index.tsx
+++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/index.tsx
@@ -20,6 +20,7 @@ import {
EuiFlexItem,
EuiSpacer,
EuiLink,
+ EuiErrorBoundary,
} from '@elastic/eui';
import type { EuiStepProps } from '@elastic/eui/src/components/steps/step';
import type { ApplicationStart } from 'kibana/public';
@@ -503,70 +504,75 @@ export const CreatePackagePolicyPage: React.FunctionComponent = () => {
return (
- {formState === 'CONFIRM' && agentPolicy && (
- setFormState('VALID')}
- />
- )}
- {packageInfo && (
-
- )}
-
-
-
-
-
-
- {!isLoadingAgentPolicyStep && agentPolicy && packageInfo && formState === 'INVALID' ? (
-
- ) : null}
-
-
-
-
- {/* eslint-disable-next-line @elastic/eui/href-or-on-click */}
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+ {formState === 'CONFIRM' && agentPolicy && (
+ setFormState('VALID')}
+ />
+ )}
+ {packageInfo && (
+
+ )}
+
+
+
+
+
+
+ {!isLoadingAgentPolicyStep &&
+ agentPolicy &&
+ packageInfo &&
+ formState === 'INVALID' ? (
+
+ ) : null}
+
+
+
+
+ {/* eslint-disable-next-line @elastic/eui/href-or-on-click */}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
);
};
diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/edit_package_policy_page/index.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/edit_package_policy_page/index.tsx
index a36bc988da89..040070bcff7c 100644
--- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/edit_package_policy_page/index.tsx
+++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/edit_package_policy_page/index.tsx
@@ -25,6 +25,7 @@ import {
EuiFlyoutBody,
EuiFlyoutHeader,
EuiTitle,
+ EuiErrorBoundary,
} from '@elastic/eui';
import styled from 'styled-components';
@@ -510,93 +511,95 @@ export const EditPackagePolicyForm = memo<{
return (
- {isLoadingData ? (
-
- ) : loadingError || !agentPolicy || !packageInfo ? (
-
- }
- error={
- loadingError ||
- i18n.translate('xpack.fleet.editPackagePolicy.errorLoadingDataMessage', {
- defaultMessage: 'There was an error loading this integration information',
- })
- }
- />
- ) : (
- <>
-
+ {isLoadingData ? (
+
+ ) : loadingError || !agentPolicy || !packageInfo ? (
+
+ }
+ error={
+ loadingError ||
+ i18n.translate('xpack.fleet.editPackagePolicy.errorLoadingDataMessage', {
+ defaultMessage: 'There was an error loading this integration information',
+ })
+ }
/>
- {formState === 'CONFIRM' && (
- setFormState('VALID')}
+ ) : (
+ <>
+
- )}
- {isUpgrade && dryRunData && (
- <>
-
-
- >
- )}
- {configurePackage}
- {/* Extra space to accomodate the EuiBottomBar height */}
-
-
-
-
-
- {agentPolicy && packageInfo && formState === 'INVALID' ? (
-
- ) : null}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- >
- )}
+ {formState === 'CONFIRM' && (
+ setFormState('VALID')}
+ />
+ )}
+ {isUpgrade && dryRunData && (
+ <>
+
+
+ >
+ )}
+ {configurePackage}
+ {/* Extra space to accomodate the EuiBottomBar height */}
+
+
+
+
+
+ {agentPolicy && packageInfo && formState === 'INVALID' ? (
+
+ ) : null}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ >
+ )}
+
);
});