Initial parsing and execution of Report Page YAML
Related Issue: #217545 (closed)
The goal here is to be able to parse the default Report Page YAML definition using insights as the query backend and return real data from the series endpoint (defined in #220494 (closed))
The example YAML file is defined in #221077 (closed)
Steps:
- In the
API::Reports::Series
API, replace the dummy implementation with a real one where theAnalytics::Reports::ConfigLoader
class is used to load the default YAML config. - Implement a new class
Analytics::Reports::SeriesDataLoader
that "understands" the received a series config, runs the query and returns the data. - Implement a serializer that formats the data according to the series specification. (#220494 (closed))
- For now, focus on the example YAML that is using the insights backend.
Pseudo code (rudimentary example):
series_config = Analytics::Reports::ConfigLoader.find_series_by_id(params[:report_id], params[:series_id])
raw_data = Analytics::Reports::SeriesDataLoader.new(series_config, project).execute
serialized_data = Analytics::Reports::SeriesSerializer.new(raw_data).to_json
Acceptance criteria:
Getting real data from the series backend with the default Report Page YAML definition file.
Notes:
A small research snippet to see how we can invoke the insights feature: insight_test.rb
Related file: ee/app/controllers/concerns/insights_actions.rb
Edited by Adam Hegyi