Merge pull request #171 from hhhkkk520/master [skip ci]

提取文本到zh-CN.toml

Co-authored-by: hhhkkk520 <52115472+hhhkkk520@users.noreply.github.com>
This commit is contained in:
naiba 2022-04-29 11:47:52 +08:00 committed by GitHub
commit 58aea2b0f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with 380 additions and 169 deletions

View File

@ -1,2 +1,217 @@
[nezhaMonitor] [nezhaMonitor]
other = "哪吒监控" other = "哪吒监控"
[Server]
other = "主机"
[Services]
other = "服务"
[Task]
other = "任务"
[Notification]
other = "报警"
[Settings]
other = "设置"
[Home]
other = "首页"
[BackToHomepage]
other = "返回前台"
[AdminPanel]
other = "管理后台"
[Logout]
other = "注销登录"
[Login]
other = "登录"
[ConfirmLogout]
other = "确认注销?"
[AfterLoggingOutYouHaveToLoginAgain]
other = "注销后您必须重新登录才能使用"
[Cancel]
other = "取消"
[Confirm]
other = "确认"
[AddScheduledTasks]
other = "添加计划任务"
[Name]
other = "名称"
[Scheduler]
other = "计划"
[BackUp]
other = "备份"
[3amDaily]
other = "(每天3点)"
[Command]
other = "命令"
[Coverage]
other = "覆盖范围"
[IgnoreAllAndExecuteOnlyThroughSpecificServers]
other = "忽略所有,仅通过特定服务器执行"
[AllIncludedOnlySpecificServersAreNotExecuted]
other = "覆盖所有,仅特定服务器不执行"
[SpecificServers]
other = "特定服务器"
[EnterIdAndNameToSearch]
other = "输入ID/名称以搜索"
[NotificationMethod]
other = "通知方式组"
[PushSuccessMessages]
other = "推送成功的消息"
[TheFormaOfTheScheduleIs]
other = "计划的格式为:"
[SecondsMinutesHoursDaysMonthsWeeksSeeDetails]
other = "秒 分 时 天 月 星期,详情见"
[ScheduleExpressionFormat]
other = "计划表达式格式"
[IntroductionOfCommands]
other = "命令:就像写 shell/bat 脚本一样,但是不推荐换行,多个命令使用 <code>&&</code>/<code>&</code> 连接,如果遇到 xxx 命令找不到,可能是<code>PATH</code> 环境变量的问题,<code>Linux</code> 主机在命令开头加入<code>source ~/.bashrc</code>或者使用绝对路径执行。"
[AddMonitor]
other = "添加监控"
[Blog]
other = "博客"
[Target]
other = "目标"
[Type]
other = "类型"
[SslExpirationOrChange]
other = "(SSL到期、变更)"
[Duration]
other = "请求间隔"
[Seconds]
other = "秒"
[EnableFailureNotification]
other = "启用故障通知"
[IntroductionOfMonitor]
other = """
<b>HTTP-GET</b> URL( http/https, HTTPSSSL)<br>
<b>ICMP-Ping</b> /IP<br>
<b>TCP-Ping</b> /IP + example.com:22"""
[AddNotificationMethod]
other = "添加通知方式"
[Tag]
other = "分组"
[DoNotSendTestMessages]
other = "不发送测试信息"
[RequestMethod]
other = "请求方式"
[RequestType]
other = "请求类型"
[VerifySSL]
other = "验证SSL"
[AddNotificationRule]
other = "添加报警规则"
[Rules]
other = "规则"
[Enable]
other = "启用"
[AddServer]
other = "添加服务器"
[ServerGroup]
other = "服务器分组"
[EinsteinLightspeed1]
other = "爱因斯坦-光速1号"
[DisplayIndex]
other = "排序"
[TheLargerTheNumberTheHigherThePriority]
other = "越大越靠前"
[Secret]
other = "密钥"
[Note]
other = "备注"
[LinuxOneKeyInstall]
other = "Linux 一键安装"
[NoDomainAlert]
other = "请先在设置页面配置 未接入CDN的面板服务器域名/IP"
[PushSuccessfully]
other = "成功推送"
[LastExecution]
other = "最后执行"
[LastResult]
other = "最后结果"
[Administration]
other = "管理"
[CoverAll]
other = "覆盖所有"
[IgnoreAll]
other = "忽略所有"
[DeleteScheduledTask]
other = "删除计划任务"
[ConfirmToDeleteThisScheduledTask]
other = "确认删除此计划任务?"
[AccessDenied]
other = "访问受限"
[Use]
other = "使用"
[AccountToLogin]
other = "账号登录"
[SignUp]
other = "注册"
[DontHaveAnAccount]
other = "没有账号?"
[SSLCertificate]
other = "HTTP(S)/SSL证书"
[TCPPort]
other = "TCP 端口"
[DeleteService]
other = "删除服务"
[ConfirmToDeleteThisService]
other = "确认删除此服务?"
[DeleteNotificationMethod]
other = "删除通知方式"
[ConfirmToDeleteThisNotificationMethod]
other = "确认删除此通知方式?"
[ForceUpdate]
other = "强制更新"
[SelectAll]
other = "全选"
[VersionNumber]
other = "版本号"
[OneKeyInstall]
other = "一键安装"
[ClickToCopyTheInstallationCommand]
other = "点击复制安装命令"
[NotSupportedYet]
other = "尚未支持请下载release手动安装"
[DeleteServer]
other = "删除主机"
[ConfirmToDeleteThisServer]
other = "确认删除此主机?"
[NoServerSelected]
other = "当前没有选中的服务器"
[ExecutionResults]
other = "执行结果"
[SiteTitle]
other = "站点标题"
[AdministratorList]
other = "管理员列表"
[Theme]
other = "主题"
[DefaultTheme]
other = "默认主题"
[CustomCodes]
other = "自定义代码(style、script 都可以)"
[AccessPassword]
other = "前台查看密码"
[PanelServerDomainAndIP]
other = "未接入CDN的面板服务器域名/IP"
[IPChangeAlert]
other = "IP 变更提醒"
[AllIncludedOnlySpecificServersAreNotAlerted]
other = "覆盖所有,仅特定服务器不提醒"
[IgnoreAllOnlyAlertSpecificServers]
other = "忽略所有,仅提醒特定服务器"
[IgnoreAllRequestOnlyThroughSpecificServers]
other = "忽略所有,仅通过特定服务器请求"
[AllIncludedOnlySpecificServersAreNotRequest]
other = "覆盖所有,仅特定服务器不请求"
[ServerIDSeparatedByCommas]
other = "服务器ID 以逗号隔开"
[IPChangeNotificationTag]
other = "提醒发送至指定的通知分组"
[NotificationMessagesDoNotHideIP]
other = "通知信息IP不打码"
[Save]
other = "保存"
[ModifiedSuccessfully]
other = "修改成功"
[TerminalConnectionTimeOutOrSessionEnded]
other = "Terminal 连接超时或会话已结束"
[TerminalConnectionFailed]
other = "Terminal 连接失败,请检查 /terminal/* 的 WebSocket 反代情况"

View File

@ -5,16 +5,16 @@
<img src="/static/logo.svg?v20210804"> <img src="/static/logo.svg?v20210804">
</div> </div>
{{if .IsAdminPage}} {{if .IsAdminPage}}
<a class='item{{if eq .MatchedPath "/server"}} active{{end}}' href="/server"><i class="server icon"></i>主机</a> <a class='item{{if eq .MatchedPath "/server"}} active{{end}}' href="/server"><i class="server icon"></i>{{tr "Server"}}</a>
<a class='item{{if eq .MatchedPath "/monitor"}} active{{end}}' href="/monitor"><i class="rss icon"></i>服务</a> <a class='item{{if eq .MatchedPath "/monitor"}} active{{end}}' href="/monitor"><i class="rss icon"></i>{{tr "Services"}}</a>
<a class='item{{if eq .MatchedPath "/cron"}} active{{end}}' href="/cron"><i class="clock icon"></i>任务</a> <a class='item{{if eq .MatchedPath "/cron"}} active{{end}}' href="/cron"><i class="clock icon"></i>{{tr "Task"}}</a>
<a class='item{{if eq .MatchedPath "/notification"}} active{{end}}' href="/notification"><i class="bell icon"></i>报警</a> <a class='item{{if eq .MatchedPath "/notification"}} active{{end}}' href="/notification"><i class="bell icon"></i>{{tr "Notification"}}</a>
<a class='item{{if eq .MatchedPath "/setting"}} active{{end}}' href="/setting"> <a class='item{{if eq .MatchedPath "/setting"}} active{{end}}' href="/setting">
<i class="settings icon"></i>设置 <i class="settings icon"></i>{{tr "Settings"}}
</a> </a>
{{else}} {{else}}
<a class='item{{if eq .MatchedPath "/"}} active{{end}}' href="/"><i class="home icon"></i>首页</a> <a class='item{{if eq .MatchedPath "/"}} active{{end}}' href="/"><i class="home icon"></i>{{tr "Home"}}</a>
<a class='item{{if eq .MatchedPath "/service"}} active{{end}}' href="/service"><i class="rss icon"></i>服务</a> <a class='item{{if eq .MatchedPath "/service"}} active{{end}}' href="/service"><i class="rss icon"></i>{{tr "Services"}}</a>
{{end}} {{end}}
<div class="right menu"> <div class="right menu">
<div class="item"> <div class="item">
@ -27,20 +27,20 @@
<div class="menu"> <div class="menu">
{{if .IsAdminPage}} {{if .IsAdminPage}}
<a class="item" href="/"> <a class="item" href="/">
<i class="chart area icon"></i>返回前台 <i class="chart area icon"></i>{{tr "BackToHomepage"}}
</a> </a>
{{else}} {{else}}
<a class="item" href="/server"> <a class="item" href="/server">
<i class="terminal icon"></i>管理后台 <i class="terminal icon"></i>{{tr "AdminPanel"}}
</a> </a>
{{end}} {{end}}
<button class="item" onclick="showConfirm('确认注销?','注销后您必须重新登录才能使用',logout,{{.Admin.ID}})"> <button class="item" onclick="showConfirm('{{tr "ConfirmLogout"}}','{{tr "AfterLoggingOutYouHaveToLoginAgain"}}',logout,{{.Admin.ID}})">
<i class="logout icon"></i>注销登录 <i class="logout icon"></i>{{tr "Logout"}}
</button> </button>
</div> </div>
</div> </div>
{{else}} {{else}}
<a href="/login" class="ui large positive nezha-primary-btn button"><i class="sign-in icon"></i>登录</a> <a href="/login" class="ui large positive nezha-primary-btn button"><i class="sign-in icon"></i>{{tr "Login"}}</a>
{{end}} {{end}}
</div> </div>
</div> </div>

View File

@ -4,8 +4,8 @@
<div class="content"> <div class="content">
</div> </div>
<div class="actions"> <div class="actions">
<div class="ui negative button">取消</div> <div class="ui negative button">{{tr "Cancel"}}</div>
<button class="ui positive nezha-primary-btn right labeled icon button">确认<i class="checkmark icon"></i> <button class="ui positive nezha-primary-btn right labeled icon button">{{tr "Confirm"}}<i class="checkmark icon"></i>
</button> </button>
</div> </div>
</div> </div>

View File

@ -1,62 +1,60 @@
{{define "component/cron"}} {{define "component/cron"}}
<div class="ui tiny cron modal transition hidden"> <div class="ui tiny cron modal transition hidden">
<div class="header">添加计划任务</div> <div class="header">{{tr "AddScheduledTasks"}}</div>
<div class="content"> <div class="content">
<form id="cronForm" class="ui form"> <form id="cronForm" class="ui form">
<input type="hidden" name="ID"> <input type="hidden" name="ID">
<div class="field"> <div class="field">
<label>名称</label> <label>{{tr "Name"}}</label>
<input type="text" name="Name" placeholder="备份"> <input type="text" name="Name" placeholder="{{tr "BackUp"}}">
</div> </div>
<div class="field"> <div class="field">
<label>计划</label> <label>{{tr "Scheduler"}}</label>
<input type="text" name="Scheduler" placeholder="0 0 3 * * *每天3点"> <input type="text" name="Scheduler" placeholder="0 0 3 * * *{{tr "3amDaily"}}">
</div> </div>
<div class="field"> <div class="field">
<label>命令</label> <label>{{tr "Command"}}</label>
<textarea name="Command"></textarea> <textarea name="Command"></textarea>
</div> </div>
<div class="field"> <div class="field">
<label>覆盖范围</label> <label>{{tr "Coverage"}}</label>
<select name="Cover" class="ui fluid dropdown"> <select name="Cover" class="ui fluid dropdown">
<option value="0">忽略所有,仅通过特定服务器执行</option> <option value="0">{{tr "IgnoreAllAndExecuteOnlyThroughSpecificServers"}}</option>
<option value="1">覆盖所有,仅特定服务器不执行</option> <option value="1">{{tr "AllIncludedOnlySpecificServersAreNotExecuted"}}</option>
</select> </select>
</div> </div>
<div class="field"> <div class="field">
<label>特定服务器</label> <label>{{tr "SpecificServers"}}</label>
<div class="ui fluid multiple servers search selection dropdown"> <div class="ui fluid multiple servers search selection dropdown">
<input type="hidden" name="ServersRaw"> <input type="hidden" name="ServersRaw">
<i class="dropdown icon"></i> <i class="dropdown icon"></i>
<div class="default text">输入ID/名称以搜索</div> <div class="default text">{{tr "EnterIdAndNameToSearch"}}</div>
<div class="menu"></div> <div class="menu"></div>
</div> </div>
</div> </div>
<div class="field"> <div class="field">
<label>通知方式组</label> <label>{{tr "NotificationMethod"}}}</label>
<input type="text" name="NotificationTag" placeholder="default"> <input type="text" name="NotificationTag" placeholder="default">
</div> </div>
<div class="field"> <div class="field">
<div class="ui push-successful checkbox"> <div class="ui push-successful checkbox">
<input name="PushSuccessful" type="checkbox" tabindex="0" class="hidden"> <input name="PushSuccessful" type="checkbox" tabindex="0" class="hidden">
<label>推送成功的消息</label> <label>{{tr "PushSuccessMessages"}}</label>
</div> </div>
</div> </div>
</form> </form>
<div class="ui warning message"> <div class="ui warning message">
<p> <p>
计划的格式为:<code>* * * * * *</code>&nbsp;秒 分 时 天 月 星期,详情见 <a {{tr "TheFormaOfTheScheduleIs"}}<code>* * * * * *</code>&nbsp;{{tr "SecondsMinutesHoursDaysMonthsWeeksSeeDetails"}} <a
href="https://pkg.go.dev/github.com/robfig/cron/v3#hdr-CRON_Expression_Format" href="https://pkg.go.dev/github.com/robfig/cron/v3#hdr-CRON_Expression_Format"
target="_blank">计划表达式格式</a><br> target="_blank">{{tr "ScheduleExpressionFormat"}}</a><br>
命令:就像写 shell/bat 脚本一样,但是不推荐换行,多个命令使用 <code>&&</code>/<code>&</code> 连接,如果遇到 xxx 命令找不到,可能是 {{safe (tr "IntroductionOfCommands")}}
<code>PATH</code> 环境变量的问题,<code>Linux</code> 主机在命令开头加入
<code>source ~/.bashrc</code>或者使用绝对路径执行。
</p> </p>
</div> </div>
</div> </div>
<div class=" actions"> <div class=" actions">
<div class="ui negative button">取消</div> <div class="ui negative button">{{tr "Cancel"}}</div>
<button class="ui positive nezha-primary-btn right labeled icon button">确认<i class="checkmark icon"></i> <button class="ui positive nezha-primary-btn right labeled icon button">{{tr "Confirm"}}}}<i class="checkmark icon"></i>
</button> </button>
</div> </div>
</div> </div>

View File

@ -1,15 +1,15 @@
{{define "component/monitor"}} {{define "component/monitor"}}
<div class="ui tiny monitor modal transition hidden"> <div class="ui tiny monitor modal transition hidden">
<div class="header">添加监控</div> <div class="header">{{tr "AddMonitor"}}</div>
<div class="content"> <div class="content">
<form id="monitorForm" class="ui form"> <form id="monitorForm" class="ui form">
<input type="hidden" name="ID" /> <input type="hidden" name="ID" />
<div class="field"> <div class="field">
<label>名称</label> <label>{{tr "Name"}}</label>
<input type="text" name="Name" placeholder="博客" /> <input type="text" name="Name" placeholder="{{tr "Blog"}}" />
</div> </div>
<div class="field"> <div class="field">
<label>目标</label> <label>{{tr "Target"}}</label>
<input <input
type="text" type="text"
name="Target" name="Target"
@ -17,57 +17,54 @@
/> />
</div> </div>
<div class="field"> <div class="field">
<label>类型</label> <label>{{tr "Type"}}</label>
<select name="Type" class="ui fluid dropdown"> <select name="Type" class="ui fluid dropdown">
<option value="1">HTTP-GET(SSL到期、变更)</option> <option value="1">HTTP-GET{{tr "SslExpirationOrChange"}}</option>
<option value="2">ICMP-Ping</option> <option value="2">ICMP-Ping</option>
<option value="3">TCP-Ping</option> <option value="3">TCP-Ping</option>
</select> </select>
</div> </div>
<div class="field"> <div class="field">
<label>请求间隔</label> <label>{{tr "Duration"}}</label>
<input type="number" name="Duration" placeholder="" /> <input type="number" name="Duration" placeholder="{{tr "Seconds"}}" />
</div> </div>
<div class="field"> <div class="field">
<label>覆盖范围</label> <label>{{tr "Coverage"}}</label>
<select name="Cover" class="ui fluid dropdown"> <select name="Cover" class="ui fluid dropdown">
<option value="0">覆盖所有,仅忽略特定服务器</option> <option value="0">{{tr "AllIncludedOnlySpecificServersAreNotRequest"}}</option>
<option value="1">忽略所有,仅通过特定服务器请求</option> <option value="1">{{tr "IgnoreAllRequestOnlyThroughSpecificServers"}}</option>
</select> </select>
</div> </div>
<div class="field"> <div class="field">
<label>特定服务器</label> <label>{{tr "SpecificServers"}}</label>
<div class="ui fluid multiple servers search selection dropdown"> <div class="ui fluid multiple servers search selection dropdown">
<input type="hidden" name="SkipServersRaw" /> <input type="hidden" name="SkipServersRaw" />
<i class="dropdown icon"></i> <i class="dropdown icon"></i>
<div class="default text">输入ID/名称以搜索</div> <div class="default text">{{tr "EnterIdAndNameToSearch"}}}}</div>
<div class="menu"></div> <div class="menu"></div>
</div> </div>
</div> </div>
<div class="field"> <div class="field">
<label>通知方式组</label> <label>{{tr "NotificationMethod"}}</label>
<input type="text" name="NotificationTag" placeholder="default" /> <input type="text" name="NotificationTag" placeholder="default" />
</div> </div>
<div class="field"> <div class="field">
<div class="ui nb-notify checkbox"> <div class="ui nb-notify checkbox">
<input name="Notify" type="checkbox" tabindex="0" class="hidden" /> <input name="Notify" type="checkbox" tabindex="0" class="hidden" />
<label>启用故障通知</label> <label>{{tr "EnableFailureNotification"}}</label>
</div> </div>
</div> </div>
</form> </form>
<div class="ui warning message"> <div class="ui warning message">
<p> <p>
类型为 <b>HTTP-GET</b> 时输入URL(带 http/https, HTTPS {{safe (tr "IntroductionOfMonitor")}}
协议的会顺带监控SSL证书)<br />
类型为 <b>ICMP-Ping</b> 时输入主机名/IP不带端口<br />
类型为 <b>TCP-Ping</b> 时输入主机名/IP + 端口号example.com:22
</p> </p>
</div> </div>
</div> </div>
<div class="actions"> <div class="actions">
<div class="ui negative button">取消</div> <div class="ui negative button">{{tr "Cancel"}}</div>
<button class="ui positive nezha-primary-btn right labeled icon button"> <button class="ui positive nezha-primary-btn right labeled icon button">
确认<i class="checkmark icon"></i> {{tr "Confirm"}}<i class="checkmark icon"></i>
</button> </button>
</div> </div>
</div> </div>

View File

@ -1,15 +1,15 @@
{{define "component/notification"}} {{define "component/notification"}}
<div class="ui tiny notification modal transition hidden"> <div class="ui tiny notification modal transition hidden">
<div class="header">添加通知方式</div> <div class="header">{{tr "AddNotificationMethod"}}</div>
<div class="content"> <div class="content">
<form id="notificationForm" class="ui form"> <form id="notificationForm" class="ui form">
<input type="hidden" name="ID"> <input type="hidden" name="ID">
<div class="field"> <div class="field">
<label>名称</label> <label>{{tr "Name"}}</label>
<input type="text" name="Name"> <input type="text" name="Name">
</div> </div>
<div class="field"> <div class="field">
<label>分组</label> <label>{{tr "Tag"}}</label>
<input type="text" name="Tag" placeholder="default"> <input type="text" name="Tag" placeholder="default">
</div> </div>
<div class="field"> <div class="field">
@ -17,14 +17,14 @@
<input type="text" name="URL"> <input type="text" name="URL">
</div> </div>
<div class="field"> <div class="field">
<label>请求方式</label> <label>{{tr "RequestMethod"}}</label>
<select name="RequestMethod" class="ui fluid dropdown"> <select name="RequestMethod" class="ui fluid dropdown">
<option value="1">GET</option> <option value="1">GET</option>
<option value="2">POST</option> <option value="2">POST</option>
</select> </select>
</div> </div>
<div class="field"> <div class="field">
<label>请求类型</label> <label>{{tr "RequestType"}}</label>
<select name="RequestType" class="ui fluid dropdown"> <select name="RequestType" class="ui fluid dropdown">
<option value="1">JSON</option> <option value="1">JSON</option>
<option value="2">FORM</option> <option value="2">FORM</option>
@ -41,20 +41,20 @@
<div class="field"> <div class="field">
<div class="ui nf-ssl checkbox"> <div class="ui nf-ssl checkbox">
<input name="VerifySSL" type="checkbox" tabindex="0" class="hidden"> <input name="VerifySSL" type="checkbox" tabindex="0" class="hidden">
<label>验证SSL</label> <label>{{tr "VerifySSL"}}</label>
</div> </div>
</div> </div>
<div class="field"> <div class="field">
<div class="ui nf-skip-check checkbox"> <div class="ui nf-skip-check checkbox">
<input name="SkipCheck" type="checkbox" tabindex="0" class="hidden"> <input name="SkipCheck" type="checkbox" tabindex="0" class="hidden">
<label>不发送测试信息</label> <label>{{tr "DoNotSendTestMessages"}}</label>
</div> </div>
</div> </div>
</form> </form>
</div> </div>
<div class="actions"> <div class="actions">
<div class="ui negative button">取消</div> <div class="ui negative button">{{tr "Cancel"}}</div>
<button class="ui positive nezha-primary-btn right labeled icon button">确认<i class="checkmark icon"></i> <button class="ui positive nezha-primary-btn right labeled icon button">{{tr "Confirm"}}<i class="checkmark icon"></i>
</button> </button>
</div> </div>
</div> </div>

View File

@ -1,32 +1,32 @@
{{define "component/rule"}} {{define "component/rule"}}
<div class="ui tiny rule modal transition hidden"> <div class="ui tiny rule modal transition hidden">
<div class="header">添加通知规则</div> <div class="header">{{tr "AddNotificationRule"}}</div>
<div class="content"> <div class="content">
<form id="ruleForm" class="ui form"> <form id="ruleForm" class="ui form">
<input type="hidden" name="ID"> <input type="hidden" name="ID">
<div class="field"> <div class="field">
<label>名称</label> <label>{{tr "Name"}}</label>
<input type="text" name="Name"> <input type="text" name="Name">
</div> </div>
<div class="secret field"> <div class="secret field">
<label>规则</label> <label>{{tr "Rules"}}</label>
<textarea name="RulesRaw"></textarea> <textarea name="RulesRaw"></textarea>
</div> </div>
<div class="field"> <div class="field">
<label>通知方式组</label> <label>{{tr "NotificationMethod"}}</label>
<input type="text" name="NotificationTag" placeholder="default"> <input type="text" name="NotificationTag" placeholder="default">
</div> </div>
<div class="field"> <div class="field">
<div class="ui rule-enable checkbox"> <div class="ui rule-enable checkbox">
<input name="Enable" type="checkbox" tabindex="0" class="hidden"> <input name="Enable" type="checkbox" tabindex="0" class="hidden">
<label>启用</label> <label>{{tr "Enable"}}</label>
</div> </div>
</div> </div>
</form> </form>
</div> </div>
<div class="actions"> <div class="actions">
<div class="ui negative button">取消</div> <div class="ui negative button">{{tr "Cancel"}}</div>
<button class="ui positive nezha-primary-btn right labeled icon button">确认<i class="checkmark icon"></i> <button class="ui positive nezha-primary-btn right labeled icon button">{{tr "Confirm"}}<i class="checkmark icon"></i>
</button> </button>
</div> </div>
</div> </div>

View File

@ -1,32 +1,32 @@
{{define "component/server"}} {{define "component/server"}}
<div class="ui tiny server modal transition hidden"> <div class="ui tiny server modal transition hidden">
<div class="header">添加服务器</div> <div class="header">{{tr "AddServer"}}</div>
<div class="content"> <div class="content">
<form id="serverForm" class="ui form"> <form id="serverForm" class="ui form">
<input type="hidden" name="id"> <input type="hidden" name="id">
<div class="field"> <div class="field">
<label>名称</label> <label>{{tr "Name"}}</label>
<input type="text" name="name" placeholder="爱因斯坦-光速1号"> <input type="text" name="name" placeholder="{{tr "EinsteinLightspeed1"}}">
</div> </div>
<div class="field"> <div class="field">
<label>分组</label> <label>{{tr "Tag"}}</label>
<input type="text" name="Tag" placeholder="服务器分组"> <input type="text" name="Tag" placeholder="{{tr "ServerGroup"}}">
</div> </div>
<div class="field"> <div class="field">
<label>排序</label> <label>{{tr "DisplayIndex"}}</label>
<input type="number" name="DisplayIndex" placeholder="越大越靠前"> <input type="number" name="DisplayIndex" placeholder="{{tr "TheLargerTheNumberTheHigherThePriority"}}">
</div> </div>
<div class="secret field"> <div class="secret field">
<label>密钥</label> <label>{{tr "Secret"}}</label>
<input type="text" name="secret"> <input type="text" name="secret">
</div> </div>
<div class="field"> <div class="field">
<label>备注</label> <label>{{tr "Note"}}</label>
<textarea name="Note"></textarea> <textarea name="Note"></textarea>
</div> </div>
<div class="command field"> <div class="command field">
<label>Linux 一键安装</label> <label>{{tr "LinuxOneKeyInstall"}}</label>
<div class="ui message"> <div class="ui message">
{{if .Conf.GRPCHost}} {{if .Conf.GRPCHost}}
curl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install.sh -o nezha.sh && chmod curl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install.sh -o nezha.sh && chmod
@ -34,15 +34,15 @@
class="command">{{if .Conf.ProxyGRPCPort}}{{.Conf.ProxyGRPCPort}}{{else}}{{.Conf.GRPCPort}}{{end}}</code> <code class="command">{{if .Conf.ProxyGRPCPort}}{{.Conf.ProxyGRPCPort}}{{else}}{{.Conf.GRPCPort}}{{end}}</code> <code
class="command hostSecret"></code> <code class="command">{{if .Conf.TLS}}--tls{{end}}</code> class="command hostSecret"></code> <code class="command">{{if .Conf.TLS}}--tls{{end}}</code>
{{else}} {{else}}
请先在设置页面配置 未接入CDN的面板服务器域名/IP {{tr "NoDomainAlert"}}
{{end}} {{end}}
</div> </div>
</div> </div>
</form> </form>
</div> </div>
<div class=" actions"> <div class=" actions">
<div class="ui negative button">取消</div> <div class="ui negative button">{{tr "Cancel"}}</div>
<button class="ui positive nezha-primary-btn right labeled icon button">确认<i class="checkmark icon"></i> <button class="ui positive nezha-primary-btn right labeled icon button">{{tr "Confirm"}}<i class="checkmark icon"></i>
</button> </button>
</div> </div>
</div> </div>

View File

@ -6,7 +6,7 @@
<div class="ui grid"> <div class="ui grid">
<div class="right floated right aligned twelve wide column"> <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> <button class="ui right labeled nezha-primary-btn icon button" onclick="addOrEditCron()"><i class="add icon"></i>
添加计划任务 {{tr "AddScheduledTasks"}}
</button> </button>
</div> </div>
</div> </div>
@ -14,16 +14,16 @@
<thead> <thead>
<tr> <tr>
<th>ID</th> <th>ID</th>
<th>名称</th> <th>{{tr "Name"}}</th>
<th>计划</th> <th>{{tr "Scheduler"}}</th>
<th>命令</th> <th>{{tr "Command"}}</th>
<th>通知方式组</th> <th>{{tr "NotificationMethod"}}</th>
<th>成功推送</th> <th>{{tr "PushSuccessfully"}}</th>
<th>覆盖范围</th> <th>{{tr "Coverage"}}</th>
<th>特定服务器</th> <th>{{tr "SpecificServers"}}</th>
<th>最后执行</th> <th>{{tr "LastExecution"}}</th>
<th>最后结果</th> <th>{{tr "LastResult"}}</th>
<th>管理</th> <th>{{tr "Administration"}}</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -35,7 +35,7 @@
<td>{{$cron.Command}}</td> <td>{{$cron.Command}}</td>
<td>{{$cron.NotificationTag}}</td> <td>{{$cron.NotificationTag}}</td>
<td>{{$cron.PushSuccessful}}</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.ServersRaw}}</td>
<td>{{$cron.LastExecutedAt|tf}}</td> <td>{{$cron.LastExecutedAt|tf}}</td>
<td>{{$cron.LastResult}}</td> <td>{{$cron.LastResult}}</td>
@ -48,7 +48,7 @@
<i class="edit icon"></i> <i class="edit icon"></i>
</button> </button>
<button class="ui 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> <i class="trash alternate outline icon"></i>
</button> </button>
</div> </div>

View File

@ -6,7 +6,7 @@
<h2 class="ui image header"> <h2 class="ui image header">
<img src="/static/logo.svg?v20210804" class="image"> <img src="/static/logo.svg?v20210804" class="image">
<div class="content"> <div class="content">
访问受限 {{tr "AccessDenied"}}
</div> </div>
</h2> </h2>
<div class="ui message"> <div class="ui message">

View File

@ -6,12 +6,12 @@
<h2 class="ui image header"> <h2 class="ui image header">
<img src="static/logo.svg?v20210804" class="image"> <img src="static/logo.svg?v20210804" class="image">
<div class="content"> <div class="content">
使用 {{.LoginType}} 账号登录 {{tr "Use"}} {{.LoginType}} {{tr "AccountToLogin"}}
</div> </div>
</h2> </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"> <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> </div>
</div> </div>

View File

@ -5,7 +5,7 @@
<div class="ui grid"> <div class="ui grid">
<div class="right floated right aligned twelve wide column"> <div class="right floated right aligned twelve wide column">
<button class="ui right labeled nezha-primary-btn icon button" onclick="addOrEditMonitor()"> <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> </button>
</div> </div>
</div> </div>
@ -13,15 +13,15 @@
<thead> <thead>
<tr> <tr>
<th>ID</th> <th>ID</th>
<th>名称</th> <th>{{tr "Name"}}</th>
<th>目标</th> <th>{{tr "Target"}}</th>
<th>覆盖范围</th> <th>{{tr "Coverage"}}</th>
<th>特定服务器</th> <th>{{tr "SpecificServers"}}</th>
<th>类型</th> <th>{{tr "Type"}}</th>
<th>请求间隔</th> <th>{{tr "Duration"}}</th>
<th>通知方式组</th> <th>{{tr "NotificationMethod"}}</th>
<th>通知</th> <th>{{tr "Notification"}}</th>
<th>管理</th> <th>{{tr "Administration"}}</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -30,13 +30,13 @@
<td>{{$monitor.ID}}</td> <td>{{$monitor.ID}}</td>
<td>{{$monitor.Name}}</td> <td>{{$monitor.Name}}</td>
<td>{{$monitor.Target}}</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>{{$monitor.SkipServersRaw}}</td>
<td> <td>
{{if eq $monitor.Type 1}}HTTP(S)/SSL证书 {{else if eq $monitor.Type {{if eq $monitor.Type 1}}{{tr "SSLCertificate"}} {{else if eq $monitor.Type
2}} ICMP Ping {{else}} TCP 端口 {{end}} 2}} ICMP Ping {{else}} {{tr "TCPPort"}} {{end}}
</td> </td>
<td>{{$monitor.Duration}}</td> <td>{{$monitor.Duration}}{{tr "Seconds"}}</td>
<td>{{$monitor.NotificationTag}}</td> <td>{{$monitor.NotificationTag}}</td>
<td>{{$monitor.Notify}}</td> <td>{{$monitor.Notify}}</td>
<td> <td>
@ -45,7 +45,7 @@
<i class="edit icon"></i> <i class="edit icon"></i>
</button> </button>
<button class="ui 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> <i class="trash alternate outline icon"></i>
</button> </button>
</div> </div>

View File

@ -6,7 +6,7 @@
<div class="ui grid"> <div class="ui grid">
<div class="right floated right aligned twelve wide column"> <div class="right floated right aligned twelve wide column">
<button class="ui right labeled nezha-primary-btn icon button" onclick="addOrEditNotification()"><i <button class="ui right labeled nezha-primary-btn icon button" onclick="addOrEditNotification()"><i
class="add icon"></i> 添加通知方式 class="add icon"></i> {{tr "AddNotificationMethod"}}
</button> </button>
</div> </div>
</div> </div>
@ -14,11 +14,11 @@
<thead> <thead>
<tr> <tr>
<th>ID</th> <th>ID</th>
<th>名称</th> <th>{{tr "Name"}}</th>
<th>分组</th> <th>{{tr "Tag"}}</th>
<th>URL</th> <th>URL</th>
<th>验证SSL</th> <th>{{tr "VerifySSL"}}</th>
<th>管理</th> <th>{{tr "Administration"}}</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -35,7 +35,7 @@
<i class="edit icon"></i> <i class="edit icon"></i>
</button> </button>
<button class="ui 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> <i class="trash alternate outline icon"></i>
</button> </button>
</div> </div>
@ -48,7 +48,7 @@
<div class="right floated right aligned twelve wide column"> <div class="right floated right aligned twelve wide column">
<button class="ui right labeled nezha-primary-btn icon button" onclick="addOrEditAlertRule()"><i <button class="ui right labeled nezha-primary-btn icon button" onclick="addOrEditAlertRule()"><i
class="add icon"></i> class="add icon"></i>
添加报警规则 {{tr "AddNotificationRule"}}
</button> </button>
</div> </div>
</div> </div>
@ -56,11 +56,11 @@
<thead> <thead>
<tr> <tr>
<th>ID</th> <th>ID</th>
<th>名称</th> <th>{{tr "Name"}}</th>
<th>通知方式组</th> <th>{{tr "NotificationMethod"}}</th>
<th>规则</th> <th>{{tr "Rules"}}</th>
<th>启用</th> <th>{{tr "Enable"}}</th>
<th>管理</th> <th>{{tr "Administration"}}</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -77,7 +77,7 @@
<i class="edit icon"></i> <i class="edit icon"></i>
</button> </button>
<button class="ui 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> <i class="trash alternate outline icon"></i>
</button> </button>
</div> </div>

View File

@ -6,26 +6,26 @@
<div class="ui grid"> <div class="ui grid">
<div class="right floated right aligned twelve wide column"> <div class="right floated right aligned twelve wide column">
<button class="ui right labeled nezha-primary-btn icon button" onclick="addOrEditServer()"><i <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>
<button class="ui right labeled nezha-primary-btn icon button" onclick="forceUpdate()"><i <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> </button>
</div> </div>
</div> </div>
<table class="ui very basic table"> <table class="ui very basic table">
<thead> <thead>
<tr> <tr>
<th><button onclick="checkAllServer()" class="ui mini nezha-primary-btn button">全选</button></th> <th><button onclick="checkAllServer()" class="ui mini nezha-primary-btn button">{{tr "SelectAll"}}</button></th>
<th>ID(排序)</th> <th>ID({{tr "DisplayIndex"}})</th>
<th>名称</th> <th>{{tr "Name"}}</th>
<th>分组</th> <th>{{tr "Tag"}}</th>
<th>IP</th> <th>IP</th>
<th>版本号</th> <th>{{tr "VersionNumber"}}</th>
<th>密钥</th> <th>{{tr "Secret"}}</th>
<th>一键安装</th> <th>{{tr "OneKeyInstall"}}</th>
<th>备注</th> <th>{{tr "Note"}}</th>
<th>管理</th> <th>{{tr "Administration"}}</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -40,16 +40,17 @@
<td>{{$server.Secret}}</td> <td>{{$server.Secret}}</td>
<td> <td>
<button class="ui icon green mini button" <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-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="点击复制安装命令"> data-tooltip="{{tr "ClickToCopyTheInstallationCommand"}}">
<i class="linux icon"></i> <i class="linux icon"></i>
</button> </button>
<button class="ui icon mini button" data-tooltip="{{tr "NotSupportedYet"}}">
<button class="ui icon green mini button" <button class="ui icon green mini button"
data-clipboard-text="{{if $.Conf.GRPCHost}}set-ExecutionPolicy RemoteSigned;Invoke-WebRequest https://raw.githubusercontent.com/naiba/nezha/master/script/install.ps1 -OutFile C:\install.ps1;powershell.exe C:\install.ps1 {{$.Conf.GRPCHost}}:{{if $.Conf.ProxyGRPCPort}}{{$.Conf.ProxyGRPCPort}}{{else}}{{$.Conf.GRPCPort}}{{end}} {{$server.Secret}}{{if $.Conf.TLS}} --tls{{end}}{{else}}请先在设置页面配置 未接入CDN的面板服务器域名/IP{{end}}" data-clipboard-text="{{if $.Conf.GRPCHost}}set-ExecutionPolicy RemoteSigned;Invoke-WebRequest https://raw.githubusercontent.com/naiba/nezha/master/script/install.ps1 -OutFile C:\install.ps1;powershell.exe C:\install.ps1 {{$.Conf.GRPCHost}}:{{if $.Conf.ProxyGRPCPort}}{{$.Conf.ProxyGRPCPort}}{{else}}{{$.Conf.GRPCPort}}{{end}} {{$server.Secret}}{{if $.Conf.TLS}} --tls{{end}}{{else}}{{tr "NoDomainAlert"}}{{end}}"
data-tooltip="点击复制安装命令"> data-tooltip="{{tr "ClickToCopyTheInstallationCommand"}}">
<i class="windows icon"></i> <i class="windows icon"></i>
</button> </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> <i class="apple icon"></i>
</button> </button>
</td> </td>
@ -63,7 +64,7 @@
<i class="edit icon"></i> <i class="edit icon"></i>
</button> </button>
<button class="ui 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> <i class="trash alternate outline icon"></i>
</button> </button>
</div> </div>
@ -94,7 +95,7 @@
}) })
if (servers.length == 0) { if (servers.length == 0) {
$.suiAlert({ $.suiAlert({
title: '当前没有选中的服务器', title: '{{tr "NoServerSelected"}}',
description: '', description: '',
type: 'warning', type: 'warning',
time: '2', time: '2',
@ -106,7 +107,7 @@
.then((resp) => { .then((resp) => {
if (resp.code == 200) { if (resp.code == 200) {
$.suiAlert({ $.suiAlert({
title: '执行结果', title: '{{tr "ExecutionResults"}}',
description: resp.message, description: resp.message,
type: 'success', type: 'success',
time: '3', time: '3',

View File

@ -5,17 +5,17 @@
<div class="ui container"> <div class="ui container">
<form id="settingForm" class="ui large form" onsubmit="return false;"> <form id="settingForm" class="ui large form" onsubmit="return false;">
<div class="field"> <div class="field">
<label>站点标题</label> <label>{{tr "SiteTitle"}}</label>
<input type="text" name="Title" placeholder='{{tr "nezhaMonitor"}}' value="{{.Conf.Site.Brand}}"> <input type="text" name="Title" placeholder="{{tr "nezhaMonitor"}}" value="{{.Conf.Site.Brand}}">
</div> </div>
<div class="field"> <div class="field">
<label>管理员列表</label> <label>{{tr "AdministratorList"}}</label>
<input type="text" name="Admin" placeholder="1010,2020" value="{{.Conf.Oauth2.Admin}}"> <input type="text" name="Admin" placeholder="1010,2020" value="{{.Conf.Oauth2.Admin}}">
</div> </div>
<div class="field"> <div class="field">
<label>前台主题</label> <label>{{tr "Theme"}}</label>
<select name="Theme"> <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>
<option value="daynight" {{if eq .Conf.Site.Theme "daynight" }} selected="selected" {{end}}> <option value="daynight" {{if eq .Conf.Site.Theme "daynight" }} selected="selected" {{end}}>
JackieSung DayNight</option> JackieSung DayNight</option>
@ -25,51 +25,51 @@
</select> </select>
</div> </div>
<div class="field"> <div class="field">
<label>自定义代码(style、script 都可以)</label> <label>{{tr "CustomCodes"}}</label>
<textarea name="CustomCode">{{.Conf.Site.CustomCode}}</textarea> <textarea name="CustomCode">{{.Conf.Site.CustomCode}}</textarea>
</div> </div>
<div class="field"> <div class="field">
<label>前台查看密码</label> <label>{{tr "AccessPassword"}}}</label>
<input type="text" name="ViewPassword" placeholder="" value="{{.Conf.Site.ViewPassword}}"> <input type="text" name="ViewPassword" placeholder="" value="{{.Conf.Site.ViewPassword}}">
</div> </div>
<div class="field"> <div class="field">
<label>未接入CDN的面板服务器域名/IP</label> <label>{{tr "PanelServerDomainAndIP"}}</label>
<input type="text" name="GRPCHost" placeholder="" value="{{.Conf.GRPCHost}}"> <input type="text" name="GRPCHost" placeholder="" value="{{.Conf.GRPCHost}}">
</div> </div>
<div class="field"> <div class="field">
<label>IP 变更提醒</label> <label>{{tr "IPChangeAlert"}}</label>
</div> </div>
<div class="ui segment"> <div class="ui segment">
<div class="field"> <div class="field">
<label>覆盖范围</label> <label>{{tr "Coverage"}}</label>
<select name="Cover" class="ui fluid dropdown"> <select name="Cover" class="ui fluid dropdown">
<option value=0>覆盖所有,仅特定服务器不提醒</option> <option value=0>{{tr "AllIncludedOnlySpecificServersAreNotAlerted"}}</option>
<option value=1>忽略所有,仅提醒特定服务器</option> <option value=1>{{tr "IgnoreAllOnlyAlertSpecificServers"}}</option>
</select> </select>
</div> </div>
<div class="field"> <div class="field">
<label>特定服务器</label> <label>{{tr "SpecificServers"}}</label>
<input type="text" name="IgnoredIPNotification" placeholder="服务器ID 以逗号隔开 1001,1002,1003" <input type="text" name="IgnoredIPNotification" placeholder="{{tr "ServerIDSeparatedByCommas"}} 1001,1002,1003"
value="{{.Conf.IgnoredIPNotification}}"> value="{{.Conf.IgnoredIPNotification}}">
</div> </div>
<div class="field"> <div class="field">
<label>提醒发送至指定的通知分组</label> <label>{{tr "IPChangeNotificationTag"}}</label>
<input type="text" name="IPChangeNotificationTag" placeholder="" value="{{.Conf.IPChangeNotificationTag}}"> <input type="text" name="IPChangeNotificationTag" placeholder="" value="{{.Conf.IPChangeNotificationTag}}">
</div> </div>
<div class="field"> <div class="field">
<div class="ui nf-ssl checkbox ip-change"> <div class="ui nf-ssl checkbox ip-change">
<input name="EnableIPChangeNotification" type="checkbox" tabindex="0" class="hidden"> <input name="EnableIPChangeNotification" type="checkbox" tabindex="0" class="hidden">
<label>启用</label> <label>{{tr "Enable"}}</label>
</div> </div>
</div> </div>
</div> </div>
<div class="field"> <div class="field">
<div class="ui nf-ssl checkbox plain-ip"> <div class="ui nf-ssl checkbox plain-ip">
<input name="EnablePlainIPInNotification" type="checkbox" tabindex="0" class="hidden"> <input name="EnablePlainIPInNotification" type="checkbox" tabindex="0" class="hidden">
<label>通知信息IP不打码</label> <label>{{tr "NotificationMessagesDoNotHideIP"}}</label>
</div> </div>
</div> </div>
<button class="ui button" type="submit">保存</button> <button class="ui button" type="submit">{{tr "Save"}}</button>
</form> </form>
</div> </div>
</div> </div>
@ -81,7 +81,7 @@
if (resp.code == 200) { if (resp.code == 200) {
$.suiAlert({ $.suiAlert({
title: '', title: '',
description: '修改成功', description: '{{tr "ModifiedSuccessfully"}}',
type: 'success', type: 'success',
time: '3', time: '3',
position: 'top-center', position: 'top-center',

View File

@ -84,12 +84,12 @@
} }
socket.onclose = () => { socket.onclose = () => {
alert('Terminal 连接超时或会话已结束') alert('{{tr "TerminalConnectionTimeOutOrSessionEnded"}}')
window.close() window.close()
} }
socket.onerror = () => { socket.onerror = () => {
alert('Terminal 连接失败,请检查 /terminal/* 的 WebSocket 反代情况') alert('{{tr "TerminalConnectionFailed"}}')
} }
</script> </script>
</body> </body>