mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Exemplars: always query exemplars (#31673)
* Exemplars: always query exemplars * Update exemplar button to be an eye * Add tooltip to eye button
This commit is contained in:
@@ -41,7 +41,7 @@ export class PromQueryEditor extends PureComponent<Props, State> {
|
||||
constructor(props: Props) {
|
||||
super(props);
|
||||
// Use default query to prevent undefined input values
|
||||
const defaultQuery: Partial<PromQuery> = { expr: '', legendFormat: '', interval: '' };
|
||||
const defaultQuery: Partial<PromQuery> = { expr: '', legendFormat: '', interval: '', exemplar: true };
|
||||
const query = Object.assign({}, defaultQuery, props.query);
|
||||
this.query = query;
|
||||
// Query target properties that are fully controlled inputs
|
||||
@@ -186,7 +186,7 @@ export class PromQueryEditor extends PureComponent<Props, State> {
|
||||
</InlineFormLabel>
|
||||
</div>
|
||||
|
||||
<PromExemplarField query={query} onChange={onChange} />
|
||||
<PromExemplarField query={this.query} onChange={onChange} datasource={this.props.datasource} />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user