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.

283 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.default_allow_create_organization"}}</dt>
  122. <dd><i class="fa fa{{if .Service.DefaultAllowCreateOrganization}}-check{{end}}-square-o"></i></dd>
  123. <dt>{{.i18n.Tr "admin.config.no_reply_address"}}</dt>
  124. <dd>{{if .Service.NoReplyAddress}}{{.Service.NoReplyAddress}}{{else}}-{{end}}</dd>
  125. <div class="ui divider"></div>
  126. <dt>{{.i18n.Tr "admin.config.active_code_lives"}}</dt>
  127. <dd>{{.Service.ActiveCodeLives}} {{.i18n.Tr "tool.raw_minutes"}}</dd>
  128. <dt>{{.i18n.Tr "admin.config.reset_password_code_lives"}}</dt>
  129. <dd>{{.Service.ResetPwdCodeLives}} {{.i18n.Tr "tool.raw_minutes"}}</dd>
  130. </dl>
  131. </div>
  132. <h4 class="ui top attached header">
  133. {{.i18n.Tr "admin.config.webhook_config"}}
  134. </h4>
  135. <div class="ui attached table segment">
  136. <dl class="dl-horizontal admin-dl-horizontal">
  137. <dt>{{.i18n.Tr "admin.config.queue_length"}}</dt>
  138. <dd>{{.Webhook.QueueLength}}</dd>
  139. <dt>{{.i18n.Tr "admin.config.deliver_timeout"}}</dt>
  140. <dd>{{.Webhook.DeliverTimeout}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  141. <dt>{{.i18n.Tr "admin.config.skip_tls_verify"}}</dt>
  142. <dd><i class="fa fa{{if .Webhook.SkipTLSVerify}}-check{{end}}-square-o"></i></dd>
  143. </dl>
  144. </div>
  145. <h4 class="ui top attached header">
  146. {{.i18n.Tr "admin.config.mailer_config"}}
  147. </h4>
  148. <div class="ui attached table segment">
  149. <dl class="dl-horizontal admin-dl-horizontal">
  150. <dt>{{.i18n.Tr "admin.config.mailer_enabled"}}</dt>
  151. <dd><i class="fa fa{{if .MailerEnabled}}-check{{end}}-square-o"></i></dd>
  152. {{if .MailerEnabled}}
  153. <dt>{{.i18n.Tr "admin.config.mailer_name"}}</dt>
  154. <dd>{{.Mailer.Name}}</dd>
  155. <dt>{{.i18n.Tr "admin.config.mailer_disable_helo"}}</dt>
  156. <dd><i class="fa fa{{if .Mailer.DisableHelo}}-check{{end}}-square-o"></i></dd>
  157. <dt>{{.i18n.Tr "admin.config.mailer_host"}}</dt>
  158. <dd>{{.Mailer.Host}}</dd>
  159. <dt>{{.i18n.Tr "admin.config.mailer_user"}}</dt>
  160. <dd>{{if .Mailer.User}}{{.Mailer.User}}{{else}}(empty){{end}}</dd><br>
  161. <form class="ui form" action="{{AppSubUrl}}/admin/config/test_mail" method="post">
  162. {{.CsrfTokenHtml}}
  163. <div class="inline field ui left">
  164. <div class="ui input">
  165. <input type="email" name="email" required>
  166. </div>
  167. </div>
  168. <button class="ui green button" id="test-mail-btn">{{.i18n.Tr "admin.config.send_test_mail"}}</button>
  169. </form>
  170. {{end}}
  171. </dl>
  172. </div>
  173. <h4 class="ui top attached header">
  174. {{.i18n.Tr "admin.config.cache_config"}}
  175. </h4>
  176. <div class="ui attached table segment">
  177. <dl class="dl-horizontal admin-dl-horizontal">
  178. <dt>{{.i18n.Tr "admin.config.cache_adapter"}}</dt>
  179. <dd>{{.CacheAdapter}}</dd>
  180. <dt>{{.i18n.Tr "admin.config.cache_interval"}}</dt>
  181. <dd>{{.CacheInterval}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  182. {{if .CacheConn}}
  183. <dt>{{.i18n.Tr "admin.config.cache_conn"}}</dt>
  184. <dd><code>{{.CacheConn}}</code></dd>
  185. {{end}}
  186. </dl>
  187. </div>
  188. <h4 class="ui top attached header">
  189. {{.i18n.Tr "admin.config.session_config"}}
  190. </h4>
  191. <div class="ui attached table segment">
  192. <dl class="dl-horizontal admin-dl-horizontal">
  193. <dt>{{.i18n.Tr "admin.config.session_provider"}}</dt>
  194. <dd>{{.SessionConfig.Provider}}</dd>
  195. <dt>{{.i18n.Tr "admin.config.provider_config"}}</dt>
  196. <dd><code>{{if .SessionConfig.ProviderConfig}}{{.SessionConfig.ProviderConfig}}{{else}}-{{end}}</code></dd>
  197. <dt>{{.i18n.Tr "admin.config.cookie_name"}}</dt>
  198. <dd>{{.SessionConfig.CookieName}}</dd>
  199. <dt>{{.i18n.Tr "admin.config.gc_interval_time"}}</dt>
  200. <dd>{{.SessionConfig.Gclifetime}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  201. <dt>{{.i18n.Tr "admin.config.session_life_time"}}</dt>
  202. <dd>{{.SessionConfig.Maxlifetime}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  203. <dt>{{.i18n.Tr "admin.config.https_only"}}</dt>
  204. <dd><i class="fa fa{{if .SessionConfig.Secure}}-check{{end}}-square-o"></i></dd>
  205. <dt>{{.i18n.Tr "admin.config.cookie_life_time"}}</dt>
  206. <dd>{{.SessionConfig.CookieLifeTime}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  207. </dl>
  208. </div>
  209. <h4 class="ui top attached header">
  210. {{.i18n.Tr "admin.config.picture_config"}}
  211. </h4>
  212. <div class="ui attached table segment">
  213. <dl class="dl-horizontal admin-dl-horizontal">
  214. <dt>{{.i18n.Tr "admin.config.disable_gravatar"}}</dt>
  215. <dd><i class="fa fa{{if .DisableGravatar}}-check{{end}}-square-o"></i></dd>
  216. <div class="ui divider"></div>
  217. <dt>{{.i18n.Tr "admin.config.enable_federated_avatar"}}</dt>
  218. <dd><i class="fa fa{{if .EnableFederatedAvatar}}-check{{end}}-square-o"></i></dd>
  219. </dl>
  220. </div>
  221. <h4 class="ui top attached header">
  222. {{.i18n.Tr "admin.config.git_config"}}
  223. </h4>
  224. <div class="ui attached table segment">
  225. <dl class="dl-horizontal admin-dl-horizontal">
  226. <dt>{{.i18n.Tr "admin.config.git_disable_diff_highlight"}}</dt>
  227. <dd><i class="fa fa{{if .Git.DisableDiffHighlight}}-check{{end}}-square-o"></i></dd>
  228. <dt>{{.i18n.Tr "admin.config.git_max_diff_lines"}}</dt>
  229. <dd>{{.Git.MaxGitDiffLines}}</dd>
  230. <dt>{{.i18n.Tr "admin.config.git_max_diff_line_characters"}}</dt>
  231. <dd>{{.Git.MaxGitDiffLineCharacters}}</dd>
  232. <dt>{{.i18n.Tr "admin.config.git_max_diff_files"}}</dt>
  233. <dd>{{.Git.MaxGitDiffFiles}}</dd>
  234. <dt>{{.i18n.Tr "admin.config.git_gc_args"}}</dt>
  235. <dd><code>{{.Git.GCArgs}}</code></dd>
  236. <dt>{{.i18n.Tr "admin.config.git_max_diff_lines"}}</dt>
  237. <dd>{{.Git.MaxGitDiffLines}}</dd>
  238. <div class="ui divider"></div>
  239. <dt>{{.i18n.Tr "admin.config.git_migrate_timeout"}}</dt>
  240. <dd>{{.Git.Timeout.Migrate}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  241. <dt>{{.i18n.Tr "admin.config.git_mirror_timeout"}}</dt>
  242. <dd>{{.Git.Timeout.Mirror}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  243. <dt>{{.i18n.Tr "admin.config.git_clone_timeout"}}</dt>
  244. <dd>{{.Git.Timeout.Clone}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  245. <dt>{{.i18n.Tr "admin.config.git_pull_timeout"}}</dt>
  246. <dd>{{.Git.Timeout.Pull}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  247. <dt>{{.i18n.Tr "admin.config.git_gc_timeout"}}</dt>
  248. <dd>{{.Git.Timeout.GC}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  249. </dl>
  250. </div>
  251. <h4 class="ui top attached header">
  252. {{.i18n.Tr "admin.config.log_config"}}
  253. </h4>
  254. <div class="ui attached table segment">
  255. <dl class="dl-horizontal admin-dl-horizontal">
  256. {{range .Loggers}}
  257. <dt>{{$.i18n.Tr "admin.config.log_mode"}}</dt>
  258. <dd>{{.Mode}}</dd>
  259. <dt>{{$.i18n.Tr "admin.config.log_config"}}</dt>
  260. <dd><pre>{{.Config | JsonPrettyPrint}}</pre></dd>
  261. {{end}}
  262. </dl>
  263. </div>
  264. </div>
  265. </div>
  266. {{template "base/footer" .}}