diff --git a/public/app/features/provisioning/Shared/RepositoryTypeCards.tsx b/public/app/features/provisioning/Shared/RepositoryTypeCards.tsx index 0fefc098673..7dc529c070c 100644 --- a/public/app/features/provisioning/Shared/RepositoryTypeCards.tsx +++ b/public/app/features/provisioning/Shared/RepositoryTypeCards.tsx @@ -4,7 +4,7 @@ import { Trans } from '@grafana/i18n'; import { Card, Stack, Text, useStyles2 } from '@grafana/ui'; import { useGetFrontendSettingsQuery } from 'app/api/clients/provisioning/v0alpha1/endpoints.gen'; -import { CONNECT_URL, DEFAULT_REPOSITORY_TYPES } from '../constants'; +import { CONNECT_URL } from '../constants'; import { getOrderedRepositoryConfigs } from '../utils/repositoryTypes'; import { RepoIcon } from './RepoIcon'; @@ -13,7 +13,7 @@ export function RepositoryTypeCards() { const styles = useStyles2(getStyles); const { data: frontendSettings } = useGetFrontendSettingsQuery(); - const availableTypes = frontendSettings?.availableRepositoryTypes || DEFAULT_REPOSITORY_TYPES; + const availableTypes = frontendSettings?.availableRepositoryTypes ?? []; const { gitProviders, otherProviders } = getOrderedRepositoryConfigs(availableTypes); return ( @@ -42,33 +42,37 @@ export function RepositoryTypeCards() { )} - - - - If your provider is not listed: - - + {otherProviders.length > 0 && ( + + + + If your provider is not listed: + + - - {otherProviders.map((config) => ( - - - - {config.type === 'local' ? ( - Configure file provisioning - ) : ( - - Configure with {'{{ provider }}'} - - )} - - - ))} + + {otherProviders.map((config) => ( + + + + {config.type === 'local' ? ( + + Configure file provisioning + + ) : ( + + Configure with {'{{ provider }}'} + + )} + + + ))} + - + )} ); }