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.

223 lines
14 KiB

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