dashboard.tmpl 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. {{template "base/head" .}}
  2. <div class="admin dashboard">
  3. <div class="ui container">
  4. <div class="ui grid">
  5. {{template "admin/navbar" .}}
  6. <div class="twelve wide column content">
  7. {{template "base/alert" .}}
  8. <h4 class="ui top attached header">
  9. {{.i18n.Tr "admin.dashboard.build_info"}}
  10. </h4>
  11. <div class="ui attached table segment">
  12. <dl class="dl-horizontal admin-dl-horizontal">
  13. <dt>{{.i18n.Tr "admin.dashboard.app_ver"}}</dt>
  14. <dd>{{AppVer}}</dd>
  15. <dt>{{.i18n.Tr "admin.dashboard.git_version"}}</dt>
  16. <dd>{{.GitVersion}}</dd>
  17. <dt>{{.i18n.Tr "admin.dashboard.go_version"}}</dt>
  18. <dd>{{.GoVersion}}</dd>
  19. <dt>{{.i18n.Tr "admin.dashboard.build_time"}}</dt>
  20. <dd>{{.BuildTime}}</dd>
  21. <dt>{{.i18n.Tr "admin.dashboard.build_commit"}}</dt>
  22. <dd>
  23. {{if .BuildCommit}}
  24. <a target="_blank" href="https://github.com/gogs/gogs/commit/{{.BuildCommit}}">{{.BuildCommit}} <i class="fa fa-external-link" aria-hidden="true"></i></a>
  25. {{else}}
  26. N/A
  27. {{end}}
  28. </dd>
  29. </dl>
  30. </div>
  31. <h4 class="ui top attached header">
  32. {{.i18n.Tr "admin.dashboard.statistic"}}
  33. </h4>
  34. <div class="ui attached segment">
  35. <p>
  36. {{.i18n.Tr "admin.dashboard.statistic_info" .Stats.Counter.User .Stats.Counter.Org .Stats.Counter.PublicKey .Stats.Counter.Repo .Stats.Counter.Watch .Stats.Counter.Star .Stats.Counter.Action .Stats.Counter.Access .Stats.Counter.Issue .Stats.Counter.Comment .Stats.Counter.Oauth .Stats.Counter.Follow .Stats.Counter.Mirror .Stats.Counter.Release .Stats.Counter.LoginSource .Stats.Counter.Webhook .Stats.Counter.Milestone .Stats.Counter.Label .Stats.Counter.HookTask .Stats.Counter.Team .Stats.Counter.UpdateTask .Stats.Counter.Attachment | Str2HTML}}
  37. </p>
  38. </div>
  39. <h4 class="ui top attached header">
  40. {{.i18n.Tr "admin.dashboard.operations"}}
  41. </h4>
  42. <div class="ui unstackable attached table segment">
  43. <form action="{{AppSubURL}}/admin" method="post">
  44. <table class="ui unstackable very basic table">
  45. <tbody>
  46. <tr>
  47. <td>
  48. {{.CSRFTokenHTML}}
  49. <div class="ui fluid selection dropdown">
  50. <input type="hidden" name="op">
  51. <i class="dropdown icon"></i>
  52. <div class="default text">{{.i18n.Tr "admin.dashboard.select_operation_to_run"}}</div>
  53. <div class="menu">
  54. <div class="item" data-value="1">
  55. {{.i18n.Tr "admin.dashboard.delete_inactivate_accounts"}}
  56. </div>
  57. <div class="item" data-value="2">
  58. {{.i18n.Tr "admin.dashboard.delete_repo_archives"}}
  59. </div>
  60. <div class="item" data-value="3">
  61. {{.i18n.Tr "admin.dashboard.delete_missing_repos"}}
  62. </div>
  63. <div class="item" data-value="4">
  64. {{.i18n.Tr "admin.dashboard.git_gc_repos"}}
  65. </div>
  66. <div class="item" data-value="5">
  67. {{.i18n.Tr "admin.dashboard.resync_all_sshkeys"}}
  68. </div>
  69. <div class="item" data-value="6">
  70. {{.i18n.Tr "admin.dashboard.resync_all_hooks"}}
  71. </div>
  72. <div class="item" data-value="7">
  73. {{.i18n.Tr "admin.dashboard.reinit_missing_repos"}}
  74. </div>
  75. </div>
  76. </div>
  77. </td>
  78. <td><button class="ui button" type="submit">{{.i18n.Tr "admin.dashboard.operation_run"}}</button></td>
  79. </tr>
  80. </tbody>
  81. </table>
  82. </form>
  83. </div>
  84. <h4 class="ui top attached header">
  85. {{.i18n.Tr "admin.dashboard.system_status"}}
  86. </h4>
  87. <div class="ui attached table segment">
  88. <dl class="dl-horizontal admin-dl-horizontal">
  89. <dt>{{.i18n.Tr "admin.dashboard.server_uptime"}}</dt>
  90. <dd>{{.SysStatus.Uptime}}</dd>
  91. <dt>{{.i18n.Tr "admin.dashboard.current_goroutine"}}</dt>
  92. <dd>{{.SysStatus.NumGoroutine}}</dd>
  93. <div class="ui divider"></div>
  94. <dt>{{.i18n.Tr "admin.dashboard.current_memory_usage"}}</dt>
  95. <dd>{{.SysStatus.MemAllocated}}</dd>
  96. <dt>{{.i18n.Tr "admin.dashboard.total_memory_allocated"}}</dt>
  97. <dd>{{.SysStatus.MemTotal}}</dd>
  98. <dt>{{.i18n.Tr "admin.dashboard.memory_obtained"}}</dt>
  99. <dd>{{.SysStatus.MemSys}}</dd>
  100. <dt>{{.i18n.Tr "admin.dashboard.pointer_lookup_times"}}</dt>
  101. <dd>{{.SysStatus.Lookups}}</dd>
  102. <dt>{{.i18n.Tr "admin.dashboard.memory_allocate_times"}}</dt>
  103. <dd>{{.SysStatus.MemMallocs}}</dd>
  104. <dt>{{.i18n.Tr "admin.dashboard.memory_free_times"}}</dt>
  105. <dd>{{.SysStatus.MemFrees}}</dd>
  106. <div class="ui divider"></div>
  107. <dt>{{.i18n.Tr "admin.dashboard.current_heap_usage"}}</dt>
  108. <dd>{{.SysStatus.HeapAlloc}}</dd>
  109. <dt>{{.i18n.Tr "admin.dashboard.heap_memory_obtained"}}</dt>
  110. <dd>{{.SysStatus.HeapSys}}</dd>
  111. <dt>{{.i18n.Tr "admin.dashboard.heap_memory_idle"}}</dt>
  112. <dd>{{.SysStatus.HeapIdle}}</dd>
  113. <dt>{{.i18n.Tr "admin.dashboard.heap_memory_in_use"}}</dt>
  114. <dd>{{.SysStatus.HeapInuse}}</dd>
  115. <dt>{{.i18n.Tr "admin.dashboard.heap_memory_released"}}</dt>
  116. <dd>{{.SysStatus.HeapReleased}}</dd>
  117. <dt>{{.i18n.Tr "admin.dashboard.heap_objects"}}</dt>
  118. <dd>{{.SysStatus.HeapObjects}}</dd>
  119. <div class="ui divider"></div>
  120. <dt>{{.i18n.Tr "admin.dashboard.bootstrap_stack_usage"}}</dt>
  121. <dd>{{.SysStatus.StackInuse}}</dd>
  122. <dt>{{.i18n.Tr "admin.dashboard.stack_memory_obtained"}}</dt>
  123. <dd>{{.SysStatus.StackSys}}</dd>
  124. <dt>{{.i18n.Tr "admin.dashboard.mspan_structures_usage"}}</dt>
  125. <dd>{{.SysStatus.MSpanInuse}}</dd>
  126. <dt>{{.i18n.Tr "admin.dashboard.mspan_structures_obtained"}}</dt>
  127. <dd>{{.SysStatus.HeapSys}}</dd>
  128. <dt>{{.i18n.Tr "admin.dashboard.mcache_structures_usage"}}</dt>
  129. <dd>{{.SysStatus.MCacheInuse}}</dd>
  130. <dt>{{.i18n.Tr "admin.dashboard.mcache_structures_obtained"}}</dt>
  131. <dd>{{.SysStatus.MCacheSys}}</dd>
  132. <dt>{{.i18n.Tr "admin.dashboard.profiling_bucket_hash_table_obtained"}}</dt>
  133. <dd>{{.SysStatus.BuckHashSys}}</dd>
  134. <dt>{{.i18n.Tr "admin.dashboard.gc_metadata_obtained"}}</dt>
  135. <dd>{{.SysStatus.GCSys}}</dd>
  136. <dt>{{.i18n.Tr "admin.dashboard.other_system_allocation_obtained"}}</dt>
  137. <dd>{{.SysStatus.OtherSys}}</dd>
  138. <div class="ui divider"></div>
  139. <dt>{{.i18n.Tr "admin.dashboard.next_gc_recycle"}}</dt>
  140. <dd>{{.SysStatus.NextGC}}</dd>
  141. <dt>{{.i18n.Tr "admin.dashboard.last_gc_time"}}</dt>
  142. <dd>{{.SysStatus.LastGC}}</dd>
  143. <dt>{{.i18n.Tr "admin.dashboard.total_gc_pause"}}</dt>
  144. <dd>{{.SysStatus.PauseTotalNs}}</dd>
  145. <dt>{{.i18n.Tr "admin.dashboard.last_gc_pause"}}</dt>
  146. <dd>{{.SysStatus.PauseNs}}</dd>
  147. <dt>{{.i18n.Tr "admin.dashboard.gc_times"}}</dt>
  148. <dd>{{.SysStatus.NumGC}}</dd>
  149. </dl>
  150. </div>
  151. </div>
  152. </div>
  153. </div>
  154. </div>
  155. {{template "base/footer" .}}