mirror of
https://github.com/SigNoz/signoz.git
synced 2025-12-27 15:18:08 +00:00
* feat: query_range migration from v3/v4 -> v5 * feat: cleanup files * feat: cleanup code * feat: metric payload improvements * feat: metric payload improvements * feat: data retention and qb v2 for dashboard cleanup * feat: corrected datasource change daata updatation in qb v2 * feat: fix value panel plotting with new query v5 * feat: alert migration * feat: fixed aggregation css * feat: explorer pages migration * feat: trace and logs explorer fixes
58 lines
1.6 KiB
TypeScript
58 lines
1.6 KiB
TypeScript
import { Space } from 'antd';
|
|
import { ENTITY_VERSION_V5 } from 'constants/app';
|
|
import { initialQueriesMap, PANEL_TYPES } from 'constants/queryBuilder';
|
|
import { REACT_QUERY_KEY } from 'constants/reactQueryKeys';
|
|
import { QueryTable } from 'container/QueryTable';
|
|
import { useGetQueryRange } from 'hooks/queryBuilder/useGetQueryRange';
|
|
import { useQueryBuilder } from 'hooks/queryBuilder/useQueryBuilder';
|
|
import { memo } from 'react';
|
|
import { useSelector } from 'react-redux';
|
|
import { AppState } from 'store/reducers';
|
|
import { GlobalReducer } from 'types/reducer/globalTime';
|
|
|
|
function TableView(): JSX.Element {
|
|
const { stagedQuery, panelType } = useQueryBuilder();
|
|
|
|
const { selectedTime: globalSelectedTime, maxTime, minTime } = useSelector<
|
|
AppState,
|
|
GlobalReducer
|
|
>((state) => state.globalTime);
|
|
|
|
const { data, isLoading } = useGetQueryRange(
|
|
{
|
|
query: stagedQuery || initialQueriesMap.traces,
|
|
graphType: panelType || PANEL_TYPES.TABLE,
|
|
selectedTime: 'GLOBAL_TIME',
|
|
globalSelectedInterval: globalSelectedTime,
|
|
params: {
|
|
dataSource: 'traces',
|
|
},
|
|
},
|
|
// ENTITY_VERSION_V4,
|
|
ENTITY_VERSION_V5,
|
|
{
|
|
queryKey: [
|
|
REACT_QUERY_KEY.GET_QUERY_RANGE,
|
|
globalSelectedTime,
|
|
maxTime,
|
|
minTime,
|
|
stagedQuery,
|
|
],
|
|
enabled: !!stagedQuery && panelType === PANEL_TYPES.TABLE,
|
|
},
|
|
);
|
|
|
|
return (
|
|
<Space.Compact block direction="vertical">
|
|
<QueryTable
|
|
query={stagedQuery || initialQueriesMap.traces}
|
|
queryTableData={data?.payload?.data?.newResult?.data?.result || []}
|
|
loading={isLoading}
|
|
sticky
|
|
/>
|
|
</Space.Compact>
|
|
);
|
|
}
|
|
|
|
export default memo(TableView);
|