config.tmpl 23 KB

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