Skip to content

feat!: add sections parameter to template insights #10010

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Oct 3, 2023
Merged

Conversation

mtojek
Copy link
Member

@mtojek mtojek commented Oct 3, 2023

Related #9495

This PR adds sections parameter to template insights. The idea is to shrink the endpoint response, and reduce the number of DB calls.

Changes:

  • API breaking change: report and interval_reports can be omitted in /insights/templates
  • expose sections HTTP parameter for /insights/templates (values: report, interval_reports)
  • golden files for testing purposes
  • FE adjustments to allow for undefined report

@mtojek mtojek self-assigned this Oct 3, 2023
@mtojek mtojek changed the title feat: add sections parameter to template insights feat!: add sections parameter to template insights Oct 3, 2023
@mtojek mtojek marked this pull request as ready for review October 3, 2023 12:59
Copy link
Member

@mafredri mafredri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Just a few small comments.

@@ -105,11 +106,11 @@ export const TemplateInsightsPageView = ({
<UserLatencyPanel data={userLatency} />
<TemplateUsagePanel
sx={{ gridColumn: "span 3" }}
data={templateInsights?.report.apps_usage}
data={templateInsights?.report?.apps_usage}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did we not need any change for interval_reports which is now possibly also undefined?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will leave it for @BrunoQuaresma to polish the FE side.

@mtojek mtojek merged commit f62f45a into main Oct 3, 2023
@mtojek mtojek deleted the 9495-sections branch October 3, 2023 13:44
@github-actions github-actions bot locked and limited conversation to collaborators Oct 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants