mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-12 18:26:36 +08:00
[优化] 数据库结构优化
This commit is contained in:
@@ -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),
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user