From e68b9d00a6e05b3a941f63ffb696f91e554ac5ec Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 18 Oct 2024 20:33:49 +0200 Subject: Adding upstream version 9.0.3. Signed-off-by: Daniel Baumann --- templates/admin/config.tmpl | 355 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 355 insertions(+) create mode 100644 templates/admin/config.tmpl (limited to 'templates/admin/config.tmpl') diff --git a/templates/admin/config.tmpl b/templates/admin/config.tmpl new file mode 100644 index 0000000..8f2b1c1 --- /dev/null +++ b/templates/admin/config.tmpl @@ -0,0 +1,355 @@ +{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin config")}} +
+

+ {{ctx.Locale.Tr "admin.config.server_config"}} +

+
+
+
{{ctx.Locale.Tr "admin.config.app_name"}}
+
{{AppName}}
+
{{ctx.Locale.Tr "admin.config.app_slogan"}}
+
{{AppSlogan}}
+
{{ctx.Locale.Tr "admin.config.app_ver"}}
+
{{AppVer}}{{.AppBuiltWith}}
+
{{ctx.Locale.Tr "admin.config.custom_conf"}}
+
{{.CustomConf}}
+
{{ctx.Locale.Tr "admin.config.app_url"}}
+
{{.AppUrl}}
+
{{ctx.Locale.Tr "admin.config.domain"}}
+
{{.Domain}}
+
{{ctx.Locale.Tr "admin.config.offline_mode"}}
+
{{if .OfflineMode}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
+
{{ctx.Locale.Tr "admin.config.disable_router_log"}}
+
{{if .DisableRouterLog}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
+ +
+ +
{{ctx.Locale.Tr "admin.config.run_user"}}
+
{{.RunUser}}
+
{{ctx.Locale.Tr "admin.config.run_mode"}}
+
{{.RunMode}}
+ +
+ +
{{ctx.Locale.Tr "admin.config.git_version"}}
+
{{.GitVersion}}
+ +
+ +
{{ctx.Locale.Tr "admin.config.app_data_path"}}
+
{{.AppDataPath}}
+
{{ctx.Locale.Tr "admin.config.repo_root_path"}}
+
{{.RepoRootPath}}
+
{{ctx.Locale.Tr "admin.config.custom_file_root_path"}}
+
{{.CustomRootPath}}
+
{{ctx.Locale.Tr "admin.config.log_file_root_path"}}
+
{{.LogRootPath}}
+
{{ctx.Locale.Tr "admin.config.script_type"}}
+
{{.ScriptType}}
+
{{ctx.Locale.Tr "admin.config.reverse_auth_user"}}
+
{{.ReverseProxyAuthUser}}
+
+
+ +

+ {{ctx.Locale.Tr "admin.config.ssh_config"}} +

+
+
+
{{ctx.Locale.Tr "admin.config.ssh_enabled"}}
+
{{if not .SSH.Disabled}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
+ {{if not .SSH.Disabled}} +
{{ctx.Locale.Tr "admin.config.ssh_start_builtin_server"}}
+
{{if .SSH.StartBuiltinServer}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
+
{{ctx.Locale.Tr "admin.config.ssh_domain"}}
+
{{.SSH.Domain}}
+
{{ctx.Locale.Tr "admin.config.ssh_port"}}
+
{{.SSH.Port}}
+
{{ctx.Locale.Tr "admin.config.ssh_listen_port"}}
+
{{.SSH.ListenPort}}
+ + {{if not .SSH.StartBuiltinServer}} +
{{ctx.Locale.Tr "admin.config.ssh_root_path"}}
+
{{.SSH.RootPath}}
+
{{ctx.Locale.Tr "admin.config.ssh_key_test_path"}}
+
{{.SSH.KeyTestPath}}
+
{{ctx.Locale.Tr "admin.config.ssh_keygen_path"}}
+
{{.SSH.KeygenPath}}
+
{{ctx.Locale.Tr "admin.config.ssh_minimum_key_size_check"}}
+
{{if .SSH.MinimumKeySizeCheck}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
+ {{if .SSH.MinimumKeySizeCheck}} +
{{ctx.Locale.Tr "admin.config.ssh_minimum_key_sizes"}}
+
{{.SSH.MinimumKeySizes}}
+ {{end}} + {{end}} + {{end}} +
+
+ +

+ {{ctx.Locale.Tr "admin.config.lfs_config"}} +

+
+
+
{{ctx.Locale.Tr "admin.config.lfs_enabled"}}
+
{{if .LFS.StartServer}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
+ {{if .LFS.StartServer}} +
{{ctx.Locale.Tr "admin.config.lfs_content_path"}}
+
{{JsonUtils.EncodeToString .LFS.Storage.ToShadowCopy}}
+
{{ctx.Locale.Tr "admin.config.lfs_http_auth_expiry"}}
+
{{.LFS.HTTPAuthExpiry}}
+ {{end}} +
+
+ +

+ {{ctx.Locale.Tr "admin.config.db_config"}} +

+
+
+
{{ctx.Locale.Tr "admin.config.db_type"}}
+
{{.DbCfg.Type}}
+ {{if not (eq .DbCfg.Type "sqlite3")}} +
{{ctx.Locale.Tr "admin.config.db_host"}}
+
{{if .DbCfg.Host}}{{.DbCfg.Host}}{{else}}-{{end}}
+
{{ctx.Locale.Tr "admin.config.db_name"}}
+
{{if .DbCfg.Name}}{{.DbCfg.Name}}{{else}}-{{end}}
+
{{ctx.Locale.Tr "admin.config.db_user"}}
+
{{if .DbCfg.User}}{{.DbCfg.User}}{{else}}-{{end}}
+ {{end}} + {{if eq .DbCfg.Type "postgres"}} +
{{ctx.Locale.Tr "admin.config.db_schema"}}
+
{{if .DbCfg.Schema}}{{.DbCfg.Schema}}{{else}}-{{end}}
+
{{ctx.Locale.Tr "admin.config.db_ssl_mode"}}
+
{{if .DbCfg.SSLMode}}{{.DbCfg.SSLMode}}{{else}}-{{end}}
+ {{end}} + {{if eq .DbCfg.Type "sqlite3"}} +
{{ctx.Locale.Tr "admin.config.db_path"}}
+
{{if .DbCfg.Path}}{{.DbCfg.Path}}{{else}}-{{end}}
+ {{end}} +
+
+ +

+ {{ctx.Locale.Tr "admin.config.service_config"}} +

+
+
+
{{ctx.Locale.Tr "admin.config.register_email_confirm"}}
+
{{if .Service.RegisterEmailConfirm}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
+
{{ctx.Locale.Tr "admin.config.disable_register"}}
+
{{if .Service.DisableRegistration}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
+
{{ctx.Locale.Tr "admin.config.allow_only_internal_registration"}}
+
{{if .Service.AllowOnlyInternalRegistration}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
+
{{ctx.Locale.Tr "admin.config.allow_only_external_registration"}}
+
{{if .Service.AllowOnlyExternalRegistration}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
+
{{ctx.Locale.Tr "admin.config.show_registration_button"}}
+
{{if .Service.ShowRegistrationButton}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
+
{{ctx.Locale.Tr "admin.config.enable_openid_signup"}}
+
{{if .Service.EnableOpenIDSignUp}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
+
{{ctx.Locale.Tr "admin.config.enable_openid_signin"}}
+
{{if .Service.EnableOpenIDSignIn}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
+
{{ctx.Locale.Tr "admin.config.require_sign_in_view"}}
+
{{if .Service.RequireSignInView}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
+
{{ctx.Locale.Tr "admin.config.mail_notify"}}
+
{{if .Service.EnableNotifyMail}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
+
{{ctx.Locale.Tr "admin.config.enable_captcha"}}
+
{{if .Service.EnableCaptcha}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
+
{{ctx.Locale.Tr "admin.config.default_keep_email_private"}}
+
{{if .Service.DefaultKeepEmailPrivate}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
+
{{ctx.Locale.Tr "admin.config.default_allow_create_organization"}}
+
{{if .Service.DefaultAllowCreateOrganization}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
+
{{ctx.Locale.Tr "admin.config.allow_dots_in_usernames"}}
+
{{if .Service.AllowDotsInUsernames}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
+
{{ctx.Locale.Tr "admin.config.enable_timetracking"}}
+
{{if .Service.EnableTimetracking}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
+ {{if .Service.EnableTimetracking}} +
{{ctx.Locale.Tr "admin.config.default_enable_timetracking"}}
+
{{if .Service.DefaultEnableTimetracking}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
+
{{ctx.Locale.Tr "admin.config.default_allow_only_contributors_to_track_time"}}
+
{{if .Service.DefaultAllowOnlyContributorsToTrackTime}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
+ {{end}} +
{{ctx.Locale.Tr "admin.config.default_visibility_organization"}}
+
{{.Service.DefaultOrgVisibility}}
+ +
{{ctx.Locale.Tr "admin.config.no_reply_address"}}
+
{{if .Service.NoReplyAddress}}{{.Service.NoReplyAddress}}{{else}}-{{end}}
+
{{ctx.Locale.Tr "admin.config.default_enable_dependencies"}}
+
{{if .Service.DefaultEnableDependencies}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
+
+
{{ctx.Locale.Tr "admin.config.active_code_lives"}}
+
{{.Service.ActiveCodeLives}} {{ctx.Locale.Tr "tool.raw_minutes"}}
+
{{ctx.Locale.Tr "admin.config.reset_password_code_lives"}}
+
{{.Service.ResetPwdCodeLives}} {{ctx.Locale.Tr "tool.raw_minutes"}}
+
+
+ +

+ {{ctx.Locale.Tr "admin.config.webhook_config"}} +

+
+
+
{{ctx.Locale.Tr "admin.config.queue_length"}}
+
{{.Webhook.QueueLength}}
+
{{ctx.Locale.Tr "admin.config.deliver_timeout"}}
+
{{.Webhook.DeliverTimeout}} {{ctx.Locale.Tr "tool.raw_seconds"}}
+
{{ctx.Locale.Tr "admin.config.skip_tls_verify"}}
+
{{if .Webhook.SkipTLSVerify}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
+
+
+ +

+ {{ctx.Locale.Tr "admin.config.mailer_config"}} +

+
+
+
{{ctx.Locale.Tr "admin.config.mailer_enabled"}}
+
{{if .MailerEnabled}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
+ {{if .MailerEnabled}} +
{{ctx.Locale.Tr "admin.config.mailer_name"}}
+
{{.Mailer.Name}}
+ {{if eq .Mailer.Protocol "sendmail"}} +
{{ctx.Locale.Tr "admin.config.mailer_use_sendmail"}}
+
{{svg "octicon-check"}}
+
{{ctx.Locale.Tr "admin.config.mailer_sendmail_path"}}
+
{{.Mailer.SendmailPath}}
+
{{ctx.Locale.Tr "admin.config.mailer_sendmail_args"}}
+
{{.Mailer.SendmailArgs}}
+
{{ctx.Locale.Tr "admin.config.mailer_sendmail_timeout"}}
+
{{.Mailer.SendmailTimeout}} {{ctx.Locale.Tr "tool.raw_seconds"}}
+ {{else if eq .Mailer.Protocol "dummy"}} +
{{ctx.Locale.Tr "admin.config.mailer_use_dummy"}}
+
{{svg "octicon-check"}}
+ {{else}}{{/* SMTP family */}} +
{{ctx.Locale.Tr "admin.config.mailer_protocol"}}
+
{{.Mailer.Protocol}}
+
{{ctx.Locale.Tr "admin.config.mailer_enable_helo"}}
+
{{if .Mailer.EnableHelo}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
+
{{ctx.Locale.Tr "admin.config.mailer_smtp_addr"}}
+
{{.Mailer.SMTPAddr}}
+
{{ctx.Locale.Tr "admin.config.mailer_smtp_port"}}
+
{{.Mailer.SMTPPort}}
+ {{end}} +
{{ctx.Locale.Tr "admin.config.mailer_user"}}
+
{{if .Mailer.User}}{{.Mailer.User}}{{else}}(empty){{end}}
+
+
{{ctx.Locale.Tr "admin.config.send_test_mail"}}
+
+
+ {{.CsrfTokenHtml}} +
+ +
+ +
+
+ {{end}} +
+
+ +

+ {{ctx.Locale.Tr "admin.config.cache_config"}} +

+
+
+
{{ctx.Locale.Tr "admin.config.cache_adapter"}}
+
{{.CacheAdapter}}
+ {{if eq .CacheAdapter "memory"}} +
{{ctx.Locale.Tr "admin.config.cache_interval"}}
+
{{.CacheInterval}} {{ctx.Locale.Tr "tool.raw_seconds"}}
+ {{end}} + {{if .CacheConn}} +
{{ctx.Locale.Tr "admin.config.cache_conn"}}
+
{{.CacheConn}}
+
{{ctx.Locale.Tr "admin.config.cache_item_ttl"}}
+
{{.CacheItemTTL}}
+ {{end}} +
+
{{ctx.Locale.Tr "admin.config.cache_test"}}
+
+
+ {{.CsrfTokenHtml}} + +
+
+
+
+ +

+ {{ctx.Locale.Tr "admin.config.session_config"}} +

+
+
+
{{ctx.Locale.Tr "admin.config.session_provider"}}
+
{{.SessionConfig.Provider}}
+
{{ctx.Locale.Tr "admin.config.provider_config"}}
+
{{if .SessionConfig.ProviderConfig}}{{.SessionConfig.ProviderConfig}}{{else}}-{{end}}
+
{{ctx.Locale.Tr "admin.config.cookie_name"}}
+
{{.SessionConfig.CookieName}}
+
{{ctx.Locale.Tr "admin.config.gc_interval_time"}}
+
{{.SessionConfig.Gclifetime}} {{ctx.Locale.Tr "tool.raw_seconds"}}
+
{{ctx.Locale.Tr "admin.config.session_life_time"}}
+
{{.SessionConfig.Maxlifetime}} {{ctx.Locale.Tr "tool.raw_seconds"}}
+
{{ctx.Locale.Tr "admin.config.https_only"}}
+
{{if .SessionConfig.Secure}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
+
+
+ +

+ {{ctx.Locale.Tr "admin.config.git_config"}} +

+
+
+
{{ctx.Locale.Tr "admin.config.git_disable_diff_highlight"}}
+
{{if .Git.DisableDiffHighlight}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
+
{{ctx.Locale.Tr "admin.config.git_max_diff_lines"}}
+
{{.Git.MaxGitDiffLines}}
+
{{ctx.Locale.Tr "admin.config.git_max_diff_line_characters"}}
+
{{.Git.MaxGitDiffLineCharacters}}
+
{{ctx.Locale.Tr "admin.config.git_max_diff_files"}}
+
{{.Git.MaxGitDiffFiles}}
+
{{ctx.Locale.Tr "admin.config.git_gc_args"}}
+
{{.Git.GCArgs}}
+ +
+ +
{{ctx.Locale.Tr "admin.config.git_migrate_timeout"}}
+
{{.Git.Timeout.Migrate}} {{ctx.Locale.Tr "tool.raw_seconds"}}
+
{{ctx.Locale.Tr "admin.config.git_mirror_timeout"}}
+
{{.Git.Timeout.Mirror}} {{ctx.Locale.Tr "tool.raw_seconds"}}
+
{{ctx.Locale.Tr "admin.config.git_clone_timeout"}}
+
{{.Git.Timeout.Clone}} {{ctx.Locale.Tr "tool.raw_seconds"}}
+
{{ctx.Locale.Tr "admin.config.git_pull_timeout"}}
+
{{.Git.Timeout.Pull}} {{ctx.Locale.Tr "tool.raw_seconds"}}
+
{{ctx.Locale.Tr "admin.config.git_gc_timeout"}}
+
{{.Git.Timeout.GC}} {{ctx.Locale.Tr "tool.raw_seconds"}}
+
+
+ +

+ {{ctx.Locale.Tr "admin.config.log_config"}} +

+
+
+ {{if .Loggers.xorm.IsEnabled}} +
{{ctx.Locale.Tr "admin.config.xorm_log_sql"}}
+
{{if $.LogSQL}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
+ {{end}} + + {{if .Loggers.access.IsEnabled}} +
{{ctx.Locale.Tr "admin.config.access_log_template"}}
+
{{$.AccessLogTemplate}}
+ {{end}} + + {{range $loggerName, $loggerDetail := .Loggers}} +
{{ctx.Locale.Tr "admin.config.logger_name_fmt" $loggerName}}
+ {{if $loggerDetail.IsEnabled}} +
{{$loggerDetail.EventWriters | JsonUtils.EncodeToString | JsonUtils.PrettyIndent}}
+ {{else}} +
{{ctx.Locale.Tr "admin.config.disabled_logger"}}
+ {{end}} + {{end}} +
+
+
+{{template "admin/layout_footer" .}} -- cgit v1.2.3