mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-10-20 02:01:10 +08:00

* 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
28 lines
750 B
TypeScript
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;
|