mirror of
https://github.com/nezhahq/nezha.git
synced 2025-01-22 12:48:14 -05:00
修复国旗展示
This commit is contained in:
parent
d862c834de
commit
71efbdfbe9
2
go.mod
2
go.mod
@ -22,7 +22,5 @@ require (
|
||||
github.com/spf13/viper v1.6.1
|
||||
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45
|
||||
golang.org/x/sys v0.0.0-20191128015809-6d18c012aee9 // indirect
|
||||
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135 // indirect
|
||||
google.golang.org/grpc v1.25.1
|
||||
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc // indirect
|
||||
)
|
||||
|
@ -60,4 +60,8 @@
|
||||
|
||||
.status.cards .ui.content.popup {
|
||||
min-width: 250px;
|
||||
}
|
||||
|
||||
.status.cards .outline.icon {
|
||||
margin-right: 0 !important;
|
||||
}
|
@ -20,8 +20,7 @@
|
||||
内存:@#formatByteSize(server.State.MemUsed)#@/@#formatByteSize(server.State.MemTotal)#@<br>
|
||||
交换:@#formatByteSize(server.State.SwapUsed)#@/@#formatByteSize(server.State.SwapTotal)#@<br>
|
||||
流量:<i
|
||||
class='arrow alternate circle down outline icon'></i>@#formatByteSize(server.State.NetInTransfer)#@
|
||||
<i
|
||||
class='arrow alternate circle down outline icon'></i>@#formatByteSize(server.State.NetInTransfer)#@<i
|
||||
class='arrow alternate circle up outline icon'></i>@#formatByteSize(server.State.NetOutTransfer)#@<br>
|
||||
启动:@# formatTimestamp(server.Host.BootTime) #@<br>
|
||||
版本:@#'v'+server.Host.Version#@<br>
|
||||
|
@ -19,8 +19,8 @@ import (
|
||||
)
|
||||
|
||||
type ipDotSbGeoIP struct {
|
||||
CountryCode string
|
||||
IP string
|
||||
CountryCode string `json:"country_code,omitempty"`
|
||||
IP string `json:"ip,omitempty"`
|
||||
}
|
||||
|
||||
var netInSpeed, netOutSpeed, netInTransfer, netOutTransfer, lastUpdate uint64
|
||||
@ -33,10 +33,7 @@ func GetHost() *model.Host {
|
||||
for i := 0; i < len(ci); i++ {
|
||||
cpus = append(cpus, fmt.Sprintf("%v-%vC%vT", ci[i].ModelName, ci[i].Cores, ci[i].Stepping))
|
||||
}
|
||||
ip := ipDotSbGeoIP{
|
||||
IP: "127.0.0.1",
|
||||
CountryCode: "cn",
|
||||
}
|
||||
var ip ipDotSbGeoIP
|
||||
resp, err := http.Get("https://api.ip.sb/geoip")
|
||||
if err == nil {
|
||||
defer resp.Body.Close()
|
||||
|
Loading…
Reference in New Issue
Block a user