@@ -6,11 +6,9 @@ import {
66 FlexBox ,
77 FlexDirection ,
88 IconFont ,
9- Overlay ,
109 SelectGroup ,
1110 SpinnerContainer ,
1211 TechnoSpinner ,
13- TextArea ,
1412} from '@influxdata/clockface'
1513
1614// Components
@@ -39,7 +37,6 @@ import {RemoteDataState, SimpleTableViewProperties} from 'src/types'
3937
4038// Utils
4139import { bytesFormatter } from 'src/shared/copy/notifications'
42- import { sqlAsFlux } from 'src/shared/contexts/query/preprocessing'
4340
4441import './Results.scss'
4542import { LanguageType } from './resources'
@@ -161,22 +158,6 @@ const TableResults: FC<{search: string}> = ({search}) => {
161158 )
162159}
163160
164- const GraphSubQueryOverlay : FC < { text : string ; onClose : ( ) => void } > = ( {
165- text,
166- onClose,
167- } ) => (
168- < Overlay . Container maxWidth = { 600 } >
169- < Overlay . Header title = "Subquery for graph data:" onDismiss = { onClose } />
170- < Overlay . Body >
171- < TextArea
172- testID = "data-explorer-results--graph-subquery"
173- value = { text }
174- readOnly
175- />
176- </ Overlay . Body >
177- </ Overlay . Container >
178- )
179-
180161const GraphResults : FC = ( ) => {
181162 const { view} = useContext ( ResultsViewContext )
182163 const { result, status} = useContext ( ChildResultsContext )
@@ -198,19 +179,12 @@ const GraphResults: FC = () => {
198179}
199180
200181const WrappedOptions : FC = ( ) => {
201- const [ showOverlay , setShowOverlay ] = useState ( false )
202- const { result, queryModifers} = useContext ( ChildResultsContext )
182+ const { result} = useContext ( ChildResultsContext )
203183 const { view, setView, selectViewOptions, viewOptions, selectedViewOptions} =
204184 useContext ( ResultsViewContext )
205- const { resource, query : text , selection } = useContext ( PersistanceContext )
185+ const { resource} = useContext ( PersistanceContext )
206186 const dataExists = ! ! result ?. parsed
207187
208- const subquery = useMemo (
209- ( ) => sqlAsFlux ( text , selection ?. bucket , queryModifers ) ,
210- [ text , selection ?. bucket , queryModifers ]
211- )
212- const seeGraphSubquery = ( ) => setShowOverlay ( true )
213-
214188 const updateChildResults = update => {
215189 setView ( {
216190 ...view ,
@@ -232,18 +206,11 @@ const WrappedOptions: FC = () => {
232206 selectViewOptions = { selectViewOptions }
233207 allViewOptions = { viewOptions }
234208 selectedViewOptions = { selectedViewOptions }
235- seeSubquery = { selection ?. bucket ? seeGraphSubquery : null }
236209 />
237210 ) : null
238211
239212 return (
240213 < >
241- < Overlay visible = { showOverlay } >
242- < GraphSubQueryOverlay
243- text = { subquery }
244- onClose = { ( ) => setShowOverlay ( false ) }
245- />
246- </ Overlay >
247214 { subQueryOptions }
248215 < ViewOptions
249216 properties = { view . properties }
0 commit comments