* delete insight to dashboard relation on soft delete of either
* refactor tests
* obey mypy
* don't allow hard delete of insights or dashboards
* soft deleted insights return 404 on get
* prove soft delete can be reversed
* no need to test permissions on delete that nobody can do
* no need to test permissions on delete that nobody can do
* 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>