config.tmpl 13 KB

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