Skip to content
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

Add support for default visible dimensions and measures in dashboard config #3974

Merged
merged 6 commits into from
Feb 7, 2024

Conversation

AdityaHegde
Copy link
Collaborator

@AdityaHegde AdityaHegde commented Feb 6, 2024

Addressing Support default selected dimensions and measures

  • Adds parser support for default_measures and default_dimensions in dashboard config
  • Adds selecting of measures and dimensions before creating a dashboard store.

@AdityaHegde AdityaHegde force-pushed the adityahegde/default-measures-and-dimensions branch from af8e061 to f6ba43b Compare February 6, 2024 11:05
@AdityaHegde AdityaHegde changed the title Initial commit for default dimensions and measures Add support for default visible dimensions and measures in dashboard config Feb 6, 2024
@AdityaHegde AdityaHegde marked this pull request as ready for review February 7, 2024 05:38
Comment on lines 187 to 191
repeated DimensionV2 dimensions = 6;
repeated string default_selected_dimensions = 18;
// Measures in the metrics view
repeated MeasureV2 measures = 7;
repeated string default_selected_measures = 19;
Copy link
Contributor

Choose a reason for hiding this comment

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

What about just default_dimensions and default_measures? We also have default_time_range instead of default_selected_time_range, and same for comparison defaults.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Either is fine with me. I just kept the same field as product requested.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Changed after consulting product.

@@ -425,6 +445,7 @@ func (p *Parser) parseMetricsView(ctx context.Context, node *Node) error {
Unnest: dim.Unnest,
})
}
spec.DefaultSelectedDimensions = slices.Clone(tmp.DefaultSelectedDimensions)
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is slices.Clone needed here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We dont need it.

Copy link
Contributor

@begelundmuller begelundmuller left a comment

Choose a reason for hiding this comment

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

LGTM

@AdityaHegde AdityaHegde merged commit 2dbe24e into main Feb 7, 2024
7 checks passed
@AdityaHegde AdityaHegde deleted the adityahegde/default-measures-and-dimensions branch February 7, 2024 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants