2022-06-02 21:45:11 -04:00
|
|
|
{{define "dashboard-default/cron"}}
|
2021-01-18 20:59:04 -05:00
|
|
|
{{template "common/header" .}}
|
|
|
|
{{template "common/menu" .}}
|
|
|
|
<div class="nb-container">
|
|
|
|
<div class="ui container">
|
|
|
|
<div class="ui grid">
|
|
|
|
<div class="right floated right aligned twelve wide column">
|
2021-08-05 23:48:34 -04:00
|
|
|
<button class="ui right labeled nezha-primary-btn icon button" onclick="addOrEditCron()"><i class="add icon"></i>
|
2022-04-28 22:52:26 -04:00
|
|
|
{{tr "AddScheduledTasks"}}
|
2021-01-18 20:59:04 -05:00
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
2024-08-13 11:50:55 -04:00
|
|
|
<table class="ui basic table">
|
2021-01-18 20:59:04 -05:00
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>ID</th>
|
2022-04-28 22:52:26 -04:00
|
|
|
<th>{{tr "Name"}}</th>
|
2022-09-13 23:32:15 -04:00
|
|
|
<th>{{tr "TaskType"}}</th>
|
2022-04-28 22:52:26 -04:00
|
|
|
<th>{{tr "Scheduler"}}</th>
|
|
|
|
<th>{{tr "Command"}}</th>
|
2022-04-29 21:32:57 -04:00
|
|
|
<th>{{tr "NotificationMethodGroup"}}</th>
|
2022-04-28 22:52:26 -04:00
|
|
|
<th>{{tr "PushSuccessfully"}}</th>
|
|
|
|
<th>{{tr "Coverage"}}</th>
|
|
|
|
<th>{{tr "SpecificServers"}}</th>
|
|
|
|
<th>{{tr "LastExecution"}}</th>
|
|
|
|
<th>{{tr "LastResult"}}</th>
|
|
|
|
<th>{{tr "Administration"}}</th>
|
2021-01-18 20:59:04 -05:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{{range $cron := .Crons}}
|
|
|
|
<tr>
|
|
|
|
<td>{{$cron.ID}}</td>
|
|
|
|
<td>{{$cron.Name}}</td>
|
2022-09-13 23:32:15 -04:00
|
|
|
<td>{{if eq $cron.TaskType 0}}{{tr "CronTask"}}{{else}}{{tr "TriggerTask"}}{{end}}</td>
|
2021-01-18 20:59:04 -05:00
|
|
|
<td>{{$cron.Scheduler}}</td>
|
|
|
|
<td>{{$cron.Command}}</td>
|
2022-04-14 22:56:04 -04:00
|
|
|
<td>{{$cron.NotificationTag}}</td>
|
2021-01-18 20:59:04 -05:00
|
|
|
<td>{{$cron.PushSuccessful}}</td>
|
2022-09-13 23:32:15 -04:00
|
|
|
<td>{{if eq $cron.Cover 0}}{{tr "IgnoreAll"}}{{else if eq $cron.Cover 1}}{{tr "CoverAll"}}{{else}}{{tr "ByTrigger"}}{{end}}</td>
|
2021-01-18 20:59:04 -05:00
|
|
|
<td>{{$cron.ServersRaw}}</td>
|
|
|
|
<td>{{$cron.LastExecutedAt|tf}}</td>
|
|
|
|
<td>{{$cron.LastResult}}</td>
|
|
|
|
<td>
|
|
|
|
<div class="ui mini icon buttons">
|
2021-01-23 20:41:35 -05:00
|
|
|
<button class="ui button" onclick="manualTrigger(this, {{$cron.ID}})">
|
|
|
|
<i class="play icon"></i>
|
|
|
|
</button>
|
2021-01-18 20:59:04 -05:00
|
|
|
<button class="ui button" onclick="addOrEditCron({{$cron}})">
|
|
|
|
<i class="edit icon"></i>
|
|
|
|
</button>
|
|
|
|
<button class="ui button"
|
2022-04-28 22:52:26 -04:00
|
|
|
onclick="showConfirm('{{tr "DeleteScheduledTask"}}','{{tr "ConfirmToDeleteThisScheduledTask"}}',deleteRequest,'/api/cron/'+{{$cron.ID}})">
|
2021-01-20 09:15:47 -05:00
|
|
|
<i class="trash alternate outline icon"></i>
|
2021-01-18 20:59:04 -05:00
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{{end}}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{template "component/cron"}}
|
|
|
|
{{template "common/footer" .}}
|
|
|
|
{{end}}
|