mirror of
https://github.com/nezhahq/nezha.git
synced 2025-01-22 12:48:14 -05:00
💄 优化 server-status 主题
This commit is contained in:
parent
e7c22968b6
commit
1c00cc8e3b
@ -4,7 +4,7 @@
|
||||
<br>
|
||||
<small><i>LOGO designed by <a href="https://xio.ng" target="_blank">熊大</a> .</i></small>
|
||||
<br><br>
|
||||
<img src="https://img.shields.io/github/actions/workflow/status/naiba/nezha/dashboard.yml?branch=master&label=Dash%20v0.15.6&logo=github&style=for-the-badge"> <img src="https://img.shields.io/github/v/release/nezhahq/agent?color=brightgreen&label=Agent&style=for-the-badge&logo=github"> <img src="https://img.shields.io/github/actions/workflow/status/nezhahq/agent/agent.yml?branch=v0.15.6&label=Agent%20CI&logo=github&style=for-the-badge"> <img src="https://img.shields.io/badge/Installer-v0.15.0-brightgreen?style=for-the-badge&logo=linux">
|
||||
<img src="https://img.shields.io/github/actions/workflow/status/naiba/nezha/dashboard.yml?branch=master&label=Dash%20v0.15.7&logo=github&style=for-the-badge"> <img src="https://img.shields.io/github/v/release/nezhahq/agent?color=brightgreen&label=Agent&style=for-the-badge&logo=github"> <img src="https://img.shields.io/github/actions/workflow/status/nezhahq/agent/agent.yml?branch=v0.15.7&label=Agent%20CI&logo=github&style=for-the-badge"> <img src="https://img.shields.io/badge/Installer-v0.15.0-brightgreen?style=for-the-badge&logo=linux">
|
||||
<br>
|
||||
<br>
|
||||
<p>:trollface: <b>Nezha Monitoring: Self-hostable, lightweight, servers and websites monitoring and O&M tool.</b></p>
|
||||
|
2
go.mod
2
go.mod
@ -20,6 +20,7 @@ require (
|
||||
github.com/patrickmn/go-cache v2.1.0+incompatible
|
||||
github.com/robfig/cron/v3 v3.0.1
|
||||
github.com/samber/lo v1.38.1
|
||||
github.com/spf13/pflag v1.0.5
|
||||
github.com/spf13/viper v1.17.0
|
||||
github.com/stretchr/testify v1.8.4
|
||||
github.com/xanzy/go-gitlab v0.93.1
|
||||
@ -71,7 +72,6 @@ require (
|
||||
github.com/sourcegraph/conc v0.3.0 // indirect
|
||||
github.com/spf13/afero v1.10.0 // indirect
|
||||
github.com/spf13/cast v1.5.1 // indirect
|
||||
github.com/spf13/pflag v1.0.5 // indirect
|
||||
github.com/subosito/gotenv v1.6.0 // indirect
|
||||
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
|
||||
github.com/ugorji/go/codec v1.2.11 // indirect
|
||||
|
14
resource/l10n/en-US.toml
vendored
14
resource/l10n/en-US.toml
vendored
@ -607,17 +607,5 @@ other = "Info"
|
||||
[HideForGuest]
|
||||
other = "No display to visitors"
|
||||
|
||||
[Feature]
|
||||
[Menu]
|
||||
other = "Menu"
|
||||
|
||||
[SitePV]
|
||||
other = "Total page views"
|
||||
|
||||
[SitePVUnit]
|
||||
other = "Page views"
|
||||
|
||||
[SiteUV]
|
||||
other = "Total visitors"
|
||||
|
||||
[SiteUVUnit]
|
||||
other = "Visitors"
|
16
resource/l10n/es-ES.toml
vendored
16
resource/l10n/es-ES.toml
vendored
@ -607,17 +607,5 @@ other = "Información"
|
||||
[HideForGuest]
|
||||
other = "No se muestra a los visitantes"
|
||||
|
||||
[Feature]
|
||||
other = "Características"
|
||||
|
||||
[SitePV]
|
||||
other = "Número total de visitas al sitio"
|
||||
|
||||
[SitePVUnit]
|
||||
other = "visitas"
|
||||
|
||||
[SiteUV]
|
||||
other = "Número total de visitantes únicos al sitio"
|
||||
|
||||
[SiteUVUnit]
|
||||
other = "visitantes únicos"
|
||||
[Menu]
|
||||
other = "Menú"
|
||||
|
16
resource/l10n/zh-CN.toml
vendored
16
resource/l10n/zh-CN.toml
vendored
@ -607,17 +607,5 @@ other = "信息"
|
||||
[HideForGuest]
|
||||
other = "对游客隐藏"
|
||||
|
||||
[Feature]
|
||||
other = "功能"
|
||||
|
||||
[SitePV]
|
||||
other = "本站总访问量"
|
||||
|
||||
[SitePVUnit]
|
||||
other = "次"
|
||||
|
||||
[SiteUV]
|
||||
other = "本站总访客数"
|
||||
|
||||
[SiteUVUnit]
|
||||
other = "人次"
|
||||
[Menu]
|
||||
other = "菜单"
|
2
resource/l10n/zh-TW.toml
vendored
2
resource/l10n/zh-TW.toml
vendored
@ -607,7 +607,7 @@ other = "訊息"
|
||||
[HideForGuest]
|
||||
other = "對遊客隱藏"
|
||||
|
||||
[Feature]
|
||||
[Menu]
|
||||
other = "功能"
|
||||
|
||||
[SitePV]
|
||||
|
2
resource/template/theme-default/home.html
vendored
2
resource/template/theme-default/home.html
vendored
@ -227,7 +227,7 @@
|
||||
secondToDate(s) {
|
||||
var d = Math.floor(s / 3600 / 24);
|
||||
if (d > 0) {
|
||||
return d + " {{tr "Day"}}"
|
||||
return d + ' {{tr "Day"}}'
|
||||
}
|
||||
var h = Math.floor(s / 3600 % 24);
|
||||
var m = Math.floor(s / 60 % 60);
|
||||
|
@ -2,12 +2,7 @@
|
||||
<div class="container">
|
||||
<p style="text-align: center; font-size: 10px;">
|
||||
{{ .Title }} | Theme <a href="https://github.com/cppla/ServerStatus">ServerStatus</a> | Powered by <a
|
||||
href="https://github.com/naiba/nezha">{{tr "NezhaMonitoring"}}</a>
|
||||
</p>
|
||||
<p style="text-align: center; font-size: 10px;">
|
||||
<span id="busuanzi_container_site_pv" style="display: none">
|
||||
{{tr "SitePV" }} <span id="busuanzi_value_site_pv"></span> {{tr "SitePVUnit" }} | {{tr "SiteUV" }} <span id="busuanzi_value_site_uv"></span> {{tr "SiteUVUnit" }}
|
||||
</span>
|
||||
href="https://github.com/naiba/nezha">{{tr "NezhaMonitoring"}}</a> {{.Version}}
|
||||
</p>
|
||||
</div>
|
||||
{{end}}
|
@ -9,28 +9,30 @@
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a href="#" class="navbar-brand">{{ .Title }}</a>
|
||||
<a href="/" class="navbar-brand">{{.Conf.Site.Brand}}</a>
|
||||
</div>
|
||||
<div class="navbar-collapse collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
<li><a href="/">{{tr "Home" }}</a></li>
|
||||
<li><a href="/service">{{tr "Services" }}</a></li>
|
||||
</ul>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li class="dropdown">
|
||||
<a data-toggle="dropdown" class="dropdown-toggle" href="#">{{tr "Feature" }}<b class="caret"></b></a>
|
||||
<a data-toggle="dropdown" href="#">{{tr "Menu" }}<b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="/">{{tr "Home" }}</a></li>
|
||||
<li><a href="/service">{{tr "Services" }}</a></li>
|
||||
{{if .Admin}}
|
||||
<li><a href="/server">{{tr "AdminPanel" }} ({{.Admin.Name}})</a></li>
|
||||
{{else}}
|
||||
<li><a href="/login">{{tr "Login" }}</a></li>
|
||||
{{end}}
|
||||
<li><a href="#" @click="setSystemTheme">{{tr "SystemMode" }}
|
||||
<span style="color: #fff" v-if="isSystemTheme"> ✔️</span></a>
|
||||
<span style="color: #fff" v-if="isSystemTheme"> ✔️</span></a>
|
||||
</li>
|
||||
<li><a href="#" @click="setTheme('dark', true)">{{tr "DarkMode" }}
|
||||
<span v-if="theme === 'dark' && !isSystemTheme"> ✔️</span></a>
|
||||
<span v-if="theme === 'dark' && !isSystemTheme"> ✔️</span></a>
|
||||
</li>
|
||||
<li><a href="#" @click="setTheme('light', true)">{{tr "LightMode" }}
|
||||
<span v-if="theme === 'light' && !isSystemTheme"> ✔️</span></a>
|
||||
<span v-if="theme === 'light' && !isSystemTheme"> ✔️</span></a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
@ -28,8 +28,6 @@
|
||||
<script src="/static/theme-server-status/js/bootstrap.min.js"></script>
|
||||
<script src="https://cdn.staticfile.org/vue/2.6.14/vue.min.js"></script>
|
||||
<script src="/static/theme-server-status/js/mixin.js"></script>
|
||||
<!-- custom code 引入这段代码即可开启卜算子统计 -->
|
||||
<!--<script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>-->
|
||||
</head>
|
||||
<body>
|
||||
{{end}}
|
@ -214,7 +214,7 @@
|
||||
secondToDate(s) {
|
||||
const d = Math.floor(s / 3600 / 24);
|
||||
if (d > 0) {
|
||||
return d + "天"
|
||||
return d + ' {{tr "Day"}}'
|
||||
}
|
||||
const h = Math.floor(s / 3600 % 24);
|
||||
const m = Math.floor(s / 60 % 60);
|
||||
@ -269,7 +269,7 @@
|
||||
ws.onmessage = (evt) => {
|
||||
let jsonData = evt.data
|
||||
const data = JSON.parse(jsonData)
|
||||
for (let i = 0; i < data.servers.length; i++) {
|
||||
for (let i = 0; i < data.servers?.length; i++) {
|
||||
const ns = data.servers[i];
|
||||
if (!ns.Host) {
|
||||
data.servers[i].live = false
|
||||
@ -291,7 +291,7 @@
|
||||
},
|
||||
handleNodes(servers) {
|
||||
let nodes = []
|
||||
servers.forEach(server => {
|
||||
servers?.forEach(server => {
|
||||
let platform = server.Host.Platform
|
||||
if (this.isWindowsPlatform(server.Host.Platform)) {
|
||||
platform = "windows"
|
||||
|
@ -45,7 +45,7 @@
|
||||
</div>
|
||||
|
||||
<div class="ui container">
|
||||
<div class="service-status">
|
||||
<div class="service-status" style="margin-bottom: 20px;">
|
||||
{{if .CycleTransferStats}}
|
||||
|
||||
<h2 style="text-align: center;">{{tr "CycleTransferStats"}}</h2>
|
||||
|
@ -12,7 +12,7 @@ import (
|
||||
"github.com/naiba/nezha/pkg/utils"
|
||||
)
|
||||
|
||||
var Version = "v0.15.6" // !!记得修改 README 中的 badge 版本!!
|
||||
var Version = "v0.15.7" // !!记得修改 README 中的 badge 版本!!
|
||||
|
||||
var (
|
||||
Conf *model.Config
|
||||
|
Loading…
Reference in New Issue
Block a user