diff --git a/superset-frontend/src/views/CRUD/chart/ChartList.tsx b/superset-frontend/src/views/CRUD/chart/ChartList.tsx
index 4687ed6193..48b8701f71 100644
--- a/superset-frontend/src/views/CRUD/chart/ChartList.tsx
+++ b/superset-frontend/src/views/CRUD/chart/ChartList.tsx
@@ -51,6 +51,13 @@ import TooltipWrapper from 'src/components/TooltipWrapper';
import ChartCard from './ChartCard';
const PAGE_SIZE = 25;
+const PASSWORDS_NEEDED_MESSAGE = t(
+ 'The passwords for the databases below are needed in order to ' +
+ 'import them together with the charts. Please note that the ' +
+ '"Secure Extra" and "Certificate" sections of ' +
+ 'the database configuration are not present in export files, and ' +
+ 'should be added manually after the import if they are needed.',
+);
const createFetchDatasets = (handleError: (err: Response) => void) => async (
filterValue = '',
@@ -574,13 +581,7 @@ function ChartList(props: ChartListProps) {
resourceName="chart"
resourceLabel={t('chart')}
icon={}
- passwordsNeededMessage={t(
- 'The passwords for the databases below are needed in order to ' +
- 'import them together with the charts. Please note that the ' +
- '"Secure Extra" and "Certificate" sections of ' +
- 'the database configuration are not present in export files, and ' +
- 'should be added manually after the import if they are needed.',
- )}
+ passwordsNeededMessage={PASSWORDS_NEEDED_MESSAGE}
addDangerToast={addDangerToast}
addSuccessToast={addSuccessToast}
onModelImport={handleChartImport}
diff --git a/superset-frontend/src/views/CRUD/dashboard/DashboardList.tsx b/superset-frontend/src/views/CRUD/dashboard/DashboardList.tsx
index e3fe98a0e9..0296a0e5fc 100644
--- a/superset-frontend/src/views/CRUD/dashboard/DashboardList.tsx
+++ b/superset-frontend/src/views/CRUD/dashboard/DashboardList.tsx
@@ -45,6 +45,13 @@ import Dashboard from 'src/dashboard/containers/Dashboard';
import DashboardCard from './DashboardCard';
const PAGE_SIZE = 25;
+const PASSWORDS_NEEDED_MESSAGE = t(
+ 'The passwords for the databases below are needed in order to ' +
+ 'import them together with the dashboards. Please note that the ' +
+ '"Secure Extra" and "Certificate" sections of ' +
+ 'the database configuration are not present in export files, and ' +
+ 'should be added manually after the import if they are needed.',
+);
interface DashboardListProps {
addDangerToast: (msg: string) => void;
@@ -535,13 +542,7 @@ function DashboardList(props: DashboardListProps) {
resourceName="dashboard"
resourceLabel={t('dashboard')}
icon={}
- passwordsNeededMessage={t(
- 'The passwords for the databases below are needed in order to ' +
- 'import them together with the dashboards. Please note that the ' +
- '"Secure Extra" and "Certificate" sections of ' +
- 'the database configuration are not present in export files, and ' +
- 'should be added manually after the import if they are needed.',
- )}
+ passwordsNeededMessage={PASSWORDS_NEEDED_MESSAGE}
addDangerToast={addDangerToast}
addSuccessToast={addSuccessToast}
onModelImport={handleDashboardImport}
diff --git a/superset-frontend/src/views/CRUD/data/database/DatabaseList.tsx b/superset-frontend/src/views/CRUD/data/database/DatabaseList.tsx
index f00fd8c99f..856e35ee5d 100644
--- a/superset-frontend/src/views/CRUD/data/database/DatabaseList.tsx
+++ b/superset-frontend/src/views/CRUD/data/database/DatabaseList.tsx
@@ -36,6 +36,12 @@ import DatabaseModal from './DatabaseModal';
import { DatabaseObject } from './types';
const PAGE_SIZE = 25;
+const PASSWORDS_NEEDED_MESSAGE = t(
+ 'The passwords for the databases below are needed in order to ' +
+ 'import them. Please note that the "Secure Extra" and "Certificate" ' +
+ 'sections of the database configuration are not present in export ' +
+ 'files, and should be added manually after the import if they are needed.',
+);
interface DatabaseDeleteObject extends DatabaseObject {
chart_count: number;
@@ -431,12 +437,7 @@ function DatabaseList({ addDangerToast, addSuccessToast }: DatabaseListProps) {
resourceName="database"
resourceLabel={t('database')}
icon={}
- passwordsNeededMessage={t(
- 'The passwords for the databases below are needed in order to ' +
- 'import them. Please note that the "Secure Extra" and "Certificate" ' +
- 'sections of the database configuration are not present in export ' +
- 'files, and should be added manually after the import if they are needed.',
- )}
+ passwordsNeededMessage={PASSWORDS_NEEDED_MESSAGE}
addDangerToast={addDangerToast}
addSuccessToast={addSuccessToast}
onModelImport={handleDatabaseImport}
diff --git a/superset-frontend/src/views/CRUD/data/dataset/DatasetList.tsx b/superset-frontend/src/views/CRUD/data/dataset/DatasetList.tsx
index 82bbefb881..8f86885f77 100644
--- a/superset-frontend/src/views/CRUD/data/dataset/DatasetList.tsx
+++ b/superset-frontend/src/views/CRUD/data/dataset/DatasetList.tsx
@@ -52,6 +52,13 @@ import { isFeatureEnabled, FeatureFlag } from 'src/featureFlags';
import AddDatasetModal from './AddDatasetModal';
const PAGE_SIZE = 25;
+const PASSWORDS_NEEDED_MESSAGE = t(
+ 'The passwords for the databases below are needed in order to ' +
+ 'import them together with the datasets. Please note that the ' +
+ '"Secure Extra" and "Certificate" sections of ' +
+ 'the database configuration are not present in export files, and ' +
+ 'should be added manually after the import if they are needed.',
+);
const FlexRowContainer = styled.div`
align-items: center;
@@ -653,13 +660,7 @@ const DatasetList: FunctionComponent = ({
resourceName="dataset"
resourceLabel={t('dataset')}
icon={}
- passwordsNeededMessage={t(
- 'The passwords for the databases below are needed in order to ' +
- 'import them together with the datasets. Please note that the ' +
- '"Secure Extra" and "Certificate" sections of ' +
- 'the database configuration are not present in export files, and ' +
- 'should be added manually after the import if they are needed.',
- )}
+ passwordsNeededMessage={PASSWORDS_NEEDED_MESSAGE}
addDangerToast={addDangerToast}
addSuccessToast={addSuccessToast}
onModelImport={handleDatasetImport}