gitea源码

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <div class="runner-container">
  2. <h4 class="ui top attached header">
  3. {{ctx.Locale.Tr "actions.runners.runner_manage_panel"}} ({{ctx.Locale.Tr "admin.total" .Total}})
  4. <div class="ui right">
  5. <div class="ui top right pointing dropdown jump">
  6. <button class="ui primary tiny button">
  7. {{ctx.Locale.Tr "actions.runners.new"}}
  8. {{svg "octicon-triangle-down" 14 "dropdown icon"}}
  9. </button>
  10. <div class="menu">
  11. <div class="item">
  12. <a href="https://docs.gitea.com/usage/actions/act-runner">{{ctx.Locale.Tr "actions.runners.new_notice"}}</a>
  13. </div>
  14. <div class="divider"></div>
  15. <div class="header">
  16. Registration Token
  17. </div>
  18. <div class="ui action input">
  19. <input type="text" value="{{.RegistrationToken}}" readonly>
  20. <button class="ui basic label button" aria-label="{{ctx.Locale.Tr "copy"}}" data-clipboard-text="{{.RegistrationToken}}">
  21. {{svg "octicon-copy" 14}}
  22. </button>
  23. </div>
  24. <div class="divider"></div>
  25. <div class="item">
  26. <a class="link-action" data-url="{{$.Link}}/reset_registration_token"
  27. data-modal-confirm="{{ctx.Locale.Tr "actions.runners.reset_registration_token_confirm"}}"
  28. >
  29. {{ctx.Locale.Tr "actions.runners.reset_registration_token"}}
  30. </a>
  31. </div>
  32. </div>
  33. </div>
  34. </div>
  35. </h4>
  36. <div class="ui attached segment">
  37. <form class="ui form ignore-dirty" id="user-list-search-form" action="{{$.Link}}">
  38. {{template "shared/search/combo" dict "Value" .Keyword "Placeholder" (ctx.Locale.Tr "search.runner_kind")}}
  39. </form>
  40. </div>
  41. <div class="ui attached table segment">
  42. <table class="ui very basic striped table unstackable">
  43. <thead>
  44. <tr>
  45. <th data-sortt-asc="online" data-sortt-desc="offline">
  46. {{ctx.Locale.Tr "actions.runners.status"}}
  47. {{SortArrow "online" "offline" .SortType false}}
  48. </th>
  49. <th data-sortt-asc="newest" data-sortt-desc="oldest">
  50. {{ctx.Locale.Tr "actions.runners.id"}}
  51. {{SortArrow "oldest" "newest" .SortType false}}
  52. </th>
  53. <th data-sortt-asc="alphabetically" data-sortt-desc="reversealphabetically">
  54. {{ctx.Locale.Tr "actions.runners.name"}}
  55. {{SortArrow "alphabetically" "reversealphabetically" .SortType false}}
  56. </th>
  57. <th>{{ctx.Locale.Tr "actions.runners.version"}}</th>
  58. <th>{{ctx.Locale.Tr "actions.runners.owner_type"}}</th>
  59. <th>{{ctx.Locale.Tr "actions.runners.labels"}}</th>
  60. <th>{{ctx.Locale.Tr "actions.runners.last_online"}}</th>
  61. <th>{{ctx.Locale.Tr "edit"}}</th>
  62. </tr>
  63. </thead>
  64. <tbody>
  65. {{range .Runners}}
  66. <tr>
  67. <td><span class="ui label {{if .IsOnline}}green{{end}}">{{.StatusLocaleName ctx.Locale}}</span></td>
  68. <td>{{.ID}}</td>
  69. <td><p data-tooltip-content="{{.Description}}">{{.Name}}</p></td>
  70. <td>{{if .Version}}{{.Version}}{{else}}{{ctx.Locale.Tr "unknown"}}{{end}}</td>
  71. <td><span data-tooltip-content="{{.BelongsToOwnerName}}">{{.BelongsToOwnerType.LocaleString ctx.Locale}}</span></td>
  72. <td>
  73. <span class="flex-text-inline">{{range .AgentLabels}}<span class="ui label">{{.}}</span>{{end}}</span>
  74. </td>
  75. <td>{{if .LastOnline}}{{DateUtils.TimeSince .LastOnline}}{{else}}{{ctx.Locale.Tr "never"}}{{end}}</td>
  76. <td>
  77. {{if .EditableInContext $.RunnerOwnerID $.RunnerRepoID}}
  78. <a href="{{$.Link}}/{{.ID}}">{{svg "octicon-pencil"}}</a>
  79. {{end}}
  80. </td>
  81. </tr>
  82. {{else}}
  83. <tr>
  84. <td class="tw-text-center" colspan="8">{{ctx.Locale.Tr "actions.runners.none"}}</td>
  85. </tr>
  86. {{end}}
  87. </tbody>
  88. </table>
  89. </div>
  90. {{template "base/paginate" .}}
  91. </div>