mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
ExploreMetrics: Ensure compatibility with Incremental Querying (#94355)
fix: use unique refs in breakdown panels
This commit is contained in:
parent
96384b5181
commit
ff7a96d60e
@ -22,8 +22,7 @@ import {
|
|||||||
VizPanel,
|
VizPanel,
|
||||||
} from '@grafana/scenes';
|
} from '@grafana/scenes';
|
||||||
import { DataQuery } from '@grafana/schema';
|
import { DataQuery } from '@grafana/schema';
|
||||||
import { Button, LoadingPlaceholder, useStyles2 } from '@grafana/ui';
|
import { Button, Field, LoadingPlaceholder, useStyles2 } from '@grafana/ui';
|
||||||
import { Field } from '@grafana/ui/';
|
|
||||||
import { Trans } from 'app/core/internationalization';
|
import { Trans } from 'app/core/internationalization';
|
||||||
|
|
||||||
import { getAutoQueriesForMetric } from '../AutomaticMetricQueries/AutoQueryEngine';
|
import { getAutoQueriesForMetric } from '../AutomaticMetricQueries/AutoQueryEngine';
|
||||||
@ -230,7 +229,7 @@ export class LabelBreakdownScene extends SceneObjectBase<LabelBreakdownSceneStat
|
|||||||
<div className={styles.container}>
|
<div className={styles.container}>
|
||||||
<StatusWrapper {...{ isLoading: loading, blockingMessage }}>
|
<StatusWrapper {...{ isLoading: loading, blockingMessage }}>
|
||||||
<div className={styles.controls}>
|
<div className={styles.controls}>
|
||||||
{!loading && labels.length && (
|
{!loading && Boolean(labels.length) && (
|
||||||
<Field label={useOtelExperience ? 'By metric attribute' : 'By label'}>
|
<Field label={useOtelExperience ? 'By metric attribute' : 'By label'}>
|
||||||
<BreakdownLabelSelector options={labels} value={value} onChange={model.onChange} />
|
<BreakdownLabelSelector options={labels} value={value} onChange={model.onChange} />
|
||||||
</Field>
|
</Field>
|
||||||
@ -308,8 +307,8 @@ export function buildAllLayout(
|
|||||||
datasource: trailDS,
|
datasource: trailDS,
|
||||||
queries: [
|
queries: [
|
||||||
{
|
{
|
||||||
refId: 'A',
|
refId: `A-${option.label}`,
|
||||||
expr: expr,
|
expr,
|
||||||
legendFormat: `{{${option.label}}}`,
|
legendFormat: `{{${option.label}}}`,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
Loading…
Reference in New Issue
Block a user