fluentd-ui/app/views/api/settings/index.json.jbuilder
Kenji Okimoto 741c23f335
Change return value of /api/settings
Current version returns like the following:

```
{
  "ROOT" => {
    "sources" => [],
    "filters" => [],
    "matches" => [],
  },
  "@INPUT" => {
    "sources" => [],
    "filters" => [],
    "matches" => [],
  }
}
```

Signed-off-by: Kenji Okimoto <okimoto@clear-code.com>
2018-08-23 17:10:43 +09:00

12 lines
313 B
Ruby

@config.group_by_label.each do |label_name, types|
json.set!(label_name) do
types.each do |type, elements|
json.set!(type) do
json.array!(elements) do |element|
json.partial! "api/settings/element", current_label: label_name, element: element
end
end
end
end
end