From 8a81c046f7104549568aa419ef4dde3860e461db Mon Sep 17 00:00:00 2001 From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Date: Sat, 9 Nov 2024 01:20:08 +1100 Subject: [PATCH] [8.x] [Entity Store] Add enablement errors to entity store management page (#198668) (#198785) # Backport This will backport the following commits from `main` to `8.x`: - [[Entity Store] Add enablement errors to entity store management page (#198668)](https://github.com/elastic/kibana/pull/198668) ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) Co-authored-by: Tiago Vila Verde --- .../components/dashboard_panels.tsx | 2 +- .../pages/entity_store_management_page.tsx | 48 +++++++++++++++++++ 2 files changed, 49 insertions(+), 1 deletion(-) diff --git a/x-pack/plugins/security_solution/public/entity_analytics/components/entity_store/components/dashboard_panels.tsx b/x-pack/plugins/security_solution/public/entity_analytics/components/entity_store/components/dashboard_panels.tsx index 63ffcf7b9eae1..d70eb9fe34b51 100644 --- a/x-pack/plugins/security_solution/public/entity_analytics/components/entity_store/components/dashboard_panels.tsx +++ b/x-pack/plugins/security_solution/public/entity_analytics/components/entity_store/components/dashboard_panels.tsx @@ -55,7 +55,7 @@ const EntityStoreDashboardPanelsComponent = () => { const { mutate: initRiskEngine } = useInitRiskEngineMutation(); - const callouts = entityStore.errors.map((err, i) => ( + const callouts = entityStore.errors.map((err) => ( { stopEntityEngineMutation.isLoading || deleteEntityEngineMutation.isLoading; + const callouts = entityStoreStatus.errors.map((error) => ( + + } + color="danger" + iconType="alert" + > +

{error.message}

+
+ )); + return ( <> { + {initEntityEngineMutation.isError && ( + + } + color="danger" + iconType="alert" + > +

+ {(initEntityEngineMutation.error as { body: { message: string } }).body.message} +

+
+ )} + {deleteEntityEngineMutation.isError && ( + + } + color="danger" + iconType="alert" + > +

+ {(deleteEntityEngineMutation.error as { body: { message: string } }).body.message} +

+
+ )} + {callouts} {!isEntityStoreFeatureFlagDisabled && privileges?.has_all_required &&