diff --git a/caravel/assets/javascripts/SqlLab/components/LeftPane.jsx b/caravel/assets/javascripts/SqlLab/components/LeftPane.jsx index fc2190a2bf..e4ff051757 100644 --- a/caravel/assets/javascripts/SqlLab/components/LeftPane.jsx +++ b/caravel/assets/javascripts/SqlLab/components/LeftPane.jsx @@ -5,8 +5,6 @@ import { bindActionCreators } from 'redux'; import * as Actions from '../actions'; import QueryLink from './QueryLink'; -import 'react-select/dist/react-select.css'; - const LeftPane = (props) => { let queryElements; if (props.workspaceQueries.length > 0) { diff --git a/caravel/assets/javascripts/SqlLab/components/QueryLink.jsx b/caravel/assets/javascripts/SqlLab/components/QueryLink.jsx index f59390effb..da9f0b5d21 100644 --- a/caravel/assets/javascripts/SqlLab/components/QueryLink.jsx +++ b/caravel/assets/javascripts/SqlLab/components/QueryLink.jsx @@ -5,9 +5,6 @@ import { bindActionCreators } from 'redux'; import * as Actions from '../actions'; import shortid from 'shortid'; -// CSS -import 'react-select/dist/react-select.css'; - class QueryLink extends React.Component { popTab() { const qe = { diff --git a/caravel/assets/javascripts/SqlLab/components/SouthPane.jsx b/caravel/assets/javascripts/SqlLab/components/SouthPane.jsx index 4c078fbf4e..3957f5932a 100644 --- a/caravel/assets/javascripts/SqlLab/components/SouthPane.jsx +++ b/caravel/assets/javascripts/SqlLab/components/SouthPane.jsx @@ -1,4 +1,4 @@ -import { Alert, Panel, Tab, Tabs } from 'react-bootstrap'; +import { Alert, Tab, Tabs } from 'react-bootstrap'; import QueryHistory from './QueryHistory'; import ResultSet from './ResultSet'; import React from 'react'; @@ -21,16 +21,12 @@ const SouthPane = function (props) { return ( - -
- {results} -
-
+
+ {results} +
- - - +
); diff --git a/caravel/assets/javascripts/SqlLab/components/SqlEditor.jsx b/caravel/assets/javascripts/SqlLab/components/SqlEditor.jsx index 0c3fab7197..a76f92e290 100644 --- a/caravel/assets/javascripts/SqlLab/components/SqlEditor.jsx +++ b/caravel/assets/javascripts/SqlLab/components/SqlEditor.jsx @@ -4,6 +4,7 @@ import React from 'react'; import { Button, ButtonGroup, + Col, FormGroup, InputGroup, Form, @@ -12,6 +13,7 @@ import { Label, MenuItem, OverlayTrigger, + Row, Tooltip, } from 'react-bootstrap'; @@ -29,10 +31,7 @@ import ButtonWithTooltip from './ButtonWithTooltip'; import SouthPane from './SouthPane'; import Timer from './Timer'; -import SqlEditorTopToolbar from './SqlEditorTopToolbar'; - -// CSS -import 'react-select/dist/react-select.css'; +import SqlEditorLeft from './SqlEditorLeft'; class SqlEditor extends React.Component { constructor(props) { @@ -246,23 +245,29 @@ class SqlEditor extends React.Component {
- - - {editorBottomBar} -
- + + + + + + + {editorBottomBar} +
+ + +
diff --git a/caravel/assets/javascripts/SqlLab/components/SqlEditorTopToolbar.jsx b/caravel/assets/javascripts/SqlLab/components/SqlEditorLeft.jsx similarity index 70% rename from caravel/assets/javascripts/SqlLab/components/SqlEditorTopToolbar.jsx rename to caravel/assets/javascripts/SqlLab/components/SqlEditorLeft.jsx index b1cff7f3f2..7543c8ca8e 100644 --- a/caravel/assets/javascripts/SqlLab/components/SqlEditorTopToolbar.jsx +++ b/caravel/assets/javascripts/SqlLab/components/SqlEditorLeft.jsx @@ -1,16 +1,13 @@ const $ = window.$ = require('jquery'); import React from 'react'; -import { Label, OverlayTrigger, Popover } from 'react-bootstrap'; import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; import * as Actions from '../actions'; import shortid from 'shortid'; import Select from 'react-select'; -import Link from './Link'; +import TableElement from './TableElement'; -// CSS -import 'react-select/dist/react-select.css'; class SqlEditorTopToolbar extends React.Component { constructor(props) { @@ -123,7 +120,6 @@ class SqlEditorTopToolbar extends React.Component { schema: qe.schema, columns: data.columns, expanded: true, - showPopup: true, }); }) .fail(() => { @@ -135,76 +131,9 @@ class SqlEditorTopToolbar extends React.Component { } render() { const tables = this.props.tables.filter((t) => (t.queryEditorId === this.props.queryEditor.id)); - const tablesEls = tables.map((table) => { - let cols = []; - if (table.columns) { - cols = table.columns.map((col) => ( -
-
{col.name}
-
{col.type}
-
- )); - } - const popoverId = 'tblPopover_' + table.name; - const popoverTop = ( -
-
- - -
-
- -
-
- ); - const popover = ( - - {cols} - - ); - return ( - - ); - }); return (
-
+
-
+