mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-16 01:50:25 +08:00
开源版本也显示域名排行
This commit is contained in:
@@ -569,7 +569,7 @@ func (this *AdminService) ComposeAdminDashboard(ctx context.Context, req *pb.Com
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 是否是企业版
|
// 是否是商业版
|
||||||
isPlus, err := authority.SharedAuthorityKeyDAO.IsPlus(tx)
|
isPlus, err := authority.SharedAuthorityKeyDAO.IsPlus(tx)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
@@ -671,19 +671,17 @@ func (this *AdminService) ComposeAdminDashboard(ctx context.Context, req *pb.Com
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 域名排行
|
// 域名排行
|
||||||
if isPlus {
|
topDomainStats, err := stats.SharedServerDomainHourlyStatDAO.FindTopDomainStats(tx, hourFrom, hourTo, 10)
|
||||||
topDomainStats, err := stats.SharedServerDomainHourlyStatDAO.FindTopDomainStats(tx, hourFrom, hourTo, 10)
|
if err != nil {
|
||||||
if err != nil {
|
return nil, err
|
||||||
return nil, err
|
}
|
||||||
}
|
for _, stat := range topDomainStats {
|
||||||
for _, stat := range topDomainStats {
|
result.TopDomainStats = append(result.TopDomainStats, &pb.ComposeAdminDashboardResponse_DomainStat{
|
||||||
result.TopDomainStats = append(result.TopDomainStats, &pb.ComposeAdminDashboardResponse_DomainStat{
|
ServerId: int64(stat.ServerId),
|
||||||
ServerId: int64(stat.ServerId),
|
Domain: stat.Domain,
|
||||||
Domain: stat.Domain,
|
CountRequests: int64(stat.CountRequests),
|
||||||
CountRequests: int64(stat.CountRequests),
|
Bytes: int64(stat.Bytes),
|
||||||
Bytes: int64(stat.Bytes),
|
})
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 节点排行
|
// 节点排行
|
||||||
|
|||||||
Reference in New Issue
Block a user