mirror of
https://github.com/SigNoz/signoz.git
synced 2025-12-18 07:56:56 +00:00
25 lines
638 B
TypeScript
25 lines
638 B
TypeScript
|
|
import GridTableComponent from 'container/GridTableComponent';
|
||
|
|
import { GRID_TABLE_CONFIG } from 'container/GridTableComponent/config';
|
||
|
|
|
||
|
|
import { PanelWrapperProps } from './panelWrapper.types';
|
||
|
|
|
||
|
|
function TablePanelWrapper({
|
||
|
|
widget,
|
||
|
|
queryResponse,
|
||
|
|
}: PanelWrapperProps): JSX.Element {
|
||
|
|
const panelData =
|
||
|
|
queryResponse.data?.payload?.data.newResult.data.result || [];
|
||
|
|
const { thresholds } = widget;
|
||
|
|
return (
|
||
|
|
<GridTableComponent
|
||
|
|
data={panelData}
|
||
|
|
query={widget.query}
|
||
|
|
thresholds={thresholds}
|
||
|
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
||
|
|
{...GRID_TABLE_CONFIG}
|
||
|
|
/>
|
||
|
|
);
|
||
|
|
}
|
||
|
|
|
||
|
|
export default TablePanelWrapper;
|