mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-07-29 01:12:04 +08:00

* feat: add dynamic table based on query * feat: add the list view for the traces explorer * fix: fix the options menu * feat: update the list view columns config for the traces explorer * feat: fix columns for the list view for the traces explorer page * feat: update customization columns for the list view from the traces explorer * feat: add error msg for the list view, fix creating data for the table * fix: resolve the list view issues * fix: update the date column for the list view * fix: remove additional filter title for the list view * fix: add initial orderBy filter for the list view --------- Co-authored-by: Yevhen Shevchenko <y.shevchenko@seedium.io> Co-authored-by: Nazarenko19 <danil.nazarenko2000@gmail.com> Co-authored-by: Vishal Sharma <makeavish786@gmail.com>
56 lines
1.5 KiB
TypeScript
56 lines
1.5 KiB
TypeScript
import { initialQueriesMap, PANEL_TYPES } from 'constants/queryBuilder';
|
|
import { REACT_QUERY_KEY } from 'constants/reactQueryKeys';
|
|
import { useGetQueryRange } from 'hooks/queryBuilder/useGetQueryRange';
|
|
import { useQueryBuilder } from 'hooks/queryBuilder/useQueryBuilder';
|
|
import { useSelector } from 'react-redux';
|
|
import { AppState } from 'store/reducers';
|
|
import { DataSource } from 'types/common/queryBuilder';
|
|
import { GlobalReducer } from 'types/reducer/globalTime';
|
|
|
|
import TimeSeriesView from './TimeSeriesView';
|
|
|
|
function TimeSeriesViewContainer({
|
|
dataSource = DataSource.TRACES,
|
|
}: TimeSeriesViewProps): JSX.Element {
|
|
const { stagedQuery, panelType } = useQueryBuilder();
|
|
|
|
const { selectedTime: globalSelectedTime, maxTime, minTime } = useSelector<
|
|
AppState,
|
|
GlobalReducer
|
|
>((state) => state.globalTime);
|
|
|
|
const { data, isLoading, isError } = useGetQueryRange(
|
|
{
|
|
query: stagedQuery || initialQueriesMap[dataSource],
|
|
graphType: panelType || PANEL_TYPES.TIME_SERIES,
|
|
selectedTime: 'GLOBAL_TIME',
|
|
globalSelectedInterval: globalSelectedTime,
|
|
params: {
|
|
dataSource,
|
|
},
|
|
},
|
|
{
|
|
queryKey: [
|
|
REACT_QUERY_KEY.GET_QUERY_RANGE,
|
|
globalSelectedTime,
|
|
maxTime,
|
|
minTime,
|
|
stagedQuery,
|
|
],
|
|
enabled: !!stagedQuery && panelType === PANEL_TYPES.TIME_SERIES,
|
|
},
|
|
);
|
|
|
|
return <TimeSeriesView isError={isError} isLoading={isLoading} data={data} />;
|
|
}
|
|
|
|
interface TimeSeriesViewProps {
|
|
dataSource?: DataSource;
|
|
}
|
|
|
|
TimeSeriesViewContainer.defaultProps = {
|
|
dataSource: DataSource.TRACES,
|
|
};
|
|
|
|
export default TimeSeriesViewContainer;
|