nezha/resource/template/component/cron.html
2021-06-21 23:28:22 +08:00

59 lines
2.7 KiB
HTML
Vendored
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{{define "component/cron"}}
<div class="ui tiny cron modal transition hidden">
<div class="header">添加计划任务</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="备份">
</div>
<div class="field">
<label>计划</label>
<input type="text" name="Scheduler" placeholder="0 3 * * *每天3点">
</div>
<div class="field">
<label>命令</label>
<textarea name="Command"></textarea>
</div>
<div class="field">
<label>覆盖范围</label>
<select name="Cover" class="ui fluid dropdown">
<option value="0">忽略所有,仅通过特定服务器执行</option>
<option value="1">覆盖所有,仅特定服务器不执行</option>
</select>
</div>
<div class="field">
<label>特定服务器</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="menu"></div>
</div>
</div>
<div class="field">
<div class="ui push-successful checkbox">
<input name="PushSuccessful" type="checkbox" tabindex="0" class="hidden">
<label>推送成功的消息</label>
</div>
</div>
</form>
<div class="ui warning message">
<p>
计划的格式为:<code>* * * * *</code> 分 时 天 月 星期,详情见 <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>或者使用绝对路径执行。
</p>
</div>
</div>
<div class=" actions">
<div class="ui negative button">取消</div>
<button class="ui positive right labeled icon button">确认<i class="checkmark icon"></i>
</button>
</div>
</div>
{{end}}