mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-14 11:48:09 -05:00
f68bc0ec6a
- Instead of relying on JSON to convert the struct to map, use `reflect` to do this conversion. Also simplify it a bit by only passing one variable to the template. - This avoids issues where the conversion to JSON causes changes in the value, for example huge numbers are converted to its scientific notation but are consequently not converted back when being displayed. - Adds unit tests. - Resolves an issue where the amount of comments is being displayed in scientific notation on Codeberg.
17 lines
512 B
Go HTML Template
17 lines
512 B
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.dashboard.statistic"}}
|
|
</h4>
|
|
<div class="ui attached table segment">
|
|
<table class="ui very basic striped table unstackable">
|
|
{{range $statsKey, $statsValue := .Stats}}
|
|
<tr>
|
|
<td width="200">{{$statsKey}}</td>
|
|
<td>{{$statsValue}}</td>
|
|
</tr>
|
|
{{end}}
|
|
</table>
|
|
</div>
|
|
</div>
|
|
{{template "admin/layout_footer" .}}
|