From f1a67cda607b630a4985eddce53fe0559dd9aac8 Mon Sep 17 00:00:00 2001 From: Nitin Dhevar Date: Tue, 6 Aug 2024 12:04:35 -0400 Subject: [PATCH 1/3] adding gettingStartedBanner capability --- operator/v1/types_console.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/operator/v1/types_console.go b/operator/v1/types_console.go index 74dd8f4b073..9343291dcd1 100644 --- a/operator/v1/types_console.go +++ b/operator/v1/types_console.go @@ -105,6 +105,9 @@ type ConsoleCapabilityName string const ( // lightspeedButton is the name for the Lightspeed button HTML element. LightspeedButton ConsoleCapabilityName = "LightspeedButton" + + // gettingStartedState defines the state of getting started resources in the console UI. + GettingStartedBannerState ConsoleCapabilityName = "GettingStartedBannerState" ) // CapabilityState defines the state of the capability in the console UI. @@ -132,8 +135,8 @@ type CapabilityVisibility struct { // Capabilities contains set of UI capabilities and their state in the console UI. type Capability struct { // name is the unique name of a capability. - // Available capabilities are LightspeedButton. - // +kubebuilder:validation:Enum:="LightspeedButton"; + // Available capabilities are LightspeedButton and GettingStartedBannerState. + // +kubebuilder:validation:Enum:="LightspeedButton";"GettingStartedBannerState" // +kubebuilder:validation:Required Name ConsoleCapabilityName `json:"name"` // visibility defines the visibility state of the capability. @@ -148,7 +151,7 @@ type ConsoleCustomization struct { // Available capabilities are LightspeedButton. // Each of the available capabilities may appear only once in the list. // +kubebuilder:validation:MinItems=1 - // +kubebuilder:validation:MaxItems=1 + // +kubebuilder:validation:MaxItems=2 // +listType=map // +listMapKey=name // +optional From 179f32a16c20e0311f969a0b1d782267d268d1cb Mon Sep 17 00:00:00 2001 From: Nitin Dhevar Date: Wed, 7 Aug 2024 09:18:26 -0400 Subject: [PATCH 2/3] renaming the gettingStartedBanner capability --- operator/v1/types_console.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/operator/v1/types_console.go b/operator/v1/types_console.go index 9343291dcd1..aa39b2f950f 100644 --- a/operator/v1/types_console.go +++ b/operator/v1/types_console.go @@ -106,8 +106,8 @@ const ( // lightspeedButton is the name for the Lightspeed button HTML element. LightspeedButton ConsoleCapabilityName = "LightspeedButton" - // gettingStartedState defines the state of getting started resources in the console UI. - GettingStartedBannerState ConsoleCapabilityName = "GettingStartedBannerState" + // gettingStartedBanner is the name of the 'Getting started resources' banner in the console UI Overview page. + GettingStartedBanner ConsoleCapabilityName = "GettingStartedBanner" ) // CapabilityState defines the state of the capability in the console UI. @@ -135,8 +135,8 @@ type CapabilityVisibility struct { // Capabilities contains set of UI capabilities and their state in the console UI. type Capability struct { // name is the unique name of a capability. - // Available capabilities are LightspeedButton and GettingStartedBannerState. - // +kubebuilder:validation:Enum:="LightspeedButton";"GettingStartedBannerState" + // Available capabilities are LightspeedButton and GettingStartedBanner. + // +kubebuilder:validation:Enum:="LightspeedButton";"GettingStartedBanner" // +kubebuilder:validation:Required Name ConsoleCapabilityName `json:"name"` // visibility defines the visibility state of the capability. @@ -148,7 +148,7 @@ type Capability struct { type ConsoleCustomization struct { // capabilities defines an array of capabilities that can be interacted with in the console UI. // Each capability defines a visual state that can be interacted with the console to render in the UI. - // Available capabilities are LightspeedButton. + // Available capabilities are LightspeedButton and GettingStartedBanner. // Each of the available capabilities may appear only once in the list. // +kubebuilder:validation:MinItems=1 // +kubebuilder:validation:MaxItems=2 From 01cacf5e79cf873912aca8dc8b97ee1f6e2c0c58 Mon Sep 17 00:00:00 2001 From: Nitin Dhevar Date: Wed, 7 Aug 2024 09:59:49 -0400 Subject: [PATCH 3/3] updating docs --- openapi/generated_openapi/zz_generated.openapi.go | 4 ++-- openapi/openapi.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/openapi/generated_openapi/zz_generated.openapi.go b/openapi/generated_openapi/zz_generated.openapi.go index 361048891af..e6f116565c7 100644 --- a/openapi/generated_openapi/zz_generated.openapi.go +++ b/openapi/generated_openapi/zz_generated.openapi.go @@ -44702,7 +44702,7 @@ func schema_openshift_api_operator_v1_Capability(ref common.ReferenceCallback) c Properties: map[string]spec.Schema{ "name": { SchemaProps: spec.SchemaProps{ - Description: "name is the unique name of a capability. Available capabilities are LightspeedButton.", + Description: "name is the unique name of a capability. Available capabilities are LightspeedButton and GettingStartedBanner.", Default: "", Type: []string{"string"}, Format: "", @@ -45644,7 +45644,7 @@ func schema_openshift_api_operator_v1_ConsoleCustomization(ref common.ReferenceC }, }, SchemaProps: spec.SchemaProps{ - Description: "capabilities defines an array of capabilities that can be interacted with in the console UI. Each capability defines a visual state that can be interacted with the console to render in the UI. Available capabilities are LightspeedButton. Each of the available capabilities may appear only once in the list.", + Description: "capabilities defines an array of capabilities that can be interacted with in the console UI. Each capability defines a visual state that can be interacted with the console to render in the UI. Available capabilities are LightspeedButton and GettingStartedBanner. Each of the available capabilities may appear only once in the list.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ diff --git a/openapi/openapi.json b/openapi/openapi.json index ae1ff086db4..f4f4b2194ec 100644 --- a/openapi/openapi.json +++ b/openapi/openapi.json @@ -25987,7 +25987,7 @@ ], "properties": { "name": { - "description": "name is the unique name of a capability. Available capabilities are LightspeedButton.", + "description": "name is the unique name of a capability. Available capabilities are LightspeedButton and GettingStartedBanner.", "type": "string", "default": "" }, @@ -26551,7 +26551,7 @@ "type": "string" }, "capabilities": { - "description": "capabilities defines an array of capabilities that can be interacted with in the console UI. Each capability defines a visual state that can be interacted with the console to render in the UI. Available capabilities are LightspeedButton. Each of the available capabilities may appear only once in the list.", + "description": "capabilities defines an array of capabilities that can be interacted with in the console UI. Each capability defines a visual state that can be interacted with the console to render in the UI. Available capabilities are LightspeedButton and GettingStartedBanner. Each of the available capabilities may appear only once in the list.", "type": "array", "items": { "default": {},