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.

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