bareos: master 486f5976

Author Committer Branch Timestamp Parent
joergs joergs master 2020-08-31 20:06 master bfd70531 Pending
Changeset core: console command show in JSON mode names resource types in plural form.

This way, the result of list and show are more similar.
Disadvantage: if only a specific resource if requested, the structure still names the resource in plurar.

*show clients
{
  "jsonrpc": "2.0",
  "id": null,
  "result": {
    "clients": {
      "bareos1-fd": {
        "name": "bareos1-fd",
        "address": "bareos1.example.com"
      },
      "bareos2-fd": {
        "name": "bareos2-fd",
        "address": "bareos2.example.com"
      }
    }
  }
}

*show client=bareos2-fd
{
  "jsonrpc": "2.0",
  "id": null,
  "result": {
    "clients": {
      "bareos2-fd": {
        "name": "bareos2-fd",
        "address": "bareos2.example.com"
      }
    }
  }
}
mod - core/src/console/console_conf.cc Diff File
mod - core/src/dird/dird_conf.cc Diff File
mod - core/src/filed/filed_conf.cc Diff File
mod - core/src/lib/parse_conf.h Diff File
mod - core/src/lib/res.cc Diff File
mod - core/src/qt-tray-monitor/tray_conf.cc Diff File
mod - core/src/stored/stored_conf.cc Diff File