Skip to content

Commit

Permalink
Add code to display/hide UX section when appropriate.
Browse files Browse the repository at this point in the history
  • Loading branch information
justinkambic committed Oct 16, 2020
1 parent db4184f commit e5065f3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export function DataSections({ bucketSize, hasData, absoluteTime, relativeTime }
/>
</EuiFlexItem>
)}
{hasData?.ux && (
{hasData?.ux?.hasData && (
<EuiFlexItem grow={false}>
<UXSection
serviceName={(hasData.ux as UXHasDataResponse).serviceName as string}
Expand Down
2 changes: 2 additions & 0 deletions x-pack/plugins/observability/public/pages/overview/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,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]?.hasData;
}
return !hasData[id];
});
Expand Down

0 comments on commit e5065f3

Please sign in to comment.