Fix parsing value for ip_whitelist setting
This commit is contained in:
parent
f50e787fa9
commit
aa2b9102c3
2 changed files with 3 additions and 0 deletions
|
@ -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')) ||
|
||||
|
|
Loading…
Reference in a new issue