mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-03-23 19:41:50 +00:00
前端更新: 支持报警规则绑定触发任务
This commit is contained in:
8
resource/template/component/cron.html
vendored
8
resource/template/component/cron.html
vendored
@@ -8,6 +8,13 @@
|
||||
<label>{{tr "Name"}}</label>
|
||||
<input type="text" name="Name" placeholder="{{tr "BackUp"}}">
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>{{tr "TaskType"}}</label>
|
||||
<select name="TaskType" class="ui fluid dropdown">
|
||||
<option value="0">{{tr "CronTask"}}</option>
|
||||
<option value="1">{{tr "TriggerTask"}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>{{tr "Scheduler"}}</label>
|
||||
<input type="text" name="Scheduler" placeholder="0 0 3 * * *{{tr "3amDaily"}}">
|
||||
@@ -21,6 +28,7 @@
|
||||
<select name="Cover" class="ui fluid dropdown">
|
||||
<option value="0">{{tr "IgnoreAllAndExecuteOnlyThroughSpecificServers"}}</option>
|
||||
<option value="1">{{tr "AllIncludedOnlySpecificServersAreNotExecuted"}}</option>
|
||||
<option value="2">{{tr "ExecuteByTriggerServer"}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="field">
|
||||
|
||||
19
resource/template/component/rule.html
vendored
19
resource/template/component/rule.html
vendored
@@ -23,6 +23,25 @@
|
||||
<option value="1">{{tr "ModeOnetimeTrigger"}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>{{tr "FailTriggerTasks"}}</label>
|
||||
<div class="ui fluid multiple tasks search selection dropdown">
|
||||
<input type="hidden" name="FailTriggerTasksRaw">
|
||||
<i class="dropdown icon 1"></i>
|
||||
<div class="default text">{{tr "EnterIdAndNameToSearch"}}</div>
|
||||
<div class="menu"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>{{tr "RecoverTriggerTasks"}}</label>
|
||||
<div class="ui fluid multiple tasks search selection dropdown">
|
||||
<input type="hidden" name="RecoverTriggerTasksRaw">
|
||||
<i class="dropdown icon 2"></i>
|
||||
<div class="default text">{{tr "EnterIdAndNameToSearch"}}</div>
|
||||
<div class="menu"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<div class="ui rule-enable checkbox">
|
||||
<input name="Enable" type="checkbox" tabindex="0" class="hidden">
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>{{tr "Name"}}</th>
|
||||
<th>{{tr "TaskType"}}</th>
|
||||
<th>{{tr "Scheduler"}}</th>
|
||||
<th>{{tr "Command"}}</th>
|
||||
<th>{{tr "NotificationMethodGroup"}}</th>
|
||||
@@ -31,11 +32,12 @@
|
||||
<tr>
|
||||
<td>{{$cron.ID}}</td>
|
||||
<td>{{$cron.Name}}</td>
|
||||
<td>{{if eq $cron.TaskType 0}}{{tr "CronTask"}}{{else}}{{tr "TriggerTask"}}{{end}}</td>
|
||||
<td>{{$cron.Scheduler}}</td>
|
||||
<td>{{$cron.Command}}</td>
|
||||
<td>{{$cron.NotificationTag}}</td>
|
||||
<td>{{$cron.PushSuccessful}}</td>
|
||||
<td>{{if eq $cron.Cover 0}}{{tr "IgnoreAll"}}{{else}}{{tr "CoverAll"}}{{end}}</td>
|
||||
<td>{{if eq $cron.Cover 0}}{{tr "IgnoreAll"}}{{else if eq $cron.Cover 1}}{{tr "CoverAll"}}{{else}}{{tr "ByTrigger"}}{{end}}</td>
|
||||
<td>{{$cron.ServersRaw}}</td>
|
||||
<td>{{$cron.LastExecutedAt|tf}}</td>
|
||||
<td>{{$cron.LastResult}}</td>
|
||||
|
||||
@@ -60,6 +60,8 @@
|
||||
<th>{{tr "NotificationMethodGroup"}}</th>
|
||||
<th>{{tr "NotificationTriggerMode"}}</th>
|
||||
<th>{{tr "Rules"}}</th>
|
||||
<th>{{tr "FailTriggerTasks"}}</th>
|
||||
<th>{{tr "RecoverTriggerTasks"}}</th>
|
||||
<th>{{tr "Enable"}}</th>
|
||||
<th>{{tr "Administration"}}</th>
|
||||
</tr>
|
||||
@@ -72,6 +74,8 @@
|
||||
<td>{{$rule.NotificationTag}}</td>
|
||||
<td>{{if eq $rule.TriggerMode 0}}{{tr "ModeAlwaysTrigger"}}{{else}}{{tr "ModeOnetimeTrigger"}}{{end}}
|
||||
<td>{{$rule.RulesRaw}}</td>
|
||||
<td>{{$rule.FailTriggerTasksRaw}}</td>
|
||||
<td>{{$rule.RecoverTriggerTasksRaw}}</td>
|
||||
<td>{{$rule.Enable}}</td>
|
||||
<td>
|
||||
<div class="ui mini icon buttons">
|
||||
|
||||
Reference in New Issue
Block a user