mirror of
https://github.com/fluent/fluentd-ui.git
synced 2026-05-05 19:06:12 +02:00
Process nested multi section properly
Signed-off-by: Kenji Okimoto <okimoto@clear-code.com>
This commit is contained in:
parent
a009222a2f
commit
1d3d4eaebe
@ -22,9 +22,17 @@ class Fluentd
|
||||
end
|
||||
elements = sections.map do |key, section_params|
|
||||
if section_params.present?
|
||||
self._sections[key.to_sym].new(section_params).to_config
|
||||
section_class = self._sections[key.to_sym]
|
||||
if section_class.multi?
|
||||
section_params.map do |index, _section_params|
|
||||
section_class.new(_section_params).to_config
|
||||
end
|
||||
else
|
||||
section_class.new(section_params).to_config
|
||||
end
|
||||
end
|
||||
end.compact
|
||||
end
|
||||
elements = elements.flatten.compact
|
||||
attrs = params.to_h.reject do |key, value|
|
||||
skip?(key.to_sym, value)
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user