You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

233 lines
15 KiB

9 years ago
10 years ago
  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.enable_cache_avatar"}}</dt>
  86. <dd><i class="fa fa{{if .Service.EnableCacheAvatar}}-check{{end}}-square-o"></i></dd>
  87. <dt>{{.i18n.Tr "admin.config.mail_notify"}}</dt>
  88. <dd><i class="fa fa{{if .Service.EnableNotifyMail}}-check{{end}}-square-o"></i></dd>
  89. <dt>{{.i18n.Tr "admin.config.disable_key_size_check"}}</dt>
  90. <dd><i class="fa fa{{if .Service.DisableMinimumKeySizeCheck}}-check{{end}}-square-o"></i></dd>
  91. <dt>{{.i18n.Tr "admin.config.enable_captcha"}}</dt>
  92. <dd><i class="fa fa{{if .Service.EnableCaptcha}}-check{{end}}-square-o"></i></dd>
  93. <hr/>
  94. <dt>{{.i18n.Tr "admin.config.active_code_lives"}}</dt>
  95. <dd>{{.Service.ActiveCodeLives}} {{.i18n.Tr "tool.raw_minutes"}}</dd>
  96. <dt>{{.i18n.Tr "admin.config.reset_password_code_lives"}}</dt>
  97. <dd>{{.Service.ResetPwdCodeLives}} {{.i18n.Tr "tool.raw_minutes"}}</dd>
  98. </dl>
  99. </div>
  100. </div>
  101. <br>
  102. <div class="panel panel-radius">
  103. <div class="panel-header">
  104. <strong>{{.i18n.Tr "admin.config.webhook_config"}}</strong>
  105. </div>
  106. <div class="panel-body">
  107. <dl class="dl-horizontal admin-dl-horizontal">
  108. <dt>{{.i18n.Tr "admin.config.queue_length"}}</dt>
  109. <dd>{{.Webhook.QueueLength}}</dd>
  110. <dt>{{.i18n.Tr "admin.config.deliver_timeout"}}</dt>
  111. <dd>{{.Webhook.DeliverTimeout}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  112. <dt>{{.i18n.Tr "admin.config.skip_tls_verify"}}</dt>
  113. <dd><i class="fa fa{{if .Webhook.SkipTLSVerify}}-check{{end}}-square-o"></i></dd>
  114. </dl>
  115. </div>
  116. </div>
  117. <br>
  118. <div class="panel panel-radius">
  119. <div class="panel-header">
  120. <strong>{{.i18n.Tr "admin.config.mailer_config"}}</strong>
  121. </div>
  122. <div class="panel-body">
  123. <dl class="dl-horizontal admin-dl-horizontal">
  124. <dt>{{.i18n.Tr "admin.config.mailer_enabled"}}</dt>
  125. <dd><i class="fa fa{{if .MailerEnabled}}-check{{end}}-square-o"></i></dd>
  126. {{if .MailerEnabled}}<dt>{{.i18n.Tr "admin.config.mailer_name"}}</dt>
  127. <dd>{{.Mailer.Name}}</dd>
  128. <dt>{{.i18n.Tr "admin.config.mailer_disable_helo"}}</dt>
  129. <dd><i class="fa fa{{if .Mailer.DisableHelo}}-check{{end}}-square-o"></i></dd>
  130. <dt>{{.i18n.Tr "admin.config.mailer_host"}}</dt>
  131. <dd>{{.Mailer.Host}}</dd>
  132. <dt>{{.i18n.Tr "admin.config.mailer_user"}}</dt>
  133. <dd>{{.Mailer.User}}</dd>{{end}}
  134. </dl>
  135. </div>
  136. </div>
  137. <br>
  138. <div class="panel panel-radius">
  139. <div class="panel-header">
  140. <strong>{{.i18n.Tr "admin.config.oauth_config"}}</strong>
  141. </div>
  142. <div class="panel-body">
  143. <dl class="dl-horizontal admin-dl-horizontal">
  144. <dt>{{.i18n.Tr "admin.config.oauth_enabled"}}</dt>
  145. <dd><i class="fa fa{{if .OauthEnabled}}-check{{end}}-square-o"></i></dd>
  146. {{if .OauthEnabled}}<dt>GitHub</dt>
  147. <dd><i class="fa fa{{if .Oauther.GitHub}}-check{{end}}-square-o"></i></dd>
  148. <dt>Google</dt>
  149. <dd><i class="fa fa{{if .Oauther.Google}}-check{{end}}-square-o"></i></dd>
  150. <dt>腾讯 QQ</dt>
  151. <dd><i class="fa fa{{if .Oauther.Tencent}}-check{{end}}-square-o"></i></dd>
  152. <dt>新浪微博</dt>
  153. <dd><i class="fa fa{{if .Oauther.Weibo}}-check{{end}}-square-o"></i></dd>
  154. {{end}}
  155. </dl>
  156. </div>
  157. </div>
  158. <br>
  159. <div class="panel panel-radius">
  160. <div class="panel-header">
  161. <strong>{{.i18n.Tr "admin.config.cache_config"}}</strong>
  162. </div>
  163. <div class="panel-body">
  164. <dl class="dl-horizontal admin-dl-horizontal">
  165. <dt>{{.i18n.Tr "admin.config.cache_adapter"}}</dt>
  166. <dd>{{.CacheAdapter}}</dd>
  167. <dt>{{.i18n.Tr "admin.config.cache_interval"}}</dt>
  168. <dd>{{.CacheInternal}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  169. <dt>{{.i18n.Tr "admin.config.cache_conn"}}</dt>
  170. <dd><pre>{{.CacheConn}}</pre></dd>
  171. </dl>
  172. </div>
  173. </div>
  174. <br>
  175. <div class="panel panel-radius">
  176. <div class="panel-header">
  177. <strong>{{.i18n.Tr "admin.config.session_config"}}</strong>
  178. </div>
  179. <div class="panel-body">
  180. <dl class="dl-horizontal admin-dl-horizontal">
  181. <dt>{{.i18n.Tr "admin.config.session_provider"}}</dt>
  182. <dd>{{.SessionConfig.Provider}}</dd>
  183. <dt>{{.i18n.Tr "admin.config.provider_config"}}</dt>
  184. <dd><pre>{{.SessionConfig.ProviderConfig}}</pre></dd>
  185. <dt>{{.i18n.Tr "admin.config.cookie_name"}}</dt>
  186. <dd>{{.SessionConfig.CookieName}}</dd>
  187. <dt>{{.i18n.Tr "admin.config.gc_interval_time"}}</dt>
  188. <dd>{{.SessionConfig.Gclifetime}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  189. <dt>{{.i18n.Tr "admin.config.session_life_time"}}</dt>
  190. <dd>{{.SessionConfig.Maxlifetime}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  191. <dt>{{.i18n.Tr "admin.config.https_only"}}</dt>
  192. <dd><i class="fa fa{{if .SessionConfig.Secure}}-check{{end}}-square-o"></i></dd>
  193. <dt>{{.i18n.Tr "admin.config.cookie_life_time"}}</dt>
  194. <dd>{{.SessionConfig.CookieLifeTime}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
  195. </dl>
  196. </div>
  197. </div>
  198. <br>
  199. <div class="panel panel-radius">
  200. <div class="panel-header">
  201. <strong>{{.i18n.Tr "admin.config.picture_config"}}</strong>
  202. </div>
  203. <div class="panel-body">
  204. <dl class="dl-horizontal admin-dl-horizontal">
  205. <dt>{{.i18n.Tr "admin.config.picture_service"}}</dt>
  206. <dd>{{.PictureService}}</dd>
  207. <dt>{{.i18n.Tr "admin.config.disable_gravatar"}}</dt>
  208. <dd><i class="fa fa{{if .DisableGravatar}}-check{{end}}-square-o"></i></dd>
  209. </dl>
  210. </div>
  211. </div>
  212. <br>
  213. <div class="panel panel-radius">
  214. <div class="panel-header">
  215. <strong>{{.i18n.Tr "admin.config.log_config"}}</strong>
  216. </div>
  217. <div class="panel-body">
  218. <dl class="dl-horizontal admin-dl-horizontal">
  219. {{range .Loggers}}
  220. <dt>{{$.i18n.Tr "admin.config.log_mode"}}</dt>
  221. <dd>{{.Mode}}</dd>
  222. <dt>{{$.i18n.Tr "admin.config.log_config"}}</dt>
  223. <dd><pre>{{.Config}}</pre></dd>
  224. {{end}}
  225. </dl>
  226. </div>
  227. </div>
  228. </div>
  229. </div>
  230. </div>
  231. </div>
  232. </div>
  233. </div>
  234. {{template "ng/base/footer" .}}