This is an automated email from the ASF dual-hosted git repository. lyndsi pushed a commit to branch lyndsi/sql-lab-new-explore-button-functionality-and-move-save-dataset-to-split-save-button in repository https://gitbox.apache.org/repos/asf/superset.git
commit f015d0818eedb0eea1e4ad1b11f1715bfdf50169 Author: Eric Briscoe <[email protected]> AuthorDate: Tue Jun 28 11:07:10 2022 -0700 Fixes frontend lint and TypeScript errors unit test fixes will be next commit --- .../explore/components/controls/DatasourceControl/index.jsx | 13 ++++++++++++- .../components/useExploreAdditionalActionsMenu/index.jsx | 1 - 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/superset-frontend/src/explore/components/controls/DatasourceControl/index.jsx b/superset-frontend/src/explore/components/controls/DatasourceControl/index.jsx index 5816563215..ec5522a2a9 100644 --- a/superset-frontend/src/explore/components/controls/DatasourceControl/index.jsx +++ b/superset-frontend/src/explore/components/controls/DatasourceControl/index.jsx @@ -169,6 +169,17 @@ class DatasourceControl extends React.PureComponent { }; } + getDatasourceAsSaveableDataset = source => { + const dataset = { + columns: source?.columns || [], + name: source?.datasource_name || t('Untitled'), + dbId: source.database.id, + sql: source?.sql || '', + schema: source?.schema, + }; + return dataset; + }; + onDatasourceSave = datasource => { this.props.actions.changeDatasource(datasource); const timeCol = this.props.form_data?.granularity_sqla; @@ -433,7 +444,7 @@ class DatasourceControl extends React.PureComponent { onChange={onChange} /> )} - {showSaveDatasetModal && ( + {showSaveDatasetModal && showSaveDatasetModal && ( <SaveDatasetModal visible={showSaveDatasetModal} onHide={this.toggleSaveDatasetModal} diff --git a/superset-frontend/src/explore/components/useExploreAdditionalActionsMenu/index.jsx b/superset-frontend/src/explore/components/useExploreAdditionalActionsMenu/index.jsx index cc046c19e6..e75e91bba7 100644 --- a/superset-frontend/src/explore/components/useExploreAdditionalActionsMenu/index.jsx +++ b/superset-frontend/src/explore/components/useExploreAdditionalActionsMenu/index.jsx @@ -31,7 +31,6 @@ import copyTextToClipboard from 'src/utils/copy'; import HeaderReportDropDown from 'src/components/ReportModal/HeaderReportDropdown'; import ViewQueryModal from '../controls/ViewQueryModal'; import EmbedCodeContent from '../EmbedCodeContent'; -import ViewQueryModalFooter from '../controls/ViewQueryModalFooter'; const MENU_KEYS = { EDIT_PROPERTIES: 'edit_properties',
