Replace ubuntu-report with ubuntu-insights
This patch replaces the Ubuntu Report implementation for the telemetry page with Ubuntu Insights.
The ubuntu-report
page along with all assets, was renamed to ubuntu-insights
for future maintenance clarity.
Internal logic related to Ubuntu Report has all been replaced with logic provided by Ubuntu Insights while maintaining all user-facing functionality. Depending on user input, the consent state is set for the global source (""), the desktop provisioner ("ubuntu_desktop_provision"), and the platform source ("linux"). Following setting the consent, the appropriate consent report is written to disk, overwriting any other pending reports.
Additionally, this PR does some minor cleanup of the telemetry page's codebase.
Basic Test Plan:
- Navigate to the telemetry page.
- Ensure that "Show the First Report" displays a report with source metrics filled in. Take note of the
collectionTime
field. - Click next
- Ensure that three consent files (
consent.toml
,linux-consent.toml
,ubuntu_desktop_provision-consent.toml
) were written to~/.config/ubuntu-insights
and that they each have the contentsconsent_state = true
. - Ensure that a report was written to
~/.cache/ubuntu-insights/ubuntu_desktop_provision/local/
that matches the one shown in "Show the First Report" (check thecollectionTime
field). - Go back to the telemetry page.
- Select "No, don't share system data".
- Click next
- Ensure that the three consent files were overwritten with the content
consent_state = false
. - Ensure that the report on disk was overwritten was a report containing just
{"OptOut":true}