[优化] 数据库结构优化

This commit is contained in:
ryan
2026-06-01 15:20:43 +08:00
parent fe13db95c2
commit 9de33f7064
53 changed files with 937 additions and 596 deletions
+6 -1
View File
@@ -93,6 +93,11 @@ func GetDashboardOverview() (*DashboardOverviewView, error) {
return nil, err
}
openrestySnapshots, err := model.ListNodeObservationOpenresty("", since, 0)
if err != nil {
return nil, err
}
view := &DashboardOverviewView{
GeneratedAt: now,
Nodes: make([]DashboardNodeHealth, 0, len(nodes)),
@@ -100,7 +105,7 @@ func GetDashboardOverview() (*DashboardOverviewView, error) {
Trends: DashboardTrends{
Traffic24h: buildTrafficTrendPoints(now, reports),
Capacity24h: buildCapacityTrendPoints(now, snapshots),
Network24h: buildNetworkTrendPoints(now, snapshots),
Network24h: buildNetworkTrendPoints(now, snapshots, openrestySnapshots),
DiskIO24h: buildDiskIOTrendPoints(now, snapshots),
},
}