-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(data-warehouse): restore form (#18429)
* restore form * button feature flag * button logic * Update UI snapshots for `chromium` (1) * types --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
21ba4a2
commit df16d5b
Showing
13 changed files
with
99 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
65 changes: 65 additions & 0 deletions
65
frontend/src/scenes/data-warehouse/new_table/DataWarehouseTableScene.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
import { dataWarehouseTableLogic } from './dataWarehouseTableLogic' | ||
import { LemonButton, Link } from '@posthog/lemon-ui' | ||
import { SceneExport } from 'scenes/sceneTypes' | ||
import { PageHeader } from 'lib/components/PageHeader' | ||
import { useActions, useValues } from 'kea' | ||
import { router } from 'kea-router' | ||
import { urls } from 'scenes/urls' | ||
import { DatawarehouseTableForm } from './DataWarehouseTableForm' | ||
|
||
export const scene: SceneExport = { | ||
component: DataWarehouseTable, | ||
logic: dataWarehouseTableLogic, | ||
} | ||
export function DataWarehouseTable(): JSX.Element { | ||
const { isEditingTable, tableLoading, table } = useValues(dataWarehouseTableLogic) | ||
const { editingTable, loadTable, createTable } = useActions(dataWarehouseTableLogic) | ||
return ( | ||
<> | ||
<PageHeader | ||
title={'New table'} | ||
buttons={ | ||
<div className="flex items-center gap-2"> | ||
<LemonButton | ||
data-attr="cancel-table" | ||
type="secondary" | ||
loading={tableLoading} | ||
onClick={() => { | ||
if (isEditingTable) { | ||
editingTable(false) | ||
loadTable() | ||
} else { | ||
router.actions.push(urls.dataWarehouse()) | ||
} | ||
}} | ||
> | ||
Cancel | ||
</LemonButton> | ||
<LemonButton | ||
type="primary" | ||
data-attr="save-data-warehouse-table" | ||
onClick={() => { | ||
createTable(table) | ||
}} | ||
loading={tableLoading} | ||
> | ||
Save | ||
</LemonButton> | ||
</div> | ||
} | ||
caption={ | ||
<div> | ||
External tables are supported through object storage systems like S3.{' '} | ||
<Link | ||
to="https://posthog.com/docs/data/data-warehouse#step-1-creating-a-bucket-in-s3" | ||
target="_blank" | ||
> | ||
Learn how to set up your data | ||
</Link> | ||
</div> | ||
} | ||
/> | ||
<DatawarehouseTableForm /> | ||
</> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters