signoz/frontend/src/container/PanelWrapper/TablePanelWrapper.tsx
Vikrant Gupta 2145e353c8
feat: per column unit option for table type (#5134)
* feat: base setup for individual column type units

* feat: added logic for y axis unit selection

* fix: light mode design

* feat: fix the mutation of original datasource array
2024-06-04 11:14:54 +05:30

28 lines
750 B
TypeScript

import GridTableComponent from 'container/GridTableComponent';
import { GRID_TABLE_CONFIG } from 'container/GridTableComponent/config';
import { PanelWrapperProps } from './panelWrapper.types';
function TablePanelWrapper({
widget,
queryResponse,
tableProcessedDataRef,
}: PanelWrapperProps): JSX.Element {
const panelData =
queryResponse.data?.payload?.data?.newResult?.data?.result || [];
const { thresholds } = widget;
return (
<GridTableComponent
data={panelData}
query={widget.query}
thresholds={thresholds}
columnUnits={widget.columnUnits}
tableProcessedDataRef={tableProcessedDataRef}
// eslint-disable-next-line react/jsx-props-no-spreading
{...GRID_TABLE_CONFIG}
/>
);
}
export default TablePanelWrapper;