config.tmpl 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230
  1. {{template "ng/base/head" .}}
  2. {{template "ng/base/header" .}}
  3. <div id="admin-wrapper">
  4. <div id="setting-wrapper" class="main-wrapper">
  5. <div id="admin-setting" class="container clear">
  6. {{template "admin/nav" .}}
  7. <div class="grid-4-5 left">
  8. <div class="setting-content">
  9. {{template "ng/base/alert" .}}
  10. <div id="setting-content">
  11. <div class="panel panel-radius">
  12. <div class="panel-header">
  13. <strong>{{.i18n.Tr "admin.config.server_config"}}</strong>
  14. </div>
  15. <div class="panel-body">
  16. <dl class="dl-horizontal admin-dl-horizontal">
  17. <dt>{{.i18n.Tr "admin.config.app_name"}}</dt>
  18. <dd>{{AppName}}</dd>
  19. <dt>{{.i18n.Tr "admin.config.app_ver"}}</dt>
  20. <dd>{{AppVer}}</dd>
  21. <dt>{{.i18n.Tr "admin.config.app_url"}}</dt>
  22. <dd>{{.AppUrl}}</dd>
  23. <dt>{{.i18n.Tr "admin.config.domain"}}</dt>
  24. <dd>{{.Domain}}</dd>
  25. <dt>{{.i18n.Tr "admin.config.offline_mode"}}</dt>
  26. <dd><i class="fa fa{{if .OfflineMode}}-check{{end}}-square-o"></i></dd>
  27. <dt>{{.i18n.Tr "admin.config.disable_router_log"}}</dt>
  28. <dd><i class="fa fa{{if .DisableRouterLog}}-check{{end}}-square-o"></i></dd>
  29. <hr/>
  30. <dt>{{.i18n.Tr "admin.config.run_user"}}</dt>
  31. <dd>{{.RunUser}}</dd>
  32. <dt>{{.i18n.Tr "admin.config.run_mode"}}</dt>
  33. <dd>{{.RunMode}}</dd>
  34. <hr/>
  35. <dt>{{.i18n.Tr "admin.config.repo_root_path"}}</dt>
  36. <dd>{{.RepoRootPath}}</dd>
  37. <dt>{{.i18n.Tr "admin.config.static_file_root_path"}}</dt>
  38. <dd>{{.StaticRootPath}}</dd>
  39. <dt>{{.i18n.Tr "admin.config.log_file_root_path"}}</dt>
  40. <dd>{{.LogRootPath}}</dd>
  41. <dt>{{.i18n.Tr "admin.config.script_type"}}</dt>
  42. <dd>{{.ScriptType}}</dd>
  43. <dt>{{.i18n.Tr "admin.config.reverse_auth_user"}}</dt>
  44. <dd>{{.ReverseProxyAuthUser}}</dd>
  45. </dl>
  46. </div>
  47. </div>
  48. <br>
  49. <div class="panel panel-radius">
  50. <div class="panel-header">
  51. <strong>{{.i18n.Tr "admin.config.db_config"}}</strong>
  52. </div>
  53. <div class="panel-body">
  54. <dl class="dl-horizontal admin-dl-horizontal">
  55. <dt>{{.i18n.Tr "admin.config.db_type"}}</dt>
  56. <dd>{{.DbCfg.Type}}</dd>
  57. <dt>{{.i18n.Tr "admin.config.db_host"}}</dt>
  58. <dd>{{.DbCfg.Host}}</dd>
  59. <dt>{{.i18n.Tr "admin.config.db_name"}}</dt>
  60. <dd>{{.DbCfg.Name}}</dd>
  61. <dt>{{.i18n.Tr "admin.config.db_user"}}</dt>
  62. <dd>{{.DbCfg.User}}</dd>
  63. <dt>{{.i18n.Tr "admin.config.db_ssl_mode"}}</dt>
  64. <dd>{{.DbCfg.SSLMode}} {{.i18n.Tr "admin.config.db_ssl_mode_helper"}}</dd>
  65. <dt>{{.i18n.Tr "admin.config.db_path"}}</dt>
  66. <dd>{{.DbCfg.Path}} {{.i18n.Tr "admin.config.db_path_helper"}}</dd>
  67. </dl>
  68. </div>
  69. </div>
  70. <br>
  71. <div class="panel panel-radius">
  72. <div class="panel-header">
  73. <strong>{{.i18n.Tr "admin.config.service_config"}}</strong>
  74. </div>
  75. <div class="panel-body">
  76. <dl class="dl-horizontal admin-dl-horizontal">
  77. <dt>{{.i18n.Tr "admin.config.register_email_confirm"}}</dt>
  78. <dd><i class="fa fa{{if .Service.RegisterEmailConfirm}}-check{{end}}-square-o"></i></dd>
  79. <dt>{{.i18n.Tr "admin.config.disable_register"}}</dt>
  80. <dd><i class="fa fa{{if .Service.DisableRegistration}}-check{{end}}-square-o"></i></dd>
  81. <dt>{{.i18n.Tr "admin.config.show_registration_button"}}</dt>
  82. <dd><i class="fa fa{{if .Service.ShowRegistrationButton}}-check{{end}}-square-o"></i></dd>
  83. <dt>{{.i18n.Tr "admin.config.require_sign_in_view"}}</dt>
  84. <dd><i class="fa fa{{if .Service.RequireSignInView}}-check{{end}}-square-o"></i></dd>
  85. <dt>{{.i18n.Tr "admin.config.mail_notify"}}</dt>
  86. <dd><i class="fa fa{{if .Service.EnableNotifyMail}}-check{{end}}-square-o"></i></dd>
  87. <dt>{{.i18n.Tr "admin.config.enable_cache_avatar"}}</dt>
  88. <dd><i class="fa fa{{if .Service.EnableCacheAvatar}}-check{{end}}-square-o"></i></dd>
  89. <hr/>
  90. <dt>{{.i18n.Tr "admin.config.active_code_lives"}}</dt>
  91. <dd>{{.Service.ActiveCodeLives}} {{.i18n.Tr "tool.raw_minutes"}}</dd>
  92. <dt>{{.i18n.Tr "admin.config.reset_password_code_lives"}}</dt>
  93. <dd>{{.Service.ResetPwdCodeLives}} {{.i18n.Tr "tool.raw_minutes"}}</dd>
  94. </dl>
  95. </div>
  96. </div>
  97. <br>
  98. <div class="panel panel-radius">
  99. <div class="panel-header">
  100. <strong>{{.i18n.Tr "admin.config.webhook_config"}}</strong>
  101. </div>
  102. <div class="panel-body">
  103. <dl class="dl-horizontal admin-dl-horizontal">
  104. <dt>{{.i18n.Tr "admin.config.queue_length"}}</dt>
  105. <dd>{{.Webhook.QueueLength}}</dd>
  106. <dt>{{.i18n.Tr "admin.config.deliver_timeout"}}</dt>
  107. <dd>{{.Webhook.DeliverTimeout}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  108. <dt>{{.i18n.Tr "admin.config.skip_tls_verify"}}</dt>
  109. <dd><i class="fa fa{{if .Webhook.SkipTLSVerify}}-check{{end}}-square-o"></i></dd>
  110. </dl>
  111. </div>
  112. </div>
  113. <br>
  114. <div class="panel panel-radius">
  115. <div class="panel-header">
  116. <strong>{{.i18n.Tr "admin.config.mailer_config"}}</strong>
  117. </div>
  118. <div class="panel-body">
  119. <dl class="dl-horizontal admin-dl-horizontal">
  120. <dt>{{.i18n.Tr "admin.config.mailer_enabled"}}</dt>
  121. <dd><i class="fa fa{{if .MailerEnabled}}-check{{end}}-square-o"></i></dd>
  122. {{if .MailerEnabled}}<dt>{{.i18n.Tr "admin.config.mailer_name"}}</dt>
  123. <dd>{{.Mailer.Name}}</dd>
  124. <dt>{{.i18n.Tr "admin.config.mailer_disable_helo"}}</dt>
  125. <dd><i class="fa fa{{if .Mailer.DisableHelo}}-check{{end}}-square-o"></i></dd>
  126. <dt>{{.i18n.Tr "admin.config.mailer_host"}}</dt>
  127. <dd>{{.Mailer.Host}}</dd>
  128. <dt>{{.i18n.Tr "admin.config.mailer_user"}}</dt>
  129. <dd>{{.Mailer.User}}</dd>{{end}}
  130. </dl>
  131. </div>
  132. </div>
  133. <br>
  134. <div class="panel panel-radius">
  135. <div class="panel-header">
  136. <strong>{{.i18n.Tr "admin.config.oauth_config"}}</strong>
  137. </div>
  138. <div class="panel-body">
  139. <dl class="dl-horizontal admin-dl-horizontal">
  140. <dt>{{.i18n.Tr "admin.config.oauth_enabled"}}</dt>
  141. <dd><i class="fa fa{{if .OauthEnabled}}-check{{end}}-square-o"></i></dd>
  142. {{if .OauthEnabled}}<dt>GitHub</dt>
  143. <dd><i class="fa fa{{if .Oauther.GitHub}}-check{{end}}-square-o"></i></dd>
  144. <dt>Google</dt>
  145. <dd><i class="fa fa{{if .Oauther.Google}}-check{{end}}-square-o"></i></dd>
  146. <dt>腾讯 QQ</dt>
  147. <dd><i class="fa fa{{if .Oauther.Tencent}}-check{{end}}-square-o"></i></dd>
  148. <dt>新浪微博</dt>
  149. <dd><i class="fa fa{{if .Oauther.Weibo}}-check{{end}}-square-o"></i></dd>
  150. {{end}}
  151. </dl>
  152. </div>
  153. </div>
  154. <br>
  155. <div class="panel panel-radius">
  156. <div class="panel-header">
  157. <strong>{{.i18n.Tr "admin.config.cache_config"}}</strong>
  158. </div>
  159. <div class="panel-body">
  160. <dl class="dl-horizontal admin-dl-horizontal">
  161. <dt>{{.i18n.Tr "admin.config.cache_adapter"}}</dt>
  162. <dd>{{.CacheAdapter}}</dd>
  163. <dt>{{.i18n.Tr "admin.config.cache_interval"}}</dt>
  164. <dd>{{.CacheInternal}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  165. <dt>{{.i18n.Tr "admin.config.cache_conn"}}</dt>
  166. <dd><pre>{{.CacheConn}}</pre></dd>
  167. </dl>
  168. </div>
  169. </div>
  170. <br>
  171. <div class="panel panel-radius">
  172. <div class="panel-header">
  173. <strong>{{.i18n.Tr "admin.config.session_config"}}</strong>
  174. </div>
  175. <div class="panel-body">
  176. <dl class="dl-horizontal admin-dl-horizontal">
  177. <dt>{{.i18n.Tr "admin.config.session_provider"}}</dt>
  178. <dd>{{.SessionConfig.Provider}}</dd>
  179. <dt>{{.i18n.Tr "admin.config.provider_config"}}</dt>
  180. <dd><pre>{{.SessionConfig.ProviderConfig}}</pre></dd>
  181. <dt>{{.i18n.Tr "admin.config.cookie_name"}}</dt>
  182. <dd>{{.SessionConfig.CookieName}}</dd>
  183. <dt>{{.i18n.Tr "admin.config.gc_interval_time"}}</dt>
  184. <dd>{{.SessionConfig.Gclifetime}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  185. <dt>{{.i18n.Tr "admin.config.session_life_time"}}</dt>
  186. <dd>{{.SessionConfig.Maxlifetime}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  187. <dt>{{.i18n.Tr "admin.config.https_only"}}</dt>
  188. <dd><i class="fa fa{{if .SessionConfig.Secure}}-check{{end}}-square-o"></i></dd>
  189. <dt>{{.i18n.Tr "admin.config.cookie_life_time"}}</dt>
  190. <dd>{{.SessionConfig.CookieLifeTime}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  191. </dl>
  192. </div>
  193. </div>
  194. <br>
  195. <div class="panel panel-radius">
  196. <div class="panel-header">
  197. <strong>{{.i18n.Tr "admin.config.picture_config"}}</strong>
  198. </div>
  199. <div class="panel-body">
  200. <dl class="dl-horizontal admin-dl-horizontal">
  201. <dt>{{.i18n.Tr "admin.config.picture_service"}}</dt>
  202. <dd>{{.PictureService}}</dd>
  203. <dt>{{.i18n.Tr "admin.config.disable_gravatar"}}</dt>
  204. <dd><i class="fa fa{{if .DisableGravatar}}-check{{end}}-square-o"></i></dd>
  205. </dl>
  206. </div>
  207. </div>
  208. <br>
  209. <div class="panel panel-radius">
  210. <div class="panel-header">
  211. <strong>{{.i18n.Tr "admin.config.log_config"}}</strong>
  212. </div>
  213. <div class="panel-body">
  214. <dl class="dl-horizontal admin-dl-horizontal">
  215. {{range .Loggers}}
  216. <dt>{{$.i18n.Tr "admin.config.log_mode"}}</dt>
  217. <dd>{{.Mode}}</dd>
  218. <dt>{{$.i18n.Tr "admin.config.log_config"}}</dt>
  219. <dd><pre>{{.Config}}</pre></dd>
  220. {{end}}
  221. </dl>
  222. </div>
  223. </div>
  224. </div>
  225. </div>
  226. </div>
  227. </div>
  228. </div>
  229. </div>
  230. {{template "ng/base/footer" .}}