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

10505 Commits

Author SHA1 Message Date
Raquel Smith
bac246a98e
chore: hook pricing table to billing service plans (#13857)
* Get rid of control version

* Don't show option to license on billing page

* Remove ff constant

* Include plans in billing response

* Update types for the plans

* Hook up the top of the table

* Fill out the rest of the table

* Hook up the rest of the table

* Add tooltip with feature descriptions

* Fix type errors

* Fix more type issues

* Remove old plan data

* clean up

* exclude features we don't want to show in table

* Tolerate missing plan keys

* fix mypy

* Update cypresss test

* Fix mypy again

* Just get whatever default plans

* fix tests

* Update snapshots

* Update snapshots

* moar test fixes

* use is_free to know if free plan

* Say the free allotment is incl'd if base has $ price

* Update snapshots

* Don't change anything having to do with licenses

* Fix type error

* Update snapshots

* Update snapshots

* Use product name from stripe

* only lowercase

* don't hardcode plan names

Co-authored-by: Emanuele Capparelli <k@emkpp.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-01-26 16:04:30 +00:00
Xavier Vello
77d0125138
feat: set export batch size based on plugin settings (#13559) 2023-01-26 16:31:02 +01:00
Ben White
ce2b675270
feat: Add screen name info to recordings (#13931) 2023-01-26 16:08:20 +01:00
Michael Matloka
57f06ae479
ci(frontend): Delete storybook-chromatic-baselines-to-master.yml (#13936) 2023-01-26 15:03:58 +00:00
timgl
d4f9790234
chore(plugin-server): Upgrade jsonwebtoken to 9.0.0 (#13900) 2023-01-26 15:27:02 +01:00
Tiina Turban
3cdad732fd
feat: PoE placeholder for ingestion and testing enabling (#13881) 2023-01-26 15:18:25 +01:00
timgl
b4da75d0e2
fix(admin): Remove unused fields from the Team admin page (#13894) 2023-01-26 10:27:25 +00:00
Paul D'Ambra
b147b487d4
revert: info window position changes (#13929) 2023-01-26 07:29:44 +00:00
Paul D'Ambra
26d46800a7
revert: info window position changes (#13929) 2023-01-26 00:10:52 +00:00
Paul D'Ambra
f6fc31c1d5
fix: info window needs two positions (#13928) 2023-01-25 23:17:02 +00:00
Paul D'Ambra
1937aa7a98
fix: calculate info window position (#13926)
* fix: calculate info window position

* need to choose the maximum of the options available :/
2023-01-25 22:16:26 +00:00
Paul D'Ambra
ecc97d6bdc
fix: calculate info window position (#13924) 2023-01-25 21:47:26 +01:00
Marius Andra
f137851820
chore(data-exploration): new schema (#13923) 2023-01-25 20:02:28 +00:00
Yakko Majuri
e87b962050
feat(clickhouse-queries-modal): make CH queries modal nicer to use (#13920) 2023-01-25 15:28:19 +00:00
Karl-Aksel Puulmann
c5cc39ff1e
feat: Property definitions page support for person & group properties (#13916)
* Rename DataManagementTab.EventPropertyDefinitions -> DataManagementTab.PropertyDefinitions

* Rename URLs

* Rename scene

* fix urlToAction

* rename a folder

* Rename components

* Rename a loader

* Dropdown to select property definition type

* URL cleanup & other misc cleanup

* Tweak naming

* Allow editing inline for person and group properties (if feature-flag allows)

* prettier
2023-01-25 16:36:24 +02:00
Yakko Majuri
fe3c64bd9c
fix(funnels): show only relevant weeks in funnel trends (#13908)
* fix(funnels): show only relevant weeks in funnel trends

* Update snapshots

* use interval func on from as well

* Update snapshots

* interval_func -> trunc_func

* Update snapshots

* Update snapshots

* Update snapshots

* fix

* Update snapshots

* add snapshots for week interval

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-01-25 14:26:28 +00:00
Paul D'Ambra
1faf007879
chore: update a snapshot (#13917) 2023-01-25 14:08:00 +00:00
Paul D'Ambra
5aa4995398
fix: dashboard modal could not cope with deleted tiles (#13794)
Problem
@annikaschmid accidentally deleted an insight from a dashboard and then couldn't put it back.

The insight API response was returning the deleted dashboard in the insight's dashboards field. That meant the UI didn't offer the ability to add it to that dashboard because it thought it was already added

Even though there was a test that protected against this which passes and I couldn't figure out why the application behaves well in the test and not when running 🤷

Changes
The dashboard_tiles relation is correct. And we should eventually remove the use of the dashboards relation.

So, let's expose it. This begins the deprecation of the dashboards field on the Insight API.

And overwrites the content of the dashboards field with the correct values when returning a representation of the model.

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Michael Matloka <dev@twixes.com>
2023-01-25 13:09:58 +00:00
Thomas Obermüller
fcefd670ea
fix(user-paths): fix user paths cleaning filters (fixes #7326, #7327) (#13884) 2023-01-25 12:22:15 +01:00
Yakko Majuri
43b39b8725
refactor(queries): remove to_start_of_week_fix (#13907)
* refactor(queries): remove to_start_of_week_fix

* fix retention

* fix

* Update snapshots

* Update snapshots

* Update snapshots

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-01-25 08:18:47 -03:00
Neil Kakkar
184c9adbd4
fix(statsd): Import only when required (#13911) 2023-01-25 10:46:35 +00:00
Marius Andra
7189a4f6a9
feat(hogql): add "learn more" link (#13915) 2023-01-25 09:39:52 +00:00
Paul D'Ambra
b8675b1e58
chore: remove caching from loading github templates (#13909)
* time it instead

* Update snapshots

* Update snapshots

* Update snapshots

* Update snapshots

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-01-24 18:54:59 +00:00
Paul D'Ambra
41ba4f036c
chore: file down the sharp edges on dashboard templates (#13904)
* more useful validation error message

* cache for only a very short amount of time

* should be exporting dashboards with a different field name for description

* Update snapshots

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-01-24 17:35:03 +00:00
Tiina Turban
b79d994476
fix: refactor person merging retry logic to be simpler (#13860) 2023-01-24 18:16:37 +01:00
Yakko Majuri
4220657e8d
feat(query-tags): add tag for number of entitities (#13903)
* feat(query-tags): add tag for number of entitities

* Update snapshots

* Update snapshots

* Update snapshots

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-01-24 13:58:12 -03:00
Neil Kakkar
48a177e908
refactor(flags): Split out functionality from models (#13896) 2023-01-24 16:34:47 +00:00
Emanuele Capparelli
a23be7c0a7
fix: allow billing for dev purposes (#13902) 2023-01-24 17:16:08 +01:00
Harry Waye
c970a2e071
ci(snapshots): also update snapshots from clickhouse schema changes (#13898)
* ci(snapshots): also update snapshots from clickhouse schema changes

`posthog/clickhouse/test/__snapshots__` wasn't included previously, this
fixes that.

* Update snapshots

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-01-24 15:04:24 +00:00
Neil Kakkar
78c753cbd2
fix(metrics): Call prometheus view before returning (#13897) 2023-01-24 14:10:08 +00:00
Paul D'Ambra
f5c797c208
fix: only show installed templates as available (#13890) 2023-01-24 12:30:37 +00:00
Neil Kakkar
92f3fcb1b7
feat(capture): Short circuit middleware for capture (#13856) 2023-01-24 12:25:12 +00:00
Michael Matloka
efed1e24e1
test(frontend): Fix various Storybook issues (#13889) 2023-01-24 13:16:15 +01:00
Yakko Majuri
95691efe76
fix(trends): ensure formula + breakdown works correctly for all series (#13859)
* fix(trends): ensure formula + breakdown works correctly for all series

* handle cohort ids

* Update snapshots

* address review

* fix

* actual fix

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-01-24 07:52:03 -03:00
Harry Waye
beb886c3d1
chore(clickhouse): add IF NOT EXISTS to all create commands (#13878)
* chore(clickhouse): add IF NOT EXISTS to all create commands

As part of https://github.com/PostHog/posthog/pull/13753 I was adding a
test to verify that the Kafka -> MergeTree pipeline works. I added Kafka
and MV tables to test setup for this, which highlighed that a few of
these SQL create table commands were failing on the second run.

It looks like for the e.g. MergeTree tables we add an `IF NOT EXISTS`
which avoids these errors, so I'm also adding to the other tables.

* update create_clickhouse_tables_quickly references

* Revert table creation changes
2023-01-24 10:34:46 +00:00
Harry Waye
c693c8484f
chore(person-merges): add person merges ClickHouse table (#13753)
* chore(person-merges): add person merges ClickHouse table

To enable speeding up queries we want to include a person merges table
which we can use to join on to be able to "correct" event person_ids
that may be needed due to person merges happening.

The specific difference from this implementation and the distinct_id
lookup is the cardinality of the table should be :fingerscrossed: much
lower, with the majority of events already having the correct person_id
associated with them.

The distinct_id joining is particularly problematic in that the join key
on the right hand side of a join needs to be loaded into memory as a
Hash map, for the purposes of ClickHouse performing a HashJoin.

 1. distinct_ids are arbitrary length strings
 2. every event needed to be joined via a distinct_id. With the
    person_id join we can use an left outer join making the right hand
    side much smaller if we simply omit person ids we think are the
    "canonical" id.

* add some todos

* empty __init__

* wip

* Add Kafka and Materialized views

* add some comments

* exclude created_at field

* duplicate materialized view schema from kafka table

* fix default now

* whitespace

* remove EMPTY AS

* Use EMPTY AS

* Update schema snapshots

* update name extract

* fix table name escaping

* update snapshots

* fix escaping

* create kafka tables late

* Add posthog clickhouse migrations to github actions change list

* Add tombstone flag

* add missing comma

* update snapshots

* partition by oldest_event

* make kafka table names consistent with others

* Update posthog/models/person_overrides/sql.py

Co-authored-by: Xavier Vello <xavier@posthog.com>

* Align naming with existing variables and add a test

* add missing override changes

* Update test

* Update snapshots

* delete kafka and mv tables at end of tests

* fix date formatting issue

* assert results is list

* Update snapshots

* Update snapshots

* Add comment re. using EMPTY AS SELECT

* Add comment about where version will come from

* Update posthog/clickhouse/test/test_person_overrides.py

Co-authored-by: James Greenhill <fuziontech@gmail.com>

* Update snapshots

Co-authored-by: Xavier Vello <xavier@posthog.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: James Greenhill <fuziontech@gmail.com>
2023-01-24 09:20:14 +00:00
Karl-Aksel Puulmann
29a9d28e53
feat: Person and Group property definitions API, frontend and docs (#13875)
* Add docs and support for group/person type filtering in property definitions API

* Feature flagged endpoint logic for person and group properties

* Update snapshots

* Update snapshots

* Update snapshots

* Update snapshots

* Update snapshots

* Update snapshots

* Update snapshots

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-01-24 09:41:50 +02:00
Karl-Aksel Puulmann
648a393e36
fix(property-definitions): Make initialization logic work for plugin-server (#13874)
Avoids a lot of unneccessary work
2023-01-24 09:41:40 +02:00
Paul Hultgren
f5451f9cf4
fix: allow 'config_schema' on plugin to be blank (#13880)
* allow 'config_schema' field on plugin to be blank

* create migration

* Update snapshots

* Update snapshots

* Update snapshots

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-01-23 21:00:43 -08:00
Paul Hultgren
25164f496b
fix: more gracefully handle when related feature flag value is undefined (#13886)
* more gracefully handle when feature flag value is undefined

* reset types
2023-01-23 16:02:56 -08:00
Thomas Obermüller
f2bb78a27b
fix(storybook): don't use esbuild for storybook (#13883) 2023-01-23 23:46:29 +01:00
Thomas Obermüller
5a270da491
fix(vrt): temporarily deactivate insight tests (#13882) 2023-01-23 22:06:41 +01:00
Paul D'Ambra
c73ea98ad1
chore: remove majority of year in PostHog (#13877)
Problem
Year in PostHog is done with (for now) but it's still in the code

Changes
remove the cheeky button
remove the feature flag
no adding a year in posthog url to the app context any more
keep the images around so that existing links e.g. in Twitter keep working
replace the page with a placeholder so if folk re-visit the link they get something without hitting the DB
duplicates the sleeping hog image because (at least one of) either to keep life simple or because I don't know how to reference the existing one in the template
track whether that is happening

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-01-23 19:03:37 +00:00
Marius Andra
cdf9bb870f
feat(data-exploration): "saved" queries (#13873)
* feat(data-exploration): rename to "Event Explorer"

* feat(data-exploration): saved queries in data table

* fix test

* put columns back

* cleanup

* räägime inglise keeles

* show no columns if loading data of different type

* default to off for showing saved queries
2023-01-23 17:23:19 +00:00
Paul D'Ambra
e1dc283601
feat: not auto href matching when selecting for the toolbar (#13865)
Problem
see #10838
stacked on top of #13864

When matching on elements the toolbar always includes any href selector if present. This means that elements whose link changes cannot be matched.

E.g. the third item in a list will be different for different views of the page or the profile button on a web page will have a unique id in the href

Changes
by default not include href in selectors
let user turn on href matching if they want to
fixes tooltips for the HeatmapStats window
fly-by de-antsing of the `HeatmapStats window
2023-01-23 16:06:13 +00:00
Paul D'Ambra
7b3fee62db
feat: do less element traversal in the heatmap (#13864)
Problem
Every time the heatmap elements selector runs we traverse the DOM and cache all of the elements in memory

We do this even if the DOM hasn't changed

We then query within the DOM for a selector match even if we've just recently found exactly that match.

Changes
Only traverses and stores the DOM when the URL changes
Converts some error messages to log messages so they're less worrying for people reporting issues
Caches element lookups when processing API response
2023-01-23 15:29:26 +00:00
Tiina Turban
1e82b20633
fix: Refactor person merging do less within a transaction (#13849) 2023-01-23 15:40:50 +01:00
Thomas Obermüller
c04a847db8
feat(data-exploration): implement user paths insight (#13754) 2023-01-23 15:29:57 +01:00
Yakko Majuri
d18db43e7a
fix(funnel-actors): make searching for groups possible (#13858)
* fix(funnels): make searching for groups possible

* remove useless comment

* Update snapshots

* fix styling

* Update snapshots

* satisfy mypy

* Update snapshots

* types

* Update snapshots

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-01-23 09:06:20 -03:00
Marius Andra
4723d0e832
feat(data-exploration): rename to "Event Explorer" (#13871) 2023-01-23 12:55:23 +01:00