eschutho commented on a change in pull request #12845:
URL: https://github.com/apache/superset/pull/12845#discussion_r572474815



##########
File path: superset-frontend/src/views/CRUD/data/database/DatabaseModal.tsx
##########
@@ -467,87 +535,101 @@ const DatabaseModal: 
FunctionComponent<DatabaseModalProps> = ({
                   tooltip={t('Allow this database to be queried in SQL Lab')}
                 />
               </div>
+              <StyledExpandableForm
+                style={{ display: isOpen ? 'inherit' : 'none' }}
+              >
+                <StyledInputContainer>
+                  <div className="input-container">
+                    <IndeterminateCheckbox
+                      id="allow_ctas"
+                      indeterminate={false}
+                      checked={db ? !!db.allow_ctas : false}
+                      onChange={onInputChange}
+                    />
+                    <div>{t('Allow CREATE TABLE AS')}</div>
+                    <InfoTooltip
+                      tooltip={t(
+                        'Allow creation of new tables based on queries',
+                      )}
+                    />
+                  </div>
+                </StyledInputContainer>
+                <StyledInputContainer>
+                  <div className="input-container">
+                    <IndeterminateCheckbox
+                      id="allow_cvas"
+                      indeterminate={false}
+                      checked={db ? !!db.allow_cvas : false}
+                      onChange={onInputChange}
+                    />
+                    <div>{t('Allow CREATE VIEW AS')}</div>
+                    <InfoTooltip
+                      tooltip={t(
+                        'Allow creation of new views based on queries',
+                      )}
+                    />
+                  </div>
+                  <StyledInputContainer
+                    style={{ display: createAsOpen ? 'inherit' : 'none' }}
+                  >
+                    <div className="control-label">
+                      {t('CTAS & CVAS SCHEMA')}
+                    </div>
+                    <div className="input-container">
+                      <input
+                        type="text"
+                        name="force_ctas_schema"
+                        value={db ? db.force_ctas_schema || '' : ''}

Review comment:
       same refactor as above




----------------------------------------------------------------
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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to