config.tmpl 13 KB

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