From 181fa7a1e3baeb3892f5f0799a0c6ac190141173 Mon Sep 17 00:00:00 2001 From: sumukhswamy Date: Fri, 8 Sep 2023 11:23:24 -0700 Subject: [PATCH] changes Signed-off-by: sumukhswamy --- .../event_analytics/explorer/explorer.scss | 21 ++ .../event_analytics/explorer/explorer.tsx | 274 +++++++++--------- 2 files changed, 162 insertions(+), 133 deletions(-) diff --git a/public/components/event_analytics/explorer/explorer.scss b/public/components/event_analytics/explorer/explorer.scss index 9d73808d27..b679bcc1ed 100644 --- a/public/components/event_analytics/explorer/explorer.scss +++ b/public/components/event_analytics/explorer/explorer.scss @@ -17,3 +17,24 @@ .mainContentTabs .euiResizableContainer { height: calc(100vh - 298px); } + +$osdHeaderOffset: $euiHeaderHeightCompensation; + +.euiPage--paddingMedium .euiPageSideBar { + max-width: 462px; + min-width: 400px; + padding-left: 0%; + padding-right:0%; +} + +.deLayout { + height: calc(100vh - #{$osdHeaderOffset}); + + &__canvas { + height: 100%; + } +} + +.headerIsExpanded .deLayout { + height: calc(100vh - #{$osdHeaderOffset * 2}); +} \ No newline at end of file diff --git a/public/components/event_analytics/explorer/explorer.tsx b/public/components/event_analytics/explorer/explorer.tsx index 97beaba75c..8e299a6b66 100644 --- a/public/components/event_analytics/explorer/explorer.tsx +++ b/public/components/event_analytics/explorer/explorer.tsx @@ -18,6 +18,8 @@ import { EuiText, EuiTitle, EuiPageSideBar, + EuiPageBody, + EuiPage, } from '@elastic/eui'; import { FormattedMessage } from '@osd/i18n/react'; import classNames from 'classnames'; @@ -477,146 +479,152 @@ export const Explorer = ({ const mainContent = useMemo(() => { return ( <> - - {!isSidebarClosed && ( -
- -
- )} -
-
- {explorerData && !isEmpty(explorerData.jsonData) ? ( -
-
- {countDistribution?.data && !isLiveTailOnRef.current && ( - <> - - - { - return sum + n; - }, - 0 - )} - showResetButton={false} - onResetQuery={() => {}} - /> - - - { - const intervalOptionsIndex = timeIntervalOptions.findIndex( - (item) => item.value === selectedIntrv - ); - const intrv = selectedIntrv.replace(/^auto_/, ''); - getCountVisualizations(intrv); - selectedIntervalRef.current = timeIntervalOptions[intervalOptionsIndex]; - getPatterns(intrv, getErrorHandler('Error fetching patterns')); - }} - stateInterval={selectedIntervalRef.current?.value} - /> - - - - - - - )} - -
-

- -

-
- {isLiveTailOnRef.current && ( - <> - - - - -   Live streaming - - - {}} - /> - - since {liveTimestamp} - - - - )} - {countDistribution?.data && ( - -

- Events - - {' '} - ( - {reduce( + + + {!isSidebarClosed && ( +
+ +
+ )} +
+ + {explorerData && !isEmpty(explorerData.jsonData) ? ( +
+
+ {countDistribution?.data && !isLiveTailOnRef.current && ( + <> + + + { return sum + n; }, 0 )} - ) - -

-
- )} - - - - ​ - -
-
+ showResetButton={false} + onResetQuery={() => {}} + /> + + + { + const intervalOptionsIndex = timeIntervalOptions.findIndex( + (item) => item.value === selectedIntrv + ); + const intrv = selectedIntrv.replace(/^auto_/, ''); + getCountVisualizations(intrv); + selectedIntervalRef.current = + timeIntervalOptions[intervalOptionsIndex]; + getPatterns(intrv, getErrorHandler('Error fetching patterns')); + }} + stateInterval={selectedIntervalRef.current?.value} + /> + + + + + + + )} + +
+

+ +

+
+ {isLiveTailOnRef.current && ( + <> + + + + +   Live streaming + + + {}} + /> + + since {liveTimestamp} + + + + )} + {countDistribution?.data && ( + +

+ Events + + {' '} + ( + {reduce( + countDistribution.data['count()'], + (sum, n) => { + return sum + n; + }, + 0 + )} + ) + +

+
+ )} + + + + ​ + +
+
+
-
- ) : ( - - )} - + ) : ( + + )} + + ); }, [