PluginExtensions: Adding full targets to the panel menu context (#65861)

* Making sure we add the whole query to the dashboard panel context.

* Adding some more tests.

* Synced with main.
This commit is contained in:
Marcus Andersson
2023-04-04 07:17:10 +02:00
committed by GitHub
parent ea6aedd10a
commit c8ecd0679b
4 changed files with 47 additions and 12 deletions

View File

@@ -1,3 +1,5 @@
import { DataQuery } from '@grafana/schema';
import { RawTimeRange, TimeZone } from './time';
// Plugin Extensions types
@@ -73,7 +75,7 @@ export type PluginExtensionPanelContext = {
timeRange: RawTimeRange;
timeZone: TimeZone;
dashboard: Dashboard;
targets: Target[];
targets: DataQuery[];
};
type Dashboard = {
@@ -81,8 +83,3 @@ type Dashboard = {
title: string;
tags: string[];
};
type Target = {
pluginId: string;
refId: string;
};