You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

runner_edit.tmpl 3.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <div class="runner-container">
  2. <h4 class="ui top attached header">
  3. {{ctx.Locale.Tr "actions.runners.runner_title"}} {{.Runner.ID}} {{.Runner.Name}}
  4. </h4>
  5. <div class="ui attached segment">
  6. <form class="ui form" method="post">
  7. {{template "base/disable_form_autofill"}}
  8. {{.CsrfTokenHtml}}
  9. <div class="runner-basic-info">
  10. <div class="field gt-dib gt-mr-4">
  11. <label>{{ctx.Locale.Tr "actions.runners.status"}}</label>
  12. <span class="ui {{if .Runner.IsOnline}}green{{else}}basic{{end}} label">{{.Runner.StatusLocaleName ctx.Locale}}</span>
  13. </div>
  14. <div class="field gt-dib gt-mr-4">
  15. <label>{{ctx.Locale.Tr "actions.runners.last_online"}}</label>
  16. <span>{{if .Runner.LastOnline}}{{TimeSinceUnix .Runner.LastOnline ctx.Locale}}{{else}}{{ctx.Locale.Tr "never"}}{{end}}</span>
  17. </div>
  18. <div class="field gt-dib gt-mr-4">
  19. <label>{{ctx.Locale.Tr "actions.runners.labels"}}</label>
  20. <span>
  21. {{range .Runner.AgentLabels}}
  22. <span class="ui label">{{.}}</span>
  23. {{end}}
  24. </span>
  25. </div>
  26. <div class="field gt-dib gt-mr-4">
  27. <label>{{ctx.Locale.Tr "actions.runners.owner_type"}}</label>
  28. <span data-tooltip-content="{{.Runner.BelongsToOwnerName}}">{{.Runner.BelongsToOwnerType.LocaleString ctx.Locale}}</span>
  29. </div>
  30. </div>
  31. <div class="divider"></div>
  32. <div class="field">
  33. <label for="description">{{ctx.Locale.Tr "actions.runners.description"}}</label>
  34. <input id="description" name="description" value="{{.Runner.Description}}">
  35. </div>
  36. <div class="divider"></div>
  37. <div class="field">
  38. <button class="ui primary button" data-url="{{.Link}}">{{ctx.Locale.Tr "actions.runners.update_runner"}}</button>
  39. <button class="ui red button delete-button show-modal" data-url="{{.Link}}/delete" data-modal="#runner-delete-modal">
  40. {{ctx.Locale.Tr "actions.runners.delete_runner"}}</button>
  41. </div>
  42. </form>
  43. </div>
  44. <h4 class="ui top attached header">
  45. {{ctx.Locale.Tr "actions.runners.task_list"}}
  46. </h4>
  47. <div class="ui attached segment">
  48. <table class="ui very basic striped table unstackable">
  49. <thead>
  50. <tr>
  51. <th>{{ctx.Locale.Tr "actions.runners.task_list.run"}}</th>
  52. <th>{{ctx.Locale.Tr "actions.runners.task_list.status"}}</th>
  53. <th>{{ctx.Locale.Tr "actions.runners.task_list.repository"}}</th>
  54. <th>{{ctx.Locale.Tr "actions.runners.task_list.commit"}}</th>
  55. <th>{{ctx.Locale.Tr "actions.runners.task_list.done_at"}}</th>
  56. </tr>
  57. </thead>
  58. <tbody>
  59. {{range .Tasks}}
  60. <tr>
  61. <td><a href="{{.GetRunLink}}" target="_blank">{{.ID}}</a></td>
  62. <td><span class="ui label task-status-{{.Status.String}}">{{.Status.LocaleString ctx.Locale}}</span></td>
  63. <td><a href="{{.GetRepoLink}}" target="_blank">{{.GetRepoName}}</a></td>
  64. <td>
  65. <strong><a href="{{.GetCommitLink}}" target="_blank">{{ShortSha .CommitSHA}}</a></strong>
  66. </td>
  67. <td>{{if .IsStopped}}
  68. <span>{{TimeSinceUnix .Stopped ctx.Locale}}</span>
  69. {{else}}-{{end}}</td>
  70. </tr>
  71. {{end}}
  72. {{if not .Tasks}}
  73. <tr>
  74. <td colspan="5">{{ctx.Locale.Tr "actions.runners.task_list.no_tasks"}}</td>
  75. </tr>
  76. {{end}}
  77. </tbody>
  78. </table>
  79. {{template "base/paginate" .}}
  80. </div>
  81. <div class="ui g-modal-confirm delete modal" id="runner-delete-modal">
  82. <div class="header">
  83. {{svg "octicon-trash"}}
  84. {{ctx.Locale.Tr "actions.runners.delete_runner_header"}}
  85. </div>
  86. <div class="content">
  87. <p>{{ctx.Locale.Tr "actions.runners.delete_runner_notice" | Safe}}</p>
  88. </div>
  89. {{template "base/modal_actions_confirm" .}}
  90. </div>
  91. </div>