config.tmpl 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533
  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. {{/* Server settings */}}
  9. <h4 class="ui top attached header">
  10. {{.i18n.Tr "admin.config.server_config"}}
  11. </h4>
  12. <div class="ui attached table segment">
  13. <dl class="dl-horizontal admin-dl-horizontal">
  14. <dt>{{.i18n.Tr "admin.config.brand_name"}}</dt>
  15. <dd>{{.App.BrandName}}</dd>
  16. <dt>{{.i18n.Tr "admin.config.run_user"}}</dt>
  17. <dd>{{.App.RunUser}}</dd>
  18. <dt>{{.i18n.Tr "admin.config.run_mode"}}</dt>
  19. <dd>{{.App.RunMode}}</dd>
  20. <div class="ui divider"></div>
  21. <dt>{{.i18n.Tr "admin.config.server.external_url"}}</dt>
  22. <dd>{{.Server.ExternalURL}}</dd>
  23. <dt>{{.i18n.Tr "admin.config.server.domain"}}</dt>
  24. <dd>{{.Server.Domain}}</dd>
  25. <dt>{{.i18n.Tr "admin.config.server.protocol"}}</dt>
  26. <dd>{{.Server.Protocol}}</dd>
  27. <dt>{{.i18n.Tr "admin.config.server.http_addr"}}</dt>
  28. <dd>{{.Server.HTTPAddr}}</dd>
  29. <dt>{{.i18n.Tr "admin.config.server.http_port"}}</dt>
  30. <dd>{{.Server.HTTPPort}}</dd>
  31. <dt>{{.i18n.Tr "admin.config.server.cert_file"}}</dt>
  32. <dd><code>{{.Server.CertFile}}</code></dd>
  33. <dt>{{.i18n.Tr "admin.config.server.key_file"}}</dt>
  34. <dd><code>{{.Server.KeyFile}}</code></dd>
  35. <dt>{{.i18n.Tr "admin.config.server.tls_min_version"}}</dt>
  36. <dd>{{.Server.TLSMinVersion}}</dd>
  37. <dt>{{.i18n.Tr "admin.config.server.unix_socket_permission"}}</dt>
  38. <dd><code>{{.Server.UnixSocketPermission}}</code></dd>
  39. <dt>{{.i18n.Tr "admin.config.server.local_root_url"}}</dt>
  40. <dd>{{.Server.LocalRootURL}}</dd>
  41. <div class="ui divider"></div>
  42. <dt>{{.i18n.Tr "admin.config.server.offline_mode"}}</dt>
  43. <dd><i class="fa fa{{if .Server.OfflineMode}}-check{{end}}-square-o"></i></dd>
  44. <dt>{{.i18n.Tr "admin.config.server.disable_router_log"}}</dt>
  45. <dd><i class="fa fa{{if .Server.DisableRouterLog}}-check{{end}}-square-o"></i></dd>
  46. <dt>{{.i18n.Tr "admin.config.server.enable_gzip"}}</dt>
  47. <dd><i class="fa fa{{if .Server.EnableGzip}}-check{{end}}-square-o"></i></dd>
  48. <div class="ui divider"></div>
  49. <dt>{{.i18n.Tr "admin.config.server.app_data_path"}}</dt>
  50. <dd><code>{{.Server.AppDataPath}}</code></dd>
  51. <dt>{{.i18n.Tr "admin.config.server.load_assets_from_disk"}}</dt>
  52. <dd><i class="fa fa{{if .Server.LoadAssetsFromDisk}}-check{{end}}-square-o"></i></dd>
  53. <div class="ui divider"></div>
  54. <dt>{{.i18n.Tr "admin.config.server.landing_url"}}</dt>
  55. <dd><code>{{.Server.LandingURL}}</code></dd>
  56. </dl>
  57. </div>
  58. {{/* SSH settings */}}
  59. <h4 class="ui top attached header">
  60. {{.i18n.Tr "admin.config.ssh_config"}}
  61. </h4>
  62. <div class="ui attached table segment">
  63. <dl class="dl-horizontal admin-dl-horizontal">
  64. <dt>{{.i18n.Tr "admin.config.ssh.enabled"}}</dt>
  65. <dd><i class="fa fa{{if not .SSH.Disabled}}-check{{end}}-square-o"></i></dd>
  66. {{if not .SSH.Disabled}}
  67. <dt>{{.i18n.Tr "admin.config.ssh.domain"}}</dt>
  68. <dd>{{.SSH.Domain}}</dd>
  69. <dt>{{.i18n.Tr "admin.config.ssh.port"}}</dt>
  70. <dd>{{.SSH.Port}}</dd>
  71. <dt>{{.i18n.Tr "admin.config.ssh.root_path"}}</dt>
  72. <dd><code>{{.SSH.RootPath}}</code></dd>
  73. <dt>{{.i18n.Tr "admin.config.ssh.keygen_path"}}</dt>
  74. <dd><code>{{.SSH.KeygenPath}}</code></dd>
  75. <dt>{{.i18n.Tr "admin.config.ssh.key_test_path"}}</dt>
  76. <dd><code>{{.SSH.KeyTestPath}}</code></dd>
  77. <dt>{{.i18n.Tr "admin.config.ssh.minimum_key_size_check"}}</dt>
  78. <dd><i class="fa fa{{if .SSH.MinimumKeySizeCheck}}-check{{end}}-square-o"></i></dd>
  79. <dt>{{.i18n.Tr "admin.config.ssh.minimum_key_sizes"}}</dt>
  80. <dd><code>{{.SSH.MinimumKeySizes}}</code></dd>
  81. <dt>{{.i18n.Tr "admin.config.ssh.rewrite_authorized_keys_at_start"}}</dt>
  82. <dd><i class="fa fa{{if .SSH.RewriteAuthorizedKeysAtStart}}-check{{end}}-square-o"></i></dd>
  83. <div class="ui divider"></div>
  84. <dt>{{.i18n.Tr "admin.config.ssh.start_builtin_server"}}</dt>
  85. <dd><i class="fa fa{{if .SSH.StartBuiltinServer}}-check{{end}}-square-o"></i></dd>
  86. <dt>{{.i18n.Tr "admin.config.ssh.listen_host"}}</dt>
  87. <dd>{{.SSH.ListenHost}}</dd>
  88. <dt>{{.i18n.Tr "admin.config.ssh.listen_port"}}</dt>
  89. <dd>{{.SSH.ListenPort}}</dd>
  90. <dt>{{.i18n.Tr "admin.config.ssh.server_ciphers"}}</dt>
  91. <dd><code>{{.SSH.ServerCiphers}}</code></dd>
  92. {{end}}
  93. </dl>
  94. </div>
  95. {{/* Repository settings */}}
  96. <h4 class="ui top attached header">
  97. {{.i18n.Tr "admin.config.repo_config"}}
  98. </h4>
  99. <div class="ui attached table segment">
  100. <dl class="dl-horizontal admin-dl-horizontal">
  101. <dt>{{.i18n.Tr "admin.config.repo.root_path"}}</dt>
  102. <dd><code>{{.Repository.Root}}</code></dd>
  103. <dt>{{.i18n.Tr "admin.config.repo.script_type"}}</dt>
  104. <dd><code>{{.Repository.ScriptType}}</code></dd>
  105. <dt>{{.i18n.Tr "admin.config.repo.ansi_chatset"}}</dt>
  106. <dd>
  107. {{if .Repository.ANSICharset}}
  108. {{.Repository.AnsiCharset}}
  109. {{else}}
  110. <i>{{.i18n.Tr "admin.config.not_set"}}</i>
  111. {{end}}
  112. </dd>
  113. <dt>{{.i18n.Tr "admin.config.repo.force_private"}}</dt>
  114. <dd><i class="fa fa{{if .Repository.ForcePrivate}}-check{{end}}-square-o"></i></dd>
  115. <dt>{{.i18n.Tr "admin.config.repo.max_creation_limit"}}</dt>
  116. <dd>{{.Repository.MaxCreationLimit}}</dd>
  117. <dt>{{.i18n.Tr "admin.config.repo.preferred_licenses"}}</dt>
  118. <dd>{{Join .Repository.PreferredLicenses ", "}}</dd>
  119. <dt>{{.i18n.Tr "admin.config.repo.disable_http_git"}}</dt>
  120. <dd><i class="fa fa{{if .Repository.DisableHTTPGit}}-check{{end}}-square-o"></i></dd>
  121. <dt>{{.i18n.Tr "admin.config.repo.enable_local_path_migration"}}</dt>
  122. <dd><i class="fa fa{{if .Repository.EnableLocalPathMigration}}-check{{end}}-square-o"></i></dd>
  123. <dt>{{.i18n.Tr "admin.config.repo.enable_raw_file_render_mode"}}</dt>
  124. <dd><i class="fa fa{{if .Repository.EnableRawFileRenderMode}}-check{{end}}-square-o"></i></dd>
  125. <dt>{{.i18n.Tr "admin.config.repo.commits_fetch_concurrency"}}</dt>
  126. <dd>{{.Repository.CommitsFetchConcurrency}}</dd>
  127. <div class="ui divider"></div>
  128. <dt>{{.i18n.Tr "admin.config.repo.editor.line_wrap_extensions"}}</dt>
  129. <dd><code>{{.Repository.Editor.LineWrapExtensions}}</code></dd>
  130. <dt>{{.i18n.Tr "admin.config.repo.editor.previewable_file_modes"}}</dt>
  131. <dd><code>{{.Repository.Editor.PreviewableFileModes}}</code></dd>
  132. <div class="ui divider"></div>
  133. <dt>{{.i18n.Tr "admin.config.repo.upload.enabled"}}</dt>
  134. <dd><i class="fa fa{{if .Repository.Upload.Enabled}}-check{{end}}-square-o"></i></dd>
  135. <dt>{{.i18n.Tr "admin.config.repo.upload.temp_path"}}</dt>
  136. <dd><code>{{.Repository.Upload.TempPath}}</code></dd>
  137. <dt>{{.i18n.Tr "admin.config.repo.upload.allowed_types"}}</dt>
  138. <dd><code>{{.Repository.Upload.AllowedTypes}}</code></dd>
  139. <dt>{{.i18n.Tr "admin.config.repo.upload.file_max_size"}}</dt>
  140. <dd>{{.Repository.Upload.FileMaxSize}} MB</dd>
  141. <dt>{{.i18n.Tr "admin.config.repo.upload.max_files"}}</dt>
  142. <dd>{{.Repository.Upload.MaxFiles}}</dd>
  143. </dl>
  144. </div>
  145. {{/* Database settings */}}
  146. <h4 class="ui top attached header">
  147. {{.i18n.Tr "admin.config.db_config"}}
  148. </h4>
  149. <div class="ui attached table segment">
  150. <dl class="dl-horizontal admin-dl-horizontal">
  151. <dt>{{.i18n.Tr "admin.config.db.type"}}</dt>
  152. <dd>{{.Database.Type}}</dd>
  153. <dt>{{.i18n.Tr "admin.config.db.host"}}</dt>
  154. <dd>{{.Database.Host}}</dd>
  155. <dt>{{.i18n.Tr "admin.config.db.name"}}</dt>
  156. <dd>{{.Database.Name}}</dd>
  157. <dt>{{.i18n.Tr "admin.config.db.user"}}</dt>
  158. <dd>{{.Database.User}}</dd>
  159. <dt>{{.i18n.Tr "admin.config.db.ssl_mode"}}</dt>
  160. <dd>{{.Database.SSLMode}} {{.i18n.Tr "admin.config.db.ssl_mode_helper"}}</dd>
  161. <dt>{{.i18n.Tr "admin.config.db.path"}}</dt>
  162. <dd><code>{{.Database.Path}}</code> {{.i18n.Tr "admin.config.db.path_helper"}}</dd>
  163. <div class="ui divider"></div>
  164. <dt>{{.i18n.Tr "admin.config.db.max_open_conns"}}</dt>
  165. <dd>{{.Database.MaxOpenConns}}</dd>
  166. <dt>{{.i18n.Tr "admin.config.db.max_idle_conns"}}</dt>
  167. <dd>{{.Database.MaxIdleConns}}</dd>
  168. </dl>
  169. </div>
  170. {{/* Security settings */}}
  171. <h4 class="ui top attached header">
  172. {{.i18n.Tr "admin.config.security_config"}}
  173. </h4>
  174. <div class="ui attached table segment">
  175. <dl class="dl-horizontal admin-dl-horizontal">
  176. <dt>{{.i18n.Tr "admin.config.security.login_remember_days"}}</dt>
  177. <dd>{{.Security.LoginRememberDays}}</dd>
  178. <dt>{{.i18n.Tr "admin.config.security.cookie_remember_name"}}</dt>
  179. <dd>{{.Security.CookieRememberName}}</dd>
  180. <dt>{{.i18n.Tr "admin.config.security.cookie_username"}}</dt>
  181. <dd>{{.Security.CookieUsername}}</dd>
  182. <dt>{{.i18n.Tr "admin.config.security.cookie_secure"}}</dt>
  183. <dd><i class="fa fa{{if .Security.CookieSecure}}-check{{end}}-square-o"></i></dd>
  184. <dt>{{.i18n.Tr "admin.config.security.enable_login_status_cookie"}}</dt>
  185. <dd><i class="fa fa{{if .Security.EnableLoginStatusCookie}}-check{{end}}-square-o"></i></dd>
  186. <dt>{{.i18n.Tr "admin.config.security.login_status_cookie_name"}}</dt>
  187. <dd>{{.Security.LoginStatusCookieName}}</dd>
  188. </dl>
  189. </div>
  190. {{/* Email settings */}}
  191. <h4 class="ui top attached header">
  192. {{.i18n.Tr "admin.config.email_config"}}
  193. </h4>
  194. <div class="ui attached table segment">
  195. <dl class="dl-horizontal admin-dl-horizontal">
  196. <dt>{{.i18n.Tr "admin.config.email.enabled"}}</dt>
  197. <dd><i class="fa fa{{if .Email.Enabled}}-check{{end}}-square-o"></i></dd>
  198. {{if .Email.Enabled}}
  199. <dt>{{.i18n.Tr "admin.config.email.subject_prefix"}}</dt>
  200. <dd><code>{{.Email.SubjectPrefix}}</code></dd>
  201. <dt>{{.i18n.Tr "admin.config.email.host"}}</dt>
  202. <dd>{{.Email.Host}}</dd>
  203. <dt>{{.i18n.Tr "admin.config.email.from"}}</dt>
  204. <dd>{{.Email.From}}</dd>
  205. <dt>{{.i18n.Tr "admin.config.email.user"}}</dt>
  206. <dd>{{.Email.User}}</dd>
  207. <div class="ui divider"></div>
  208. <dt>{{.i18n.Tr "admin.config.email.disable_helo"}}</dt>
  209. <dd><i class="fa fa{{if .Email.DisableHELO}}-check{{end}}-square-o"></i></dd>
  210. <dt>{{.i18n.Tr "admin.config.email.helo_hostname"}}</dt>
  211. <dd>
  212. {{if .Email.HELOHostname}}
  213. {{.Email.HELOHostname}}
  214. {{else}}
  215. <i>{{.i18n.Tr "admin.config.not_set"}}</i>
  216. {{end}}
  217. </dd>
  218. <div class="ui divider"></div>
  219. <dt>{{.i18n.Tr "admin.config.email.skip_verify"}}</dt>
  220. <dd><i class="fa fa{{if .Email.SkipVerify}}-check{{end}}-square-o"></i></dd>
  221. <dt>{{.i18n.Tr "admin.config.email.use_certificate"}}</dt>
  222. <dd><i class="fa fa{{if .Email.UseCertificate}}-check{{end}}-square-o"></i></dd>
  223. <dt>{{.i18n.Tr "admin.config.email.cert_file"}}</dt>
  224. <dd><code>{{.Email.CertFile}}</code></dd>
  225. <dt>{{.i18n.Tr "admin.config.email.key_file"}}</dt>
  226. <dd><code>{{.Email.KeyFile}}</code></dd>
  227. <div class="ui divider"></div>
  228. <dt>{{.i18n.Tr "admin.config.email.use_plain_text"}}</dt>
  229. <dd><i class="fa fa{{if .Email.UsePlainText}}-check{{end}}-square-o"></i></dd>
  230. <dt>{{.i18n.Tr "admin.config.email.add_plain_text_alt"}}</dt>
  231. <dd><i class="fa fa{{if .Email.AddPlainTextAlt}}-check{{end}}-square-o"></i></dd>
  232. <div class="ui divider"></div>
  233. <form class="ui form" action="{{AppSubURL}}/admin/config/test_mail" method="post">
  234. {{.CSRFTokenHTML}}
  235. <div class="inline field ui left">
  236. <div class="ui input">
  237. <input type="email" name="email" required>
  238. </div>
  239. </div>
  240. <button class="ui green button" id="test-mail-btn">{{.i18n.Tr "admin.config.email.send_test_mail"}}</button>
  241. </form>
  242. {{end}}
  243. </dl>
  244. </div>
  245. {{/* Authentication settings */}}
  246. <h4 class="ui top attached header">
  247. {{.i18n.Tr "admin.config.auth_config"}}
  248. </h4>
  249. <div class="ui attached table segment">
  250. <dl class="dl-horizontal admin-dl-horizontal">
  251. <dt>{{.i18n.Tr "admin.config.auth.activate_code_lives"}}</dt>
  252. <dd>{{.Auth.ActivateCodeLives}} {{.i18n.Tr "tool.raw_minutes"}}</dd>
  253. <dt>{{.i18n.Tr "admin.config.auth.reset_password_code_lives"}}</dt>
  254. <dd>{{.Auth.ResetPasswordCodeLives}} {{.i18n.Tr "tool.raw_minutes"}}</dd>
  255. <dt>{{.i18n.Tr "admin.config.auth.require_email_confirm"}}</dt>
  256. <dd><i class="fa fa{{if .Auth.RequireEmailConfirmation}}-check{{end}}-square-o"></i></dd>
  257. <dt>{{.i18n.Tr "admin.config.auth.require_sign_in_view"}}</dt>
  258. <dd><i class="fa fa{{if .Auth.RequireSigninView}}-check{{end}}-square-o"></i></dd>
  259. <dt>{{.i18n.Tr "admin.config.auth.disable_registration"}}</dt>
  260. <dd><i class="fa fa{{if .Auth.DisableRegistration}}-check{{end}}-square-o"></i></dd>
  261. <dt>{{.i18n.Tr "admin.config.auth.enable_registration_captcha"}}</dt>
  262. <dd><i class="fa fa{{if .Auth.EnableRegistrationCaptcha}}-check{{end}}-square-o"></i></dd>
  263. <div class="ui divider"></div>
  264. <dt>{{.i18n.Tr "admin.config.auth.enable_reverse_proxy_authentication"}}</dt>
  265. <dd><i class="fa fa{{if .Auth.EnableReverseProxyAuthentication}}-check{{end}}-square-o"></i></dd>
  266. <dt>{{.i18n.Tr "admin.config.auth.enable_reverse_proxy_auto_registration"}}</dt>
  267. <dd><i class="fa fa{{if .Auth.EnableReverseProxyAutoRegistration}}-check{{end}}-square-o"></i></dd>
  268. <dt>{{.i18n.Tr "admin.config.auth.reverse_proxy_authentication_header"}}</dt>
  269. <dd><code>{{.Auth.ReverseProxyAuthenticationHeader}}</code></dd>
  270. </dl>
  271. </div>
  272. {{/* User settings */}}
  273. <h4 class="ui top attached header">
  274. {{.i18n.Tr "admin.config.user_config"}}
  275. </h4>
  276. <div class="ui attached table segment">
  277. <dl class="dl-horizontal admin-dl-horizontal">
  278. <dt>{{.i18n.Tr "admin.config.user.enable_email_notify"}}</dt>
  279. <dd><i class="fa fa{{if .User.EnableEmailNotification}}-check{{end}}-square-o"></i></dd>
  280. </dl>
  281. </div>
  282. {{/* Session settings */}}
  283. <h4 class="ui top attached header">
  284. {{.i18n.Tr "admin.config.session_config"}}
  285. </h4>
  286. <div class="ui attached table segment">
  287. <dl class="dl-horizontal admin-dl-horizontal">
  288. <dt>{{.i18n.Tr "admin.config.session_provider"}}</dt>
  289. <dd>{{.Session.Provider}}</dd>
  290. <dt>{{.i18n.Tr "admin.config.session.provider_config"}}</dt>
  291. <dd><code>{{.Session.ProviderConfig}}</code></dd>
  292. <dt>{{.i18n.Tr "admin.config.session.cookie_name"}}</dt>
  293. <dd>{{.Session.CookieName}}</dd>
  294. <dt>{{.i18n.Tr "admin.config.session.https_only"}}</dt>
  295. <dd><i class="fa fa{{if .Session.CookieSecure}}-check{{end}}-square-o"></i></dd>
  296. <dt>{{.i18n.Tr "admin.config.session.gc_interval"}}</dt>
  297. <dd>{{.Session.GCInterval}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  298. <dt>{{.i18n.Tr "admin.config.session.max_life_time"}}</dt>
  299. <dd>{{.Session.MaxLifeTime}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  300. <dt>{{.i18n.Tr "admin.config.session.csrf_cookie_name"}}</dt>
  301. <dd>{{.Session.CSRFCookieName}}</dd>
  302. </dl>
  303. </div>
  304. {{/* Cache settings */}}
  305. <h4 class="ui top attached header">
  306. {{.i18n.Tr "admin.config.cache_config"}}
  307. </h4>
  308. <div class="ui attached table segment">
  309. <dl class="dl-horizontal admin-dl-horizontal">
  310. <dt>{{.i18n.Tr "admin.config.cache.adapter"}}</dt>
  311. <dd>{{.Cache.Adapter}}</dd>
  312. <dt>{{.i18n.Tr "admin.config.cache.interval"}}</dt>
  313. <dd>{{.Cache.Interval}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  314. <dt>{{.i18n.Tr "admin.config.cache.host"}}</dt>
  315. <dd>
  316. {{if .CacheConn}}
  317. <code>{{.CacheConn}}</code>
  318. {{else}}
  319. <i>{{.i18n.Tr "admin.config.not_set"}}</i>
  320. {{end}}
  321. </dd>
  322. </dl>
  323. </div>
  324. {{/* Attachment settings */}}
  325. <h4 class="ui top attached header">
  326. {{.i18n.Tr "admin.config.attachment_config"}}
  327. </h4>
  328. <div class="ui attached table segment">
  329. <dl class="dl-horizontal admin-dl-horizontal">
  330. <dt>{{.i18n.Tr "admin.config.attachment.enabled"}}</dt>
  331. <dd><i class="fa fa{{if .Attachment.Enabled}}-check{{end}}-square-o"></i></dd>
  332. <dt>{{.i18n.Tr "admin.config.attachment.path"}}</dt>
  333. <dd><code>{{.Attachment.Path}}</code></dd>
  334. <dt>{{.i18n.Tr "admin.config.attachment.allowed_types"}}</dt>
  335. <dd><code>{{.Attachment.AllowedTypes}}</code></dd>
  336. <dt>{{.i18n.Tr "admin.config.attachment.max_size"}}</dt>
  337. <dd>{{.Attachment.MaxSize}} MB</dd>
  338. <dt>{{.i18n.Tr "admin.config.attachment.max_files"}}</dt>
  339. <dd>{{.Attachment.MaxFiles}}</dd>
  340. </dl>
  341. </div>
  342. {{/* Release settings */}}
  343. <h4 class="ui top attached header">
  344. {{.i18n.Tr "admin.config.release_config"}}
  345. </h4>
  346. <div class="ui attached table segment">
  347. <dl class="dl-horizontal admin-dl-horizontal">
  348. <dt>{{.i18n.Tr "admin.config.release.attachment.enabled"}}</dt>
  349. <dd><i class="fa fa{{if .Release.Attachment.Enabled}}-check{{end}}-square-o"></i></dd>
  350. <dt>{{.i18n.Tr "admin.config.release.attachment.allowed_types"}}</dt>
  351. <dd><code>{{.Release.Attachment.AllowedTypes}}</code></dd>
  352. <dt>{{.i18n.Tr "admin.config.release.attachment.max_size"}}</dt>
  353. <dd>{{.Release.Attachment.MaxSize}} MB</dd>
  354. <dt>{{.i18n.Tr "admin.config.release.attachment.max_files"}}</dt>
  355. <dd>{{.Release.Attachment.MaxFiles}}</dd>
  356. </dl>
  357. </div>
  358. {{/* Picture settings */}}
  359. <h4 class="ui top attached header">
  360. {{.i18n.Tr "admin.config.picture_config"}}
  361. </h4>
  362. <div class="ui attached table segment">
  363. <dl class="dl-horizontal admin-dl-horizontal">
  364. <dt>{{.i18n.Tr "admin.config.picture.avatar_upload_path"}}</dt>
  365. <dd><code>{{.Picture.AvatarUploadPath}}</code></dd>
  366. <dt>{{.i18n.Tr "admin.config.picture.repo_avatar_upload_path"}}</dt>
  367. <dd><code>{{.Picture.RepositoryAvatarUploadPath}}</code></dd>
  368. <dt>{{.i18n.Tr "admin.config.picture.gravatar_source"}}</dt>
  369. <dd><code>{{.Picture.GravatarSource}}</code></dd>
  370. <dt>{{.i18n.Tr "admin.config.picture.disable_gravatar"}}</dt>
  371. <dd><i class="fa fa{{if .Picture.DisableGravatar}}-check{{end}}-square-o"></i></dd>
  372. <dt>{{.i18n.Tr "admin.config.picture.enable_federated_avatar"}}</dt>
  373. <dd><i class="fa fa{{if .Picture.EnableFederatedAvatar}}-check{{end}}-square-o"></i></dd>
  374. </dl>
  375. </div>
  376. {{/* HTTP settings */}}
  377. <h4 class="ui top attached header">
  378. {{.i18n.Tr "admin.config.http_config"}}
  379. </h4>
  380. <div class="ui attached table segment">
  381. <dl class="dl-horizontal admin-dl-horizontal">
  382. <dt>{{.i18n.Tr "admin.config.http.access_control_allow_origin"}}</dt>
  383. <dd>
  384. {{if .HTTP.AccessControlAllowOrigin}}
  385. <code>{{.HTTP.AccessControlAllowOrigin}}</code>
  386. {{else}}
  387. <i>{{.i18n.Tr "admin.config.not_set"}}</i>
  388. {{end}}
  389. </dd>
  390. </dl>
  391. </div>
  392. {{/* Mirror settings */}}
  393. <h4 class="ui top attached header">
  394. {{.i18n.Tr "admin.config.mirror_config"}}
  395. </h4>
  396. <div class="ui attached table segment">
  397. <dl class="dl-horizontal admin-dl-horizontal">
  398. <dt>{{.i18n.Tr "admin.config.mirror.default_interval"}}</dt>
  399. <dd>{{.Mirror.DefaultInterval}} {{.i18n.Tr "tool.raw_hours"}}</dd>
  400. </dl>
  401. </div>
  402. {{/* Webhook settings */}}
  403. <h4 class="ui top attached header">
  404. {{.i18n.Tr "admin.config.webhook_config"}}
  405. </h4>
  406. <div class="ui attached table segment">
  407. <dl class="dl-horizontal admin-dl-horizontal">
  408. <dt>{{.i18n.Tr "admin.config.webhook.types"}}</dt>
  409. <dd><code>{{.Webhook.Types}}</code></dd>
  410. <dt>{{.i18n.Tr "admin.config.webhook.deliver_timeout"}}</dt>
  411. <dd>{{.Webhook.DeliverTimeout}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  412. <dt>{{.i18n.Tr "admin.config.webhook.skip_tls_verify"}}</dt>
  413. <dd><i class="fa fa{{if .Webhook.SkipTLSVerify}}-check{{end}}-square-o"></i></dd>
  414. </dl>
  415. </div>
  416. {{/* Git settings */}}
  417. <h4 class="ui top attached header">
  418. {{.i18n.Tr "admin.config.git_config"}}
  419. </h4>
  420. <div class="ui attached table segment">
  421. <dl class="dl-horizontal admin-dl-horizontal">
  422. <dt>{{.i18n.Tr "admin.config.git.disable_diff_highlight"}}</dt>
  423. <dd><i class="fa fa{{if .Git.DisableDiffHighlight}}-check{{end}}-square-o"></i></dd>
  424. <dt>{{.i18n.Tr "admin.config.git.max_diff_lines"}}</dt>
  425. <dd>{{.Git.MaxDiffLines}}</dd>
  426. <dt>{{.i18n.Tr "admin.config.git.max_diff_line_characters"}}</dt>
  427. <dd>{{.Git.MaxDiffLineChars}}</dd>
  428. <dt>{{.i18n.Tr "admin.config.git.max_diff_files"}}</dt>
  429. <dd>{{.Git.MaxDiffFiles}}</dd>
  430. <dt>{{.i18n.Tr "admin.config.git.gc_args"}}</dt>
  431. <dd><code>{{.Git.GCArgs}}</code></dd>
  432. <div class="ui divider"></div>
  433. <dt>{{.i18n.Tr "admin.config.git.migrate_timeout"}}</dt>
  434. <dd>{{.Git.Timeout.Migrate}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  435. <dt>{{.i18n.Tr "admin.config.git.mirror_timeout"}}</dt>
  436. <dd>{{.Git.Timeout.Mirror}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  437. <dt>{{.i18n.Tr "admin.config.git.clone_timeout"}}</dt>
  438. <dd>{{.Git.Timeout.Clone}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  439. <dt>{{.i18n.Tr "admin.config.git.pull_timeout"}}</dt>
  440. <dd>{{.Git.Timeout.Pull}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  441. <dt>{{.i18n.Tr "admin.config.git.gc_timeout"}}</dt>
  442. <dd>{{.Git.Timeout.GC}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  443. </dl>
  444. </div>
  445. {{/* LFS settings */}}
  446. <h4 class="ui top attached header">
  447. {{.i18n.Tr "admin.config.lfs_config"}}
  448. </h4>
  449. <div class="ui attached table segment">
  450. <dl class="dl-horizontal admin-dl-horizontal">
  451. <dt>{{.i18n.Tr "admin.config.lfs.storage"}}</dt>
  452. <dd>{{.LFS.Storage}}</dd>
  453. <dt>{{.i18n.Tr "admin.config.lfs.objects_path"}}</dt>
  454. <dd><code>{{.LFS.ObjectsPath}}</code></dd>
  455. </dl>
  456. </div>
  457. {{/* Log settings */}}
  458. <h4 class="ui top attached header">
  459. {{.i18n.Tr "admin.config.log_config"}}
  460. </h4>
  461. <div class="ui attached log-config table segment">
  462. <dl class="dl-horizontal admin-dl-horizontal">
  463. <dt>{{.i18n.Tr "admin.config.log_file_root_path"}}</dt>
  464. <dd><code>{{.LogRootPath}}</code></dd>
  465. </dl>
  466. <div class="ui divider"></div>
  467. <table class="ui very basic table">
  468. {{range .Loggers}}
  469. <tr>
  470. <td>{{$.i18n.Tr "admin.config.log_mode"}}</td>
  471. <td>{{.Mode}}</td>
  472. <tr>
  473. </tr>
  474. <td>{{$.i18n.Tr "admin.config.log_options"}}</td>
  475. <td><pre><code>{{.Config}}</code></pre></td>
  476. </tr>
  477. {{end}}
  478. </table>
  479. </div>
  480. </div>
  481. </div>
  482. </div>
  483. </div>
  484. {{template "base/footer" .}}