|
1 | 1 | <div class="runner-container">
|
2 | 2 |
|
3 | 3 | <h4 class="ui top attached header">
|
4 |
| - {{.locale.Tr "actions.runners.runner_manage_panel"}} ({{.locale.Tr "admin.total" .Total}}) |
| 4 | + {{ctx.Locale.Tr "actions.runners.runner_manage_panel"}} ({{ctx.Locale.Tr "admin.total" .Total}}) |
5 | 5 | <div class="ui right">
|
6 | 6 | <div class="ui top right pointing dropdown">
|
7 | 7 | <button class="ui primary tiny button">
|
8 |
| - {{.locale.Tr "actions.runners.new"}} |
| 8 | + {{ctx.Locale.Tr "actions.runners.new"}} |
9 | 9 | {{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
10 | 10 | </button>
|
11 | 11 | <div class="menu">
|
12 | 12 | <div class="item">
|
13 |
| - {{/* TODO: replece the document link when there's a better one than the README of act_runner */}} |
14 |
| - <a href="https://gitea.com/gitea/act_runner/src/branch/main/README.md">{{.locale.Tr "actions.runners.new_notice"}}</a> |
| 13 | + <a href="https://docs.gitea.com/usage/actions/act-runner">{{ctx.Locale.Tr "actions.runners.new_notice"}}</a> |
15 | 14 | </div>
|
16 | 15 | <div class="divider"></div>
|
17 | 16 | <div class="header">
|
18 | 17 | Registration Token
|
19 | 18 | </div>
|
20 | 19 | <div class="ui input">
|
21 | 20 | <input type="text" value="{{.RegistrationToken}}">
|
22 |
| - <button class="ui basic label button" aria-label="{{.locale.Tr "copy"}}" data-clipboard-text="{{.RegistrationToken}}"> |
| 21 | + <button class="ui basic label button" aria-label="{{ctx.Locale.Tr "copy"}}" data-clipboard-text="{{.RegistrationToken}}"> |
23 | 22 | {{svg "octicon-copy" 14}}
|
24 | 23 | </button>
|
25 | 24 | </div>
|
26 | 25 | <div class="divider"></div>
|
27 | 26 | <div class="item">
|
28 |
| - <a href="{{$.Link}}/reset_registration_token">Reset registration token</a> |
| 27 | + <a href="{{$.Link}}/reset_registration_token">{{ctx.Locale.Tr "actions.runners.reset_registration_token"}}</a> |
29 | 28 | </div>
|
30 | 29 | </div>
|
31 | 30 | </div>
|
|
37 | 36 | <!-- Search Text -->
|
38 | 37 | <div class="ui fluid action input">
|
39 | 38 | {{template "shared/searchinput" dict "locale" .locale "Value" .Keyword "AutoFocus" true}}
|
40 |
| - <button class="ui primary button">{{.locale.Tr "explore.search"}}</button> |
| 39 | + <button class="ui primary button">{{ctx.Locale.Tr "explore.search"}}</button> |
41 | 40 | </div>
|
42 | 41 | </form>
|
43 | 42 | </div>
|
|
46 | 45 | <thead>
|
47 | 46 | <tr>
|
48 | 47 | <th data-sortt-asc="online" data-sortt-desc="offline">
|
49 |
| - {{.locale.Tr "actions.runners.status"}} |
| 48 | + {{ctx.Locale.Tr "actions.runners.status"}} |
50 | 49 | {{SortArrow "online" "offline" .SortType false}}
|
51 | 50 | </th>
|
52 | 51 | <th data-sortt-asc="newest" data-sortt-desc="oldest">
|
53 |
| - {{.locale.Tr "actions.runners.id"}} |
| 52 | + {{ctx.Locale.Tr "actions.runners.id"}} |
54 | 53 | {{SortArrow "oldest" "newest" .SortType false}}
|
55 | 54 | </th>
|
56 | 55 | <th data-sortt-asc="alphabetically" data-sortt-desc="reversealphabetically">
|
57 |
| - {{.locale.Tr "actions.runners.name"}} |
| 56 | + {{ctx.Locale.Tr "actions.runners.name"}} |
58 | 57 | {{SortArrow "alphabetically" "reversealphabetically" .SortType false}}
|
59 | 58 | </th>
|
60 |
| - <th>{{.locale.Tr "actions.runners.version"}}</th> |
61 |
| - <th>{{.locale.Tr "actions.runners.owner_type"}}</th> |
62 |
| - <th>{{.locale.Tr "actions.runners.labels"}}</th> |
63 |
| - <th>{{.locale.Tr "actions.runners.last_online"}}</th> |
64 |
| - <th>{{.locale.Tr "edit"}}</th> |
| 59 | + <th>{{ctx.Locale.Tr "actions.runners.version"}}</th> |
| 60 | + <th>{{ctx.Locale.Tr "actions.runners.owner_type"}}</th> |
| 61 | + <th>{{ctx.Locale.Tr "actions.runners.labels"}}</th> |
| 62 | + <th>{{ctx.Locale.Tr "actions.runners.last_online"}}</th> |
| 63 | + <th>{{ctx.Locale.Tr "edit"}}</th> |
65 | 64 | </tr>
|
66 | 65 | </thead>
|
67 | 66 | <tbody>
|
68 | 67 | {{if .Runners}}
|
69 | 68 | {{range .Runners}}
|
70 | 69 | <tr>
|
71 | 70 | <td>
|
72 |
| - <span class="runner-status-{{if .IsOnline}}online{{else}}offline{{end}}">{{.StatusLocaleName $.locale}}</span> |
| 71 | + <span class="ui {{if .IsOnline}}green{{else}}basic{{end}} label">{{.StatusLocaleName $.locale}}</span> |
73 | 72 | </td>
|
74 | 73 | <td>{{.ID}}</td>
|
75 | 74 | <td><p data-tooltip-content="{{.Description}}">{{.Name}}</p></td>
|
76 |
| - <td>{{if .Version}}{{.Version}}{{else}}{{$.locale.Tr "unknown"}}{{end}}</td> |
| 75 | + <td>{{if .Version}}{{.Version}}{{else}}{{ctx.Locale.Tr "unknown"}}{{end}}</td> |
77 | 76 | <td><span data-tooltip-content="{{.BelongsToOwnerName}}">{{.BelongsToOwnerType.LocaleString $.locale}}</span></td>
|
78 | 77 | <td class="runner-tags">
|
79 | 78 | {{range .AgentLabels}}<span class="ui label">{{.}}</span>{{end}}
|
80 | 79 | </td>
|
81 |
| - <td>{{if .LastOnline}}{{TimeSinceUnix .LastOnline $.locale}}{{else}}{{$.locale.Tr "never"}}{{end}}</td> |
| 80 | + <td>{{if .LastOnline}}{{TimeSinceUnix .LastOnline $.locale}}{{else}}{{ctx.Locale.Tr "never"}}{{end}}</td> |
82 | 81 | <td class="runner-ops">
|
83 | 82 | {{if .Editable $.RunnerOwnerID $.RunnerRepoID}}
|
84 | 83 | <a href="{{$.Link}}/{{.ID}}">{{svg "octicon-pencil"}}</a>
|
|
88 | 87 | {{end}}
|
89 | 88 | {{else}}
|
90 | 89 | <tr>
|
91 |
| - <td class="center aligned" colspan="6">{{.locale.Tr "actions.runners.none"}}</td> |
| 90 | + <td class="center aligned" colspan="8">{{ctx.Locale.Tr "actions.runners.none"}}</td> |
92 | 91 | </tr>
|
93 | 92 | {{end}}
|
94 | 93 | </tbody>
|
|
0 commit comments