@grafana/flamegraph
Version:
Grafana flamegraph visualization component
51 lines (50 loc) • 1.92 kB
TypeScript
import * as React from 'react';
import { type ChatContextItem } from '@grafana/assistant';
import { type SelectableValue } from '@grafana/data';
import { type CollapsedMap } from './FlameGraph/dataTransform';
import { type ColorScheme, type ColorSchemeDiff, PaneView, SelectedView, type TextAlign, ViewMode } from './types';
type LegacyProps = {
search: string;
setSearch: (search: string) => void;
selectedView: SelectedView;
setSelectedView: (view: SelectedView) => void;
containerWidth: number;
onReset: () => void;
textAlign: TextAlign;
onTextAlignChange: (align: TextAlign) => void;
showResetButton: boolean;
colorScheme: ColorScheme | ColorSchemeDiff;
onColorSchemeChange: (colorScheme: ColorScheme | ColorSchemeDiff) => void;
stickyHeader: boolean;
vertical?: boolean;
isDiffMode: boolean;
setCollapsedMap: (collapsedMap: CollapsedMap) => void;
collapsedMap: CollapsedMap;
extraHeaderElements?: React.ReactNode;
assistantContext?: ChatContextItem[];
};
type NewUIProps = {
search: string;
setSearch: (search: string) => void;
enableNewUI: true;
viewMode: ViewMode;
setViewMode: (mode: ViewMode) => void;
canShowSplitView: boolean;
containerWidth: number;
leftPaneView: PaneView;
setLeftPaneView: (view: PaneView) => void;
rightPaneView: PaneView;
setRightPaneView: (view: PaneView) => void;
singleView: PaneView;
setSingleView: (view: PaneView) => void;
onSwapPanes: () => void;
onReset: () => void;
showResetButton: boolean;
stickyHeader: boolean;
extraHeaderElements?: React.ReactNode;
assistantContext?: ChatContextItem[];
};
type Props = LegacyProps | NewUIProps;
declare const FlameGraphHeader: (props: Props) => import("react/jsx-runtime").JSX.Element;
export declare const alignOptions: Array<SelectableValue<TextAlign>>;
export default FlameGraphHeader;