Numerous improvements to SQL Lab (#1088)

* Improving the Visualize flow

* Fixed the timer

* CTAS

* Expiclit engine handling

* make tab full height, stretch for longer content (#1081)

* Better error handling for queries

* Hooked and fixed CSV export

* Linting

* Tying in the dttm in the viz flow

* Indicator showing when going offline

* Addressing comments, fixing the build

* Fixing unit tests
This commit is contained in:
Maxime Beauchemin
2016-09-11 07:39:07 -07:00
committed by GitHub
parent c20ee0c129
commit 1971bf653c
19 changed files with 299 additions and 206 deletions

View File

@@ -6,7 +6,7 @@ import { connect } from 'react-redux';
import * as Actions from '../actions';
import shortid from 'shortid';
import Select from 'react-select';
import { Button } from 'react-bootstrap';
import { Label, Button } from 'react-bootstrap';
import TableElement from './TableElement';
@@ -116,10 +116,15 @@ class SqlEditorTopToolbar extends React.Component {
});
}
render() {
let networkAlert = null;
if (!this.props.networkOn) {
networkAlert = <p><Label bsStyle="danger">OFFLINE</Label></p>;
}
const tables = this.props.tables.filter((t) => (t.queryEditorId === this.props.queryEditor.id));
const shouldShowReset = window.location.search === '?reset=1';
return (
<div className="clearfix sql-toolbar">
{networkAlert}
<div>
<Select
name="select-db"
@@ -174,6 +179,7 @@ SqlEditorTopToolbar.propTypes = {
queryEditor: React.PropTypes.object,
tables: React.PropTypes.array,
actions: React.PropTypes.object,
networkOn: React.PropTypes.boolean,
};
SqlEditorTopToolbar.defaultProps = {
@@ -183,6 +189,7 @@ SqlEditorTopToolbar.defaultProps = {
function mapStateToProps(state) {
return {
tables: state.tables,
networkOn: state.networkOn,
};
}