diff --git a/README.md b/README.md index b14e688..7a6333b 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ # 哪吒面板 -![dashboard](https://img.shields.io/badge/管理面板-v0.3.2-brightgreen) ![agent](https://img.shields.io/badge/Agent-v0.3.1-brightgreen) +![dashboard](https://img.shields.io/badge/管理面板-v0.3.4-brightgreen?style=for-the-badge&logo=github) ![Agent release](https://img.shields.io/github/v/release/naiba/nezha?color=brightgreen&label=Agent&style=for-the-badge&logo=github) 系统状态监控报警、API(SSL证书变更、即将到期、到期)/TCP端口存活/PING 监控、计划任务(可以定时在Agent上执行命令,备份、重启、What ever you want)、极省资源,64M 服务器也能装 agent。 -| 首页截图1 | 首页截图2 | -| ---- | ---- | -| ![首页截图1](https://s3.ax1x.com/2020/12/07/DvTCwD.jpg) | | +| 默认主题 | DayNight [@JackieSung](https://github.com/JackieSung4ev) | hotaru [@CokeMine](https://github.com/CokeMine) | +| ---- | ---- | ---- | +| ![首页截图1](https://s3.ax1x.com/2020/12/07/DvTCwD.jpg) | | | \>> [查看针友列表](https://www.google.com/search?q=%22powered+by+%E5%93%AA%E5%90%92%E9%9D%A2%E6%9D%BF%22&filter=0) (Google) @@ -87,7 +87,7 @@
报警通知:CPU、内存、硬盘、带宽、流量实时监控。 - + #### 灵活通知方式 `#NEZHA#` 是面板消息占位符,面板触发通知时会自动替换占位符到实际消息 @@ -114,7 +114,7 @@ URL 里面也可放置占位符,请求时会进行简单的字符串替换。 - 请求类型: JSON - Body: `{"appToken":"你的appToken","topicIds":[],"content":"#NEZHA#","contentType":"1","uids":["你的uid"]}` - - telegram示例 @haitau 贡献 + - telegram示例 [@haitau](https://github.com/haitau) 贡献 - 备注:telegram机器人消息通知 - URL:https://api.telegram.org/botXXXXXX/sendMessage?chat_id=YYYYYY&text=#NEZHA# - 请求方式: GET diff --git a/resource/template/dashboard/setting.html b/resource/template/dashboard/setting.html index 1c1cb40..5aa6c54 100644 --- a/resource/template/dashboard/setting.html +++ b/resource/template/dashboard/setting.html @@ -17,7 +17,6 @@ -
diff --git a/resource/template/theme-daynight/service.html b/resource/template/theme-daynight/service.html index acf39df..435b3cb 100644 --- a/resource/template/theme-daynight/service.html +++ b/resource/template/theme-daynight/service.html @@ -1,40 +1,41 @@ {{define "theme-daynight/service"}} {{template "common/header" .}} +{{if ts .CustomCode}} +{{.CustomCode|safe}} +{{end}} {{template "common/menu" .}}
-
- {{range $service := .Services}} -
-
-

{{$service.Monitor.Name}}

-

30天在线率{{divU64 $service.TotalDown (addU64 $service.TotalUp $service.TotalDown)}}%

-
-
- {{range $i,$d := $service.Delay}} -
- -
- {{end}} -
-
- - {{if gt (addU64 $service.TotalUp $service.TotalDown) 0}} - {{if gt (divU64 $service.TotalDown (addU64 $service.TotalUp $service.TotalDown)) 30.0}}故障 - {{else if gt (divU64 $service.TotalDown (addU64 $service.TotalUp $service.TotalDown)) 10.0}} - 低可用{{else}}良好{{end}} - {{else}}无数据 - {{end}} -
-
-
- {{end}} +
+ + + + + + + + + + + + {{range $service := .Services}} + + + + + + {{end}} + +
名称30天在线率详情状态
{{$service.Monitor.Name}} + {{float32f (divU64 $service.TotalUp (addU64 $service.TotalUp $service.TotalDown))}}% + {{range $i,$d := $service.Delay}} +
+
{{end}} +
+ + {{statusName (divU64 $service.CurrentUp (addU64 $service.CurrentUp $service.CurrentDown))}} +
diff --git a/service/dao/dao.go b/service/dao/dao.go index 362c858..143e7ed 100644 --- a/service/dao/dao.go +++ b/service/dao/dao.go @@ -34,7 +34,7 @@ var CronLock sync.RWMutex var Crons map[uint64]*model.Cron var Cron *cron.Cron -var Version = "v0.3.3" +var Version = "v0.3.4" func ReSortServer() { ServerLock.RLock()