Go to file
Javier Sánchez Parra a801e788e8 #915 Add folders to scope
The database represents rooms groups and computers groups scope sets
with "grupos" (groups) and "gruposordenadores" (computers groups) tables
respectively. With this commit, ogServer abstracts both sets and offers
them though the API as the set "folder".

"grupos" table do not only group rooms, it can group other
elements of the database. You can see which kind of elements groups
looking at the column "tipo".

This commit often refers "rooms group" as group and "computers
group" as computers.

Request:
GET /scopes
NO BODY

Response
200 OK
{
  "scope": [
    {
      "name": "center1",
      "type": "center",
      "id": 1,
      "scope": [
        {
          "name": "folder1",
          "type": "folder",
          "id": 1,
          "scope": [
            {
              "name": "folder2",
              "type": "folder",
              "id": 2,
              "scope": []
            },
            {
              "name": "room1",
              "type": "room",
              "id": 2,
              "scope": [
                {
                  "name": "folder3",
                  "type": "folder",
                  "id": 3,
                  "scope": [
                    {
                      "name": "folder4",
                      "type": "folder",
                      "id": 4,
                      "scope": []
                    },
                    {
                      "name": "computer1",
                      "type": "computer",
                      "id": 8,
                      "scope": [],
                      "ip": "192.168.56.12"
                    }
                  ]
                },
                {
                  "name": "computer2",
                  "type": "computer",
                  "id": 7,
                  "scope": [],
                  "ip": "172.18.0.71"
                }
              ]
            }
          ]
        },
        {
          "name": "room2",
          "type": "room",
          "id": 1,
          "scope": []
        }
      ]
    }
  ]
}
2021-11-26 16:48:41 +01:00
cfg #981 Use 'Wants' for mysql systemd unit dependency 2021-07-27 17:12:40 +02:00
src #915 Add folders to scope 2021-11-26 16:48:41 +01:00
tests #915 Add commands and procedures to procedure creation 2021-06-10 17:00:01 +02:00
.gitignore #985 add .gitignore file 2020-06-17 18:20:32 +02:00
COPYING #985 add COPYING file 2020-06-18 16:48:20 +02:00
Makefile.am #915 Add schedule/command 2021-06-09 13:41:28 +02:00
configure.ac #986 rename to ogserver 2020-06-19 11:19:55 +02:00