mirror of https://github.com/go-gitea/gitea
Show last cron messages on monitor page (#19223)
As discussed on #19221 we should store the results of the last task message on the crontask and show them on the monitor page. Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>pull/19208/head^2
parent
e69b7a92ed
commit
90e0a402c1
@ -0,0 +1,35 @@ |
||||
<h4 class="ui top attached header"> |
||||
{{.i18n.Tr "admin.monitor.cron"}} |
||||
</h4> |
||||
<div class="ui attached table segment"> |
||||
<form method="post" action="{{AppSubUrl}}/admin"> |
||||
<table class="ui very basic striped table"> |
||||
<thead> |
||||
<tr> |
||||
<th></th> |
||||
<th>{{.i18n.Tr "admin.monitor.name"}}</th> |
||||
<th>{{.i18n.Tr "admin.monitor.schedule"}}</th> |
||||
<th>{{.i18n.Tr "admin.monitor.next"}}</th> |
||||
<th>{{.i18n.Tr "admin.monitor.previous"}}</th> |
||||
<th>{{.i18n.Tr "admin.monitor.execute_times"}}</th> |
||||
<th>{{.i18n.Tr "admin.monitor.last_execution_result"}}</th> |
||||
</tr> |
||||
</thead> |
||||
<tbody> |
||||
{{range .Entries}} |
||||
<tr> |
||||
<td><button type="submit" class="ui green button" name="op" value="{{.Name}}" title="{{$.i18n.Tr "admin.dashboard.operation_run"}}">{{svg "octicon-triangle-right"}}</button></td> |
||||
<td>{{$.i18n.Tr (printf "admin.dashboard.%s" .Name)}}</td> |
||||
<td>{{.Spec}}</td> |
||||
<td>{{DateFmtLong .Next}}</td> |
||||
<td>{{if gt .Prev.Year 1 }}{{DateFmtLong .Prev}}{{else}}N/A{{end}}</td> |
||||
<td>{{.ExecTimes}}</td> |
||||
<td {{if ne .Status ""}}class="tooltip" data-content="{{.FormatLastMessage $.i18n.Language}}"{{end}} >{{if eq .Status "" }}—{{else if eq .Status "finished"}}{{svg "octicon-check" 16}}{{else}}{{svg "octicon-x" 16}}{{end}}</td> |
||||
</tr> |
||||
{{end}} |
||||
</tbody> |
||||
</table> |
||||
<input type="hidden" name="from" value="monitor"/> |
||||
{{.CsrfTokenHtml}} |
||||
</form> |
||||
</div> |
Loading…
Reference in new issue