change(ui): table of errors limit to 5

This commit is contained in:
Shekar Siri 2024-08-05 16:06:43 +02:00
parent 343dc44189
commit aaabf92afb
2 changed files with 20 additions and 16 deletions

View file

@ -61,23 +61,23 @@ function CustomMetricTableErrors(props: RouteComponentProps & Props) {
</div>
))}
{isEdit && (
<div className="my-6 flex items-center justify-center">
<Pagination
page={metric.page}
total={data.total}
onPageChange={(page: any) =>
metric.updateKey("page", page)
}
limit={metric.limit}
debounceRequest={500}
/>
</div>
)}
{/*{isEdit && (*/}
<div className="my-6 flex items-center justify-center">
<Pagination
page={metric.page}
total={data.total}
onPageChange={(page: any) =>
metric.updateKey("page", page)
}
limit={5}
debounceRequest={500}
/>
</div>
{/*)}*/}
{!isEdit && (
<ViewMore total={data.total} limit={metric.limit} />
)}
{/*{!isEdit && (*/}
{/* <ViewMore total={data.total} limit={5} />*/}
{/*)}*/}
</div>
</NoContent>
);

View file

@ -424,6 +424,10 @@ export default class DashboardStore {
return new Promise(async (resolve, reject) => {
this.pendingRequests += 1;
if (metric.metricType === 'table' && metric.metricOf === 'jsException') {
params.limit = 5;
}
try {
const data = await metricService.getMetricChartData(metric, params, isSaved);
resolve(metric.setData(data, period));