Commit Graph

3 Commits

Author SHA1 Message Date
RobertJoonas 9aa6a8aa23
Add comparisons to DashboardQueryParser (#5955)
* list field defaults to [] in ParsedQueryParams

* refactor include.comparisons + QueryInclude struct

* fix custom datetime comparisons

* build and execute queries directly in QueryComparisonsTest

* fix compile warnings

* move test from plausible_web to plausible

* create Stats.QueryImportedTest and extract 3 tests into it

* create Stats.QuerySpecialMetricsTest and extract 7 tests into it

* create Stats.QueryTest and extract 4 tests into it

* extract 2 more tests into QuerySpecialMetricsTest

* fix DashboardQuerySerializer and Parser tests

* comparisons to DashboardQueryParser

* serialize comparisons too

* remove internal test endpoint

* credo

* query-api types autogenerate

* add_or_replace_filter

* remove redundant Map.to_list

* fix type
2025-12-17 15:53:13 +00:00
RobertJoonas d6673fbbd5
DashboardQueryParser & DashboardQuerySerializer (#5938)
* rename query_parser_test to api_query_parser_test

* allow metrics to be nil in ParsedQueryParams

* swap now with relative_date in ParsedQueryParams

* add DashboardQueryParser

* stop defining defaults in ParsedQueryParams

* add DashboardQuerySerializer

* make sure parse -> serialize is a reversible transformation

* fix codespell

* fix test and silence credo

* fix another test

* parse and serialize with_imported

* cleaner decode_filters

* precompile do_not_url_encode_map and simplify uri_encode_permissive

* remove prepending ? logic
2025-12-09 13:07:36 +00:00
RobertJoonas 12d818af8a
Refactoring preparation for DashboardQueryParser (#5929)
* rename QueryParser to ApiQueryParser

* move utc_time_range construction to querybuilder

* input_date_range format

* rename 30m atom to realtime_30m

* move build_comparison_date_range into do_build
2025-12-03 15:09:17 +00:00