From 0e46e50f1b83836e9065ed4c12819c5c80f1310d Mon Sep 17 00:00:00 2001 From: Jean-Louis Leysens Date: Thu, 24 Jun 2021 11:42:02 +0200 Subject: [PATCH 1/2] update the UI breadcrumbs in create policy package to always look like it came from integrations --- .../create_package_policy_page/index.tsx | 26 +++++-------------- 1 file changed, 7 insertions(+), 19 deletions(-) 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 b3b0d6ed51cb4..3fbaea67d8973 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 @@ -495,17 +495,13 @@ export const CreatePackagePolicyPage: React.FunctionComponent = () => { onCancel={() => setFormState('VALID')} /> )} - {from === 'package' - ? packageInfo && ( - - ) - : agentPolicy && ( - - )} + {packageInfo && ( + + )} @@ -559,14 +555,6 @@ export const CreatePackagePolicyPage: React.FunctionComponent = () => { ); }; -const PolicyBreadcrumb: React.FunctionComponent<{ - policyName: string; - policyId: string; -}> = ({ policyName, policyId }) => { - useBreadcrumbs('add_integration_from_policy', { policyName, policyId }); - return null; -}; - const IntegrationBreadcrumb: React.FunctionComponent<{ pkgTitle: string; pkgkey: string; From 265aa6350c5a595a810d78f92df001c2bd7c8e07 Mon Sep 17 00:00:00 2001 From: Jean-Louis Leysens Date: Thu, 24 Jun 2021 11:43:34 +0200 Subject: [PATCH 2/2] added comment about the removal of a path from fleet --- x-pack/plugins/fleet/public/constants/page_paths.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/x-pack/plugins/fleet/public/constants/page_paths.ts b/x-pack/plugins/fleet/public/constants/page_paths.ts index 1688a396cd5a1..317241358a381 100644 --- a/x-pack/plugins/fleet/public/constants/page_paths.ts +++ b/x-pack/plugins/fleet/public/constants/page_paths.ts @@ -54,6 +54,7 @@ export const FLEET_ROUTING_PATHS = { policy_details: '/policies/:policyId/:tabId?', policy_details_settings: '/policies/:policyId/settings', edit_integration: '/policies/:policyId/edit-integration/:packagePolicyId', + // TODO: Review uses and remove if it is no longer used or linked to in any UX flows add_integration_from_policy: '/policies/:policyId/add-integration', enrollment_tokens: '/enrollment-tokens', data_streams: '/data-streams',