mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-09 16:50:26 +08:00
改进显示
This commit is contained in:
@@ -38,7 +38,6 @@ func (this *IndexAction) RunGet(params struct{}) {
|
|||||||
logMaps := []maps.Map{}
|
logMaps := []maps.Map{}
|
||||||
for _, log := range logsResp.Logs {
|
for _, log := range logsResp.Logs {
|
||||||
regionName := ""
|
regionName := ""
|
||||||
log.Ip = "123.123.88.220" // TODO
|
|
||||||
regionResp, err := this.RPC().IPLibraryRPC().LookupIPRegion(this.AdminContext(), &pb.LookupIPRegionRequest{Ip: log.Ip})
|
regionResp, err := this.RPC().IPLibraryRPC().LookupIPRegion(this.AdminContext(), &pb.LookupIPRegionRequest{Ip: log.Ip})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
this.ErrorPage(err)
|
this.ErrorPage(err)
|
||||||
@@ -56,7 +55,7 @@ func (this *IndexAction) RunGet(params struct{}) {
|
|||||||
pieces = append(pieces, regionResp.Region.City)
|
pieces = append(pieces, regionResp.Region.City)
|
||||||
}
|
}
|
||||||
if len(regionResp.Region.Isp) > 0 && !lists.ContainsString(pieces, regionResp.Region.Isp) {
|
if len(regionResp.Region.Isp) > 0 && !lists.ContainsString(pieces, regionResp.Region.Isp) {
|
||||||
pieces = append(pieces, regionResp.Region.Isp)
|
pieces = append(pieces, "| "+regionResp.Region.Isp)
|
||||||
}
|
}
|
||||||
regionName = strings.Join(pieces, " ")
|
regionName = strings.Join(pieces, " ")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user