config.tmpl 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346
  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.brand_name"}}</dt>
  14. <dd>{{.App.BrandName}}</dd>
  15. <dt>{{.i18n.Tr "admin.config.run_user"}}</dt>
  16. <dd>{{.App.RunUser}}</dd>
  17. <dt>{{.i18n.Tr "admin.config.run_mode"}}</dt>
  18. <dd>{{.App.RunMode}}</dd>
  19. <div class="ui divider"></div>
  20. <dt>{{.i18n.Tr "admin.config.server.external_url"}}</dt>
  21. <dd>{{.Server.ExternalURL}}</dd>
  22. <dt>{{.i18n.Tr "admin.config.server.domain"}}</dt>
  23. <dd>{{.Server.Domain}}</dd>
  24. <dt>{{.i18n.Tr "admin.config.server.protocol"}}</dt>
  25. <dd>{{.Server.Protocol}}</dd>
  26. <dt>{{.i18n.Tr "admin.config.server.http_addr"}}</dt>
  27. <dd>{{.Server.HTTPAddr}}</dd>
  28. <dt>{{.i18n.Tr "admin.config.server.http_port"}}</dt>
  29. <dd>{{.Server.HTTPPort}}</dd>
  30. <dt>{{.i18n.Tr "admin.config.server.cert_file"}}</dt>
  31. <dd><code>{{.Server.CertFile}}</code></dd>
  32. <dt>{{.i18n.Tr "admin.config.server.key_file"}}</dt>
  33. <dd><code>{{.Server.KeyFile}}</code></dd>
  34. <dt>{{.i18n.Tr "admin.config.server.tls_min_version"}}</dt>
  35. <dd>{{.Server.TLSMinVersion}}</dd>
  36. <dt>{{.i18n.Tr "admin.config.server.unix_socket_permission"}}</dt>
  37. <dd><code>{{.Server.UnixSocketPermission}}</code></dd>
  38. <dt>{{.i18n.Tr "admin.config.server.local_root_url"}}</dt>
  39. <dd>{{.Server.LocalRootURL}}</dd>
  40. <div class="ui divider"></div>
  41. <dt>{{.i18n.Tr "admin.config.server.offline_mode"}}</dt>
  42. <dd><i class="fa fa{{if .Server.OfflineMode}}-check{{end}}-square-o"></i></dd>
  43. <dt>{{.i18n.Tr "admin.config.server.disable_router_log"}}</dt>
  44. <dd><i class="fa fa{{if .Server.DisableRouterLog}}-check{{end}}-square-o"></i></dd>
  45. <dt>{{.i18n.Tr "admin.config.server.enable_gzip"}}</dt>
  46. <dd><i class="fa fa{{if .Server.EnableGzip}}-check{{end}}-square-o"></i></dd>
  47. <div class="ui divider"></div>
  48. <dt>{{.i18n.Tr "admin.config.server.app_data_path"}}</dt>
  49. <dd><code>{{.Server.AppDataPath}}</code></dd>
  50. <dt>{{.i18n.Tr "admin.config.server.load_assets_from_disk"}}</dt>
  51. <dd><i class="fa fa{{if .Server.LoadAssetsFromDisk}}-check{{end}}-square-o"></i></dd>
  52. <div class="ui divider"></div>
  53. <dt>{{.i18n.Tr "admin.config.server.landing_url"}}</dt>
  54. <dd><code>{{.Server.LandingURL}}</code></dd>
  55. <div class="ui divider"></div>
  56. <dt>{{.i18n.Tr "admin.config.log_file_root_path"}}</dt>
  57. <dd><code>{{.LogRootPath}}</code></dd>
  58. <dt>{{.i18n.Tr "admin.config.reverse_auth_user"}}</dt>
  59. <dd><code>{{.ReverseProxyAuthUser}}</code></dd>
  60. </dl>
  61. </div>
  62. <h4 class="ui top attached header">
  63. {{.i18n.Tr "admin.config.ssh_config"}}
  64. </h4>
  65. <div class="ui attached table segment">
  66. <dl class="dl-horizontal admin-dl-horizontal">
  67. <dt>{{.i18n.Tr "admin.config.ssh.enabled"}}</dt>
  68. <dd><i class="fa fa{{if not .SSH.Disabled}}-check{{end}}-square-o"></i></dd>
  69. {{if not .SSH.Disabled}}
  70. <dt>{{.i18n.Tr "admin.config.ssh.domain"}}</dt>
  71. <dd>{{.SSH.Domain}}</dd>
  72. <dt>{{.i18n.Tr "admin.config.ssh.port"}}</dt>
  73. <dd>{{.SSH.Port}}</dd>
  74. <dt>{{.i18n.Tr "admin.config.ssh.root_path"}}</dt>
  75. <dd><code>{{.SSH.RootPath}}</code></dd>
  76. <dt>{{.i18n.Tr "admin.config.ssh.keygen_path"}}</dt>
  77. <dd><code>{{.SSH.KeygenPath}}</code></dd>
  78. <dt>{{.i18n.Tr "admin.config.ssh.key_test_path"}}</dt>
  79. <dd><code>{{.SSH.KeyTestPath}}</code></dd>
  80. <dt>{{.i18n.Tr "admin.config.ssh.minimum_key_size_check"}}</dt>
  81. <dd><i class="fa fa{{if .SSH.MinimumKeySizeCheck}}-check{{end}}-square-o"></i></dd>
  82. <dt>{{.i18n.Tr "admin.config.ssh.minimum_key_sizes"}}</dt>
  83. <dd><code>{{.SSH.MinimumKeySizes}}</code></dd>
  84. <dt>{{.i18n.Tr "admin.config.ssh.rewrite_authorized_keys_at_start"}}</dt>
  85. <dd><i class="fa fa{{if .SSH.RewriteAuthorizedKeysAtStart}}-check{{end}}-square-o"></i></dd>
  86. <div class="ui divider"></div>
  87. <dt>{{.i18n.Tr "admin.config.ssh.start_builtin_server"}}</dt>
  88. <dd><i class="fa fa{{if .SSH.StartBuiltinServer}}-check{{end}}-square-o"></i></dd>
  89. <dt>{{.i18n.Tr "admin.config.ssh.listen_host"}}</dt>
  90. <dd>{{.SSH.ListenHost}}</dd>
  91. <dt>{{.i18n.Tr "admin.config.ssh.listen_port"}}</dt>
  92. <dd>{{.SSH.ListenPort}}</dd>
  93. <dt>{{.i18n.Tr "admin.config.ssh.server_ciphers"}}</dt>
  94. <dd><code>{{.SSH.ServerCiphers}}</code></dd>
  95. {{end}}
  96. </dl>
  97. </div>
  98. <!-- Repository Configuration -->
  99. <h4 class="ui top attached header">
  100. {{.i18n.Tr "admin.config.repo_config"}}
  101. </h4>
  102. <div class="ui attached table segment">
  103. <dl class="dl-horizontal admin-dl-horizontal">
  104. <dt>{{.i18n.Tr "admin.config.repo_root_path"}}</dt>
  105. <dd><code>{{.RepoRootPath}}</code></dd>
  106. <dt>{{.i18n.Tr "admin.config.script_type"}}</dt>
  107. <dd>{{.ScriptType}}</dd>
  108. <dt>{{.i18n.Tr "admin.config.repo_force_private"}}</dt>
  109. <dd><i class="fa fa{{if .Repository.ForcePrivate}}-check{{end}}-square-o"></i></dd>
  110. <dt>{{.i18n.Tr "admin.config.max_creation_limit"}}</dt>
  111. <dd>{{.Repository.MaxCreationLimit}}</dd>
  112. <dt>{{.i18n.Tr "admin.config.preferred_licenses"}}</dt>
  113. <dd>{{Join .Repository.PreferredLicenses ", "}}</dd>
  114. <dt>{{.i18n.Tr "admin.config.disable_http_git"}}</dt>
  115. <dd><i class="fa fa{{if .Repository.DisableHTTPGit}}-check{{end}}-square-o"></i></dd>
  116. <dt>{{.i18n.Tr "admin.config.enable_local_path_migration"}}</dt>
  117. <dd><i class="fa fa{{if .Repository.EnableLocalPathMigration}}-check{{end}}-square-o"></i></dd>
  118. <dt>{{.i18n.Tr "admin.config.commits_fetch_concurrency"}}</dt>
  119. <dd>{{.Repository.CommitsFetchConcurrency}}</dd>
  120. </dl>
  121. </div>
  122. <!-- HTTP Configuration -->
  123. <h4 class="ui top attached header">
  124. {{.i18n.Tr "admin.config.http_config"}}
  125. </h4>
  126. <div class="ui attached table segment">
  127. <dl class="dl-horizontal admin-dl-horizontal">
  128. <dt>{{.i18n.Tr "admin.config.http_access_control_allow_origin"}}</dt>
  129. <dd>
  130. {{if .HTTP.AccessControlAllowOrigin}}
  131. <code>{{.HTTP.AccessControlAllowOrigin}}</code>
  132. {{else}}
  133. <i>{{.i18n.Tr "admin.config.not_set"}}</i>
  134. {{end}}
  135. </dd>
  136. </dl>
  137. </div>
  138. <!-- Database Configuration -->
  139. <h4 class="ui top attached header">
  140. {{.i18n.Tr "admin.config.db_config"}}
  141. </h4>
  142. <div class="ui attached table segment">
  143. <dl class="dl-horizontal admin-dl-horizontal">
  144. <dt>{{.i18n.Tr "admin.config.db_type"}}</dt>
  145. <dd>{{.DbCfg.Type}}</dd>
  146. <dt>{{.i18n.Tr "admin.config.db_host"}}</dt>
  147. <dd>{{.DbCfg.Host}}</dd>
  148. <dt>{{.i18n.Tr "admin.config.db_name"}}</dt>
  149. <dd>{{.DbCfg.Name}}</dd>
  150. <dt>{{.i18n.Tr "admin.config.db_user"}}</dt>
  151. <dd>{{.DbCfg.User}}</dd>
  152. <dt>{{.i18n.Tr "admin.config.db_ssl_mode"}}</dt>
  153. <dd>{{.DbCfg.SSLMode}} {{.i18n.Tr "admin.config.db_ssl_mode_helper"}}</dd>
  154. <dt>{{.i18n.Tr "admin.config.db_path"}}</dt>
  155. <dd>{{.DbCfg.Path}} {{.i18n.Tr "admin.config.db_path_helper"}}</dd>
  156. </dl>
  157. </div>
  158. <h4 class="ui top attached header">
  159. {{.i18n.Tr "admin.config.service_config"}}
  160. </h4>
  161. <div class="ui attached table segment">
  162. <dl class="dl-horizontal admin-dl-horizontal">
  163. <dt>{{.i18n.Tr "admin.config.register_email_confirm"}}</dt>
  164. <dd><i class="fa fa{{if .Service.RegisterEmailConfirm}}-check{{end}}-square-o"></i></dd>
  165. <dt>{{.i18n.Tr "admin.config.disable_register"}}</dt>
  166. <dd><i class="fa fa{{if .Service.DisableRegistration}}-check{{end}}-square-o"></i></dd>
  167. <dt>{{.i18n.Tr "admin.config.show_registration_button"}}</dt>
  168. <dd><i class="fa fa{{if .Service.ShowRegistrationButton}}-check{{end}}-square-o"></i></dd>
  169. <dt>{{.i18n.Tr "admin.config.require_sign_in_view"}}</dt>
  170. <dd><i class="fa fa{{if .Service.RequireSignInView}}-check{{end}}-square-o"></i></dd>
  171. <dt>{{.i18n.Tr "admin.config.mail_notify"}}</dt>
  172. <dd><i class="fa fa{{if .Service.EnableNotifyMail}}-check{{end}}-square-o"></i></dd>
  173. {{/*<dt>{{.i18n.Tr "admin.config.disable_key_size_check"}}</dt>
  174. <dd><i class="fa fa{{if .Service.DisableMinimumKeySizeCheck}}-check{{end}}-square-o"></i></dd>*/}}
  175. <dt>{{.i18n.Tr "admin.config.enable_captcha"}}</dt>
  176. <dd><i class="fa fa{{if .Service.EnableCaptcha}}-check{{end}}-square-o"></i></dd>
  177. <div class="ui divider"></div>
  178. <dt>{{.i18n.Tr "admin.config.active_code_lives"}}</dt>
  179. <dd>{{.Service.ActiveCodeLives}} {{.i18n.Tr "tool.raw_minutes"}}</dd>
  180. <dt>{{.i18n.Tr "admin.config.reset_password_code_lives"}}</dt>
  181. <dd>{{.Service.ResetPwdCodeLives}} {{.i18n.Tr "tool.raw_minutes"}}</dd>
  182. </dl>
  183. </div>
  184. <h4 class="ui top attached header">
  185. {{.i18n.Tr "admin.config.webhook_config"}}
  186. </h4>
  187. <div class="ui attached table segment">
  188. <dl class="dl-horizontal admin-dl-horizontal">
  189. <dt>{{.i18n.Tr "admin.config.queue_length"}}</dt>
  190. <dd>{{.Webhook.QueueLength}}</dd>
  191. <dt>{{.i18n.Tr "admin.config.deliver_timeout"}}</dt>
  192. <dd>{{.Webhook.DeliverTimeout}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  193. <dt>{{.i18n.Tr "admin.config.skip_tls_verify"}}</dt>
  194. <dd><i class="fa fa{{if .Webhook.SkipTLSVerify}}-check{{end}}-square-o"></i></dd>
  195. </dl>
  196. </div>
  197. <h4 class="ui top attached header">
  198. {{.i18n.Tr "admin.config.mailer_config"}}
  199. </h4>
  200. <div class="ui attached table segment">
  201. <dl class="dl-horizontal admin-dl-horizontal">
  202. <dt>{{.i18n.Tr "admin.config.mailer_enabled"}}</dt>
  203. <dd><i class="fa fa{{if .MailerEnabled}}-check{{end}}-square-o"></i></dd>
  204. {{if .MailerEnabled}}
  205. <dt>{{.i18n.Tr "admin.config.mailer_subject_prefix"}}</dt>
  206. <dd><code>{{.Mailer.SubjectPrefix}}</code></dd>
  207. <dt>{{.i18n.Tr "admin.config.mailer_disable_helo"}}</dt>
  208. <dd><i class="fa fa{{if .Mailer.DisableHelo}}-check{{end}}-square-o"></i></dd>
  209. <dt>{{.i18n.Tr "admin.config.mailer_host"}}</dt>
  210. <dd>{{.Mailer.Host}}</dd>
  211. <dt>{{.i18n.Tr "admin.config.mailer_user"}}</dt>
  212. <dd>{{if .Mailer.User}}{{.Mailer.User}}{{else}}(empty){{end}}</dd><br>
  213. <form class="ui form" action="{{AppSubURL}}/admin/config/test_mail" method="post">
  214. {{.CSRFTokenHTML}}
  215. <div class="inline field ui left">
  216. <div class="ui input">
  217. <input type="email" name="email" required>
  218. </div>
  219. </div>
  220. <button class="ui green button" id="test-mail-btn">{{.i18n.Tr "admin.config.send_test_mail"}}</button>
  221. </form>
  222. {{end}}
  223. </dl>
  224. </div>
  225. <h4 class="ui top attached header">
  226. {{.i18n.Tr "admin.config.cache_config"}}
  227. </h4>
  228. <div class="ui attached table segment">
  229. <dl class="dl-horizontal admin-dl-horizontal">
  230. <dt>{{.i18n.Tr "admin.config.cache_adapter"}}</dt>
  231. <dd>{{.CacheAdapter}}</dd>
  232. <dt>{{.i18n.Tr "admin.config.cache_interval"}}</dt>
  233. <dd>{{.CacheInterval}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  234. {{if .CacheConn}}
  235. <dt>{{.i18n.Tr "admin.config.cache_conn"}}</dt>
  236. <dd><code>{{.CacheConn}}</code></dd>
  237. {{end}}
  238. </dl>
  239. </div>
  240. <h4 class="ui top attached header">
  241. {{.i18n.Tr "admin.config.session_config"}}
  242. </h4>
  243. <div class="ui attached table segment">
  244. <dl class="dl-horizontal admin-dl-horizontal">
  245. <dt>{{.i18n.Tr "admin.config.session_provider"}}</dt>
  246. <dd>{{.SessionConfig.Provider}}</dd>
  247. <dt>{{.i18n.Tr "admin.config.provider_config"}}</dt>
  248. <dd><code>{{.SessionConfig.ProviderConfig}}</code></dd>
  249. <dt>{{.i18n.Tr "admin.config.cookie_name"}}</dt>
  250. <dd>{{.SessionConfig.CookieName}}</dd>
  251. <dt>{{.i18n.Tr "admin.config.gc_interval_time"}}</dt>
  252. <dd>{{.SessionConfig.Gclifetime}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  253. <dt>{{.i18n.Tr "admin.config.session_life_time"}}</dt>
  254. <dd>{{.SessionConfig.Maxlifetime}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  255. <dt>{{.i18n.Tr "admin.config.https_only"}}</dt>
  256. <dd><i class="fa fa{{if .SessionConfig.Secure}}-check{{end}}-square-o"></i></dd>
  257. <dt>{{.i18n.Tr "admin.config.cookie_life_time"}}</dt>
  258. <dd>{{.SessionConfig.CookieLifeTime}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  259. </dl>
  260. </div>
  261. <h4 class="ui top attached header">
  262. {{.i18n.Tr "admin.config.picture_config"}}
  263. </h4>
  264. <div class="ui attached table segment">
  265. <dl class="dl-horizontal admin-dl-horizontal">
  266. <dt>{{.i18n.Tr "admin.config.disable_gravatar"}}</dt>
  267. <dd><i class="fa fa{{if .DisableGravatar}}-check{{end}}-square-o"></i></dd>
  268. <div class="ui divider"></div>
  269. <dt>{{.i18n.Tr "admin.config.enable_federated_avatar"}}</dt>
  270. <dd><i class="fa fa{{if .EnableFederatedAvatar}}-check{{end}}-square-o"></i></dd>
  271. </dl>
  272. </div>
  273. <h4 class="ui top attached header">
  274. {{.i18n.Tr "admin.config.git_config"}}
  275. </h4>
  276. <div class="ui attached table segment">
  277. <dl class="dl-horizontal admin-dl-horizontal">
  278. <dt>{{.i18n.Tr "admin.config.git_disable_diff_highlight"}}</dt>
  279. <dd><i class="fa fa{{if .Git.DisableDiffHighlight}}-check{{end}}-square-o"></i></dd>
  280. <dt>{{.i18n.Tr "admin.config.git_max_diff_lines"}}</dt>
  281. <dd>{{.Git.MaxGitDiffLines}}</dd>
  282. <dt>{{.i18n.Tr "admin.config.git_max_diff_line_characters"}}</dt>
  283. <dd>{{.Git.MaxGitDiffLineCharacters}}</dd>
  284. <dt>{{.i18n.Tr "admin.config.git_max_diff_files"}}</dt>
  285. <dd>{{.Git.MaxGitDiffFiles}}</dd>
  286. <dt>{{.i18n.Tr "admin.config.git_gc_args"}}</dt>
  287. <dd><code>{{.Git.GCArgs}}</code></dd>
  288. <div class="ui divider"></div>
  289. <dt>{{.i18n.Tr "admin.config.git_migrate_timeout"}}</dt>
  290. <dd>{{.Git.Timeout.Migrate}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  291. <dt>{{.i18n.Tr "admin.config.git_mirror_timeout"}}</dt>
  292. <dd>{{.Git.Timeout.Mirror}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  293. <dt>{{.i18n.Tr "admin.config.git_clone_timeout"}}</dt>
  294. <dd>{{.Git.Timeout.Clone}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  295. <dt>{{.i18n.Tr "admin.config.git_pull_timeout"}}</dt>
  296. <dd>{{.Git.Timeout.Pull}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  297. <dt>{{.i18n.Tr "admin.config.git_gc_timeout"}}</dt>
  298. <dd>{{.Git.Timeout.GC}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  299. </dl>
  300. </div>
  301. <h4 class="ui top attached header">
  302. {{.i18n.Tr "admin.config.log_config"}}
  303. </h4>
  304. <div class="ui attached log-config segment">
  305. <table class="ui very basic table">
  306. {{range .Loggers}}
  307. <tr>
  308. <td>{{$.i18n.Tr "admin.config.log_mode"}}</td>
  309. <td>{{.Mode}}</td>
  310. <tr>
  311. </tr>
  312. <td>{{$.i18n.Tr "admin.config.log_options"}}</td>
  313. <td><pre><code>{{.Config}}</code></pre></td>
  314. </tr>
  315. {{end}}
  316. </table>
  317. </div>
  318. </div>
  319. </div>
  320. </div>
  321. </div>
  322. {{template "base/footer" .}}