mirror of
https://github.com/SigNoz/signoz.git
synced 2025-12-29 16:14:42 +00:00
22 lines
539 B
TypeScript
22 lines
539 B
TypeScript
|
|
import GridValueComponent from 'container/GridValueComponent';
|
||
|
|
import { getUPlotChartData } from 'lib/uPlotLib/utils/getUplotChartData';
|
||
|
|
|
||
|
|
import { PanelWrapperProps } from './panelWrapper.types';
|
||
|
|
|
||
|
|
function ValuePanelWrapper({
|
||
|
|
widget,
|
||
|
|
queryResponse,
|
||
|
|
}: PanelWrapperProps): JSX.Element {
|
||
|
|
const { yAxisUnit, thresholds } = widget;
|
||
|
|
const data = getUPlotChartData(queryResponse?.data?.payload);
|
||
|
|
return (
|
||
|
|
<GridValueComponent
|
||
|
|
data={data}
|
||
|
|
yAxisUnit={yAxisUnit}
|
||
|
|
thresholds={thresholds}
|
||
|
|
/>
|
||
|
|
);
|
||
|
|
}
|
||
|
|
|
||
|
|
export default ValuePanelWrapper;
|