summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Strizhakov <alex.strizhakov@gmail.com>2021-02-26 12:00:41 +0300
committerAlexander Strizhakov <alex.strizhakov@gmail.com>2021-05-11 18:43:22 +0300
commit19f8ad8e1d9ce14fd9291038cf9ffeb60a1a3ca1 (patch)
treecae6aaef5fae8d5114f27a64ac1a2356d0497772
parent745375bdcf2679ff803dd4ebc4a8313a7b5fb157 (diff)
adding tab & tab_label fields to the descriptions
for top level groups
-rw-r--r--config/description.exs157
-rw-r--r--lib/pleroma/web/activity_pub/mrf.ex2
-rw-r--r--test/pleroma/web/activity_pub/mrf_test.exs1
3 files changed, 147 insertions, 13 deletions
diff --git a/config/description.exs b/config/description.exs
index bb1f43305..00ccdc94c 100644
--- a/config/description.exs
+++ b/config/description.exs
@@ -73,6 +73,8 @@ config :pleroma, :config_description, [
%{
group: :pleroma,
key: Pleroma.Upload,
+ tab: :upload,
+ tab_label: "Upload",
type: :group,
description: "Upload general settings",
children: [
@@ -123,6 +125,8 @@ config :pleroma, :config_description, [
%{
group: :pleroma,
key: Pleroma.Uploaders.Local,
+ tab: :upload,
+ tab_label: "Upload",
type: :group,
description: "Local uploader-related settings",
children: [
@@ -139,6 +143,8 @@ config :pleroma, :config_description, [
%{
group: :pleroma,
key: Pleroma.Uploaders.S3,
+ tab: :upload,
+ tab_label: "Upload",
type: :group,
description: "S3 uploader-related settings",
children: [
@@ -174,6 +180,8 @@ config :pleroma, :config_description, [
%{
group: :pleroma,
key: Pleroma.Upload.Filter.Mogrify,
+ tab: :upload,
+ tab_label: "Upload",
type: :group,
description: "Uploads mogrify filter settings",
children: [
@@ -194,6 +202,8 @@ 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: [
@@ -212,6 +222,8 @@ config :pleroma, :config_description, [
%{
group: :pleroma,
key: Pleroma.Emails.Mailer,
+ tab: :mailer,
+ tab_label: "Mailer",
type: :group,
description: "Mailer-related settings",
children: [
@@ -431,6 +443,8 @@ config :pleroma, :config_description, [
%{
group: :pleroma,
key: :uri_schemes,
+ tab: :instance,
+ tab_label: "Instance",
label: "URI Schemes",
type: :group,
description: "URI schemes related settings",
@@ -498,6 +512,8 @@ config :pleroma, :config_description, [
%{
group: :pleroma,
key: :instance,
+ tab: :instance,
+ tab_label: "Instance",
type: :group,
description: "Instance-related settings",
children: [
@@ -947,6 +963,8 @@ config :pleroma, :config_description, [
%{
group: :pleroma,
key: :welcome,
+ tab: :instance,
+ tab_label: "Instance",
type: :group,
description: "Welcome messages settings",
children: [
@@ -1053,6 +1071,8 @@ config :pleroma, :config_description, [
},
%{
group: :logger,
+ tab: :logger,
+ tab_label: "Logger",
type: :group,
description: "Logger-related settings",
children: [
@@ -1069,6 +1089,8 @@ config :pleroma, :config_description, [
group: :logger,
type: :group,
key: :ex_syslogger,
+ tab: :logger,
+ tab_label: "Logger",
label: "ExSyslogger",
description: "ExSyslogger-related settings",
children: [
@@ -1102,6 +1124,8 @@ config :pleroma, :config_description, [
group: :logger,
type: :group,
key: :console,
+ tab: :logger,
+ tab_label: "Logger",
label: "Console Logger",
description: "Console logger settings",
children: [
@@ -1126,6 +1150,8 @@ config :pleroma, :config_description, [
},
%{
group: :quack,
+ tab: :logger,
+ tab_label: "Logger",
type: :group,
label: "Quack Logger",
description: "Quack-related settings",
@@ -1166,6 +1192,8 @@ 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 " <>
@@ -1401,6 +1429,8 @@ 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",
@@ -1441,6 +1471,8 @@ 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.",
@@ -1480,6 +1512,8 @@ config :pleroma, :config_description, [
%{
group: :pleroma,
key: :media_proxy,
+ tab: :media_proxy,
+ tab_label: "Media Proxy",
type: :group,
description: "Media proxy",
children: [
@@ -1566,6 +1600,8 @@ config :pleroma, :config_description, [
%{
group: :pleroma,
key: :media_preview_proxy,
+ tab: :media_proxy,
+ tab_label: "Media Proxy",
type: :group,
description: "Media preview proxy",
children: [
@@ -1603,6 +1639,8 @@ 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: [
@@ -1633,6 +1671,8 @@ 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: [
@@ -1655,6 +1695,8 @@ config :pleroma, :config_description, [
%{
group: :pleroma,
key: :gopher,
+ tab: :gopher,
+ tab_label: "Gopher",
type: :group,
description: "Gopher settings",
children: [
@@ -1687,6 +1729,8 @@ config :pleroma, :config_description, [
%{
group: :pleroma,
key: :activitypub,
+ tab: :activity_pub,
+ tab_label: "ActivityPub",
label: "ActivityPub",
type: :group,
description: "ActivityPub-related settings",
@@ -1723,6 +1767,8 @@ config :pleroma, :config_description, [
%{
group: :pleroma,
key: :http_security,
+ tab: :http,
+ tab_label: "HTTP",
label: "HTTP security",
type: :group,
description: "HTTP security settings",
@@ -1770,6 +1816,8 @@ 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:
@@ -1800,6 +1848,8 @@ config :pleroma, :config_description, [
%{
group: :pleroma,
key: Pleroma.Captcha,
+ tab: :captcha,
+ tab_label: "Captcha",
type: :group,
description: "Captcha-related settings",
children: [
@@ -1825,6 +1875,8 @@ 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" <>
@@ -1840,6 +1892,8 @@ config :pleroma, :config_description, [
},
%{
group: :pleroma,
+ tab: :instance,
+ tab_label: "Instance",
label: "Pleroma Admin Token",
type: :group,
description:
@@ -1858,6 +1912,8 @@ 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.",
@@ -1961,6 +2017,8 @@ 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: [
@@ -1978,6 +2036,8 @@ config :pleroma, :config_description, [
%{
group: :pleroma,
key: Pleroma.Web.Metadata,
+ tab: :metadata,
+ tab_label: "Metadata",
type: :group,
description: "Metadata-related settings",
children: [
@@ -2003,6 +2063,8 @@ 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",
@@ -2057,6 +2119,8 @@ config :pleroma, :config_description, [
%{
group: :pleroma,
key: Pleroma.Formatter,
+ tab: :link_formatter,
+ tab_label: "Link Formatter",
label: "Linkify",
type: :group,
description:
@@ -2108,6 +2172,8 @@ config :pleroma, :config_description, [
%{
group: :pleroma,
key: Pleroma.ScheduledActivity,
+ tab: :instance,
+ tab_label: "Instance",
type: :group,
description: "Scheduled activities settings",
children: [
@@ -2135,6 +2201,8 @@ config :pleroma, :config_description, [
%{
group: :pleroma,
key: Pleroma.Workers.PurgeExpiredActivity,
+ tab: :job_queue,
+ tab_label: "Job queue",
type: :group,
description: "Expired activities settings",
children: [
@@ -2154,6 +2222,8 @@ config :pleroma, :config_description, [
%{
group: :pleroma,
label: "Pleroma Authenticator",
+ tab: :authentication,
+ tab_label: "Authentication",
type: :group,
description: "Authenticator",
children: [
@@ -2167,6 +2237,8 @@ config :pleroma, :config_description, [
%{
group: :pleroma,
key: :ldap,
+ tab: :authentication,
+ tab_label: "Authentication",
label: "LDAP",
type: :group,
description:
@@ -2265,20 +2337,12 @@ config :pleroma, :config_description, [
%{
group: :pleroma,
key: :auth,
+ tab: :authentication,
+ tab_label: "Authentication",
type: :group,
description: "Authentication / authorization settings",
children: [
%{
- key: :enforce_oauth_admin_scope_usage,
- label: "Enforce OAuth admin scope usage",
- type: :boolean,
- description:
- "OAuth admin scope requirement toggle. " <>
- "If enabled, admin actions explicitly demand admin OAuth scope(s) presence in OAuth token " <>
- "(client app must support admin scopes). If disabled and token doesn't have admin scope(s), " <>
- "`is_admin` user flag grants access to admin-specific actions."
- },
- %{
key: :auth_template,
type: :string,
description:
@@ -2309,6 +2373,8 @@ config :pleroma, :config_description, [
%{
group: :pleroma,
key: :email_notifications,
+ tab: :mailer,
+ tab_label: "Mailer",
type: :group,
description: "Email notifications settings",
children: [
@@ -2358,6 +2424,8 @@ config :pleroma, :config_description, [
%{
group: :pleroma,
key: Pleroma.Emails.UserEmail,
+ tab: :mailer,
+ tab_label: "Mailer",
type: :group,
description: "Email template settings",
children: [
@@ -2419,6 +2487,8 @@ config :pleroma, :config_description, [
%{
group: :pleroma,
key: Pleroma.Emails.NewUsersDigestEmail,
+ tab: :mailer,
+ tab_label: "Mailer",
type: :group,
description: "New users admin email digest",
children: [
@@ -2432,6 +2502,8 @@ config :pleroma, :config_description, [
%{
group: :pleroma,
key: :oauth2,
+ tab: :authentication,
+ tab_label: "Authentication",
label: "OAuth2",
type: :group,
description: "Configure OAuth 2 provider capabilities",
@@ -2458,6 +2530,8 @@ config :pleroma, :config_description, [
%{
group: :pleroma,
key: :emoji,
+ tab: :emoji,
+ tab_label: "Emoji",
type: :group,
children: [
%{
@@ -2505,6 +2579,8 @@ config :pleroma, :config_description, [
%{
group: :pleroma,
key: :rate_limit,
+ tab: :rate_limits,
+ tab_label: "Rate limiters",
type: :group,
description:
"Rate limit settings. This is an advanced feature enabled only for :authentication by default.",
@@ -2565,6 +2641,8 @@ config :pleroma, :config_description, [
},
%{
group: :esshd,
+ tab: :esshd,
+ tab_label: "BBS / SSH access",
label: "ESSHD",
type: :group,
description:
@@ -2604,6 +2682,8 @@ config :pleroma, :config_description, [
},
%{
group: :mime,
+ tab: :other,
+ tab_label: "Other",
label: "Mime Types",
type: :group,
description: "Mime Types settings",
@@ -2653,6 +2733,8 @@ config :pleroma, :config_description, [
%{
group: :pleroma,
key: :chat,
+ tab: :frontend,
+ tab_label: "Frontend",
type: :group,
description: "Pleroma chat settings",
children: [
@@ -2665,6 +2747,8 @@ config :pleroma, :config_description, [
%{
group: :pleroma,
key: :http,
+ tab: :http,
+ tab_label: "HTTP",
label: "HTTP",
type: :group,
description: "HTTP settings",
@@ -2714,6 +2798,8 @@ config :pleroma, :config_description, [
%{
group: :pleroma,
key: :markup,
+ tab: :frontend,
+ tab_label: "Frontend",
label: "Markup Settings",
type: :group,
children: [
@@ -2745,6 +2831,8 @@ config :pleroma, :config_description, [
%{
group: :pleroma,
key: :user,
+ tab: :activity_pub,
+ tab_label: "ActivityPub",
type: :group,
children: [
%{
@@ -2756,6 +2844,8 @@ config :pleroma, :config_description, [
%{
group: :pleroma,
key: Pleroma.User,
+ tab: :instance,
+ tab_label: "Instance",
type: :group,
children: [
%{
@@ -2805,6 +2895,8 @@ config :pleroma, :config_description, [
},
%{
group: :cors_plug,
+ tab: :http,
+ tab_label: "HTTP",
label: "CORS plug config",
type: :group,
children: [
@@ -2844,6 +2936,8 @@ 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.
@@ -2880,6 +2974,8 @@ config :pleroma, :config_description, [
%{
group: :pleroma,
key: :web_cache_ttl,
+ tab: :http,
+ tab_label: "HTTP",
label: "Web cache TTL",
type: :group,
description:
@@ -2903,6 +2999,8 @@ config :pleroma, :config_description, [
%{
group: :pleroma,
key: :static_fe,
+ tab: :frontend,
+ tab_label: "Frontend",
label: "Static FE",
type: :group,
description:
@@ -2918,6 +3016,8 @@ config :pleroma, :config_description, [
%{
group: :pleroma,
key: :feed,
+ tab: :instance,
+ tab_label: "Instance",
type: :group,
description: "Configure feed rendering",
children: [
@@ -2962,6 +3062,8 @@ config :pleroma, :config_description, [
%{
group: :pleroma,
key: :modules,
+ tab: :other,
+ tab_label: "Other",
type: :group,
description: "Custom Runtime Modules",
children: [
@@ -2975,6 +3077,8 @@ config :pleroma, :config_description, [
%{
group: :pleroma,
key: :streamer,
+ tab: :instance,
+ tab_label: "Instance",
type: :group,
description: "Settings for notifications streamer",
children: [
@@ -2995,6 +3099,8 @@ config :pleroma, :config_description, [
%{
group: :pleroma,
key: :connections_pool,
+ tab: :http,
+ tab_label: "HTTP",
type: :group,
description: "Advanced settings for `Gun` connections pool",
children: [
@@ -3036,6 +3142,8 @@ config :pleroma, :config_description, [
%{
group: :pleroma,
key: :pools,
+ tab: :http,
+ tab_label: "HTTP",
type: :group,
description: "Advanced settings for `Gun` workers pools",
children:
@@ -3055,13 +3163,14 @@ config :pleroma, :config_description, [
key: :max_waiting,
type: :integer,
description:
- "Maximum number of requests waiting for other requests to finish. After this number is reached, the pool will start returning errrors when a new request is made",
+ "Maximum number of requests waiting for other requests to finish. After this number is reached, the pool will start returning errrors when a new request is made.",
suggestions: [10]
},
%{
key: :recv_timeout,
type: :integer,
- description: "Timeout for the pool while gun will wait for response",
+ description:
+ "Timeout for the pool while gun will wait for response (in milliseconds).",
suggestions: [10_000]
}
]
@@ -3071,6 +3180,8 @@ config :pleroma, :config_description, [
%{
group: :pleroma,
key: :hackney_pools,
+ tab: :http,
+ tab_label: "HTTP",
type: :group,
description: "Advanced settings for `Hackney` connections pools",
children: [
@@ -3088,7 +3199,7 @@ config :pleroma, :config_description, [
%{
key: :timeout,
type: :integer,
- description: "Timeout while `hackney` will wait for response.",
+ description: "Timeout while `hackney` will wait for response (in milliseconds).",
suggestions: [150_000]
}
]
@@ -3136,6 +3247,8 @@ config :pleroma, :config_description, [
%{
group: :pleroma,
key: :restrict_unauthenticated,
+ tab: :instance,
+ tab_label: "Instance",
label: "Restrict Unauthenticated",
type: :group,
description:
@@ -3197,6 +3310,8 @@ config :pleroma, :config_description, [
%{
group: :pleroma,
key: Pleroma.Web.ApiSpec.CastAndValidate,
+ tab: :other,
+ tab_label: "Other",
type: :group,
children: [
%{
@@ -3210,6 +3325,8 @@ config :pleroma, :config_description, [
%{
group: :pleroma,
key: :instances_favicons,
+ tab: :instance,
+ tab_label: "Instance",
type: :group,
description: "Control favicons for instances",
children: [
@@ -3223,6 +3340,8 @@ config :pleroma, :config_description, [
%{
group: :ex_aws,
key: :s3,
+ tab: :upload,
+ tab_label: "Upload",
type: :group,
descriptions: "S3 service related settings",
children: [
@@ -3255,6 +3374,8 @@ config :pleroma, :config_description, [
%{
group: :pleroma,
key: :frontends,
+ tab: :frontend,
+ tab_label: "Frontend",
type: :group,
description: "Installed frontends management",
children: [
@@ -3282,6 +3403,8 @@ config :pleroma, :config_description, [
%{
group: :pleroma,
key: Pleroma.Web.Preload,
+ tab: :frontend,
+ tab_label: "Frontend",
type: :group,
description: "Preload-related settings",
children: [
@@ -3301,6 +3424,8 @@ config :pleroma, :config_description, [
%{
group: :pleroma,
key: :majic_pool,
+ tab: :other,
+ tab_label: "Other",
type: :group,
description: "Majic/libmagic configuration",
children: [
@@ -3315,6 +3440,8 @@ config :pleroma, :config_description, [
%{
group: :pleroma,
key: Pleroma.User.Backup,
+ tab: :other,
+ tab_label: "Other",
type: :group,
description: "Account Backup",
children: [
@@ -3335,6 +3462,8 @@ 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: [
@@ -3372,6 +3501,8 @@ config :pleroma, :config_description, [
%{
group: :pleroma,
key: ConcurrentLimiter,
+ tab: :job_queue,
+ tab_label: "Job queue",
type: :group,
description: "Limits configuration for background tasks.",
children: [
diff --git a/lib/pleroma/web/activity_pub/mrf.ex b/lib/pleroma/web/activity_pub/mrf.ex
index f2fec3ff6..432cac69f 100644
--- a/lib/pleroma/web/activity_pub/mrf.ex
+++ b/lib/pleroma/web/activity_pub/mrf.ex
@@ -12,6 +12,7 @@ defmodule Pleroma.Web.ActivityPub.MRF do
group: :pleroma,
key: :mrf,
tab: :mrf,
+ tab_label: "MRF",
label: "MRF",
type: :group,
description: "General MRF settings",
@@ -155,6 +156,7 @@ defmodule Pleroma.Web.ActivityPub.MRF do
|> Map.merge(policy.config_description)
|> Map.put(:group, :pleroma)
|> Map.put(:tab, :mrf)
+ |> Map.put(:tab_label, "MRF")
|> Map.put(:type, :group)
if Enum.all?(@required_description_keys, &Map.has_key?(description, &1)) do
diff --git a/test/pleroma/web/activity_pub/mrf_test.exs b/test/pleroma/web/activity_pub/mrf_test.exs
index 61d308b97..2a5cefd90 100644
--- a/test/pleroma/web/activity_pub/mrf_test.exs
+++ b/test/pleroma/web/activity_pub/mrf_test.exs
@@ -110,6 +110,7 @@ defmodule Pleroma.Web.ActivityPub.MRFTest do
description: "Some description",
group: :pleroma,
tab: :mrf,
+ tab_label: "MRF",
type: :group
}
end