diff --git a/frontend/src/pages/analysis/components/TopAppsTable.tsx b/frontend/src/pages/analysis/components/TopAppsTable.tsx index 155cdc6..c62af33 100644 --- a/frontend/src/pages/analysis/components/TopAppsTable.tsx +++ b/frontend/src/pages/analysis/components/TopAppsTable.tsx @@ -19,12 +19,15 @@ function Sparkline({ values }: { values: number[] }) { /** 应用日志量排行表:哪个 deployment 日志量最大、错误最多一目了然 */ export const TopAppsTable = memo(function TopAppsTable({ - apps, total, appLabel, onViewLogs, + apps, total, appLabel, onViewLogs, startIndex = 0, }: { apps: AppRow[] total: number appLabel: string onViewLogs: (query: string) => void + /* 当前页第一条在整体排行中的偏移(分页后名次要接着往下数: + 第 2 页应该从 11 开始,而不是重新从 1 开始) */ + startIndex?: number }) { const { t } = useTranslation('analysis') if (apps.length === 0) { @@ -59,7 +62,7 @@ export const TopAppsTable = memo(function TopAppsTable({ const selector = `{namespace="${row.namespace}", ${appLabel}="${row.app}"}` const metric = metricOf(row) return