config.tmpl 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272
  1. {{template "base/head" .}}
  2. <div class="admin config">
  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.config.server_config"}}
  10. </h4>
  11. <div class="ui attached table segment">
  12. <dl class="dl-horizontal admin-dl-horizontal">
  13. <dt>{{.i18n.Tr "admin.config.app_name"}}</dt>
  14. <dd>{{AppName}}</dd>
  15. <dt>{{.i18n.Tr "admin.config.app_ver"}}</dt>
  16. <dd>{{AppVer}}</dd>
  17. <dt>{{.i18n.Tr "admin.config.app_url"}}</dt>
  18. <dd>{{.AppUrl}}</dd>
  19. <dt>{{.i18n.Tr "admin.config.domain"}}</dt>
  20. <dd>{{.Domain}}</dd>
  21. <dt>{{.i18n.Tr "admin.config.offline_mode"}}</dt>
  22. <dd><i class="fa fa{{if .OfflineMode}}-check{{end}}-square-o"></i></dd>
  23. <dt>{{.i18n.Tr "admin.config.disable_router_log"}}</dt>
  24. <dd><i class="fa fa{{if .DisableRouterLog}}-check{{end}}-square-o"></i></dd>
  25. <div class="ui divider"></div>
  26. <dt>{{.i18n.Tr "admin.config.run_user"}}</dt>
  27. <dd>{{.RunUser}}</dd>
  28. <dt>{{.i18n.Tr "admin.config.run_mode"}}</dt>
  29. <dd>{{.RunMode}}</dd>
  30. <div class="ui divider"></div>
  31. <dt>{{.i18n.Tr "admin.config.repo_root_path"}}</dt>
  32. <dd>{{.RepoRootPath}}</dd>
  33. <dt>{{.i18n.Tr "admin.config.static_file_root_path"}}</dt>
  34. <dd>{{.StaticRootPath}}</dd>
  35. <dt>{{.i18n.Tr "admin.config.log_file_root_path"}}</dt>
  36. <dd>{{.LogRootPath}}</dd>
  37. <dt>{{.i18n.Tr "admin.config.script_type"}}</dt>
  38. <dd>{{.ScriptType}}</dd>
  39. <dt>{{.i18n.Tr "admin.config.reverse_auth_user"}}</dt>
  40. <dd>{{.ReverseProxyAuthUser}}</dd>
  41. </dl>
  42. </div>
  43. <h4 class="ui top attached header">
  44. {{.i18n.Tr "admin.config.ssh_config"}}
  45. </h4>
  46. <div class="ui attached table segment">
  47. <dl class="dl-horizontal admin-dl-horizontal">
  48. <dt>{{.i18n.Tr "admin.config.ssh_enabled"}}</dt>
  49. <dd><i class="fa fa{{if not .SSH.Disabled}}-check{{end}}-square-o"></i></dd>
  50. {{if not .SSH.Disabled}}
  51. <dt>{{.i18n.Tr "admin.config.ssh_start_builtin_server"}}</dt>
  52. <dd><i class="fa fa{{if .SSH.StartBuiltinServer}}-check{{end}}-square-o"></i></dd>
  53. <dt>{{.i18n.Tr "admin.config.ssh_domain"}}</dt>
  54. <dd>{{.SSH.Domain}}</dd>
  55. <dt>{{.i18n.Tr "admin.config.ssh_port"}}</dt>
  56. <dd>{{.SSH.Port}}</dd>
  57. <dt>{{.i18n.Tr "admin.config.ssh_listen_port"}}</dt>
  58. <dd>{{.SSH.ListenPort}}</dd>
  59. {{if not .SSH.StartBuiltinServer}}
  60. <dt>{{.i18n.Tr "admin.config.ssh_root_path"}}</dt>
  61. <dd>{{.SSH.RootPath}}</dd>
  62. <dt>{{.i18n.Tr "admin.config.ssh_key_test_path"}}</dt>
  63. <dd>{{.SSH.KeyTestPath}}</dd>
  64. <dt>{{.i18n.Tr "admin.config.ssh_keygen_path"}}</dt>
  65. <dd>{{.SSH.KeygenPath}}</dd>
  66. <dt>{{.i18n.Tr "admin.config.ssh_minimum_key_size_check"}}</dt>
  67. <dd><i class="fa fa{{if .SSH.MinimumKeySizeCheck}}-check{{end}}-square-o"></i></dd>
  68. {{if .SSH.MinimumKeySizeCheck}}
  69. <dt>{{.i18n.Tr "admin.config.ssh_minimum_key_sizes"}}</dt>
  70. <dd>{{.SSH.MinimumKeySizes}}</dd>
  71. {{end}}
  72. {{end}}
  73. {{end}}
  74. </dl>
  75. </div>
  76. <h4 class="ui top attached header">
  77. {{.i18n.Tr "admin.config.db_config"}}
  78. </h4>
  79. <div class="ui attached table segment">
  80. <dl class="dl-horizontal admin-dl-horizontal">
  81. <dt>{{.i18n.Tr "admin.config.db_type"}}</dt>
  82. <dd>{{.DbCfg.Type}}</dd>
  83. <dt>{{.i18n.Tr "admin.config.db_host"}}</dt>
  84. <dd>{{.DbCfg.Host}}</dd>
  85. <dt>{{.i18n.Tr "admin.config.db_name"}}</dt>
  86. <dd>{{.DbCfg.Name}}</dd>
  87. <dt>{{.i18n.Tr "admin.config.db_user"}}</dt>
  88. <dd>{{.DbCfg.User}}</dd>
  89. <dt>{{.i18n.Tr "admin.config.db_ssl_mode"}}</dt>
  90. <dd>{{.DbCfg.SSLMode}} {{.i18n.Tr "admin.config.db_ssl_mode_helper"}}</dd>
  91. <dt>{{.i18n.Tr "admin.config.db_path"}}</dt>
  92. <dd>{{.DbCfg.Path}} {{.i18n.Tr "admin.config.db_path_helper"}}</dd>
  93. </dl>
  94. </div>
  95. <h4 class="ui top attached header">
  96. {{.i18n.Tr "admin.config.service_config"}}
  97. </h4>
  98. <div class="ui attached table segment">
  99. <dl class="dl-horizontal admin-dl-horizontal">
  100. <dt>{{.i18n.Tr "admin.config.register_email_confirm"}}</dt>
  101. <dd><i class="fa fa{{if .Service.RegisterEmailConfirm}}-check{{end}}-square-o"></i></dd>
  102. <dt>{{.i18n.Tr "admin.config.disable_register"}}</dt>
  103. <dd><i class="fa fa{{if .Service.DisableRegistration}}-check{{end}}-square-o"></i></dd>
  104. <dt>{{.i18n.Tr "admin.config.show_registration_button"}}</dt>
  105. <dd><i class="fa fa{{if .Service.ShowRegistrationButton}}-check{{end}}-square-o"></i></dd>
  106. <dt>{{.i18n.Tr "admin.config.require_sign_in_view"}}</dt>
  107. <dd><i class="fa fa{{if .Service.RequireSignInView}}-check{{end}}-square-o"></i></dd>
  108. <dt>{{.i18n.Tr "admin.config.mail_notify"}}</dt>
  109. <dd><i class="fa fa{{if .Service.EnableNotifyMail}}-check{{end}}-square-o"></i></dd>
  110. {{/*<dt>{{.i18n.Tr "admin.config.disable_key_size_check"}}</dt>
  111. <dd><i class="fa fa{{if .Service.DisableMinimumKeySizeCheck}}-check{{end}}-square-o"></i></dd>*/}}
  112. <dt>{{.i18n.Tr "admin.config.enable_captcha"}}</dt>
  113. <dd><i class="fa fa{{if .Service.EnableCaptcha}}-check{{end}}-square-o"></i></dd>
  114. <div class="ui divider"></div>
  115. <dt>{{.i18n.Tr "admin.config.active_code_lives"}}</dt>
  116. <dd>{{.Service.ActiveCodeLives}} {{.i18n.Tr "tool.raw_minutes"}}</dd>
  117. <dt>{{.i18n.Tr "admin.config.reset_password_code_lives"}}</dt>
  118. <dd>{{.Service.ResetPwdCodeLives}} {{.i18n.Tr "tool.raw_minutes"}}</dd>
  119. </dl>
  120. </div>
  121. <h4 class="ui top attached header">
  122. {{.i18n.Tr "admin.config.webhook_config"}}
  123. </h4>
  124. <div class="ui attached table segment">
  125. <dl class="dl-horizontal admin-dl-horizontal">
  126. <dt>{{.i18n.Tr "admin.config.queue_length"}}</dt>
  127. <dd>{{.Webhook.QueueLength}}</dd>
  128. <dt>{{.i18n.Tr "admin.config.deliver_timeout"}}</dt>
  129. <dd>{{.Webhook.DeliverTimeout}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  130. <dt>{{.i18n.Tr "admin.config.skip_tls_verify"}}</dt>
  131. <dd><i class="fa fa{{if .Webhook.SkipTLSVerify}}-check{{end}}-square-o"></i></dd>
  132. </dl>
  133. </div>
  134. <h4 class="ui top attached header">
  135. {{.i18n.Tr "admin.config.mailer_config"}}
  136. </h4>
  137. <div class="ui attached table segment">
  138. <dl class="dl-horizontal admin-dl-horizontal">
  139. <dt>{{.i18n.Tr "admin.config.mailer_enabled"}}</dt>
  140. <dd><i class="fa fa{{if .MailerEnabled}}-check{{end}}-square-o"></i></dd>
  141. {{if .MailerEnabled}}
  142. <dt>{{.i18n.Tr "admin.config.mailer_name"}}</dt>
  143. <dd>{{.Mailer.Name}}</dd>
  144. <dt>{{.i18n.Tr "admin.config.mailer_disable_helo"}}</dt>
  145. <dd><i class="fa fa{{if .Mailer.DisableHelo}}-check{{end}}-square-o"></i></dd>
  146. <dt>{{.i18n.Tr "admin.config.mailer_host"}}</dt>
  147. <dd>{{.Mailer.Host}}</dd>
  148. <dt>{{.i18n.Tr "admin.config.mailer_user"}}</dt>
  149. <dd>{{if .Mailer.User}}{{.Mailer.User}}{{else}}(empty){{end}}</dd><br>
  150. <form class="ui form" action="{{AppSubUrl}}/admin/config/test_mail" method="post">
  151. {{.CsrfTokenHtml}}
  152. <div class="inline field ui left">
  153. <div class="ui input">
  154. <input type="email" name="email" required>
  155. </div>
  156. </div>
  157. <button class="ui green button" id="test-mail-btn">{{.i18n.Tr "admin.config.send_test_mail"}}</button>
  158. </form>
  159. {{end}}
  160. </dl>
  161. </div>
  162. <h4 class="ui top attached header">
  163. {{.i18n.Tr "admin.config.cache_config"}}
  164. </h4>
  165. <div class="ui attached table segment">
  166. <dl class="dl-horizontal admin-dl-horizontal">
  167. <dt>{{.i18n.Tr "admin.config.cache_adapter"}}</dt>
  168. <dd>{{.CacheAdapter}}</dd>
  169. <dt>{{.i18n.Tr "admin.config.cache_interval"}}</dt>
  170. <dd>{{.CacheInterval}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  171. {{if .CacheConn}}
  172. <dt>{{.i18n.Tr "admin.config.cache_conn"}}</dt>
  173. <dd><code>{{.CacheConn}}</code></dd>
  174. {{end}}
  175. </dl>
  176. </div>
  177. <h4 class="ui top attached header">
  178. {{.i18n.Tr "admin.config.session_config"}}
  179. </h4>
  180. <div class="ui attached table segment">
  181. <dl class="dl-horizontal admin-dl-horizontal">
  182. <dt>{{.i18n.Tr "admin.config.session_provider"}}</dt>
  183. <dd>{{.SessionConfig.Provider}}</dd>
  184. <dt>{{.i18n.Tr "admin.config.provider_config"}}</dt>
  185. <dd><code>{{.SessionConfig.ProviderConfig}}</code></dd>
  186. <dt>{{.i18n.Tr "admin.config.cookie_name"}}</dt>
  187. <dd>{{.SessionConfig.CookieName}}</dd>
  188. <dt>{{.i18n.Tr "admin.config.gc_interval_time"}}</dt>
  189. <dd>{{.SessionConfig.Gclifetime}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  190. <dt>{{.i18n.Tr "admin.config.session_life_time"}}</dt>
  191. <dd>{{.SessionConfig.Maxlifetime}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  192. <dt>{{.i18n.Tr "admin.config.https_only"}}</dt>
  193. <dd><i class="fa fa{{if .SessionConfig.Secure}}-check{{end}}-square-o"></i></dd>
  194. <dt>{{.i18n.Tr "admin.config.cookie_life_time"}}</dt>
  195. <dd>{{.SessionConfig.CookieLifeTime}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  196. </dl>
  197. </div>
  198. <h4 class="ui top attached header">
  199. {{.i18n.Tr "admin.config.picture_config"}}
  200. </h4>
  201. <div class="ui attached table segment">
  202. <dl class="dl-horizontal admin-dl-horizontal">
  203. <dt>{{.i18n.Tr "admin.config.disable_gravatar"}}</dt>
  204. <dd><i class="fa fa{{if .DisableGravatar}}-check{{end}}-square-o"></i></dd>
  205. <div class="ui divider"></div>
  206. <dt>{{.i18n.Tr "admin.config.enable_federated_avatar"}}</dt>
  207. <dd><i class="fa fa{{if .EnableFederatedAvatar}}-check{{end}}-square-o"></i></dd>
  208. </dl>
  209. </div>
  210. <h4 class="ui top attached header">
  211. {{.i18n.Tr "admin.config.git_config"}}
  212. </h4>
  213. <div class="ui attached table segment">
  214. <dl class="dl-horizontal admin-dl-horizontal">
  215. <dt>{{.i18n.Tr "admin.config.git_disable_diff_highlight"}}</dt>
  216. <dd><i class="fa fa{{if .Git.DisableDiffHighlight}}-check{{end}}-square-o"></i></dd>
  217. <dt>{{.i18n.Tr "admin.config.git_max_diff_lines"}}</dt>
  218. <dd>{{.Git.MaxGitDiffLines}}</dd>
  219. <dt>{{.i18n.Tr "admin.config.git_max_diff_line_characters"}}</dt>
  220. <dd>{{.Git.MaxGitDiffLineCharacters}}</dd>
  221. <dt>{{.i18n.Tr "admin.config.git_max_diff_files"}}</dt>
  222. <dd>{{.Git.MaxGitDiffFiles}}</dd>
  223. <dt>{{.i18n.Tr "admin.config.git_gc_args"}}</dt>
  224. <dd><code>{{.Git.GCArgs}}</code></dd>
  225. <dt>{{.i18n.Tr "admin.config.git_max_diff_lines"}}</dt>
  226. <dd>{{.Git.MaxGitDiffLines}}</dd>
  227. <div class="ui divider"></div>
  228. <dt>{{.i18n.Tr "admin.config.git_migrate_timeout"}}</dt>
  229. <dd>{{.Git.Timeout.Migrate}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  230. <dt>{{.i18n.Tr "admin.config.git_mirror_timeout"}}</dt>
  231. <dd>{{.Git.Timeout.Mirror}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  232. <dt>{{.i18n.Tr "admin.config.git_clone_timeout"}}</dt>
  233. <dd>{{.Git.Timeout.Clone}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  234. <dt>{{.i18n.Tr "admin.config.git_pull_timeout"}}</dt>
  235. <dd>{{.Git.Timeout.Pull}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  236. <dt>{{.i18n.Tr "admin.config.git_gc_timeout"}}</dt>
  237. <dd>{{.Git.Timeout.GC}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  238. </dl>
  239. </div>
  240. <h4 class="ui top attached header">
  241. {{.i18n.Tr "admin.config.log_config"}}
  242. </h4>
  243. <div class="ui attached table segment">
  244. <dl class="dl-horizontal admin-dl-horizontal">
  245. {{range .Loggers}}
  246. <dt>{{$.i18n.Tr "admin.config.log_mode"}}</dt>
  247. <dd>{{.Mode}}</dd>
  248. <dt>{{$.i18n.Tr "admin.config.log_config"}}</dt>
  249. <dd><code>{{.Config}}</code></dd>
  250. {{end}}
  251. </dl>
  252. </div>
  253. </div>
  254. </div>
  255. </div>
  256. </div>
  257. {{template "base/footer" .}}