@@ -2,10 +2,12 @@ import React from 'react';
22
33import type { Settings } from '@gravity-ui/react-data-table' ;
44import type { ControlGroupOption } from '@gravity-ui/uikit' ;
5- import { ClipboardButton , RadioButton } from '@gravity-ui/uikit' ;
5+ import { ClipboardButton , Flex , RadioButton , Text } from '@gravity-ui/uikit' ;
66
7+ import { EmptyState } from '../../../../components/EmptyState' ;
78import EnableFullscreenButton from '../../../../components/EnableFullscreenButton/EnableFullscreenButton' ;
89import Fullscreen from '../../../../components/Fullscreen/Fullscreen' ;
10+ import { Illustration } from '../../../../components/Illustration' ;
911import { LoaderWrapper } from '../../../../components/LoaderWrapper/LoaderWrapper' ;
1012import { QueryExecutionStatus } from '../../../../components/QueryExecutionStatus' ;
1113import { disableFullscreen } from '../../../../store/reducers/fullscreen' ;
@@ -25,7 +27,6 @@ import {Ast} from './components/Ast/Ast';
2527import { Graph } from './components/Graph/Graph' ;
2628import { QueryInfoDropdown } from './components/QueryInfoDropdown/QueryInfoDropdown' ;
2729import { QueryJSONViewer } from './components/QueryJSONViewer/QueryJSONViewer' ;
28- import { QueryResultError } from './components/QueryResultError/QueryResultError' ;
2930import { ResultSetsViewer } from './components/ResultSetsViewer/ResultSetsViewer' ;
3031import { SimplifiedPlan } from './components/SimplifiedPlan/SimplifiedPlan' ;
3132import { StubMessage } from './components/Stub/Stub' ;
@@ -229,7 +230,16 @@ export function QueryResultViewer({
229230 }
230231
231232 if ( error ) {
232- return < QueryResultError error = { error } /> ;
233+ return (
234+ < Flex justifyContent = "center" alignItems = "center" width = "100%" >
235+ < EmptyState
236+ size = "s"
237+ image = { < Illustration name = "error" /> }
238+ title = { i18n ( 'error.title' ) }
239+ description = { < Text color = "complementary" > { i18n ( 'error.description' ) } </ Text > }
240+ />
241+ </ Flex >
242+ ) ;
233243 }
234244
235245 if ( activeSection === RESULT_OPTIONS_IDS . schema ) {
@@ -269,17 +279,15 @@ export function QueryResultViewer({
269279 const renderLeftControls = ( ) => {
270280 return (
271281 < div className = { b ( 'controls-left' ) } >
272- { ! error && (
273- < React . Fragment >
274- { radioButtonOptions . length && activeSection ? (
275- < RadioButton
276- options = { radioButtonOptions }
277- value = { activeSection }
278- onUpdate = { onSelectSection }
279- />
280- ) : null }
281- </ React . Fragment >
282- ) }
282+ < React . Fragment >
283+ { radioButtonOptions . length && activeSection ? (
284+ < RadioButton
285+ options = { radioButtonOptions }
286+ value = { activeSection }
287+ onUpdate = { onSelectSection }
288+ />
289+ ) : null }
290+ </ React . Fragment >
283291 < QueryExecutionStatus error = { error } loading = { isLoading } />
284292 { data ?. traceId && isExecute ? < TraceButton traceId = { data . traceId } /> : null }
285293 </ div >
0 commit comments