config.tmpl 23 KB

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