-
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 Internal events processor (#27007)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
e56f52b
commit dd74b2c
Showing
54 changed files
with
1,027 additions
and
378 deletions.
There are no files selected for viewing
Binary file modified
BIN
+87 Bytes
(100%)
frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom--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
-402 Bytes
(100%)
frontend/__snapshots__/scenes-app-insights--user-paths-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
-3.87 KB
(97%)
...end/__snapshots__/scenes-app-pipeline--pipeline-node-new-hog-function--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
-3.98 KB
(97%)
...nd/__snapshots__/scenes-app-pipeline--pipeline-node-new-hog-function--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
22 changes: 22 additions & 0 deletions
22
...d/src/layout/navigation-3000/sidepanel/panels/activity/SidePanelActivitySubscriptions.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,22 @@ | ||
import { LinkedHogFunctions } from 'scenes/pipeline/hogfunctions/list/LinkedHogFunctions' | ||
|
||
export function SidePanelActivitySubscriptions(): JSX.Element { | ||
return ( | ||
<div className="space-y-4 "> | ||
<p>Get notified of your team's activity</p> | ||
|
||
<LinkedHogFunctions | ||
type="internal_destination" | ||
subTemplateId="activity-log" | ||
filters={{ | ||
events: [ | ||
{ | ||
id: `$activity_log_entry_created`, | ||
type: 'events', | ||
}, | ||
], | ||
}} | ||
/> | ||
</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
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
49 changes: 49 additions & 0 deletions
49
frontend/src/scenes/pipeline/hogfunctions/filters/HogFunctionFiltersInternal.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,49 @@ | ||
import { LemonSelect } from '@posthog/lemon-ui' | ||
import { LemonField } from 'lib/lemon-ui/LemonField' | ||
|
||
import { HogFunctionFiltersType } from '~/types' | ||
|
||
// NOTE: This is all a bit WIP and will be improved upon over time | ||
// TODO: Make this more advanced with sub type filtering etc. | ||
// TODO: Make it possible for the renderer to limit the options based on the type | ||
const FILTER_OPTIONS = [ | ||
{ | ||
label: 'Team activity', | ||
value: '$activity_log_entry_created', | ||
}, | ||
] | ||
|
||
const getSimpleFilterValue = (value?: HogFunctionFiltersType): string | undefined => { | ||
return value?.events?.[0]?.id | ||
} | ||
|
||
const setSimpleFilterValue = (value: string): HogFunctionFiltersType => { | ||
return { | ||
events: [ | ||
{ | ||
name: FILTER_OPTIONS.find((option) => option.value === value)?.label, | ||
id: value, | ||
type: 'events', | ||
}, | ||
], | ||
} | ||
} | ||
|
||
export function HogFunctionFiltersInternal(): JSX.Element { | ||
return ( | ||
<div className="p-3 space-y-2 border rounded bg-bg-light"> | ||
<LemonField name="filters" label="Trigger" help="Choose what event should trigger this destination"> | ||
{({ value, onChange }) => ( | ||
<> | ||
<LemonSelect | ||
options={FILTER_OPTIONS} | ||
value={getSimpleFilterValue(value)} | ||
onChange={(value) => onChange(setSimpleFilterValue(value))} | ||
placeholder="Select a filter" | ||
/> | ||
</> | ||
)} | ||
</LemonField> | ||
</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
Oops, something went wrong.