Skip to content

Commit

Permalink
RHINENG-1835: groups sorting by first groups in a list
Browse files Browse the repository at this point in the history
  • Loading branch information
psegedy committed Sep 14, 2023
1 parent a00b23e commit 3c8b113
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion manager/controllers/advisory_systems.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion manager/controllers/baseline_systems.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion manager/controllers/common_attributes.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion manager/controllers/systems.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 3c8b113

Please sign in to comment.