diff --git a/README.md b/README.md
index 06651cf..5c9bc75 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
diff --git a/cmd/dashboard/controller/controller.go b/cmd/dashboard/controller/controller.go
index 484dc07..282d6f8 100644
--- a/cmd/dashboard/controller/controller.go
+++ b/cmd/dashboard/controller/controller.go
@@ -54,7 +54,7 @@ func ServeWeb(port uint) {
}
if a == 0 {
// 这是从未在线的情况
- return 1 / float32(b) * 100
+ return 0.00001 / float32(b) * 100
}
return float32(a) / float32(b) * 100
},
@@ -67,7 +67,7 @@ func ServeWeb(port uint) {
}
if a == 0 {
// 这是从未在线的情况
- return 1 / float32(b) * 100
+ return 0.00001 / float32(b) * 100
}
return float32(a) / float32(b) * 100
},
diff --git a/cmd/dashboard/main.go b/cmd/dashboard/main.go
index df70e3b..a2c4fa8 100644
--- a/cmd/dashboard/main.go
+++ b/cmd/dashboard/main.go
@@ -110,6 +110,6 @@ func loadCrons() {
func main() {
go controller.ServeWeb(dao.Conf.HTTPPort)
go rpc.ServeRPC(dao.Conf.GRPCPort)
- go rpc.DispatchTask(time.Minute * 3)
+ go rpc.DispatchTask(time.Second * 30)
dao.AlertSentinelStart()
}
diff --git a/cmd/playground/main.go b/cmd/playground/main.go
index cecfcdb..81c80d4 100644
--- a/cmd/playground/main.go
+++ b/cmd/playground/main.go
@@ -10,6 +10,7 @@ import (
"os/exec"
"time"
+ "github.com/genkiroid/cert"
"github.com/go-ping/ping"
"github.com/naiba/nezha/pkg/utils"
"github.com/shirou/gopsutil/v3/cpu"
@@ -20,8 +21,8 @@ import (
func main() {
// icmp()
// tcpping()
- // httpWithSSLInfo()
- sysinfo()
+ httpWithSSLInfo()
+ // sysinfo()
// cmdExec()
}
@@ -72,11 +73,12 @@ func httpWithSSLInfo() {
httpClient := &http.Client{Transport: transCfg, CheckRedirect: func(req *http.Request, via []*http.Request) error {
return http.ErrUseLastResponse
}}
- resp, err := httpClient.Get("http://mail.nai.ba")
- fmt.Println(err, resp.StatusCode)
+ url := "https://ops.naibahq.com"
+ resp, err := httpClient.Get(url)
+ fmt.Println(err, resp)
// SSL 证书信息获取
- // c := cert.NewCert("expired-ecc-dv.ssl.com")
- // fmt.Println(c.Error)
+ c := cert.NewCert(url[8:])
+ fmt.Println(c.Error)
}
func icmp() {
diff --git a/resource/static/main.css b/resource/static/main.css
index 2c0aff9..7513463 100644
--- a/resource/static/main.css
+++ b/resource/static/main.css
@@ -6,7 +6,7 @@
.nb-container {
padding-top: 75px;
- min-height: 100%;
+ min-height: 100vh;
padding-bottom: 55px;
margin-bottom: -47px;
}
diff --git a/resource/template/common/header.html b/resource/template/common/header.html
index 2f4d903..3e9e04c 100644
--- a/resource/template/common/header.html
+++ b/resource/template/common/header.html
@@ -9,7 +9,7 @@
{{.Title}}
-
+
diff --git a/resource/template/common/menu.html b/resource/template/common/menu.html
index e315049..fa373a1 100644
--- a/resource/template/common/menu.html
+++ b/resource/template/common/menu.html
@@ -14,7 +14,7 @@
{{else}}
首页
- 服务状态
+ 服务
{{end}}