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:
		
						commit
						58aea2b0f2
					
				
							
								
								
									
										215
									
								
								resource/l10n/zh-CN.toml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										215
									
								
								resource/l10n/zh-CN.toml
									
									
									
									
										vendored
									
									
								
							@ -1,2 +1,217 @@
 | 
			
		||||
[nezhaMonitor]
 | 
			
		||||
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, HTTPS协议的会顺带监控SSL证书);<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 反代情况"
 | 
			
		||||
							
								
								
									
										24
									
								
								resource/template/common/menu.html
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										24
									
								
								resource/template/common/menu.html
									
									
									
									
										vendored
									
									
								
							@ -5,16 +5,16 @@
 | 
			
		||||
            <img src="/static/logo.svg?v20210804">
 | 
			
		||||
        </div>
 | 
			
		||||
        {{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 "/monitor"}} active{{end}}' href="/monitor"><i class="rss icon"></i>服务</a>
 | 
			
		||||
        <a class='item{{if eq .MatchedPath "/cron"}} active{{end}}' href="/cron"><i class="clock icon"></i>任务</a>
 | 
			
		||||
        <a class='item{{if eq .MatchedPath "/notification"}} active{{end}}' href="/notification"><i class="bell 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>{{tr "Services"}}</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>{{tr "Notification"}}</a>
 | 
			
		||||
        <a class='item{{if eq .MatchedPath "/setting"}} active{{end}}' href="/setting">
 | 
			
		||||
            <i class="settings icon"></i>设置
 | 
			
		||||
            <i class="settings icon"></i>{{tr "Settings"}}
 | 
			
		||||
        </a>
 | 
			
		||||
        {{else}}
 | 
			
		||||
        <a class='item{{if eq .MatchedPath "/"}} active{{end}}' href="/"><i class="home icon"></i>首页</a>
 | 
			
		||||
        <a class='item{{if eq .MatchedPath "/service"}} active{{end}}' href="/service"><i class="rss 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>{{tr "Services"}}</a>
 | 
			
		||||
        {{end}}
 | 
			
		||||
        <div class="right menu">
 | 
			
		||||
            <div class="item">
 | 
			
		||||
@ -27,20 +27,20 @@
 | 
			
		||||
                    <div class="menu">
 | 
			
		||||
                        {{if .IsAdminPage}}
 | 
			
		||||
                        <a class="item" href="/">
 | 
			
		||||
                            <i class="chart area icon"></i>返回前台
 | 
			
		||||
                            <i class="chart area icon"></i>{{tr "BackToHomepage"}}
 | 
			
		||||
                        </a>
 | 
			
		||||
                        {{else}}
 | 
			
		||||
                        <a class="item" href="/server">
 | 
			
		||||
                            <i class="terminal icon"></i>管理后台
 | 
			
		||||
                            <i class="terminal icon"></i>{{tr "AdminPanel"}}
 | 
			
		||||
                        </a>
 | 
			
		||||
                        {{end}}
 | 
			
		||||
                        <button class="item" onclick="showConfirm('确认注销?','注销后您必须重新登录才能使用',logout,{{.Admin.ID}})">
 | 
			
		||||
                            <i class="logout icon"></i>注销登录
 | 
			
		||||
                        <button class="item" onclick="showConfirm('{{tr "ConfirmLogout"}}','{{tr "AfterLoggingOutYouHaveToLoginAgain"}}',logout,{{.Admin.ID}})">
 | 
			
		||||
                            <i class="logout icon"></i>{{tr "Logout"}}
 | 
			
		||||
                        </button>
 | 
			
		||||
                    </div>
 | 
			
		||||
                </div>
 | 
			
		||||
                {{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}}
 | 
			
		||||
            </div>
 | 
			
		||||
        </div>
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										4
									
								
								resource/template/component/confirm.html
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								resource/template/component/confirm.html
									
									
									
									
										vendored
									
									
								
							@ -4,8 +4,8 @@
 | 
			
		||||
    <div class="content">
 | 
			
		||||
    </div>
 | 
			
		||||
    <div class="actions">
 | 
			
		||||
        <div class="ui negative button">取消</div>
 | 
			
		||||
        <button class="ui positive nezha-primary-btn right labeled icon button">确认<i class="checkmark icon"></i>
 | 
			
		||||
        <div class="ui negative button">{{tr "Cancel"}}</div>
 | 
			
		||||
        <button class="ui positive nezha-primary-btn right labeled icon button">{{tr "Confirm"}}<i class="checkmark icon"></i>
 | 
			
		||||
        </button>
 | 
			
		||||
    </div>
 | 
			
		||||
</div>
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										38
									
								
								resource/template/component/cron.html
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										38
									
								
								resource/template/component/cron.html
									
									
									
									
										vendored
									
									
								
							@ -1,62 +1,60 @@
 | 
			
		||||
{{define "component/cron"}}
 | 
			
		||||
<div class="ui tiny cron modal transition hidden">
 | 
			
		||||
    <div class="header">添加计划任务</div>
 | 
			
		||||
    <div class="header">{{tr "AddScheduledTasks"}}</div>
 | 
			
		||||
    <div class="content">
 | 
			
		||||
        <form id="cronForm" class="ui form">
 | 
			
		||||
            <input type="hidden" name="ID">
 | 
			
		||||
            <div class="field">
 | 
			
		||||
                <label>名称</label>
 | 
			
		||||
                <input type="text" name="Name" placeholder="备份">
 | 
			
		||||
                <label>{{tr "Name"}}</label>
 | 
			
		||||
                <input type="text" name="Name" placeholder="{{tr "BackUp"}}">
 | 
			
		||||
            </div>
 | 
			
		||||
            <div class="field">
 | 
			
		||||
                <label>计划</label>
 | 
			
		||||
                <input type="text" name="Scheduler" placeholder="0 0 3 * * *(每天3点)">
 | 
			
		||||
                <label>{{tr "Scheduler"}}</label>
 | 
			
		||||
                <input type="text" name="Scheduler" placeholder="0 0 3 * * *{{tr "3amDaily"}}">
 | 
			
		||||
            </div>
 | 
			
		||||
            <div class="field">
 | 
			
		||||
                <label>命令</label>
 | 
			
		||||
                <label>{{tr "Command"}}</label>
 | 
			
		||||
                <textarea name="Command"></textarea>
 | 
			
		||||
            </div>
 | 
			
		||||
            <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 "IgnoreAllAndExecuteOnlyThroughSpecificServers"}}</option>
 | 
			
		||||
                    <option value="1">{{tr "AllIncludedOnlySpecificServersAreNotExecuted"}}</option>
 | 
			
		||||
                </select>
 | 
			
		||||
            </div>
 | 
			
		||||
            <div class="field">
 | 
			
		||||
                <label>特定服务器</label>
 | 
			
		||||
                <label>{{tr "SpecificServers"}}</label>
 | 
			
		||||
                <div class="ui fluid multiple servers search selection dropdown">
 | 
			
		||||
                    <input type="hidden" name="ServersRaw">
 | 
			
		||||
                    <i class="dropdown icon"></i>
 | 
			
		||||
                    <div class="default text">输入ID/名称以搜索</div>
 | 
			
		||||
                    <div class="default text">{{tr "EnterIdAndNameToSearch"}}</div>
 | 
			
		||||
                    <div class="menu"></div>
 | 
			
		||||
                </div>
 | 
			
		||||
            </div>
 | 
			
		||||
            <div class="field">
 | 
			
		||||
                <label>通知方式组</label>
 | 
			
		||||
                <label>{{tr "NotificationMethod"}}}</label>
 | 
			
		||||
                <input type="text" name="NotificationTag" placeholder="default">
 | 
			
		||||
            </div>
 | 
			
		||||
            <div class="field">
 | 
			
		||||
                <div class="ui push-successful checkbox">
 | 
			
		||||
                    <input name="PushSuccessful" type="checkbox" tabindex="0" class="hidden">
 | 
			
		||||
                    <label>推送成功的消息</label>
 | 
			
		||||
                    <label>{{tr "PushSuccessMessages"}}</label>
 | 
			
		||||
                </div>
 | 
			
		||||
            </div>
 | 
			
		||||
        </form>
 | 
			
		||||
        <div class="ui warning message">
 | 
			
		||||
            <p>
 | 
			
		||||
                计划的格式为:<code>* * * * * *</code> 秒 分 时 天 月 星期,详情见 <a
 | 
			
		||||
                {{tr "TheFormaOfTheScheduleIs"}}<code>* * * * * *</code> {{tr "SecondsMinutesHoursDaysMonthsWeeksSeeDetails"}} <a
 | 
			
		||||
                    href="https://pkg.go.dev/github.com/robfig/cron/v3#hdr-CRON_Expression_Format"
 | 
			
		||||
                    target="_blank">计划表达式格式</a><br>
 | 
			
		||||
                命令:就像写 shell/bat 脚本一样,但是不推荐换行,多个命令使用 <code>&&</code>/<code>&</code> 连接,如果遇到 xxx 命令找不到,可能是
 | 
			
		||||
                <code>PATH</code> 环境变量的问题,<code>Linux</code> 主机在命令开头加入
 | 
			
		||||
                <code>source ~/.bashrc</code>或者使用绝对路径执行。
 | 
			
		||||
                    target="_blank">{{tr "ScheduleExpressionFormat"}}</a><br>
 | 
			
		||||
                {{safe (tr "IntroductionOfCommands")}}
 | 
			
		||||
            </p>
 | 
			
		||||
        </div>
 | 
			
		||||
    </div>
 | 
			
		||||
    <div class=" actions">
 | 
			
		||||
        <div class="ui negative button">取消</div>
 | 
			
		||||
        <button class="ui positive nezha-primary-btn right labeled icon button">确认<i class="checkmark icon"></i>
 | 
			
		||||
        <div class="ui negative button">{{tr "Cancel"}}</div>
 | 
			
		||||
        <button class="ui positive nezha-primary-btn right labeled icon button">{{tr "Confirm"}}}}<i class="checkmark icon"></i>
 | 
			
		||||
        </button>
 | 
			
		||||
    </div>
 | 
			
		||||
</div>
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										39
									
								
								resource/template/component/monitor.html
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										39
									
								
								resource/template/component/monitor.html
									
									
									
									
										vendored
									
									
								
							@ -1,15 +1,15 @@
 | 
			
		||||
{{define "component/monitor"}}
 | 
			
		||||
<div class="ui tiny monitor modal transition hidden">
 | 
			
		||||
  <div class="header">添加监控</div>
 | 
			
		||||
  <div class="header">{{tr "AddMonitor"}}</div>
 | 
			
		||||
  <div class="content">
 | 
			
		||||
    <form id="monitorForm" class="ui form">
 | 
			
		||||
      <input type="hidden" name="ID" />
 | 
			
		||||
      <div class="field">
 | 
			
		||||
        <label>名称</label>
 | 
			
		||||
        <input type="text" name="Name" placeholder="博客" />
 | 
			
		||||
        <label>{{tr "Name"}}</label>
 | 
			
		||||
        <input type="text" name="Name" placeholder="{{tr "Blog"}}" />
 | 
			
		||||
      </div>
 | 
			
		||||
      <div class="field">
 | 
			
		||||
        <label>目标</label>
 | 
			
		||||
        <label>{{tr "Target"}}</label>
 | 
			
		||||
        <input
 | 
			
		||||
          type="text"
 | 
			
		||||
          name="Target"
 | 
			
		||||
@ -17,57 +17,54 @@
 | 
			
		||||
        />
 | 
			
		||||
      </div>
 | 
			
		||||
      <div class="field">
 | 
			
		||||
        <label>类型</label>
 | 
			
		||||
        <label>{{tr "Type"}}</label>
 | 
			
		||||
        <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="3">TCP-Ping</option>
 | 
			
		||||
        </select>
 | 
			
		||||
      </div>
 | 
			
		||||
      <div class="field">
 | 
			
		||||
        <label>请求间隔</label>
 | 
			
		||||
        <input type="number" name="Duration" placeholder="秒" />
 | 
			
		||||
        <label>{{tr "Duration"}}</label>
 | 
			
		||||
        <input type="number" name="Duration" placeholder="{{tr "Seconds"}}" />
 | 
			
		||||
      </div>
 | 
			
		||||
      <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 "AllIncludedOnlySpecificServersAreNotRequest"}}</option>
 | 
			
		||||
          <option value="1">{{tr "IgnoreAllRequestOnlyThroughSpecificServers"}}</option>
 | 
			
		||||
        </select>
 | 
			
		||||
      </div>
 | 
			
		||||
      <div class="field">
 | 
			
		||||
        <label>特定服务器</label>
 | 
			
		||||
        <label>{{tr "SpecificServers"}}</label>
 | 
			
		||||
        <div class="ui fluid multiple servers search selection dropdown">
 | 
			
		||||
          <input type="hidden" name="SkipServersRaw" />
 | 
			
		||||
          <i class="dropdown icon"></i>
 | 
			
		||||
          <div class="default text">输入ID/名称以搜索</div>
 | 
			
		||||
          <div class="default text">{{tr "EnterIdAndNameToSearch"}}}}</div>
 | 
			
		||||
          <div class="menu"></div>
 | 
			
		||||
        </div>
 | 
			
		||||
      </div>
 | 
			
		||||
      <div class="field">
 | 
			
		||||
        <label>通知方式组</label>
 | 
			
		||||
        <label>{{tr "NotificationMethod"}}</label>
 | 
			
		||||
        <input type="text" name="NotificationTag" placeholder="default" />
 | 
			
		||||
      </div>
 | 
			
		||||
      <div class="field">
 | 
			
		||||
        <div class="ui nb-notify checkbox">
 | 
			
		||||
          <input name="Notify" type="checkbox" tabindex="0" class="hidden" />
 | 
			
		||||
          <label>启用故障通知</label>
 | 
			
		||||
          <label>{{tr "EnableFailureNotification"}}</label>
 | 
			
		||||
        </div>
 | 
			
		||||
      </div>
 | 
			
		||||
    </form>
 | 
			
		||||
    <div class="ui warning message">
 | 
			
		||||
      <p>
 | 
			
		||||
        类型为 <b>HTTP-GET</b> 时输入URL(带 http/https, HTTPS
 | 
			
		||||
        协议的会顺带监控SSL证书);<br />
 | 
			
		||||
        类型为 <b>ICMP-Ping</b> 时输入主机名/IP,不带端口;<br />
 | 
			
		||||
        类型为 <b>TCP-Ping</b> 时输入主机名/IP + 端口号:example.com:22
 | 
			
		||||
        {{safe (tr "IntroductionOfMonitor")}}
 | 
			
		||||
      </p>
 | 
			
		||||
    </div>
 | 
			
		||||
  </div>
 | 
			
		||||
  <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>
 | 
			
		||||
      {{tr "Confirm"}}<i class="checkmark icon"></i>
 | 
			
		||||
    </button>
 | 
			
		||||
  </div>
 | 
			
		||||
</div>
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										18
									
								
								resource/template/component/notification.html
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										18
									
								
								resource/template/component/notification.html
									
									
									
									
										vendored
									
									
								
							@ -1,15 +1,15 @@
 | 
			
		||||
{{define "component/notification"}}
 | 
			
		||||
<div class="ui tiny notification modal transition hidden">
 | 
			
		||||
    <div class="header">添加通知方式</div>
 | 
			
		||||
    <div class="header">{{tr "AddNotificationMethod"}}</div>
 | 
			
		||||
    <div class="content">
 | 
			
		||||
        <form id="notificationForm" class="ui form">
 | 
			
		||||
            <input type="hidden" name="ID">
 | 
			
		||||
            <div class="field">
 | 
			
		||||
                <label>名称</label>
 | 
			
		||||
                <label>{{tr "Name"}}</label>
 | 
			
		||||
                <input type="text" name="Name">
 | 
			
		||||
            </div>
 | 
			
		||||
            <div class="field">
 | 
			
		||||
                <label>分组</label>
 | 
			
		||||
                <label>{{tr "Tag"}}</label>
 | 
			
		||||
                <input type="text" name="Tag" placeholder="default">
 | 
			
		||||
            </div>
 | 
			
		||||
            <div class="field">
 | 
			
		||||
@ -17,14 +17,14 @@
 | 
			
		||||
                <input type="text" name="URL">
 | 
			
		||||
            </div>
 | 
			
		||||
            <div class="field">
 | 
			
		||||
                <label>请求方式</label>
 | 
			
		||||
                <label>{{tr "RequestMethod"}}</label>
 | 
			
		||||
                <select name="RequestMethod" class="ui fluid dropdown">
 | 
			
		||||
                    <option value="1">GET</option>
 | 
			
		||||
                    <option value="2">POST</option>
 | 
			
		||||
                </select>
 | 
			
		||||
            </div>
 | 
			
		||||
            <div class="field">
 | 
			
		||||
                <label>请求类型</label>
 | 
			
		||||
                <label>{{tr "RequestType"}}</label>
 | 
			
		||||
                <select name="RequestType" class="ui fluid dropdown">
 | 
			
		||||
                    <option value="1">JSON</option>
 | 
			
		||||
                    <option value="2">FORM</option>
 | 
			
		||||
@ -41,20 +41,20 @@
 | 
			
		||||
            <div class="field">
 | 
			
		||||
                <div class="ui nf-ssl checkbox">
 | 
			
		||||
                    <input name="VerifySSL" type="checkbox" tabindex="0" class="hidden">
 | 
			
		||||
                    <label>验证SSL</label>
 | 
			
		||||
                    <label>{{tr "VerifySSL"}}</label>
 | 
			
		||||
                </div>
 | 
			
		||||
            </div>
 | 
			
		||||
            <div class="field">
 | 
			
		||||
                <div class="ui nf-skip-check checkbox">
 | 
			
		||||
                    <input name="SkipCheck" type="checkbox" tabindex="0" class="hidden">
 | 
			
		||||
                    <label>不发送测试信息</label>
 | 
			
		||||
                    <label>{{tr "DoNotSendTestMessages"}}</label>
 | 
			
		||||
                </div>
 | 
			
		||||
            </div>
 | 
			
		||||
        </form>
 | 
			
		||||
    </div>
 | 
			
		||||
    <div class="actions">
 | 
			
		||||
        <div class="ui negative button">取消</div>
 | 
			
		||||
        <button class="ui positive nezha-primary-btn right labeled icon button">确认<i class="checkmark icon"></i>
 | 
			
		||||
        <div class="ui negative button">{{tr "Cancel"}}</div>
 | 
			
		||||
        <button class="ui positive nezha-primary-btn right labeled icon button">{{tr "Confirm"}}<i class="checkmark icon"></i>
 | 
			
		||||
        </button>
 | 
			
		||||
    </div>
 | 
			
		||||
</div>
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										14
									
								
								resource/template/component/rule.html
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										14
									
								
								resource/template/component/rule.html
									
									
									
									
										vendored
									
									
								
							@ -1,32 +1,32 @@
 | 
			
		||||
{{define "component/rule"}}
 | 
			
		||||
<div class="ui tiny rule modal transition hidden">
 | 
			
		||||
    <div class="header">添加通知规则</div>
 | 
			
		||||
    <div class="header">{{tr "AddNotificationRule"}}</div>
 | 
			
		||||
    <div class="content">
 | 
			
		||||
        <form id="ruleForm" class="ui form">
 | 
			
		||||
            <input type="hidden" name="ID">
 | 
			
		||||
            <div class="field">
 | 
			
		||||
                <label>名称</label>
 | 
			
		||||
                <label>{{tr "Name"}}</label>
 | 
			
		||||
                <input type="text" name="Name">
 | 
			
		||||
            </div>
 | 
			
		||||
            <div class="secret field">
 | 
			
		||||
                <label>规则</label>
 | 
			
		||||
                <label>{{tr "Rules"}}</label>
 | 
			
		||||
                <textarea name="RulesRaw"></textarea>
 | 
			
		||||
            </div>
 | 
			
		||||
            <div class="field">
 | 
			
		||||
                <label>通知方式组</label>
 | 
			
		||||
                <label>{{tr "NotificationMethod"}}</label>
 | 
			
		||||
                <input type="text" name="NotificationTag" placeholder="default">
 | 
			
		||||
            </div>
 | 
			
		||||
            <div class="field">
 | 
			
		||||
                <div class="ui rule-enable checkbox">
 | 
			
		||||
                    <input name="Enable" type="checkbox" tabindex="0" class="hidden">
 | 
			
		||||
                    <label>启用</label>
 | 
			
		||||
                    <label>{{tr "Enable"}}</label>
 | 
			
		||||
                </div>
 | 
			
		||||
            </div>
 | 
			
		||||
        </form>
 | 
			
		||||
    </div>
 | 
			
		||||
    <div class="actions">
 | 
			
		||||
        <div class="ui negative button">取消</div>
 | 
			
		||||
        <button class="ui positive nezha-primary-btn right labeled icon button">确认<i class="checkmark icon"></i>
 | 
			
		||||
        <div class="ui negative button">{{tr "Cancel"}}</div>
 | 
			
		||||
        <button class="ui positive nezha-primary-btn right labeled icon button">{{tr "Confirm"}}<i class="checkmark icon"></i>
 | 
			
		||||
        </button>
 | 
			
		||||
    </div>
 | 
			
		||||
</div>
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										26
									
								
								resource/template/component/server.html
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										26
									
								
								resource/template/component/server.html
									
									
									
									
										vendored
									
									
								
							@ -1,32 +1,32 @@
 | 
			
		||||
{{define "component/server"}}
 | 
			
		||||
<div class="ui tiny server modal transition hidden">
 | 
			
		||||
    <div class="header">添加服务器</div>
 | 
			
		||||
    <div class="header">{{tr "AddServer"}}</div>
 | 
			
		||||
    <div class="content">
 | 
			
		||||
        <form id="serverForm" class="ui form">
 | 
			
		||||
            <input type="hidden" name="id">
 | 
			
		||||
            <div class="field">
 | 
			
		||||
                <label>名称</label>
 | 
			
		||||
                <input type="text" name="name" placeholder="爱因斯坦-光速1号">
 | 
			
		||||
                <label>{{tr "Name"}}</label>
 | 
			
		||||
                <input type="text" name="name" placeholder="{{tr "EinsteinLightspeed1"}}">
 | 
			
		||||
            </div>
 | 
			
		||||
            <div class="field">
 | 
			
		||||
                <label>分组</label>
 | 
			
		||||
                <input type="text" name="Tag" placeholder="服务器分组">
 | 
			
		||||
                <label>{{tr "Tag"}}</label>
 | 
			
		||||
                <input type="text" name="Tag" placeholder="{{tr "ServerGroup"}}">
 | 
			
		||||
            </div>
 | 
			
		||||
            <div class="field">
 | 
			
		||||
                <label>排序</label>
 | 
			
		||||
                <input type="number" name="DisplayIndex" placeholder="越大越靠前">
 | 
			
		||||
                <label>{{tr "DisplayIndex"}}</label>
 | 
			
		||||
                <input type="number" name="DisplayIndex" placeholder="{{tr "TheLargerTheNumberTheHigherThePriority"}}">
 | 
			
		||||
            </div>
 | 
			
		||||
            <div class="secret field">
 | 
			
		||||
                <label>密钥</label>
 | 
			
		||||
                <label>{{tr "Secret"}}</label>
 | 
			
		||||
                <input type="text" name="secret">
 | 
			
		||||
            </div>
 | 
			
		||||
            <div class="field">
 | 
			
		||||
                <label>备注</label>
 | 
			
		||||
                <label>{{tr "Note"}}</label>
 | 
			
		||||
                <textarea name="Note"></textarea>
 | 
			
		||||
            </div>
 | 
			
		||||
 | 
			
		||||
            <div class="command field">
 | 
			
		||||
                <label>Linux 一键安装</label>
 | 
			
		||||
                <label>{{tr "LinuxOneKeyInstall"}}</label>
 | 
			
		||||
                <div class="ui message">
 | 
			
		||||
                    {{if .Conf.GRPCHost}}
 | 
			
		||||
                    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 hostSecret"></code> <code class="command">{{if .Conf.TLS}}--tls{{end}}</code>
 | 
			
		||||
                    {{else}}
 | 
			
		||||
                    请先在设置页面配置 未接入CDN的面板服务器域名/IP
 | 
			
		||||
                    {{tr "NoDomainAlert"}}
 | 
			
		||||
                    {{end}}
 | 
			
		||||
                </div>
 | 
			
		||||
            </div>
 | 
			
		||||
        </form>
 | 
			
		||||
    </div>
 | 
			
		||||
    <div class=" actions">
 | 
			
		||||
        <div class="ui negative button">取消</div>
 | 
			
		||||
        <button class="ui positive nezha-primary-btn right labeled icon button">确认<i class="checkmark icon"></i>
 | 
			
		||||
        <div class="ui negative button">{{tr "Cancel"}}</div>
 | 
			
		||||
        <button class="ui positive nezha-primary-btn right labeled icon button">{{tr "Confirm"}}<i class="checkmark icon"></i>
 | 
			
		||||
        </button>
 | 
			
		||||
    </div>
 | 
			
		||||
</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="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,16 +40,17 @@
 | 
			
		||||
                    <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="{{tr "NotSupportedYet"}}">
 | 
			
		||||
                        <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-tooltip="点击复制安装命令">
 | 
			
		||||
                            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="{{tr "ClickToCopyTheInstallationCommand"}}">
 | 
			
		||||
                            <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>
 | 
			
		||||
@ -63,7 +64,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>
 | 
			
		||||
@ -94,7 +95,7 @@
 | 
			
		||||
        })
 | 
			
		||||
        if (servers.length == 0) {
 | 
			
		||||
            $.suiAlert({
 | 
			
		||||
                title: '当前没有选中的服务器',
 | 
			
		||||
                title: '{{tr "NoServerSelected"}}',
 | 
			
		||||
                description: '',
 | 
			
		||||
                type: 'warning',
 | 
			
		||||
                time: '2',
 | 
			
		||||
@ -106,7 +107,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>
 | 
			
		||||
                <input type="text" name="Title" placeholder='{{tr "nezhaMonitor"}}' value="{{.Conf.Site.Brand}}">
 | 
			
		||||
                <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>
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user