0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-24 18:07:17 +01:00
Commit Graph

1271 Commits

Author SHA1 Message Date
Marius Andra
52cdd7e572
New toolbar cookie + Secure session/csrf cookies (#1387)
* - set a custom cookie to tell the toolbar we're logged in
- make other cookies secure

* skip adding new toolbar cookie on API requests

* fix demo page local https

* enable/disable secure cookies as needed

* show django toolbar only for API requests

* update posthog-js and kea versions

* satisfy mypy

* add SECURE_COOKIES=0 to cypress tests, since they run over HTTP

* revert kea version

* add test for toolbar cookie middleware

* try something for cypress

* add debug

* add cypress-terminal-report for better logging

* fix demo api_url

* revert previous change that triggered cypress
2020-08-11 10:52:43 +02:00
Eric Duong
9cc2a46bfe
Poll funnels (#1366)
* working poll funnels

* remove packages

* update test to use polling

* fix types
2020-08-10 16:27:55 +02:00
James Greenhill
eec2445dbc
Bugfix: Github actions can't use off the shelf docker images. Install packer manually (#1304) 2020-08-10 14:23:26 +02:00
Marius Andra
aaf004a5eb
Extract people merging to Person, add cohort support. (#1362) 2020-08-10 12:42:31 +02:00
Michael Matloka
7b9abe4d61
Enhance version notice (#1386)
* Enhance version notice

* Update notice and use TypeScript

* Use "newest" everywhere
2020-08-10 12:40:50 +02:00
Michael Matloka
85fe3b9a62
Add DEBUG overlay bar (#1378)
* Add DEBUG overlay bar

* Add z-index

* Implement a tricolor bottom bar

* Add close button and replaced version with git branch

* Improve responsiveness

* Remove extra span opening tag
2020-08-10 12:39:22 +02:00
Marius Andra
7a1a7d9a28
remove samesite middleware (#1384) 2020-08-07 02:58:36 +02:00
Marius Andra
c4eef98f0e
update posthog-js (#1385) 2020-08-07 02:53:49 +02:00
Eric Duong
249ec347c3
Revert "Insight history (#1303)" (#1363)
This reverts commit 4166e96364.
2020-08-05 17:00:56 +02:00
Eric Duong
4166e96364
Insight history (#1303)
* add insight history

* add table

* edit format

* links working

* add modal

* add tab switch

* saving insights

* remove insights model

* no model for insight history

* initial working

* remove wrong typegen

* made the history per user

* missing param

* added funnel support

* add details

* add delete saved insight functionality

* add line break logic and funnel name

* fix reload logic

* fix rendering error

* add pagination component

* fix bugs

* add backend tests

* add insight-history-panel check

* add drawer and replace table

* add loading next

* add date

* add callback

* update test

* use table

* fix spacing

* fix rows

* adjust spacing

* fix spacing and styling

* fix spacing and styling
2020-08-05 10:13:57 -04:00
Tim Glaser
eef743ddf5
Refactors sessions (#1307)
* WIP refactor sessions queries

Todo
- Fix test_sessions_list test
- Move tests to posthog.queries

* Make determine_compared_filter public

* Fix issues with tests

* Move tests to queries

* Fix test by ordering

* Try printing... not sure why it's giong wrong

* Fix test hopefully

* Try again

* Fix tests definitely this time

* Fix filtering by properties

* Fix compare and empty result set issues
2020-08-05 11:31:37 +02:00
Marius Andra
6878f3aced
Merge people with the same e-mails (#1351)
* Merge people with the same e-mails

* order by "pk" to always keep the oldest user
2020-08-05 11:31:16 +02:00
Marius Andra
90b7f11af2
Use the correct distinct ID for toolbar instrumentation (#1348) 2020-08-04 15:39:34 +02:00
Michael Matloka
7428ac2cee
Update Team.js (#1346) 2020-08-04 15:38:30 +02:00
Eric Duong
18d4718b99
add unique filter (#1330) 2020-08-04 15:11:35 +02:00
Eric Duong
f5a790642f
Add annotation popup on hover (#1331)
* add annotation popup on hover

* Improve close button UX

Co-authored-by: Twixes <dev@twixes.com>
2020-08-04 15:09:36 +02:00
Eric Duong
1fdcb6d428
Fix compare being parsed as string (#1337)
* fix compare being parsed as string

* fix tests

* fix variable naming

* update type
2020-08-04 15:05:28 +02:00
Marius Andra
3d8b9d51f8
Toolbar Temporary Token Logout (#1309)
* update to kea-typegen that runs through prettier

* remove posthog-js yalc package regression

* add types to toolbar react components

* logout when closing the toolbar

* reset users's temporary token when logging out

* test for resetting the temporary token

* random commit to rerun cypress
2020-08-04 14:57:41 +02:00
Marius Andra
863e75bf9f
Toolbar Default On + Load Test (#1326)
* set user.toolbar_mode default to "toolbar", turning it on for new users

* test that the toolbar loads when you open /demo
2020-08-04 14:46:08 +02:00
Eric Duong
e814540de2
fix date range filter and prune funnel code (#1335) 2020-08-04 10:11:00 +02:00
James Greenhill
a8d545aaa3
StatsD attempt v2. Now with more optionality! (#1336)
* Add django-statsd for emitting performance metrics to statsd

* prefix metrics with debug unless overwritten

* Only include statsd middleware if the STATSD_HOST env var is set

* Clean up and have logic in one if block
2020-08-04 10:04:43 +02:00
Marius Andra
a7fafb4259
Attempt to fix chunk loading errors (#1333)
* try to fix chunk loading errors

* Remove old hedgehog from network error page
2020-08-03 20:14:50 +02:00
Marius Andra
7439577aa9
Toolbar Action link to PostHog after save (#1313)
* set up react-toastify with toolbar

* show links to actions/insights when adding action
2020-08-03 20:03:22 +02:00
Michael Matloka
00296cbe5e
Clean up DEBUG warning in settings.py (#1332)
* Clean up DEBUG warning in settings.py

* Update DEBUG warning
2020-08-03 19:02:17 +02:00
Max Ungless
311919db0c
Demo data erroring on dashboard fixed (#1334) 2020-08-03 12:44:34 -04:00
Tim Glaser
2d650c7934
1327 fix cumulative (#1328)
* Closes #1327 fix cumulative

* Fix events

* Add more checks for falsey values
2020-08-03 14:49:50 +02:00
Tim Glaser
f5933cb087
Revert "Add django-statsd for emitting performance metrics to statsd (#1317)" (#1325)
This reverts commit 76dc8dcf3e.
2020-08-03 12:18:09 +02:00
James Greenhill
76dc8dcf3e
Add django-statsd for emitting performance metrics to statsd (#1317)
* Add django-statsd for emitting performance metrics to statsd

* prefix metrics with debug unless overwritten
2020-07-31 16:17:01 -07:00
Tim Glaser
5eedee84ac
Fix breakdown filters sentry error (#1321) 2020-07-31 17:26:14 +02:00
Tim Glaser
61e6967a05
Add check for malformed JSON (#1319) 2020-07-31 13:01:43 +02:00
Eric Duong
bc7f12cb95
save properties on switch (#1302) 2020-07-30 19:48:52 +02:00
dependabot[bot]
9ae77c8b01
Bump elliptic from 6.5.2 to 6.5.3 (#1315)
Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.2 to 6.5.3.
- [Release notes](https://github.com/indutny/elliptic/releases)
- [Commits](https://github.com/indutny/elliptic/compare/v6.5.2...v6.5.3)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-30 19:24:57 +02:00
Tim Glaser
7d8bfbba21
By default create annotations globally (#1296)
* By default create annotations globally

* add condition explicitly to checkbox

* fix bug wherre global was being recreated

* fix toParams function

Co-authored-by: Eric <eeoneric@gmail.com>
2020-07-30 19:24:13 +02:00
Michael Matloka
531abebded
Check for missing migrations (#1312)
* Check for missing migrations

* Remove makemigrations from checklist

* Add DATABASE_URL to migrations check

* Add REDIS_URL to migrations check
2020-07-30 19:23:30 +02:00
Marius Andra
cf98e8ba35
Toolbar Typings (#1306)
* update to kea-typegen that runs through prettier

* remove posthog-js yalc package regression

* add types to toolbar

* add react-dom and react-redux types

* add types to toolbar react components

* convert a lot of components to typescript

* convert more components to typescript

* fix error

* actions return void

* clean up other Type.ts files as well

* fix last untyped files

* upgrade kea, fix webpack config entrypoint

* add stricter typechecking

* add types for a few more files

* fix bug with nth_child selectors (introduced in this PR, now fixed)

* fix one more type
2020-07-30 19:16:59 +02:00
Marius Andra
3fb85aabf6
Add missing migration for ActionStep URL matching regex (#1311) 2020-07-30 16:33:15 +02:00
Michael Matloka
4308e1afed
Add makemigrations to checklist and make it more specific (#1310) 2020-07-30 16:23:00 +02:00
Tim Glaser
8cbdf515a3
Don't show warning during tests (#1308) 2020-07-30 16:02:50 +02:00
Eric Duong
8d92f9897d
add override (#1298) 2020-07-30 11:17:34 +02:00
Tim Glaser
524a601d98
Bump version 1.12.0 (#1301) 2020-07-30 10:47:08 +02:00
Tim Glaser
bfb258cbe9
Refactor analytics queries (#1280)
* Refactor analytics queries

* Fix timedelta issue

* Fix tests

* Improve test

* Fix stickiness action

* Add default shape

* Refactor tests

* Add types to filter func

* Add comments to functions

* Fix tests

* remove unused import

* remove more unused imports

* Fix retention issues
2020-07-29 21:07:02 +02:00
Eric Duong
7dc4e2e45f
Consolidate features (#1265)
* bring retention table and paths to trends page, refactor tabs

* fix filters

* remove add dashboard item

* add funnel to insights

* add funnel to insights

* add url handling

* add people table to funnel insight

* chart filters

* funnels date filter working

* add comments

* prop and date filters working

* fix default states

* add types for dashboard visualizations

* save funnel

* dashboard items working

* reformat tabs

* fix links

* fix tests

* fix tests

* add missing labels

* change trends to insights

* fix funnel filtering

* add test

* add clear funnel ability
2020-07-29 17:51:49 +02:00
Marius Andra
f2b8d54ee5
Kea TypeGen 0.0.31 (#1297)
* update to kea-typegen that runs through prettier

* update logic type files

* remove posthog-js yalc package regression

* upgrade to 0.0.32 that fixes error with string literals in defaults

* prettier wants to reformat things
2020-07-29 11:21:00 +02:00
Eric Duong
1efc1d8a90
fix gutter condition and global loading (#1291) 2020-07-28 22:35:46 +02:00
Marius Andra
3f47ad2d0c
Kea TypeGen (#1286)
* update typescript eslint config / fix tsconfig.json path bug

* add kea-typegen and UserType

* kea-typegen first run, add types to userLogic
2020-07-28 22:25:24 +02:00
Marius Andra
9265ba21d1
LOCAL_HTTPS support (with HMR) through ngrok and JS_URL (#1290) 2020-07-28 22:23:44 +02:00
Marius Andra
efcfad4227
Lessen the REDIS warning (it's there since 1.1.0), add warning if running with DEBUG=1 (#1288) 2020-07-28 22:20:16 +02:00
Michael Matloka
4ebca38d53
Sort imports with isort (#1272)
* Add and configure isort

* isort all the things!

* Use local black and isort, and include json in prettier

* Remove erroneous import

* Delete isort.cfg and add isort options to lint-staged

* isort all the things! (with Black-compatibile options)
2020-07-28 22:19:33 +02:00
Eric Duong
ebc0e9af38
prevent refresh when no property is added (#1285) 2020-07-28 22:18:23 +02:00
Eric Duong
5bf1fbedef
Fix timestamp on session list (#1294)
* make types consistent

* fix dates

* clear load more when changing dates
2020-07-28 22:15:35 +02:00