Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
import React from 'react';

import { EuiPanel, EuiSpacer, EuiText, EuiTitle } from '@elastic/eui';
import type { DashboardPanelMap } from '@kbn/dashboard-plugin/common';
import type { DashboardState } from '@kbn/dashboard-plugin/common';
import { DashboardRenderer } from '@kbn/dashboard-plugin/public';

import panelsJson from './static_by_value_example_panels.json';
import panels from './static_by_value_example_panels.json';

export const StaticByValueExample = () => {
return (
Expand All @@ -32,7 +32,7 @@ export const StaticByValueExample = () => {
getInitialInput: () => ({
timeRange: { from: 'now-30d', to: 'now' },
viewMode: 'view',
panels: panelsJson as DashboardPanelMap,
panels: panels as DashboardState['panels'],
}),
};
}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"a514e5f6-1d0d-4fe9-85a9-f7ba40665033": {
[
{
"type": "visualization",
"gridData": {
"x": 0,
Expand All @@ -8,8 +8,8 @@
"h": 10,
"i": "a514e5f6-1d0d-4fe9-85a9-f7ba40665033"
},
"explicitInput": {
"id": "a514e5f6-1d0d-4fe9-85a9-f7ba40665033",
"panelIndex": "a514e5f6-1d0d-4fe9-85a9-f7ba40665033",
"panelConfig": {
"savedVis": {
"id": "",
"title": "",
Expand All @@ -35,7 +35,7 @@
"enhancements": {}
}
},
"b06b849e-f4fd-423c-a582-5c4bfec812c9": {
{
"type": "lens",
"gridData": {
"x": 30,
Expand All @@ -44,8 +44,8 @@
"h": 21,
"i": "b06b849e-f4fd-423c-a582-5c4bfec812c9"
},
"explicitInput": {
"id": "b06b849e-f4fd-423c-a582-5c4bfec812c9",
"panelIndex": "b06b849e-f4fd-423c-a582-5c4bfec812c9",
"panelConfig": {
"title": "Destinations",
"attributes": {
"title": "",
Expand Down Expand Up @@ -142,7 +142,7 @@
"enhancements": {}
}
},
"a4121cab-b6f2-4de3-af71-ec9b5a6f0a2a": {
{
"type": "lens",
"gridData": {
"x": 0,
Expand All @@ -151,8 +151,8 @@
"h": 11,
"i": "a4121cab-b6f2-4de3-af71-ec9b5a6f0a2a"
},
"panelIndex": "a4121cab-b6f2-4de3-af71-ec9b5a6f0a2a",
"explicitInput": {
"id": "a4121cab-b6f2-4de3-af71-ec9b5a6f0a2a",
"enhancements": {},
"attributes": {
"visualizationType": "lnsXY",
Expand Down Expand Up @@ -332,4 +332,4 @@
"title": "[Logs] Bytes distribution"
}
}
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import {
GridData as GridDataV1,
SavedDashboardPanel as SavedDashboardPanelV1,
} from '../v1/types';
import { DashboardSectionState } from '../..';

export type GridData = GridDataV1 & {
sectionId?: string;
Expand All @@ -33,6 +32,13 @@ export type ControlGroupAttributes = ControlGroupAttributesV1 & {
showApplySelections?: boolean;
};

interface DashboardSectionState {
title: string;
collapsed?: boolean; // if undefined, then collapsed is false
readonly gridData: Pick<GridData, 'i' | 'y'>;
id: string;
}

export type DashboardAttributes = Omit<DashboardAttributesV1, 'controlGroupInput'> & {
controlGroupInput?: ControlGroupAttributes;
sections?: DashboardSectionState[];
Expand Down

This file was deleted.

Loading