config.tmpl 22 KB

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