Skip to content

Commit

Permalink
feat(data-warehouse): Added frontend support for cloudflare R2 (#22218)
Browse files Browse the repository at this point in the history
* Added frontend support for cloudflare R2

* Update UI snapshots for `chromium` (2)

* Update UI snapshots for `chromium` (2)

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
2 people authored and thmsobrmlr committed May 21, 2024
1 parent 554114b commit feb0f52
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
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

0 comments on commit feb0f52

Please sign in to comment.