From 8aadbd6714e4732c99e9880001019899fcc81b64 Mon Sep 17 00:00:00 2001 From: Michael Mraka Date: Wed, 10 Jul 2024 17:22:19 +0200 Subject: [PATCH] RHINENG-11302: add template filters --- docs/v3/openapi.json | 48 +++++++++++++++++++++++++++ manager/controllers/systems.go | 4 +++ manager/controllers/systems_export.go | 2 ++ 3 files changed, 54 insertions(+) diff --git a/docs/v3/openapi.json b/docs/v3/openapi.json index decee950c..87e0abe68 100644 --- a/docs/v3/openapi.json +++ b/docs/v3/openapi.json @@ -2338,6 +2338,22 @@ "type": "string" } }, + { + "name": "filter[template_name]", + "in": "query", + "description": "Filter", + "schema": { + "type": "string" + } + }, + { + "name": "filter[template_uuid]", + "in": "query", + "description": "Filter", + "schema": { + "type": "string" + } + }, { "name": "filter[arch]", "in": "query", @@ -4113,6 +4129,22 @@ "type": "string" } }, + { + "name": "filter[template_name]", + "in": "query", + "description": "Filter", + "schema": { + "type": "string" + } + }, + { + "name": "filter[template_uuid]", + "in": "query", + "description": "Filter", + "schema": { + "type": "string" + } + }, { "name": "filter[os]", "in": "query", @@ -5377,6 +5409,22 @@ "type": "string" } }, + { + "name": "filter[template_name]", + "in": "query", + "description": "Filter", + "schema": { + "type": "string" + } + }, + { + "name": "filter[template_uuid]", + "in": "query", + "description": "Filter", + "schema": { + "type": "string" + } + }, { "name": "filter[satellite_managed]", "in": "query", diff --git a/manager/controllers/systems.go b/manager/controllers/systems.go index e09fd1fa9..4ef1c39c1 100644 --- a/manager/controllers/systems.go +++ b/manager/controllers/systems.go @@ -234,6 +234,8 @@ func systemsCommon(c *gin.Context) (*gorm.DB, *ListMeta, []string, error) { // @Param filter[culled_timestamp] query string false "Filter" // @Param filter[created] query string false "Filter" // @Param filter[baseline_name] query string false "Filter" +// @Param filter[template_name] query string false "Filter" +// @Param filter[template_uuid] query string false "Filter" // @Param filter[satellite_managed] query string false "Filter" // @Param filter[built_pkgcache] query string false "Filter" // @Param filter[arch] query string false "Filter" @@ -315,6 +317,8 @@ func SystemsListHandler(c *gin.Context) { // @Param filter[culled_timestamp] query string false "Filter" // @Param filter[created] query string false "Filter" // @Param filter[baseline_name] query string false "Filter" +// @Param filter[template_name] query string false "Filter" +// @Param filter[template_uuid] query string false "Filter" // @Param filter[os] query string false "Filter OS version" // @Param filter[osname] query string false "Filter OS name" // @Param filter[osmajor] query string false "Filter OS major version" diff --git a/manager/controllers/systems_export.go b/manager/controllers/systems_export.go index 82f5ae5c3..a2475015e 100644 --- a/manager/controllers/systems_export.go +++ b/manager/controllers/systems_export.go @@ -42,6 +42,8 @@ import ( // @Param filter[system_profile][mssql] query string false "Filter systems by mssql version" // @Param filter[system_profile][mssql][version] query string false "Filter systems by mssql version" // @Param filter[baseline_name] query string false "Filter" +// @Param filter[template_name] query string false "Filter" +// @Param filter[template_uuid] query string false "Filter" // @Param filter[arch] query string false "Filter" // @Param filter[os] query string false "Filter OS version" // @Param filter[osname] query string false "Filter OS name"