diff --git a/go.mod b/go.mod
index a3855a4..912e532 100644
--- a/go.mod
+++ b/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
)
diff --git a/resource/static/main.css b/resource/static/main.css
index e8bc7b0..b523ba4 100644
--- a/resource/static/main.css
+++ b/resource/static/main.css
@@ -60,4 +60,8 @@
.status.cards .ui.content.popup {
min-width: 250px;
+}
+
+.status.cards .outline.icon {
+ margin-right: 0 !important;
}
\ No newline at end of file
diff --git a/resource/template/page/home.html b/resource/template/page/home.html
index 6405e60..635d6c8 100644
--- a/resource/template/page/home.html
+++ b/resource/template/page/home.html
@@ -20,8 +20,7 @@
内存:@#formatByteSize(server.State.MemUsed)#@/@#formatByteSize(server.State.MemTotal)#@
交换:@#formatByteSize(server.State.SwapUsed)#@/@#formatByteSize(server.State.SwapTotal)#@
流量:@#formatByteSize(server.State.NetInTransfer)#@
- @#formatByteSize(server.State.NetInTransfer)#@@#formatByteSize(server.State.NetOutTransfer)#@
启动:@# formatTimestamp(server.Host.BootTime) #@
版本:@#'v'+server.Host.Version#@
diff --git a/service/monitor/monitor.go b/service/monitor/monitor.go
index a8b46b5..24b4238 100644
--- a/service/monitor/monitor.go
+++ b/service/monitor/monitor.go
@@ -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()