From 9ca0b2baf8939ecbbb383ae0b3559d40b6615828 Mon Sep 17 00:00:00 2001 From: Justin Kambic Date: Wed, 21 Oct 2020 09:15:58 -0400 Subject: [PATCH] [O11y Overview] Add code to display/hide UX section when appropriate (#80873) (#81307) * Add code to display/hide UX section when appropriate. * Suppress errors with link to dedicated issue. * Fix typo in call to action. * Remove type error suppression. --- .../observability/public/pages/overview/data_sections.tsx | 2 +- .../observability/public/pages/overview/empty_section.ts | 2 +- x-pack/plugins/observability/public/pages/overview/index.tsx | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/x-pack/plugins/observability/public/pages/overview/data_sections.tsx b/x-pack/plugins/observability/public/pages/overview/data_sections.tsx index dfb335902b7b87..2d3142d4e5804c 100644 --- a/x-pack/plugins/observability/public/pages/overview/data_sections.tsx +++ b/x-pack/plugins/observability/public/pages/overview/data_sections.tsx @@ -64,7 +64,7 @@ export function DataSections({ bucketSize, hasData, absoluteTime, relativeTime } /> )} - {hasData?.ux && ( + {(hasData.ux as UXHasDataResponse).hasData && ( ; @@ -87,6 +87,8 @@ export function OverviewPage({ routeParams }: Props) { const appEmptySections = getEmptySections({ core }).filter(({ id }) => { if (id === 'alert') { return alertStatus !== FETCH_STATUS.FAILURE && !alerts.length; + } else if (id === 'ux') { + return !(hasData[id] as UXHasDataResponse).hasData; } return !hasData[id]; });