Skip to content

Commit

Permalink
Update.
Browse files Browse the repository at this point in the history
  • Loading branch information
xOS committed Apr 23, 2022
1 parent 27fb4d6 commit 289280d
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 12 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# 探针轻量版
> 本项目为原项目[哪吒探针](https://github.com/naiba/nezha)的精简修改自用版
![GitHub Workflow Status](https://img.shields.io/github/workflow/status/xOS/ServerStatus/Dashboard%20image?label=管理面板%20v0.1.9&logo=github&style=for-the-badge) ![Agent release](https://img.shields.io/github/v/release/xOS/ServerStatus?color=brightgreen&label=Agent&style=for-the-badge&logo=github) ![GitHub Workflow Status](https://img.shields.io/github/workflow/status/xOS/ServerStatus/Agent%20release?label=Agent%20CI&logo=github&style=for-the-badge) ![shell](https://img.shields.io/badge/安装脚本-v0.1.4-brightgreen?style=for-the-badge&logo=linux)
![GitHub Workflow Status](https://img.shields.io/github/workflow/status/xOS/ServerStatus/Dashboard%20image?label=管理面板%20v0.1.10&logo=github&style=for-the-badge) ![Agent release](https://img.shields.io/github/v/release/xOS/ServerStatus?color=brightgreen&label=Agent&style=for-the-badge&logo=github) ![GitHub Workflow Status](https://img.shields.io/github/workflow/status/xOS/ServerStatus/Agent%20release?label=Agent%20CI&logo=github&style=for-the-badge) ![shell](https://img.shields.io/badge/安装脚本-v0.1.4-brightgreen?style=for-the-badge&logo=linux)

## 注意:

Expand Down
6 changes: 5 additions & 1 deletion cmd/dashboard/controller/member_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ type notificationForm struct {
RequestHeader string
RequestBody string
VerifySSL string
SkipCheck string
}

func (ma *memberAPI) addOrEditNotification(c *gin.Context) {
Expand All @@ -243,7 +244,10 @@ func (ma *memberAPI) addOrEditNotification(c *gin.Context) {
Notification: &n,
Server: nil,
}
err = ns.Send("这是测试消息")
// 勾选了跳过检查
if nf.SkipCheck != "on" {
err = ns.Send("这是测试消息")
}
}
if err == nil {
// 保证Tag不为空
Expand Down
5 changes: 5 additions & 0 deletions resource/static/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@
}
}

td {
word-wrap: break-word;
word-break: break-all;
}

/**背景**/

body {
Expand Down
1 change: 1 addition & 0 deletions resource/static/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ function addOrEditNotification(notification) {
} else {
modal.find(".ui.nf-ssl.checkbox").checkbox("set unchecked");
}
modal.find(".ui.nf-skip-check.checkbox").checkbox("set unchecked");
showFormModal(
".notification.modal",
"#notificationForm",
Expand Down
6 changes: 3 additions & 3 deletions resource/template/common/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
</div>
<script src="https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/jquery/3.4.1/jquery.min.js"></script>
<script src="https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/semantic-ui/2.4.1/semantic.min.js"></script>
<script src="static/semantic-ui-alerts.min.js"></script>
<script src="static/semantic-ui-alerts.min.js?v20220423"></script>
<script src="https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/vue/2.6.12/vue.min.js"></script>
<script src="static/main.js"></script>
<script src="static/wallpaper.js"></script>
<script src="static/main.js?v20220423"></script>
<script src="static/wallpaper.js?v20220423"></script>
<script>
var def_bg = document.getElementById('def_background');
if (def_bg) {
Expand Down
10 changes: 5 additions & 5 deletions resource/template/common/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
<meta http-equiv="Cache-Control" content="no-transform">
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
<meta name="theme-color" content="#0F7D00">
<meta property="og:image" content="static/logo.png">
<meta property="og:image" content="static/logo.png?v20220423">
<meta name="msapplication-TileColor" content="#0F7D00">
<title>{{.Title}}</title>
<link rel="stylesheet" type="text/css" href="https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/semantic-ui/2.4.1/semantic.min.css">
<link href="static/osi/osi.css" rel="stylesheet">
<link href="static/osi/osi.css?v20220423" rel="stylesheet">
<link href="https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/flag-icon-css/4.1.5/css/flag-icons.min.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="static/semantic-ui-alerts.min.css">
<link rel="stylesheet" type="text/css" href="static/main.css">
<link rel="shortcut icon" type="image/png" href="static/favicon.ico" />
<link rel="stylesheet" type="text/css" href="static/semantic-ui-alerts.min.css?v20220423">
<link rel="stylesheet" type="text/css" href="static/main.css?v20220423">
<link rel="shortcut icon" type="image/png" href="static/favicon.ico?v20220423" />
</head>
<body id="bg">
<div class="def_background_wrap">
Expand Down
2 changes: 1 addition & 1 deletion resource/template/common/menu.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="ui large top fixed menu nb-menu">
<div class="ui container">
<div class="item">
<a class="logo{{if eq .MatchedPath " /"}} active{{end}}" href="/"><img src="static/logo.png" style="display: inline-block; vertical-align: middle; margin: -.3em 0; width: 2.5em;"></a>
<a class="logo{{if eq .MatchedPath " /"}} active{{end}}" href="/"><img src="static/logo.png?v20220423" style="display: inline-block; vertical-align: middle; margin: -.3em 0; width: 2.5em;"></a>
</div>
{{if .IsAdminPage}}
<a class='item{{if eq .MatchedPath "/server"}} active{{end}}' href="/server"><i class="server icon"></i>资产</a>
Expand Down
6 changes: 6 additions & 0 deletions resource/template/component/notification.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@
<label>验证SSL</label>
</div>
</div>
<div class="field">
<div class="ui nf-skip-check checkbox">
<input name="SkipCheck" type="checkbox" tabindex="0" class="hidden">
<label>不发送测试信息</label>
</div>
</div>
</form>
</div>
<div class="actions">
Expand Down
2 changes: 1 addition & 1 deletion service/singleton/singleton.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/xos/serverstatus/pkg/utils"
)

var Version = "v0.1.9"
var Version = "v0.1.10"

var (
Conf *model.Config
Expand Down

0 comments on commit 289280d

Please sign in to comment.