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: Add plugin config filtering #22469

Merged
merged 310 commits into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from 199 commits
Commits
Show all changes
310 commits
Select commit Hold shift + click to select a range
4f248f6
Merge branch 'feat/action-refactor-1' into feat/action-refactor-2
benjackwhite May 2, 2024
4682aeb
come on now...
benjackwhite May 2, 2024
63c7bc0
Merge branch 'feat/action-refactor-1' into feat/action-refactor-2
benjackwhite May 3, 2024
160adb3
Merge branch 'feat/action-refactor-2' into feat/actions-webhooks-v2
benjackwhite May 3, 2024
ef9e3f7
Fix
benjackwhite May 3, 2024
65ed743
Added tests
benjackwhite May 3, 2024
288ffe5
Merge branch 'master' into feat/action-refactor-1
benjackwhite May 3, 2024
1ae27ce
Merge branch 'feat/action-refactor-1' into feat/action-refactor-2
benjackwhite May 3, 2024
aaef5f0
Merge branch 'feat/action-refactor-2' into feat/actions-webhooks-part1
benjackwhite May 3, 2024
30c960b
Update UI snapshots for `chromium` (1)
github-actions[bot] May 3, 2024
7012efb
Update UI snapshots for `chromium` (1)
github-actions[bot] May 3, 2024
2697a68
Merge branch 'master' into feat/actions-webhooks-part1
benjackwhite May 6, 2024
1260452
Fix up
benjackwhite May 6, 2024
ebe3ef2
Added list to the actions
benjackwhite May 6, 2024
e51602a
Fix
benjackwhite May 6, 2024
788800c
Merge branch 'master' into feat/actions-webhooks-part1
benjackwhite May 6, 2024
63ef190
Merge branch 'master' into feat/actions-webhooks-part1
benjackwhite May 6, 2024
538e2eb
Fix
benjackwhite May 6, 2024
af494f6
Fix up
benjackwhite May 6, 2024
3f69c5e
Fix
benjackwhite May 6, 2024
490c388
Update UI snapshots for `chromium` (1)
github-actions[bot] May 6, 2024
9744e5c
Remove redundant list method
benjackwhite May 6, 2024
fb752dd
Merge branch 'feat/actions-webhooks-part1' of github.com:PostHog/post…
benjackwhite May 6, 2024
a456487
Update query snapshots
github-actions[bot] May 6, 2024
54fffc3
Update UI snapshots for `chromium` (1)
github-actions[bot] May 6, 2024
f6c3626
Fix
benjackwhite May 6, 2024
40d6415
Fix
benjackwhite May 6, 2024
241bd04
Fix
benjackwhite May 6, 2024
4ab0280
Fix
benjackwhite May 6, 2024
a5c4aef
Fixes
benjackwhite May 7, 2024
5fd3417
Fix up
benjackwhite May 7, 2024
d7f5959
Merge branch 'master' into feat/actions-webhooks-part1
benjackwhite May 7, 2024
63b6327
Update query snapshots
github-actions[bot] May 7, 2024
5677f53
Merge branch 'master' into feat/actions-webhooks-part1
benjackwhite May 7, 2024
4189223
Update UI snapshots for `chromium` (1)
github-actions[bot] May 7, 2024
07f40f9
Update query snapshots
github-actions[bot] May 7, 2024
7b4780f
Update UI snapshots for `chromium` (1)
github-actions[bot] May 7, 2024
a36da65
Merge branch 'master' into feat/actions-webhooks-part1
benjackwhite May 7, 2024
a26dfa9
Update query snapshots
github-actions[bot] May 7, 2024
58d770f
Merge branch 'master' into feat/actions-webhooks-part1
benjackwhite May 7, 2024
a0c1f49
Update query snapshots
github-actions[bot] May 7, 2024
a74b6a9
Fix tests
benjackwhite May 7, 2024
c536863
Fix
benjackwhite May 7, 2024
f130bdc
Merge branch 'master' into feat/actions-webhooks-part1
benjackwhite May 7, 2024
aba3c40
Merge branch 'master' into feat/actions-webhooks-part1
benjackwhite May 8, 2024
fc1591a
Update UI snapshots for `chromium` (1)
github-actions[bot] May 8, 2024
94f08dd
Update query snapshots
github-actions[bot] May 8, 2024
f419ada
Merge branch 'master' into feat/actions-webhooks-part1
benjackwhite May 8, 2024
b4652e0
Merge branch 'feat/actions-webhooks-part1' of github.com:PostHog/post…
benjackwhite May 8, 2024
421d58d
Merge branch 'master' into feat/actions-webhooks-part1
benjackwhite May 8, 2024
eb47125
Merge branch 'master' into feat/actions-webhooks-part1
benjackwhite May 8, 2024
94af88f
Added migration
benjackwhite May 8, 2024
844d217
Merge branch 'feat/action-webhooks-migration' into feat/actions-webho…
benjackwhite May 8, 2024
4ecaa96
Merge branch 'feat/actions-webhooks-part1' of github.com:PostHog/post…
benjackwhite May 8, 2024
8eb1676
Fix migration
benjackwhite May 9, 2024
cae5513
Fix comment
benjackwhite May 9, 2024
2dc0fc7
Fix
benjackwhite May 9, 2024
26502d5
Fix
benjackwhite May 9, 2024
1c46b13
Merge branch 'master' into feat/action-webhooks-migration
benjackwhite May 10, 2024
40e8c41
Merge branch 'feat/action-webhooks-migration' into feat/actions-webho…
benjackwhite May 10, 2024
69cc4a7
Update query snapshots
github-actions[bot] May 10, 2024
eaefa24
Fixes
benjackwhite May 10, 2024
abbb552
Fixes
benjackwhite May 10, 2024
5b92a3f
Fixes
benjackwhite May 10, 2024
05a0b68
feat: Action webhooks part 2 (#22066)
benjackwhite May 10, 2024
39d0878
Styles improvements
benjackwhite May 10, 2024
2df62f0
Fix up wrapping
benjackwhite May 10, 2024
9826a41
Fixes
benjackwhite May 10, 2024
3b33232
Fixes
benjackwhite May 10, 2024
d027437
Refactor type
benjackwhite May 10, 2024
db4cd3c
Fixes
benjackwhite May 10, 2024
13cfe32
Fixes
benjackwhite May 10, 2024
961c18f
Fixes
benjackwhite May 10, 2024
2ae6ddc
Merge branch 'master' into feat/action-webhooks-migration
benjackwhite May 21, 2024
24f72e2
Fix e2e
benjackwhite May 21, 2024
ece7a8f
Update UI snapshots for `chromium` (1)
github-actions[bot] May 21, 2024
9b46a01
Update UI snapshots for `chromium` (1)
github-actions[bot] May 21, 2024
87d7827
Fix
benjackwhite May 21, 2024
4e305eb
Added stories
benjackwhite May 21, 2024
69e3943
Fix
benjackwhite May 21, 2024
4ddd474
Update UI snapshots for `chromium` (1)
github-actions[bot] May 21, 2024
6f95082
merge
benjackwhite May 21, 2024
a9db770
Merge branch 'feat/action-webhooks-migration' into feat/actions-webho…
benjackwhite May 21, 2024
5db05e3
Update UI snapshots for `chromium` (1)
github-actions[bot] May 21, 2024
21c9db9
Update query snapshots
github-actions[bot] May 21, 2024
9d03ba0
Update UI snapshots for `chromium` (1)
github-actions[bot] May 21, 2024
12053fe
Fix
benjackwhite May 21, 2024
65dbeca
Merge branch 'feat/actions-webhooks-part1' into feat/compact-action-edit
benjackwhite May 21, 2024
1dcdcf0
Fixed up UI
benjackwhite May 21, 2024
af69e52
Added buttons to header
benjackwhite May 21, 2024
9d99ff6
Fixes
benjackwhite May 21, 2024
bd2c8d9
Fixes
benjackwhite May 21, 2024
b6feb86
Update UI snapshots for `chromium` (1)
github-actions[bot] May 21, 2024
b263377
Fix spacing
benjackwhite May 21, 2024
a9e9c1e
Merge branch 'feat/compact-action-edit' of github.com:PostHog/posthog…
benjackwhite May 21, 2024
4911a0a
Update UI snapshots for `chromium` (1)
github-actions[bot] May 21, 2024
4c13e81
Update UI snapshots for `chromium` (1)
github-actions[bot] May 21, 2024
86b66f3
Update UI snapshots for `chromium` (1)
github-actions[bot] May 21, 2024
b10aa10
Merge branch 'master' into feat/action-webhooks-migration
benjackwhite May 22, 2024
4a9d2d5
Merge branch 'feat/action-webhooks-migration' into feat/actions-webho…
benjackwhite May 22, 2024
c39ef9c
Merge branch 'feat/actions-webhooks-part1' into feat/compact-action-edit
benjackwhite May 22, 2024
27771aa
Fix
benjackwhite May 22, 2024
72a13de
Update UI snapshots for `chromium` (2)
github-actions[bot] May 22, 2024
0e7d5ca
Update UI snapshots for `chromium` (2)
github-actions[bot] May 22, 2024
9e1fe30
Merge branch 'master' into feat/actions-webhooks-part1
benjackwhite May 22, 2024
3df8bd1
Merge branch 'master' into feat/actions-webhooks-part1
benjackwhite May 22, 2024
6105fd8
Update UI snapshots for `chromium` (1)
github-actions[bot] May 22, 2024
025da1d
Fix up actions
benjackwhite May 22, 2024
dfce472
Merge branch 'feat/actions-webhooks-part1' of github.com:PostHog/post…
benjackwhite May 22, 2024
c48061f
Update UI snapshots for `chromium` (1)
github-actions[bot] May 22, 2024
764d8af
Merge branch 'feat/actions-webhooks-part1' into feat/compact-action-edit
benjackwhite May 22, 2024
1d4a25b
Fixes
benjackwhite May 22, 2024
707c6ae
Update UI snapshots for `chromium` (1)
github-actions[bot] May 22, 2024
a48add7
Update UI snapshots for `chromium` (1)
github-actions[bot] May 22, 2024
a6c6d0d
Added filters model
benjackwhite May 23, 2024
4cb8ca8
Fix tests
benjackwhite May 23, 2024
908a54c
Add to matching code
benjackwhite May 23, 2024
934443c
Fix up
benjackwhite May 23, 2024
90daaef
Fix
benjackwhite May 23, 2024
2f3cc68
Merge branch 'master' into feat/actions-webhooks-part1
benjackwhite May 23, 2024
b13dd49
Merge branch 'feat/actions-webhooks-part1' into feat/compact-action-edit
benjackwhite May 23, 2024
83c94ad
Merge branch 'feat/compact-action-edit' into feat/plugin-event-filters
benjackwhite May 23, 2024
31fce23
Update UI snapshots for `chromium` (1)
github-actions[bot] May 23, 2024
ee2884a
Update UI snapshots for `chromium` (1)
github-actions[bot] May 23, 2024
2cc4471
Update query snapshots
github-actions[bot] May 23, 2024
0924f68
Update UI snapshots for `chromium` (1)
github-actions[bot] May 23, 2024
e4c5281
Fix
benjackwhite May 23, 2024
52f4414
Fixes
benjackwhite May 23, 2024
73b3267
Fixes!
benjackwhite May 23, 2024
fe607c0
Added test
benjackwhite May 23, 2024
c881b21
Fix up
benjackwhite May 23, 2024
afe5b0d
Fix
benjackwhite May 23, 2024
ffea873
Fix up location of save and cancel buttons
benjackwhite May 23, 2024
1e37870
Merge branch 'master' into feat/actions-webhooks-part1
benjackwhite May 23, 2024
6686285
Merge branch 'feat/actions-webhooks-part1' into feat/compact-action-edit
benjackwhite May 23, 2024
02111bd
Merge branch 'feat/compact-action-edit' into feat/plugin-event-filters
benjackwhite May 23, 2024
9552db5
Update UI snapshots for `chromium` (1)
github-actions[bot] May 23, 2024
7b85833
Update UI snapshots for `chromium` (1)
github-actions[bot] May 23, 2024
26e3b7f
Update UI snapshots for `chromium` (2)
github-actions[bot] May 23, 2024
e7d6136
Update UI snapshots for `chromium` (1)
github-actions[bot] May 23, 2024
7639fed
Update UI snapshots for `chromium` (2)
github-actions[bot] May 23, 2024
0f7d977
Update UI snapshots for `chromium` (1)
github-actions[bot] May 23, 2024
f187c1f
Update UI snapshots for `chromium` (1)
github-actions[bot] May 23, 2024
5f9d7b3
Update UI snapshots for `chromium` (2)
github-actions[bot] May 23, 2024
63400a7
Update UI snapshots for `chromium` (2)
github-actions[bot] May 23, 2024
89ceff3
Fix up filters
benjackwhite May 24, 2024
fd846f2
Remove match action
benjackwhite May 24, 2024
8895583
Fix up types and logics
benjackwhite May 24, 2024
76fa154
Fix up action and event filtering
benjackwhite May 24, 2024
e74c125
Added comment
benjackwhite May 24, 2024
57fb907
Fix remove lemon select action
benjackwhite May 24, 2024
5c2f29b
Fix
benjackwhite May 24, 2024
80e2c0c
Update UI snapshots for `chromium` (2)
github-actions[bot] May 24, 2024
5d08f1c
Update UI snapshots for `chromium` (1)
github-actions[bot] May 24, 2024
7507ea1
Update UI snapshots for `chromium` (1)
github-actions[bot] May 24, 2024
9a64742
Update UI snapshots for `chromium` (2)
github-actions[bot] May 24, 2024
20285ce
Fix up look sharp
benjackwhite May 24, 2024
998cc2a
Merge branch 'feat/action-and-event-filters' of github.com:PostHog/po…
benjackwhite May 24, 2024
062214a
Fix
benjackwhite May 24, 2024
db319f2
Fixes
benjackwhite May 24, 2024
aa4177e
Update UI snapshots for `chromium` (2)
github-actions[bot] May 24, 2024
57a66d4
Update UI snapshots for `chromium` (2)
github-actions[bot] May 24, 2024
e45ec12
Fix up formatting
benjackwhite May 24, 2024
d5168ef
Fixes
benjackwhite May 24, 2024
82737da
Fixes
benjackwhite May 24, 2024
404ef1b
Fixes
benjackwhite May 24, 2024
ae4ae7c
Merge branch 'master' into feat/actions-webhooks-part1
benjackwhite May 28, 2024
ac003ae
Fix test
benjackwhite May 28, 2024
fba3769
feat: Design updates for pipeline editing (#22389)
benjackwhite May 28, 2024
fe31a5a
Merge branch 'feat/actions-webhooks-part1' into feat/plugin-event-fil…
benjackwhite May 28, 2024
af517cf
Merge branch 'feat/plugin-event-filters' into feat/action-and-event-f…
benjackwhite May 28, 2024
000c00d
Update UI snapshots for `chromium` (1)
github-actions[bot] May 28, 2024
5dc6f88
Update UI snapshots for `chromium` (1)
github-actions[bot] May 28, 2024
ad551b7
Update UI snapshots for `chromium` (2)
github-actions[bot] May 28, 2024
9f0245e
Added extra tests
benjackwhite May 28, 2024
b3ddb46
Merge branch 'feat/action-and-event-filters' of github.com:PostHog/po…
benjackwhite May 28, 2024
d3e77c0
Merge branch 'feat/plugin-event-filters' into feat/action-and-event-f…
benjackwhite May 28, 2024
77dcb9b
Update UI snapshots for `chromium` (2)
github-actions[bot] May 28, 2024
fb7eae1
Fixes
benjackwhite May 28, 2024
5fbc26e
Merge branch 'feat/plugin-event-filters' of github.com:PostHog/postho…
benjackwhite May 28, 2024
f880c92
Fix
benjackwhite May 28, 2024
a2894a7
Update UI snapshots for `chromium` (1)
github-actions[bot] May 28, 2024
e36000a
Removed old parts
benjackwhite May 28, 2024
d24ab03
Update UI snapshots for `chromium` (1)
github-actions[bot] May 28, 2024
f84b7d9
Fix up displaying related plugins
benjackwhite May 28, 2024
251eb31
Merge branch 'feat/plugin-event-filters' of github.com:PostHog/postho…
benjackwhite May 28, 2024
bfeaef9
Fix
benjackwhite May 28, 2024
84bd90f
Merge branch 'master' into feat/plugin-event-filters
benjackwhite May 28, 2024
50cba73
Fixes
benjackwhite May 28, 2024
b360177
Fix
benjackwhite May 28, 2024
74b90f4
Fix
benjackwhite May 28, 2024
f654aab
Fixes
benjackwhite May 28, 2024
cd1874f
Update query snapshots
github-actions[bot] May 28, 2024
4bcfc74
fix
benjackwhite May 28, 2024
71fad0d
Merge branch 'master' into feat/plugin-event-filters
benjackwhite May 28, 2024
89d4bd0
Update query snapshots
github-actions[bot] May 28, 2024
e05515f
Update query snapshots
github-actions[bot] May 28, 2024
d3fa41c
Fix
benjackwhite May 28, 2024
d481ec6
Merge branch 'feat/plugin-event-filters' of github.com:PostHog/postho…
benjackwhite May 28, 2024
264e5b0
Update query snapshots
github-actions[bot] May 28, 2024
1500879
Update UI snapshots for `chromium` (2)
github-actions[bot] May 28, 2024
2f1d20c
Update UI snapshots for `chromium` (2)
github-actions[bot] May 28, 2024
e2c3bfc
Update query snapshots
github-actions[bot] May 28, 2024
f57ec3e
Merge branch 'master' into feat/plugin-event-filters
benjackwhite May 29, 2024
15a92a5
Update UI snapshots for `chromium` (1)
github-actions[bot] May 29, 2024
2a86011
Update UI snapshots for `chromium` (2)
github-actions[bot] May 29, 2024
3e07dbf
Update UI snapshots for `chromium` (1)
github-actions[bot] May 29, 2024
c0cb320
Update UI snapshots for `chromium` (2)
github-actions[bot] May 29, 2024
1654fe9
Update UI snapshots for `chromium` (2)
github-actions[bot] May 29, 2024
ca417f9
Update UI snapshots for `chromium` (2)
github-actions[bot] May 29, 2024
2306476
Fix
benjackwhite May 29, 2024
3aaa04c
Merge branch 'master' into feat/plugin-event-filters
benjackwhite May 29, 2024
cf58bde
feat: Add internal filtering to plugins (#22549)
benjackwhite May 29, 2024
dd0a4af
Update UI snapshots for `chromium` (2)
github-actions[bot] May 29, 2024
7568cbe
Fix
benjackwhite May 29, 2024
ae0c804
Merge branch 'feat/plugin-event-filters' of github.com:PostHog/postho…
benjackwhite May 29, 2024
d056ece
Update UI snapshots for `webkit` (2)
github-actions[bot] May 29, 2024
bd92e3a
Merge branch 'feat/plugin-event-filters' of github.com:PostHog/postho…
benjackwhite May 29, 2024
5cf7321
Update query snapshots
github-actions[bot] May 29, 2024
d319278
Update query snapshots
github-actions[bot] May 29, 2024
bf671ee
Fix
benjackwhite May 29, 2024
797d155
Update UI snapshots for `chromium` (1)
github-actions[bot] May 29, 2024
e0e385f
Update UI snapshots for `chromium` (2)
github-actions[bot] May 29, 2024
1f5919b
Update query snapshots
github-actions[bot] May 29, 2024
8ba5dd1
Update query snapshots
github-actions[bot] May 29, 2024
543702a
fix up before unload
benjackwhite May 29, 2024
3720627
Update UI snapshots for `chromium` (1)
github-actions[bot] May 29, 2024
9fb37c3
Update UI snapshots for `chromium` (2)
github-actions[bot] May 29, 2024
7595cfe
Update query snapshots
github-actions[bot] May 29, 2024
fd1baef
Update UI snapshots for `chromium` (2)
github-actions[bot] May 29, 2024
7d98bd7
Update UI snapshots for `chromium` (2)
github-actions[bot] May 29, 2024
346806e
Update UI snapshots for `chromium` (1)
github-actions[bot] May 29, 2024
ef112db
Update query snapshots
github-actions[bot] May 29, 2024
a5b5291
Update UI snapshots for `chromium` (2)
github-actions[bot] May 29, 2024
0c23db4
Update UI snapshots for `chromium` (2)
github-actions[bot] May 29, 2024
cf48ac1
Update UI snapshots for `chromium` (2)
github-actions[bot] May 29, 2024
0748775
Update UI snapshots for `chromium` (1)
github-actions[bot] May 29, 2024
7cbf20d
Update UI snapshots for `chromium` (2)
github-actions[bot] May 29, 2024
06d19f3
Update query snapshots
github-actions[bot] May 29, 2024
956025f
Update UI snapshots for `chromium` (1)
github-actions[bot] May 29, 2024
8b4ed78
Update UI snapshots for `chromium` (2)
github-actions[bot] May 29, 2024
438ab0f
Update query snapshots
github-actions[bot] May 29, 2024
86e3130
Update UI snapshots for `chromium` (2)
github-actions[bot] May 29, 2024
8a6a7d2
Update query snapshots
github-actions[bot] May 29, 2024
c755d9b
Update query snapshots
github-actions[bot] May 29, 2024
11e2a75
Merge branch 'master' into feat/plugin-event-filters
benjackwhite May 30, 2024
d74e0ea
Update UI snapshots for `chromium` (2)
github-actions[bot] May 30, 2024
8806b8c
Update UI snapshots for `chromium` (1)
github-actions[bot] May 30, 2024
3c55389
Update UI snapshots for `chromium` (2)
github-actions[bot] May 30, 2024
5838280
Update UI snapshots for `chromium` (1)
github-actions[bot] May 30, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ee/api/test/test_action.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ def test_actions_does_not_nplus1(self):
action.tagged_items.create(tag=tag)

# django_session + user + team + look up if rate limit is enabled (cached after first lookup)
# + organizationmembership + organization + action + taggeditem
with self.assertNumQueries(8):
# + organizationmembership + organization + action + taggeditem + plugin_configs
with self.assertNumQueries(10):
response = self.client.get(f"/api/projects/{self.team.id}/actions")
self.assertEqual(response.json()["results"][0]["tags"][0], "tag")
self.assertEqual(response.status_code, status.HTTP_200_OK)
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
49 changes: 49 additions & 0 deletions frontend/src/lib/components/ActionSelect.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import { LemonButtonProps } from '@posthog/lemon-ui'
import { useValues } from 'kea'
import { TaxonomicFilterGroupType } from 'lib/components/TaxonomicFilter/types'
import { TaxonomicPopover } from 'lib/components/TaxonomicPopover/TaxonomicPopover'
import { actionLogic } from 'scenes/actions/actionLogic'

interface LemonSelectActionProps {
value?: number | null
onChange?: (value: number | null) => void
disabled?: boolean
placeholder?: string
allowClear?: boolean
size?: LemonButtonProps['size']
fullWidth?: boolean
}

export function LemonSelectAction({
value,
onChange = () => {},
disabled,
placeholder = 'Select an action',
allowClear,
size,
}: LemonSelectActionProps): JSX.Element {
const { action } = useValues(actionLogic({ id: value ?? undefined }))

return (
<TaxonomicPopover
groupType={TaxonomicFilterGroupType.Actions}
onChange={onChange}
disabled={disabled}
value={value}
type="secondary"
placeholder={placeholder}
data-attr="event-name-box"
renderValue={(v) =>
v !== null ? (
<>
<span>{value} - </span>
<span>{action?.name ?? 'Loading...'}</span>
</>
) : null
}
allowClear={allowClear}
size={size}
fullWidth
/>
)
}
1 change: 1 addition & 0 deletions frontend/src/lib/constants.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ export const FEATURE_FLAGS = {
HEATMAPS_UI: 'heatmaps-ui', // owner: @benjackwhite
THEME: 'theme', // owner: @aprilfools
SESSION_TABLE_PROPERTY_FILTERS: 'session-table-property-filters', // owner: @robbie-c
PLUGINS_ACTION_MATCHING: 'plugins-action-matching', // owner: @benjackwhite
SESSION_REPLAY_HOG_QL_FILTERING: 'session-replay-hogql-filtering', // owner: #team-replay
INSIGHT_LOADING_BAR: 'insight-loading-bar', // owner: @aspicer
SESSION_REPLAY_ARTIFICIAL_LAG: 'artificial-lag-query-performance', // owner: #team-replay
Expand Down
3 changes: 3 additions & 0 deletions frontend/src/scenes/actions/Action.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { NodeKind } from '~/queries/schema'
import { ActionType } from '~/types'

import { ActionEdit } from './ActionEdit'
import { ActionPlugins } from './ActionPlugins'

export const scene: SceneExport = {
logic: actionLogic,
Expand Down Expand Up @@ -46,6 +47,8 @@ export function Action({ id }: { id?: ActionType['id'] } = {}): JSX.Element {
<ActionEdit id={id} action={action} />
{id && (
<>
<ActionPlugins />

{isComplete ? (
<div className="mt-8">
<h2 className="subtitle">Matching events</h2>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/scenes/actions/ActionEdit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ export function ActionEdit({ action: loadedAction, id }: ActionEditLogicProps):
</p>
<LemonField name="steps">
{({ value: stepsValue, onChange }) => (
<div className=" grid @4xl:grid-cols-2 gap-3">
<div className="grid @4xl:grid-cols-2 gap-3">
{stepsValue.map((step: ActionStepType, index: number) => {
const identifier = String(JSON.stringify(step))
return (
Expand Down
49 changes: 49 additions & 0 deletions frontend/src/scenes/actions/ActionPlugins.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import { LemonButton } from '@posthog/lemon-ui'
import { useValues } from 'kea'
import { LemonTableLink } from 'lib/lemon-ui/LemonTable/LemonTableLink'
import { actionLogic } from 'scenes/actions/actionLogic'
import { PluginImage } from 'scenes/plugins/plugin/PluginImage'
import { urls } from 'scenes/urls'

import { PipelineNodeTab, PipelineStage } from '~/types'

export function ActionPlugins(): JSX.Element | null {
const { action } = useValues(actionLogic)

if (!action?.plugin_configs?.length) {
return null
}

return (
<>
<h2 className="subtitle">Connected apps</h2>

{action.plugin_configs.map((pluginConfig) => (
<div key={pluginConfig.id} className="flex items-center gap-2 border rounded bg-bg-light p-2">
<PluginImage plugin={pluginConfig.plugin_info} size="small" />
<LemonTableLink
title={pluginConfig.plugin_info.name}
to={urls.pipelineNode(
PipelineStage.Destination,
pluginConfig.id,
PipelineNodeTab.Configuration
)}
/>
<span className="flex-1" />

<LemonButton
type="secondary"
size="small"
to={urls.pipelineNode(
PipelineStage.Destination,
pluginConfig.id,
PipelineNodeTab.Configuration
)}
>
Configure
</LemonButton>
</div>
))}
</>
)
}
54 changes: 28 additions & 26 deletions frontend/src/scenes/actions/actionEditLogic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,13 @@ import { ActionStepType, ActionType } from '~/types'
import type { actionEditLogicType } from './actionEditLogicType'
import { actionLogic } from './actionLogic'

export type NewActionType = Partial<ActionType> &
Pick<ActionType, 'name' | 'post_to_slack' | 'slack_message_format' | 'steps'>
export type ActionEditType = ActionType | NewActionType

export interface SetActionProps {
merge?: boolean
}

export interface ActionEditLogicProps {
id?: number
action?: ActionEditType
action?: ActionType | null
}

export const DEFAULT_ACTION_STEP: ActionStepType = {
Expand All @@ -36,7 +32,7 @@ export const DEFAULT_ACTION_STEP: ActionStepType = {
}

export const actionEditLogic = kea<actionEditLogicType>([
path(['scenes', 'actions', 'actionEditLogic']),
path((key) => ['scenes', 'actions', 'actionEditLogic', key]),
props({} as ActionEditLogicProps),
key((props) => props.id || 'new'),
connect({
Expand All @@ -51,7 +47,7 @@ export const actionEditLogic = kea<actionEditLogicType>([
values: [sceneLogic, ['activeScene']],
}),
actions({
setAction: (action: Partial<ActionEditType>, options: SetActionProps = { merge: true }) => ({
setAction: (action: Partial<ActionType>, options: SetActionProps = { merge: true }) => ({
action,
options,
}),
Expand All @@ -70,10 +66,12 @@ export const actionEditLogic = kea<actionEditLogicType>([

forms(({ actions, props }) => ({
action: {
defaults: props.action ?? {
name: '',
steps: [{ event: '$pageview' }],
},
defaults:
props.action ??
({
name: '',
steps: [DEFAULT_ACTION_STEP],
} as ActionType),

submit: async (updatedAction, breakpoint) => {
let action: ActionType
Expand Down Expand Up @@ -122,10 +120,10 @@ export const actionEditLogic = kea<actionEditLogicType>([

loaders(({ props, values }) => ({
action: [
{ ...props.action } as ActionEditType,
{ ...props.action } as ActionType,
{
setAction: ({ action, options: { merge } }) =>
(merge ? { ...values.action, ...action } : action) as ActionEditType,
(merge ? { ...values.action, ...action } : action) as ActionType,
},
],
})),
Expand All @@ -136,19 +134,23 @@ export const actionEditLogic = kea<actionEditLogicType>([
if (!actionId) {
return
}
await deleteWithUndo({
endpoint: api.actions.determineDeleteEndpoint(),
object: values.action,
callback: (undo: boolean) => {
if (undo) {
router.actions.push(urls.action(actionId))
} else {
actions.resetAction()
router.actions.push(urls.actions())
actions.loadActions()
}
},
})
try {
await deleteWithUndo({
endpoint: api.actions.determineDeleteEndpoint(),
object: values.action,
callback: (undo: boolean) => {
if (undo) {
router.actions.push(urls.action(actionId))
} else {
actions.resetAction()
router.actions.push(urls.actions())
actions.loadActions()
}
},
})
} catch (e: any) {
lemonToast.error(`Error deleting action: ${e.detail}`)
}
},
})),

Expand Down
17 changes: 10 additions & 7 deletions frontend/src/scenes/actions/actionLogic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,17 @@ export const actionLogic = kea<actionLogicType>([
setIsComplete: (isComplete) => ({ isComplete }),
})),
loaders(({ props }) => ({
action: {
loadAction: async () => {
if (!props.id) {
throw new Error('Cannot fetch an unsaved action from the API.')
}
return await api.actions.get(props.id)
action: [
null as ActionType | null,
{
loadAction: async () => {
if (!props.id) {
throw new Error('Cannot fetch an unsaved action from the API.')
}
return await api.actions.get(props.id)
},
},
},
],
})),
reducers(() => ({
pollTimeout: [
Expand Down
1 change: 0 additions & 1 deletion frontend/src/scenes/pipeline/Destinations.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ export function Destinations(): JSX.Element {

export function DestinationsTable({ inOverview = false }: { inOverview?: boolean }): JSX.Element {
const { loading, destinations } = useValues(pipelineDestinationsLogic)

const data = inOverview ? destinations.filter((destination) => destination.enabled) : destinations

return (
Expand Down
Loading
Loading