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.

281 lines
12 KiB

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