-
Notifications
You must be signed in to change notification settings - Fork 12.2k
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
Conversation
public/app/plugins/datasource/grafana-pyroscope-datasource/QueryEditor/QueryEditor.tsx
Show resolved
Hide resolved
public/app/plugins/datasource/grafana-pyroscope-datasource/datasource.ts
Show resolved
Hide resolved
@@ -101,6 +102,25 @@ export class PhlareDataSource extends DataSourceWithBackend<Query, PhlareDataSou | |||
labelMatchers: extractLabelMatchers(tokens), | |||
}; | |||
} | |||
|
|||
getDefaultQuery(app: CoreApp): Partial<Query> { |
There was a problem hiding this comment.
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.
There was a problem hiding this 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 👍
Makes the drop down always preselected either a CPU profile or a first thing in the list.