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/06/14 07:13:22 UTC

[GitHub] [superset] AAfghahi commented on a change in pull request #14881: feat: Database Connection UI

AAfghahi commented on a change in pull request #14881:
URL: https://github.com/apache/superset/pull/14881#discussion_r650117366



##########
File path: superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx
##########
@@ -408,31 +506,53 @@ const DatabaseModal: FunctionComponent<DatabaseModalProps> = ({
               testConnection={testConnection}
             />
           ) : (
-            <div>
-              <p>TODO: form</p>
-            </div>
+            <DatabaseConnectionForm
+              isEditMode
+              sslForced={sslForced}
+              dbModel={dbModel}
+              db={db as DatabaseObject}
+              onParametersChange={({ target }: { target: HTMLInputElement }) =>
+                onChange(ActionType.parametersChange, {
+                  type: target.type,
+                  name: target.name,
+                  checked: target.checked,
+                  value: target.value,
+                })
+              }
+              onChange={({ target }: { target: HTMLInputElement }) =>
+                onChange(ActionType.textChange, {
+                  name: target.name,
+                  value: target.value,
+                })
+              }
+              getValidation={() => getValidation(db)}
+              validationErrors={validationErrors}
+            />
+          )}
+          {!isEditMode && (
+            <Alert
+              css={(theme: SupersetTheme) => antDAlertStyles(theme)}
+              message="Additional fields may be required"
+              showIcon
+              description={
+                <>
+                  Select databases require additional fields to be completed in
+                  the Advanced tab to successfully connect the database. Learn
+                  what requirements your databases has{' '}
+                  <a
+                    href={DOCUMENTATION_LINK}
+                    target="_blank"
+                    rel="noopener noreferrer"
+                  >
+                    here
+                  </a>
+                  .
+                </>
+              }
+              type="info"
+              showIcon

Review comment:
       ```suggestion
   
   ```




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