@@ -12,39 +12,8 @@ import 'codemirror/addon/hint/show-hint';
1212import 'codemirror/addon/hint/sql-hint' ;
1313
1414import './QueryBox.less' ;
15- import SuccessIcon from '../icons/success-query.svg' ;
16- import ErrorIcon from '../icons/error-query.svg' ;
1715import HelpIcon from '../icons/help.svg' ;
1816
19- function ResultInfo ( { result } ) {
20- if ( ! result ) {
21- return null ;
22- }
23-
24- if ( result . response && result . response . meta ) {
25- return (
26- < span className = "meta meta-success" >
27- < SuccessIcon className = "big-icon" /> Showing rows (query took{ ' ' }
28- { result . response . meta . elapsedTime / 1000 } seconds)
29- </ span >
30- ) ;
31- }
32-
33- if ( result . errorMsg ) {
34- return (
35- < span className = "meta meta-error" >
36- < ErrorIcon className = "big-icon" /> Query Failed - { result . errorMsg }
37- </ span >
38- ) ;
39- }
40-
41- return null ;
42- }
43-
44- ResultInfo . propTypes = {
45- result : PropTypes . object
46- } ;
47-
4817class QueryBox extends Component {
4918 constructor ( props ) {
5019 super ( props ) ;
@@ -95,7 +64,6 @@ class QueryBox extends Component {
9564 }
9665
9766 render ( ) {
98- const { result } = this . props ;
9967 const { codeMirrorTables } = this . state ;
10068
10169 const options = {
@@ -138,9 +106,7 @@ class QueryBox extends Component {
138106 </ Col >
139107 </ Row >
140108 < Row className = "button-row" >
141- < Col xs = { 7 } className = "meta-wrapper no-spacing" >
142- < ResultInfo result = { result } />
143- </ Col >
109+ < Col xs = { 7 } />
144110 < Col xs = { 5 } className = "buttons-wrapper no-spacing" >
145111 < Button
146112 bsStyle = "gbpl-secondary-tint-2-link"
@@ -179,7 +145,6 @@ QueryBox.propTypes = {
179145 ) . isRequired
180146 } )
181147 ) ,
182- result : PropTypes . object ,
183148 enabled : PropTypes . bool ,
184149 handleTextChange : PropTypes . func . isRequired ,
185150 handleSubmit : PropTypes . func . isRequired ,
0 commit comments