mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2026-03-26 22:03:04 -04:00
* in both `/admin` and `/admin/cron`: use new buttons, they are slightly more compact, which i think fits this place well as currently rows here feel too tall
* in `/admin/cron`: use `octicon-play` consistently with `/admin` instead of `octicon-triangle-right`
* in `/admin`: replace verbose template HTML with Range-based generator
* added integration test to verify page content
<!--start release-notes-assistant-->
## Release notes
<!--URL:https://codeberg.org/forgejo/forgejo-->
- User Interface features
- [PR](https://codeberg.org/forgejo/forgejo/pulls/10270): <!--number 10270 --><!--line 0 --><!--description ZmVhdCh1aSk6IGltcHJvdmUgYWRtaW4gZGFzaGJvYXJkIGNyb24gbGlzdA==-->feat(ui): improve admin dashboard cron list<!--description-->
<!--end release-notes-assistant-->
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/10270
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Reviewed-by: Otto <otto@codeberg.org>
Co-authored-by: 0ko <0ko@noreply.codeberg.org>
Co-committed-by: 0ko <0ko@noreply.codeberg.org>
38 lines
1.6 KiB
Go HTML Template
38 lines
1.6 KiB
Go HTML Template
{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin monitor")}}
|
|
<div class="admin-setting-content">
|
|
<h4 class="ui top attached header">
|
|
{{ctx.Locale.Tr "admin.monitor.cron"}}
|
|
</h4>
|
|
<div class="ui attached table segment">
|
|
<form method="post" action="{{AppSubUrl}}/admin">
|
|
<table class="ui very basic striped table unstackable tw-mb-0">
|
|
<thead>
|
|
<tr>
|
|
<th></th>
|
|
<th>{{ctx.Locale.Tr "admin.monitor.name"}}</th>
|
|
<th>{{ctx.Locale.Tr "admin.monitor.schedule"}}</th>
|
|
<th>{{ctx.Locale.Tr "admin.monitor.next"}}</th>
|
|
<th>{{ctx.Locale.Tr "admin.monitor.previous"}}</th>
|
|
<th>{{ctx.Locale.Tr "admin.monitor.execute_times"}}</th>
|
|
<th>{{ctx.Locale.Tr "admin.monitor.last_execution_result"}}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{{range .Entries}}
|
|
<tr>
|
|
<td><button type="submit" class="primary button" name="op" value="{{.Name}}" title="{{ctx.Locale.Tr "admin.dashboard.operation_run"}}">{{svg "octicon-play"}}</button></td>
|
|
<td>{{ctx.Locale.Tr (printf "admin.dashboard.%s" .Name)}}</td>
|
|
<td>{{.Spec}}</td>
|
|
<td>{{DateUtils.FullTime .Next}}</td>
|
|
<td>{{if gt .Prev.Year 1}}{{DateUtils.FullTime .Prev}}{{else}}-{{end}}</td>
|
|
<td>{{.ExecTimes}}</td>
|
|
<td {{if ne .Status ""}}data-tooltip-content="{{.FormatLastMessage ctx.Locale}}"{{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">
|
|
</form>
|
|
</div>
|
|
</div>
|
|
{{template "admin/layout_footer" .}}
|