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.

308 lines
13 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.custom_conf"}}</dt>
  16. <dd>{{.CustomConf}}</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. {{if not (or (eq .DbCfg.Type "sqlite3") (eq .DbCfg.Type "tidb"))}}
  87. <dt>{{.i18n.Tr "admin.config.db_host"}}</dt>
  88. <dd>{{if .DbCfg.Host}}{{.DbCfg.Host}}{{else}}-{{end}}</dd>
  89. <dt>{{.i18n.Tr "admin.config.db_name"}}</dt>
  90. <dd>{{if .DbCfg.Name}}{{.DbCfg.Name}}{{else}}-{{end}}</dd>
  91. <dt>{{.i18n.Tr "admin.config.db_user"}}</dt>
  92. <dd>{{if .DbCfg.User}}{{.DbCfg.User}}{{else}}-{{end}}</dd>
  93. {{end}}
  94. {{if eq .DbCfg.Type "postgres"}}
  95. <dt>{{.i18n.Tr "admin.config.db_ssl_mode"}}</dt>
  96. <dd>{{if .DbCfg.SSLMode}}{{.DbCfg.SSLMode}}{{else}}-{{end}}</dd>
  97. {{end}}
  98. {{if or (eq .DbCfg.Type "sqlite3") (eq .DbCfg.Type "tidb")}}
  99. <dt>{{.i18n.Tr "admin.config.db_path"}}</dt>
  100. <dd>{{if .DbCfg.Path}}{{.DbCfg.Path}}{{else}}-{{end}}</dd>
  101. {{end}}
  102. </dl>
  103. </div>
  104. <h4 class="ui top attached header">
  105. {{.i18n.Tr "admin.config.service_config"}}
  106. </h4>
  107. <div class="ui attached table segment">
  108. <dl class="dl-horizontal admin-dl-horizontal">
  109. <dt>{{.i18n.Tr "admin.config.register_email_confirm"}}</dt>
  110. <dd><i class="fa fa{{if .Service.RegisterEmailConfirm}}-check{{end}}-square-o"></i></dd>
  111. <dt>{{.i18n.Tr "admin.config.disable_register"}}</dt>
  112. <dd><i class="fa fa{{if .Service.DisableRegistration}}-check{{end}}-square-o"></i></dd>
  113. <dt>{{.i18n.Tr "admin.config.allow_only_external_registration"}}</dt>
  114. <dd><i class="fa fa{{if .Service.AllowOnlyExternalRegistration}}-check{{end}}-square-o"></i></dd>
  115. <dt>{{.i18n.Tr "admin.config.show_registration_button"}}</dt>
  116. <dd><i class="fa fa{{if .Service.ShowRegistrationButton}}-check{{end}}-square-o"></i></dd>
  117. <dt>{{.i18n.Tr "admin.config.enable_openid_signup"}}</dt>
  118. <dd><i class="fa fa{{if .Service.EnableOpenIDSignUp}}-check{{end}}-square-o"></i></dd>
  119. <dt>{{.i18n.Tr "admin.config.enable_openid_signin"}}</dt>
  120. <dd><i class="fa fa{{if .Service.EnableOpenIDSignIn}}-check{{end}}-square-o"></i></dd>
  121. <dt>{{.i18n.Tr "admin.config.require_sign_in_view"}}</dt>
  122. <dd><i class="fa fa{{if .Service.RequireSignInView}}-check{{end}}-square-o"></i></dd>
  123. <dt>{{.i18n.Tr "admin.config.mail_notify"}}</dt>
  124. <dd><i class="fa fa{{if .Service.EnableNotifyMail}}-check{{end}}-square-o"></i></dd>
  125. {{/*<dt>{{.i18n.Tr "admin.config.disable_key_size_check"}}</dt>
  126. <dd><i class="fa fa{{if .Service.DisableMinimumKeySizeCheck}}-check{{end}}-square-o"></i></dd>*/}}
  127. <dt>{{.i18n.Tr "admin.config.enable_captcha"}}</dt>
  128. <dd><i class="fa fa{{if .Service.EnableCaptcha}}-check{{end}}-square-o"></i></dd>
  129. <dt>{{.i18n.Tr "admin.config.default_keep_email_private"}}</dt>
  130. <dd><i class="fa fa{{if .Service.DefaultKeepEmailPrivate}}-check{{end}}-square-o"></i></dd>
  131. <dt>{{.i18n.Tr "admin.config.default_allow_create_organization"}}</dt>
  132. <dd><i class="fa fa{{if .Service.DefaultAllowCreateOrganization}}-check{{end}}-square-o"></i></dd>
  133. <dt>{{.i18n.Tr "admin.config.enable_timetracking"}}</dt>
  134. <dd><i class="fa fa{{if .Service.EnableTimetracking}}-check{{end}}-square-o"></i></dd>
  135. {{if .Service.EnableTimetracking}}
  136. <dt>{{.i18n.Tr "admin.config.default_enable_timetracking"}}</dt>
  137. <dd><i class="fa fa{{if .Service.DefaultEnableTimetracking}}-check{{end}}-square-o"></i></dd>
  138. <dt>{{.i18n.Tr "admin.config.default_allow_only_contributors_to_track_time"}}</dt>
  139. <dd><i class="fa fa{{if .Service.DefaultAllowOnlyContributorsToTrackTime}}-check{{end}}-square-o"></i></dd>
  140. {{end}}
  141. <dt>{{.i18n.Tr "admin.config.no_reply_address"}}</dt>
  142. <dd>{{if .Service.NoReplyAddress}}{{.Service.NoReplyAddress}}{{else}}-{{end}}</dd>
  143. <div class="ui divider"></div>
  144. <dt>{{.i18n.Tr "admin.config.active_code_lives"}}</dt>
  145. <dd>{{.Service.ActiveCodeLives}} {{.i18n.Tr "tool.raw_minutes"}}</dd>
  146. <dt>{{.i18n.Tr "admin.config.reset_password_code_lives"}}</dt>
  147. <dd>{{.Service.ResetPwdCodeLives}} {{.i18n.Tr "tool.raw_minutes"}}</dd>
  148. </dl>
  149. </div>
  150. <h4 class="ui top attached header">
  151. {{.i18n.Tr "admin.config.webhook_config"}}
  152. </h4>
  153. <div class="ui attached table segment">
  154. <dl class="dl-horizontal admin-dl-horizontal">
  155. <dt>{{.i18n.Tr "admin.config.queue_length"}}</dt>
  156. <dd>{{.Webhook.QueueLength}}</dd>
  157. <dt>{{.i18n.Tr "admin.config.deliver_timeout"}}</dt>
  158. <dd>{{.Webhook.DeliverTimeout}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  159. <dt>{{.i18n.Tr "admin.config.skip_tls_verify"}}</dt>
  160. <dd><i class="fa fa{{if .Webhook.SkipTLSVerify}}-check{{end}}-square-o"></i></dd>
  161. </dl>
  162. </div>
  163. <h4 class="ui top attached header">
  164. {{.i18n.Tr "admin.config.mailer_config"}}
  165. </h4>
  166. <div class="ui attached table segment">
  167. <dl class="dl-horizontal admin-dl-horizontal">
  168. <dt>{{.i18n.Tr "admin.config.mailer_enabled"}}</dt>
  169. <dd><i class="fa fa{{if .MailerEnabled}}-check{{end}}-square-o"></i></dd>
  170. {{if .MailerEnabled}}
  171. <dt>{{.i18n.Tr "admin.config.mailer_name"}}</dt>
  172. <dd>{{.Mailer.Name}}</dd>
  173. {{if not .Mailer.UseSendmail}}
  174. <dt>{{.i18n.Tr "admin.config.mailer_disable_helo"}}</dt>
  175. <dd><i class="fa fa{{if .Mailer.DisableHelo}}-check{{end}}-square-o"></i></dd>
  176. <dt>{{.i18n.Tr "admin.config.mailer_host"}}</dt>
  177. <dd>{{.Mailer.Host}}</dd>
  178. {{else}}
  179. <dt>{{.i18n.Tr "admin.config.mailer_use_sendmail"}}</dt>
  180. <dd><i class="fa fa-check-square-o"></i></dd>
  181. <dt>{{.i18n.Tr "admin.config.mailer_sendmail_path"}}</dt>
  182. <dd>{{.Mailer.SendmailPath}}</dd>
  183. <dt>{{.i18n.Tr "admin.config.mailer_sendmail_args"}}</dt>
  184. <dd>{{.Mailer.SendmailArgs}}</dd>
  185. {{end}}
  186. <dt>{{.i18n.Tr "admin.config.mailer_user"}}</dt>
  187. <dd>{{if .Mailer.User}}{{.Mailer.User}}{{else}}(empty){{end}}</dd><br>
  188. <form class="ui form ignore-dirty" action="{{AppSubUrl}}/admin/config/test_mail" method="post">
  189. {{.CsrfTokenHtml}}
  190. <div class="inline field ui left">
  191. <div class="ui input">
  192. <input type="email" name="email" required>
  193. </div>
  194. </div>
  195. <button class="ui green button" id="test-mail-btn">{{.i18n.Tr "admin.config.send_test_mail"}}</button>
  196. </form>
  197. {{end}}
  198. </dl>
  199. </div>
  200. <h4 class="ui top attached header">
  201. {{.i18n.Tr "admin.config.cache_config"}}
  202. </h4>
  203. <div class="ui attached table segment">
  204. <dl class="dl-horizontal admin-dl-horizontal">
  205. <dt>{{.i18n.Tr "admin.config.cache_adapter"}}</dt>
  206. <dd>{{.CacheAdapter}}</dd>
  207. <dt>{{.i18n.Tr "admin.config.cache_interval"}}</dt>
  208. <dd>{{.CacheInterval}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  209. {{if .CacheConn}}
  210. <dt>{{.i18n.Tr "admin.config.cache_conn"}}</dt>
  211. <dd><code>{{.CacheConn}}</code></dd>
  212. {{end}}
  213. </dl>
  214. </div>
  215. <h4 class="ui top attached header">
  216. {{.i18n.Tr "admin.config.session_config"}}
  217. </h4>
  218. <div class="ui attached table segment">
  219. <dl class="dl-horizontal admin-dl-horizontal">
  220. <dt>{{.i18n.Tr "admin.config.session_provider"}}</dt>
  221. <dd>{{.SessionConfig.Provider}}</dd>
  222. <dt>{{.i18n.Tr "admin.config.provider_config"}}</dt>
  223. <dd><code>{{if .SessionConfig.ProviderConfig}}{{.SessionConfig.ProviderConfig}}{{else}}-{{end}}</code></dd>
  224. <dt>{{.i18n.Tr "admin.config.cookie_name"}}</dt>
  225. <dd>{{.SessionConfig.CookieName}}</dd>
  226. <dt>{{.i18n.Tr "admin.config.gc_interval_time"}}</dt>
  227. <dd>{{.SessionConfig.Gclifetime}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  228. <dt>{{.i18n.Tr "admin.config.session_life_time"}}</dt>
  229. <dd>{{.SessionConfig.Maxlifetime}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  230. <dt>{{.i18n.Tr "admin.config.https_only"}}</dt>
  231. <dd><i class="fa fa{{if .SessionConfig.Secure}}-check{{end}}-square-o"></i></dd>
  232. <dt>{{.i18n.Tr "admin.config.cookie_life_time"}}</dt>
  233. <dd>{{.SessionConfig.CookieLifeTime}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  234. </dl>
  235. </div>
  236. <h4 class="ui top attached header">
  237. {{.i18n.Tr "admin.config.picture_config"}}
  238. </h4>
  239. <div class="ui attached table segment">
  240. <dl class="dl-horizontal admin-dl-horizontal">
  241. <dt>{{.i18n.Tr "admin.config.disable_gravatar"}}</dt>
  242. <dd><i class="fa fa{{if .DisableGravatar}}-check{{end}}-square-o"></i></dd>
  243. <div class="ui divider"></div>
  244. <dt>{{.i18n.Tr "admin.config.enable_federated_avatar"}}</dt>
  245. <dd><i class="fa fa{{if .EnableFederatedAvatar}}-check{{end}}-square-o"></i></dd>
  246. </dl>
  247. </div>
  248. <h4 class="ui top attached header">
  249. {{.i18n.Tr "admin.config.git_config"}}
  250. </h4>
  251. <div class="ui attached table segment">
  252. <dl class="dl-horizontal admin-dl-horizontal">
  253. <dt>{{.i18n.Tr "admin.config.git_disable_diff_highlight"}}</dt>
  254. <dd><i class="fa fa{{if .Git.DisableDiffHighlight}}-check{{end}}-square-o"></i></dd>
  255. <dt>{{.i18n.Tr "admin.config.git_max_diff_lines"}}</dt>
  256. <dd>{{.Git.MaxGitDiffLines}}</dd>
  257. <dt>{{.i18n.Tr "admin.config.git_max_diff_line_characters"}}</dt>
  258. <dd>{{.Git.MaxGitDiffLineCharacters}}</dd>
  259. <dt>{{.i18n.Tr "admin.config.git_max_diff_files"}}</dt>
  260. <dd>{{.Git.MaxGitDiffFiles}}</dd>
  261. <dt>{{.i18n.Tr "admin.config.git_gc_args"}}</dt>
  262. <dd><code>{{.Git.GCArgs}}</code></dd>
  263. <div class="ui divider"></div>
  264. <dt>{{.i18n.Tr "admin.config.git_migrate_timeout"}}</dt>
  265. <dd>{{.Git.Timeout.Migrate}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  266. <dt>{{.i18n.Tr "admin.config.git_mirror_timeout"}}</dt>
  267. <dd>{{.Git.Timeout.Mirror}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  268. <dt>{{.i18n.Tr "admin.config.git_clone_timeout"}}</dt>
  269. <dd>{{.Git.Timeout.Clone}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  270. <dt>{{.i18n.Tr "admin.config.git_pull_timeout"}}</dt>
  271. <dd>{{.Git.Timeout.Pull}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  272. <dt>{{.i18n.Tr "admin.config.git_gc_timeout"}}</dt>
  273. <dd>{{.Git.Timeout.GC}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  274. </dl>
  275. </div>
  276. <h4 class="ui top attached header">
  277. {{.i18n.Tr "admin.config.log_config"}}
  278. </h4>
  279. <div class="ui attached table segment">
  280. <dl class="dl-horizontal admin-dl-horizontal">
  281. {{range .Loggers}}
  282. <dt>{{$.i18n.Tr "admin.config.log_mode"}}</dt>
  283. <dd>{{.Mode}}</dd>
  284. <dt>{{$.i18n.Tr "admin.config.log_config"}}</dt>
  285. <dd><pre>{{.Config | JsonPrettyPrint}}</pre></dd>
  286. {{end}}
  287. </dl>
  288. </div>
  289. </div>
  290. </div>
  291. {{template "base/footer" .}}