Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(data-warehouse): Added frontend support for cloudflare R2 #22218

Merged
merged 3 commits into from
May 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Binary file added frontend/public/cloudflare-logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ const ProviderMappings: Record<
accessKeyLabel: 'Access ID',
accessSecretLabel: 'Secret',
},
'cloudflare-r2': {
fileUrlPatternPlaceholder: 'eg: https://your-account-id.r2.cloudflarestorage.com/airbyte/stripe/invoices/*.pqt',
accessKeyPlaceholder: 'eg: AKIAIOSFODNN7EXAMPLE',
accessKeyLabel: 'Access key',
accessSecretLabel: 'Access secret',
},
}

export function DatawarehouseTableForm(): JSX.Element {
Expand Down
7 changes: 7 additions & 0 deletions frontend/src/scenes/data-warehouse/new/ManualLinkProvider.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { LemonButton } from '@posthog/lemon-ui'
import { useActions } from 'kea'
import cloudflareLogo from 'public/cloudflare-logo.png'
import googleStorageLogo from 'public/google-cloud-storage-logo.png'
import s3Logo from 'public/s3-logo.png'

Expand All @@ -25,6 +26,12 @@ export const ManualLinkProvider = (): JSX.Element => {
<div className="text-base">Google Cloud Storage</div>
</div>
</LemonButton>
<LemonButton onClick={() => onClick('cloudflare-r2')} fullWidth center type="secondary" className="mb-2">
<div className="flex flex-row gap-2 justify-center items-center">
<img src={cloudflareLogo} alt="Cloudflare logo" height={64} className="m-2" />
<div className="text-base">Cloudflare R2</div>
</div>
</LemonButton>
</div>
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ export const SOURCE_DETAILS: Record<string, SourceConfig> = {
},
}

export type ManualLinkProvider = 'aws' | 'google-cloud'
export type ManualLinkProvider = 'aws' | 'google-cloud' | 'cloudflare-r2'

export const sourceWizardLogic = kea<sourceWizardLogicType>([
path(['scenes', 'data-warehouse', 'external', 'sourceWizardLogic']),
Expand Down