From 8ba6a1705583cc97325db331e27bedaf2d577f84 Mon Sep 17 00:00:00 2001 From: nick-delirium Date: Fri, 28 Feb 2025 10:34:39 +0100 Subject: [PATCH] ui: fix error table pagination --- .../CustomMetricTableErrors/CustomMetricTableErrors.tsx | 5 ++--- frontend/app/mstore/types/widget.ts | 1 + 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/app/components/Dashboard/Widgets/CustomMetricsWidgets/CustomMetricTableErrors/CustomMetricTableErrors.tsx b/frontend/app/components/Dashboard/Widgets/CustomMetricsWidgets/CustomMetricTableErrors/CustomMetricTableErrors.tsx index 4daa643d7..75c70aaef 100644 --- a/frontend/app/components/Dashboard/Widgets/CustomMetricsWidgets/CustomMetricTableErrors/CustomMetricTableErrors.tsx +++ b/frontend/app/components/Dashboard/Widgets/CustomMetricsWidgets/CustomMetricTableErrors/CustomMetricTableErrors.tsx @@ -4,7 +4,7 @@ import ErrorListItem from "App/components/Dashboard/components/Errors/ErrorListI import { withRouter, RouteComponentProps } from "react-router-dom"; import { useModal } from "App/components/Modal"; import ErrorDetailsModal from "App/components/Dashboard/components/Errors/ErrorDetailsModal"; -import { useStore } from "App/mstore"; + interface Props { metric: any; data: any; @@ -13,10 +13,9 @@ interface Props { location: any; } function CustomMetricTableErrors(props: RouteComponentProps & Props) { - const { metric, isEdit = false, data } = props; + const { metric, data } = props; const errorId = new URLSearchParams(props.location.search).get("errorId"); const { showModal, hideModal } = useModal(); - const { dashboardStore } = useStore(); const onErrorClick = (e: any, error: any) => { e.stopPropagation(); diff --git a/frontend/app/mstore/types/widget.ts b/frontend/app/mstore/types/widget.ts index 8d2a3921a..24944f682 100644 --- a/frontend/app/mstore/types/widget.ts +++ b/frontend/app/mstore/types/widget.ts @@ -340,6 +340,7 @@ export default class Widget { if (this.metricOf === FilterKey.ERRORS) { _data['errors'] = data.errors.map((s: any) => new ErrorInfo(s)); + _data['total'] = data.total; } else if (this.metricType === INSIGHTS) { _data['issues'] = data .filter((i: any) => i.change > 0 || i.change < 0)