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>
21 lines
492 B
TypeScript
21 lines
492 B
TypeScript
import { DEFAULT_PER_PAGE_OPTIONS } from './config';
|
|
import { Pagination } from './types';
|
|
|
|
export const checkIsValidPaginationData = (
|
|
{ limit, offset }: Pagination,
|
|
perPageOptions: number[],
|
|
): boolean =>
|
|
Boolean(
|
|
Number.isInteger(limit) &&
|
|
limit > 0 &&
|
|
offset >= 0 &&
|
|
perPageOptions.find((option) => option === limit),
|
|
);
|
|
|
|
export const getDefaultPaginationConfig = (
|
|
perPageOptions = DEFAULT_PER_PAGE_OPTIONS,
|
|
): Pagination => ({
|
|
offset: 0,
|
|
limit: perPageOptions[0],
|
|
});
|