config.tmpl 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  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.task_interval"}}</dt>
  105. <dd>{{.Webhook.TaskInterval}} {{.i18n.Tr "tool.raw_minutes"}}</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_host"}}</dt>
  125. <dd>{{.Mailer.Host}}</dd>
  126. <dt>{{.i18n.Tr "admin.config.mailer_user"}}</dt>
  127. <dd>{{.Mailer.User}}</dd>{{end}}
  128. </dl>
  129. </div>
  130. </div>
  131. <br>
  132. <div class="panel panel-radius">
  133. <div class="panel-header">
  134. <strong>{{.i18n.Tr "admin.config.oauth_config"}}</strong>
  135. </div>
  136. <div class="panel-body">
  137. <dl class="dl-horizontal admin-dl-horizontal">
  138. <dt>{{.i18n.Tr "admin.config.oauth_enabled"}}</dt>
  139. <dd><i class="fa fa{{if .OauthEnabled}}-check{{end}}-square-o"></i></dd>
  140. {{if .OauthEnabled}}<dt>GitHub</dt>
  141. <dd><i class="fa fa{{if .Oauther.GitHub}}-check{{end}}-square-o"></i></dd>
  142. <dt>Google</dt>
  143. <dd><i class="fa fa{{if .Oauther.Google}}-check{{end}}-square-o"></i></dd>
  144. <dt>腾讯 QQ</dt>
  145. <dd><i class="fa fa{{if .Oauther.Tencent}}-check{{end}}-square-o"></i></dd>
  146. <dt>新浪微博</dt>
  147. <dd><i class="fa fa{{if .Oauther.Weibo}}-check{{end}}-square-o"></i></dd>
  148. {{end}}
  149. </dl>
  150. </div>
  151. </div>
  152. <br>
  153. <div class="panel panel-radius">
  154. <div class="panel-header">
  155. <strong>{{.i18n.Tr "admin.config.cache_config"}}</strong>
  156. </div>
  157. <div class="panel-body">
  158. <dl class="dl-horizontal admin-dl-horizontal">
  159. <dt>{{.i18n.Tr "admin.config.cache_adapter"}}</dt>
  160. <dd>{{.CacheAdapter}}</dd>
  161. <dt>{{.i18n.Tr "admin.config.cache_interval"}}</dt>
  162. <dd>{{.CacheInternal}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  163. <dt>{{.i18n.Tr "admin.config.cache_conn"}}</dt>
  164. <dd><pre>{{.CacheConn}}</pre></dd>
  165. </dl>
  166. </div>
  167. </div>
  168. <br>
  169. <div class="panel panel-radius">
  170. <div class="panel-header">
  171. <strong>{{.i18n.Tr "admin.config.session_config"}}</strong>
  172. </div>
  173. <div class="panel-body">
  174. <dl class="dl-horizontal admin-dl-horizontal">
  175. <dt>{{.i18n.Tr "admin.config.session_provider"}}</dt>
  176. <dd>{{.SessionConfig.Provider}}</dd>
  177. <dt>{{.i18n.Tr "admin.config.provider_config"}}</dt>
  178. <dd><pre>{{.SessionConfig.ProviderConfig}}</pre></dd>
  179. <dt>{{.i18n.Tr "admin.config.cookie_name"}}</dt>
  180. <dd>{{.SessionConfig.CookieName}}</dd>
  181. <dt>{{.i18n.Tr "admin.config.gc_interval_time"}}</dt>
  182. <dd>{{.SessionConfig.Gclifetime}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  183. <dt>{{.i18n.Tr "admin.config.session_life_time"}}</dt>
  184. <dd>{{.SessionConfig.Maxlifetime}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  185. <dt>{{.i18n.Tr "admin.config.https_only"}}</dt>
  186. <dd><i class="fa fa{{if .SessionConfig.Secure}}-check{{end}}-square-o"></i></dd>
  187. <dt>{{.i18n.Tr "admin.config.cookie_life_time"}}</dt>
  188. <dd>{{.SessionConfig.CookieLifeTime}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  189. </dl>
  190. </div>
  191. </div>
  192. <br>
  193. <div class="panel panel-radius">
  194. <div class="panel-header">
  195. <strong>{{.i18n.Tr "admin.config.picture_config"}}</strong>
  196. </div>
  197. <div class="panel-body">
  198. <dl class="dl-horizontal admin-dl-horizontal">
  199. <dt>{{.i18n.Tr "admin.config.picture_service"}}</dt>
  200. <dd>{{.PictureService}}</dd>
  201. <dt>{{.i18n.Tr "admin.config.disable_gravatar"}}</dt>
  202. <dd><i class="fa fa{{if .DisableGravatar}}-check{{end}}-square-o"></i></dd>
  203. </dl>
  204. </div>
  205. </div>
  206. <br>
  207. <div class="panel panel-radius">
  208. <div class="panel-header">
  209. <strong>{{.i18n.Tr "admin.config.log_config"}}</strong>
  210. </div>
  211. <div class="panel-body">
  212. <dl class="dl-horizontal admin-dl-horizontal">
  213. {{range .Loggers}}
  214. <dt>{{$.i18n.Tr "admin.config.log_mode"}}</dt>
  215. <dd>{{.Mode}}</dd>
  216. <dt>{{$.i18n.Tr "admin.config.log_config"}}</dt>
  217. <dd><pre>{{.Config}}</pre></dd>
  218. {{end}}
  219. </dl>
  220. </div>
  221. </div>
  222. </div>
  223. </div>
  224. </div>
  225. </div>
  226. </div>
  227. </div>
  228. {{template "ng/base/footer" .}}