feat(diagnostics): correlate staff operations errors and audit records
This commit is contained in:
1 parent
440ce4e556
commit
a2954e4408
14 files changed
+473
-110
No files matched your search
@@ -1,5 +1,6 @@
|
||||
"use client";
|
||||
|
||||
import Link from "next/link";
|
||||
import { useSearchParams } from "next/navigation";
|
||||
import { useTranslations } from "next-intl";
|
||||
import { DataTable } from "@/components/admin/data-table";
|
||||
@@ -10,6 +11,7 @@ import type { DataTableColumn, PaginatedResult } from "@/types/common";
|
||||
import { AuditFilters } from "./audit-filters";
|
||||
|
||||
interface AuditRow {
|
||||
operationId?: string | null;
|
||||
id: number;
|
||||
username: string;
|
||||
action: string;
|
||||
@@ -106,6 +108,14 @@ export function AuditTable({ data }: AuditTableProps) {
|
||||
render: (_value, row) => (
|
||||
<div className="space-y-2">
|
||||
<DiffCell row={row} />
|
||||
{row.operationId && (
|
||||
<Link
|
||||
className="text-xs underline break-all"
|
||||
href={`/admin/devops/cms-errors?q=${encodeURIComponent(row.operationId)}`}
|
||||
>
|
||||
{t("audit.operation")}: {row.operationId}
|
||||
</Link>
|
||||
)}
|
||||
{["history_update", "history_restore"].includes(row.action) && (
|
||||
<HistoryRestore id={row.id} />
|
||||
)}
|
||||
|
||||
Reference in new issue
Block a user