mirror of
https://github.com/nezhahq/nezha.git
synced 2025-01-22 12:48:14 -05:00
🎉 [dashboard v0.3.4] theme: daynight by @JackieSung4ev
This commit is contained in:
parent
03908e7e05
commit
9f98f7a489
12
README.md
12
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) | <img src="https://s3.ax1x.com/2020/12/09/rPF4xJ.png" width="1600px" /> |
|
||||
| 默认主题 | DayNight [@JackieSung](https://github.com/JackieSung4ev) | hotaru [@CokeMine](https://github.com/CokeMine) |
|
||||
| ---- | ---- | ---- |
|
||||
| ![首页截图1](https://s3.ax1x.com/2020/12/07/DvTCwD.jpg) | <img src="https://s3.ax1x.com/2021/01/20/sfJv2q.jpg"/> | <img src="https://s3.ax1x.com/2020/12/09/rPF4xJ.png" width="1600px" /> |
|
||||
|
||||
\>> [查看针友列表](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 @@
|
||||
|
||||
<details>
|
||||
<summary>报警通知:CPU、内存、硬盘、带宽、流量实时监控。</summary>
|
||||
|
||||
|
||||
#### 灵活通知方式
|
||||
|
||||
`#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
|
||||
|
@ -17,7 +17,6 @@
|
||||
<option value="default"{{if eq .Conf.Site.Theme "default"}} selected="selected"{{end}}>默认主题</option>
|
||||
<option value="daynight"{{if eq .Conf.Site.Theme "daynight"}} selected="selected"{{end}}>JackieSung DayNight</option>
|
||||
<option value="hotaru"{{if eq .Conf.Site.Theme "hotaru"}} selected="selected"{{end}}>CokeMine Hotaru</option>
|
||||
<option value="daynight"{{if eq .Conf.Site.Theme "daynight"}} selected="selected"{{end}}>JackieSung DayNight</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="field">
|
||||
|
@ -1,40 +1,41 @@
|
||||
{{define "theme-daynight/service"}}
|
||||
{{template "common/header" .}}
|
||||
{{if ts .CustomCode}}
|
||||
{{.CustomCode|safe}}
|
||||
{{end}}
|
||||
{{template "common/menu" .}}
|
||||
<div class="nb-container">
|
||||
<div class="ui container">
|
||||
<div class="ui segment service-status">
|
||||
{{range $service := .Services}}
|
||||
<div class="ui grid">
|
||||
<div class="three wide column">
|
||||
<p>{{$service.Monitor.Name}}</p>
|
||||
<p>30天在线率{{divU64 $service.TotalDown (addU64 $service.TotalUp $service.TotalDown)}}%</p>
|
||||
</div>
|
||||
<div class="eleven wide column">
|
||||
{{range $i,$d := $service.Delay}}
|
||||
<div class="ui icon button{{if gt (add (index $service.Up $i) (index $service.Down $i)) 0}}
|
||||
{{if gt (div (index $service.Down $i) (add (index $service.Up $i) (index $service.Down $i))) 30.0}}danger
|
||||
{{else if gt (div (index $service.Down $i) (add (index $service.Up $i) (index $service.Down $i))) 10.0}}
|
||||
warning{{else}}good{{end}}
|
||||
{{end}}" data-tooltip="{{dayBefore $i}},平均延迟:{{$d}}ms">
|
||||
<i class="delay"></i>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
<div class="two wide column round{{if gt (addU64 $service.TotalUp $service.TotalDown) 0}}
|
||||
{{if gt (divU64 $service.TotalDown (addU64 $service.TotalUp $service.TotalDown)) 30.0}}danger{{else if gt (divU64 $service.TotalDown (addU64 $service.TotalUp $service.TotalDown)) 10.0}}warning{{else}}good{{end}}
|
||||
{{end}}">
|
||||
<i></i>
|
||||
{{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}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui divider"></div>
|
||||
{{end}}
|
||||
<div class="service-status">
|
||||
|
||||
<table class="ui celled table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="ui center aligned">名称</th>
|
||||
<th class="ui center aligned">30天在线率</th>
|
||||
<th class="ui center aligned">详情</th>
|
||||
<th class="ui center aligned">状态</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{range $service := .Services}}
|
||||
<tr>
|
||||
<td class="ui center aligned">{{$service.Monitor.Name}}</td>
|
||||
<td class="ui center aligned">
|
||||
{{float32f (divU64 $service.TotalUp (addU64 $service.TotalUp $service.TotalDown))}}%
|
||||
</td>
|
||||
<td class="ui center aligned">{{range $i,$d := $service.Delay}}
|
||||
<div class="ui icon button {{className (div (index $service.Up $i) (add (index $service.Up $i) (index $service.Down $i)))}}"
|
||||
data-tooltip="{{dayBefore $i}},在线率:{{float32f (div (index $service.Up $i) (add (index $service.Up $i) (index $service.Down $i)))}}%,平均延迟:{{float32f $d}}ms">
|
||||
</div> {{end}}
|
||||
</td>
|
||||
<td class="ui center aligned delay-today">
|
||||
<i class="delay-today {{className (divU64 $service.CurrentUp (addU64 $service.CurrentUp $service.CurrentDown))}}"></i>
|
||||
{{statusName (divU64 $service.CurrentUp (addU64 $service.CurrentUp $service.CurrentDown))}}
|
||||
</td>
|
||||
</tr> {{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user