修复国旗展示

This commit is contained in:
奶爸 2019-12-11 14:10:48 +08:00
parent d862c834de
commit 71efbdfbe9
4 changed files with 8 additions and 10 deletions

2
go.mod
View File

@ -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
)

View File

@ -61,3 +61,7 @@
.status.cards .ui.content.popup {
min-width: 250px;
}
.status.cards .outline.icon {
margin-right: 0 !important;
}

View File

@ -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>

View File

@ -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()