fluentd-ui/app/views/api/settings/_element.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

9 lines
273 B
Ruby

json.id element_id(current_label, element)
json.current_label current_label || "ROOT"
json.label element["@label"] || element["label"]
json.name element.name
json.type element["@type"] || element["type"]
json.arg element.arg
json.settings element
json.content element.to_s