diff options
author | Alexander Strizhakov <alex.strizhakov@gmail.com> | 2021-03-02 19:45:32 +0300 |
---|---|---|
committer | Alexander Strizhakov <alex.strizhakov@gmail.com> | 2021-05-11 18:43:22 +0300 |
commit | a4487de27e5f4b744fa96b767f4252e17e6ec56d (patch) | |
tree | ace288a6e062674e9671f66f4082533bb3f948c1 | |
parent | 19f8ad8e1d9ce14fd9291038cf9ffeb60a1a3ca1 (diff) | |
download | pleroma-a4487de27e5f4b744fa96b767f4252e17e6ec56d.tar.gz |
added tabs setting to the description.exs
-rw-r--r-- | config/description.exs | 95 | ||||
-rw-r--r-- | docs/development/API/admin_api.md | 6 |
2 files changed, 28 insertions, 73 deletions
diff --git a/config/description.exs b/config/description.exs index 00ccdc94c..e3ea9a498 100644 --- a/config/description.exs +++ b/config/description.exs @@ -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", @@ -513,7 +529,6 @@ config :pleroma, :config_description, [ group: :pleroma, key: :instance, tab: :instance, - tab_label: "Instance", type: :group, description: "Instance-related settings", children: [ @@ -964,7 +979,6 @@ config :pleroma, :config_description, [ group: :pleroma, key: :welcome, tab: :instance, - tab_label: "Instance", type: :group, description: "Welcome messages settings", children: [ @@ -1072,7 +1086,6 @@ config :pleroma, :config_description, [ %{ group: :logger, tab: :logger, - tab_label: "Logger", type: :group, description: "Logger-related settings", children: [ @@ -1090,7 +1103,6 @@ config :pleroma, :config_description, [ type: :group, key: :ex_syslogger, tab: :logger, - tab_label: "Logger", label: "ExSyslogger", description: "ExSyslogger-related settings", children: [ @@ -1125,7 +1137,6 @@ config :pleroma, :config_description, [ type: :group, key: :console, tab: :logger, - tab_label: "Logger", label: "Console Logger", description: "Console logger settings", children: [ @@ -1151,7 +1162,6 @@ config :pleroma, :config_description, [ %{ group: :quack, tab: :logger, - tab_label: "Logger", type: :group, label: "Quack Logger", description: "Quack-related settings", @@ -1193,7 +1203,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 " <> @@ -1430,7 +1439,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", @@ -1472,7 +1480,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.", @@ -1513,7 +1520,6 @@ config :pleroma, :config_description, [ group: :pleroma, key: :media_proxy, tab: :media_proxy, - tab_label: "Media Proxy", type: :group, description: "Media proxy", children: [ @@ -1601,7 +1607,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: [ @@ -1640,7 +1645,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: [ @@ -1672,7 +1676,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: [ @@ -1696,7 +1699,6 @@ config :pleroma, :config_description, [ group: :pleroma, key: :gopher, tab: :gopher, - tab_label: "Gopher", type: :group, description: "Gopher settings", children: [ @@ -1730,7 +1732,6 @@ config :pleroma, :config_description, [ group: :pleroma, key: :activitypub, tab: :activity_pub, - tab_label: "ActivityPub", label: "ActivityPub", type: :group, description: "ActivityPub-related settings", @@ -1768,7 +1769,6 @@ config :pleroma, :config_description, [ group: :pleroma, key: :http_security, tab: :http, - tab_label: "HTTP", label: "HTTP security", type: :group, description: "HTTP security settings", @@ -1817,7 +1817,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: @@ -1849,7 +1848,6 @@ config :pleroma, :config_description, [ group: :pleroma, key: Pleroma.Captcha, tab: :captcha, - tab_label: "Captcha", type: :group, description: "Captcha-related settings", children: [ @@ -1876,7 +1874,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" <> @@ -1893,7 +1890,6 @@ config :pleroma, :config_description, [ %{ group: :pleroma, tab: :instance, - tab_label: "Instance", label: "Pleroma Admin Token", type: :group, description: @@ -1913,7 +1909,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.", @@ -2018,7 +2013,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: [ @@ -2037,7 +2031,6 @@ config :pleroma, :config_description, [ group: :pleroma, key: Pleroma.Web.Metadata, tab: :metadata, - tab_label: "Metadata", type: :group, description: "Metadata-related settings", children: [ @@ -2064,7 +2057,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", @@ -2120,7 +2112,6 @@ config :pleroma, :config_description, [ group: :pleroma, key: Pleroma.Formatter, tab: :link_formatter, - tab_label: "Link Formatter", label: "Linkify", type: :group, description: @@ -2173,7 +2164,6 @@ config :pleroma, :config_description, [ group: :pleroma, key: Pleroma.ScheduledActivity, tab: :instance, - tab_label: "Instance", type: :group, description: "Scheduled activities settings", children: [ @@ -2202,7 +2192,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: [ @@ -2223,7 +2212,6 @@ config :pleroma, :config_description, [ group: :pleroma, label: "Pleroma Authenticator", tab: :authentication, - tab_label: "Authentication", type: :group, description: "Authenticator", children: [ @@ -2238,7 +2226,6 @@ config :pleroma, :config_description, [ group: :pleroma, key: :ldap, tab: :authentication, - tab_label: "Authentication", label: "LDAP", type: :group, description: @@ -2338,7 +2325,6 @@ config :pleroma, :config_description, [ group: :pleroma, key: :auth, tab: :authentication, - tab_label: "Authentication", type: :group, description: "Authentication / authorization settings", children: [ @@ -2374,7 +2360,6 @@ config :pleroma, :config_description, [ group: :pleroma, key: :email_notifications, tab: :mailer, - tab_label: "Mailer", type: :group, description: "Email notifications settings", children: [ @@ -2425,7 +2410,6 @@ config :pleroma, :config_description, [ group: :pleroma, key: Pleroma.Emails.UserEmail, tab: :mailer, - tab_label: "Mailer", type: :group, description: "Email template settings", children: [ @@ -2488,7 +2472,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: [ @@ -2503,7 +2486,6 @@ config :pleroma, :config_description, [ group: :pleroma, key: :oauth2, tab: :authentication, - tab_label: "Authentication", label: "OAuth2", type: :group, description: "Configure OAuth 2 provider capabilities", @@ -2531,7 +2513,6 @@ config :pleroma, :config_description, [ group: :pleroma, key: :emoji, tab: :emoji, - tab_label: "Emoji", type: :group, children: [ %{ @@ -2579,8 +2560,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.", @@ -2642,7 +2622,6 @@ config :pleroma, :config_description, [ %{ group: :esshd, tab: :esshd, - tab_label: "BBS / SSH access", label: "ESSHD", type: :group, description: @@ -2683,7 +2662,6 @@ config :pleroma, :config_description, [ %{ group: :mime, tab: :other, - tab_label: "Other", label: "Mime Types", type: :group, description: "Mime Types settings", @@ -2734,7 +2712,6 @@ config :pleroma, :config_description, [ group: :pleroma, key: :chat, tab: :frontend, - tab_label: "Frontend", type: :group, description: "Pleroma chat settings", children: [ @@ -2748,7 +2725,6 @@ config :pleroma, :config_description, [ group: :pleroma, key: :http, tab: :http, - tab_label: "HTTP", label: "HTTP", type: :group, description: "HTTP settings", @@ -2799,7 +2775,6 @@ config :pleroma, :config_description, [ group: :pleroma, key: :markup, tab: :frontend, - tab_label: "Frontend", label: "Markup Settings", type: :group, children: [ @@ -2832,7 +2807,6 @@ config :pleroma, :config_description, [ group: :pleroma, key: :user, tab: :activity_pub, - tab_label: "ActivityPub", type: :group, children: [ %{ @@ -2845,7 +2819,6 @@ config :pleroma, :config_description, [ group: :pleroma, key: Pleroma.User, tab: :instance, - tab_label: "Instance", type: :group, children: [ %{ @@ -2896,7 +2869,6 @@ config :pleroma, :config_description, [ %{ group: :cors_plug, tab: :http, - tab_label: "HTTP", label: "CORS plug config", type: :group, children: [ @@ -2937,7 +2909,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. @@ -2975,7 +2946,6 @@ config :pleroma, :config_description, [ group: :pleroma, key: :web_cache_ttl, tab: :http, - tab_label: "HTTP", label: "Web cache TTL", type: :group, description: @@ -3000,7 +2970,6 @@ config :pleroma, :config_description, [ group: :pleroma, key: :static_fe, tab: :frontend, - tab_label: "Frontend", label: "Static FE", type: :group, description: @@ -3017,7 +2986,6 @@ config :pleroma, :config_description, [ group: :pleroma, key: :feed, tab: :instance, - tab_label: "Instance", type: :group, description: "Configure feed rendering", children: [ @@ -3063,7 +3031,6 @@ config :pleroma, :config_description, [ group: :pleroma, key: :modules, tab: :other, - tab_label: "Other", type: :group, description: "Custom Runtime Modules", children: [ @@ -3078,7 +3045,6 @@ config :pleroma, :config_description, [ group: :pleroma, key: :streamer, tab: :instance, - tab_label: "Instance", type: :group, description: "Settings for notifications streamer", children: [ @@ -3100,7 +3066,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: [ @@ -3143,7 +3108,6 @@ config :pleroma, :config_description, [ group: :pleroma, key: :pools, tab: :http, - tab_label: "HTTP", type: :group, description: "Advanced settings for `Gun` workers pools", children: @@ -3181,7 +3145,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: [ @@ -3248,7 +3211,6 @@ config :pleroma, :config_description, [ group: :pleroma, key: :restrict_unauthenticated, tab: :instance, - tab_label: "Instance", label: "Restrict Unauthenticated", type: :group, description: @@ -3311,7 +3273,6 @@ config :pleroma, :config_description, [ group: :pleroma, key: Pleroma.Web.ApiSpec.CastAndValidate, tab: :other, - tab_label: "Other", type: :group, children: [ %{ @@ -3326,7 +3287,6 @@ config :pleroma, :config_description, [ group: :pleroma, key: :instances_favicons, tab: :instance, - tab_label: "Instance", type: :group, description: "Control favicons for instances", children: [ @@ -3341,7 +3301,6 @@ config :pleroma, :config_description, [ group: :ex_aws, key: :s3, tab: :upload, - tab_label: "Upload", type: :group, descriptions: "S3 service related settings", children: [ @@ -3375,7 +3334,6 @@ config :pleroma, :config_description, [ group: :pleroma, key: :frontends, tab: :frontend, - tab_label: "Frontend", type: :group, description: "Installed frontends management", children: [ @@ -3404,7 +3362,6 @@ config :pleroma, :config_description, [ group: :pleroma, key: Pleroma.Web.Preload, tab: :frontend, - tab_label: "Frontend", type: :group, description: "Preload-related settings", children: [ @@ -3425,7 +3382,6 @@ config :pleroma, :config_description, [ group: :pleroma, key: :majic_pool, tab: :other, - tab_label: "Other", type: :group, description: "Majic/libmagic configuration", children: [ @@ -3441,7 +3397,6 @@ config :pleroma, :config_description, [ group: :pleroma, key: Pleroma.User.Backup, tab: :other, - tab_label: "Other", type: :group, description: "Account Backup", children: [ @@ -3463,7 +3418,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: [ @@ -3502,7 +3456,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: [ diff --git a/docs/development/API/admin_api.md b/docs/development/API/admin_api.md index 8f855d251..902403a40 100644 --- a/docs/development/API/admin_api.md +++ b/docs/development/API/admin_api.md @@ -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` |