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

Pyroscope: Preselect default profile type or app in the query editor dropdown #70624

Merged
merged 3 commits into from
Jun 28, 2023

Conversation

aocenas
Copy link
Member

@aocenas aocenas commented Jun 23, 2023

Makes the drop down always preselected either a CPU profile or a first thing in the list.

Screenshot 2023-06-23 at 19 07 26

@aocenas aocenas added add to changelog no-backport Skip backport of PR datasource/grafana-pyroscope Grafana pyroscope datasource (previously Phlare) labels Jun 23, 2023
@aocenas aocenas added this to the 10.1.x milestone Jun 23, 2023
@aocenas aocenas requested a review from a team as a code owner June 23, 2023 17:10
@@ -101,6 +102,25 @@ export class PhlareDataSource extends DataSourceWithBackend<Query, PhlareDataSou
labelMatchers: extractLabelMatchers(tokens),
};
}

getDefaultQuery(app: CoreApp): Partial<Query> {
Copy link
Member Author

Choose a reason for hiding this comment

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

This makes initialization in explore a bit better so for the first render of query editor we get this instead of totally empty query object.

Copy link
Contributor

@joey-grafana joey-grafana left a comment

Choose a reason for hiding this comment

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

Selects cpu by default 👍

@aocenas aocenas merged commit 0259ae2 into main Jun 28, 2023
@aocenas aocenas deleted the aocenas/pyroscope/select-default-profile-type branch June 28, 2023 10:26
@ricky-undeadcoders ricky-undeadcoders modified the milestones: 10.1.x, 10.1.0 Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
add to changelog area/frontend datasource/grafana-pyroscope Grafana pyroscope datasource (previously Phlare) no-backport Skip backport of PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants