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 2023/01/17 23:13:47 UTC

[GitHub] [superset] hughhhh commented on a diff in pull request #22689: feat: add ssh tunneling to dynamic form for Database Connection UI

hughhhh commented on code in PR #22689:
URL: https://github.com/apache/superset/pull/22689#discussion_r1072919190


##########
superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx:
##########
@@ -549,7 +555,10 @@ const DatabaseModal: FunctionComponent<DatabaseModalProps> = ({
         DB.backend === db?.engine || DB.engine === db?.engine,
     ) as DatabaseObject
   )?.engine_information?.allow_ssh_tunneling;
-  const sshTunneling = isFeatureEnabled(FeatureFlag.SSH_TUNNELING);
+  const sshTunneling =
+    isFeatureEnabled(FeatureFlag.SSH_TUNNELING) &&
+    engineAllowsSSHTunneling !== undefined &&
+    engineAllowsSSHTunneling;

Review Comment:
   i had to explicitly add undefined for typing issues to go away since `engineAllowsSSHTunneling` key isn't always set for every engine coming back from the `available` endpoint



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