forked from go-gitea/gitea
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Show last cron messages on monitor page
As discussed on go-gitea#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>
- Loading branch information
Showing
6 changed files
with
108 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters