Panel inspect: Fix file names of data download included uninterpolated variable names. (#98832)

* use panel title for dataName instead of panel.getDisplayTitle()

* Interpolate variables in panel title for downloads in scenes

---------

Co-authored-by: oscarkilhed <oscar.kilhed@grafana.com>
pull/98931/head
Alex Rosenfeld 5 months ago committed by GitHub
parent 9b34a56d7c
commit 29a8fbd898
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      public/app/features/dashboard-scene/inspect/InspectDataTab.tsx
  2. 2
      public/app/features/dashboard/components/Inspector/InspectContent.tsx

@ -62,7 +62,7 @@ export class InspectDataTab extends SceneObjectBase<InspectDataTabState> {
hasTransformations={hasTransformations(dataProvider)}
timeZone={timeRange.getTimeZone()}
panelPluginId={panel.state.pluginId}
dataName={panel.state.title}
dataName={sceneGraph.interpolate(panel, panel.state.title)}
fieldConfig={panel.state.fieldConfig}
onOptionsChange={model.onOptionsChange}
/>

@ -94,7 +94,7 @@ export const InspectContent = ({
>
{activeTab === InspectTab.Data && (
<InspectDataTab
dataName={panel.getDisplayTitle()}
dataName={panelTitle}
panelPluginId={panel.type}
fieldConfig={panel.fieldConfig}
hasTransformations={Boolean(panel.transformations?.length)}

Loading…
Cancel
Save