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.

dashboard.tmpl 7.3KB

various style fixes (#25008) - fixing various style issues (border color/radius, margin) - added indent at some radio input blocks --- ### Before: ![Bildschirmfoto vom 2023-05-30 17-14-15](https://github.com/go-gitea/gitea/assets/47871822/59963646-d34f-4032-bd02-dbb48747b96d) ![Bildschirmfoto vom 2023-05-30 17-13-21](https://github.com/go-gitea/gitea/assets/47871822/87b67a35-8fbf-47ad-9903-499403dcebb5) ![Bildschirmfoto vom 2023-05-30 17-12-54](https://github.com/go-gitea/gitea/assets/47871822/6c92b427-ee54-42b1-b206-400e33d705ed) ![Bildschirmfoto vom 2023-05-30 17-05-29](https://github.com/go-gitea/gitea/assets/47871822/bd8d201d-bbc3-4c71-84fb-fb393d3c36bb) ![Bildschirmfoto vom 2023-05-30 17-04-36](https://github.com/go-gitea/gitea/assets/47871822/5f7a4e2a-f140-4162-8f3e-294356b42dee) ![Bildschirmfoto vom 2023-05-30 17-06-05](https://github.com/go-gitea/gitea/assets/47871822/d09e46b5-5e8f-41f1-af4b-24bc8cc12c21) ![Bildschirmfoto vom 2023-05-30 17-09-35](https://github.com/go-gitea/gitea/assets/47871822/179dd3f5-914d-4593-8698-46fdffd02d54) ### After: ![Bildschirmfoto vom 2023-05-30 17-14-03](https://github.com/go-gitea/gitea/assets/47871822/a404c53e-cd25-41bb-aece-bedf90c2e8ed) ![Bildschirmfoto vom 2023-05-30 17-13-35](https://github.com/go-gitea/gitea/assets/47871822/2ea8779c-9d13-44e7-8ad6-ebac10fac465) ![Bildschirmfoto vom 2023-05-30 17-12-45](https://github.com/go-gitea/gitea/assets/47871822/b34ffeb9-a7e8-4900-97ee-1894f91e189c) ![Bildschirmfoto vom 2023-05-30 17-05-18](https://github.com/go-gitea/gitea/assets/47871822/f8d18360-db3e-472a-9e86-575e6dcb4f36) ![Bildschirmfoto vom 2023-05-30 17-04-49](https://github.com/go-gitea/gitea/assets/47871822/12fc20d6-4fa5-4ac4-b788-a1506647ef47) ![Bildschirmfoto vom 2023-05-30 17-06-23](https://github.com/go-gitea/gitea/assets/47871822/2a82f8e9-3455-4619-9a2e-352c40c4e0b6) ![Bildschirmfoto vom 2023-05-30 17-11-26](https://github.com/go-gitea/gitea/assets/47871822/ab408878-45fb-4713-84c4-5777705a98ab) --------- Co-authored-by: silverwind <me@silverwind.io>
1 year ago
8 years ago
Use auto-updating, natively hoverable, localized time elements (#23988) - Added [GitHub's `relative-time` element](https://github.com/github/relative-time-element) - Converted all formatted timestamps to use this element - No more flashes of unstyled content around time elements - These elements are localized using the `lang` property of the HTML file - Relative (e.g. the activities in the dashboard) and duration (e.g. server uptime in the admin page) time elements are auto-updated to keep up with the current time without refreshing the page - Code that is not needed anymore such as `formatting.js` and parts of `since.go` have been deleted Replaces #21440 Follows #22861 ## Screenshots ### Localized ![image](https://user-images.githubusercontent.com/20454870/230775041-f0af4fda-8f6b-46d3-b8e3-d340c791a50c.png) ![image](https://user-images.githubusercontent.com/20454870/230673393-931415a9-5729-4ac3-9a89-c0fb5fbeeeb7.png) ### Tooltips #### Native for dates ![image](https://user-images.githubusercontent.com/20454870/230797525-1fa0a854-83e3-484c-9da5-9425ab6528a3.png) #### Interactive for relative ![image](https://user-images.githubusercontent.com/115237/230796860-51e1d640-c820-4a34-ba2e-39087020626a.png) ### Auto-update ![rec](https://user-images.githubusercontent.com/20454870/230672159-37480d8f-435a-43e9-a2b0-44073351c805.gif) --------- Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: delvh <dev.lh@web.de>
1 year ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. {{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin dashboard")}}
  2. <div class="admin-setting-content">
  3. {{if .NeedUpdate}}
  4. <div class="ui negative message flash-error">
  5. <p>{{(.locale.Tr "admin.dashboard.new_version_hint" .RemoteVersion AppVer) | Str2html}}</p>
  6. </div>
  7. {{end}}
  8. <h4 class="ui top attached header">
  9. {{.locale.Tr "admin.dashboard.operations"}}
  10. </h4>
  11. <div class="ui attached table segment">
  12. <form method="post" action="{{AppSubUrl}}/admin">
  13. {{.CsrfTokenHtml}}
  14. <table class="ui very basic table gt-mt-0 gt-px-4">
  15. <tbody>
  16. <tr>
  17. <td>{{.locale.Tr "admin.dashboard.delete_inactive_accounts"}}</td>
  18. <td class="text right"><button type="submit" class="ui green button" name="op" value="delete_inactive_accounts">{{svg "octicon-play"}} {{.locale.Tr "admin.dashboard.operation_run"}}</button></td>
  19. </tr>
  20. <tr>
  21. <td>{{.locale.Tr "admin.dashboard.delete_repo_archives"}}</td>
  22. <td class="text right"><button type="submit" class="ui green button" name="op" value="delete_repo_archives">{{svg "octicon-play"}} {{.locale.Tr "admin.dashboard.operation_run"}}</button></td>
  23. </tr>
  24. <tr>
  25. <td>{{.locale.Tr "admin.dashboard.delete_missing_repos"}}</td>
  26. <td class="text right"><button type="submit" class="ui green button" name="op" value="delete_missing_repos">{{svg "octicon-play"}} {{.locale.Tr "admin.dashboard.operation_run"}}</button></td>
  27. </tr>
  28. <tr>
  29. <td>{{.locale.Tr "admin.dashboard.git_gc_repos"}}</td>
  30. <td class="text right"><button type="submit" class="ui green button" name="op" value="git_gc_repos">{{svg "octicon-play"}} {{.locale.Tr "admin.dashboard.operation_run"}}</button></td>
  31. </tr>
  32. {{if and (not .SSH.Disabled) (not .SSH.StartBuiltinServer)}}
  33. <tr>
  34. <td>{{.locale.Tr "admin.dashboard.resync_all_sshkeys"}}<br>
  35. {{.locale.Tr "admin.dashboard.resync_all_sshkeys.desc"}}</td>
  36. <td class="text right"><button type="submit" class="ui green button" name="op" value="resync_all_sshkeys">{{svg "octicon-play"}} {{.locale.Tr "admin.dashboard.operation_run"}}</button></td>
  37. </tr>
  38. <tr>
  39. <td>{{.locale.Tr "admin.dashboard.resync_all_sshprincipals"}}<br>
  40. {{.locale.Tr "admin.dashboard.resync_all_sshprincipals.desc"}}</td>
  41. <td class="text right"><button type="submit" class="ui green button" name="op" value="resync_all_sshprincipals">{{svg "octicon-play" 16}} {{.locale.Tr "admin.dashboard.operation_run"}}</button></td>
  42. </tr>
  43. {{end}}
  44. <tr>
  45. <td>{{.locale.Tr "admin.dashboard.resync_all_hooks"}}</td>
  46. <td class="text right"><button type="submit" class="ui green button" name="op" value="resync_all_hooks">{{svg "octicon-play"}} {{.locale.Tr "admin.dashboard.operation_run"}}</button></td>
  47. </tr>
  48. <tr>
  49. <td>{{.locale.Tr "admin.dashboard.reinit_missing_repos"}}</td>
  50. <td class="text right"><button type="submit" class="ui green button" name="op" value="reinit_missing_repos">{{svg "octicon-play"}} {{.locale.Tr "admin.dashboard.operation_run"}}</button></td>
  51. </tr>
  52. <tr>
  53. <td>{{.locale.Tr "admin.dashboard.sync_external_users"}}</td>
  54. <td class="text right"><button type="submit" class="ui green button" name="op" value="sync_external_users">{{svg "octicon-play"}} {{.locale.Tr "admin.dashboard.operation_run"}}</button></td>
  55. </tr>
  56. <tr>
  57. <td>{{.locale.Tr "admin.dashboard.repo_health_check"}}</td>
  58. <td class="text right"><button type="submit" class="ui green button" name="op" value="repo_health_check">{{svg "octicon-play"}} {{.locale.Tr "admin.dashboard.operation_run"}}</button></td>
  59. </tr>
  60. <tr>
  61. <td>{{.locale.Tr "admin.dashboard.delete_generated_repository_avatars"}}</td>
  62. <td class="text right"><button type="submit" class="ui green button" name="op" value="delete_generated_repository_avatars">{{svg "octicon-play"}} {{.locale.Tr "admin.dashboard.operation_run"}}</button></td>
  63. </tr>
  64. </tbody>
  65. </table>
  66. </form>
  67. </div>
  68. <h4 class="ui top attached header">
  69. {{.locale.Tr "admin.dashboard.system_status"}}
  70. </h4>
  71. <div class="ui attached table segment">
  72. <dl class="admin-dl-horizontal">
  73. <dt>{{.locale.Tr "admin.dashboard.server_uptime"}}</dt>
  74. <dd><relative-time format="duration" datetime="{{.SysStatus.StartTime}}">{{.SysStatus.StartTime}}</relative-time></dd>
  75. <dt>{{.locale.Tr "admin.dashboard.current_goroutine"}}</dt>
  76. <dd>{{.SysStatus.NumGoroutine}}</dd>
  77. <div class="ui divider"></div>
  78. <dt>{{.locale.Tr "admin.dashboard.current_memory_usage"}}</dt>
  79. <dd>{{.SysStatus.MemAllocated}}</dd>
  80. <dt>{{.locale.Tr "admin.dashboard.total_memory_allocated"}}</dt>
  81. <dd>{{.SysStatus.MemTotal}}</dd>
  82. <dt>{{.locale.Tr "admin.dashboard.memory_obtained"}}</dt>
  83. <dd>{{.SysStatus.MemSys}}</dd>
  84. <dt>{{.locale.Tr "admin.dashboard.pointer_lookup_times"}}</dt>
  85. <dd>{{.SysStatus.Lookups}}</dd>
  86. <dt>{{.locale.Tr "admin.dashboard.memory_allocate_times"}}</dt>
  87. <dd>{{.SysStatus.MemMallocs}}</dd>
  88. <dt>{{.locale.Tr "admin.dashboard.memory_free_times"}}</dt>
  89. <dd>{{.SysStatus.MemFrees}}</dd>
  90. <div class="ui divider"></div>
  91. <dt>{{.locale.Tr "admin.dashboard.current_heap_usage"}}</dt>
  92. <dd>{{.SysStatus.HeapAlloc}}</dd>
  93. <dt>{{.locale.Tr "admin.dashboard.heap_memory_obtained"}}</dt>
  94. <dd>{{.SysStatus.HeapSys}}</dd>
  95. <dt>{{.locale.Tr "admin.dashboard.heap_memory_idle"}}</dt>
  96. <dd>{{.SysStatus.HeapIdle}}</dd>
  97. <dt>{{.locale.Tr "admin.dashboard.heap_memory_in_use"}}</dt>
  98. <dd>{{.SysStatus.HeapInuse}}</dd>
  99. <dt>{{.locale.Tr "admin.dashboard.heap_memory_released"}}</dt>
  100. <dd>{{.SysStatus.HeapReleased}}</dd>
  101. <dt>{{.locale.Tr "admin.dashboard.heap_objects"}}</dt>
  102. <dd>{{.SysStatus.HeapObjects}}</dd>
  103. <div class="ui divider"></div>
  104. <dt>{{.locale.Tr "admin.dashboard.bootstrap_stack_usage"}}</dt>
  105. <dd>{{.SysStatus.StackInuse}}</dd>
  106. <dt>{{.locale.Tr "admin.dashboard.stack_memory_obtained"}}</dt>
  107. <dd>{{.SysStatus.StackSys}}</dd>
  108. <dt>{{.locale.Tr "admin.dashboard.mspan_structures_usage"}}</dt>
  109. <dd>{{.SysStatus.MSpanInuse}}</dd>
  110. <dt>{{.locale.Tr "admin.dashboard.mspan_structures_obtained"}}</dt>
  111. <dd>{{.SysStatus.MSpanSys}}</dd>
  112. <dt>{{.locale.Tr "admin.dashboard.mcache_structures_usage"}}</dt>
  113. <dd>{{.SysStatus.MCacheInuse}}</dd>
  114. <dt>{{.locale.Tr "admin.dashboard.mcache_structures_obtained"}}</dt>
  115. <dd>{{.SysStatus.MCacheSys}}</dd>
  116. <dt>{{.locale.Tr "admin.dashboard.profiling_bucket_hash_table_obtained"}}</dt>
  117. <dd>{{.SysStatus.BuckHashSys}}</dd>
  118. <dt>{{.locale.Tr "admin.dashboard.gc_metadata_obtained"}}</dt>
  119. <dd>{{.SysStatus.GCSys}}</dd>
  120. <dt>{{.locale.Tr "admin.dashboard.other_system_allocation_obtained"}}</dt>
  121. <dd>{{.SysStatus.OtherSys}}</dd>
  122. <div class="ui divider"></div>
  123. <dt>{{.locale.Tr "admin.dashboard.next_gc_recycle"}}</dt>
  124. <dd>{{.SysStatus.NextGC}}</dd>
  125. <dt>{{.locale.Tr "admin.dashboard.last_gc_time"}}</dt>
  126. <dd>{{.SysStatus.LastGC}}</dd>
  127. <dt>{{.locale.Tr "admin.dashboard.total_gc_pause"}}</dt>
  128. <dd>{{.SysStatus.PauseTotalNs}}</dd>
  129. <dt>{{.locale.Tr "admin.dashboard.last_gc_pause"}}</dt>
  130. <dd>{{.SysStatus.PauseNs}}</dd>
  131. <dt>{{.locale.Tr "admin.dashboard.gc_times"}}</dt>
  132. <dd>{{.SysStatus.NumGC}}</dd>
  133. </dl>
  134. </div>
  135. </div>
  136. {{template "admin/layout_footer" .}}