diff --git a/public/app/features/dashboard-scene/scene/layout-default/DefaultGridLayoutManager.tsx b/public/app/features/dashboard-scene/scene/layout-default/DefaultGridLayoutManager.tsx index 3fcb85b6fe6..a31bf88ec23 100644 --- a/public/app/features/dashboard-scene/scene/layout-default/DefaultGridLayoutManager.tsx +++ b/public/app/features/dashboard-scene/scene/layout-default/DefaultGridLayoutManager.tsx @@ -61,7 +61,7 @@ export class DefaultGridLayoutManager get description() { return t('dashboard.default-layout.description', 'Position and size each panel individually'); }, - id: 'default-grid', + id: 'GridLayout', createFromLayout: DefaultGridLayoutManager.createFromLayout, isGridLayout: true, }; diff --git a/public/app/features/dashboard-scene/scene/layout-responsive-grid/ResponsiveGridLayoutManager.tsx b/public/app/features/dashboard-scene/scene/layout-responsive-grid/ResponsiveGridLayoutManager.tsx index 0059d334686..57dc386d75a 100644 --- a/public/app/features/dashboard-scene/scene/layout-responsive-grid/ResponsiveGridLayoutManager.tsx +++ b/public/app/features/dashboard-scene/scene/layout-responsive-grid/ResponsiveGridLayoutManager.tsx @@ -52,7 +52,7 @@ export class AutoGridLayoutManager get description() { return t('dashboard.auto-grid.description', 'Panels resize to fit and form uniform grids'); }, - id: 'auto-grid', + id: 'AutoGridLayout', createFromLayout: AutoGridLayoutManager.createFromLayout, isGridLayout: true, }; diff --git a/public/app/features/dashboard-scene/scene/layout-rows/RowsLayoutManager.tsx b/public/app/features/dashboard-scene/scene/layout-rows/RowsLayoutManager.tsx index 53eaccdad3e..15a7ac95834 100644 --- a/public/app/features/dashboard-scene/scene/layout-rows/RowsLayoutManager.tsx +++ b/public/app/features/dashboard-scene/scene/layout-rows/RowsLayoutManager.tsx @@ -37,7 +37,7 @@ export class RowsLayoutManager extends SceneObjectBase i get description() { return t('dashboard.rows-layout.description', 'Collapsable panel groups with headings'); }, - id: 'rows-layout', + id: 'RowsLayout', createFromLayout: RowsLayoutManager.createFromLayout, isGridLayout: false, }; diff --git a/public/app/features/dashboard-scene/scene/layout-tabs/TabsLayoutManager.tsx b/public/app/features/dashboard-scene/scene/layout-tabs/TabsLayoutManager.tsx index c1c69c26bea..5707379910d 100644 --- a/public/app/features/dashboard-scene/scene/layout-tabs/TabsLayoutManager.tsx +++ b/public/app/features/dashboard-scene/scene/layout-tabs/TabsLayoutManager.tsx @@ -39,7 +39,7 @@ export class TabsLayoutManager extends SceneObjectBase i get description() { return t('dashboard.tabs-layout.description', 'Organize panels into horizontal tabs'); }, - id: 'tabs-layout', + id: 'TabsLayout', createFromLayout: TabsLayoutManager.createFromLayout, isGridLayout: false, }; diff --git a/public/app/features/dashboard-scene/scene/layouts-shared/DashboardLayoutSelector.tsx b/public/app/features/dashboard-scene/scene/layouts-shared/DashboardLayoutSelector.tsx index 08102bc1648..03003e3f93a 100644 --- a/public/app/features/dashboard-scene/scene/layouts-shared/DashboardLayoutSelector.tsx +++ b/public/app/features/dashboard-scene/scene/layouts-shared/DashboardLayoutSelector.tsx @@ -37,7 +37,7 @@ export function DashboardLayoutSelector({ layoutManager }: Props) {
{options.map((opt) => { switch (opt.id) { - case 'rows-layout': + case 'RowsLayout': return ( ); - case 'tabs-layout': + case 'TabsLayout': return ( ); - case 'responsive-grid': + case 'AutoGridLayout': return ( ); - case 'custom-grid': + case 'GridLayout': default: return ( { }; const scene = transformSaveModelSchemaV2ToScene(dashboard); const layoutManager = scene.state.body as AutoGridLayoutManager; - expect(layoutManager.descriptor.id).toBe('auto-grid'); + expect(layoutManager.descriptor.id).toBe('AutoGridLayout'); expect(layoutManager.state.maxColumnCount).toBe(4); expect(layoutManager.state.columnWidth).toBe(100); expect(layoutManager.state.rowHeight).toBe('standard'); @@ -572,7 +572,7 @@ describe('transformSaveModelSchemaV2ToScene', () => { }; const scene = transformSaveModelSchemaV2ToScene(dashboard); const layoutManager = scene.state.body as TabsLayoutManager; - expect(layoutManager.descriptor.id).toBe('tabs-layout'); + expect(layoutManager.descriptor.id).toBe('TabsLayout'); expect(layoutManager.state.tabs.length).toBe(1); expect(layoutManager.state.tabs[0].state.title).toBe('tab1'); const gridLayoutManager = layoutManager.state.tabs[0].state.layout as AutoGridLayoutManager; @@ -648,10 +648,10 @@ describe('transformSaveModelSchemaV2ToScene', () => { }; const scene = transformSaveModelSchemaV2ToScene(dashboard); const layoutManager = scene.state.body as RowsLayoutManager; - expect(layoutManager.descriptor.id).toBe('rows-layout'); + expect(layoutManager.descriptor.id).toBe('RowsLayout'); expect(layoutManager.state.rows.length).toBe(2); const row1Manager = layoutManager.state.rows[0].state.layout as AutoGridLayoutManager; - expect(row1Manager.descriptor.id).toBe('auto-grid'); + expect(row1Manager.descriptor.id).toBe('AutoGridLayout'); expect(row1Manager.state.maxColumnCount).toBe(4); expect(row1Manager.state.columnWidth).toBe('standard'); expect(row1Manager.state.rowHeight).toBe('standard'); @@ -659,7 +659,7 @@ describe('transformSaveModelSchemaV2ToScene', () => { expect(row1GridItem.state.body.state.key).toBe('panel-1'); const row2Manager = layoutManager.state.rows[1].state.layout as DefaultGridLayoutManager; - expect(row2Manager.descriptor.id).toBe('default-grid'); + expect(row2Manager.descriptor.id).toBe('GridLayout'); const row2GridItem = row2Manager.state.grid.state.children[0] as SceneGridItem; expect(row2GridItem.state.body!.state.key).toBe('panel-2'); });