2023-04-23 15:51:21 +05:30
|
|
|
{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin config")}}
|
|
|
|
<div class="admin-setting-content">
|
2017-03-16 04:09:38 +05:30
|
|
|
<h4 class="ui top attached header">
|
2023-09-25 14:26:50 +05:30
|
|
|
{{ctx.Locale.Tr "admin.config.server_config"}}
|
2017-03-16 04:09:38 +05:30
|
|
|
</h4>
|
|
|
|
<div class="ui attached table segment">
|
2023-06-27 14:44:45 +05:30
|
|
|
<dl class="admin-dl-horizontal">
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.app_name"}}</dt>
|
2017-03-16 04:09:38 +05:30
|
|
|
<dd>{{AppName}}</dd>
|
2024-06-07 22:42:48 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.app_slogan"}}</dt>
|
|
|
|
<dd>{{AppSlogan}}</dd>
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.app_ver"}}</dt>
|
2023-04-07 13:01:41 +05:30
|
|
|
<dd>{{AppVer}}{{.AppBuiltWith}}</dd>
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.custom_conf"}}</dt>
|
2017-06-22 18:51:56 +05:30
|
|
|
<dd>{{.CustomConf}}</dd>
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.app_url"}}</dt>
|
2017-03-16 04:09:38 +05:30
|
|
|
<dd>{{.AppUrl}}</dd>
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.domain"}}</dt>
|
2017-03-16 04:09:38 +05:30
|
|
|
<dd>{{.Domain}}</dd>
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.offline_mode"}}</dt>
|
2020-12-10 00:33:19 +05:30
|
|
|
<dd>{{if .OfflineMode}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd>
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.disable_router_log"}}</dt>
|
2020-12-10 00:33:19 +05:30
|
|
|
<dd>{{if .DisableRouterLog}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd>
|
2016-02-28 07:18:39 +05:30
|
|
|
|
2023-06-29 17:54:22 +05:30
|
|
|
<div class="divider"></div>
|
2016-02-28 07:18:39 +05:30
|
|
|
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.run_user"}}</dt>
|
2017-03-16 04:09:38 +05:30
|
|
|
<dd>{{.RunUser}}</dd>
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.run_mode"}}</dt>
|
2017-03-16 04:09:38 +05:30
|
|
|
<dd>{{.RunMode}}</dd>
|
2016-02-28 07:18:39 +05:30
|
|
|
|
2023-06-29 17:54:22 +05:30
|
|
|
<div class="divider"></div>
|
2016-02-28 07:18:39 +05:30
|
|
|
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.git_version"}}</dt>
|
2017-03-16 04:09:38 +05:30
|
|
|
<dd>{{.GitVersion}}</dd>
|
2017-02-13 17:19:42 +05:30
|
|
|
|
2023-06-29 17:54:22 +05:30
|
|
|
<div class="divider"></div>
|
2017-02-13 17:19:42 +05:30
|
|
|
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.app_data_path"}}</dt>
|
2023-07-19 14:52:57 +05:30
|
|
|
<dd>{{.AppDataPath}}</dd>
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.repo_root_path"}}</dt>
|
2017-03-16 04:09:38 +05:30
|
|
|
<dd>{{.RepoRootPath}}</dd>
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.custom_file_root_path"}}</dt>
|
2019-03-20 04:10:13 +05:30
|
|
|
<dd>{{.CustomRootPath}}</dd>
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.log_file_root_path"}}</dt>
|
2017-03-16 04:09:38 +05:30
|
|
|
<dd>{{.LogRootPath}}</dd>
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.script_type"}}</dt>
|
2017-03-16 04:09:38 +05:30
|
|
|
<dd>{{.ScriptType}}</dd>
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.reverse_auth_user"}}</dt>
|
2017-03-16 04:09:38 +05:30
|
|
|
<dd>{{.ReverseProxyAuthUser}}</dd>
|
|
|
|
</dl>
|
|
|
|
</div>
|
2015-12-08 04:00:52 +05:30
|
|
|
|
2017-03-16 04:09:38 +05:30
|
|
|
<h4 class="ui top attached header">
|
2023-09-25 14:26:50 +05:30
|
|
|
{{ctx.Locale.Tr "admin.config.ssh_config"}}
|
2017-03-16 04:09:38 +05:30
|
|
|
</h4>
|
|
|
|
<div class="ui attached table segment">
|
2023-06-27 14:44:45 +05:30
|
|
|
<dl class="admin-dl-horizontal">
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.ssh_enabled"}}</dt>
|
2020-12-10 00:33:19 +05:30
|
|
|
<dd>{{if not .SSH.Disabled}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd>
|
2017-03-16 04:09:38 +05:30
|
|
|
{{if not .SSH.Disabled}}
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.ssh_start_builtin_server"}}</dt>
|
2021-04-14 23:24:54 +05:30
|
|
|
<dd>{{if .SSH.StartBuiltinServer}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd>
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.ssh_domain"}}</dt>
|
2017-03-16 04:09:38 +05:30
|
|
|
<dd>{{.SSH.Domain}}</dd>
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.ssh_port"}}</dt>
|
2017-03-16 04:09:38 +05:30
|
|
|
<dd>{{.SSH.Port}}</dd>
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.ssh_listen_port"}}</dt>
|
2017-03-16 04:09:38 +05:30
|
|
|
<dd>{{.SSH.ListenPort}}</dd>
|
2016-02-28 07:18:39 +05:30
|
|
|
|
2017-03-16 04:09:38 +05:30
|
|
|
{{if not .SSH.StartBuiltinServer}}
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.ssh_root_path"}}</dt>
|
2017-03-16 04:09:38 +05:30
|
|
|
<dd>{{.SSH.RootPath}}</dd>
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.ssh_key_test_path"}}</dt>
|
2017-03-16 04:09:38 +05:30
|
|
|
<dd>{{.SSH.KeyTestPath}}</dd>
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.ssh_keygen_path"}}</dt>
|
2017-03-16 04:09:38 +05:30
|
|
|
<dd>{{.SSH.KeygenPath}}</dd>
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.ssh_minimum_key_size_check"}}</dt>
|
2020-12-10 00:33:19 +05:30
|
|
|
<dd>{{if .SSH.MinimumKeySizeCheck}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd>
|
2017-03-16 04:09:38 +05:30
|
|
|
{{if .SSH.MinimumKeySizeCheck}}
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.ssh_minimum_key_sizes"}}</dt>
|
2019-08-26 16:17:41 +05:30
|
|
|
<dd>{{.SSH.MinimumKeySizes}}</dd>
|
2016-02-28 07:18:39 +05:30
|
|
|
{{end}}
|
2017-03-16 04:09:38 +05:30
|
|
|
{{end}}
|
|
|
|
{{end}}
|
|
|
|
</dl>
|
|
|
|
</div>
|
2016-02-28 07:18:39 +05:30
|
|
|
|
2019-06-16 23:54:49 +05:30
|
|
|
<h4 class="ui top attached header">
|
2023-09-25 14:26:50 +05:30
|
|
|
{{ctx.Locale.Tr "admin.config.lfs_config"}}
|
2019-06-16 23:54:49 +05:30
|
|
|
</h4>
|
|
|
|
<div class="ui attached table segment">
|
2023-06-27 14:44:45 +05:30
|
|
|
<dl class="admin-dl-horizontal">
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.lfs_enabled"}}</dt>
|
2020-12-10 00:33:19 +05:30
|
|
|
<dd>{{if .LFS.StartServer}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd>
|
2019-06-16 23:54:49 +05:30
|
|
|
{{if .LFS.StartServer}}
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.lfs_content_path"}}</dt>
|
2023-06-14 09:12:38 +05:30
|
|
|
<dd>{{JsonUtils.EncodeToString .LFS.Storage.ToShadowCopy}}</dd>
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.lfs_http_auth_expiry"}}</dt>
|
2019-06-16 23:54:49 +05:30
|
|
|
<dd>{{.LFS.HTTPAuthExpiry}}</dd>
|
|
|
|
{{end}}
|
|
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
|
2017-03-16 04:09:38 +05:30
|
|
|
<h4 class="ui top attached header">
|
2023-09-25 14:26:50 +05:30
|
|
|
{{ctx.Locale.Tr "admin.config.db_config"}}
|
2017-03-16 04:09:38 +05:30
|
|
|
</h4>
|
|
|
|
<div class="ui attached table segment">
|
2023-06-27 14:44:45 +05:30
|
|
|
<dl class="admin-dl-horizontal">
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.db_type"}}</dt>
|
2017-03-16 04:09:38 +05:30
|
|
|
<dd>{{.DbCfg.Type}}</dd>
|
2021-12-07 11:14:08 +05:30
|
|
|
{{if not (eq .DbCfg.Type "sqlite3")}}
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.db_host"}}</dt>
|
2019-08-26 16:17:41 +05:30
|
|
|
<dd>{{if .DbCfg.Host}}{{.DbCfg.Host}}{{else}}-{{end}}</dd>
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.db_name"}}</dt>
|
2019-08-26 16:17:41 +05:30
|
|
|
<dd>{{if .DbCfg.Name}}{{.DbCfg.Name}}{{else}}-{{end}}</dd>
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.db_user"}}</dt>
|
2019-08-26 16:17:41 +05:30
|
|
|
<dd>{{if .DbCfg.User}}{{.DbCfg.User}}{{else}}-{{end}}</dd>
|
2018-06-07 04:43:42 +05:30
|
|
|
{{end}}
|
|
|
|
{{if eq .DbCfg.Type "postgres"}}
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.db_schema"}}</dt>
|
2020-01-20 21:15:14 +05:30
|
|
|
<dd>{{if .DbCfg.Schema}}{{.DbCfg.Schema}}{{else}}-{{end}}</dd>
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.db_ssl_mode"}}</dt>
|
2019-08-26 16:17:41 +05:30
|
|
|
<dd>{{if .DbCfg.SSLMode}}{{.DbCfg.SSLMode}}{{else}}-{{end}}</dd>
|
2018-06-07 04:43:42 +05:30
|
|
|
{{end}}
|
2021-12-07 11:14:08 +05:30
|
|
|
{{if eq .DbCfg.Type "sqlite3"}}
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.db_path"}}</dt>
|
2019-08-26 16:17:41 +05:30
|
|
|
<dd>{{if .DbCfg.Path}}{{.DbCfg.Path}}{{else}}-{{end}}</dd>
|
2018-06-07 04:43:42 +05:30
|
|
|
{{end}}
|
2017-03-16 04:09:38 +05:30
|
|
|
</dl>
|
|
|
|
</div>
|
2015-12-08 04:00:52 +05:30
|
|
|
|
2017-03-16 04:09:38 +05:30
|
|
|
<h4 class="ui top attached header">
|
2023-09-25 14:26:50 +05:30
|
|
|
{{ctx.Locale.Tr "admin.config.service_config"}}
|
2017-03-16 04:09:38 +05:30
|
|
|
</h4>
|
|
|
|
<div class="ui attached table segment">
|
2023-06-27 14:44:45 +05:30
|
|
|
<dl class="admin-dl-horizontal">
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.register_email_confirm"}}</dt>
|
2020-12-10 00:33:19 +05:30
|
|
|
<dd>{{if .Service.RegisterEmailConfirm}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd>
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.disable_register"}}</dt>
|
2020-12-10 00:33:19 +05:30
|
|
|
<dd>{{if .Service.DisableRegistration}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd>
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.allow_only_internal_registration"}}</dt>
|
2021-05-09 19:43:35 +05:30
|
|
|
<dd>{{if .Service.AllowOnlyInternalRegistration}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd>
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.allow_only_external_registration"}}</dt>
|
2020-12-10 00:33:19 +05:30
|
|
|
<dd>{{if .Service.AllowOnlyExternalRegistration}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd>
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.show_registration_button"}}</dt>
|
2020-12-10 00:33:19 +05:30
|
|
|
<dd>{{if .Service.ShowRegistrationButton}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd>
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.enable_openid_signup"}}</dt>
|
2020-12-10 00:33:19 +05:30
|
|
|
<dd>{{if .Service.EnableOpenIDSignUp}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd>
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.enable_openid_signin"}}</dt>
|
2020-12-10 00:33:19 +05:30
|
|
|
<dd>{{if .Service.EnableOpenIDSignIn}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd>
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.require_sign_in_view"}}</dt>
|
2020-12-10 00:33:19 +05:30
|
|
|
<dd>{{if .Service.RequireSignInView}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd>
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.mail_notify"}}</dt>
|
2020-12-10 00:33:19 +05:30
|
|
|
<dd>{{if .Service.EnableNotifyMail}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd>
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.enable_captcha"}}</dt>
|
2020-12-10 00:33:19 +05:30
|
|
|
<dd>{{if .Service.EnableCaptcha}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd>
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.default_keep_email_private"}}</dt>
|
2020-12-10 00:33:19 +05:30
|
|
|
<dd>{{if .Service.DefaultKeepEmailPrivate}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd>
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.default_allow_create_organization"}}</dt>
|
2020-12-10 00:33:19 +05:30
|
|
|
<dd>{{if .Service.DefaultAllowCreateOrganization}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd>
|
2023-06-12 17:27:01 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.allow_dots_in_usernames"}}</dt>
|
|
|
|
<dd>{{if .Service.AllowDotsInUsernames}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd>
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.enable_timetracking"}}</dt>
|
2020-12-10 00:33:19 +05:30
|
|
|
<dd>{{if .Service.EnableTimetracking}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd>
|
2018-04-09 20:45:32 +05:30
|
|
|
{{if .Service.EnableTimetracking}}
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.default_enable_timetracking"}}</dt>
|
2020-12-10 00:33:19 +05:30
|
|
|
<dd>{{if .Service.DefaultEnableTimetracking}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd>
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.default_allow_only_contributors_to_track_time"}}</dt>
|
2022-12-11 09:36:12 +05:30
|
|
|
<dd>{{if .Service.DefaultAllowOnlyContributorsToTrackTime}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd>
|
2018-04-09 20:45:32 +05:30
|
|
|
{{end}}
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.default_visibility_organization"}}</dt>
|
2019-02-18 21:30:27 +05:30
|
|
|
<dd>{{.Service.DefaultOrgVisibility}}</dd>
|
|
|
|
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.no_reply_address"}}</dt>
|
2017-03-16 04:09:38 +05:30
|
|
|
<dd>{{if .Service.NoReplyAddress}}{{.Service.NoReplyAddress}}{{else}}-{{end}}</dd>
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.default_enable_dependencies"}}</dt>
|
2020-12-10 00:33:19 +05:30
|
|
|
<dd>{{if .Service.DefaultEnableDependencies}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd>
|
2023-06-29 17:54:22 +05:30
|
|
|
<div class="divider"></div>
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.active_code_lives"}}</dt>
|
|
|
|
<dd>{{.Service.ActiveCodeLives}} {{ctx.Locale.Tr "tool.raw_minutes"}}</dd>
|
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.reset_password_code_lives"}}</dt>
|
|
|
|
<dd>{{.Service.ResetPwdCodeLives}} {{ctx.Locale.Tr "tool.raw_minutes"}}</dd>
|
2017-03-16 04:09:38 +05:30
|
|
|
</dl>
|
|
|
|
</div>
|
2015-12-08 04:00:52 +05:30
|
|
|
|
2017-03-16 04:09:38 +05:30
|
|
|
<h4 class="ui top attached header">
|
2023-09-25 14:26:50 +05:30
|
|
|
{{ctx.Locale.Tr "admin.config.webhook_config"}}
|
2017-03-16 04:09:38 +05:30
|
|
|
</h4>
|
|
|
|
<div class="ui attached table segment">
|
2023-06-27 14:44:45 +05:30
|
|
|
<dl class="admin-dl-horizontal">
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.queue_length"}}</dt>
|
2017-03-16 04:09:38 +05:30
|
|
|
<dd>{{.Webhook.QueueLength}}</dd>
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.deliver_timeout"}}</dt>
|
|
|
|
<dd>{{.Webhook.DeliverTimeout}} {{ctx.Locale.Tr "tool.raw_seconds"}}</dd>
|
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.skip_tls_verify"}}</dt>
|
2020-12-10 00:33:19 +05:30
|
|
|
<dd>{{if .Webhook.SkipTLSVerify}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd>
|
2017-03-16 04:09:38 +05:30
|
|
|
</dl>
|
|
|
|
</div>
|
2015-12-08 04:00:52 +05:30
|
|
|
|
2017-03-16 04:09:38 +05:30
|
|
|
<h4 class="ui top attached header">
|
2023-09-25 14:26:50 +05:30
|
|
|
{{ctx.Locale.Tr "admin.config.mailer_config"}}
|
2017-03-16 04:09:38 +05:30
|
|
|
</h4>
|
|
|
|
<div class="ui attached table segment">
|
2023-06-27 14:44:45 +05:30
|
|
|
<dl class="admin-dl-horizontal">
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.mailer_enabled"}}</dt>
|
2020-12-10 00:33:19 +05:30
|
|
|
<dd>{{if .MailerEnabled}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd>
|
2017-03-16 04:09:38 +05:30
|
|
|
{{if .MailerEnabled}}
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.mailer_name"}}</dt>
|
2017-03-16 04:09:38 +05:30
|
|
|
<dd>{{.Mailer.Name}}</dd>
|
2022-08-02 22:13:27 +05:30
|
|
|
{{if eq .Mailer.Protocol "sendmail"}}
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.mailer_use_sendmail"}}</dt>
|
2020-12-10 00:33:19 +05:30
|
|
|
<dd>{{svg "octicon-check"}}</dd>
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.mailer_sendmail_path"}}</dt>
|
2017-10-26 14:17:16 +05:30
|
|
|
<dd>{{.Mailer.SendmailPath}}</dd>
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.mailer_sendmail_args"}}</dt>
|
2017-10-26 14:17:16 +05:30
|
|
|
<dd>{{.Mailer.SendmailArgs}}</dd>
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.mailer_sendmail_timeout"}}</dt>
|
|
|
|
<dd>{{.Mailer.SendmailTimeout}} {{ctx.Locale.Tr "tool.raw_seconds"}}</dd>
|
2022-08-02 22:13:27 +05:30
|
|
|
{{else if eq .Mailer.Protocol "dummy"}}
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.mailer_use_dummy"}}</dt>
|
2022-08-02 22:13:27 +05:30
|
|
|
<dd>{{svg "octicon-check"}}</dd>
|
|
|
|
{{else}}{{/* SMTP family */}}
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.mailer_protocol"}}</dt>
|
2022-08-02 22:13:27 +05:30
|
|
|
<dd>{{.Mailer.Protocol}}</dd>
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.mailer_enable_helo"}}</dt>
|
2022-08-02 22:13:27 +05:30
|
|
|
<dd>{{if .Mailer.EnableHelo}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd>
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.mailer_smtp_addr"}}</dt>
|
2022-08-02 22:13:27 +05:30
|
|
|
<dd>{{.Mailer.SMTPAddr}}</dd>
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.mailer_smtp_port"}}</dt>
|
2022-08-02 22:13:27 +05:30
|
|
|
<dd>{{.Mailer.SMTPPort}}</dd>
|
2017-10-26 14:17:16 +05:30
|
|
|
{{end}}
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.mailer_user"}}</dt>
|
2023-04-28 07:18:41 +05:30
|
|
|
<dd>{{if .Mailer.User}}{{.Mailer.User}}{{else}}(empty){{end}}</dd>
|
2023-06-29 17:54:22 +05:30
|
|
|
<div class="divider"></div>
|
Migrate margin and padding helpers to tailwind (#30043)
This will conclude the refactor of 1:1 class replacements to tailwind,
except `gt-hidden`. Commands ran:
```bash
perl -p -i -e 's#gt-(p|m)([lrtbxy])?-0#tw-$1$2-0#g' {web_src/js,templates,routers,services}/**/*
perl -p -i -e 's#gt-(p|m)([lrtbxy])?-1#tw-$1$2-0.5#g' {web_src/js,templates,routers,services}/**/*
perl -p -i -e 's#gt-(p|m)([lrtbxy])?-2#tw-$1$2-1#g' {web_src/js,templates,routers,services}/**/*
perl -p -i -e 's#gt-(p|m)([lrtbxy])?-3#tw-$1$2-2#g' {web_src/js,templates,routers,services}/**/*
perl -p -i -e 's#gt-(p|m)([lrtbxy])?-4#tw-$1$2-4#g' {web_src/js,templates,routers,services}/**/*
perl -p -i -e 's#gt-(p|m)([lrtbxy])?-5#tw-$1$2-8#g' {web_src/js,templates,routers,services}/**/*
```
(cherry picked from commit 68ec9b48592fe88765bcc3a73093d43c98b315de)
Conflicts:
routers/web/repo/view.go
templates/base/head_navbar.tmpl
templates/repo/code/recently_pushed_new_branches.tmpl
templates/repo/diff/box.tmpl
templates/repo/diff/compare.tmpl
templates/repo/diff/conversation.tmpl
templates/repo/header.tmpl
templates/repo/issue/filter_list.tmpl
templates/repo/issue/view_content/conversation.tmpl
templates/repo/issue/view_content/sidebar.tmpl
templates/repo/settings/options.tmpl
templates/repo/view_file.tmpl
templates/shared/user/blocked_users.tmpl
templates/status/500.tmpl
web_src/js/components/DashboardRepoList.vue
resolved by prefering Forgejo version and applying the
commands to all files
2024-03-24 22:12:49 +05:30
|
|
|
<dt class="tw-py-1">{{ctx.Locale.Tr "admin.config.send_test_mail"}}</dt>
|
2023-04-28 07:18:41 +05:30
|
|
|
<dd>
|
|
|
|
<form class="ui form ignore-dirty" action="{{AppSubUrl}}/admin/config/test_mail" method="post">
|
|
|
|
{{.CsrfTokenHtml}}
|
|
|
|
<div class="ui tiny input">
|
2023-09-25 14:26:50 +05:30
|
|
|
<input type="email" name="email" placeholder="{{ctx.Locale.Tr "admin.config.test_email_placeholder"}}" size="29" required>
|
2017-03-16 04:09:38 +05:30
|
|
|
</div>
|
2023-09-25 14:26:50 +05:30
|
|
|
<button class="ui tiny primary button">{{ctx.Locale.Tr "admin.config.send_test_mail_submit"}}</button>
|
2023-04-28 07:18:41 +05:30
|
|
|
</form>
|
|
|
|
</dd>
|
2017-03-16 04:09:38 +05:30
|
|
|
{{end}}
|
|
|
|
</dl>
|
|
|
|
</div>
|
2015-12-08 04:00:52 +05:30
|
|
|
|
2017-03-16 04:09:38 +05:30
|
|
|
<h4 class="ui top attached header">
|
2023-09-25 14:26:50 +05:30
|
|
|
{{ctx.Locale.Tr "admin.config.cache_config"}}
|
2017-03-16 04:09:38 +05:30
|
|
|
</h4>
|
|
|
|
<div class="ui attached table segment">
|
2023-06-27 14:44:45 +05:30
|
|
|
<dl class="admin-dl-horizontal">
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.cache_adapter"}}</dt>
|
2017-03-16 04:09:38 +05:30
|
|
|
<dd>{{.CacheAdapter}}</dd>
|
2019-05-06 20:05:11 +05:30
|
|
|
{{if eq .CacheAdapter "memory"}}
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.cache_interval"}}</dt>
|
|
|
|
<dd>{{.CacheInterval}} {{ctx.Locale.Tr "tool.raw_seconds"}}</dd>
|
2019-05-06 20:05:11 +05:30
|
|
|
{{end}}
|
2017-03-16 04:09:38 +05:30
|
|
|
{{if .CacheConn}}
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.cache_conn"}}</dt>
|
2019-08-26 16:17:41 +05:30
|
|
|
<dd><code>{{.CacheConn}}</code></dd>
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.cache_item_ttl"}}</dt>
|
2019-08-26 16:17:41 +05:30
|
|
|
<dd><code>{{.CacheItemTTL}}</code></dd>
|
2017-03-16 04:09:38 +05:30
|
|
|
{{end}}
|
|
|
|
</dl>
|
|
|
|
</div>
|
2015-12-08 04:00:52 +05:30
|
|
|
|
2017-03-16 04:09:38 +05:30
|
|
|
<h4 class="ui top attached header">
|
2023-09-25 14:26:50 +05:30
|
|
|
{{ctx.Locale.Tr "admin.config.session_config"}}
|
2017-03-16 04:09:38 +05:30
|
|
|
</h4>
|
|
|
|
<div class="ui attached table segment">
|
2023-06-27 14:44:45 +05:30
|
|
|
<dl class="admin-dl-horizontal">
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.session_provider"}}</dt>
|
2017-03-16 04:09:38 +05:30
|
|
|
<dd>{{.SessionConfig.Provider}}</dd>
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.provider_config"}}</dt>
|
2019-11-28 23:05:41 +05:30
|
|
|
<dd><code>{{if .SessionConfig.ProviderConfig}}{{.SessionConfig.ProviderConfig}}{{else}}-{{end}}</code></dd>
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.cookie_name"}}</dt>
|
2017-03-16 04:09:38 +05:30
|
|
|
<dd>{{.SessionConfig.CookieName}}</dd>
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.gc_interval_time"}}</dt>
|
|
|
|
<dd>{{.SessionConfig.Gclifetime}} {{ctx.Locale.Tr "tool.raw_seconds"}}</dd>
|
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.session_life_time"}}</dt>
|
|
|
|
<dd>{{.SessionConfig.Maxlifetime}} {{ctx.Locale.Tr "tool.raw_seconds"}}</dd>
|
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.https_only"}}</dt>
|
2020-12-10 00:33:19 +05:30
|
|
|
<dd>{{if .SessionConfig.Secure}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd>
|
2017-03-16 04:09:38 +05:30
|
|
|
</dl>
|
|
|
|
</div>
|
2015-12-08 04:00:52 +05:30
|
|
|
|
2017-03-16 04:09:38 +05:30
|
|
|
<h4 class="ui top attached header">
|
2023-09-25 14:26:50 +05:30
|
|
|
{{ctx.Locale.Tr "admin.config.git_config"}}
|
2017-03-16 04:09:38 +05:30
|
|
|
</h4>
|
|
|
|
<div class="ui attached table segment">
|
2023-06-27 14:44:45 +05:30
|
|
|
<dl class="admin-dl-horizontal">
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.git_disable_diff_highlight"}}</dt>
|
2020-12-10 00:33:19 +05:30
|
|
|
<dd>{{if .Git.DisableDiffHighlight}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd>
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.git_max_diff_lines"}}</dt>
|
2017-03-16 04:09:38 +05:30
|
|
|
<dd>{{.Git.MaxGitDiffLines}}</dd>
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.git_max_diff_line_characters"}}</dt>
|
2017-03-16 04:09:38 +05:30
|
|
|
<dd>{{.Git.MaxGitDiffLineCharacters}}</dd>
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.git_max_diff_files"}}</dt>
|
2017-03-16 04:09:38 +05:30
|
|
|
<dd>{{.Git.MaxGitDiffFiles}}</dd>
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.git_gc_args"}}</dt>
|
2017-03-16 04:09:38 +05:30
|
|
|
<dd><code>{{.Git.GCArgs}}</code></dd>
|
2023-03-13 13:21:07 +05:30
|
|
|
|
2023-06-29 17:54:22 +05:30
|
|
|
<div class="divider"></div>
|
2023-03-13 13:21:07 +05:30
|
|
|
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.git_migrate_timeout"}}</dt>
|
|
|
|
<dd>{{.Git.Timeout.Migrate}} {{ctx.Locale.Tr "tool.raw_seconds"}}</dd>
|
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.git_mirror_timeout"}}</dt>
|
|
|
|
<dd>{{.Git.Timeout.Mirror}} {{ctx.Locale.Tr "tool.raw_seconds"}}</dd>
|
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.git_clone_timeout"}}</dt>
|
|
|
|
<dd>{{.Git.Timeout.Clone}} {{ctx.Locale.Tr "tool.raw_seconds"}}</dd>
|
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.git_pull_timeout"}}</dt>
|
|
|
|
<dd>{{.Git.Timeout.Pull}} {{ctx.Locale.Tr "tool.raw_seconds"}}</dd>
|
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.git_gc_timeout"}}</dt>
|
|
|
|
<dd>{{.Git.Timeout.GC}} {{ctx.Locale.Tr "tool.raw_seconds"}}</dd>
|
2017-03-16 04:09:38 +05:30
|
|
|
</dl>
|
|
|
|
</div>
|
2015-12-08 04:00:52 +05:30
|
|
|
|
2017-03-16 04:09:38 +05:30
|
|
|
<h4 class="ui top attached header">
|
2023-09-25 14:26:50 +05:30
|
|
|
{{ctx.Locale.Tr "admin.config.log_config"}}
|
2017-03-16 04:09:38 +05:30
|
|
|
</h4>
|
|
|
|
<div class="ui attached table segment">
|
2023-06-27 14:44:45 +05:30
|
|
|
<dl class="admin-dl-horizontal">
|
Rewrite logger system (#24726)
## ⚠️ Breaking
The `log.<mode>.<logger>` style config has been dropped. If you used it,
please check the new config manual & app.example.ini to make your
instance output logs as expected.
Although many legacy options still work, it's encouraged to upgrade to
the new options.
The SMTP logger is deleted because SMTP is not suitable to collect logs.
If you have manually configured Gitea log options, please confirm the
logger system works as expected after upgrading.
## Description
Close #12082 and maybe more log-related issues, resolve some related
FIXMEs in old code (which seems unfixable before)
Just like rewriting queue #24505 : make code maintainable, clear legacy
bugs, and add the ability to support more writers (eg: JSON, structured
log)
There is a new document (with examples): `logging-config.en-us.md`
This PR is safer than the queue rewriting, because it's just for
logging, it won't break other logic.
## The old problems
The logging system is quite old and difficult to maintain:
* Unclear concepts: Logger, NamedLogger, MultiChannelledLogger,
SubLogger, EventLogger, WriterLogger etc
* Some code is diffuclt to konw whether it is right:
`log.DelNamedLogger("console")` vs `log.DelNamedLogger(log.DEFAULT)` vs
`log.DelLogger("console")`
* The old system heavily depends on ini config system, it's difficult to
create new logger for different purpose, and it's very fragile.
* The "color" trick is difficult to use and read, many colors are
unnecessary, and in the future structured log could help
* It's difficult to add other log formats, eg: JSON format
* The log outputer doesn't have full control of its goroutine, it's
difficult to make outputer have advanced behaviors
* The logs could be lost in some cases: eg: no Fatal error when using
CLI.
* Config options are passed by JSON, which is quite fragile.
* INI package makes the KEY in `[log]` section visible in `[log.sub1]`
and `[log.sub1.subA]`, this behavior is quite fragile and would cause
more unclear problems, and there is no strong requirement to support
`log.<mode>.<logger>` syntax.
## The new design
See `logger.go` for documents.
## Screenshot
<details>
![image](https://github.com/go-gitea/gitea/assets/2114189/4462d713-ba39-41f5-bb08-de912e67e1ff)
![image](https://github.com/go-gitea/gitea/assets/2114189/b188035e-f691-428b-8b2d-ff7b2199b2f9)
![image](https://github.com/go-gitea/gitea/assets/2114189/132e9745-1c3b-4e00-9e0d-15eaea495dee)
</details>
## TODO
* [x] add some new tests
* [x] fix some tests
* [x] test some sub-commands (manually ....)
---------
Co-authored-by: Jason Song <i@wolfogre.com>
Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: Giteabot <teabot@gitea.io>
2023-05-22 04:05:11 +05:30
|
|
|
{{if .Loggers.xorm.IsEnabled}}
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.xorm_log_sql"}}</dt>
|
Rewrite logger system (#24726)
## ⚠️ Breaking
The `log.<mode>.<logger>` style config has been dropped. If you used it,
please check the new config manual & app.example.ini to make your
instance output logs as expected.
Although many legacy options still work, it's encouraged to upgrade to
the new options.
The SMTP logger is deleted because SMTP is not suitable to collect logs.
If you have manually configured Gitea log options, please confirm the
logger system works as expected after upgrading.
## Description
Close #12082 and maybe more log-related issues, resolve some related
FIXMEs in old code (which seems unfixable before)
Just like rewriting queue #24505 : make code maintainable, clear legacy
bugs, and add the ability to support more writers (eg: JSON, structured
log)
There is a new document (with examples): `logging-config.en-us.md`
This PR is safer than the queue rewriting, because it's just for
logging, it won't break other logic.
## The old problems
The logging system is quite old and difficult to maintain:
* Unclear concepts: Logger, NamedLogger, MultiChannelledLogger,
SubLogger, EventLogger, WriterLogger etc
* Some code is diffuclt to konw whether it is right:
`log.DelNamedLogger("console")` vs `log.DelNamedLogger(log.DEFAULT)` vs
`log.DelLogger("console")`
* The old system heavily depends on ini config system, it's difficult to
create new logger for different purpose, and it's very fragile.
* The "color" trick is difficult to use and read, many colors are
unnecessary, and in the future structured log could help
* It's difficult to add other log formats, eg: JSON format
* The log outputer doesn't have full control of its goroutine, it's
difficult to make outputer have advanced behaviors
* The logs could be lost in some cases: eg: no Fatal error when using
CLI.
* Config options are passed by JSON, which is quite fragile.
* INI package makes the KEY in `[log]` section visible in `[log.sub1]`
and `[log.sub1.subA]`, this behavior is quite fragile and would cause
more unclear problems, and there is no strong requirement to support
`log.<mode>.<logger>` syntax.
## The new design
See `logger.go` for documents.
## Screenshot
<details>
![image](https://github.com/go-gitea/gitea/assets/2114189/4462d713-ba39-41f5-bb08-de912e67e1ff)
![image](https://github.com/go-gitea/gitea/assets/2114189/b188035e-f691-428b-8b2d-ff7b2199b2f9)
![image](https://github.com/go-gitea/gitea/assets/2114189/132e9745-1c3b-4e00-9e0d-15eaea495dee)
</details>
## TODO
* [x] add some new tests
* [x] fix some tests
* [x] test some sub-commands (manually ....)
---------
Co-authored-by: Jason Song <i@wolfogre.com>
Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: Giteabot <teabot@gitea.io>
2023-05-22 04:05:11 +05:30
|
|
|
<dd>{{if $.LogSQL}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd>
|
2019-04-02 13:18:31 +05:30
|
|
|
{{end}}
|
Rewrite logger system (#24726)
## ⚠️ Breaking
The `log.<mode>.<logger>` style config has been dropped. If you used it,
please check the new config manual & app.example.ini to make your
instance output logs as expected.
Although many legacy options still work, it's encouraged to upgrade to
the new options.
The SMTP logger is deleted because SMTP is not suitable to collect logs.
If you have manually configured Gitea log options, please confirm the
logger system works as expected after upgrading.
## Description
Close #12082 and maybe more log-related issues, resolve some related
FIXMEs in old code (which seems unfixable before)
Just like rewriting queue #24505 : make code maintainable, clear legacy
bugs, and add the ability to support more writers (eg: JSON, structured
log)
There is a new document (with examples): `logging-config.en-us.md`
This PR is safer than the queue rewriting, because it's just for
logging, it won't break other logic.
## The old problems
The logging system is quite old and difficult to maintain:
* Unclear concepts: Logger, NamedLogger, MultiChannelledLogger,
SubLogger, EventLogger, WriterLogger etc
* Some code is diffuclt to konw whether it is right:
`log.DelNamedLogger("console")` vs `log.DelNamedLogger(log.DEFAULT)` vs
`log.DelLogger("console")`
* The old system heavily depends on ini config system, it's difficult to
create new logger for different purpose, and it's very fragile.
* The "color" trick is difficult to use and read, many colors are
unnecessary, and in the future structured log could help
* It's difficult to add other log formats, eg: JSON format
* The log outputer doesn't have full control of its goroutine, it's
difficult to make outputer have advanced behaviors
* The logs could be lost in some cases: eg: no Fatal error when using
CLI.
* Config options are passed by JSON, which is quite fragile.
* INI package makes the KEY in `[log]` section visible in `[log.sub1]`
and `[log.sub1.subA]`, this behavior is quite fragile and would cause
more unclear problems, and there is no strong requirement to support
`log.<mode>.<logger>` syntax.
## The new design
See `logger.go` for documents.
## Screenshot
<details>
![image](https://github.com/go-gitea/gitea/assets/2114189/4462d713-ba39-41f5-bb08-de912e67e1ff)
![image](https://github.com/go-gitea/gitea/assets/2114189/b188035e-f691-428b-8b2d-ff7b2199b2f9)
![image](https://github.com/go-gitea/gitea/assets/2114189/132e9745-1c3b-4e00-9e0d-15eaea495dee)
</details>
## TODO
* [x] add some new tests
* [x] fix some tests
* [x] test some sub-commands (manually ....)
---------
Co-authored-by: Jason Song <i@wolfogre.com>
Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: Giteabot <teabot@gitea.io>
2023-05-22 04:05:11 +05:30
|
|
|
|
|
|
|
{{if .Loggers.access.IsEnabled}}
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.access_log_template"}}</dt>
|
2019-04-02 13:18:31 +05:30
|
|
|
<dd><code>{{$.AccessLogTemplate}}</code></dd>
|
|
|
|
{{end}}
|
Rewrite logger system (#24726)
## ⚠️ Breaking
The `log.<mode>.<logger>` style config has been dropped. If you used it,
please check the new config manual & app.example.ini to make your
instance output logs as expected.
Although many legacy options still work, it's encouraged to upgrade to
the new options.
The SMTP logger is deleted because SMTP is not suitable to collect logs.
If you have manually configured Gitea log options, please confirm the
logger system works as expected after upgrading.
## Description
Close #12082 and maybe more log-related issues, resolve some related
FIXMEs in old code (which seems unfixable before)
Just like rewriting queue #24505 : make code maintainable, clear legacy
bugs, and add the ability to support more writers (eg: JSON, structured
log)
There is a new document (with examples): `logging-config.en-us.md`
This PR is safer than the queue rewriting, because it's just for
logging, it won't break other logic.
## The old problems
The logging system is quite old and difficult to maintain:
* Unclear concepts: Logger, NamedLogger, MultiChannelledLogger,
SubLogger, EventLogger, WriterLogger etc
* Some code is diffuclt to konw whether it is right:
`log.DelNamedLogger("console")` vs `log.DelNamedLogger(log.DEFAULT)` vs
`log.DelLogger("console")`
* The old system heavily depends on ini config system, it's difficult to
create new logger for different purpose, and it's very fragile.
* The "color" trick is difficult to use and read, many colors are
unnecessary, and in the future structured log could help
* It's difficult to add other log formats, eg: JSON format
* The log outputer doesn't have full control of its goroutine, it's
difficult to make outputer have advanced behaviors
* The logs could be lost in some cases: eg: no Fatal error when using
CLI.
* Config options are passed by JSON, which is quite fragile.
* INI package makes the KEY in `[log]` section visible in `[log.sub1]`
and `[log.sub1.subA]`, this behavior is quite fragile and would cause
more unclear problems, and there is no strong requirement to support
`log.<mode>.<logger>` syntax.
## The new design
See `logger.go` for documents.
## Screenshot
<details>
![image](https://github.com/go-gitea/gitea/assets/2114189/4462d713-ba39-41f5-bb08-de912e67e1ff)
![image](https://github.com/go-gitea/gitea/assets/2114189/b188035e-f691-428b-8b2d-ff7b2199b2f9)
![image](https://github.com/go-gitea/gitea/assets/2114189/132e9745-1c3b-4e00-9e0d-15eaea495dee)
</details>
## TODO
* [x] add some new tests
* [x] fix some tests
* [x] test some sub-commands (manually ....)
---------
Co-authored-by: Jason Song <i@wolfogre.com>
Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: Giteabot <teabot@gitea.io>
2023-05-22 04:05:11 +05:30
|
|
|
|
|
|
|
{{range $loggerName, $loggerDetail := .Loggers}}
|
2023-09-25 14:26:50 +05:30
|
|
|
<dt>{{ctx.Locale.Tr "admin.config.logger_name_fmt" $loggerName}}</dt>
|
Rewrite logger system (#24726)
## ⚠️ Breaking
The `log.<mode>.<logger>` style config has been dropped. If you used it,
please check the new config manual & app.example.ini to make your
instance output logs as expected.
Although many legacy options still work, it's encouraged to upgrade to
the new options.
The SMTP logger is deleted because SMTP is not suitable to collect logs.
If you have manually configured Gitea log options, please confirm the
logger system works as expected after upgrading.
## Description
Close #12082 and maybe more log-related issues, resolve some related
FIXMEs in old code (which seems unfixable before)
Just like rewriting queue #24505 : make code maintainable, clear legacy
bugs, and add the ability to support more writers (eg: JSON, structured
log)
There is a new document (with examples): `logging-config.en-us.md`
This PR is safer than the queue rewriting, because it's just for
logging, it won't break other logic.
## The old problems
The logging system is quite old and difficult to maintain:
* Unclear concepts: Logger, NamedLogger, MultiChannelledLogger,
SubLogger, EventLogger, WriterLogger etc
* Some code is diffuclt to konw whether it is right:
`log.DelNamedLogger("console")` vs `log.DelNamedLogger(log.DEFAULT)` vs
`log.DelLogger("console")`
* The old system heavily depends on ini config system, it's difficult to
create new logger for different purpose, and it's very fragile.
* The "color" trick is difficult to use and read, many colors are
unnecessary, and in the future structured log could help
* It's difficult to add other log formats, eg: JSON format
* The log outputer doesn't have full control of its goroutine, it's
difficult to make outputer have advanced behaviors
* The logs could be lost in some cases: eg: no Fatal error when using
CLI.
* Config options are passed by JSON, which is quite fragile.
* INI package makes the KEY in `[log]` section visible in `[log.sub1]`
and `[log.sub1.subA]`, this behavior is quite fragile and would cause
more unclear problems, and there is no strong requirement to support
`log.<mode>.<logger>` syntax.
## The new design
See `logger.go` for documents.
## Screenshot
<details>
![image](https://github.com/go-gitea/gitea/assets/2114189/4462d713-ba39-41f5-bb08-de912e67e1ff)
![image](https://github.com/go-gitea/gitea/assets/2114189/b188035e-f691-428b-8b2d-ff7b2199b2f9)
![image](https://github.com/go-gitea/gitea/assets/2114189/132e9745-1c3b-4e00-9e0d-15eaea495dee)
</details>
## TODO
* [x] add some new tests
* [x] fix some tests
* [x] test some sub-commands (manually ....)
---------
Co-authored-by: Jason Song <i@wolfogre.com>
Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: Giteabot <teabot@gitea.io>
2023-05-22 04:05:11 +05:30
|
|
|
{{if $loggerDetail.IsEnabled}}
|
Migrate margin and padding helpers to tailwind (#30043)
This will conclude the refactor of 1:1 class replacements to tailwind,
except `gt-hidden`. Commands ran:
```bash
perl -p -i -e 's#gt-(p|m)([lrtbxy])?-0#tw-$1$2-0#g' {web_src/js,templates,routers,services}/**/*
perl -p -i -e 's#gt-(p|m)([lrtbxy])?-1#tw-$1$2-0.5#g' {web_src/js,templates,routers,services}/**/*
perl -p -i -e 's#gt-(p|m)([lrtbxy])?-2#tw-$1$2-1#g' {web_src/js,templates,routers,services}/**/*
perl -p -i -e 's#gt-(p|m)([lrtbxy])?-3#tw-$1$2-2#g' {web_src/js,templates,routers,services}/**/*
perl -p -i -e 's#gt-(p|m)([lrtbxy])?-4#tw-$1$2-4#g' {web_src/js,templates,routers,services}/**/*
perl -p -i -e 's#gt-(p|m)([lrtbxy])?-5#tw-$1$2-8#g' {web_src/js,templates,routers,services}/**/*
```
(cherry picked from commit 68ec9b48592fe88765bcc3a73093d43c98b315de)
Conflicts:
routers/web/repo/view.go
templates/base/head_navbar.tmpl
templates/repo/code/recently_pushed_new_branches.tmpl
templates/repo/diff/box.tmpl
templates/repo/diff/compare.tmpl
templates/repo/diff/conversation.tmpl
templates/repo/header.tmpl
templates/repo/issue/filter_list.tmpl
templates/repo/issue/view_content/conversation.tmpl
templates/repo/issue/view_content/sidebar.tmpl
templates/repo/settings/options.tmpl
templates/repo/view_file.tmpl
templates/shared/user/blocked_users.tmpl
templates/status/500.tmpl
web_src/js/components/DashboardRepoList.vue
resolved by prefering Forgejo version and applying the
commands to all files
2024-03-24 22:12:49 +05:30
|
|
|
<dd><pre class="tw-m-0">{{$loggerDetail.EventWriters | JsonUtils.EncodeToString | JsonUtils.PrettyIndent}}</pre></dd>
|
2019-04-02 13:18:31 +05:30
|
|
|
{{else}}
|
2023-09-25 14:26:50 +05:30
|
|
|
<dd>{{ctx.Locale.Tr "admin.config.disabled_logger"}}</dd>
|
2019-04-02 13:18:31 +05:30
|
|
|
{{end}}
|
|
|
|
{{end}}
|
2017-03-16 04:09:38 +05:30
|
|
|
</dl>
|
2015-12-08 04:00:52 +05:30
|
|
|
</div>
|
|
|
|
</div>
|
2023-04-23 15:51:21 +05:30
|
|
|
{{template "admin/layout_footer" .}}
|