Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions webapp/sources/api-doc/paths/groups/tree.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ get:
required: false
schema:
type: boolean
default: true
example: false
default: false
example: true
description: Whether to include system categories and groups in results.
responses:
"200":
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ class GroupsApi(
includeSystem <- zioJsonExtractor.extractIncludeSystem(req).toIO
res <-
service
.getCategoryTree(includeSystem.getOrElse(true))
.getCategoryTree(includeSystem.getOrElse(false))
.map(JRGroupCategoriesFull(_))
.chainError("Could not fetch Group tree")
} yield {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1994,15 +1994,6 @@ response:
}
],
"targets" : []
},
{
"id" : "system-category1",
"name" : "system category 1",
"description" : "a system group category",
"parent" : "GroupRoot",
"categories" : [],
"groups" : [],
"targets" : []
}
],
"groups" : [
Expand Down Expand Up @@ -2257,66 +2248,16 @@ response:
"properties" : [],
"target" : "group:a-group-for-root-only",
"system" : false
},
{
"id" : "all-nodes",
"displayName" : "All nodes",
"description" : "All nodes known by Rudder (including Rudder policy servers)",
"category" : "GroupRoot",
"nodeIds" : [
"0",
"1",
"10",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9"
],
"dynamic" : false,
"enabled" : true,
"groupClass" : [
"group_all_nodes",
"group_all_nodes"
],
"properties" : [],
"target" : "group:all-nodes",
"system" : true
}
],
"targets" : [
{
"id" : "policyServer:root",
"displayName" : "special:policyServer_root",
"description" : "The root policy server",
"enabled" : true,
"target" : "policyServer:root"
},
{
"id" : "special:all_exceptPolicyServers",
"displayName" : "special:all_exceptPolicyServers",
"description" : "All groups without policy servers",
"enabled" : true,
"target" : "special:all_exceptPolicyServers"
},
{
"id" : "special:all",
"displayName" : "special:all",
"description" : "All nodes",
"enabled" : true,
"target" : "special:all"
}
]
"targets" : []
}
}
}
---
description: List all group categories and group without system ones in a tree format
description: List all group categories and group with system ones in a tree format
method: GET
url: /api/latest/groups/tree?includeSystem=false
url: /api/latest/groups/tree?includeSystem=true
response:
code: 200
content: >-
Expand Down Expand Up @@ -2440,6 +2381,15 @@ response:
}
],
"targets" : []
},
{
"id" : "system-category1",
"name" : "system category 1",
"description" : "a system group category",
"parent" : "GroupRoot",
"categories" : [],
"groups" : [],
"targets" : []
}
],
"groups" : [
Expand Down Expand Up @@ -2694,9 +2644,59 @@ response:
"properties" : [],
"target" : "group:a-group-for-root-only",
"system" : false
},
{
"id" : "all-nodes",
"displayName" : "All nodes",
"description" : "All nodes known by Rudder (including Rudder policy servers)",
"category" : "GroupRoot",
"nodeIds" : [
"0",
"1",
"10",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9"
],
"dynamic" : false,
"enabled" : true,
"groupClass" : [
"group_all_nodes",
"group_all_nodes"
],
"properties" : [],
"target" : "group:all-nodes",
"system" : true
}
],
"targets" : []
"targets" : [
{
"id" : "policyServer:root",
"displayName" : "special:policyServer_root",
"description" : "The root policy server",
"enabled" : true,
"target" : "policyServer:root"
},
{
"id" : "special:all_exceptPolicyServers",
"displayName" : "special:all_exceptPolicyServers",
"description" : "All groups without policy servers",
"enabled" : true,
"target" : "special:all_exceptPolicyServers"
},
{
"id" : "special:all",
"displayName" : "special:all",
"description" : "All nodes",
"enabled" : true,
"target" : "special:all"
}
]
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ getGroupsTree model =
request
{ method = "GET"
, headers = [header "X-Requested-With" "XMLHttpRequest"]
, url = getUrl model ["groups", "tree"] []
, url = getUrl model ["groups", "tree"] [Url.Builder.string "includeSystem" "true"]
, body = emptyBody
, expect = expectJson GetGroupsTreeResult decodeGetGroupsTree
, timeout = Nothing
Expand Down
Loading