config.tmpl 9.7 KB

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