mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-02-06 13:40:06 +00:00
modified: resource/l10n/zh-CN.toml
modified: resource/template/common/menu.html modified: resource/template/component/confirm.html modified: resource/template/component/cron.html modified: resource/template/component/monitor.html modified: resource/template/component/notification.html modified: resource/template/component/rule.html modified: resource/template/component/server.html modified: resource/template/dashboard/cron.html modified: resource/template/dashboard/error.html modified: resource/template/dashboard/login.html modified: resource/template/dashboard/monitor.html modified: resource/template/dashboard/notification.html modified: resource/template/dashboard/server.html modified: resource/template/dashboard/setting.html modified: resource/template/dashboard/terminal.html
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
<div class="ui grid">
|
||||
<div class="right floated right aligned twelve wide column">
|
||||
<button class="ui right labeled nezha-primary-btn icon button" onclick="addOrEditCron()"><i class="add icon"></i>
|
||||
添加计划任务
|
||||
{{tr "AddScheduledTasks"}}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -14,16 +14,16 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>名称</th>
|
||||
<th>计划</th>
|
||||
<th>命令</th>
|
||||
<th>通知方式组</th>
|
||||
<th>成功推送</th>
|
||||
<th>覆盖范围</th>
|
||||
<th>特定服务器</th>
|
||||
<th>最后执行</th>
|
||||
<th>最后结果</th>
|
||||
<th>管理</th>
|
||||
<th>{{tr "Name"}}</th>
|
||||
<th>{{tr "Scheduler"}}</th>
|
||||
<th>{{tr "Command"}}</th>
|
||||
<th>{{tr "NotificationMethod"}}</th>
|
||||
<th>{{tr "PushSuccessfully"}}</th>
|
||||
<th>{{tr "Coverage"}}</th>
|
||||
<th>{{tr "SpecificServers"}}</th>
|
||||
<th>{{tr "LastExecution"}}</th>
|
||||
<th>{{tr "LastResult"}}</th>
|
||||
<th>{{tr "Administration"}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -35,7 +35,7 @@
|
||||
<td>{{$cron.Command}}</td>
|
||||
<td>{{$cron.NotificationTag}}</td>
|
||||
<td>{{$cron.PushSuccessful}}</td>
|
||||
<td>{{if eq $cron.Cover 0}}忽略所有{{else}}覆盖所有{{end}}</td>
|
||||
<td>{{if eq $cron.Cover 0}}{{tr "IgnoreAll"}}{{else}}{{tr "CoverAll"}}{{end}}</td>
|
||||
<td>{{$cron.ServersRaw}}</td>
|
||||
<td>{{$cron.LastExecutedAt|tf}}</td>
|
||||
<td>{{$cron.LastResult}}</td>
|
||||
@@ -48,7 +48,7 @@
|
||||
<i class="edit icon"></i>
|
||||
</button>
|
||||
<button class="ui button"
|
||||
onclick="showConfirm('删除计划任务','确认删除此计划任务?',deleteRequest,'/api/cron/'+{{$cron.ID}})">
|
||||
onclick="showConfirm('{{tr "DeleteScheduledTask"}}','{{tr "ConfirmToDeleteThisScheduledTask"}}',deleteRequest,'/api/cron/'+{{$cron.ID}})">
|
||||
<i class="trash alternate outline icon"></i>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<h2 class="ui image header">
|
||||
<img src="/static/logo.svg?v20210804" class="image">
|
||||
<div class="content">
|
||||
访问受限
|
||||
{{tr "AccessDenied"}}
|
||||
</div>
|
||||
</h2>
|
||||
<div class="ui message">
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
<h2 class="ui image header">
|
||||
<img src="static/logo.svg?v20210804" class="image">
|
||||
<div class="content">
|
||||
使用 {{.LoginType}} 账号登录
|
||||
{{tr "Use"}} {{.LoginType}} {{tr "AccountToLogin"}}
|
||||
</div>
|
||||
</h2>
|
||||
<a href="/oauth2/login" class="ui fluid large nezha-primary-btn submit button">登录</a>
|
||||
<a href="/oauth2/login" class="ui fluid large nezha-primary-btn submit button">{{tr "Login"}}</a>
|
||||
<div class="ui message">
|
||||
没有账号? <a href="{{.RegistrationLink}}" target="_blank" rel="noopener noreferrer">注册</a>
|
||||
{{tr "DontHaveAnAccount"}} <a href="{{.RegistrationLink}}" target="_blank" rel="noopener noreferrer">{{tr "SignUp"}}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<div class="ui grid">
|
||||
<div class="right floated right aligned twelve wide column">
|
||||
<button class="ui right labeled nezha-primary-btn icon button" onclick="addOrEditMonitor()">
|
||||
<i class="add icon"></i> 添加服务
|
||||
<i class="add icon"></i> {{tr "AddMonitor"}}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -13,15 +13,15 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>名称</th>
|
||||
<th>目标</th>
|
||||
<th>覆盖范围</th>
|
||||
<th>特定服务器</th>
|
||||
<th>类型</th>
|
||||
<th>请求间隔</th>
|
||||
<th>通知方式组</th>
|
||||
<th>通知</th>
|
||||
<th>管理</th>
|
||||
<th>{{tr "Name"}}</th>
|
||||
<th>{{tr "Target"}}</th>
|
||||
<th>{{tr "Coverage"}}</th>
|
||||
<th>{{tr "SpecificServers"}}</th>
|
||||
<th>{{tr "Type"}}</th>
|
||||
<th>{{tr "Duration"}}</th>
|
||||
<th>{{tr "NotificationMethod"}}</th>
|
||||
<th>{{tr "Notification"}}</th>
|
||||
<th>{{tr "Administration"}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -30,13 +30,13 @@
|
||||
<td>{{$monitor.ID}}</td>
|
||||
<td>{{$monitor.Name}}</td>
|
||||
<td>{{$monitor.Target}}</td>
|
||||
<td>{{if eq $monitor.Cover 0}}覆盖所有{{else}}忽略所有{{end}}</td>
|
||||
<td>{{if eq $monitor.Cover 0}}{{tr "CoverAll"}}{{else}}{{tr "IgnoreAll"}}{{end}}</td>
|
||||
<td>{{$monitor.SkipServersRaw}}</td>
|
||||
<td>
|
||||
{{if eq $monitor.Type 1}}HTTP(S)/SSL证书 {{else if eq $monitor.Type
|
||||
2}} ICMP Ping {{else}} TCP 端口 {{end}}
|
||||
{{if eq $monitor.Type 1}}{{tr "SSLCertificate"}} {{else if eq $monitor.Type
|
||||
2}} ICMP Ping {{else}} {{tr "TCPPort"}} {{end}}
|
||||
</td>
|
||||
<td>{{$monitor.Duration}}秒</td>
|
||||
<td>{{$monitor.Duration}}{{tr "Seconds"}}</td>
|
||||
<td>{{$monitor.NotificationTag}}</td>
|
||||
<td>{{$monitor.Notify}}</td>
|
||||
<td>
|
||||
@@ -45,7 +45,7 @@
|
||||
<i class="edit icon"></i>
|
||||
</button>
|
||||
<button class="ui button"
|
||||
onclick="showConfirm('删除服务','确认删除此服务?',deleteRequest,'/api/monitor/'+{{$monitor.ID}})">
|
||||
onclick="showConfirm('{tr "DeleteService"}','{{tr "ConfirmToDeleteThisService"}}',deleteRequest,'/api/monitor/'+{{$monitor.ID}})">
|
||||
<i class="trash alternate outline icon"></i>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<div class="ui grid">
|
||||
<div class="right floated right aligned twelve wide column">
|
||||
<button class="ui right labeled nezha-primary-btn icon button" onclick="addOrEditNotification()"><i
|
||||
class="add icon"></i> 添加通知方式
|
||||
class="add icon"></i> {{tr "AddNotificationMethod"}}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -14,11 +14,11 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>名称</th>
|
||||
<th>分组</th>
|
||||
<th>{{tr "Name"}}</th>
|
||||
<th>{{tr "Tag"}}</th>
|
||||
<th>URL</th>
|
||||
<th>验证SSL</th>
|
||||
<th>管理</th>
|
||||
<th>{{tr "VerifySSL"}}</th>
|
||||
<th>{{tr "Administration"}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -35,7 +35,7 @@
|
||||
<i class="edit icon"></i>
|
||||
</button>
|
||||
<button class="ui button"
|
||||
onclick="showConfirm('删除通知方式','确认删除此通知方式?',deleteRequest,'/api/notification/'+{{$notification.ID}})">
|
||||
onclick="showConfirm('{{tr "DeleteNotificationMethod"}}','{{tr "ConfirmToDeleteThisNotificationMethod"}}',deleteRequest,'/api/notification/'+{{$notification.ID}})">
|
||||
<i class="trash alternate outline icon"></i>
|
||||
</button>
|
||||
</div>
|
||||
@@ -48,7 +48,7 @@
|
||||
<div class="right floated right aligned twelve wide column">
|
||||
<button class="ui right labeled nezha-primary-btn icon button" onclick="addOrEditAlertRule()"><i
|
||||
class="add icon"></i>
|
||||
添加报警规则
|
||||
{{tr "AddNotificationRule"}}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -56,11 +56,11 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>名称</th>
|
||||
<th>通知方式组</th>
|
||||
<th>规则</th>
|
||||
<th>启用</th>
|
||||
<th>管理</th>
|
||||
<th>{{tr "Name"}}</th>
|
||||
<th>{{tr "NotificationMethod"}}</th>
|
||||
<th>{{tr "Rules"}}</th>
|
||||
<th>{{tr "Enable"}}</th>
|
||||
<th>{{tr "Administration"}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -77,7 +77,7 @@
|
||||
<i class="edit icon"></i>
|
||||
</button>
|
||||
<button class="ui button"
|
||||
onclick="showConfirm('删除通知方式','确认删除此通知方式?',deleteRequest,'/api/alert-rule/'+{{$rule.ID}})">
|
||||
onclick="showConfirm('{{tr "DeleteNotificationMethod"}}','{{tr "ConfirmToDeleteThisNotificationMethod"}}',deleteRequest,'/api/alert-rule/'+{{$rule.ID}})">
|
||||
<i class="trash alternate outline icon"></i>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -6,26 +6,26 @@
|
||||
<div class="ui grid">
|
||||
<div class="right floated right aligned twelve wide column">
|
||||
<button class="ui right labeled nezha-primary-btn icon button" onclick="addOrEditServer()"><i
|
||||
class="add icon"></i> 添加主机
|
||||
class="add icon"></i> {{tr "AddServer"}}
|
||||
</button>
|
||||
<button class="ui right labeled nezha-primary-btn icon button" onclick="forceUpdate()"><i
|
||||
class="arrow alternate circle up outline icon"></i> 强制更新
|
||||
class="arrow alternate circle up outline icon"></i> {{tr "ForceUpdate"}}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<table class="ui very basic table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><button onclick="checkAllServer()" class="ui mini nezha-primary-btn button">全选</button></th>
|
||||
<th>ID(排序)</th>
|
||||
<th>名称</th>
|
||||
<th>分组</th>
|
||||
<th><button onclick="checkAllServer()" class="ui mini nezha-primary-btn button">{{tr "SelectAll"}}</button></th>
|
||||
<th>ID({{tr "DisplayIndex"}})</th>
|
||||
<th>{{tr "Name"}}</th>
|
||||
<th>{{tr "Tag"}}</th>
|
||||
<th>IP</th>
|
||||
<th>版本号</th>
|
||||
<th>密钥</th>
|
||||
<th>一键安装</th>
|
||||
<th>备注</th>
|
||||
<th>管理</th>
|
||||
<th>{{tr "VersionNumber"}}</th>
|
||||
<th>{{tr "Secret"}}</th>
|
||||
<th>{{tr "OneKeyInstall"}}</th>
|
||||
<th>{{tr "Note"}}</th>
|
||||
<th>{{tr "Administration"}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -40,14 +40,14 @@
|
||||
<td>{{$server.Secret}}</td>
|
||||
<td>
|
||||
<button class="ui icon green mini button"
|
||||
data-clipboard-text="{{if $.Conf.GRPCHost}}curl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install.sh -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh install_agent {{$.Conf.GRPCHost}} {{if $.Conf.ProxyGRPCPort}}{{$.Conf.ProxyGRPCPort}}{{else}}{{$.Conf.GRPCPort}}{{end}} {{$server.Secret}}{{if $.Conf.TLS}} --tls{{end}}{{else}}请先在设置页面配置 未接入CDN的面板服务器域名/IP{{end}}"
|
||||
data-tooltip="点击复制安装命令">
|
||||
data-clipboard-text="{{if $.Conf.GRPCHost}}curl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install.sh -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh install_agent {{$.Conf.GRPCHost}} {{if $.Conf.ProxyGRPCPort}}{{$.Conf.ProxyGRPCPort}}{{else}}{{$.Conf.GRPCPort}}{{end}} {{$server.Secret}}{{if $.Conf.TLS}} --tls{{end}}{{else}}{{tr "NoDomainAlert"}}{{end}}"
|
||||
data-tooltip="{{tr "ClickToCopyTheInstallationCommand"}}">
|
||||
<i class="linux icon"></i>
|
||||
</button>
|
||||
<button class="ui icon mini button" data-tooltip="尚未支持,请下载release手动安装">
|
||||
<button class="ui icon mini button" data-tooltip="{{tr "NotSupportedYet"}}">
|
||||
<i class="windows icon"></i>
|
||||
</button>
|
||||
<button class="ui icon mini button" data-tooltip="尚未支持,请下载release手动安装">
|
||||
<button class="ui icon mini button" data-tooltip="{{tr "NotSupportedYet"}}">
|
||||
<i class="apple icon"></i>
|
||||
</button>
|
||||
</td>
|
||||
@@ -61,7 +61,7 @@
|
||||
<i class="edit icon"></i>
|
||||
</button>
|
||||
<button class="ui button"
|
||||
onclick="showConfirm('删除主机','确认删除此主机?',deleteRequest,'/api/server/'+{{$server.ID}})">
|
||||
onclick="showConfirm('{{tr "DeleteServer"}}}','{{tr "ConfirmToDeleteThisServer"}}',deleteRequest,'/api/server/'+{{$server.ID}})">
|
||||
<i class="trash alternate outline icon"></i>
|
||||
</button>
|
||||
</div>
|
||||
@@ -92,7 +92,7 @@
|
||||
})
|
||||
if (servers.length == 0) {
|
||||
$.suiAlert({
|
||||
title: '当前没有选中的服务器',
|
||||
title: '{{tr "NoServerSelected"}}',
|
||||
description: '',
|
||||
type: 'warning',
|
||||
time: '2',
|
||||
@@ -104,7 +104,7 @@
|
||||
.then((resp) => {
|
||||
if (resp.code == 200) {
|
||||
$.suiAlert({
|
||||
title: '执行结果',
|
||||
title: '{{tr "ExecutionResults"}}',
|
||||
description: resp.message,
|
||||
type: 'success',
|
||||
time: '3',
|
||||
|
||||
@@ -5,17 +5,17 @@
|
||||
<div class="ui container">
|
||||
<form id="settingForm" class="ui large form" onsubmit="return false;">
|
||||
<div class="field">
|
||||
<label>站点标题</label>
|
||||
<label>{{tr "SiteTitle"}}</label>
|
||||
<input type="text" name="Title" placeholder="{{tr "nezhaMonitor"}}" value="{{.Conf.Site.Brand}}">
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>管理员列表</label>
|
||||
<label>{{tr "AdministratorList"}}</label>
|
||||
<input type="text" name="Admin" placeholder="1010,2020" value="{{.Conf.Oauth2.Admin}}">
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>前台主题</label>
|
||||
<label>{{tr "Theme"}}</label>
|
||||
<select name="Theme">
|
||||
<option value="default" {{if eq .Conf.Site.Theme "default" }} selected="selected" {{end}}>默认主题
|
||||
<option value="default" {{if eq .Conf.Site.Theme "default" }} selected="selected" {{end}}>{{tr "DefaultTheme"}}
|
||||
</option>
|
||||
<option value="daynight" {{if eq .Conf.Site.Theme "daynight" }} selected="selected" {{end}}>
|
||||
JackieSung DayNight</option>
|
||||
@@ -25,51 +25,51 @@
|
||||
</select>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>自定义代码(style、script 都可以)</label>
|
||||
<label>{{tr "CustomCodes"}}</label>
|
||||
<textarea name="CustomCode">{{.Conf.Site.CustomCode}}</textarea>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>前台查看密码</label>
|
||||
<label>{{tr "AccessPassword"}}}</label>
|
||||
<input type="text" name="ViewPassword" placeholder="" value="{{.Conf.Site.ViewPassword}}">
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>未接入CDN的面板服务器域名/IP</label>
|
||||
<label>{{tr "PanelServerDomainAndIP"}}</label>
|
||||
<input type="text" name="GRPCHost" placeholder="" value="{{.Conf.GRPCHost}}">
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>IP 变更提醒</label>
|
||||
<label>{{tr "IPChangeAlert"}}</label>
|
||||
</div>
|
||||
<div class="ui segment">
|
||||
<div class="field">
|
||||
<label>覆盖范围</label>
|
||||
<label>{{tr "Coverage"}}</label>
|
||||
<select name="Cover" class="ui fluid dropdown">
|
||||
<option value=0>覆盖所有,仅特定服务器不提醒</option>
|
||||
<option value=1>忽略所有,仅提醒特定服务器</option>
|
||||
<option value=0>{{tr "AllIncludedOnlySpecificServersAreNotAlerted"}}</option>
|
||||
<option value=1>{{tr "IgnoreAllOnlyAlertSpecificServers"}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>特定服务器</label>
|
||||
<input type="text" name="IgnoredIPNotification" placeholder="服务器ID 以逗号隔开 1001,1002,1003"
|
||||
<label>{{tr "SpecificServers"}}</label>
|
||||
<input type="text" name="IgnoredIPNotification" placeholder="{{tr "ServerIDSeparatedByCommas"}} 1001,1002,1003"
|
||||
value="{{.Conf.IgnoredIPNotification}}">
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>提醒发送至指定的通知分组</label>
|
||||
<label>{{tr "IPChangeNotificationTag"}}</label>
|
||||
<input type="text" name="IPChangeNotificationTag" placeholder="" value="{{.Conf.IPChangeNotificationTag}}">
|
||||
</div>
|
||||
<div class="field">
|
||||
<div class="ui nf-ssl checkbox ip-change">
|
||||
<input name="EnableIPChangeNotification" type="checkbox" tabindex="0" class="hidden">
|
||||
<label>启用</label>
|
||||
<label>{{tr "Enable"}}</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<div class="ui nf-ssl checkbox plain-ip">
|
||||
<input name="EnablePlainIPInNotification" type="checkbox" tabindex="0" class="hidden">
|
||||
<label>通知信息IP不打码</label>
|
||||
<label>{{tr "NotificationMessagesDoNotHideIP"}}</label>
|
||||
</div>
|
||||
</div>
|
||||
<button class="ui button" type="submit">保存</button>
|
||||
<button class="ui button" type="submit">{{tr "Save"}}</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@@ -81,7 +81,7 @@
|
||||
if (resp.code == 200) {
|
||||
$.suiAlert({
|
||||
title: '',
|
||||
description: '修改成功',
|
||||
description: '{{tr "ModifiedSuccessfully"}}',
|
||||
type: 'success',
|
||||
time: '3',
|
||||
position: 'top-center',
|
||||
|
||||
@@ -84,12 +84,12 @@
|
||||
}
|
||||
|
||||
socket.onclose = () => {
|
||||
alert('Terminal 连接超时或会话已结束')
|
||||
alert('{{tr "TerminalConnectionTimeOutOrSessionEnded"}}')
|
||||
window.close()
|
||||
}
|
||||
|
||||
socket.onerror = () => {
|
||||
alert('Terminal 连接失败,请检查 /terminal/* 的 WebSocket 反代情况')
|
||||
alert('{{tr "TerminalConnectionFailed"}}')
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user