diff --git a/superset-frontend/src/views/CRUD/data/database/DatabaseModal/ModalHeader.tsx b/superset-frontend/src/views/CRUD/data/database/DatabaseModal/ModalHeader.tsx index 3ca8542160..17457c07b5 100644 --- a/superset-frontend/src/views/CRUD/data/database/DatabaseModal/ModalHeader.tsx +++ b/superset-frontend/src/views/CRUD/data/database/DatabaseModal/ModalHeader.tsx @@ -27,11 +27,12 @@ import { } from './styles'; import { DatabaseForm, DatabaseObject } from '../types'; -export const DOCUMENTATION_LINK = - 'https://superset.apache.org/docs/databases/installing-database-drivers'; - const supersetTextDocs = getDatabaseDocumentationLinks(); +export const DOCUMENTATION_LINK = supersetTextDocs + ? supersetTextDocs.support + : 'https://superset.apache.org/docs/databases/installing-database-drivers'; + const irregularDocumentationLinks = { postgresql: 'https://superset.apache.org/docs/databases/postgres', mssql: 'https://superset.apache.org/docs/databases/sql-server', diff --git a/superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx b/superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx index b0e6ea51b7..662a178f30 100644 --- a/superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx +++ b/superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx @@ -559,7 +559,7 @@ const DatabaseModal: FunctionComponent = ({ onChange={setDatabaseModel} placeholder="Choose a database..." > - {availableDbs?.databases + {[...(availableDbs?.databases || [])] ?.sort((a: DatabaseForm, b: DatabaseForm) => a.name.localeCompare(b.name), ) diff --git a/superset-frontend/src/views/CRUD/hooks.ts b/superset-frontend/src/views/CRUD/hooks.ts index 57e5d02193..33c1fe353a 100644 --- a/superset-frontend/src/views/CRUD/hooks.ts +++ b/superset-frontend/src/views/CRUD/hooks.ts @@ -631,7 +631,7 @@ export function useAvailableDatabases() { const getAvailable = useCallback(() => { SupersetClient.get({ - endpoint: `/api/v1/database/available`, + endpoint: `/api/v1/database/available/`, }).then(({ json }) => { setAvailableDbs(json); });