jojo/templates/admin/federation/hosts.tmpl
Florian Pallas 4e6a782a89 feat: add admin views for federation configuration, hosts and users (#11115)
Fixes #9282

Adds a new admin panel category for federation related administration.

Includes views for:
- Instance Federation Configuration
- List of Federation Hosts
- (Per-Instance) List of Federated Users

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/11115
Reviewed-by: elle <0xllx0@noreply.codeberg.org>
Reviewed-by: Panagiotis "Ivory" Vasilopoulos <git@n0toose.net>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Florian Pallas <mail@fpallas.com>
Co-committed-by: Florian Pallas <mail@fpallas.com>
2026-04-09 19:38:33 +02:00

56 lines
2.2 KiB
Go HTML Template

{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin user")}}
<div class="admin-setting-content">
<h4 class="ui top attached header">
{{ctx.Locale.Tr "admin.federation.hosts.manage_panel"}} ({{ctx.Locale.Tr "admin.total" .TotalCount}})
</h4>
<div class="ui attached table segment">
<table class="ui very basic striped table unstackable">
<thead>
<tr>
<th data-sortt-asc="id_asc" data-sortt-desc="id_desc">
{{ctx.Locale.Tr "admin.federation.host.id"}}
{{SortArrow "id_asc" "id_desc" .SortType true}}
</th>
<th data-sortt-asc="fqdn_asc" data-sortt-desc="fqdn_desc">
{{ctx.Locale.Tr "admin.federation.host.fqdn"}}
{{SortArrow "fqdn_asc" "fqdn_desc" .SortType false}}
</th>
<th>{{ctx.Locale.Tr "admin.federation.host.schema"}}</th>
<th>{{ctx.Locale.Tr "admin.federation.host.port"}}</th>
<th>{{ctx.Locale.Tr "admin.federation.host.software_name"}}</th>
<th data-sortt-asc="created_asc" data-sortt-desc="created_desc">
{{ctx.Locale.Tr "admin.federation.host.created"}}
{{SortArrow "created_asc" "created_desc" .SortType true}}
</th>
<th data-sortt-asc="activity_asc" data-sortt-desc="activity_desc">
{{ctx.Locale.Tr "admin.federation.host.latest_activity"}}
{{SortArrow "activity_asc" "activity_desc" .SortType true}}
</th>
<th></th>
</tr>
</thead>
<tbody>
{{range .Hosts}}
<tr>
<td>{{.ID}}</td>
<td>{{.HostFqdn}}</td>
<td>{{.HostSchema}}</td>
<td>{{.HostPort}}</td>
<td>{{.NodeInfo.SoftwareName}}</td>
<td>{{DateUtils.AbsoluteShort .Created}}</td>
<td>{{DateUtils.FullTime .LatestActivity}}</td>
<td>
<div class="tw-flex tw-gap-2">
<a href="{{$.Link}}/{{.ID}}" data-tooltip-content="{{ctx.Locale.Tr "admin.federation.hosts.show_details"}}">{{svg "octicon-server"}}</a>
</div>
</td>
</tr>
{{else}}
<tr><td class="tw-text-center" colspan="10">{{ctx.Locale.Tr "repo.pulls.no_results"}}</td></tr>
{{end}}
</tbody>
</table>
</div>
{{template "base/paginate" .}}
</div>
{{template "admin/layout_footer" .}}