mirror of
https://github.com/SigNoz/signoz.git
synced 2025-12-29 16:14:42 +00:00
* feat: add dynamic table based on query * feat: add the list view for the traces explorer * feat: add the list view for the traces explorer * feat: add the list view for the traces explorer * feat: add the table view for the traces explorer * feat: add the table view for the traces explorer * feat: add the trace view for the traces explorer * feat: update the traces view tab for the traces explorer page * feat: update the traces 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>
52 lines
1.3 KiB
TypeScript
52 lines
1.3 KiB
TypeScript
import Controls, { ControlsProps } from 'container/Controls';
|
|
import OptionsMenu from 'container/OptionsMenu';
|
|
import { OptionsMenuConfig } from 'container/OptionsMenu/types';
|
|
import useQueryPagination from 'hooks/queryPagination/useQueryPagination';
|
|
import { memo } from 'react';
|
|
|
|
import { Container } from './styles';
|
|
|
|
function TraceExplorerControls({
|
|
isLoading,
|
|
totalCount,
|
|
perPageOptions,
|
|
config,
|
|
}: TraceExplorerControlsProps): JSX.Element | null {
|
|
const {
|
|
pagination,
|
|
handleCountItemsPerPageChange,
|
|
handleNavigateNext,
|
|
handleNavigatePrevious,
|
|
} = useQueryPagination(totalCount, perPageOptions);
|
|
|
|
return (
|
|
<Container>
|
|
{config && <OptionsMenu config={{ addColumn: config?.addColumn }} />}
|
|
|
|
<Controls
|
|
isLoading={isLoading}
|
|
totalCount={totalCount}
|
|
offset={pagination.offset}
|
|
countPerPage={pagination.limit}
|
|
perPageOptions={perPageOptions}
|
|
handleCountItemsPerPageChange={handleCountItemsPerPageChange}
|
|
handleNavigateNext={handleNavigateNext}
|
|
handleNavigatePrevious={handleNavigatePrevious}
|
|
/>
|
|
</Container>
|
|
);
|
|
}
|
|
|
|
TraceExplorerControls.defaultProps = {
|
|
config: null,
|
|
};
|
|
|
|
type TraceExplorerControlsProps = Pick<
|
|
ControlsProps,
|
|
'isLoading' | 'totalCount' | 'perPageOptions'
|
|
> & {
|
|
config?: OptionsMenuConfig | null;
|
|
};
|
|
|
|
export default memo(TraceExplorerControls);
|