mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Scene: Dashboard loader supports transformations & unit tests (#60855)
* Scene: use transformations for panel queries * refactor: Clean up DashboardLoader class * test: Add unit tests for creators * test: Ensure the row herarchy is properly replicated * test: Ensure the URLSync is initialized * refactor: Use fixture to create panels
This commit is contained in:
@@ -5,6 +5,7 @@ import {
|
||||
defaultVariableModel,
|
||||
GraphPanel,
|
||||
Panel,
|
||||
RowPanel,
|
||||
VariableModel,
|
||||
} from '@grafana/schema';
|
||||
import { GetVariables } from 'app/features/variables/state/selectors';
|
||||
@@ -29,7 +30,7 @@ export function createDashboardModelFixture(
|
||||
return new DashboardModel(dashboardJson, meta, getVariablesFromState);
|
||||
}
|
||||
|
||||
export function createPanelJSONFixture(panelInput: Partial<Panel | GraphPanel> = {}): Panel {
|
||||
export function createPanelJSONFixture(panelInput: Partial<Panel | GraphPanel | RowPanel> = {}): Panel {
|
||||
return {
|
||||
fieldConfig: {
|
||||
defaults: {},
|
||||
|
||||
Reference in New Issue
Block a user