mirror of
https://github.com/apache/superset.git
synced 2026-04-21 17:14:57 +00:00
[sql lab] preserve schema through visualize flow (#4742)
* [sql lab] preserve schema through visualize flow https://github.com/apache/incubator-superset/pull/4696 got tangled into refactoring views out of views/core.py and onto views/sql_lab.py This is the same PR without the refactoring. * Fix lint
This commit is contained in:
committed by
GitHub
parent
9a79d33e0d
commit
3b7e0a951a
@@ -31,6 +31,7 @@ const propTypes = {
|
||||
onHide: PropTypes.func,
|
||||
query: PropTypes.object,
|
||||
show: PropTypes.bool,
|
||||
schema: PropTypes.string,
|
||||
datasource: PropTypes.string,
|
||||
errorMessage: PropTypes.string,
|
||||
timeout: PropTypes.number,
|
||||
@@ -48,6 +49,7 @@ class VisualizeModal extends React.PureComponent {
|
||||
chartType: CHART_TYPES[0],
|
||||
datasourceName: this.datasourceName(),
|
||||
columns: this.getColumnFromProps(),
|
||||
schema: props.query ? props.query.schema : null,
|
||||
hints: [],
|
||||
};
|
||||
}
|
||||
@@ -126,6 +128,7 @@ class VisualizeModal extends React.PureComponent {
|
||||
buildVizOptions() {
|
||||
return {
|
||||
chartType: this.state.chartType.value,
|
||||
schema: this.state.schema,
|
||||
datasourceName: this.state.datasourceName,
|
||||
columns: this.state.columns,
|
||||
sql: this.props.query.sql,
|
||||
|
||||
Reference in New Issue
Block a user