mirror of
https://github.com/apache/superset.git
synced 2026-04-16 22:55:52 +00:00
[sql lab] allow users to save their queries (#2528)
* Allow users to save their queries Fixing tests . * Adding placeholder for Query Description * initJQueryCSRF -> initJQueryAjaxCSRF
This commit is contained in:
committed by
GitHub
parent
c1d9918abe
commit
122891c29b
@@ -15,6 +15,7 @@ import {
|
||||
import Button from '../../components/Button';
|
||||
|
||||
import SouthPane from './SouthPane';
|
||||
import SaveQuery from './SaveQuery';
|
||||
import Timer from '../../components/Timer';
|
||||
import SqlEditorLeftBar from './SqlEditorLeftBar';
|
||||
import AceEditorWrapper from './AceEditorWrapper';
|
||||
@@ -101,6 +102,7 @@ class SqlEditor extends React.PureComponent {
|
||||
}
|
||||
|
||||
render() {
|
||||
const qe = this.props.queryEditor;
|
||||
let limitWarning = null;
|
||||
if (this.props.latestQuery && this.props.latestQuery.limit_reached) {
|
||||
const tooltip = (
|
||||
@@ -149,12 +151,19 @@ class SqlEditor extends React.PureComponent {
|
||||
<Form inline>
|
||||
<RunQueryActionButton
|
||||
allowAsync={this.props.database ? this.props.database.allow_run_async : false}
|
||||
dbId={this.props.queryEditor.dbId}
|
||||
dbId={qe.dbId}
|
||||
queryState={this.props.latestQuery && this.props.latestQuery.state}
|
||||
runQuery={this.runQuery.bind(this)}
|
||||
selectedText={this.props.queryEditor.selectedText}
|
||||
selectedText={qe.selectedText}
|
||||
stopQuery={this.stopQuery.bind(this)}
|
||||
/>
|
||||
<SaveQuery
|
||||
defaultLabel={qe.title}
|
||||
sql={qe.sql}
|
||||
onSave={this.props.actions.saveQuery}
|
||||
schema={qe.schema}
|
||||
dbId={qe.dbId}
|
||||
/>
|
||||
{ctasControls}
|
||||
</Form>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user