githaven-fork/templates/admin/config.tmpl

423 lines
18 KiB
Cheetah
Raw Normal View History

2015-11-21 11:57:28 +00:00
{{template "base/head" .}}
2016-02-25 04:59:17 +00:00
<div class="admin config">
{{template "admin/navbar" .}}
<div class="ui container">
{{template "base/alert" .}}
<h4 class="ui top attached header">
{{.i18n.Tr "admin.config.server_config"}}
</h4>
<div class="ui attached table segment">
<dl class="dl-horizontal admin-dl-horizontal">
<dt>{{.i18n.Tr "admin.config.app_name"}}</dt>
<dd>{{AppName}}</dd>
<dt>{{.i18n.Tr "admin.config.app_ver"}}</dt>
<dd>{{AppVer}}{{AppBuiltWith}}</dd>
<dt>{{.i18n.Tr "admin.config.custom_conf"}}</dt>
<dd>{{.CustomConf}}</dd>
<dt>{{.i18n.Tr "admin.config.app_url"}}</dt>
<dd>{{.AppUrl}}</dd>
<dt>{{.i18n.Tr "admin.config.domain"}}</dt>
<dd>{{.Domain}}</dd>
<dt>{{.i18n.Tr "admin.config.offline_mode"}}</dt>
<dd><i class="fa fa{{if .OfflineMode}}-check{{end}}-square-o"></i></dd>
<dt>{{.i18n.Tr "admin.config.disable_router_log"}}</dt>
<dd><i class="fa fa{{if .DisableRouterLog}}-check{{end}}-square-o"></i></dd>
<div class="ui divider"></div>
<dt>{{.i18n.Tr "admin.config.run_user"}}</dt>
<dd>{{.RunUser}}</dd>
<dt>{{.i18n.Tr "admin.config.run_mode"}}</dt>
<dd>{{.RunMode}}</dd>
<div class="ui divider"></div>
<dt>{{.i18n.Tr "admin.config.git_version"}}</dt>
<dd>{{.GitVersion}}</dd>
<div class="ui divider"></div>
<dt>{{.i18n.Tr "admin.config.repo_root_path"}}</dt>
<dd>{{.RepoRootPath}}</dd>
<dt>{{.i18n.Tr "admin.config.static_file_root_path"}}</dt>
<dd>{{.StaticRootPath}}</dd>
<dt>{{.i18n.Tr "admin.config.custom_file_root_path"}}</dt>
<dd>{{.CustomRootPath}}</dd>
<dt>{{.i18n.Tr "admin.config.log_file_root_path"}}</dt>
<dd>{{.LogRootPath}}</dd>
<dt>{{.i18n.Tr "admin.config.script_type"}}</dt>
<dd>{{.ScriptType}}</dd>
<dt>{{.i18n.Tr "admin.config.reverse_auth_user"}}</dt>
<dd>{{.ReverseProxyAuthUser}}</dd>
{{if .EnvVars }}
<div class="ui divider"></div>
{{range .EnvVars}}
<dt>{{.Name}}</dt>
<dd>{{.Value}}</dd>
{{end}}
{{end}}
</dl>
</div>
<h4 class="ui top attached header">
{{.i18n.Tr "admin.config.ssh_config"}}
</h4>
<div class="ui attached table segment">
<dl class="dl-horizontal admin-dl-horizontal">
<dt>{{.i18n.Tr "admin.config.ssh_enabled"}}</dt>
<dd><i class="fa fa{{if not .SSH.Disabled}}-check{{end}}-square-o"></i></dd>
{{if not .SSH.Disabled}}
<dt>{{.i18n.Tr "admin.config.ssh_start_builtin_server"}}</dt>
<dd><i class="fa fa{{if .SSH.StartBuiltinServer}}-check{{end}}-square-o"></i></dd>
<dt>{{.i18n.Tr "admin.config.ssh_domain"}}</dt>
<dd>{{.SSH.Domain}}</dd>
<dt>{{.i18n.Tr "admin.config.ssh_port"}}</dt>
<dd>{{.SSH.Port}}</dd>
<dt>{{.i18n.Tr "admin.config.ssh_listen_port"}}</dt>
<dd>{{.SSH.ListenPort}}</dd>
{{if not .SSH.StartBuiltinServer}}
<dt>{{.i18n.Tr "admin.config.ssh_root_path"}}</dt>
<dd>{{.SSH.RootPath}}</dd>
<dt>{{.i18n.Tr "admin.config.ssh_key_test_path"}}</dt>
<dd>{{.SSH.KeyTestPath}}</dd>
<dt>{{.i18n.Tr "admin.config.ssh_keygen_path"}}</dt>
<dd>{{.SSH.KeygenPath}}</dd>
<dt>{{.i18n.Tr "admin.config.ssh_minimum_key_size_check"}}</dt>
<dd><i class="fa fa{{if .SSH.MinimumKeySizeCheck}}-check{{end}}-square-o"></i></dd>
{{if .SSH.MinimumKeySizeCheck}}
<dt>{{.i18n.Tr "admin.config.ssh_minimum_key_sizes"}}</dt>
<dd>{{.SSH.MinimumKeySizes}}</dd>
{{end}}
{{end}}
{{end}}
</dl>
</div>
2019-06-16 18:24:49 +00:00
<h4 class="ui top attached header">
{{.i18n.Tr "admin.config.lfs_config"}}
</h4>
<div class="ui attached table segment">
<dl class="dl-horizontal admin-dl-horizontal">
<dt>{{.i18n.Tr "admin.config.lfs_enabled"}}</dt>
<dd><i class="fa fa{{if .LFS.StartServer}}-check{{end}}-square-o"></i></dd>
{{if .LFS.StartServer}}
<dt>{{.i18n.Tr "admin.config.lfs_content_path"}}</dt>
<dd>{{.LFS.ContentPath}}</dd>
<dt>{{.i18n.Tr "admin.config.lfs_http_auth_expiry"}}</dt>
<dd>{{.LFS.HTTPAuthExpiry}}</dd>
{{end}}
</dl>
</div>
<h4 class="ui top attached header">
{{.i18n.Tr "admin.config.db_config"}}
</h4>
<div class="ui attached table segment">
<dl class="dl-horizontal admin-dl-horizontal">
<dt>{{.i18n.Tr "admin.config.db_type"}}</dt>
<dd>{{.DbCfg.Type}}</dd>
{{if not (or (eq .DbCfg.Type "sqlite3") (eq .DbCfg.Type "tidb"))}}
<dt>{{.i18n.Tr "admin.config.db_host"}}</dt>
<dd>{{if .DbCfg.Host}}{{.DbCfg.Host}}{{else}}-{{end}}</dd>
<dt>{{.i18n.Tr "admin.config.db_name"}}</dt>
<dd>{{if .DbCfg.Name}}{{.DbCfg.Name}}{{else}}-{{end}}</dd>
<dt>{{.i18n.Tr "admin.config.db_user"}}</dt>
<dd>{{if .DbCfg.User}}{{.DbCfg.User}}{{else}}-{{end}}</dd>
{{end}}
{{if eq .DbCfg.Type "postgres"}}
<dt>{{.i18n.Tr "admin.config.db_schema"}}</dt>
<dd>{{if .DbCfg.Schema}}{{.DbCfg.Schema}}{{else}}-{{end}}</dd>
<dt>{{.i18n.Tr "admin.config.db_ssl_mode"}}</dt>
<dd>{{if .DbCfg.SSLMode}}{{.DbCfg.SSLMode}}{{else}}-{{end}}</dd>
{{end}}
{{if or (eq .DbCfg.Type "sqlite3") (eq .DbCfg.Type "tidb")}}
<dt>{{.i18n.Tr "admin.config.db_path"}}</dt>
<dd>{{if .DbCfg.Path}}{{.DbCfg.Path}}{{else}}-{{end}}</dd>
{{end}}
</dl>
</div>
<h4 class="ui top attached header">
{{.i18n.Tr "admin.config.service_config"}}
</h4>
<div class="ui attached table segment">
<dl class="dl-horizontal admin-dl-horizontal">
<dt>{{.i18n.Tr "admin.config.register_email_confirm"}}</dt>
<dd><i class="fa fa{{if .Service.RegisterEmailConfirm}}-check{{end}}-square-o"></i></dd>
<dt>{{.i18n.Tr "admin.config.disable_register"}}</dt>
<dd><i class="fa fa{{if .Service.DisableRegistration}}-check{{end}}-square-o"></i></dd>
<dt>{{.i18n.Tr "admin.config.allow_only_external_registration"}}</dt>
<dd><i class="fa fa{{if .Service.AllowOnlyExternalRegistration}}-check{{end}}-square-o"></i></dd>
<dt>{{.i18n.Tr "admin.config.show_registration_button"}}</dt>
<dd><i class="fa fa{{if .Service.ShowRegistrationButton}}-check{{end}}-square-o"></i></dd>
<dt>{{.i18n.Tr "admin.config.enable_openid_signup"}}</dt>
<dd><i class="fa fa{{if .Service.EnableOpenIDSignUp}}-check{{end}}-square-o"></i></dd>
<dt>{{.i18n.Tr "admin.config.enable_openid_signin"}}</dt>
<dd><i class="fa fa{{if .Service.EnableOpenIDSignIn}}-check{{end}}-square-o"></i></dd>
<dt>{{.i18n.Tr "admin.config.require_sign_in_view"}}</dt>
<dd><i class="fa fa{{if .Service.RequireSignInView}}-check{{end}}-square-o"></i></dd>
<dt>{{.i18n.Tr "admin.config.mail_notify"}}</dt>
<dd><i class="fa fa{{if .Service.EnableNotifyMail}}-check{{end}}-square-o"></i></dd>
{{/*<dt>{{.i18n.Tr "admin.config.disable_key_size_check"}}</dt>
<dd><i class="fa fa{{if .Service.DisableMinimumKeySizeCheck}}-check{{end}}-square-o"></i></dd>*/}}
<dt>{{.i18n.Tr "admin.config.enable_captcha"}}</dt>
<dd><i class="fa fa{{if .Service.EnableCaptcha}}-check{{end}}-square-o"></i></dd>
<dt>{{.i18n.Tr "admin.config.default_keep_email_private"}}</dt>
<dd><i class="fa fa{{if .Service.DefaultKeepEmailPrivate}}-check{{end}}-square-o"></i></dd>
<dt>{{.i18n.Tr "admin.config.default_allow_create_organization"}}</dt>
<dd><i class="fa fa{{if .Service.DefaultAllowCreateOrganization}}-check{{end}}-square-o"></i></dd>
<dt>{{.i18n.Tr "admin.config.enable_timetracking"}}</dt>
<dd><i class="fa fa{{if .Service.EnableTimetracking}}-check{{end}}-square-o"></i></dd>
{{if .Service.EnableTimetracking}}
<dt>{{.i18n.Tr "admin.config.default_enable_timetracking"}}</dt>
<dd><i class="fa fa{{if .Service.DefaultEnableTimetracking}}-check{{end}}-square-o"></i></dd>
<dt>{{.i18n.Tr "admin.config.default_allow_only_contributors_to_track_time"}}</dt>
<dd><i class="fa fa{{if .Service.DefaultAllowOnlyContributorsToTrackTime}}-check{{end}}-square-o"></i></dd>
{{end}}
<dt>{{.i18n.Tr "admin.config.default_visibility_organization"}}</dt>
<dd>{{.Service.DefaultOrgVisibility}}</dd>
<dt>{{.i18n.Tr "admin.config.no_reply_address"}}</dt>
<dd>{{if .Service.NoReplyAddress}}{{.Service.NoReplyAddress}}{{else}}-{{end}}</dd>
<dt>{{.i18n.Tr "admin.config.default_enable_dependencies"}}</dt>
<dd><i class="fa fa{{if .Service.DefaultEnableDependencies}}-check{{end}}-square-o"></i></dd>
<div class="ui divider"></div>
<dt>{{.i18n.Tr "admin.config.active_code_lives"}}</dt>
<dd>{{.Service.ActiveCodeLives}} {{.i18n.Tr "tool.raw_minutes"}}</dd>
<dt>{{.i18n.Tr "admin.config.reset_password_code_lives"}}</dt>
<dd>{{.Service.ResetPwdCodeLives}} {{.i18n.Tr "tool.raw_minutes"}}</dd>
</dl>
</div>
<h4 class="ui top attached header">
{{.i18n.Tr "admin.config.webhook_config"}}
</h4>
<div class="ui attached table segment">
<dl class="dl-horizontal admin-dl-horizontal">
<dt>{{.i18n.Tr "admin.config.queue_length"}}</dt>
<dd>{{.Webhook.QueueLength}}</dd>
<dt>{{.i18n.Tr "admin.config.deliver_timeout"}}</dt>
<dd>{{.Webhook.DeliverTimeout}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
<dt>{{.i18n.Tr "admin.config.skip_tls_verify"}}</dt>
<dd><i class="fa fa{{if .Webhook.SkipTLSVerify}}-check{{end}}-square-o"></i></dd>
</dl>
</div>
<h4 class="ui top attached header">
{{.i18n.Tr "admin.config.mailer_config"}}
</h4>
<div class="ui attached table segment">
<dl class="dl-horizontal admin-dl-horizontal">
<dt>{{.i18n.Tr "admin.config.mailer_enabled"}}</dt>
<dd><i class="fa fa{{if .MailerEnabled}}-check{{end}}-square-o"></i></dd>
{{if .MailerEnabled}}
<dt>{{.i18n.Tr "admin.config.mailer_name"}}</dt>
<dd>{{.Mailer.Name}}</dd>
{{if eq .Mailer.MailerType "smtp"}}
<dt>{{.i18n.Tr "admin.config.mailer_disable_helo"}}</dt>
<dd><i class="fa fa{{if .Mailer.DisableHelo}}-check{{end}}-square-o"></i></dd>
<dt>{{.i18n.Tr "admin.config.mailer_host"}}</dt>
<dd>{{.Mailer.Host}}</dd>
{{else if eq .Mailer.MailerType "sendmail"}}
<dt>{{.i18n.Tr "admin.config.mailer_use_sendmail"}}</dt>
<dd><i class="fa fa-check-square-o"></i></dd>
<dt>{{.i18n.Tr "admin.config.mailer_sendmail_path"}}</dt>
<dd>{{.Mailer.SendmailPath}}</dd>
<dt>{{.i18n.Tr "admin.config.mailer_sendmail_args"}}</dt>
<dd>{{.Mailer.SendmailArgs}}</dd>
<dt>{{.i18n.Tr "admin.config.mailer_sendmail_timeout"}}</dt>
<dd>{{.Mailer.SendmailTimeout}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
{{end}}
<dt>{{.i18n.Tr "admin.config.mailer_user"}}</dt>
<dd>{{if .Mailer.User}}{{.Mailer.User}}{{else}}(empty){{end}}</dd><br>
<form class="ui form ignore-dirty" action="{{AppSubUrl}}/admin/config/test_mail" method="post">
{{.CsrfTokenHtml}}
<div class="inline field ui left">
<div class="ui input">
<input type="email" name="email" required>
</div>
</div>
<button class="ui green button" id="test-mail-btn">{{.i18n.Tr "admin.config.send_test_mail"}}</button>
</form>
{{end}}
</dl>
</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>
{{if eq .CacheAdapter "memory"}}
<dt>{{.i18n.Tr "admin.config.cache_interval"}}</dt>
<dd>{{.CacheInterval}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
{{end}}
{{if .CacheConn}}
<dt>{{.i18n.Tr "admin.config.cache_conn"}}</dt>
<dd><code>{{.CacheConn}}</code></dd>
<dt>{{.i18n.Tr "admin.config.cache_item_ttl"}}</dt>
<dd><code>{{.CacheItemTTL}}</code></dd>
{{end}}
</dl>
</div>
<h4 class="ui top attached header">
{{.i18n.Tr "admin.config.session_config"}}
</h4>
<div class="ui attached table segment">
<dl class="dl-horizontal admin-dl-horizontal">
<dt>{{.i18n.Tr "admin.config.session_provider"}}</dt>
<dd>{{.SessionConfig.Provider}}</dd>
<dt>{{.i18n.Tr "admin.config.provider_config"}}</dt>
<dd><code>{{if .SessionConfig.ProviderConfig}}{{.SessionConfig.ProviderConfig}}{{else}}-{{end}}</code></dd>
<dt>{{.i18n.Tr "admin.config.cookie_name"}}</dt>
<dd>{{.SessionConfig.CookieName}}</dd>
<dt>{{.i18n.Tr "admin.config.gc_interval_time"}}</dt>
<dd>{{.SessionConfig.Gclifetime}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
<dt>{{.i18n.Tr "admin.config.session_life_time"}}</dt>
<dd>{{.SessionConfig.Maxlifetime}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
<dt>{{.i18n.Tr "admin.config.https_only"}}</dt>
<dd><i class="fa fa{{if .SessionConfig.Secure}}-check{{end}}-square-o"></i></dd>
</dl>
</div>
<h4 class="ui top attached header">
{{.i18n.Tr "admin.config.picture_config"}}
</h4>
<div class="ui attached table segment">
<dl class="dl-horizontal admin-dl-horizontal">
<dt>{{.i18n.Tr "admin.config.disable_gravatar"}}</dt>
<dd><i class="fa fa{{if .DisableGravatar}}-check{{end}}-square-o"></i></dd>
<div class="ui divider"></div>
<dt>{{.i18n.Tr "admin.config.enable_federated_avatar"}}</dt>
<dd><i class="fa fa{{if .EnableFederatedAvatar}}-check{{end}}-square-o"></i></dd>
</dl>
</div>
2016-08-10 18:01:42 +00:00
<h4 class="ui top attached header">
{{.i18n.Tr "admin.config.git_config"}}
</h4>
<div class="ui attached table segment">
<dl class="dl-horizontal admin-dl-horizontal">
<dt>{{.i18n.Tr "admin.config.git_disable_diff_highlight"}}</dt>
<dd><i class="fa fa{{if .Git.DisableDiffHighlight}}-check{{end}}-square-o"></i></dd>
<dt>{{.i18n.Tr "admin.config.git_max_diff_lines"}}</dt>
<dd>{{.Git.MaxGitDiffLines}}</dd>
<dt>{{.i18n.Tr "admin.config.git_max_diff_line_characters"}}</dt>
<dd>{{.Git.MaxGitDiffLineCharacters}}</dd>
<dt>{{.i18n.Tr "admin.config.git_max_diff_files"}}</dt>
<dd>{{.Git.MaxGitDiffFiles}}</dd>
<dt>{{.i18n.Tr "admin.config.git_gc_args"}}</dt>
<dd><code>{{.Git.GCArgs}}</code></dd>
<div class="ui divider"></div>
<dt>{{.i18n.Tr "admin.config.git_migrate_timeout"}}</dt>
<dd>{{.Git.Timeout.Migrate}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
<dt>{{.i18n.Tr "admin.config.git_mirror_timeout"}}</dt>
<dd>{{.Git.Timeout.Mirror}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
<dt>{{.i18n.Tr "admin.config.git_clone_timeout"}}</dt>
<dd>{{.Git.Timeout.Clone}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
<dt>{{.i18n.Tr "admin.config.git_pull_timeout"}}</dt>
<dd>{{.Git.Timeout.Pull}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
<dt>{{.i18n.Tr "admin.config.git_gc_timeout"}}</dt>
<dd>{{.Git.Timeout.GC}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
</dl>
</div>
<h4 class="ui top attached header">
{{.i18n.Tr "admin.config.log_config"}}
</h4>
<div class="ui attached table segment">
<dl class="dl-horizontal admin-dl-horizontal">
Better logging (#6038) (#6095) * Panic don't fatal on create new logger Fixes #5854 Signed-off-by: Andrew Thornton <art27@cantab.net> * partial broken * Update the logging infrastrcture Signed-off-by: Andrew Thornton <art27@cantab.net> * Reset the skip levels for Fatal and Error Signed-off-by: Andrew Thornton <art27@cantab.net> * broken ncsa * More log.Error fixes Signed-off-by: Andrew Thornton <art27@cantab.net> * Remove nal * set log-levels to lowercase * Make console_test test all levels * switch to lowercased levels * OK now working * Fix vetting issues * Fix lint * Fix tests * change default logging to match current gitea * Improve log testing Signed-off-by: Andrew Thornton <art27@cantab.net> * reset error skip levels to 0 * Update documentation and access logger configuration * Redirect the router log back to gitea if redirect macaron log but also allow setting the log level - i.e. TRACE * Fix broken level caching * Refactor the router log * Add Router logger * Add colorizing options * Adjust router colors * Only create logger if they will be used * update app.ini.sample * rename Attribute ColorAttribute * Change from white to green for function * Set fatal/error levels * Restore initial trace logger * Fix Trace arguments in modules/auth/auth.go * Properly handle XORMLogger * Improve admin/config page * fix fmt * Add auto-compression of old logs * Update error log levels * Remove the unnecessary skip argument from Error, Fatal and Critical * Add stacktrace support * Fix tests * Remove x/sync from vendors? * Add stderr option to console logger * Use filepath.ToSlash to protect against Windows in tests * Remove prefixed underscores from names in colors.go * Remove not implemented database logger This was removed from Gogs on 4 Mar 2016 but left in the configuration since then. * Ensure that log paths are relative to ROOT_PATH * use path.Join * rename jsonConfig to logConfig * Rename "config" to "jsonConfig" to make it clearer * Requested changes * Requested changes: XormLogger * Try to color the windows terminal If successful default to colorizing the console logs * fixup * Colorize initially too * update vendor * Colorize logs on default and remove if this is not a colorizing logger * Fix documentation * fix test * Use go-isatty to detect if on windows we are on msys or cygwin * Fix spelling mistake * Add missing vendors * More changes * Rationalise the ANSI writer protection * Adjust colors on advice from @0x5c * Make Flags a comma separated list * Move to use the windows constant for ENABLE_VIRTUAL_TERMINAL_PROCESSING * Ensure matching is done on the non-colored message - to simpify EXPRESSION
2019-04-02 07:48:31 +00:00
{{range .Loggers.default.SubLogDescriptions}}
<dt>{{$.i18n.Tr "admin.config.log_mode"}}</dt>
Better logging (#6038) (#6095) * Panic don't fatal on create new logger Fixes #5854 Signed-off-by: Andrew Thornton <art27@cantab.net> * partial broken * Update the logging infrastrcture Signed-off-by: Andrew Thornton <art27@cantab.net> * Reset the skip levels for Fatal and Error Signed-off-by: Andrew Thornton <art27@cantab.net> * broken ncsa * More log.Error fixes Signed-off-by: Andrew Thornton <art27@cantab.net> * Remove nal * set log-levels to lowercase * Make console_test test all levels * switch to lowercased levels * OK now working * Fix vetting issues * Fix lint * Fix tests * change default logging to match current gitea * Improve log testing Signed-off-by: Andrew Thornton <art27@cantab.net> * reset error skip levels to 0 * Update documentation and access logger configuration * Redirect the router log back to gitea if redirect macaron log but also allow setting the log level - i.e. TRACE * Fix broken level caching * Refactor the router log * Add Router logger * Add colorizing options * Adjust router colors * Only create logger if they will be used * update app.ini.sample * rename Attribute ColorAttribute * Change from white to green for function * Set fatal/error levels * Restore initial trace logger * Fix Trace arguments in modules/auth/auth.go * Properly handle XORMLogger * Improve admin/config page * fix fmt * Add auto-compression of old logs * Update error log levels * Remove the unnecessary skip argument from Error, Fatal and Critical * Add stacktrace support * Fix tests * Remove x/sync from vendors? * Add stderr option to console logger * Use filepath.ToSlash to protect against Windows in tests * Remove prefixed underscores from names in colors.go * Remove not implemented database logger This was removed from Gogs on 4 Mar 2016 but left in the configuration since then. * Ensure that log paths are relative to ROOT_PATH * use path.Join * rename jsonConfig to logConfig * Rename "config" to "jsonConfig" to make it clearer * Requested changes * Requested changes: XormLogger * Try to color the windows terminal If successful default to colorizing the console logs * fixup * Colorize initially too * update vendor * Colorize logs on default and remove if this is not a colorizing logger * Fix documentation * fix test * Use go-isatty to detect if on windows we are on msys or cygwin * Fix spelling mistake * Add missing vendors * More changes * Rationalise the ANSI writer protection * Adjust colors on advice from @0x5c * Make Flags a comma separated list * Move to use the windows constant for ENABLE_VIRTUAL_TERMINAL_PROCESSING * Ensure matching is done on the non-colored message - to simpify EXPRESSION
2019-04-02 07:48:31 +00:00
<dd>{{.Name}} ({{.Provider}})</dd>
<dt>{{$.i18n.Tr "admin.config.log_config"}}</dt>
<dd><pre>{{.Config | JsonPrettyPrint}}</pre></dd>
{{end}}
Better logging (#6038) (#6095) * Panic don't fatal on create new logger Fixes #5854 Signed-off-by: Andrew Thornton <art27@cantab.net> * partial broken * Update the logging infrastrcture Signed-off-by: Andrew Thornton <art27@cantab.net> * Reset the skip levels for Fatal and Error Signed-off-by: Andrew Thornton <art27@cantab.net> * broken ncsa * More log.Error fixes Signed-off-by: Andrew Thornton <art27@cantab.net> * Remove nal * set log-levels to lowercase * Make console_test test all levels * switch to lowercased levels * OK now working * Fix vetting issues * Fix lint * Fix tests * change default logging to match current gitea * Improve log testing Signed-off-by: Andrew Thornton <art27@cantab.net> * reset error skip levels to 0 * Update documentation and access logger configuration * Redirect the router log back to gitea if redirect macaron log but also allow setting the log level - i.e. TRACE * Fix broken level caching * Refactor the router log * Add Router logger * Add colorizing options * Adjust router colors * Only create logger if they will be used * update app.ini.sample * rename Attribute ColorAttribute * Change from white to green for function * Set fatal/error levels * Restore initial trace logger * Fix Trace arguments in modules/auth/auth.go * Properly handle XORMLogger * Improve admin/config page * fix fmt * Add auto-compression of old logs * Update error log levels * Remove the unnecessary skip argument from Error, Fatal and Critical * Add stacktrace support * Fix tests * Remove x/sync from vendors? * Add stderr option to console logger * Use filepath.ToSlash to protect against Windows in tests * Remove prefixed underscores from names in colors.go * Remove not implemented database logger This was removed from Gogs on 4 Mar 2016 but left in the configuration since then. * Ensure that log paths are relative to ROOT_PATH * use path.Join * rename jsonConfig to logConfig * Rename "config" to "jsonConfig" to make it clearer * Requested changes * Requested changes: XormLogger * Try to color the windows terminal If successful default to colorizing the console logs * fixup * Colorize initially too * update vendor * Colorize logs on default and remove if this is not a colorizing logger * Fix documentation * fix test * Use go-isatty to detect if on windows we are on msys or cygwin * Fix spelling mistake * Add missing vendors * More changes * Rationalise the ANSI writer protection * Adjust colors on advice from @0x5c * Make Flags a comma separated list * Move to use the windows constant for ENABLE_VIRTUAL_TERMINAL_PROCESSING * Ensure matching is done on the non-colored message - to simpify EXPRESSION
2019-04-02 07:48:31 +00:00
<div class="ui divider"></div>
<dt>{{$.i18n.Tr "admin.config.macaron_log_mode"}}</dt>
{{if .RedirectMacaronLog}}
{{if .Loggers.macaron.SubLogDescriptions}}
<dd>{{$.i18n.Tr "admin.config.own_named_logger"}}</dd>
{{range .Loggers.macaron.SubLogDescriptions}}
<dt>{{$.i18n.Tr "admin.config.log_mode"}}</dt>
<dd>{{.Name}} ({{.Provider}})</dd>
<dt>{{$.i18n.Tr "admin.config.log_config"}}</dt>
<dd><pre>{{.Config | JsonPrettyPrint}}</pre></dd>
{{end}}
{{else}}
<dd>{{$.i18n.Tr "admin.config.routes_to_default_logger"}}</dd>
{{end}}
{{else}}
<dd>{{$.i18n.Tr "admin.config.go_log"}}</dd>
{{end}}
<div class="ui divider"></div>
<dt>{{$.i18n.Tr "admin.config.router_log_mode"}}</dt>
{{if .DisableRouterLog}}
<dd>{{$.i18n.Tr "admin.config.disabled_logger"}}</dd>
{{else}}
{{if .RedirectMacaronLog}}
{{if .Loggers.router.SubLogDescriptions}}
<dd>{{$.i18n.Tr "admin.config.own_named_logger"}}</dd>
{{range .Loggers.router.SubLogDescriptions}}
<dt>{{$.i18n.Tr "admin.config.log_mode"}}</dt>
<dd>{{.Name}} ({{.Provider}})</dd>
<dt>{{$.i18n.Tr "admin.config.log_config"}}</dt>
<dd><pre>{{.Config | JsonPrettyPrint}}</pre></dd>
{{end}}
{{else}}
<dd>{{$.i18n.Tr "admin.config.routes_to_default_logger"}}</dd>
{{end}}
{{else}}
<dd>{{$.i18n.Tr "admin.config.go_log"}}</dd>
{{end}}
{{end}}
<div class="ui divider"></div>
<dt>{{$.i18n.Tr "admin.config.access_log_mode"}}</dt>
{{if .EnableAccessLog}}
{{if .Loggers.access.SubLogDescriptions}}
<dd>{{$.i18n.Tr "admin.config.own_named_logger"}}</dd>
{{range .Loggers.access.SubLogDescriptions}}
<dt>{{$.i18n.Tr "admin.config.log_mode"}}</dt>
<dd>{{.Name}} ({{.Provider}})</dd>
<dt>{{$.i18n.Tr "admin.config.log_config"}}</dt>
<dd><pre>{{.Config | JsonPrettyPrint}}</pre></dd>
{{end}}
{{else}}
<dd>{{$.i18n.Tr "admin.config.routes_to_default_logger"}}</dd>
{{end}}
<dt>{{$.i18n.Tr "admin.config.access_log_template"}}</dt>
<dd><code>{{$.AccessLogTemplate}}</code></dd>
{{else}}
<dd>{{$.i18n.Tr "admin.config.disabled_logger"}}</dd>
{{end}}
<div class="ui divider"></div>
<dt>{{$.i18n.Tr "admin.config.xorm_log_mode"}}</dt>
{{if .EnableXORMLog}}
{{if .Loggers.xorm.SubLogDescriptions}}
<dd>{{$.i18n.Tr "admin.config.own_named_logger"}}</dd>
{{range .Loggers.xorm.SubLogDescriptions}}
<dt>{{$.i18n.Tr "admin.config.log_mode"}}</dt>
<dd>{{.Name}} ({{.Provider}})</dd>
<dt>{{$.i18n.Tr "admin.config.log_config"}}</dt>
<dd><pre>{{.Config | JsonPrettyPrint}}</pre></dd>
{{end}}
{{else}}
<dd>{{$.i18n.Tr "admin.config.routes_to_default_logger"}}</dd>
{{end}}
<dt>{{$.i18n.Tr "admin.config.xorm_log_sql"}}</dt>
<dd><i class="fa fa{{if $.LogSQL}}-check{{end}}-square-o"></i></dd>
{{else}}
<dd>{{$.i18n.Tr "admin.config.disabled_logger"}}</dd>
{{end}}
</dl>
</div>
</div>
2014-03-21 05:48:10 +00:00
</div>
{{template "base/footer" .}}