0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-24 09:14:46 +01:00
posthog/ee/api
Marius Andra 1ddecf7800
feat(insights): dashboards insights many-to-many another attempt (#9416)
* dashboards and tiles, view mode, basic frontend typing

* update types, many-to-many relations

* update insight dashboards

* duplication works

* mypy

* fix migrations

* fix duplication bug

* add default filters

* fix caching

* deprecation nonsense

* remove things

* add nplus1 tests

* make nplus1 test need no explanation

* don't need to prefetch and select related

* move layouts API onto dashboard and store updates on DashboardTile

* apply dashboard filters to insights when loading dashboard

* don't need to update cached result in a cached function

* ugh, filter caching

* update basic serializer test

* add defaults when getting layout and colour from insights

* caching insights depends on filters hash changing when the insight is saved

* caching insights depends on filters hash changing when the insight is saved

* can't constantly resave insight filter hashes any more

* prettify the skip comment

* fix patch reference

* fix test assertion

* need to save dashboards to update insight filters_hash *until we fix filtering*

* add comment explaining why the test is failing - so I remember later

* blunt solution to not overwriting dashboard aware filter hash

* explode by 7 instead of 9 queries per insight added to dashboard

* mark some learning as a TODO

* only update dashboard layout when in edit mode

* insight logic no longer deals with saving layout

* skip the nplus1 test _for now_

* update the dashboard snapshots

* enrich insights with extra props when loaded in dashboard context

* update color via dashboard not insight

* create empty insight with a dashboards array, not a single dashboard

* remove empty TODO

* avoid initialising dashboardsmodel for dashboards logic tests

* no need to select and prefetch related

* order migration by last modified at

* remove insight layouts endpoint

* Add new from_dashboard parameter to API docs

* typo

* move deprecated fields on insight

* fix syntax error in migration file

* add permissions tests

* add help text to dashboards serializer field

* fix test with silent server errors

* down to 3 extra queries per insight on each dasboard

* down to 1 extra queries per insight on each dashboard

* set dashboard on context when retrieving an insight, so that filters are reported correctly

* explicitly fail to add insight to another team's dashboard

* update insight cache in correct context when refreshing

* add migration test

* satisfy the type checker

* Revert "satisfy the type checker"

This reverts commit 4d48a16cf4.

* satisfy the type checker

* really satisfy the type checker

* address two nits

* can ignore conflicts when inserting dashboard tiles

Co-authored-by: Paul D'Ambra <paul.dambra@gmail.com>
2022-04-22 09:03:22 +01:00
..
test feat(insights): dashboards insights many-to-many another attempt (#9416) 2022-04-22 09:03:22 +01:00
__init__.py
authentication.py feat(sso): Multitenant SAML (#9225) 2022-03-31 11:04:12 +02:00
dashboard_collaborator.py
debug_ch_queries.py
ee_event_definition.py
ee_property_definition.py
explicit_team_member.py
hooks.py fix(hooks): validate domain name (#9146) 2022-03-22 11:09:12 +01:00
license.py fix(licensing): Use most recently activated license instead of least (#9461) 2022-04-20 13:33:41 +02:00