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

2364 Commits

Author SHA1 Message Date
Michael Matloka
b33734bd89
Update plugin server to 0.6.11 (#3151) 2021-02-01 19:31:31 +01:00
Michael Matloka
95900d4fce
Fix FOSS copyright formatting (#3146)
* Update posthog-foss.yml

* Prepend "MIT LIcense" to FOSS LICENSE
2021-02-01 15:26:00 +01:00
Yakko Majuri
04c949aeee
Fix Person page loading by email under persons-2353 (#3139)
* Fix Person page loading by email under persons-2353'

* remove log

* update fix
2021-02-01 09:23:54 -05:00
Michael Matloka
6f586f19eb
Update copyright years and use MIT license in posthog-foss (#3145)
* Add 2021 to copyright years in LICENSE

* Change LICENSE to pure MIT in posthog-foss
2021-02-01 14:55:39 +01:00
Michael Matloka
200b80dd03
Chart above fold (#3142)
* Update TrendInsight minHeight to keep chart above the fold

* Refactor Insights main content for clarity

* Fix PostHog FOSS sync

* Remove extraneous div
2021-02-01 11:22:55 +01:00
Michael Matloka
427e4fac6e
Improve handling of .git* files/dirs (#3141)
* Create .gitattributes

* Remove .github/ in posthog-foss sync

* .gitignore whole directories (recursively ofc)

* Remove .gitignore line from ages past
2021-02-01 09:25:40 +01:00
Eric Duong
ff3d2d7aae
add null check on eventUsageLogic (#3125) 2021-02-01 06:30:37 +01:00
James Greenhill
34dbbec647
Remove clickhouse pooler from sync execute path (#3138) 2021-01-29 19:26:07 -08:00
Karl-Aksel Puulmann
1cc72c4da5
Populate a lone session recording for demo (#3128) 2021-01-29 14:28:55 +01:00
Karl-Aksel Puulmann
0ed41c63b7
Make social login work with new Onboarding logic (#3131) 2021-01-29 13:48:54 +01:00
Karl-Aksel Puulmann
ce342cd35f
Onboarding: Save personalization data (#3126) 2021-01-29 13:47:04 +01:00
Karl-Aksel Puulmann
9afc4a432e
Update demo data warning styles (#3120)
* Update demo data warning styles

Left-over from https://github.com/PostHog/posthog/pull/3103

* minor adjustment

Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
2021-01-29 10:25:39 +02:00
Eric Duong
89770ab270
Apply type and optional checks to billing var (#3121) 2021-01-29 08:58:17 +01:00
Eric Duong
7d52877092
Retention logic types (#3091)
* add null check

* add another check

* add types to retention logic

* change action into ts

* missing optional

* null check

* move types
2021-01-28 13:15:11 -05:00
Paolo D'Amico
e163e9d147
Onboarding personalisation adjustments (retention#9) (#3117) 2021-01-28 18:01:40 +01:00
Michael Matloka
0420786607
Make PluginConfig.order mandatory (#3122)
* Make PluginConfig.order mandatory

* upgrade plugin server to 0.6.10

* black

* Ensure no PluginConfig.order collission

* Clean up PluginConfig API

* Revert "Ensure no PluginConfig.order collission"

This reverts commit d8b2c907e4.

* Black

Co-authored-by: Marius Andra <marius.andra@gmail.com>
2021-01-28 17:03:36 +01:00
Paolo D'Amico
d1c2506c40
Onboarding setup page (continues #2822) (#3104)
Co-authored-by: Karl-Aksel Puulmann <oxymaccy@gmail.com>
2021-01-28 16:32:42 +01:00
Karl-Aksel Puulmann
15d04d9e56
Improve demo data (#3111)
* Unify clickhouse and pg demo data creation

* Adapt yakkos demo data generation to normal demo

* Split demo.py into subfolder

* Add original, web data import

Note that elements are not added because they can't be added
automagically :(.

* Improve wording

* dont generate dashboards

* try get tests passing

* fix types

* Get cypress tests green
2021-01-28 13:50:01 +02:00
Tim Glaser
108a50264f
Remove emails from csv (#3115)
* Add team filter to cohort query to speed up

* Fix querying

* Remove emails from CSV upload

* fix clickhouse email
2021-01-28 11:43:46 +01:00
Tim Glaser
c9f053a6dc
Add team filter to cohort query to speed up (#3112)
* Add team filter to cohort query to speed up

* Fix querying
2021-01-28 10:27:40 +01:00
Karl-Aksel Puulmann
dba58f4467
Hotfix for missing session recording events (#3069)
* Hotfix for missing session recording events

Temporarily solves https://github.com/PostHog/posthog/issues/2927,
though the error will rear it's head again with plugin-based ingestion.

Opened https://github.com/PostHog/posthog/issues/3068 for long-term
solution.

* kwargs everywhere

* use settings over kwargs
2021-01-27 13:12:55 -08:00
Eric Duong
b912f1ef6a
Add action filter button on remove-shownas flag (#3105)
* add back button

* fix types

* only show on trensd
2021-01-27 16:08:08 -05:00
Marius Andra
9cfd1969aa
Plugin order (#3100)
* fix form type

* split to enabled/disabled plugins and add empty and loading screens

* show ingestion order

* add "rearrange" button

* show alert when rearranging

* drag to sort plugins

* fixes

* move opt-out to "danger zone" in "advanced" tab

* refactor "custom" to "advanced" in the code

* rename to DangerZone

* start rearranging from dragging card

* show changed order

* remove extra button

* save order in the backend

* fix default config for newly installed plugins

* newly enabled plugins go to the end of the list

* mypy

* hide second "check again" button

* show code diff

* lowercase

* clarify string

* reload only if saved, add 403 status if no access, simplify dict

* set temporary order only on enabled plugins, avoiding rearranging "plugins to update" list

* simplify condition

* change empty component

* raise instead of 403
2021-01-27 17:43:27 +01:00
Michael Matloka
12c1fbf679
Fix unbound plugin update response (#3106) 2021-01-27 16:29:11 +01:00
Karl-Aksel Puulmann
5acdfc0922
Reduce axes logspam (#3086)
During tests it's making everything quite unreadable:

```
AXES: Cleaned up 0 expired access attempts from database that were older than 2021-01-26 07:30:23.776885+00:00
AXES: Successful login by {username: "user1@posthog.com", ip_address: "None", user_agent: "<unknown>", path_info: "<unknown>"}.
AXES: Cleaned up 0 expired access attempts from database that were older than 2021-01-26 07:30:23.786481+00:00
AXES: Successful logout by {username: "user1@posthog.com", ip_address: "None", user_agent: "<unknown>", path_info: "<unknown>"}.
```
2021-01-27 16:10:03 +01:00
Yakko Majuri
7dc40f2c37
Fix paths background color in dashboard (#3089)
* Fix paths background color in dashboard

* update colors
2021-01-27 15:56:19 +01:00
Eric Duong
62a95fad62
Revert "Revert "Add timeout and error messages"" (#3013)
* Revert "Revert "Add timeout and error messages (#2876)" (#3012)"

This reverts commit 6e7ff0d4db.

* add loadresults to setfilters

* fix ts errors

* fix type§

Co-authored-by: Tim Glaser <tim@glsr.nl>
2021-01-27 13:47:11 +01:00
Karl-Aksel Puulmann
249ae881c4
Onboarding: Create demo data, show demo alert at top, route directly to dashboard (#3103)
* Migration for is_demo

* Populate is_demo when triggered

* Refactor: extract create_demo_team

* Also create ee sample data

* Create demo data if feature flag enabled (and in debug), redirect to root

* Show demo warning

* Solve rease issue

* Redirect to personalization

* Redirect to root

* Update antd to latest, which gives access to Alert action prop

* Update demowarning code

* update tests

* Update naming

* Update link
2021-01-27 12:53:10 +02:00
Eric Duong
148559e3b1
only show tooltips when you can actually click (#3093) 2021-01-27 10:58:33 +02:00
Karl-Aksel Puulmann
b46b9f0cc1
Fix API incompatibility with old feature flags code (#3102)
posthog-python relies on is_simple_flag for its task. This PR restores
compatibility with it, solving https://sentry.io/organizations/posthog/issues/2178357897/?project=1899813
2021-01-27 10:40:04 +02:00
Karl-Aksel Puulmann
39bc50d461
Fix multi-group feature flags (#3101)
* Solve a regression case

This probably solves
https://sentry.io/organizations/posthog/issues/2180671668/?project=1899813&referrer=slack
but I get a slightly different error locally

* Quietly ignore (and report) errors in get_active_feature_flags

This method is used in mission-critical endpoints (/e, /decide), which
should avoid 500-ing due to application errors.

With capture_exception we still get a sentry error which should help us
debug
2021-01-27 09:37:30 +01:00
Paolo D'Amico
689410d33e
Milestone P1 - #2822 implementation (#3088)
* refactor Signup location

* personalization route stub

* radio buttons base UI

* select radio options

* continue button

* save personalization state

* report personalization answers to PH

* all data & nicer UI

* mark personalization completed on DB

* cannot complete personalization twice

* rename components

* more fixes

* undo completed_personalization as per discussion, @macobo's PR coming

* fix ts
2021-01-27 10:14:39 +02:00
Eric Duong
fcef914182
3072 retention person modal fix (#3080)
* fix time formatting

* fix queries and serializers

* fix ret tests

* fix tests

* fix tests

* remove unnecessary change
2021-01-27 10:01:12 +02:00
James Greenhill
583d4cdd26
Add whitelists for domains on Google OAuth (#3098) 2021-01-26 17:44:44 -08:00
Michael Matloka
a1d364c9f9
Revert "Revert "Move adding feature flags to event to capture endpoint (#3090)" (#3095)" (#3096)
This reverts commit 6c57aa0cea.
2021-01-27 00:14:09 +01:00
Michael Matloka
6c57aa0cea
Revert "Move adding feature flags to event to capture endpoint (#3090)" (#3095)
This reverts commit 00b5edf572.
2021-01-26 21:57:50 +01:00
Michael Matloka
00b5edf572
Move adding feature flags to event to capture endpoint (#3090)
* Move adding feature flags to event to capture endpoint

* Remove unused imports

* Don't create empty event properties dict

* Don't ever create event properties if dict not present

* Test feature flags in test_capture

* Ensure that every event has a properties dict

* Only apply PLUGIN_SERVER_INGESTION_HANDOFF to plugin-whitelisted orgs

* Adjust tests for ensured event properies dict
2021-01-26 18:23:28 +01:00
Eric Duong
2fef10315b
Add missing logic for action days in cohort calculating (#3056)
* add missing logic

* add test

* fix type
2021-01-26 13:26:32 +01:00
Eric Duong
18bb25f264
add refresh param to retention and paths (#3039) 2021-01-26 13:25:43 +01:00
Karl-Aksel Puulmann
1dbbb46f82
Allow configuring session recording retention period (#3074)
* Add session recording retention period column

* Allow setting session recording retention period

Solves #3059

* Run session recording retention task on all self-hosted

Using setting from team.session_recording_retention_period_days
2021-01-26 12:04:39 +02:00
Karl-Aksel Puulmann
e7c6392c2b
Make feature flag query faster (#3084)
It was not filtering by team_id on a subquery. Hotfix which changes the
query to

```
SELECT (EXISTS(SELECT U0."id" FROM "posthog_cohortpeople" U0 WHERE (U0."cohort_id" = 1 AND U0."person_id" = "posthog_person"."id")) AND "posthog_person"."team_id" = 1) AS "group_0"
  FROM "posthog_person"
 INNER JOIN "posthog_persondistinctid"
    ON ("posthog_person"."id" = "posthog_persondistinctid"."person_id")
 WHERE ("posthog_persondistinctid"."distinct_id" = 'foobra' AND "posthog_persondistinctid"."team_id" = 1 AND "posthog_person"."team_id" = 1)
```
2021-01-26 09:12:37 +02:00
Marius Andra
be0cf32521
Plugins required in preflight check (#3083)
* make plugins required in the setup

* make plugins still optional in dev, but add a strict warning

* Unify text formatting

Co-authored-by: Michael Matloka <dev@twixes.com>
2021-01-26 00:35:27 +01:00
Marius Andra
64f282b3db
Private token support for GitHub and npm URLs (#3070)
* private token support for github and npm

* refactor url splitting

* mypy

* fix needless regexp escapes

* simplify parse_url output, tag is always tag now

* simplify parsing api response to get latest tag

* add links to api key docs for various providers

* update title

* global _TOKEN settings for github, gitlab and npm (mainly to bump api limits)

* move gitlab api key to headers
2021-01-26 00:35:03 +01:00
Karl-Aksel Puulmann
8023581845
Fix retention "load more" people (#3075)
* Fix retention `loadMore`, #3071

* Retention table to tsx
2021-01-26 01:23:41 +02:00
Karl-Aksel Puulmann
da92f0bbac
Allow rolling feature flags out to multiple groups (#3030)
* Support multiple groups in feature flags model

This will be part of #3007

I did not do a migration since it would cause errors for decide endpoint
once migrations have run but new schema not up.

* Update analytics_metadata method

* Allow defining multiple groups in frontend

* Allow sorting

* Update tests, allow submit without filters.

* Update cypress

* Avoid N+1 queries

* Indicate filters better in table
2021-01-26 01:18:05 +02:00
Marius Andra
bfe6f859ec
Plugin upgrades (#3057)
* upgrade typegen

* check for upgrades in the interface

* refactor plugin scene files

* separate plugins needing updates

* show an update button

* show progress when checking

* actually update plugins + ux improvements

* open drawer if new required and unfilled field

* better loading for plugins

* fix frontend type error

* fix backend test

* Do tiny cleanup of version labels

* clarify role of custom.d.ts

* cache plugin update status for 30min, refresh update status on page load if stale

* fix tests

* Fix capitalization in updates check button

* fix bad merge

Co-authored-by: Michael Matloka <dev@twixes.com>
2021-01-26 00:13:47 +01:00
Yakko Majuri
35c987f3df
Add autofill for posthog props in plugin config (#2838)
* Add autofill for posthog props in plugin config

* fix types

* restructure logic

* code quality

* fix code quality

* refactor api key generation

* more cleanup

Co-authored-by: Marius Andra <marius.andra@gmail.com>
2021-01-25 23:36:14 +01:00
Paolo D'Amico
bc3a59ab10
Various fixes 210122 (#3058) 2021-01-25 11:38:21 +01:00
Paolo D'Amico
09283afcbe
Refactor web ingestion onboarding & add bookmarklet (#2953) 2021-01-25 10:49:59 +01:00
Eric Duong
eb279d142f
Show progress in retention table (#2995)
Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
2021-01-25 10:24:00 +01:00