mirror of
https://github.com/fluent/fluentd-ui.git
synced 2026-05-06 03:16:11 +02:00
Omit empty section when dump configuration
Signed-off-by: Kenji Okimoto <okimoto@clear-code.com>
This commit is contained in:
parent
3a2835429a
commit
e980c3a7a3
@ -72,7 +72,7 @@ class Fluentd
|
||||
end
|
||||
elements = section_params.map do |index, _section_params|
|
||||
section_class.new(_section_params).to_config
|
||||
end
|
||||
end.compact
|
||||
end
|
||||
attrs = params.to_h.reject do |key, value|
|
||||
skip?(key.to_sym, value)
|
||||
|
||||
@ -11,7 +11,9 @@ class Fluentd
|
||||
end
|
||||
argument = _attributes.delete(self._argument_name.to_s) || ""
|
||||
attrs, elements = parse_attributes(_attributes)
|
||||
config_element(section_name, argument, attrs, elements)
|
||||
if attrs.present? || elements.present?
|
||||
config_element(section_name, argument, attrs, elements)
|
||||
end
|
||||
end
|
||||
|
||||
def parse_attributes(attributes)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user