mirror of
https://github.com/apache/superset.git
synced 2026-04-18 23:55:00 +00:00
[sqllab] config item for SQLLAB_DEFAULT_DBID (#1793)
This commit is contained in:
committed by
GitHub
parent
a95cd71456
commit
aeda5bd260
@@ -101,7 +101,9 @@ class TabbedSqlEditors extends React.PureComponent {
|
||||
const activeQueryEditor = this.activeQueryEditor();
|
||||
const qe = {
|
||||
title: `Untitled Query ${queryCount}`,
|
||||
dbId: (activeQueryEditor) ? activeQueryEditor.dbId : null,
|
||||
dbId: (activeQueryEditor && activeQueryEditor.dbId) ?
|
||||
activeQueryEditor.dbId :
|
||||
this.props.defaultDbId,
|
||||
schema: (activeQueryEditor) ? activeQueryEditor.schema : null,
|
||||
autorun: false,
|
||||
sql: 'SELECT ...',
|
||||
@@ -216,6 +218,7 @@ function mapStateToProps(state) {
|
||||
tabHistory: state.tabHistory,
|
||||
networkOn: state.networkOn,
|
||||
tables: state.tables,
|
||||
defaultDbId: state.defaultDbId,
|
||||
};
|
||||
}
|
||||
function mapDispatchToProps(dispatch) {
|
||||
|
||||
Reference in New Issue
Block a user