0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-12-01 04:12:23 +01:00
Commit Graph

4138 Commits

Author SHA1 Message Date
Tim Glaser
e31d166d74
Don't count internal metrics for billing purposes (#6228) 2021-10-05 15:05:51 +03:00
Alex Gyujin Kim
c2a1f30a56
Make saved insights meta fields editable in-line (#6159)
* refactor insight metadata into separate reusable components

* create insightMetdataLogic

* added editable states to fields

* description add suffix to input

* fix functional bugs with input values

* remove consoles

* testing for insightMetadataLogic

* revert Insight

* revert Insight

* make editable in view mode

* test for update path
2021-10-05 12:56:34 +02:00
Karl-Aksel Puulmann
fda8313be6
Use fixed benchmarking version (#6247)
This way adding new benchmarks/setup code does not invalidate the
existing code.
2021-10-05 13:24:10 +03:00
Guido Iaquinti
45fbb68d25
docker-compose: remove references to 'posthog/plugin-server' (#6152) 2021-10-05 09:20:43 +00:00
Karl-Aksel Puulmann
0512972426
Add benchmarks for cohort filtering in trends (#6244)
* Add benchmarks for cohort filtering in trends

* Add a way to manually trigger benchmarking
2021-10-05 12:16:55 +03:00
PostHog bot
e1a8a29d68
Update posthog-js to 1.14.0 (#6246) 2021-10-05 10:13:13 +01:00
Karl-Aksel Puulmann
f0c9d68166
Make PRINT_SQL output readable (#6245)
Our queries now contain a lot of comment noise that's not relevant when
developing. This change makes PRINT_SQL env variable usable again by
stripping these comments.
2021-10-05 11:27:17 +03:00
Paul D'Ambra
2af4622c09
Injects a logger during posthog init which sends an exception to Sentry when there is an XHR error (#6182)
* adds Sentry to the window object to facilitate logging for PostHog/posthog-js#290

* inject xhr error behaviour rather than injecting Sentry - depends on PostHog/posthog-js#296

* Add expected type to onXHRError function

* more safely add Sentry to posthog config

* update setting on xhr error config to correct exported config type

* enrich sentry error after testing
2021-10-04 14:52:41 -07:00
Paolo D'Amico
3419204d16
Fix dashboards loading error (#6229)
* Fix dashboards loading error

* fix typing

* adds tests to prove new change fixes issue

Co-authored-by: Paul D'Ambra <paul.dambra@gmail.com>
2021-10-04 14:47:14 -07:00
Paul D'Ambra
aa0ab19c5b
choose either count or aggregated value when sorting the insights table so that it doesn't matter if clickhouse or postgres returns the value (#6232) 2021-10-04 13:55:52 -07:00
Alex Gyujin Kim
7c68e1d154
fix input collapse and non default value (#6238) 2021-10-04 20:16:30 +00:00
Li Yi Yu
1043fb3d4c
Paths to funnels (#6215)
* paths to funnels

* account for pageview events and urls

* prettier

* sankey left is too cluttered/confusing
2021-10-04 15:15:39 -04:00
Eric Duong
4c13ef9a53
add extra handling if prop changes (#6207) 2021-10-04 13:38:08 -04:00
Eric Duong
1a9eafe0ed
paths: remove funnel limit when querying path funnels (#6210)
* remove funnel limit when querying path funnels

* add limit test and fix args

* fix args

* typos
2021-10-04 09:56:20 -04:00
Eric Duong
e3806f55b8
change styling (#6209) 2021-10-04 09:34:14 -04:00
PostHog bot
ff58d6277a
Update posthog-js to 1.13.17 (#6226) 2021-10-04 12:20:45 +01:00
Harry Waye
c450be93f5
ci(tests): show untested code in PR with codecov (#6082) 2021-10-04 10:37:15 +01:00
PostHog bot
5223ea0aa0
Update posthog-js to 1.13.16 (#6222)
Co-authored-by: posthog-bot <posthog-bot@users.noreply.github.com>
2021-10-04 10:12:40 +01:00
Harry Waye
eb08897cf4
dev(clickhouse): strip out comments before executing sql (#6181)
* dev(clickhouse): strip out comments before executing sql

This is so we can easily copy/paste from e.g. Metabase by querying the
system.query_log. In metabase is doesn't display new lines (although you
can download to file for this), but it's not very practical.

* test(clickhouse): use `capture_select_queries` in comment strip test

* test(clickhouse): only sub. params if non-insert query

This parallels `clickhouse_driver` behaviour.

* chore(clickhouse): move sql preparation to dedicated function

* refactor: rearrange func and type definitions
2021-10-04 08:13:31 +01:00
posthog-contributions-bot[bot]
25163d0bdb
🤖: Add dakshshah96 as a contributor 🎉 (#6212) 2021-10-02 18:49:09 +01:00
Tim Glaser
3402ba4ee7
Fix status reports (#6194)
* Fix status reports

* remove active in period

* types

* mypy
2021-10-01 18:56:29 +02:00
Li Yi Yu
66c3a23eae
fix http strip (#6204) 2021-10-01 11:11:03 -04:00
Neil Kakkar
c59a8c3a3c
Basic PersonModal for dropoff and completed paths (#6179)
* basic modal for dropoff and completed paths

* use right link for completed calculation

* fix calculations

* update Modal text

* cleanup

* rerun prettier
2021-10-01 15:39:45 +01:00
Karl-Aksel Puulmann
437b2982cd
Benchmarking suite for ClickHouse queries (#6187)
* Add asv code

* Get a benchmark running

* better output folder

* Move benchmark file

* Cleanup of config

* Run a query and benchmark

* Skip benchmarks for isort

* Set up materialized columns before test

* Better skipping logic

* Add first proper benchmark, add some documentation

* Person property filtering

* Add new workflow

* Show stderr in test run

* Continue debugging actions

* Try to save benchmark results to separate repo

* Output to main directory

* Scheduling

* Remove if temporarily

* Int for ms

* Comment on the PR

* Collapsible section

* Update README

* Clarification

* Remove h3

* Remove pyproject.toml, .gitignore changes that are unneeded
2021-10-01 15:20:58 +03:00
Michael Matloka
4ae063d0e6
Add project-nested version of all project-dependent endpoints (#6203)
* Add project-nested version of all project-dependent endpoints

* Fix hook `perform_create`

* Adjust `plugin-configs` to adhere to style of other endpoints
2021-10-01 13:38:33 +02:00
Li Yi Yu
3c033686db
Update paths dropdown options (#6200)
* update paths dropdown options and avoid merge issues

* minor adjustments

Co-authored-by: Neil Kakkar <neilkakkar@gmail.com>
2021-10-01 10:40:42 +00:00
James Greenhill
d5fb987d53
Create Kafka consumer and write tests for consumer and producer (#6170)
* Test Kafka

* black format python

* fix imports

* add kafka and zk deps for testing

* Include ZK and Kafka for all tests

* fix signature for kafka helper

* Connect to localhost for kafka

* update kafka host for all test runs

* Wrong env var for kafka

* consolidate env vars for github actions

* set the advertised hostname from the broker to localhost

* add env var to docker-compose for kafka broker advert host

* resort to what we do locally with /etc/hosts

* Remove configs for kafka that won't be used
2021-10-01 09:43:50 +01:00
Paolo D'Amico
19106cef2c
Signup UI Oct 2021 (#6136) 2021-10-01 07:26:19 +01:00
Sam Winslow
30a314b646
Fix tooltip on Formulas (#6199) 2021-10-01 04:52:23 +00:00
Alex Gyujin Kim
076bd43a88
More tests + Rename Modal state refactor (#6158)
* add a bunch of tests for logics and utils

* change comment

* addressed refactor comments

* hide renameFilter in logic, add util test
2021-09-30 17:17:41 -07:00
Guido Iaquinti
7e76387291
Speed improvements for the arm64 ClickHouse build (#6191) 2021-09-30 19:52:59 +00:00
Eric Duong
5c453e206e
paths: Funnel to path dropoff connection (#6198)
* ui

* dropoff ui
2021-09-30 14:29:00 -04:00
Eric Duong
8a6508bb02
fix typo (#6197) 2021-09-30 17:27:11 +00:00
Eric Duong
83eca7f227
paths & funnels: Funnel to path connection (#6160)
* restore progress

* working connection no UI visual

* working for events

* edit endpoint to start point

* working with close button

* funnel to path work (no dropoff yet)

* run prettier

* make suggested adjustmenst
2021-09-30 11:20:38 -04:00
Eric Duong
2bafa204f8
display value (#6161) 2021-09-30 10:14:47 -04:00
Michael Matloka
a704d8cc61
Fix test_analytics_metadata flakiness (#6188) 2021-09-30 11:53:12 +00:00
Michael Matloka
3a67367ac7
Project-based permissioning TopNavigation (#6027)
* Refactor `AvailableFeature` from strings to an enum everywhere

* Fix circular dependency and type

* Add "Per-project access" feature flag, premium feature, and organization switch

* Rename `OrganizationMembershipLevel` to `OrganizationAccessLevel`

* Create `ExplicitTeamMembership` model

* Show whether projects are restricted in the project switcher

* Update organizations API code

* Fix migrations

* Move organization tests that require EE to `ee`

* Revert `OrganizationMembershipLevel` rename

* Fix organization tests

* Update migration

* Fix schema and add Members to Project Settings

* Build out test memberships API with security tests

* Update `TeamMembers` and `teamMembersLogic`

* Move "Per-project access" description to tooltip

* Add moar tests

* Fix Project Members list logic

* Add additional membership checks

* Update migrations

* Fix typing

* Adjust explicit team memberships API similarly

* Fix typo

* Unify `ExplicitTeamMemberSerializer`

* Remove old changes to `membersLogic` usage

* Use `effective_membership_level` on `TeamBasicSerializer`

* Clean up organization update tests

* Explicitly disallow enabling per-project access for free

* Fix circular import

* Remove `id` from `UserSerializer`

* Fix typing

* Try to fix import

* Fix fatal typing

* Add more tests

* Update permissioning.ts

* Add clarifying comment to migration

* Fix import

* Revert `TopNavigation` changes

* Restore `TopNavigation` changes

This reverts commit 05fd9e4ed6.

* Try to add a story for `TopNavigation`

* minor clarifications

* Revert `TopNavigation` changes

* Restore `TopNavigation` changes

* Make new access control entirely project-based

* Update migrations

* Add `project_based_permissioning` to `TeamBasicSerializer`

* Update test_team.py

* Fix `isRestricted` in `ProjectRow`

* Disable project creation for non-admins

* Make project icon in top nav itself dynamic as well

* Fix story

* Delete 0169_project_based_permissioning.py

* Apply suggestions from code review

Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>

* Update frontend/src/layout/navigation/TopNavigation.tsx

Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>

* Address feedback

* Project-based permissioning full data access restrictions (#6068)

* Fix Access Control restriction tooltip

* Add `TeamMemberAccessPermission` and use it in viewsets

* Add `ErrorProjectUnavailable` scene

* Ignore mypy

* Update MainNavigation.tsx

* Update explicit_team_member.py

* Fix frontend detection of unavailable project

* Fix some tests and edge cases

* Fix basic permissions

* Add more tests

* Simplify `ExplicitTeamMemberViewSet` permissions

* Improve restrictions and add moar tests

* Update frontend

* Fix a couple of things

* Fix import

* Fix some edge cases

* Fix typing errors

* Use hedgehog instead of moth

Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>

* Address feedback

* Add proper permissioning to dashboard views

* Update ee/api/test/test_dashboard.py

Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>

Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>

* Run prettier

* Remove debug code

Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
2021-09-29 22:43:40 +00:00
Neil Kakkar
9cbece70fd
Some Paths fixes (#6175) 2021-09-29 12:44:30 -04:00
Neil Kakkar
26f7848b15
Add advanced options behind FF for Paths (#6173) 2021-09-29 16:57:19 +01:00
PostHog bot
707fc51bf1
Update posthog-js to 1.13.15 (#6174) 2021-09-29 12:24:11 +01:00
Michael Matloka
b601fb4590
Disable create, update, and delete on the DRF events endpoint (#6169) 2021-09-29 11:52:05 +01:00
Guido Iaquinti
f4e47abb09
Bump prettier and eslint-config-prettier versions (#6167)
* Bump 'prettier' and 'eslint-config-prettier' version

* Run 'yarn prettier' with the new bumped version
2021-09-29 11:49:29 +01:00
Yakko Majuri
0171732226
Add feature flag based cloud announcements (#6155) 2021-09-29 10:04:38 +00:00
Neil Kakkar
b8bc05661f
Proposal: Getting rid of Neighbors in Path Queries (#6125) 2021-09-29 10:44:47 +01:00
Neil Kakkar
579789b877
Allow excluding wildcards in paths (#6111)
* Allow excluding wildcards in paths

* address comment
2021-09-29 10:44:23 +01:00
Alex Gyujin Kim
77d3d66754
Various funnel breakdown fixes (#6133)
* some copy

* minor styling improvements

* remove console

* fix shady typing
2021-09-28 13:12:30 -07:00
Rick Marron
a0775d7fae
Replace sessions with session recordings (#6050)
* Move Sessions tab -> Session Recording (behind feature flag)

Note: the /scenes/sessionRecordings folder is a copy of /scenes/sessions. Planning to remove sessions from the new SessionRecordings folder over the next coupld of commits

* Add very basic session recording page

* Add session recordings to persons page and session recs can play

* add endpoints for clickhouse

* fix ordering in existing tests

* add basic test to pg and clickhouse

* small bug fix

* type fix

* add test for data leaking between teams

* fix navigation bugs

* Fix name of logic

* Add basic logic tests

* fix tests

* fix laoding state bug

* revert changes to existing session queries

* move to proper queries for session recordings

* type fixes

* rename feature flag

* type fix

* Fix capitalization

* remove showSessions and clean up ifs

* Style changes and refactor SessionPlayerDrawer

* bug fix

* move to using query params

* remove type from persons logic

* Move sessionRecordingTableLogic key to distinctId

* rename setSessionRecordingId to openSessionPlayer

* improve tests

* Cleanup from review

* move team and limit to parameters
2021-09-28 11:18:38 -07:00
Eric Duong
0dea7c6625
reduce edge limit (#6156) 2021-09-28 13:46:23 -04:00
Li Yi Yu
6284b645b0
New paths tab querybuilder UI (#5825)
* new path tab querybuilder

* prettier

* clean up

* wip

* format querybuidler

* prepare path type filter component

* dropdown

* formatted popup

* change button for endpoints

* styling the type buttons

* logic for all left side querybuilder components

* exclusion UI and logic

* improve exclusion handling, ensure API calls are made

* API fixes for event types

* fix popup on close issue with exclusions

* hide overflow on buttons

* all ui working

* more formatting adjustments

* type fixes

* leave response ambiguous

* feature flagging and adjust styles

* Add Step limit option

* add tooltip to wildcards

* rewrite tooltip for exclusions

* make Events toggle responsive

* fix types

* responsive at xl instead of lg for no overlaps

* Proof of concept of connecting Funnel to Paths

* protecc wip

* Connect Funnels to Paths

* remove funnel button for now

* remove unused

Co-authored-by: eric <eeoneric@gmail.com>
Co-authored-by: Neil Kakkar <neilkakkar@gmail.com>
2021-09-28 12:53:03 -04:00
Paul D'Ambra
a089562d53
fixes display of events in the storybook (#6154)
PR #6079 broke the display of events in the storybook for the events scene
2021-09-28 17:36:37 +01:00