修复国旗展示
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
|
github.com/spf13/viper v1.6.1
|
||||||
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45
|
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45
|
||||||
golang.org/x/sys v0.0.0-20191128015809-6d18c012aee9 // indirect
|
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
|
google.golang.org/grpc v1.25.1
|
||||||
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc // indirect
|
|
||||||
)
|
)
|
||||||
|
@ -61,3 +61,7 @@
|
|||||||
.status.cards .ui.content.popup {
|
.status.cards .ui.content.popup {
|
||||||
min-width: 250px;
|
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.MemUsed)#@/@#formatByteSize(server.State.MemTotal)#@<br>
|
||||||
交换:@#formatByteSize(server.State.SwapUsed)#@/@#formatByteSize(server.State.SwapTotal)#@<br>
|
交换:@#formatByteSize(server.State.SwapUsed)#@/@#formatByteSize(server.State.SwapTotal)#@<br>
|
||||||
流量:<i
|
流量:<i
|
||||||
class='arrow alternate circle down outline icon'></i>@#formatByteSize(server.State.NetInTransfer)#@
|
class='arrow alternate circle down outline icon'></i>@#formatByteSize(server.State.NetInTransfer)#@<i
|
||||||
<i
|
|
||||||
class='arrow alternate circle up outline icon'></i>@#formatByteSize(server.State.NetOutTransfer)#@<br>
|
class='arrow alternate circle up outline icon'></i>@#formatByteSize(server.State.NetOutTransfer)#@<br>
|
||||||
启动:@# formatTimestamp(server.Host.BootTime) #@<br>
|
启动:@# formatTimestamp(server.Host.BootTime) #@<br>
|
||||||
版本:@#'v'+server.Host.Version#@<br>
|
版本:@#'v'+server.Host.Version#@<br>
|
||||||
|
@ -19,8 +19,8 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type ipDotSbGeoIP struct {
|
type ipDotSbGeoIP struct {
|
||||||
CountryCode string
|
CountryCode string `json:"country_code,omitempty"`
|
||||||
IP string
|
IP string `json:"ip,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
var netInSpeed, netOutSpeed, netInTransfer, netOutTransfer, lastUpdate uint64
|
var netInSpeed, netOutSpeed, netInTransfer, netOutTransfer, lastUpdate uint64
|
||||||
@ -33,10 +33,7 @@ func GetHost() *model.Host {
|
|||||||
for i := 0; i < len(ci); i++ {
|
for i := 0; i < len(ci); i++ {
|
||||||
cpus = append(cpus, fmt.Sprintf("%v-%vC%vT", ci[i].ModelName, ci[i].Cores, ci[i].Stepping))
|
cpus = append(cpus, fmt.Sprintf("%v-%vC%vT", ci[i].ModelName, ci[i].Cores, ci[i].Stepping))
|
||||||
}
|
}
|
||||||
ip := ipDotSbGeoIP{
|
var ip ipDotSbGeoIP
|
||||||
IP: "127.0.0.1",
|
|
||||||
CountryCode: "cn",
|
|
||||||
}
|
|
||||||
resp, err := http.Get("https://api.ip.sb/geoip")
|
resp, err := http.Get("https://api.ip.sb/geoip")
|
||||||
if err == nil {
|
if err == nil {
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
|
Loading…
Reference in New Issue
Block a user