Skip to content
Snippets Groups Projects
Commit aa2b9102 authored by Angelina Filippova's avatar Angelina Filippova
Browse files

Fix parsing value for ip_whitelist setting

parent f50e787f
No related branches found
No related tags found
1 merge request!186Add Pleroma.Web.Endpoint.MetricsExporter settings
Pipeline #33474 passed
......@@ -100,6 +100,8 @@ export const parseTuples = (tuples, key) => {
accum[item.tuple[0]] = parseStringOrTupleValue(item.tuple[0], item.tuple[1])
} else if (item.tuple[0] === ':args') {
accum[item.tuple[0]] = parseNonTuples(item.tuple[0], item.tuple[1])
} else if (item.tuple[0] === ':ip_whitelist') {
accum[item.tuple[0]] = item.tuple[1].map(ip => typeof ip === 'string' ? ip : ip.tuple.join('.'))
} else if (Array.isArray(item.tuple[1]) &&
(typeof item.tuple[1][0] === 'object' && !Array.isArray(item.tuple[1][0])) && item.tuple[1][0]['tuple']) {
accum[item.tuple[0]] = parseTuples(item.tuple[1], item.tuple[0])
......
......@@ -363,6 +363,7 @@ export default {
},
renderMultipleSelect(type) {
return !this.reducedSelects && Array.isArray(type) && this.setting.key !== ':backends' && this.setting.key !== ':args' && (
this.setting.key === ':ip_whitelist' ||
type.includes('module') ||
(type.includes('list') && type.includes('string')) ||
(type.includes('list') && type.includes('atom')) ||
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment