diff --git a/frontend/src/pages/DashboardPage.tsx b/frontend/src/pages/DashboardPage.tsx
index d1e96e7..8d194af 100644
--- a/frontend/src/pages/DashboardPage.tsx
+++ b/frontend/src/pages/DashboardPage.tsx
@@ -171,6 +171,10 @@ function barColor(item: GatewayTrendItem): string {
}
function GatewayTimeline({ trend }: { trend: GatewayTrendItem[] }) {
+ const maxIssues = Math.max(1, ...trend.map(
+ i => i.heartbeat_timeouts + i.feishu_disconnects + i.restarts,
+ ))
+
return (
{trend.map((item, i) => {
const col = barColor(item)
+ const total = item.heartbeat_timeouts + item.feishu_disconnects + item.restarts
+ const pct = total / maxIssues
+ const height = total === 0 ? 3 : Math.max(3, Math.round(pct * 36))
const details: string[] = []
if (item.heartbeat_timeouts > 0) details.push('心跳超时 ' + item.heartbeat_timeouts)
if (item.feishu_disconnects > 0) details.push('飞书断连 ' + item.feishu_disconnects)
@@ -195,6 +202,7 @@ function GatewayTimeline({ trend }: { trend: GatewayTrendItem[] }) {
title={item.hour + ': ' + tip}
style={{
flex: 1,
+ height,
borderRadius: '2px 2px 0 0',
minWidth: 3,
cursor: 'pointer',