Merge pull request #88 from JackieSung4ev/daynight
Add password page and UI design update Co-authored-by: JackieSung4ev <24974735+JackieSung4ev@users.noreply.github.com>
This commit is contained in:
commit
e7444aabfb
220
README.md
220
README.md
@ -1,34 +1,34 @@
|
|||||||
# 哪吒面板
|
# 哪吒面板
|
||||||
|
|
||||||
    
|
    
|
||||||
|
|
||||||
系统状态监控报警、API(SSL证书变更、即将到期、到期)/TCP端口存活/PING 监控、计划任务(可以定时在Agent上执行命令,备份、重启、What ever you want)、极省资源,64M 服务器也能装 agent。
|
系统状态监控报警、API(SSL 证书变更、即将到期、到期)/TCP 端口存活/PING 监控、计划任务(可以定时在 Agent 上执行命令,备份、重启、What ever you want)、极省资源,64M 服务器也能装 agent。
|
||||||
|
|
||||||
\>> [查看针友列表](https://www.google.com/search?q=%22powered+by+%E5%93%AA%E5%90%92%E9%9D%A2%E6%9D%BF%22&filter=0) (Google)
|
\>> [查看针友列表](https://www.google.com/search?q=%22powered+by+%E5%93%AA%E5%90%92%E9%9D%A2%E6%9D%BF%22&filter=0) (Google)
|
||||||
|
|
||||||
\>> QQ交流群:955957790
|
\>> QQ 交流群:955957790
|
||||||
|
|
||||||
| 默认主题 | DayNight [@JackieSung](https://github.com/JackieSung4ev) | hotaru [@CokeMine](https://github.com/CokeMine) |
|
| 默认主题 | DayNight [@JackieSung](https://github.com/JackieSung4ev) | hotaru [@CokeMine](https://github.com/CokeMine) |
|
||||||
| ---- | ---- | ---- |
|
| ------------------------------------------------------- | -------------------------------------------------------- | ---------------------------------------------------------------------- |
|
||||||
|  | <img src="https://s3.ax1x.com/2021/01/20/sfJv2q.jpg"/> | <img src="https://s3.ax1x.com/2020/12/09/rPF4xJ.png" width="1600px" /> |
|
|  | <img src="https://s3.ax1x.com/2021/01/20/sfJv2q.jpg"/> | <img src="https://s3.ax1x.com/2020/12/09/rPF4xJ.png" width="1600px" /> |
|
||||||
|
|
||||||
## 一键脚本
|
## 一键脚本
|
||||||
|
|
||||||
建议使用 WatchTower 自动更新面板,Windows终端可以使用 nssm 配置自启动(见尾部教程)
|
建议使用 WatchTower 自动更新面板,Windows 终端可以使用 nssm 配置自启动(见尾部教程)
|
||||||
|
|
||||||
- 海外:
|
- 海外:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
curl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install.sh -o nezha.sh && chmod +x nezha.sh
|
curl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install.sh -o nezha.sh && chmod +x nezha.sh
|
||||||
./nezha.sh
|
./nezha.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
- 国内加速:(有缓存可能不是最新的,非作者维护)
|
- 国内加速:(有缓存可能不是最新的,非作者维护)
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
curl -L https://raw.sevencdn.com/naiba/nezha/master/script/install.sh -o nezha.sh && chmod +x nezha.sh
|
curl -L https://raw.sevencdn.com/naiba/nezha/master/script/install.sh -o nezha.sh && chmod +x nezha.sh
|
||||||
CN=true ./nezha.sh
|
CN=true ./nezha.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
## 功能说明
|
## 功能说明
|
||||||
|
|
||||||
@ -37,54 +37,57 @@
|
|||||||
|
|
||||||
- 默认主题更改进度条颜色示例
|
- 默认主题更改进度条颜色示例
|
||||||
|
|
||||||
```
|
```
|
||||||
<style>
|
<style>
|
||||||
.ui.fine.progress> .bar {
|
.ui.fine.progress> .bar {
|
||||||
background-color: pink !important;
|
background-color: pink !important;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
```
|
```
|
||||||
- 默认主题修改LOGO、移除版权示例(来自 [@iLay1678](https://github.com/iLay1678),欢迎PR)
|
|
||||||
|
|
||||||
```
|
- 默认主题修改 LOGO、移除版权示例(来自 [@iLay1678](https://github.com/iLay1678),欢迎 PR)
|
||||||
<style>
|
|
||||||
.right.menu>a{
|
```
|
||||||
visibility: hidden;
|
<style>
|
||||||
}
|
.right.menu>a{
|
||||||
.footer .is-size-7{
|
visibility: hidden;
|
||||||
visibility: hidden;
|
}
|
||||||
}
|
.footer .is-size-7{
|
||||||
.item img{
|
visibility: hidden;
|
||||||
visibility: hidden;
|
}
|
||||||
}
|
.item img{
|
||||||
</style>
|
visibility: hidden;
|
||||||
<script>
|
}
|
||||||
window.onload = function(){
|
</style>
|
||||||
var avatar=document.querySelector(".item img")
|
<script>
|
||||||
var footer=document.querySelector("div.is-size-7")
|
window.onload = function(){
|
||||||
footer.innerHTML="Powered by 你的名字"
|
var avatar=document.querySelector(".item img")
|
||||||
footer.style.visibility="visible"
|
var footer=document.querySelector("div.is-size-7")
|
||||||
avatar.src="你的方形logo地址"
|
footer.innerHTML="Powered by 你的名字"
|
||||||
avatar.style.visibility="visible"
|
footer.style.visibility="visible"
|
||||||
}
|
avatar.src="你的方形logo地址"
|
||||||
</script>
|
avatar.style.visibility="visible"
|
||||||
```
|
}
|
||||||
|
</script>
|
||||||
|
```
|
||||||
|
|
||||||
- hotaru 主题更改背景图片示例
|
- hotaru 主题更改背景图片示例
|
||||||
|
|
||||||
```
|
```
|
||||||
<style>
|
<style>
|
||||||
.hotaru-cover {
|
.hotaru-cover {
|
||||||
background: url(https://s3.ax1x.com/2020/12/08/DzHv6A.jpg) center;
|
background: url(https://s3.ax1x.com/2020/12/08/DzHv6A.jpg) center;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
```
|
```
|
||||||
</details>
|
|
||||||
|
</details>
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary>计划任务:备份脚本、服务重启,等定期运维任务。</summary>
|
<summary>计划任务:备份脚本、服务重启,等定期运维任务。</summary>
|
||||||
|
|
||||||
使用此功能可以定期结合 restic、rclone 给服务器备份,或者定期某项重启服务来重置网络连接。
|
使用此功能可以定期结合 restic、rclone 给服务器备份,或者定期某项重启服务来重置网络连接。
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
@ -94,7 +97,7 @@
|
|||||||
|
|
||||||
`#NEZHA#` 是面板消息占位符,面板触发通知时会自动替换占位符到实际消息
|
`#NEZHA#` 是面板消息占位符,面板触发通知时会自动替换占位符到实际消息
|
||||||
|
|
||||||
Body 内容是`JSON` 格式的:**当请求类型为FORM时**,值为 `key:value` 的形式,`value` 里面可放置占位符,通知时会自动替换。**当请求类型为JSON时** 只会简进行字符串替换后直接提交到`URL`。
|
Body 内容是`JSON` 格式的:**当请求类型为 FORM 时**,值为 `key:value` 的形式,`value` 里面可放置占位符,通知时会自动替换。**当请求类型为 JSON 时** 只会简进行字符串替换后直接提交到`URL`。
|
||||||
|
|
||||||
URL 里面也可放置占位符,请求时会进行简单的字符串替换。
|
URL 里面也可放置占位符,请求时会进行简单的字符串替换。
|
||||||
|
|
||||||
@ -102,54 +105,55 @@ URL 里面也可放置占位符,请求时会进行简单的字符串替换。
|
|||||||
|
|
||||||
1. 添加通知方式
|
1. 添加通知方式
|
||||||
|
|
||||||
- server酱示例
|
- server 酱示例
|
||||||
- 名称:server酱
|
- 名称:server 酱
|
||||||
- URL:https://sc.ftqq.com/SCUrandomkeys.send?text=#NEZHA#
|
- URL:https://sc.ftqq.com/SCUrandomkeys.send?text=#NEZHA#
|
||||||
- 请求方式: GET
|
- 请求方式: GET
|
||||||
- 请求类型: 默认
|
- 请求类型: 默认
|
||||||
- Body: 空
|
- Body: 空
|
||||||
|
- wxpusher 示例,需要关注你的应用
|
||||||
- wxpusher示例,需要关注你的应用
|
|
||||||
- 名称: wxpusher
|
|
||||||
- URL:http://wxpusher.zjiecode.com/api/send/message
|
|
||||||
- 请求方式: POST
|
|
||||||
- 请求类型: JSON
|
|
||||||
- Body: `{"appToken":"你的appToken","topicIds":[],"content":"#NEZHA#","contentType":"1","uids":["你的uid"]}`
|
|
||||||
|
|
||||||
- telegram示例 [@haitau](https://github.com/haitau) 贡献
|
- 名称: wxpusher
|
||||||
- 名称:telegram机器人消息通知
|
- URL:http://wxpusher.zjiecode.com/api/send/message
|
||||||
- URL:https://api.telegram.org/botXXXXXX/sendMessage?chat_id=YYYYYY&text=#NEZHA#
|
- 请求方式: POST
|
||||||
- 请求方式: GET
|
- 请求类型: JSON
|
||||||
- 请求类型: 默认
|
- Body: `{"appToken":"你的appToken","topicIds":[],"content":"#NEZHA#","contentType":"1","uids":["你的uid"]}`
|
||||||
- Body: 空
|
|
||||||
- URL参数获取说明:botXXXXXX 中的 XXXXXX 是在 telegram中关注官方 @Botfather ,输入/newbot ,创建新的机器人(bot)时,会提供的 token(在提示Use this token to access the HTTP API:后面一行)这里 'bot' 三个字母不可少。创建 bot 后,需要先在 telegram中与BOT进行对话(随便发个消息),然后才可用 API发送消息。YYYYYY 是 telegram 用户的数字 ID。与机器人@userinfobot 对话可获得。
|
- telegram 示例 [@haitau](https://github.com/haitau) 贡献
|
||||||
|
- 名称:telegram 机器人消息通知
|
||||||
|
- URL:https://api.telegram.org/botXXXXXX/sendMessage?chat_id=YYYYYY&text=#NEZHA#
|
||||||
|
- 请求方式: GET
|
||||||
|
- 请求类型: 默认
|
||||||
|
- Body: 空
|
||||||
|
- URL 参数获取说明:botXXXXXX 中的 XXXXXX 是在 telegram 中关注官方 @Botfather ,输入/newbot ,创建新的机器人(bot)时,会提供的 token(在提示 Use this token to access the HTTP API:后面一行)这里 'bot' 三个字母不可少。创建 bot 后,需要先在 telegram 中与 BOT 进行对话(随便发个消息),然后才可用 API 发送消息。YYYYYY 是 telegram 用户的数字 ID。与机器人@userinfobot 对话可获得。
|
||||||
|
|
||||||
2. 添加一个离线报警
|
2. 添加一个离线报警
|
||||||
|
|
||||||
- 名称:离线通知
|
- 名称:离线通知
|
||||||
- 规则:`[{"Type":"offline","Min":0,"Max":0,"Duration":10}]`
|
- 规则:`[{"Type":"offline","Min":0,"Max":0,"Duration":10}]`
|
||||||
- 启用:√
|
- 启用:√
|
||||||
|
|
||||||
3. 添加一个监控 CPU 持续 10s 超过 50% **且** 内存持续 20s 占用低于 20% 的报警
|
3. 添加一个监控 CPU 持续 10s 超过 50% **且** 内存持续 20s 占用低于 20% 的报警
|
||||||
|
|
||||||
- 名称:CPU+内存
|
- 名称:CPU+内存
|
||||||
- 规则:`[{"Type":"cpu","Min":0,"Max":50,"Duration":10},{"Type":"memory","Min":20,"Max":0,"Duration":20}]`
|
- 规则:`[{"Type":"cpu","Min":0,"Max":50,"Duration":10},{"Type":"memory","Min":20,"Max":0,"Duration":20}]`
|
||||||
- 启用:√
|
- 启用:√
|
||||||
|
|
||||||
#### 报警规则说明
|
#### 报警规则说明
|
||||||
|
|
||||||
- Type
|
- Type
|
||||||
- cpu、memory、swap、disk:Min/Max 数值为占用百分比
|
- cpu、memory、swap、disk:Min/Max 数值为占用百分比
|
||||||
- net_in_speed(入站网速)、net_out_speed(出站网速)、net_all_speed(双向网速)、transfer_in(入站流量)、transfer_out(出站流量)、transfer_all(双向流量):Min/Max 数值为字节(1kb=1024,1mb = 1024*1024)
|
- net_in_speed(入站网速)、net_out_speed(出站网速)、net_all_speed(双向网速)、transfer_in(入站流量)、transfer_out(出站流量)、transfer_all(双向流量):Min/Max 数值为字节(1kb=1024,1mb = 1024\*1024)
|
||||||
- offline:不支持 Min/Max 参数
|
- offline:不支持 Min/Max 参数
|
||||||
- Duration:持续秒数,监控比较简陋,取持续时间内的 70 采样结果
|
- Duration:持续秒数,监控比较简陋,取持续时间内的 70 采样结果
|
||||||
- Ignore: `{"1": true, "2":false}` 忽略此规则的服务器ID列表
|
- Ignore: `{"1": true, "2":false}` 忽略此规则的服务器 ID 列表
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary>服务监控:HTTP、SSL证书、ping、TCP 端口等。</summary>
|
<summary>服务监控:HTTP、SSL证书、ping、TCP 端口等。</summary>
|
||||||
|
|
||||||
进入 `/monitor` 页面点击新建监控即可,表单下面有相关说明。
|
进入 `/monitor` 页面点击新建监控即可,表单下面有相关说明。
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
## 常见问题
|
## 常见问题
|
||||||
@ -158,6 +162,7 @@ URL 里面也可放置占位符,请求时会进行简单的字符串替换。
|
|||||||
<summary>如何进行数据迁移、备份恢复?</summary>
|
<summary>如何进行数据迁移、备份恢复?</summary>
|
||||||
|
|
||||||
数据储存在 `/opt/nezha` 文件夹中,迁移数据时打包这个文件夹,到新环境解压。然后执行一键脚本安装即可
|
数据储存在 `/opt/nezha` 文件夹中,迁移数据时打包这个文件夹,到新环境解压。然后执行一键脚本安装即可
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
@ -190,12 +195,14 @@ restart() {
|
|||||||
```
|
```
|
||||||
|
|
||||||
赋予执行权限 `chmod +x /etc/init.d/nezha-agnt` 然后启动服务 `/etc/init.d/nezha-agent enable && /etc/init.d/nezha-agent start`
|
赋予执行权限 `chmod +x /etc/init.d/nezha-agnt` 然后启动服务 `/etc/init.d/nezha-agent enable && /etc/init.d/nezha-agent start`
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary>首页服务器随机闪烁掉线?</summary>
|
<summary>首页服务器随机闪烁掉线?</summary>
|
||||||
|
|
||||||
执行 `ntpdate 0.pool.ntp.org` 同步一下面板部署所在的服务器的时间,ref: [How do I use pool.ntp.org?](https://www.ntppool.org/en/use.html)
|
执行 `ntpdate 0.pool.ntp.org` 同步一下面板部署所在的服务器的时间,ref: [How do I use pool.ntp.org?](https://www.ntppool.org/en/use.html)
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
@ -203,43 +210,44 @@ restart() {
|
|||||||
|
|
||||||
### 启用 HTTPS
|
### 启用 HTTPS
|
||||||
|
|
||||||
使用宝塔反代或者上CDN,建议 Agent配置 跟 访问管理面板 使用不同的域名,这样管理面板使用的域名可以直接套CDN,Agent配置的域名是解析管理面板IP使用的,也方便后面管理面板迁移(如果你使用IP,后面IP更换了,需要修改每个agent,就麻烦了)
|
使用宝塔反代或者上 CDN,建议 Agent 配置 跟 访问管理面板 使用不同的域名,这样管理面板使用的域名可以直接套 CDN,Agent 配置的域名是解析管理面板 IP 使用的,也方便后面管理面板迁移(如果你使用 IP,后面 IP 更换了,需要修改每个 agent,就麻烦了)
|
||||||
|
|
||||||
### 实时通道断开(WebSocket反代)
|
### 实时通道断开(WebSocket 反代)
|
||||||
|
|
||||||
使用反向代理时需要针对 `/ws` 路径的 WebSocket 进行特别配置以支持实时更新服务器状态。
|
使用反向代理时需要针对 `/ws` 路径的 WebSocket 进行特别配置以支持实时更新服务器状态。
|
||||||
|
|
||||||
- Nginx(宝塔):在你的 nginx 配置文件中加入以下代码
|
- Nginx(宝塔):在你的 nginx 配置文件中加入以下代码
|
||||||
|
|
||||||
```nginx
|
```nginx
|
||||||
server{
|
server{
|
||||||
|
|
||||||
#server_name blablabla...
|
#server_name blablabla...
|
||||||
|
|
||||||
location /ws {
|
location /ws {
|
||||||
proxy_pass http://ip:站点访问端口;
|
proxy_pass http://ip:站点访问端口;
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
proxy_set_header Connection "Upgrade";
|
proxy_set_header Connection "Upgrade";
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
}
|
}
|
||||||
|
|
||||||
#其他的 location blablabla...
|
#其他的 location blablabla...
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
- CaddyServer v1(v2无需特别配置)
|
- CaddyServer v1(v2 无需特别配置)
|
||||||
|
|
||||||
```Caddyfile
|
```Caddyfile
|
||||||
proxy /ws http://ip:8008 {
|
proxy /ws http://ip:8008 {
|
||||||
websocket
|
websocket
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
</details>
|
|
||||||
|
</details>
|
||||||
|
|
||||||
## 社区文章
|
## 社区文章
|
||||||
|
|
||||||
- [哪吒探针 - Windows 客户端安装](https://nyko.me/2020/12/13/nezha-windows-client.html)
|
- [哪吒探针 - Windows 客户端安装](https://nyko.me/2020/12/13/nezha-windows-client.html)
|
||||||
- [哪吒面板,一个便携服务器状态监控面板搭建教程,不想拥有一个自己的探针吗?](https://haoduck.com/644.html)
|
- [哪吒面板,一个便携服务器状态监控面板搭建教程,不想拥有一个自己的探针吗?](https://haoduck.com/644.html)
|
||||||
- [哪吒面板:小鸡们的最佳探针](https://www.zhujizixun.com/2843.html) *(已过时)*
|
- [哪吒面板:小鸡们的最佳探针](https://www.zhujizixun.com/2843.html) _(已过时)_
|
||||||
- [>>更多教程](https://www.google.com/search?q=%22%E5%93%AA%E5%90%92%E9%9D%A2%E6%9D%BF%22+%22%E6%95%99%E7%A8%8B%22) (Google)
|
- [>>更多教程](https://www.google.com/search?q=%22%E5%93%AA%E5%90%92%E9%9D%A2%E6%9D%BF%22+%22%E6%95%99%E7%A8%8B%22) (Google)
|
||||||
|
2
resource/static/theme-daynight/css/main.css
vendored
2
resource/static/theme-daynight/css/main.css
vendored
File diff suppressed because one or more lines are too long
1
resource/static/theme-daynight/css/passwd.css
vendored
Normal file
1
resource/static/theme-daynight/css/passwd.css
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
footer{background-color:#2f2f2f;color:#f2f2f2;font-size:14px}footer .footer-container{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;text-align:center;padding:1rem}footer .footer-container p{width:100%;margin-top:1rem}footer .footer-container a{color:#f2f2f2}footer .footer-container div{width:100%}*,*::before,*::after{-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;text-decoration:none}body{font-family:Microsoft Yahei, Avenir, Segoe UI, Hiragino Sans GB, STHeiti, Microsoft Sans Serif, WenQuanYi Micro Hei, sans-serif;overflow-x:hidden;min-height:100vh;display:-ms-grid;display:grid;-ms-grid-rows:1fr auto;grid-template-rows:1fr auto;background-color:#334561;color:#e1e1e1}article{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.passwd-container{display:-ms-grid;display:grid;min-height:320px;background-color:#e5e5e5;color:#121212;border-radius:5px;padding:1em 1.2em;-webkit-box-shadow:0 2px 5px rgba(0,0,0,0.3);box-shadow:0 2px 5px rgba(0,0,0,0.3);width:100%;max-width:400px;width:calc(100% - 2em);margin:0 auto}.passwd-container input[type='password']{border:1px solid #a6a6a6;border-radius:4px;font-size:1em;padding-left:2em;min-width:100px}.passwd-container input[type='password']::-webkit-input-placeholder{text-align:right;padding-right:1em}.passwd-container input[type='password']:-ms-input-placeholder{text-align:right;padding-right:1em}.passwd-container input[type='password']::-ms-input-placeholder{text-align:right;padding-right:1em}.passwd-container input[type='password']::placeholder{text-align:right;padding-right:1em}.passwd-container button{margin-top:1em;border:none;background:none;border:1px solid #a6a6a6;border-radius:4px;background-color:#1670c5;color:#f2f2f2;font-size:1em;font-weight:bold;letter-spacing:1px;cursor:pointer}.passwd-container button:hover{background-color:#1e85e6}.passwd-container .passwd-img{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}h2{font-size:2em;text-align:center;color:#3c3c3c}h4{text-align:left;font-size:1em;font-weight:normal;letter-spacing:1px;height:1.5em}form{display:-ms-grid;display:grid;position:relative}img{display:block;max-width:100%;width:50px}svg{height:1em;width:1.34em;position:absolute;top:44px;left:10px}svg g{fill:#494949}
|
File diff suppressed because one or more lines are too long
2
resource/static/theme-daynight/js/main.js
vendored
2
resource/static/theme-daynight/js/main.js
vendored
@ -1 +1 @@
|
|||||||
function callAllJsFiles(t){var e=document.createElement("script");e.setAttribute("type","text/javascript"),e.setAttribute("src",t),document.getElementsByTagName("head")[0].appendChild(e)}callAllJsFiles("/static/theme-daynight/js/mode.js?v202101301768"),callAllJsFiles("/static/theme-daynight/js/navtop.js?v202101301768");
|
function callAllJsFiles(t){var e=document.createElement("script");e.setAttribute("type","text/javascript"),e.setAttribute("src",t),document.getElementsByTagName("head")[0].appendChild(e)}callAllJsFiles("/static/theme-daynight/js/mode.js?v202102012266"),callAllJsFiles("/static/theme-daynight/js/navtop.js?v202102012266");
|
2
resource/static/theme-daynight/js/navtop.js
vendored
2
resource/static/theme-daynight/js/navtop.js
vendored
@ -1 +1 @@
|
|||||||
$(document).ready((function(){$(".hamburger").click((function(){$(this).toggleClass("is-active"),$(".nav-menu ul").slideToggle("500","linear")}))}));var btn=$("#back-to-top");$(window).scroll((function(){$(window).scrollTop()>300?btn.addClass("show"):btn.removeClass("show")})),$(document).ready((function(){btn.on("click",(function(o){o.preventDefault(),$(".service-mobile-toggle").hasClass("smt-active")&&($(".service-mobile-toggle ").removeClass("smt-active"),$("html, body").animate({scrollTop:0},"300")),$("html, body").animate({scrollTop:0},"300")}))}));
|
$(document).ready((function(){$(".hamburger").click((function(){$(this).toggleClass("is-active"),$(".nav-menu ul").slideToggle("fast","swing")}))}));var btn=$("#back-to-top");$(window).scroll((function(){$(window).scrollTop()>300?btn.addClass("show"):btn.removeClass("show")})),$(document).ready((function(){btn.on("click",(function(o){o.preventDefault(),$(".service-mobile-toggle").hasClass("smt-active")&&($(".service-mobile-toggle ").removeClass("smt-active"),$("html, body").animate({scrollTop:0},"300")),$("html, body").animate({scrollTop:0},"300")}))}));
|
2
resource/static/theme-daynight/js/service.js
vendored
2
resource/static/theme-daynight/js/service.js
vendored
@ -1 +1 @@
|
|||||||
function callAllJsFiles(e){var t=document.createElement("script");t.setAttribute("type","text/javascript"),t.setAttribute("src",e),document.getElementsByTagName("head")[0].appendChild(t)}callAllJsFiles("/static/theme-daynight/js/navtop.js?v202101301768"),callAllJsFiles("/static/theme-daynight/js/mode.js?v202101301768"),callAllJsFiles("/static/theme-daynight/js/tooltip.js?v202101301768"),$(".corner").hover((function(){$(this).attr("aria-expanded","true"===$(this).attr("aria-expanded")?"false":"true")}));const hour=new Date(Date.now()).getHours();(hour>17||hour<4)&&(document.querySelector("input[name=service-theme]").checked=!0,document.getElementsByTagName("BODY")[0].setAttribute("data-theme","dark")),$(document).ready((function(){$(".service-mobile-toggle ul li:first-of-type").click((function(){$(".service-mobile-toggle").toggleClass("smt-active")}))})),$(document).on("click",(function(e){0==$(e.target).closest(".service-mobile-toggle").length&&$(".service-mobile-toggle").hasClass("smt-active")&&$(".service-mobile-toggle").toggleClass("smt-active")}));
|
function callAllJsFiles(e){var t=document.createElement("script");t.setAttribute("type","text/javascript"),t.setAttribute("src",e),document.getElementsByTagName("head")[0].appendChild(t)}callAllJsFiles("/static/theme-daynight/js/navtop.js?v202102012266"),callAllJsFiles("/static/theme-daynight/js/mode.js?v202102012266"),callAllJsFiles("/static/theme-daynight/js/tooltip.js?v202102012266"),$(".corner").hover((function(){$(this).attr("aria-expanded","true"===$(this).attr("aria-expanded")?"false":"true")}));const hour=new Date(Date.now()).getHours();(hour>17||hour<4)&&(document.querySelector("input[name=service-theme]").checked=!0,document.getElementsByTagName("BODY")[0].setAttribute("data-theme","dark")),$(document).ready((function(){$(".service-mobile-toggle ul li:first-of-type").click((function(){$(".service-mobile-toggle").toggleClass("smt-active")}))})),$(document).on("click",(function(e){0==$(e.target).closest(".service-mobile-toggle").length&&$(".service-mobile-toggle").hasClass("smt-active")&&$(".service-mobile-toggle").toggleClass("smt-active")}));
|
6
resource/template/theme-daynight/home.html
vendored
6
resource/template/theme-daynight/home.html
vendored
@ -9,7 +9,7 @@
|
|||||||
<title>{{.Title}}</title>
|
<title>{{.Title}}</title>
|
||||||
<link rel="shortcut icon" type="image/png" href="/static/logo.png" />
|
<link rel="shortcut icon" type="image/png" href="/static/logo.png" />
|
||||||
|
|
||||||
<link rel="stylesheet" href="/static/theme-daynight/css/main.css?v202101301768">
|
<link rel="stylesheet" href="/static/theme-daynight/css/main.css?v202102012266">
|
||||||
<link href="https://cdn.bootcdn.net/ajax/libs/font-awesome/5.15.1/css/all.min.css" rel="stylesheet">
|
<link href="https://cdn.bootcdn.net/ajax/libs/font-awesome/5.15.1/css/all.min.css" rel="stylesheet">
|
||||||
<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
|
<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
|
||||||
|
|
||||||
@ -35,7 +35,7 @@
|
|||||||
<li><a href="/">首页</a></li>
|
<li><a href="/">首页</a></li>
|
||||||
<li><a href="/service">服务状态</a></li>
|
<li><a href="/service">服务状态</a></li>
|
||||||
{{if .Admin}}
|
{{if .Admin}}
|
||||||
<li><a href="/server" style="padding:.8em;text-align:center;">管理后台</a></li>
|
<li><a href="/server">管理后台</a></li>
|
||||||
{{else}}
|
{{else}}
|
||||||
<li><a href="/login">登录</a></li>
|
<li><a href="/login">登录</a></li>
|
||||||
{{end}}
|
{{end}}
|
||||||
@ -149,7 +149,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
<script src="/static/theme-daynight/js/main.js?v202101301768" ></script>
|
<script src="/static/theme-daynight/js/main.js?v202102012266" ></script>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/vue@2.6.12/dist/vue.min.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/vue@2.6.12/dist/vue.min.js"></script>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@10"></script>
|
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@10"></script>
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>{{.Title}}</title>
|
<title>{{.Title}}</title>
|
||||||
<link rel="shortcut icon" type="image/png" href="/static/logo.png" />
|
<link rel="shortcut icon" type="image/png" href="/static/logo.png" />
|
||||||
<link rel="stylesheet" href="/static/theme-daynight/css/service.css?v202101301768" />
|
<link rel="stylesheet" href="/static/theme-daynight/css/service.css?v202102012266" />
|
||||||
|
|
||||||
<link href="https://cdn.bootcdn.net/ajax/libs/font-awesome/5.15.1/css/all.min.css" rel="stylesheet" />
|
<link href="https://cdn.bootcdn.net/ajax/libs/font-awesome/5.15.1/css/all.min.css" rel="stylesheet" />
|
||||||
<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
|
<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
|
||||||
@ -34,7 +34,7 @@
|
|||||||
<li><a href="/">首页</a></li>
|
<li><a href="/">首页</a></li>
|
||||||
<li><a href="/service">服务状态</a></li>
|
<li><a href="/service">服务状态</a></li>
|
||||||
{{if .Admin}}
|
{{if .Admin}}
|
||||||
<li><a href="/server" style="padding:.8em;text-align:center;">管理后台</a></li>
|
<li><a href="/server">管理后台</a></li>
|
||||||
{{else}}
|
{{else}}
|
||||||
<li><a href="/login">登录</a></li>
|
<li><a href="/login">登录</a></li>
|
||||||
{{end}}
|
{{end}}
|
||||||
@ -126,7 +126,7 @@
|
|||||||
<a id="back-to-top"></a>
|
<a id="back-to-top"></a>
|
||||||
</article>
|
</article>
|
||||||
|
|
||||||
<script src="/static/theme-daynight/js/service.js?v202101301768"></script>
|
<script src="/static/theme-daynight/js/service.js?v202102012266"></script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -1,25 +1,51 @@
|
|||||||
{{define "theme-daynight/viewpassword"}}
|
{{define "theme-daynight/viewpassword"}}
|
||||||
{{template "common/header" .}}
|
<!DOCTYPE html>
|
||||||
{{if ts .CustomCode}}
|
<html lang="zh-Hans">
|
||||||
{{.CustomCode|safe}}
|
<head>
|
||||||
{{end}}
|
<meta charset="utf-8" />
|
||||||
<div class="login nb-container">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||||
<div class="ui center aligned grid">
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
|
||||||
<div class="column">
|
<title>{{.Title}}</title>
|
||||||
<h2 class="ui teal image header">
|
<link rel="shortcut icon" type="image/png" href="/static/logo.png" />
|
||||||
<img src="static/logo.png" class="image">
|
<link rel="stylesheet" href="/static/theme-daynight/css/passwd.css?v202102012266" />
|
||||||
<div class="content">
|
|
||||||
验证查看密码
|
{{if ts .CustomCode}}
|
||||||
</div>
|
{{.CustomCode|safe}}
|
||||||
</h2>
|
{{end}}
|
||||||
<form action="/view-password" method="POST" class="ui form">
|
</head>
|
||||||
<div class="field">
|
|
||||||
<input type="password" name="Password">
|
<body>
|
||||||
</div>
|
<article>
|
||||||
<button class="ui button" type="submit">确认</button>
|
<section class="passwd-container">
|
||||||
</form>
|
<h2>{{.Conf.Site.Brand}}</h2>
|
||||||
|
<form action="/view-password" method="POST">
|
||||||
|
<h4>验证查看密码</h4>
|
||||||
|
<input type="password" name="Password" placeholder="输入密码" required /><svg viewBox="97 6 809 988" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
|
<g><path d="M321.8,455.5h356.4V321.8c0-49.2-17.4-91.2-52.2-126c-34.8-34.8-76.8-52.2-126-52.2c-49.2,0-91.2,17.4-126,52.2c-34.8,34.8-52.2,76.8-52.2,126L321.8,455.5L321.8,455.5z M900.9,522.3v400.9c0,18.6-6.5,34.3-19.5,47.3c-13,13-28.8,19.5-47.3,19.5H165.9c-18.6,0-34.3-6.5-47.3-19.5c-13-13-19.5-28.8-19.5-47.3V522.3c0-18.6,6.5-34.3,19.5-47.3c13-13,28.8-19.5,47.3-19.5h22.3V321.8c0-85.4,30.6-158.7,91.9-219.9C341.3,40.7,414.7,10,500,10c85.3,0,158.7,30.6,219.9,91.9c61.3,61.3,91.9,134.6,91.9,219.9v133.6h22.3c18.6,0,34.3,6.5,47.3,19.5C894.4,488,900.9,503.7,900.9,522.3L900.9,522.3z" /></g>
|
||||||
|
</svg>
|
||||||
|
<button type="submit">确认</button>
|
||||||
|
</form>
|
||||||
|
<figure class="passwd-img">
|
||||||
|
<a href="/"><img src="/static/logo.png" alt="" /></a>
|
||||||
|
</figure>
|
||||||
|
</section>
|
||||||
|
</article>
|
||||||
|
|
||||||
|
<footer>
|
||||||
|
<div class="footer-container">
|
||||||
|
<div>
|
||||||
|
<a href="https://github.com/naiba/nezha" target="_blank">Powered by 哪吒面板 · {{.Version}}</a>
|
||||||
|
<p>
|
||||||
|
©<span id="copyright-date"
|
||||||
|
><script>
|
||||||
|
document.getElementById('copyright-date').appendChild(document.createTextNode(new Date().getFullYear()));
|
||||||
|
</script></span
|
||||||
|
>
|
||||||
|
· <a href="https://blog.jackiesung.com" target="_blank">Theme designed by Jackie Sung</a>
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</footer>
|
||||||
{{template "common/footer" .}}
|
</body>
|
||||||
{{end}}
|
</html>
|
||||||
|
{{end}}
|
||||||
|
@ -13,7 +13,7 @@ import (
|
|||||||
pb "github.com/naiba/nezha/proto"
|
pb "github.com/naiba/nezha/proto"
|
||||||
)
|
)
|
||||||
|
|
||||||
var Version = "v0.4.4" // !!记得修改 README 重的 badge 版本!!
|
var Version = "v0.4.5" // !!记得修改 README 重的 badge 版本!!
|
||||||
|
|
||||||
const (
|
const (
|
||||||
SnapshotDelay = 3
|
SnapshotDelay = 3
|
||||||
|
Loading…
x
Reference in New Issue
Block a user