added tabs setting to the description.exs

This commit is contained in:
Alexander Strizhakov 2021-03-02 19:45:32 +03:00
parent 8827d7a74f
commit f9d9987df8
No known key found for this signature in database
GPG Key ID: 022896A53AEF1381
2 changed files with 28 additions and 73 deletions

View File

@ -69,12 +69,34 @@ frontend_options = [
}
]
config :pleroma, :tabs, [
%{tab: :activity_pub, label: "ActivityPub"},
%{tab: :authentication, label: "Authentication"},
%{tab: :captcha, label: "Captcha"},
%{tab: :esshd, label: "BBS / SSH access"},
%{tab: :emoji, label: "Emoji"},
%{tab: :frontend, label: "Frontend"},
%{tab: :gopher, label: "Gopher"},
%{tab: :http, label: "HTTP"},
%{tab: :instance, label: "Instance"},
%{tab: :job_queue, label: "Job queue"},
%{tab: :link_formatter, label: "Link Formatter"},
%{tab: :logger, label: "Logger"},
%{tab: :mailer, label: "Mailer"},
%{tab: :media_proxy, label: "Media Proxy"},
%{tab: :metadata, label: "Metadata"},
%{tab: :mrf, label: "MRF"},
%{tab: :rate_limiters, label: "Rate limiters"},
%{tab: :web_push, label: "Web push encryption"},
%{tab: :upload, label: "Upload"},
%{tab: :other, label: "Other"}
]
config :pleroma, :config_description, [
%{
group: :pleroma,
key: Pleroma.Upload,
tab: :upload,
tab_label: "Upload",
type: :group,
description: "Upload general settings",
children: [
@ -126,7 +148,6 @@ config :pleroma, :config_description, [
group: :pleroma,
key: Pleroma.Uploaders.Local,
tab: :upload,
tab_label: "Upload",
type: :group,
description: "Local uploader-related settings",
children: [
@ -144,7 +165,6 @@ config :pleroma, :config_description, [
group: :pleroma,
key: Pleroma.Uploaders.S3,
tab: :upload,
tab_label: "Upload",
type: :group,
description: "S3 uploader-related settings",
children: [
@ -181,7 +201,6 @@ config :pleroma, :config_description, [
group: :pleroma,
key: Pleroma.Upload.Filter.Mogrify,
tab: :upload,
tab_label: "Upload",
type: :group,
description: "Uploads mogrify filter settings",
children: [
@ -203,7 +222,6 @@ config :pleroma, :config_description, [
group: :pleroma,
key: Pleroma.Upload.Filter.AnonymizeFilename,
tab: :upload,
tab_label: "Upload",
type: :group,
description: "Filter replaces the filename of the upload",
children: [
@ -223,7 +241,6 @@ config :pleroma, :config_description, [
group: :pleroma,
key: Pleroma.Emails.Mailer,
tab: :mailer,
tab_label: "Mailer",
type: :group,
description: "Mailer-related settings",
children: [
@ -444,7 +461,6 @@ config :pleroma, :config_description, [
group: :pleroma,
key: :uri_schemes,
tab: :instance,
tab_label: "Instance",
label: "URI Schemes",
type: :group,
description: "URI schemes related settings",
@ -477,7 +493,6 @@ config :pleroma, :config_description, [
group: :pleroma,
key: :instance,
tab: :instance,
tab_label: "Instance",
type: :group,
description: "Instance-related settings",
children: [
@ -928,7 +943,6 @@ config :pleroma, :config_description, [
group: :pleroma,
key: :welcome,
tab: :instance,
tab_label: "Instance",
type: :group,
description: "Welcome messages settings",
children: [
@ -1036,7 +1050,6 @@ config :pleroma, :config_description, [
%{
group: :logger,
tab: :logger,
tab_label: "Logger",
type: :group,
description: "Logger-related settings",
children: [
@ -1054,7 +1067,6 @@ config :pleroma, :config_description, [
type: :group,
key: :ex_syslogger,
tab: :logger,
tab_label: "Logger",
label: "ExSyslogger",
description: "ExSyslogger-related settings",
children: [
@ -1089,7 +1101,6 @@ config :pleroma, :config_description, [
type: :group,
key: :console,
tab: :logger,
tab_label: "Logger",
label: "Console Logger",
description: "Console logger settings",
children: [
@ -1115,7 +1126,6 @@ config :pleroma, :config_description, [
%{
group: :quack,
tab: :logger,
tab_label: "Logger",
type: :group,
label: "Quack Logger",
description: "Quack-related settings",
@ -1157,7 +1167,6 @@ config :pleroma, :config_description, [
group: :pleroma,
key: :frontend_configurations,
tab: :frontend,
tab_label: "Frontend",
type: :group,
description:
"This form can be used to configure a keyword list that keeps the configuration data for any " <>
@ -1394,7 +1403,6 @@ config :pleroma, :config_description, [
group: :pleroma,
key: :assets,
tab: :frontend,
tab_label: "Frontend",
type: :group,
description:
"This section configures assets to be used with various frontends. Currently the only option relates to mascots on the mastodon frontend",
@ -1436,7 +1444,6 @@ config :pleroma, :config_description, [
group: :pleroma,
key: :manifest,
tab: :instance,
tab_label: "Instance",
type: :group,
description:
"This section describe PWA manifest instance-specific values. Currently this option relate only for MastoFE.",
@ -1477,7 +1484,6 @@ config :pleroma, :config_description, [
group: :pleroma,
key: :media_proxy,
tab: :media_proxy,
tab_label: "Media Proxy",
type: :group,
description: "Media proxy",
children: [
@ -1565,7 +1571,6 @@ config :pleroma, :config_description, [
group: :pleroma,
key: :media_preview_proxy,
tab: :media_proxy,
tab_label: "Media Proxy",
type: :group,
description: "Media preview proxy",
children: [
@ -1604,7 +1609,6 @@ config :pleroma, :config_description, [
group: :pleroma,
key: Pleroma.Web.MediaProxy.Invalidation.Http,
tab: :media_proxy,
tab_label: "Media Proxy",
type: :group,
description: "HTTP invalidate settings",
children: [
@ -1636,7 +1640,6 @@ config :pleroma, :config_description, [
group: :pleroma,
key: Pleroma.Web.MediaProxy.Invalidation.Script,
tab: :media_proxy,
tab_label: "Media Proxy",
type: :group,
description: "Invalidation script settings",
children: [
@ -1660,7 +1663,6 @@ config :pleroma, :config_description, [
group: :pleroma,
key: :gopher,
tab: :gopher,
tab_label: "Gopher",
type: :group,
description: "Gopher settings",
children: [
@ -1694,7 +1696,6 @@ config :pleroma, :config_description, [
group: :pleroma,
key: :activitypub,
tab: :activity_pub,
tab_label: "ActivityPub",
label: "ActivityPub",
type: :group,
description: "ActivityPub-related settings",
@ -1732,7 +1733,6 @@ config :pleroma, :config_description, [
group: :pleroma,
key: :http_security,
tab: :http,
tab_label: "HTTP",
label: "HTTP security",
type: :group,
description: "HTTP security settings",
@ -1781,7 +1781,6 @@ config :pleroma, :config_description, [
group: :web_push_encryption,
key: :vapid_details,
tab: :web_push,
tab_label: "Web push encryption",
label: "Vapid Details",
type: :group,
description:
@ -1813,7 +1812,6 @@ config :pleroma, :config_description, [
group: :pleroma,
key: Pleroma.Captcha,
tab: :captcha,
tab_label: "Captcha",
type: :group,
description: "Captcha-related settings",
children: [
@ -1840,7 +1838,6 @@ config :pleroma, :config_description, [
group: :pleroma,
key: Pleroma.Captcha.Kocaptcha,
tab: :captcha,
tab_label: "Captcha",
type: :group,
description:
"Kocaptcha is a very simple captcha service with a single API endpoint, the source code is" <>
@ -1857,7 +1854,6 @@ config :pleroma, :config_description, [
%{
group: :pleroma,
tab: :instance,
tab_label: "Instance",
label: "Pleroma Admin Token",
type: :group,
description:
@ -1877,7 +1873,6 @@ config :pleroma, :config_description, [
group: :pleroma,
key: Oban,
tab: :job_queue,
tab_label: "Job queue",
type: :group,
description:
"[Oban](https://github.com/sorentwo/oban) asynchronous job processor configuration.",
@ -1982,7 +1977,6 @@ config :pleroma, :config_description, [
group: :pleroma,
key: :workers,
tab: :job_queue,
tab_label: "Job queue",
type: :group,
description: "Includes custom worker options not interpretable directly by `Oban`",
children: [
@ -2001,7 +1995,6 @@ config :pleroma, :config_description, [
group: :pleroma,
key: Pleroma.Web.Metadata,
tab: :metadata,
tab_label: "Metadata",
type: :group,
description: "Metadata-related settings",
children: [
@ -2028,7 +2021,6 @@ config :pleroma, :config_description, [
group: :pleroma,
key: :rich_media,
tab: :metadata,
tab_label: "Metadata",
type: :group,
description:
"If enabled the instance will parse metadata from attached links to generate link previews",
@ -2084,7 +2076,6 @@ config :pleroma, :config_description, [
group: :pleroma,
key: Pleroma.Formatter,
tab: :link_formatter,
tab_label: "Link Formatter",
label: "Linkify",
type: :group,
description:
@ -2137,7 +2128,6 @@ config :pleroma, :config_description, [
group: :pleroma,
key: Pleroma.ScheduledActivity,
tab: :instance,
tab_label: "Instance",
type: :group,
description: "Scheduled activities settings",
children: [
@ -2166,7 +2156,6 @@ config :pleroma, :config_description, [
group: :pleroma,
key: Pleroma.Workers.PurgeExpiredActivity,
tab: :job_queue,
tab_label: "Job queue",
type: :group,
description: "Expired activities settings",
children: [
@ -2187,7 +2176,6 @@ config :pleroma, :config_description, [
group: :pleroma,
label: "Pleroma Authenticator",
tab: :authentication,
tab_label: "Authentication",
type: :group,
description: "Authenticator",
children: [
@ -2202,7 +2190,6 @@ config :pleroma, :config_description, [
group: :pleroma,
key: :ldap,
tab: :authentication,
tab_label: "Authentication",
label: "LDAP",
type: :group,
description:
@ -2302,7 +2289,6 @@ config :pleroma, :config_description, [
group: :pleroma,
key: :auth,
tab: :authentication,
tab_label: "Authentication",
type: :group,
description: "Authentication / authorization settings",
children: [
@ -2338,7 +2324,6 @@ config :pleroma, :config_description, [
group: :pleroma,
key: :email_notifications,
tab: :mailer,
tab_label: "Mailer",
type: :group,
description: "Email notifications settings",
children: [
@ -2389,7 +2374,6 @@ config :pleroma, :config_description, [
group: :pleroma,
key: Pleroma.Emails.UserEmail,
tab: :mailer,
tab_label: "Mailer",
type: :group,
description: "Email template settings",
children: [
@ -2452,7 +2436,6 @@ config :pleroma, :config_description, [
group: :pleroma,
key: Pleroma.Emails.NewUsersDigestEmail,
tab: :mailer,
tab_label: "Mailer",
type: :group,
description: "New users admin email digest",
children: [
@ -2467,7 +2450,6 @@ config :pleroma, :config_description, [
group: :pleroma,
key: :oauth2,
tab: :authentication,
tab_label: "Authentication",
label: "OAuth2",
type: :group,
description: "Configure OAuth 2 provider capabilities",
@ -2495,7 +2477,6 @@ config :pleroma, :config_description, [
group: :pleroma,
key: :emoji,
tab: :emoji,
tab_label: "Emoji",
type: :group,
children: [
%{
@ -2543,8 +2524,7 @@ config :pleroma, :config_description, [
%{
group: :pleroma,
key: :rate_limit,
tab: :rate_limits,
tab_label: "Rate limiters",
tab: :rate_limiters,
type: :group,
description:
"Rate limit settings. This is an advanced feature enabled only for :authentication by default.",
@ -2606,7 +2586,6 @@ config :pleroma, :config_description, [
%{
group: :esshd,
tab: :esshd,
tab_label: "BBS / SSH access",
label: "ESSHD",
type: :group,
description:
@ -2647,7 +2626,6 @@ config :pleroma, :config_description, [
%{
group: :mime,
tab: :other,
tab_label: "Other",
label: "Mime Types",
type: :group,
description: "Mime Types settings",
@ -2698,7 +2676,6 @@ config :pleroma, :config_description, [
group: :pleroma,
key: :chat,
tab: :frontend,
tab_label: "Frontend",
type: :group,
description: "Pleroma chat settings",
children: [
@ -2712,7 +2689,6 @@ config :pleroma, :config_description, [
group: :pleroma,
key: :http,
tab: :http,
tab_label: "HTTP",
label: "HTTP",
type: :group,
description: "HTTP settings",
@ -2763,7 +2739,6 @@ config :pleroma, :config_description, [
group: :pleroma,
key: :markup,
tab: :frontend,
tab_label: "Frontend",
label: "Markup Settings",
type: :group,
children: [
@ -2796,7 +2771,6 @@ config :pleroma, :config_description, [
group: :pleroma,
key: :user,
tab: :activity_pub,
tab_label: "ActivityPub",
type: :group,
children: [
%{
@ -2809,7 +2783,6 @@ config :pleroma, :config_description, [
group: :pleroma,
key: Pleroma.User,
tab: :instance,
tab_label: "Instance",
type: :group,
children: [
%{
@ -2860,7 +2833,6 @@ config :pleroma, :config_description, [
%{
group: :cors_plug,
tab: :http,
tab_label: "HTTP",
label: "CORS plug config",
type: :group,
children: [
@ -2901,7 +2873,6 @@ config :pleroma, :config_description, [
group: :pleroma,
key: Pleroma.Web.Plugs.RemoteIp,
tab: :other,
tab_label: "Other",
type: :group,
description: """
`Pleroma.Web.Plugs.RemoteIp` is a shim to call [`RemoteIp`](https://git.pleroma.social/pleroma/remote_ip) but with runtime configuration.
@ -2939,7 +2910,6 @@ config :pleroma, :config_description, [
group: :pleroma,
key: :web_cache_ttl,
tab: :http,
tab_label: "HTTP",
label: "Web cache TTL",
type: :group,
description:
@ -2964,7 +2934,6 @@ config :pleroma, :config_description, [
group: :pleroma,
key: :static_fe,
tab: :frontend,
tab_label: "Frontend",
label: "Static FE",
type: :group,
description:
@ -2981,7 +2950,6 @@ config :pleroma, :config_description, [
group: :pleroma,
key: :feed,
tab: :instance,
tab_label: "Instance",
type: :group,
description: "Configure feed rendering",
children: [
@ -3010,7 +2978,6 @@ config :pleroma, :config_description, [
group: :pleroma,
key: :modules,
tab: :other,
tab_label: "Other",
type: :group,
description: "Custom Runtime Modules",
children: [
@ -3025,7 +2992,6 @@ config :pleroma, :config_description, [
group: :pleroma,
key: :streamer,
tab: :instance,
tab_label: "Instance",
type: :group,
description: "Settings for notifications streamer",
children: [
@ -3047,7 +3013,6 @@ config :pleroma, :config_description, [
group: :pleroma,
key: :connections_pool,
tab: :http,
tab_label: "HTTP",
type: :group,
description: "Advanced settings for `Gun` connections pool",
children: [
@ -3090,7 +3055,6 @@ config :pleroma, :config_description, [
group: :pleroma,
key: :pools,
tab: :http,
tab_label: "HTTP",
type: :group,
description: "Advanced settings for `Gun` workers pools",
children:
@ -3128,7 +3092,6 @@ config :pleroma, :config_description, [
group: :pleroma,
key: :hackney_pools,
tab: :http,
tab_label: "HTTP",
type: :group,
description: "Advanced settings for `Hackney` connections pools",
children: [
@ -3195,7 +3158,6 @@ config :pleroma, :config_description, [
group: :pleroma,
key: :restrict_unauthenticated,
tab: :instance,
tab_label: "Instance",
label: "Restrict Unauthenticated",
type: :group,
description:
@ -3258,7 +3220,6 @@ config :pleroma, :config_description, [
group: :pleroma,
key: Pleroma.Web.ApiSpec.CastAndValidate,
tab: :other,
tab_label: "Other",
type: :group,
children: [
%{
@ -3273,7 +3234,6 @@ config :pleroma, :config_description, [
group: :pleroma,
key: :instances_favicons,
tab: :instance,
tab_label: "Instance",
type: :group,
description: "Control favicons for instances",
children: [
@ -3288,7 +3248,6 @@ config :pleroma, :config_description, [
group: :ex_aws,
key: :s3,
tab: :upload,
tab_label: "Upload",
type: :group,
descriptions: "S3 service related settings",
children: [
@ -3322,7 +3281,6 @@ config :pleroma, :config_description, [
group: :pleroma,
key: :frontends,
tab: :frontend,
tab_label: "Frontend",
type: :group,
description: "Installed frontends management",
children: [
@ -3351,7 +3309,6 @@ config :pleroma, :config_description, [
group: :pleroma,
key: Pleroma.Web.Preload,
tab: :frontend,
tab_label: "Frontend",
type: :group,
description: "Preload-related settings",
children: [
@ -3372,7 +3329,6 @@ config :pleroma, :config_description, [
group: :pleroma,
key: :majic_pool,
tab: :other,
tab_label: "Other",
type: :group,
description: "Majic/libmagic configuration",
children: [
@ -3388,7 +3344,6 @@ config :pleroma, :config_description, [
group: :pleroma,
key: Pleroma.User.Backup,
tab: :other,
tab_label: "Other",
type: :group,
description: "Account Backup",
children: [
@ -3410,7 +3365,6 @@ config :pleroma, :config_description, [
group: :prometheus,
key: Pleroma.Web.Endpoint.MetricsExporter,
tab: :other,
tab_label: "Other",
type: :group,
description: "Prometheus app metrics endpoint configuration",
children: [
@ -3449,7 +3403,6 @@ config :pleroma, :config_description, [
group: :pleroma,
key: ConcurrentLimiter,
tab: :job_queue,
tab_label: "Job queue",
type: :group,
description: "Limits configuration for background tasks.",
children: [

View File

@ -1091,9 +1091,10 @@ config :quack,
}
```
## ` GET /api/v1/pleroma/admin/config/descriptions`
## `GET /api/v1/pleroma/admin/config/descriptions`
### Get JSON with config descriptions
### Get JSON with config descriptions.
Loads json generated from `config/descriptions.exs`.
- Params: none
@ -1105,6 +1106,7 @@ Loads json generated from `config/descriptions.exs`.
"key": "ModuleName", // string
"type": "group", // string or list with possible values,
"description": "Upload general settings", // string
"tab": "mrf",
"children": [
{
"key": ":uploader", // string or module name `Pleroma.Upload`