From 2518190b2d2d7f838944e4ebd0c064e1d93a0fb6 Mon Sep 17 00:00:00 2001 From: Daniel Lee Date: Thu, 31 Oct 2024 13:20:16 -0400 Subject: [PATCH] style(databases-upload-form): update Upload Form cosmetics (#30758) --- .../databases/UploadDataModel/index.tsx | 48 +++++++++++-------- 1 file changed, 29 insertions(+), 19 deletions(-) diff --git a/superset-frontend/src/features/databases/UploadDataModel/index.tsx b/superset-frontend/src/features/databases/UploadDataModel/index.tsx index ec28091e9b028..37f9e6a5e3f62 100644 --- a/superset-frontend/src/features/databases/UploadDataModel/index.tsx +++ b/superset-frontend/src/features/databases/UploadDataModel/index.tsx @@ -173,6 +173,12 @@ const allowedExtensionsToAccept = { columnar: '.parquet, .zip', }; +const extensionsToLabel: Record = { + csv: 'CSV', + excel: 'Excel', + columnar: 'Columnar', +}; + export const validateUploadFileExtension = ( file: UploadFile, allowedExtensions: string[], @@ -478,7 +484,7 @@ const UploadDataModal: FunctionComponent = ({ headers: { Accept: 'application/json' }, }) .then(() => { - addSuccessToast(t('Data Imported')); + addSuccessToast(t('Data imported')); setIsLoading(false); onClose(); }) @@ -565,9 +571,9 @@ const UploadDataModal: FunctionComponent = ({ }; const uploadTitles = { - csv: t('CSV Upload'), - excel: t('Excel Upload'), - columnar: t('Columnar Upload'), + csv: t('CSV upload'), + excel: t('Excel upload'), + columnar: t('Columnar upload'), }; const UploadTitle: FC = () => { @@ -616,9 +622,11 @@ const UploadDataModal: FunctionComponent = ({ key="general" > - + = ({ - + + + = ({ = ({ -

{t('File Settings')}

+

{t('File settings')}

{t( 'Adjust how spaces, blank lines, null values are handled and other file wide settings.', @@ -767,7 +777,7 @@ const UploadDataModal: FunctionComponent = ({ @@ -783,7 +793,7 @@ const UploadDataModal: FunctionComponent = ({ = ({ = ({ = ({ = ({ = ({ = ({