mirror of
https://github.com/SigNoz/signoz.git
synced 2026-03-15 09:22:44 +00:00
Some checks failed
build-staging / staging (push) Has been cancelled
build-staging / prepare (push) Has been cancelled
build-staging / js-build (push) Has been cancelled
build-staging / go-build (push) Has been cancelled
Release Drafter / update_release_draft (push) Has been cancelled
* chore(frontend): separate out columnWidths from ResizeTable * chore: fix tests
54 lines
1.6 KiB
TypeScript
54 lines
1.6 KiB
TypeScript
import { PANEL_TYPES } from 'constants/queryBuilder';
|
|
import GridTableComponent from 'container/GridTableComponent';
|
|
import { GRID_TABLE_CONFIG } from 'container/GridTableComponent/config';
|
|
import { QueryRangeRequestV5 } from 'types/api/v5/queryRange';
|
|
|
|
import { PanelWrapperProps } from './panelWrapper.types';
|
|
|
|
function TablePanelWrapper({
|
|
widget,
|
|
queryResponse,
|
|
tableProcessedDataRef,
|
|
searchTerm,
|
|
openTracesButton,
|
|
onOpenTraceBtnClick,
|
|
customOnRowClick,
|
|
enableDrillDown = false,
|
|
onColumnWidthsChange,
|
|
}: PanelWrapperProps): JSX.Element {
|
|
const panelData =
|
|
(queryResponse.data?.payload?.data?.result?.[0] as any)?.table || [];
|
|
const { thresholds } = widget;
|
|
|
|
const queryRangeRequest = queryResponse.data?.params as QueryRangeRequestV5;
|
|
|
|
return (
|
|
<GridTableComponent
|
|
data={panelData}
|
|
query={widget.query}
|
|
thresholds={thresholds}
|
|
columnUnits={widget.columnUnits}
|
|
tableProcessedDataRef={tableProcessedDataRef}
|
|
sticky={widget.panelTypes === PANEL_TYPES.TABLE}
|
|
searchTerm={searchTerm}
|
|
openTracesButton={openTracesButton}
|
|
onOpenTraceBtnClick={onOpenTraceBtnClick}
|
|
customOnRowClick={customOnRowClick}
|
|
widgetId={widget.id}
|
|
columnWidths={widget.columnWidths}
|
|
onColumnWidthsChange={onColumnWidthsChange}
|
|
renderColumnCell={widget.renderColumnCell}
|
|
customColTitles={widget.customColTitles}
|
|
contextLinks={widget.contextLinks}
|
|
enableDrillDown={enableDrillDown}
|
|
panelType={widget.panelTypes}
|
|
queryRangeRequest={queryRangeRequest}
|
|
decimalPrecision={widget.decimalPrecision}
|
|
hiddenColumns={widget.hiddenColumns}
|
|
{...GRID_TABLE_CONFIG}
|
|
/>
|
|
);
|
|
}
|
|
|
|
export default TablePanelWrapper;
|