diff --git a/cmd/agent/main.go b/cmd/agent/main.go index e383789..d33581e 100644 --- a/cmd/agent/main.go +++ b/cmd/agent/main.go @@ -123,11 +123,13 @@ func reportState() { for { if endReport.After(time.Now()) { monitor.TrackNetworkSpeed() - _, err = client.ReportState(ctx, monitor.GetState(1).PB()) + _, err = client.ReportState(ctx, monitor.GetState(2).PB()) if err != nil { log.Printf("reportState error %v", err) time.Sleep(delayWhenError) } + } else { + time.Sleep(time.Second * 1) } } } diff --git a/resource/static/main.css b/resource/static/main.css index 9332e56..2a1157f 100644 --- a/resource/static/main.css +++ b/resource/static/main.css @@ -52,4 +52,8 @@ .status.cards .description { padding-bottom: 1rem !important; +} + +.status.cards .ui.content.popup { + min-width: 250px; } \ No newline at end of file diff --git a/resource/template/common/footer.html b/resource/template/common/footer.html index e0ecc84..c11e475 100644 --- a/resource/template/common/footer.html +++ b/resource/template/common/footer.html @@ -7,6 +7,7 @@ + diff --git a/resource/template/page/home.html b/resource/template/page/home.html index 1120e8b..ef1e362 100644 --- a/resource/template/page/home.html +++ b/resource/template/page/home.html @@ -4,28 +4,43 @@
- {{range $server := .Servers}} -
+
-
{{if $server.Host.CountryCode}}{{end}}{{$server.Name}} - +
+ + +
CPU
-
+
@@ -33,8 +48,8 @@
内存
-
+
@@ -42,8 +57,8 @@
交换
-
+
@@ -51,14 +66,15 @@
网络
- {{$server.State.NetInSpeed|bf}}/s - {{$server.State.NetOutSpeed|bf}}/s + + /s + + /s
硬盘
-
+
@@ -66,19 +82,33 @@
在线
- {{$server.State.Uptime|sf}} + +
- {{end}}
{{template "common/footer" .}} {{end}} \ No newline at end of file