4
4
*/
5
5
6
6
import React , { useEffect , useState , useRef , useCallback } from 'react' ;
7
- import { EuiFlexGroup , EuiFlexItem , EuiPanel } from '@elastic/eui' ;
7
+ import { EuiPanel } from '@elastic/eui' ;
8
8
import { TopNav } from './top_nav' ;
9
9
import { ViewProps } from '../../../../../data_explorer/public' ;
10
10
import { DiscoverTable } from './discover_table' ;
@@ -20,6 +20,7 @@ import { useOpenSearchDashboards } from '../../../../../opensearch_dashboards_re
20
20
import { filterColumns } from '../utils/filter_columns' ;
21
21
import { DEFAULT_COLUMNS_SETTING } from '../../../../common' ;
22
22
import './discover_canvas.scss' ;
23
+
23
24
// eslint-disable-next-line import/no-default-export
24
25
export default function DiscoverCanvas ( { setHeaderActionMenu, history } : ViewProps ) {
25
26
const { data$, refetch$, indexPattern } = useDiscoverContext ( ) ;
@@ -77,38 +78,36 @@ export default function DiscoverCanvas({ setHeaderActionMenu, history }: ViewPro
77
78
const timeField = indexPattern ?. timeFieldName ? indexPattern . timeFieldName : undefined ;
78
79
79
80
return (
80
- < EuiFlexGroup direction = "column" gutterSize = "none" className = "dscCanvas" >
81
- < EuiFlexItem grow = { false } >
82
- < TopNav
83
- opts = { {
84
- setHeaderActionMenu,
85
- onQuerySubmit,
86
- } }
87
- />
88
- </ EuiFlexItem >
81
+ < EuiPanel
82
+ hasBorder = { false }
83
+ hasShadow = { false }
84
+ color = "transparent"
85
+ paddingSize = "none"
86
+ className = "dscCanvas"
87
+ >
88
+ < TopNav
89
+ opts = { {
90
+ setHeaderActionMenu,
91
+ onQuerySubmit,
92
+ } }
93
+ />
89
94
{ status === ResultStatus . NO_RESULTS && (
90
- < EuiFlexItem >
91
- < DiscoverNoResults timeFieldName = { timeField } queryLanguage = { '' } />
92
- </ EuiFlexItem >
95
+ < DiscoverNoResults timeFieldName = { timeField } queryLanguage = { '' } />
93
96
) }
94
97
{ status === ResultStatus . UNINITIALIZED && (
95
98
< DiscoverUninitialized onRefresh = { ( ) => refetch$ . next ( ) } />
96
99
) }
97
100
{ status === ResultStatus . LOADING && < LoadingSpinner /> }
98
101
{ status === ResultStatus . READY && (
99
102
< >
100
- < EuiFlexItem grow = { false } >
101
- < EuiPanel hasBorder = { false } hasShadow = { false } color = "transparent" paddingSize = "s" >
102
- < EuiPanel >
103
- < DiscoverChartContainer { ...fetchState } />
104
- </ EuiPanel >
103
+ < EuiPanel hasBorder = { false } hasShadow = { false } color = "transparent" paddingSize = "s" >
104
+ < EuiPanel >
105
+ < DiscoverChartContainer { ...fetchState } />
105
106
</ EuiPanel >
106
- </ EuiFlexItem >
107
- < EuiFlexItem >
108
- < DiscoverTable history = { history } />
109
- </ EuiFlexItem >
107
+ </ EuiPanel >
108
+ < DiscoverTable history = { history } />
110
109
</ >
111
110
) }
112
- </ EuiFlexGroup >
111
+ </ EuiPanel >
113
112
) ;
114
113
}
0 commit comments