mirror of
https://github.com/fluent/fluentd-ui.git
synced 2026-05-05 19:06:12 +02:00
Sort attrs
Signed-off-by: Kenji Okimoto <okimoto@clear-code.com>
This commit is contained in:
parent
3242b3d639
commit
fd2e16198e
@ -12,7 +12,7 @@ class Fluentd
|
||||
argument = _attributes.delete(self._argument_name.to_s) || ""
|
||||
attrs, elements = parse_attributes(_attributes)
|
||||
if attrs.present? || elements.present?
|
||||
config_element(section_name, argument, attrs, elements)
|
||||
config_element(section_name, argument, attrs.sort.to_h, elements)
|
||||
end
|
||||
end
|
||||
|
||||
@ -28,6 +28,9 @@ class Fluentd
|
||||
attrs = params.to_h.reject do |key, value|
|
||||
skip?(key.to_sym, value)
|
||||
end
|
||||
unless attrs.blank?
|
||||
attrs["@type"] = params.to_h["@type"]
|
||||
end
|
||||
return attrs, elements
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user