@ -1,17 +1,16 @@
<div class="runner-container">
<h4 class="ui top attached header">
{{ .l ocale.Tr "actions.runners.runner_manage_panel" }} ( {{ .l ocale.Tr "admin.total" .Total }} )
{{ ctx .L ocale.Tr "actions.runners.runner_manage_panel" }} ( {{ ctx .L ocale.Tr "admin.total" .Total }} )
<div class="ui right">
<div class="ui top right pointing dropdown">
<button class="ui primary tiny button">
{{ .l ocale.Tr "actions.runners.new" }}
{{ ctx .L ocale.Tr "actions.runners.new" }}
{{ svg "octicon-triangle-down" 1 4 "dropdown icon" }}
</button>
<div class="menu">
<div class="item">
{{ / * TODO : replece the document link when there ' s a better one than the README of act_runner * / }}
<a href="https://gitea.com/gitea/act_runner/src/branch/main/README.md"> {{ .locale .Tr "actions.runners.new_notice" }} </a>
<a href="https://docs.gitea.com/usage/actions/act-runner"> {{ ctx .Locale .Tr "actions.runners.new_notice" }} </a>
</div>
<div class="divider"></div>
<div class="header">
@ -19,13 +18,13 @@
</div>
<div class="ui input">
<input type="text" value=" {{ .RegistrationToken }} ">
<button class="ui basic label button" aria-label=" {{ .l ocale.Tr "copy" }} " data-clipboard-text=" {{ .RegistrationToken }} ">
<button class="ui basic label button" aria-label=" {{ ctx .L ocale.Tr "copy" }} " data-clipboard-text=" {{ .RegistrationToken }} ">
{{ svg "octicon-copy" 1 4 }}
</button>
</div>
<div class="divider"></div>
<div class="item">
<a href=" {{ $ .Link }} /reset_registration_token">Reset registration token </a>
<a href=" {{ $ .Link }} /reset_registration_token"> {{ ctx .Locale .Tr "actions.runners.reset_registration_token" }} </a>
</div>
</div>
</div>
@ -37,7 +36,7 @@
<!-- Search Text -->
<div class="ui fluid action input">
{{ template "shared/searchinput" dict "locale" .locale "Value" .Keyword "AutoFocus" true }}
<button class="ui primary button"> {{ .l ocale.Tr "explore.search" }} </button>
<button class="ui primary button"> {{ ctx .L ocale.Tr "explore.search" }} </button>
</div>
</form>
</div>
@ -46,22 +45,22 @@
<thead>
<tr>
<th data-sortt-asc="online" data-sortt-desc="offline">
{{ .l ocale.Tr "actions.runners.status" }}
{{ ctx .L ocale.Tr "actions.runners.status" }}
{{ SortArrow "online" "offline" .SortType false }}
</th>
<th data-sortt-asc="newest" data-sortt-desc="oldest">
{{ .l ocale.Tr "actions.runners.id" }}
{{ ctx .L ocale.Tr "actions.runners.id" }}
{{ SortArrow "oldest" "newest" .SortType false }}
</th>
<th data-sortt-asc="alphabetically" data-sortt-desc="reversealphabetically">
{{ .l ocale.Tr "actions.runners.name" }}
{{ ctx .L ocale.Tr "actions.runners.name" }}
{{ SortArrow "alphabetically" "reversealphabetically" .SortType false }}
</th>
<th> {{ .l ocale.Tr "actions.runners.version" }} </th>
<th> {{ .l ocale.Tr "actions.runners.owner_type" }} </th>
<th> {{ .l ocale.Tr "actions.runners.labels" }} </th>
<th> {{ .l ocale.Tr "actions.runners.last_online" }} </th>
<th> {{ .l ocale.Tr "edit" }} </th>
<th> {{ ctx .L ocale.Tr "actions.runners.version" }} </th>
<th> {{ ctx .L ocale.Tr "actions.runners.owner_type" }} </th>
<th> {{ ctx .L ocale.Tr "actions.runners.labels" }} </th>
<th> {{ ctx .L ocale.Tr "actions.runners.last_online" }} </th>
<th> {{ ctx .L ocale.Tr "edit" }} </th>
</tr>
</thead>
<tbody>
@ -69,16 +68,16 @@
{{ range .Runners }}
<tr>
<td>
<span class="runner-status- {{ if .IsOnline }} online {{ else }} offline {{ end }} "> {{ .StatusLocaleName $ .locale }} </span>
<span class="ui {{ if .IsOnline }} green {{ else }} basic {{ end }} label ">{{ .StatusLocaleName $ .locale }} </span>
</td>
<td> {{ .ID }} </td>
<td><p data-tooltip-content=" {{ .Description }} "> {{ .Name }} </p></td>
<td> {{ if .Version }} {{ .Version }} {{ else }} {{ $ .l ocale.Tr "unknown" }} {{ end }} </td>
<td> {{ if .Version }} {{ .Version }} {{ else }} {{ ctx .L ocale.Tr "unknown" }} {{ end }} </td>
<td><span data-tooltip-content=" {{ .BelongsToOwnerName }} "> {{ .BelongsToOwnerType .LocaleString $ .locale }} </span></td>
<td class="runner-tags">
{{ range .AgentLabels }} <span class="ui label"> {{ . }} </span> {{ end }}
</td>
<td> {{ if .LastOnline }} {{ TimeSinceUnix .LastOnline $ .locale }} {{ else }} {{ $ .l ocale.Tr "never" }} {{ end }} </td>
<td> {{ if .LastOnline }} {{ TimeSinceUnix .LastOnline $ .locale }} {{ else }} {{ ctx .L ocale.Tr "never" }} {{ end }} </td>
<td class="runner-ops">
{{ if .Editable $ .RunnerOwnerID $ .RunnerRepoID }}
<a href=" {{ $ .Link }} / {{ .ID }} "> {{ svg "octicon-pencil" }} </a>
@ -88,7 +87,7 @@
{{ end }}
{{ else }}
<tr>
<td class="center aligned" colspan="6"> {{ .l ocale .Tr "actions.runners.none" }} </td>
<td class="center aligned" colspan="8"> {{ ctx .L ocale .Tr "actions.runners.none" }} </td>
</tr>
{{ end }}
</tbody>