config.tmpl 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316
  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. Server Configuration 🖥
  10. </h4>
  11. <div class="ui attached table segment">
  12. <dl class="dl-horizontal admin-dl-horizontal">
  13. <dt>Application Name</dt>
  14. <dd>Gitote</dd>
  15. <dt>Application Version</dt>
  16. <dd>{{AppVer}}</dd>
  17. <dt>Application URL</dt>
  18. <dd>{{.AppURL}}</dd>
  19. <dt>Domain</dt>
  20. <dd>{{.Domain}}</dd>
  21. <dt>Offline Mode</dt>
  22. <dd><i class="fa fa{{if .OfflineMode}}-check{{end}}-square-o"></i></dd>
  23. <dt>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>Run User</dt>
  27. <dd>{{.RunUser}}</dd>
  28. <dt>Run Mode</dt>
  29. <dd>{{.RunMode}}</dd>
  30. <div class="ui divider"></div>
  31. <dt>Static File Root Path</dt>
  32. <dd><code>{{.StaticRootPath}}</code></dd>
  33. <dt>Log File Root Path</dt>
  34. <dd><code>{{.LogRootPath}}</code></dd>
  35. <dt>Reverse Authentication User</dt>
  36. <dd><code>{{.ReverseProxyAuthUser}}</code></dd>
  37. </dl>
  38. </div>
  39. <h4 class="ui top attached header">
  40. SSH Configuration 🔑
  41. </h4>
  42. <div class="ui attached table segment">
  43. <dl class="dl-horizontal admin-dl-horizontal">
  44. <dt>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>Start Builtin Server</dt>
  48. <dd><i class="fa fa{{if .SSH.StartBuiltinServer}}-check{{end}}-square-o"></i></dd>
  49. <dt>Domain</dt>
  50. <dd>{{.SSH.Domain}}</dd>
  51. <dt>Port</dt>
  52. <dd>{{.SSH.Port}}</dd>
  53. <dt>Listen Port</dt>
  54. <dd>{{.SSH.ListenPort}}</dd>
  55. {{if not .SSH.StartBuiltinServer}}
  56. <dt>Root Path</dt>
  57. <dd>{{.SSH.RootPath}}</dd>
  58. <dt>Rewrite authorized_keys At Start</dt>
  59. <dd><i class="fa fa{{if .SSH.RewriteAuthorizedKeysAtStart}}-check{{end}}-square-o"></i></dd>
  60. <dt>Key Test Path</dt>
  61. <dd>{{.SSH.KeyTestPath}}</dd>
  62. <dt>Keygen ('ssh-keygen') Path</dt>
  63. <dd>{{.SSH.KeygenPath}}</dd>
  64. <dt>Minimum Key Size Check</dt>
  65. <dd><i class="fa fa{{if .SSH.MinimumKeySizeCheck}}-check{{end}}-square-o"></i></dd>
  66. {{if .SSH.MinimumKeySizeCheck}}
  67. <dt>Minimum Key Sizes</dt>
  68. <dd>{{.SSH.MinimumKeySizes}}</dd>
  69. {{end}}
  70. {{end}}
  71. {{end}}
  72. </dl>
  73. </div>
  74. <!-- Repository Configuration -->
  75. <h4 class="ui top attached header">
  76. Repository Configuration 📁
  77. </h4>
  78. <div class="ui attached table segment">
  79. <dl class="dl-horizontal admin-dl-horizontal">
  80. <dt>Repository Root Path</dt>
  81. <dd><code>{{.RepoRootPath}}</code></dd>
  82. <dt>Script Type</dt>
  83. <dd>{{.ScriptType}}</dd>
  84. <dt>Force Private</dt>
  85. <dd><i class="fa fa{{if .Repository.ForcePrivate}}-check{{end}}-square-o"></i></dd>
  86. <dt>Max Creation Limit</dt>
  87. <dd>{{.Repository.MaxCreationLimit}}</dd>
  88. <dt>Preferred Licenses</dt>
  89. <dd>{{Join .Repository.PreferredLicenses ", "}}</dd>
  90. <dt>Disable HTTP Git</dt>
  91. <dd><i class="fa fa{{if .Repository.DisableHTTPGit}}-check{{end}}-square-o"></i></dd>
  92. <dt>Enable Local Path Migration</dt>
  93. <dd><i class="fa fa{{if .Repository.EnableLocalPathMigration}}-check{{end}}-square-o"></i></dd>
  94. <dt>Commits Fetch Concurrency</dt>
  95. <dd>{{.Repository.CommitsFetchConcurrency}}</dd>
  96. </dl>
  97. </div>
  98. <!-- HTTP Configuration -->
  99. <h4 class="ui top attached header">
  100. HTTP Configuration 🌐
  101. </h4>
  102. <div class="ui attached table segment">
  103. <dl class="dl-horizontal admin-dl-horizontal">
  104. <dt>Access Control Allow Origin</dt>
  105. <dd>
  106. {{if .HTTP.AccessControlAllowOrigin}}
  107. <code>{{.HTTP.AccessControlAllowOrigin}}</code>
  108. {{else}}
  109. <i>(not set)</i>
  110. {{end}}
  111. </dd>
  112. </dl>
  113. </div>
  114. <!-- Database Configuration -->
  115. <h4 class="ui top attached header">
  116. Database Configuration 📙
  117. </h4>
  118. <div class="ui attached table segment">
  119. <dl class="dl-horizontal admin-dl-horizontal">
  120. <dt>Type</dt>
  121. <dd>{{.DbCfg.Type}}</dd>
  122. <dt>Host</dt>
  123. <dd>{{.DbCfg.Host}}</dd>
  124. <dt>Name</dt>
  125. <dd>{{.DbCfg.Name}}</dd>
  126. <dt>User</dt>
  127. <dd>{{.DbCfg.User}}</dd>
  128. <dt>SSL Mode</dt>
  129. <dd>{{.DbCfg.SSLMode}} (for "postgres" only)</dd>
  130. <dt>Path</dt>
  131. <dd>{{.DbCfg.Path}} (for "sqlite3" and "tidb")</dd>
  132. </dl>
  133. </div>
  134. <h4 class="ui top attached header">
  135. Service Configuration 🔧
  136. </h4>
  137. <div class="ui attached table segment">
  138. <dl class="dl-horizontal admin-dl-horizontal">
  139. <dt>Require Email Confirmation</dt>
  140. <dd><i class="fa fa{{if .Service.RegisterEmailConfirm}}-check{{end}}-square-o"></i></dd>
  141. <dt>Disable Registration</dt>
  142. <dd><i class="fa fa{{if .Service.DisableRegistration}}-check{{end}}-square-o"></i></dd>
  143. <dt>Show Register Button</dt>
  144. <dd><i class="fa fa{{if .Service.ShowRegistrationButton}}-check{{end}}-square-o"></i></dd>
  145. <dt>Require Sign In View</dt>
  146. <dd><i class="fa fa{{if .Service.RequireSignInView}}-check{{end}}-square-o"></i></dd>
  147. <dt>Mail Notification</dt>
  148. <dd><i class="fa fa{{if .Service.EnableNotifyMail}}-check{{end}}-square-o"></i></dd>
  149. <dt>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>Active Code Lives</dt>
  153. <dd>{{.Service.ActiveCodeLives}} minutes</dd>
  154. <dt>Reset Password Code Lives</dt>
  155. <dd>{{.Service.ResetPwdCodeLives}} minutes</dd>
  156. </dl>
  157. </div>
  158. <h4 class="ui top attached header">
  159. Webhook Configuration 🎣
  160. </h4>
  161. <div class="ui attached table segment">
  162. <dl class="dl-horizontal admin-dl-horizontal">
  163. <dt>Queue Length</dt>
  164. <dd>{{.Webhook.QueueLength}}</dd>
  165. <dt>Deliver Timeout</dt>
  166. <dd>{{.Webhook.DeliverTimeout}} seconds</dd>
  167. <dt>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. Mailer Configuration 📬
  173. </h4>
  174. <div class="ui attached table segment">
  175. <dl class="dl-horizontal admin-dl-horizontal">
  176. <dt>Enabled</dt>
  177. <dd><i class="fa fa{{if .MailerEnabled}}-check{{end}}-square-o"></i></dd>
  178. {{if .MailerEnabled}}
  179. <dt>Subject Prefix</dt>
  180. <dd><code>{{.Mailer.SubjectPrefix}}</code></dd>
  181. <dt>Disable HELO</dt>
  182. <dd><i class="fa fa{{if .Mailer.DisableHelo}}-check{{end}}-square-o"></i></dd>
  183. <dt>Disable HELO</dt>
  184. <dd>{{.Mailer.Host}}</dd>
  185. <dt>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">Send Test Email</button>
  195. </form>
  196. {{end}}
  197. </dl>
  198. </div>
  199. <h4 class="ui top attached header">
  200. Cache Configuration 🚄
  201. </h4>
  202. <div class="ui attached table segment">
  203. <dl class="dl-horizontal admin-dl-horizontal">
  204. <dt>Cache Adapter</dt>
  205. <dd>{{.CacheAdapter}}</dd>
  206. <dt>Cache Interval</dt>
  207. <dd>{{.CacheInterval}} seconds</dd>
  208. {{if .CacheConn}}
  209. <dt>Cache Connection</dt>
  210. <dd><code>{{.CacheConn}}</code></dd>
  211. {{end}}
  212. </dl>
  213. </div>
  214. <h4 class="ui top attached header">
  215. Session Configuration ⌛
  216. </h4>
  217. <div class="ui attached table segment">
  218. <dl class="dl-horizontal admin-dl-horizontal">
  219. <dt>Session Provider</dt>
  220. <dd>{{.SessionConfig.Provider}}</dd>
  221. <dt>Provider Config</dt>
  222. <dd><code>{{.SessionConfig.ProviderConfig}}</code></dd>
  223. <dt>Cookie Name</dt>
  224. <dd>{{.SessionConfig.CookieName}}</dd>
  225. <dt>GC Interval Time</dt>
  226. <dd>{{.SessionConfig.Gclifetime}} seconds</dd>
  227. <dt>Session Life Time</dt>
  228. <dd>{{.SessionConfig.Maxlifetime}} seconds</dd>
  229. <dt>HTTPS Only</dt>
  230. <dd><i class="fa fa{{if .SessionConfig.Secure}}-check{{end}}-square-o"></i></dd>
  231. <dt>Cookie Life Time</dt>
  232. <dd>{{.SessionConfig.CookieLifeTime}} seconds</dd>
  233. </dl>
  234. </div>
  235. <h4 class="ui top attached header">
  236. Picture Configuration 🖼
  237. </h4>
  238. <div class="ui attached table segment">
  239. <dl class="dl-horizontal admin-dl-horizontal">
  240. <dt>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>Enable Federated Avatars</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. Git Configuration 🚧
  249. </h4>
  250. <div class="ui attached table segment">
  251. <dl class="dl-horizontal admin-dl-horizontal">
  252. <dt>Git Version</dt>
  253. <dd>{{.GitVersion}}</dd>
  254. <dt>Disable Diff Syntax Highlight</dt>
  255. <dd><i class="fa fa{{if .Git.DisableDiffHighlight}}-check{{end}}-square-o"></i></dd>
  256. <dt>Max Diff Lines (for a single file)</dt>
  257. <dd>{{.Git.MaxGitDiffLines}}</dd>
  258. <dt>Max Diff Characters (for a single line)</dt>
  259. <dd>{{.Git.MaxGitDiffLineCharacters}}</dd>
  260. <dt>Max Diff Files (to be shown)</dt>
  261. <dd>{{.Git.MaxGitDiffFiles}}</dd>
  262. <dt>GC Arguments</dt>
  263. <dd><code>{{.Git.GCArgs}}</code></dd>
  264. <div class="ui divider"></div>
  265. <dt>Migration Timeout</dt>
  266. <dd>{{.Git.Timeout.Migrate}} seconds</dd>
  267. <dt>Mirror Update Timeout</dt>
  268. <dd>{{.Git.Timeout.Mirror}} seconds</dd>
  269. <dt>Clone Operation Timeout</dt>
  270. <dd>{{.Git.Timeout.Clone}} seconds</dd>
  271. <dt>Pull Operation Timeout</dt>
  272. <dd>{{.Git.Timeout.Pull}} seconds</dd>
  273. <dt>GC Operation Timeout</dt>
  274. <dd>{{.Git.Timeout.GC}} seconds</dd>
  275. </dl>
  276. </div>
  277. <h4 class="ui top attached header">
  278. Log Configuration 📜
  279. </h4>
  280. <div class="ui attached log-config segment">
  281. <table class="ui very basic table">
  282. {{range .Loggers}}
  283. <tr>
  284. <td>Mode</td>
  285. <td>{{.Mode}}</td>
  286. <tr>
  287. </tr>
  288. <td>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" .}}