@@ -8,6 +8,7 @@ import React, { useCallback, useEffect } from 'react';
88import { useInterval } from 'react-use' ;
99
1010import { EuiFlexGroup , EuiFlexItem } from '@elastic/eui' ;
11+ import { AutoSizer } from '../../../../components/auto_sizer' ;
1112import { convertIntervalToString } from '../../../../utils/convert_interval_to_string' ;
1213import { NodesOverview } from './nodes_overview' ;
1314import { calculateBoundsFromNodes } from '../lib/calculate_bounds_from_nodes' ;
@@ -110,37 +111,44 @@ export const Layout = () => {
110111 </ EuiFlexItem >
111112 </ EuiFlexGroup >
112113 </ TopActionContainer >
113- < NodesOverview
114- nodes = { nodes }
115- options = { options }
116- nodeType = { nodeType }
117- loading = { loading }
118- reload = { reload }
119- onDrilldown = { applyFilterQuery }
120- currentTime = { currentTime }
121- view = { view }
122- autoBounds = { autoBounds }
123- boundsOverride = { boundsOverride }
124- formatter = { formatter }
125- />
126- < BottomActionContainer >
127- < EuiFlexGroup justifyContent = "spaceBetween" >
128- < EuiFlexItem grow = { false } >
129- < SavedViewsToolbarControls viewState = { viewState } />
130- </ EuiFlexItem >
131- < EuiFlexItem grow = { false } style = { { position : 'relative' , minWidth : 400 } } >
132- < Legend
114+ < AutoSizer bounds >
115+ { ( { measureRef, bounds : { height = 0 } } ) => (
116+ < >
117+ < NodesOverview
118+ nodes = { nodes }
119+ options = { options }
120+ nodeType = { nodeType }
121+ loading = { loading }
122+ reload = { reload }
123+ onDrilldown = { applyFilterQuery }
124+ currentTime = { currentTime }
125+ view = { view }
126+ autoBounds = { autoBounds }
127+ boundsOverride = { boundsOverride }
133128 formatter = { formatter }
134- bounds = { bounds }
135- dataBounds = { dataBounds }
136- legend = { options . legend }
129+ bottomMargin = { height }
137130 />
138- </ EuiFlexItem >
139- < EuiFlexItem grow = { false } >
140- < IntervalLabel intervalAsString = { intervalAsString } />
141- </ EuiFlexItem >
142- </ EuiFlexGroup >
143- </ BottomActionContainer >
131+ < BottomActionContainer ref = { measureRef } >
132+ < EuiFlexGroup justifyContent = "spaceBetween" >
133+ < EuiFlexItem grow = { false } >
134+ < SavedViewsToolbarControls viewState = { viewState } />
135+ </ EuiFlexItem >
136+ < EuiFlexItem grow = { false } style = { { position : 'relative' , minWidth : 400 } } >
137+ < Legend
138+ formatter = { formatter }
139+ bounds = { bounds }
140+ dataBounds = { dataBounds }
141+ legend = { options . legend }
142+ />
143+ </ EuiFlexItem >
144+ < EuiFlexItem grow = { false } >
145+ < IntervalLabel intervalAsString = { intervalAsString } />
146+ </ EuiFlexItem >
147+ </ EuiFlexGroup >
148+ </ BottomActionContainer >
149+ </ >
150+ ) }
151+ </ AutoSizer >
144152 </ MainContainer >
145153 </ PageContent >
146154 </ >
@@ -159,9 +167,9 @@ const TopActionContainer = euiStyled.div`
159167const BottomActionContainer = euiStyled . div `
160168 background-color: ${ ( props ) => props . theme . eui . euiPageBackgroundColor } ;
161169 padding: ${ ( props ) => props . theme . eui . paddingSizes . m } ${ ( props ) =>
162- props . theme . eui . paddingSizes . m } ${ ( props ) => props . theme . eui . paddingSizes . s } ;
163- position: absolute ;
170+ props . theme . eui . paddingSizes . m } ;
171+ position: fixed ;
164172 left: 0;
165- bottom: 4px ;
173+ bottom: 0 ;
166174 right: 0;
167175` ;
0 commit comments