fix: maintain existing pagination configs (#4484)

* fix: maintain existing pagination configs

* fix: pass pagination info services table

* fix: general setting - cloud - add email mailto link
This commit is contained in:
Yunus M 2024-02-02 16:44:27 +05:30 committed by GitHub
parent ac835c80e9
commit f5b5a9a657
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 14 additions and 11 deletions

View File

@ -73,19 +73,12 @@ function ResizeTable({
} }
}, [columns]); }, [columns]);
const paginationConfig = {
hideOnSinglePage: true,
showTotal: (total: number, range: number[]): string =>
`${range[0]}-${range[1]} of ${total} items`,
...tableParams.pagination,
};
return onDragColumn ? ( return onDragColumn ? (
<ReactDragListView.DragColumn {...dragColumnParams} onDragEnd={onDragColumn}> <ReactDragListView.DragColumn {...dragColumnParams} onDragEnd={onDragColumn}>
<Table {...tableParams} pagination={paginationConfig} /> <Table {...tableParams} />
</ReactDragListView.DragColumn> </ReactDragListView.DragColumn>
) : ( ) : (
<Table {...tableParams} pagination={paginationConfig} /> <Table {...tableParams} />
); );
} }

View File

@ -8,8 +8,8 @@ export default function GeneralSettingsCloud(): JSX.Element {
<Card className="general-settings-container"> <Card className="general-settings-container">
<Info size={16} /> <Info size={16} />
<Typography.Text> <Typography.Text>
Please email us or connect with us via intercom support to change the Please <a href="mailto:cloud-support@signoz.io"> email us </a> or connect
retention period. with us via intercom support to change the retention period.
</Typography.Text> </Typography.Text>
</Card> </Card>
); );

View File

@ -91,6 +91,11 @@ function ServiceMetricTable({
<ResourceAttributesFilter /> <ResourceAttributesFilter />
<ResizeTable <ResizeTable
pagination={{
defaultPageSize: 10,
showTotal: (total: number, range: number[]): string =>
`${range[0]}-${range[1]} of ${total} items`,
}}
columns={tableColumns} columns={tableColumns}
loading={isLoading} loading={isLoading}
dataSource={services} dataSource={services}

View File

@ -49,6 +49,11 @@ function ServiceTraceTable({
<ResourceAttributesFilter /> <ResourceAttributesFilter />
<ResizeTable <ResizeTable
pagination={{
defaultPageSize: 10,
showTotal: (total: number, range: number[]): string =>
`${range[0]}-${range[1]} of ${total} items`,
}}
columns={tableColumns} columns={tableColumns}
loading={loading} loading={loading}
dataSource={services} dataSource={services}