diff options
author | ᴜɴᴋɴᴡᴏɴ <u@gogs.io> | 2020-02-29 16:29:17 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-29 16:29:17 +0800 |
commit | 17ae0ed3eef54d96bd179ff7fec0540cf3024748 (patch) | |
tree | a9111282717da16feb83baf352ffb2ee5178ca0d /templates/admin | |
parent | d59b0f6ff7ee24d94eaa5ad68173405faea6a81c (diff) |
conf: overhaul settings (#5953)
* Overhaul cache settings
* Overhaul HTTP settings
* conf: overhaul more settings
* log: make LGTM happy
* travis: upload report to Codecov
* Add codecov.yml
Diffstat (limited to 'templates/admin')
-rw-r--r-- | templates/admin/config.tmpl | 71 |
1 files changed, 45 insertions, 26 deletions
diff --git a/templates/admin/config.tmpl b/templates/admin/config.tmpl index 07da08a9..051b3424 100644 --- a/templates/admin/config.tmpl +++ b/templates/admin/config.tmpl @@ -62,11 +62,6 @@ <dt>{{.i18n.Tr "admin.config.server.landing_url"}}</dt> <dd><code>{{.Server.LandingURL}}</code></dd> - - <div class="ui divider"></div> - - <dt>{{.i18n.Tr "admin.config.log_file_root_path"}}</dt> - <dd><code>{{.LogRootPath}}</code></dd> </dl> </div> @@ -121,7 +116,13 @@ <dt>{{.i18n.Tr "admin.config.repo.script_type"}}</dt> <dd><code>{{.Repository.ScriptType}}</code></dd> <dt>{{.i18n.Tr "admin.config.repo.ansi_chatset"}}</dt> - <dd>{{if .Repository.ANSICharset}}{{.Repository.AnsiCharset}}{{else}}{{.i18n.Tr "admin.config.not_set"}}{{end}}</dd> + <dd> + {{if .Repository.ANSICharset}} + {{.Repository.AnsiCharset}} + {{else}} + <i>{{.i18n.Tr "admin.config.not_set"}}</i> + {{end}} + </dd> <dt>{{.i18n.Tr "admin.config.repo.force_private"}}</dt> <dd><i class="fa fa{{if .Repository.ForcePrivate}}-check{{end}}-square-o"></i></dd> <dt>{{.i18n.Tr "admin.config.repo.max_creation_limit"}}</dt> @@ -224,7 +225,13 @@ <dt>{{.i18n.Tr "admin.config.email.disable_helo"}}</dt> <dd><i class="fa fa{{if .Email.DisableHELO}}-check{{end}}-square-o"></i></dd> <dt>{{.i18n.Tr "admin.config.email.helo_hostname"}}</dt> - <dd>{{if .Email.HELOHostname}}{{.Email.HELOHostname}}{{else}}{{.i18n.Tr "admin.config.not_set"}}{{end}}</dd> + <dd> + {{if .Email.HELOHostname}} + {{.Email.HELOHostname}} + {{else}} + <i>{{.i18n.Tr "admin.config.not_set"}}</i> + {{end}} + </dd> <div class="ui divider"></div> @@ -323,13 +330,34 @@ </dl> </div> - <!-- HTTP Configuration --> + {{/* Cache settings */}} + <h4 class="ui top attached header"> + {{.i18n.Tr "admin.config.cache_config"}} + </h4> + <div class="ui attached table segment"> + <dl class="dl-horizontal admin-dl-horizontal"> + <dt>{{.i18n.Tr "admin.config.cache.adapter"}}</dt> + <dd>{{.Cache.Adapter}}</dd> + <dt>{{.i18n.Tr "admin.config.cache.interval"}}</dt> + <dd>{{.Cache.Interval}} {{.i18n.Tr "tool.raw_seconds"}}</dd> + <dt>{{.i18n.Tr "admin.config.cache.host"}}</dt> + <dd> + {{if .CacheConn}} + <code>{{.CacheConn}}</code> + {{else}} + <i>{{.i18n.Tr "admin.config.not_set"}}</i> + {{end}} + </dd> + </dl> + </div> + + {{/* HTTP settings */}} <h4 class="ui top attached header"> {{.i18n.Tr "admin.config.http_config"}} </h4> <div class="ui attached table segment"> <dl class="dl-horizontal admin-dl-horizontal"> - <dt>{{.i18n.Tr "admin.config.http_access_control_allow_origin"}}</dt> + <dt>{{.i18n.Tr "admin.config.http.access_control_allow_origin"}}</dt> <dd> {{if .HTTP.AccessControlAllowOrigin}} <code>{{.HTTP.AccessControlAllowOrigin}}</code> @@ -355,22 +383,6 @@ </div> <h4 class="ui top attached header"> - {{.i18n.Tr "admin.config.cache_config"}} - </h4> - <div class="ui attached table segment"> - <dl class="dl-horizontal admin-dl-horizontal"> - <dt>{{.i18n.Tr "admin.config.cache_adapter"}}</dt> - <dd>{{.CacheAdapter}}</dd> - <dt>{{.i18n.Tr "admin.config.cache_interval"}}</dt> - <dd>{{.CacheInterval}} {{.i18n.Tr "tool.raw_seconds"}}</dd> - {{if .CacheConn}} - <dt>{{.i18n.Tr "admin.config.cache_conn"}}</dt> - <dd><code>{{.CacheConn}}</code></dd> - {{end}} - </dl> - </div> - - <h4 class="ui top attached header"> {{.i18n.Tr "admin.config.picture_config"}} </h4> <div class="ui attached table segment"> @@ -415,7 +427,14 @@ <h4 class="ui top attached header"> {{.i18n.Tr "admin.config.log_config"}} </h4> - <div class="ui attached log-config segment"> + <div class="ui attached log-config table segment"> + <dl class="dl-horizontal admin-dl-horizontal"> + <dt>{{.i18n.Tr "admin.config.log_file_root_path"}}</dt> + <dd><code>{{.LogRootPath}}</code></dd> + </dl> + + <div class="ui divider"></div> + <table class="ui very basic table"> {{range .Loggers}} <tr> |