From 19b3a6ce3dabb8c29a334d89db472fbf45970f9a Mon Sep 17 00:00:00 2001 From: junlincc Date: Sun, 10 Jan 2021 06:36:57 -0800 Subject: [PATCH 1/5] chore(explore):change dataset to datasource in ui --- .../src/explore/components/controls/DatasourceControl.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/superset-frontend/src/explore/components/controls/DatasourceControl.jsx b/superset-frontend/src/explore/components/controls/DatasourceControl.jsx index e30aebe8763cf..2427e45347f5f 100644 --- a/superset-frontend/src/explore/components/controls/DatasourceControl.jsx +++ b/superset-frontend/src/explore/components/controls/DatasourceControl.jsx @@ -156,10 +156,10 @@ class DatasourceControl extends React.PureComponent { {this.props.isEditable && ( - {t('Edit Dataset')} + {t('Edit Datasource')} )} - {t('Change Dataset')} + {t('Change Datasource')} {t('View in SQL Lab')} ); @@ -187,7 +187,7 @@ class DatasourceControl extends React.PureComponent { trigger={['click']} data-test="datasource-menu" > - + Date: Sun, 10 Jan 2021 08:30:11 -0800 Subject: [PATCH 2/5] modal --- .../src/datasource/ChangeDatasourceModal.tsx | 12 ++++++------ .../src/datasource/DatasourceEditor.jsx | 10 +++++----- superset-frontend/src/datasource/DatasourceModal.tsx | 8 ++++---- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/superset-frontend/src/datasource/ChangeDatasourceModal.tsx b/superset-frontend/src/datasource/ChangeDatasourceModal.tsx index 682e83c65c923..a557986b1c3e1 100644 --- a/superset-frontend/src/datasource/ChangeDatasourceModal.tsx +++ b/superset-frontend/src/datasource/ChangeDatasourceModal.tsx @@ -36,12 +36,12 @@ import Loading from '../components/Loading'; import withToasts from '../messageToasts/enhancers/withToasts'; const CONFIRM_WARNING_MESSAGE = t( - 'Warning! Changing the dataset may break the chart if the metadata does not exist.', + 'Warning! Changing the datasource may break the chart if the metadata does not exist.', ); const CHANGE_WARNING_MSG = t( - 'Changing the dataset may break the chart if the chart relies ' + - 'on columns or metadata that does not exist in the target dataset', + 'Changing the datasource may break the chart if the chart relies ' + + 'on columns or metadata that does not exist in the target datasource', ); interface Datasource { @@ -111,7 +111,7 @@ const ChangeDatasourceModal: FunctionComponent = ({ const { state: { loading, resourceCollection }, fetchData, - } = useListViewResource('dataset', t('dataset'), addDangerToast); + } = useListViewResource('dataset', t('datasource'), addDangerToast); const selectDatasource = useCallback((datasource: Datasource) => { setConfirmChange(true); @@ -190,7 +190,7 @@ const ChangeDatasourceModal: FunctionComponent = ({ ); }); onHide(); - addSuccessToast('Successfully changed dataset!'); + addSuccessToast('Successfully changed datasource!'); }; const handlerCancelConfirm = () => { @@ -223,7 +223,7 @@ const ChangeDatasourceModal: FunctionComponent = ({ show={show} onHide={onHide} responsive - title={t('Change Dataset')} + title={t('Change Datasource')} footer={ <> {confirmChange && ( diff --git a/superset-frontend/src/datasource/DatasourceEditor.jsx b/superset-frontend/src/datasource/DatasourceEditor.jsx index 044f1d8f2df2b..cc0e9dac92c4a 100644 --- a/superset-frontend/src/datasource/DatasourceEditor.jsx +++ b/superset-frontend/src/datasource/DatasourceEditor.jsx @@ -517,7 +517,7 @@ class DatasourceEditor extends React.PureComponent { fieldKey="default_endpoint" label={t('Default URL')} description={t( - 'Default URL to redirect to when accessing from the dataset list page', + 'Default URL to redirect to when accessing from the datasource list page', )} control={} /> @@ -563,7 +563,7 @@ class DatasourceEditor extends React.PureComponent { { this.onDatasourcePropChange('table_name', table); }} - placeholder={t('dataset name')} + placeholder={t('datasource name')} disabled={!this.state.isEditMode} /> } @@ -954,7 +954,7 @@ class DatasourceEditor extends React.PureComponent { {t('Be careful.')} {t( - 'Changing these settings will affect all charts using this dataset, including charts owned by other people.', + 'Changing these settings will affect all charts using this datasource, including charts owned by other people.', )} diff --git a/superset-frontend/src/datasource/DatasourceModal.tsx b/superset-frontend/src/datasource/DatasourceModal.tsx index 2ccb8fe1cc91f..cf8f37f64d27c 100644 --- a/superset-frontend/src/datasource/DatasourceModal.tsx +++ b/superset-frontend/src/datasource/DatasourceModal.tsx @@ -111,7 +111,7 @@ const DatasourceModal: FunctionComponent = ({ }, }) .then(({ json }) => { - addSuccessToast(t('The dataset has been saved')); + addSuccessToast(t('The datasource has been saved')); onDatasourceSave(json); onHide(); }) @@ -147,8 +147,8 @@ const DatasourceModal: FunctionComponent = ({
{' '} - {t(`The dataset configuration exposed here - affects all the charts using this dataset. + {t(`The datasource configuration exposed here + affects all the charts using this datasource. Be mindful that changing settings here may affect other charts in undesirable ways.`)} @@ -173,7 +173,7 @@ const DatasourceModal: FunctionComponent = ({ onHide={onHide} title={ - {t('Edit Dataset ')} + {t('Edit Datasource')} {currentDatasource.table_name} } From 91d92f993d08e727da85e97cc36185f2db16f296 Mon Sep 17 00:00:00 2001 From: junlincc Date: Sun, 10 Jan 2021 08:43:46 -0800 Subject: [PATCH 3/5] Add space --- superset-frontend/src/datasource/DatasourceModal.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/superset-frontend/src/datasource/DatasourceModal.tsx b/superset-frontend/src/datasource/DatasourceModal.tsx index cf8f37f64d27c..b27b7ebe7dd65 100644 --- a/superset-frontend/src/datasource/DatasourceModal.tsx +++ b/superset-frontend/src/datasource/DatasourceModal.tsx @@ -173,7 +173,7 @@ const DatasourceModal: FunctionComponent = ({ onHide={onHide} title={ - {t('Edit Datasource')} + {t('Edit Datasource ')} {currentDatasource.table_name} } From 39f03a034d32ea12ec4d1f87cff3e7f36777fc8b Mon Sep 17 00:00:00 2001 From: junlincc Date: Sun, 10 Jan 2021 09:28:27 -0800 Subject: [PATCH 4/5] =?UTF-8?q?Changing=20it=20back=F0=9F=A4=A6?= =?UTF-8?q?=F0=9F=8F=BE=E2=80=8D=E2=99=80=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/datasource/ChangeDatasourceModal.tsx | 12 ++++++------ .../src/datasource/DatasourceEditor.jsx | 10 +++++----- superset-frontend/src/datasource/DatasourceModal.tsx | 6 +++--- .../src/explore/components/ExploreViewContainer.jsx | 2 +- .../components/controls/DatasourceControl.jsx | 6 +++--- 5 files changed, 18 insertions(+), 18 deletions(-) diff --git a/superset-frontend/src/datasource/ChangeDatasourceModal.tsx b/superset-frontend/src/datasource/ChangeDatasourceModal.tsx index a557986b1c3e1..682e83c65c923 100644 --- a/superset-frontend/src/datasource/ChangeDatasourceModal.tsx +++ b/superset-frontend/src/datasource/ChangeDatasourceModal.tsx @@ -36,12 +36,12 @@ import Loading from '../components/Loading'; import withToasts from '../messageToasts/enhancers/withToasts'; const CONFIRM_WARNING_MESSAGE = t( - 'Warning! Changing the datasource may break the chart if the metadata does not exist.', + 'Warning! Changing the dataset may break the chart if the metadata does not exist.', ); const CHANGE_WARNING_MSG = t( - 'Changing the datasource may break the chart if the chart relies ' + - 'on columns or metadata that does not exist in the target datasource', + 'Changing the dataset may break the chart if the chart relies ' + + 'on columns or metadata that does not exist in the target dataset', ); interface Datasource { @@ -111,7 +111,7 @@ const ChangeDatasourceModal: FunctionComponent = ({ const { state: { loading, resourceCollection }, fetchData, - } = useListViewResource('dataset', t('datasource'), addDangerToast); + } = useListViewResource('dataset', t('dataset'), addDangerToast); const selectDatasource = useCallback((datasource: Datasource) => { setConfirmChange(true); @@ -190,7 +190,7 @@ const ChangeDatasourceModal: FunctionComponent = ({ ); }); onHide(); - addSuccessToast('Successfully changed datasource!'); + addSuccessToast('Successfully changed dataset!'); }; const handlerCancelConfirm = () => { @@ -223,7 +223,7 @@ const ChangeDatasourceModal: FunctionComponent = ({ show={show} onHide={onHide} responsive - title={t('Change Datasource')} + title={t('Change Dataset')} footer={ <> {confirmChange && ( diff --git a/superset-frontend/src/datasource/DatasourceEditor.jsx b/superset-frontend/src/datasource/DatasourceEditor.jsx index cc0e9dac92c4a..044f1d8f2df2b 100644 --- a/superset-frontend/src/datasource/DatasourceEditor.jsx +++ b/superset-frontend/src/datasource/DatasourceEditor.jsx @@ -517,7 +517,7 @@ class DatasourceEditor extends React.PureComponent { fieldKey="default_endpoint" label={t('Default URL')} description={t( - 'Default URL to redirect to when accessing from the datasource list page', + 'Default URL to redirect to when accessing from the dataset list page', )} control={} /> @@ -563,7 +563,7 @@ class DatasourceEditor extends React.PureComponent { { this.onDatasourcePropChange('table_name', table); }} - placeholder={t('datasource name')} + placeholder={t('dataset name')} disabled={!this.state.isEditMode} /> } @@ -954,7 +954,7 @@ class DatasourceEditor extends React.PureComponent { {t('Be careful.')} {t( - 'Changing these settings will affect all charts using this datasource, including charts owned by other people.', + 'Changing these settings will affect all charts using this dataset, including charts owned by other people.', )}
diff --git a/superset-frontend/src/datasource/DatasourceModal.tsx b/superset-frontend/src/datasource/DatasourceModal.tsx index b27b7ebe7dd65..27f4220584ce3 100644 --- a/superset-frontend/src/datasource/DatasourceModal.tsx +++ b/superset-frontend/src/datasource/DatasourceModal.tsx @@ -111,7 +111,7 @@ const DatasourceModal: FunctionComponent = ({ }, }) .then(({ json }) => { - addSuccessToast(t('The datasource has been saved')); + addSuccessToast(t('The dataset has been saved')); onDatasourceSave(json); onHide(); }) @@ -147,7 +147,7 @@ const DatasourceModal: FunctionComponent = ({
{' '} - {t(`The datasource configuration exposed here + {t(`The dataset configuration exposed here affects all the charts using this datasource. Be mindful that changing settings here may affect other charts @@ -173,7 +173,7 @@ const DatasourceModal: FunctionComponent = ({ onHide={onHide} title={ - {t('Edit Datasource ')} + {t('Edit Dataset ')} {currentDatasource.table_name} } diff --git a/superset-frontend/src/explore/components/ExploreViewContainer.jsx b/superset-frontend/src/explore/components/ExploreViewContainer.jsx index 2cfe9f8d70031..d3df42ad4f158 100644 --- a/superset-frontend/src/explore/components/ExploreViewContainer.jsx +++ b/superset-frontend/src/explore/components/ExploreViewContainer.jsx @@ -410,7 +410,7 @@ function ExploreViewContainer(props) { } >
- {t('Datasource')} + {t('Dataset')} {this.props.isEditable && ( - {t('Edit Datasource')} + {t('Edit Dataset')} )} - {t('Change Datasource')} + {t('Change Dataset')} {t('View in SQL Lab')} ); @@ -187,7 +187,7 @@ class DatasourceControl extends React.PureComponent { trigger={['click']} data-test="datasource-menu" > - + Date: Sun, 10 Jan 2021 09:34:18 -0800 Subject: [PATCH 5/5] Chargeback --- superset-frontend/src/datasource/DatasourceModal.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/superset-frontend/src/datasource/DatasourceModal.tsx b/superset-frontend/src/datasource/DatasourceModal.tsx index 27f4220584ce3..2ccb8fe1cc91f 100644 --- a/superset-frontend/src/datasource/DatasourceModal.tsx +++ b/superset-frontend/src/datasource/DatasourceModal.tsx @@ -148,7 +148,7 @@ const DatasourceModal: FunctionComponent = ({
{' '} {t(`The dataset configuration exposed here - affects all the charts using this datasource. + affects all the charts using this dataset. Be mindful that changing settings here may affect other charts in undesirable ways.`)}