config.tmpl 12 KB

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