You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2020/12/10 01:09:15 UTC

[GitHub] [incubator-superset] betodealmeida commented on a change in pull request #11936: chore: consolidate common code in importers

betodealmeida commented on a change in pull request #11936:
URL: https://github.com/apache/incubator-superset/pull/11936#discussion_r539766663



##########
File path: superset-frontend/src/views/CRUD/chart/ChartList.tsx
##########
@@ -568,12 +570,22 @@ function ChartList(props: ChartListProps) {
         }}
       </ConfirmStatusChange>
 
-      <ImportChartModal
-        show={importingChart}
-        onHide={closeChartImportModal}
+      <ImportModelsModal
+        resourceName="chart"
+        resourceLabel={t('chart')}
+        icon={<StyledIcon name="nav-charts" />}
+        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.',
+        )}
         addDangerToast={addDangerToast}
         addSuccessToast={addSuccessToast}
-        onChartImport={handleChartImport}
+        onModelImport={handleChartImport}
+        show={importingChart}
+        onHide={closeChartImportModal}

Review comment:
       I've been conditioned by the AirBnB linter to never inline functions in props. My understanding is that it has a performance cost, but that might've changed with functional components?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org