-
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.
feat(cdp): Easy setup of destinations from other sources (#24394)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
e7e4006
commit 4bb6c50
Showing
32 changed files
with
1,480 additions
and
202 deletions.
There are no files selected for viewing
Binary file modified
BIN
+471 Bytes
(100%)
...snapshots__/scenes-app-insights--funnel-top-to-bottom-breakdown-edit--light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-10.1 KB
(92%)
frontend/__snapshots__/scenes-app-surveys--surveys-list--dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-10.1 KB
(92%)
frontend/__snapshots__/scenes-app-surveys--surveys-list--light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,34 @@ | ||
import { LemonButton } from '@posthog/lemon-ui' | ||
import { useValues } from 'kea' | ||
import { useFeatureFlag } from 'lib/hooks/useFeatureFlag' | ||
import { actionLogic } from 'scenes/actions/actionLogic' | ||
import { DestinationsTable } from 'scenes/pipeline/destinations/Destinations' | ||
import { PipelineBackend } from 'scenes/pipeline/types' | ||
import { urls } from 'scenes/urls' | ||
import { LinkedHogFunctions } from 'scenes/pipeline/hogfunctions/list/LinkedHogFunctions' | ||
|
||
import { PipelineStage } from '~/types' | ||
import { HogFunctionFiltersType } from '~/types' | ||
|
||
export function ActionHogFunctions(): JSX.Element | null { | ||
const { action } = useValues(actionLogic) | ||
|
||
const hogFunctionsEnabled = useFeatureFlag('HOG_FUNCTIONS') | ||
|
||
if (!action || !hogFunctionsEnabled) { | ||
return null | ||
} | ||
|
||
const filters: HogFunctionFiltersType = { | ||
actions: [ | ||
{ | ||
id: `${action?.id}`, | ||
name: action?.name, | ||
type: 'actions', | ||
}, | ||
], | ||
} | ||
|
||
return ( | ||
<div className="my-4 space-y-2"> | ||
<div className="flex items-center gap-2"> | ||
<h2 className="flex-1 subtitle">Connected destinations</h2> | ||
|
||
<LemonButton | ||
type="primary" | ||
size="small" | ||
to={ | ||
urls.pipelineNodeNew(PipelineStage.Destination) + | ||
`?kind=hog_function#configuration=${JSON.stringify({ | ||
filters: { | ||
actions: [ | ||
{ | ||
id: `${action?.id}`, | ||
name: `${action?.name}`, | ||
type: 'actions', | ||
}, | ||
], | ||
}, | ||
})}` | ||
} | ||
> | ||
New destination | ||
</LemonButton> | ||
</div> | ||
<h2 className="flex-1 subtitle">Connected destinations</h2> | ||
<p>Actions can be used a filters for destinations such as Slack or Webhook delivery</p> | ||
|
||
<DestinationsTable | ||
defaultFilters={{ | ||
onlyActive: true, | ||
}} | ||
forceFilters={{ | ||
kind: PipelineBackend.HogFunction, | ||
filters: { actions: [{ id: `${action.id}` }] }, | ||
}} | ||
/> | ||
<LinkedHogFunctions filters={filters} /> | ||
</div> | ||
) | ||
} |
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
Oops, something went wrong.