grafana/public/app/features/explore/FlameGraphExploreContainer.tsx
Joey Tawadrous 74c809f544
Plugins: Introduce new Flame graph panel (#56376)
* Flamegraph

* Updated flame graph width/height values

* Fix top table rendering issue

* Add feature toggle for flamegraph in explore

* Update tests

* Hide flamegraph from dash panel viz list if feature toggle not enabled

* Show table if no flameGraphFrames

* Add flame graph to testdata ds

* Minor improvement
2022-10-07 11:39:14 +01:00

32 lines
855 B
TypeScript

import { css } from '@emotion/css';
import React from 'react';
import { DataFrame, GrafanaTheme2 } from '@grafana/data';
import { useStyles2 } from '@grafana/ui';
import FlameGraphContainer from '../../plugins/panel/flamegraph/components/FlameGraphContainer';
interface Props {
dataFrames: DataFrame[];
}
export const FlameGraphExploreContainer = (props: Props) => {
const styles = useStyles2((theme) => getStyles(theme));
return (
<div className={styles.container}>
<FlameGraphContainer data={props.dataFrames[0]} />
</div>
);
};
const getStyles = (theme: GrafanaTheme2) => ({
container: css`
background: ${theme.colors.background.primary};
display: flow-root;
padding: ${theme.spacing(1)};
border: 1px solid ${theme.components.panel.borderColor};
border-radius: ${theme.shape.borderRadius(1)};
`,
});