config.tmpl 13 KB

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