Files

99 lines
3.7 KiB
Handlebars
Raw Permalink Normal View History

2023-01-31 09:45:19 +08:00
<div class="runner-container">
<h4 class="ui top attached header">
2023-09-24 20:12:21 +02:00
{{ctx.Locale.Tr "actions.runners.runner_manage_panel"}} ({{ctx.Locale.Tr "admin.total" .Total}})
2023-01-31 09:45:19 +08:00
<div class="ui right">
<div class="ui top right pointing dropdown jump">
2023-04-26 06:09:29 +02:00
<button class="ui primary tiny button">
2023-09-24 20:12:21 +02:00
{{ctx.Locale.Tr "actions.runners.new"}}
2023-01-31 09:45:19 +08:00
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
</button>
<div class="menu">
<div class="item">
2023-09-24 20:12:21 +02:00
<a href="https://docs.gitea.com/usage/actions/act-runner">{{ctx.Locale.Tr "actions.runners.new_notice"}}</a>
2023-01-31 09:45:19 +08:00
</div>
<div class="divider"></div>
<div class="header">
Registration Token
</div>
<div class="ui action input">
<input type="text" value="{{.RegistrationToken}}" readonly>
2023-09-24 20:12:21 +02:00
<button class="ui basic label button" aria-label="{{ctx.Locale.Tr "copy"}}" data-clipboard-text="{{.RegistrationToken}}">
2023-01-31 09:45:19 +08:00
{{svg "octicon-copy" 14}}
</button>
2023-01-31 09:45:19 +08:00
</div>
<div class="divider"></div>
<div class="item">
<a class="link-action" data-url="{{$.Link}}/reset_registration_token"
data-modal-confirm="{{ctx.Locale.Tr "actions.runners.reset_registration_token_confirm"}}"
>
{{ctx.Locale.Tr "actions.runners.reset_registration_token"}}
</a>
2023-01-31 09:45:19 +08:00
</div>
</div>
</div>
</div>
</h4>
<div class="ui attached segment">
<form class="ui form ignore-dirty" id="user-list-search-form" action="{{$.Link}}">
2024-03-15 00:24:59 +01:00
{{template "shared/search/combo" dict "Value" .Keyword "Placeholder" (ctx.Locale.Tr "search.runner_kind")}}
2023-01-31 09:45:19 +08:00
</form>
</div>
<div class="ui attached table segment">
2026-02-11 02:58:56 +01:00
<table class="ui very basic table unstackable">
2023-01-31 09:45:19 +08:00
<thead>
<tr>
<th data-sortt-asc="online" data-sortt-desc="offline">
2023-09-24 20:12:21 +02:00
{{ctx.Locale.Tr "actions.runners.status"}}
{{SortArrow "online" "offline" .SortType false}}
</th>
<th data-sortt-asc="newest" data-sortt-desc="oldest">
2023-09-24 20:12:21 +02:00
{{ctx.Locale.Tr "actions.runners.id"}}
{{SortArrow "oldest" "newest" .SortType false}}
</th>
<th data-sortt-asc="alphabetically" data-sortt-desc="reversealphabetically">
2023-09-24 20:12:21 +02:00
{{ctx.Locale.Tr "actions.runners.name"}}
{{SortArrow "alphabetically" "reversealphabetically" .SortType false}}
</th>
2023-09-24 20:12:21 +02:00
<th>{{ctx.Locale.Tr "actions.runners.version"}}</th>
<th>{{ctx.Locale.Tr "actions.runners.owner_type"}}</th>
<th>{{ctx.Locale.Tr "actions.runners.labels"}}</th>
<th>{{ctx.Locale.Tr "actions.runners.last_online"}}</th>
<th>{{ctx.Locale.Tr "edit"}}</th>
2023-01-31 09:45:19 +08:00
</tr>
</thead>
<tbody>
2025-04-23 23:34:18 +08:00
{{range .Runners}}
2023-01-31 09:45:19 +08:00
<tr>
<td>
<span class="ui label {{if .IsOnline}}green{{end}}">{{.StatusLocaleName ctx.Locale}}</span>
{{if .IsDisabled}}<span class="ui grey label">{{ctx.Locale.Tr "actions.runners.disabled"}}</span>{{end}}
</td>
2023-01-31 09:45:19 +08:00
<td>{{.ID}}</td>
<td><p data-tooltip-content="{{.Description}}">{{.Name}}</p></td>
2023-09-24 20:12:21 +02:00
<td>{{if .Version}}{{.Version}}{{else}}{{ctx.Locale.Tr "unknown"}}{{end}}</td>
2023-09-25 20:42:40 +08:00
<td><span data-tooltip-content="{{.BelongsToOwnerName}}">{{.BelongsToOwnerType.LocaleString ctx.Locale}}</span></td>
2025-04-23 23:34:18 +08:00
<td>
2026-02-09 23:39:06 +01:00
<span class="flex-text-inline tw-flex-wrap">{{range .AgentLabels}}<span class="ui label">{{.}}</span>{{end}}</span>
2023-01-31 09:45:19 +08:00
</td>
<td>{{if .LastOnline}}{{DateUtils.TimeSince .LastOnline}}{{else}}{{ctx.Locale.Tr "never"}}{{end}}</td>
2025-04-23 23:34:18 +08:00
<td>
{{if .EditableInContext $.RunnerOwnerID $.RunnerRepoID}}
<a href="{{$.Link}}/{{.ID}}">{{svg "octicon-pencil"}}</a>
2023-01-31 09:45:19 +08:00
{{end}}
</td>
</tr>
{{else}}
<tr>
<td class="tw-text-center" colspan="8">{{ctx.Locale.Tr "actions.runners.none"}}</td>
2023-01-31 09:45:19 +08:00
</tr>
{{end}}
</tbody>
</table>
</div>
{{template "base/paginate" .}}
</div>