diff --git a/docs/v3/openapi.json b/docs/v3/openapi.json index 5fbfbe508..c08ede458 100644 --- a/docs/v3/openapi.json +++ b/docs/v3/openapi.json @@ -365,7 +365,8 @@ "last_upload", "stale", "status", - "template" + "template", + "groups" ] } }, @@ -1053,7 +1054,8 @@ "applicable_rhba_count", "applicable_rhea_count", "applicable_other_count", - "last_upload" + "last_upload", + "groups" ] } }, @@ -4528,7 +4530,8 @@ "other_count", "stale", "packages_installed", - "baseline_name" + "baseline_name", + "groups" ] } }, diff --git a/manager/controllers/advisory_systems.go b/manager/controllers/advisory_systems.go index d535678d3..89c1e256a 100644 --- a/manager/controllers/advisory_systems.go +++ b/manager/controllers/advisory_systems.go @@ -82,7 +82,7 @@ func advisorySystemsCommon(c *gin.Context) (*gorm.DB, *ListMeta, []string, error // @Param advisory_id path string true "Advisory ID" // @Param limit query int false "Limit for paging, set -1 to return all" // @Param offset query int false "Offset for paging" -// @Param sort query string false "Sort field" Enums(id,display_name,last_evaluation,last_upload,stale,status,template) +// @Param sort query string false "Sort field" Enums(id,display_name,last_evaluation,last_upload,stale,status,template,groups) // @Param search query string false "Find matching text" // @Param filter[id] query string false "Filter" // @Param filter[display_name] query string false "Filter" diff --git a/manager/controllers/baseline_systems.go b/manager/controllers/baseline_systems.go index 1ebe10f7c..430738cab 100644 --- a/manager/controllers/baseline_systems.go +++ b/manager/controllers/baseline_systems.go @@ -147,7 +147,7 @@ func baselineSystemsCommon(c *gin.Context, account, apiver int, groups map[strin // @Param baseline_id path int true "Baseline ID" // @Param limit query int false "Limit for paging, set -1 to return all" // @Param offset query int false "Offset for paging" -// @Param sort query string false "Sort field" Enums(id,display_name,os,installable_rhsa_count,installable_rhba_count,installable_rhea_count,installable_other_count,applicable_rhsa_count,applicable_rhba_count,applicable_rhea_count,applicable_other_count,last_upload) +// @Param sort query string false "Sort field" Enums(id,display_name,os,installable_rhsa_count,installable_rhba_count,installable_rhea_count,installable_other_count,applicable_rhsa_count,applicable_rhba_count,applicable_rhea_count,applicable_other_count,last_upload,groups) // @Param search query string false "Find matching text" // @Param filter[display_name] query string false "Filter" // @Param filter[os] query string false "Filter" diff --git a/manager/controllers/common_attributes.go b/manager/controllers/common_attributes.go index a5458a2c3..181d9a2ab 100644 --- a/manager/controllers/common_attributes.go +++ b/manager/controllers/common_attributes.go @@ -41,7 +41,7 @@ type SystemTags struct { } type SystemGroups struct { - Groups SystemGroupsList `json:"groups" csv:"groups" gorm:"-"` + Groups SystemGroupsList `json:"groups" csv:"groups" gorm:"-" order_query:"ih.groups->>0"` } type BaselineAttributes struct { diff --git a/manager/controllers/systems.go b/manager/controllers/systems.go index ec2b11860..d3a3ef5f3 100644 --- a/manager/controllers/systems.go +++ b/manager/controllers/systems.go @@ -193,7 +193,7 @@ func systemsCommon(c *gin.Context, apiver int) (*gorm.DB, *ListMeta, []string, e // @Produce json // @Param limit query int false "Limit for paging, set -1 to return all" // @Param offset query int false "Offset for paging" -// @Param sort query string false "Sort field" Enums(id,display_name,last_upload,rhsa_count,rhba_count,rhea_count,other_count,stale,packages_installed,baseline_name) +// @Param sort query string false "Sort field" Enums(id,display_name,last_upload,rhsa_count,rhba_count,rhea_count,other_count,stale,packages_installed,baseline_name,groups) // @Param search query string false "Find matching text" // @Param filter[id] query string false "Filter" // @Param filter[display_name] query string false "Filter"