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 2021/11/04 18:56:57 UTC

[GitHub] [superset] betodealmeida commented on a change in pull request #17331: fix: Show sqllab state when deleting databases

betodealmeida commented on a change in pull request #17331:
URL: https://github.com/apache/superset/pull/17331#discussion_r743120172



##########
File path: superset-frontend/src/views/CRUD/data/database/DatabaseList.tsx
##########
@@ -437,10 +439,11 @@ function DatabaseList({ addDangerToast, addSuccessToast }: DatabaseListProps) {
       {databaseCurrentlyDeleting && (
         <DeleteModal
           description={t(
-            'The database %s is linked to %s charts that appear on %s dashboards. Are you sure you want to continue? Deleting the database will break those objects.',
+            'The database %s is linked to %s charts that appear on %s dashboards and users have %s SQL Lab tabs using this database open. Are you sure you want to continue? Deleting the database will break those objects.',

Review comment:
       It would be nice to skip this message if all the counts are 0, something like:
   
   ```js
   const message = (
     databaseCurrentlyDeleting.chart_count +
     databaseCurrentlyDeleting.dashboard_count +
     databaseCurrentlyDeleting.sqllab_tab_count) === 0
     ? 'There are no charts, dashboards or queries associated with this database, it should be safe to delete.'
     : 'The database %s is linked to ...';
   ```




-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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