ui: fix error table pagination

This commit is contained in:
nick-delirium 2025-02-28 10:34:39 +01:00
parent e5809a5eff
commit 8ba6a17055
No known key found for this signature in database
GPG key ID: 93ABD695DF5FDBA0
2 changed files with 3 additions and 3 deletions

View file

@ -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();

View file

@ -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)