mirror of
https://github.com/apache/superset.git
synced 2026-04-13 13:18:25 +00:00
This reverts commit 75e69f02e8.
This commit is contained in:
committed by
GitHub
parent
0c36827368
commit
46d60880eb
@@ -15,16 +15,14 @@ import {
|
||||
|
||||
import Button from '../../components/Button';
|
||||
|
||||
import AceEditorWrapper from './AceEditorWrapper';
|
||||
import SouthPane from './SouthPane';
|
||||
import SplitPane from './SplitPane';
|
||||
import SaveQuery from './SaveQuery';
|
||||
import Timer from '../../components/Timer';
|
||||
import SqlEditorLeftBar from './SqlEditorLeftBar';
|
||||
import AceEditorWrapper from './AceEditorWrapper';
|
||||
import { STATE_BSSTYLE_MAP } from '../constants';
|
||||
import RunQueryActionButton from './RunQueryActionButton';
|
||||
|
||||
|
||||
const propTypes = {
|
||||
actions: PropTypes.object.isRequired,
|
||||
height: PropTypes.string.isRequired,
|
||||
@@ -51,7 +49,6 @@ class SqlEditor extends React.PureComponent {
|
||||
autorun: props.queryEditor.autorun,
|
||||
ctas: '',
|
||||
};
|
||||
this.onSizeChange = this.onSizeChange.bind(this);
|
||||
}
|
||||
componentDidMount() {
|
||||
this.onMount();
|
||||
@@ -63,13 +60,6 @@ class SqlEditor extends React.PureComponent {
|
||||
this.startQuery();
|
||||
}
|
||||
}
|
||||
onSizeChange(newSizes) {
|
||||
const bottomBarHeight = this.refs.editorBottomBar.clientHeight;
|
||||
this.setState({
|
||||
...this.state,
|
||||
editorHeight: newSizes.north - bottomBarHeight,
|
||||
});
|
||||
}
|
||||
setQueryEditorSql(sql) {
|
||||
this.props.actions.queryEditorSetSql(this.props.queryEditor, sql);
|
||||
}
|
||||
@@ -157,7 +147,7 @@ class SqlEditor extends React.PureComponent {
|
||||
);
|
||||
}
|
||||
const editorBottomBar = (
|
||||
<div ref="editorBottomBar" className="sql-toolbar clearfix" id="js-sql-toolbar">
|
||||
<div className="sql-toolbar clearfix" id="js-sql-toolbar">
|
||||
<div className="pull-left">
|
||||
<Form inline>
|
||||
<RunQueryActionButton
|
||||
@@ -222,34 +212,21 @@ class SqlEditor extends React.PureComponent {
|
||||
sm={this.props.hideLeftBar ? 12 : 7}
|
||||
md={this.props.hideLeftBar ? 12 : 8}
|
||||
lg={this.props.hideLeftBar ? 12 : 9}
|
||||
style={{
|
||||
height: this.sqlEditorHeight(),
|
||||
}}
|
||||
>
|
||||
<SplitPane
|
||||
onSizeChange={this.onSizeChange}
|
||||
minHeight={25}
|
||||
north={
|
||||
<div>
|
||||
<AceEditorWrapper
|
||||
actions={this.props.actions}
|
||||
onBlur={this.setQueryEditorSql.bind(this)}
|
||||
queryEditor={this.props.queryEditor}
|
||||
onAltEnter={this.runQuery.bind(this)}
|
||||
sql={this.props.queryEditor.sql}
|
||||
tables={this.props.tables}
|
||||
height={this.state.editorHeight + 'px'}
|
||||
/>
|
||||
{editorBottomBar}
|
||||
</div>
|
||||
}
|
||||
south={
|
||||
<SouthPane
|
||||
editorQueries={this.props.editorQueries}
|
||||
dataPreviewQueries={this.props.dataPreviewQueries}
|
||||
actions={this.props.actions}
|
||||
/>
|
||||
}
|
||||
<AceEditorWrapper
|
||||
actions={this.props.actions}
|
||||
onBlur={this.setQueryEditorSql.bind(this)}
|
||||
queryEditor={this.props.queryEditor}
|
||||
onAltEnter={this.runQuery.bind(this)}
|
||||
sql={this.props.queryEditor.sql}
|
||||
tables={this.props.tables}
|
||||
/>
|
||||
{editorBottomBar}
|
||||
<br />
|
||||
<SouthPane
|
||||
editorQueries={this.props.editorQueries}
|
||||
dataPreviewQueries={this.props.dataPreviewQueries}
|
||||
actions={this.props.actions}
|
||||
/>
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
Reference in New Issue
Block a user