update: 服务器状态API增加上次汇报时间的unix时间戳
This commit is contained in:
parent
1ba6b3e714
commit
898d16dd5c
@ -26,6 +26,7 @@ type CommonServerInfo struct {
|
||||
ID uint64 `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Tag string `json:"tag"`
|
||||
LastActive int64 `json:"last_active"`
|
||||
IPV4 string `json:"ipv4"`
|
||||
IPV6 string `json:"ipv6"`
|
||||
ValidIP string `json:"valid_ip"`
|
||||
@ -83,6 +84,7 @@ func (s *ServerAPIService) GetStatusByIDList(idList []uint64) *ServerStatusRespo
|
||||
ID: server.ID,
|
||||
Name: server.Name,
|
||||
Tag: server.Tag,
|
||||
LastActive: server.LastActive.Unix(),
|
||||
IPV4: ipv4,
|
||||
IPV6: ipv6,
|
||||
ValidIP: validIP,
|
||||
@ -122,6 +124,7 @@ func (s *ServerAPIService) GetAllStatus() *ServerStatusResponse {
|
||||
ID: v.ID,
|
||||
Name: v.Name,
|
||||
Tag: v.Tag,
|
||||
LastActive: v.LastActive.Unix(),
|
||||
IPV4: ipv4,
|
||||
IPV6: ipv6,
|
||||
ValidIP: validIP,
|
||||
@ -156,6 +159,7 @@ func (s *ServerAPIService) GetListByTag(tag string) *ServerInfoResponse {
|
||||
ID: v,
|
||||
Name: ServerList[v].Name,
|
||||
Tag: ServerList[v].Tag,
|
||||
LastActive: ServerList[v].LastActive.Unix(),
|
||||
IPV4: ipv4,
|
||||
IPV6: ipv6,
|
||||
ValidIP: validIP,
|
||||
@ -186,6 +190,7 @@ func (s *ServerAPIService) GetAllList() *ServerInfoResponse {
|
||||
ID: v.ID,
|
||||
Name: v.Name,
|
||||
Tag: v.Tag,
|
||||
LastActive: v.LastActive.Unix(),
|
||||
IPV4: ipv4,
|
||||
IPV6: ipv6,
|
||||
ValidIP: validIP,
|
||||
|
Loading…
x
Reference in New Issue
Block a user