mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-16 03:05:09 +00:00
49808136c5
Before: ![image](https://user-images.githubusercontent.com/18380374/234779250-8bbd325c-190e-4a30-ac3e-766498d17df5.png) After: ![image](https://user-images.githubusercontent.com/18380374/234779094-e232ecba-d9f4-4d62-a702-6d5e4a522782.png) ![image](https://user-images.githubusercontent.com/18380374/234779120-0293af17-a566-4b69-b454-af4e95844e3b.png) --------- Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: Giteabot <teabot@gitea.io> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
92 lines
3.3 KiB
Handlebars
92 lines
3.3 KiB
Handlebars
<div class="runner-container">
|
|
|
|
<h4 class="ui top attached header">
|
|
{{.locale.Tr "actions.runners.runner_manage_panel"}} ({{.locale.Tr "admin.total" .Total}})
|
|
<div class="ui right">
|
|
<div class="ui top right pointing dropdown">
|
|
<button class="ui primary tiny button">
|
|
{{.locale.Tr "actions.runners.new"}}
|
|
{{svg "octicon-triangle-down" 14 "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>
|
|
</div>
|
|
<div class="divider"></div>
|
|
<div class="header">
|
|
Registration Token
|
|
</div>
|
|
<div class="ui input">
|
|
<input type="text" value="{{.RegistrationToken}}">
|
|
<button class="ui basic label button" aria-label="{{.locale.Tr "copy"}}" data-clipboard-text="{{.RegistrationToken}}">
|
|
{{svg "octicon-copy" 14}}
|
|
</button>
|
|
</div>
|
|
<div class="divider"></div>
|
|
<div class="item">
|
|
<a href="{{$.Link}}/reset_registration_token">Reset registration token</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</h4>
|
|
<div class="ui attached segment">
|
|
<form class="ui form ignore-dirty" id="user-list-search-form" action="{{$.Link}}">
|
|
<!-- Search Text -->
|
|
<div class="ui fluid action input" style="max-width: 70%;">
|
|
<input name="q" value="{{.Keyword}}" placeholder="{{.locale.Tr "explore.search"}}..." autofocus>
|
|
<button class="ui primary button">{{.locale.Tr "explore.search"}}</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
<div class="ui attached table segment">
|
|
<table class="ui very basic striped table unstackable">
|
|
<thead>
|
|
<tr>
|
|
<th data-sortt-asc="online" data-sortt-desc="offline">{{.locale.Tr "actions.runners.status"}}</th>
|
|
<th data-sortt-asc="alphabetically">{{.locale.Tr "actions.runners.id"}}</th>
|
|
<th>{{.locale.Tr "actions.runners.name"}}</th>
|
|
<th>{{.locale.Tr "actions.runners.version"}}</th>
|
|
<th>{{.locale.Tr "actions.runners.owner_type"}}</th>
|
|
<th>{{.locale.Tr "actions.runners.labels"}}</th>
|
|
<th>{{.locale.Tr "actions.runners.last_online"}}</th>
|
|
<th>{{.locale.Tr "edit"}}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{{if .Runners}}
|
|
{{range .Runners}}
|
|
<tr>
|
|
<td>
|
|
<span class="runner-status-{{if .IsOnline}}online{{else}}offline{{end}}">{{.StatusLocaleName $.locale}}</span>
|
|
</td>
|
|
<td>{{.ID}}</td>
|
|
<td><p data-tooltip-content="{{.Description}}">{{.Name}}</p></td>
|
|
<td>{{if .Version}}{{.Version}}{{else}}{{$.locale.Tr "unknown"}}{{end}}</td>
|
|
<td><span data-tooltip-content="{{.BelongsToOwnerName}}">{{.BelongsToOwnerType.LocaleString $.locale}}<span></td>
|
|
<td class="runner-tags">
|
|
{{range .AllLabels}}<span class="ui label">{{.}}</span>{{end}}
|
|
</td>
|
|
<td>{{if .LastOnline}}{{TimeSinceUnix .LastOnline $.locale}}{{else}}{{$.locale.Tr "never"}}{{end}}</td>
|
|
<td class="runner-ops">
|
|
{{if .Editable $.RunnerOnwerID $.RunnerRepoID}}
|
|
<a href="{{$.Link}}/{{.ID}}">{{svg "octicon-pencil"}}</a>
|
|
{{end}}
|
|
</td>
|
|
</tr>
|
|
{{end}}
|
|
{{else}}
|
|
<tr>
|
|
<td class="center aligned" colspan="6">{{.locale.Tr "actions.runners.none"}}</td>
|
|
</tr>
|
|
{{end}}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
{{template "base/paginate" .}}
|
|
|
|
</div>
|