diff --git a/.config/api-rules/violation_exceptions.list b/.config/api-rules/violation_exceptions.list index a407c5f376..5d6975b015 100644 --- a/.config/api-rules/violation_exceptions.list +++ b/.config/api-rules/violation_exceptions.list @@ -52,8 +52,6 @@ API rule violation: list_type_missing,kmodules.xyz/resource-metadata/apis/shared API rule violation: list_type_missing,kmodules.xyz/resource-metadata/apis/shared,UIParameterTemplate,InstanceLabelPaths API rule violation: list_type_missing,kmodules.xyz/resource-metadata/apis/shared,UIParameters,Actions API rule violation: list_type_missing,kmodules.xyz/resource-metadata/apis/shared,UIParameters,InstanceLabelPaths -API rule violation: list_type_missing,kmodules.xyz/resource-metadata/apis/ui/v1alpha1,ActionTemplate,Icons -API rule violation: list_type_missing,kmodules.xyz/resource-metadata/apis/ui/v1alpha1,ActionTemplateGroup,Items API rule violation: list_type_missing,kmodules.xyz/resource-metadata/apis/ui/v1alpha1,ChartInfo,ValuesFiles API rule violation: list_type_missing,kmodules.xyz/resource-metadata/apis/ui/v1alpha1,Dashboard,Panels API rule violation: list_type_missing,kmodules.xyz/resource-metadata/apis/ui/v1alpha1,Dashboard,Vars @@ -127,4 +125,3 @@ API rule violation: names_match,kmodules.xyz/offshoot-api/api/v1,VolumeSource,St API rule violation: names_match,kmodules.xyz/resource-metadata/apis/shared,Action,OperationID API rule violation: names_match,kmodules.xyz/resource-metadata/apis/shared,ActionTemplate,OperationID API rule violation: names_match,kmodules.xyz/resource-metadata/apis/shared,RegistryProxies,AppsCode -API rule violation: names_match,kmodules.xyz/resource-metadata/apis/ui/v1alpha1,ActionTemplate,OperationID diff --git a/apis/core/v1alpha1/openapi_generated.go b/apis/core/v1alpha1/openapi_generated.go index 8548ca6313..53efce8b83 100644 --- a/apis/core/v1alpha1/openapi_generated.go +++ b/apis/core/v1alpha1/openapi_generated.go @@ -20971,6 +20971,12 @@ func schema_kmodulesxyz_resource_metadata_apis_shared_Action(ref common.Referenc Format: "", }, }, + "icon": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, "description": { SchemaProps: spec.SchemaProps{ Type: []string{"string"}, @@ -21037,6 +21043,12 @@ func schema_kmodulesxyz_resource_metadata_apis_shared_ActionGroup(ref common.Ref Format: "", }, }, + "icon": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, "description": { SchemaProps: spec.SchemaProps{ Type: []string{"string"}, @@ -21077,6 +21089,12 @@ func schema_kmodulesxyz_resource_metadata_apis_shared_ActionInfo(ref common.Refe Format: "", }, }, + "icon": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, "description": { SchemaProps: spec.SchemaProps{ Type: []string{"string"}, @@ -21101,6 +21119,12 @@ func schema_kmodulesxyz_resource_metadata_apis_shared_ActionTemplate(ref common. Format: "", }, }, + "icon": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, "description": { SchemaProps: spec.SchemaProps{ Type: []string{"string"}, @@ -21152,6 +21176,12 @@ func schema_kmodulesxyz_resource_metadata_apis_shared_ActionTemplate(ref common. Format: "", }, }, + "partOf": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, }, Required: []string{"operationId", "flow", "enforceQuota"}, }, @@ -21173,6 +21203,12 @@ func schema_kmodulesxyz_resource_metadata_apis_shared_ActionTemplateGroup(ref co Format: "", }, }, + "icon": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, "description": { SchemaProps: spec.SchemaProps{ Type: []string{"string"}, diff --git a/apis/identity/v1alpha1/openapi_generated.go b/apis/identity/v1alpha1/openapi_generated.go index d8b9744435..65a41521a1 100644 --- a/apis/identity/v1alpha1/openapi_generated.go +++ b/apis/identity/v1alpha1/openapi_generated.go @@ -20046,6 +20046,12 @@ func schema_kmodulesxyz_resource_metadata_apis_shared_Action(ref common.Referenc Format: "", }, }, + "icon": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, "description": { SchemaProps: spec.SchemaProps{ Type: []string{"string"}, @@ -20112,6 +20118,12 @@ func schema_kmodulesxyz_resource_metadata_apis_shared_ActionGroup(ref common.Ref Format: "", }, }, + "icon": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, "description": { SchemaProps: spec.SchemaProps{ Type: []string{"string"}, @@ -20152,6 +20164,12 @@ func schema_kmodulesxyz_resource_metadata_apis_shared_ActionInfo(ref common.Refe Format: "", }, }, + "icon": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, "description": { SchemaProps: spec.SchemaProps{ Type: []string{"string"}, @@ -20176,6 +20194,12 @@ func schema_kmodulesxyz_resource_metadata_apis_shared_ActionTemplate(ref common. Format: "", }, }, + "icon": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, "description": { SchemaProps: spec.SchemaProps{ Type: []string{"string"}, @@ -20227,6 +20251,12 @@ func schema_kmodulesxyz_resource_metadata_apis_shared_ActionTemplate(ref common. Format: "", }, }, + "partOf": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, }, Required: []string{"operationId", "flow", "enforceQuota"}, }, @@ -20248,6 +20278,12 @@ func schema_kmodulesxyz_resource_metadata_apis_shared_ActionTemplateGroup(ref co Format: "", }, }, + "icon": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, "description": { SchemaProps: spec.SchemaProps{ Type: []string{"string"}, diff --git a/apis/management/v1alpha1/openapi_generated.go b/apis/management/v1alpha1/openapi_generated.go index 43b86cfea0..bd9d8b4d0f 100644 --- a/apis/management/v1alpha1/openapi_generated.go +++ b/apis/management/v1alpha1/openapi_generated.go @@ -19486,6 +19486,12 @@ func schema_kmodulesxyz_resource_metadata_apis_shared_Action(ref common.Referenc Format: "", }, }, + "icon": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, "description": { SchemaProps: spec.SchemaProps{ Type: []string{"string"}, @@ -19552,6 +19558,12 @@ func schema_kmodulesxyz_resource_metadata_apis_shared_ActionGroup(ref common.Ref Format: "", }, }, + "icon": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, "description": { SchemaProps: spec.SchemaProps{ Type: []string{"string"}, @@ -19592,6 +19604,12 @@ func schema_kmodulesxyz_resource_metadata_apis_shared_ActionInfo(ref common.Refe Format: "", }, }, + "icon": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, "description": { SchemaProps: spec.SchemaProps{ Type: []string{"string"}, @@ -19616,6 +19634,12 @@ func schema_kmodulesxyz_resource_metadata_apis_shared_ActionTemplate(ref common. Format: "", }, }, + "icon": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, "description": { SchemaProps: spec.SchemaProps{ Type: []string{"string"}, @@ -19667,6 +19691,12 @@ func schema_kmodulesxyz_resource_metadata_apis_shared_ActionTemplate(ref common. Format: "", }, }, + "partOf": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, }, Required: []string{"operationId", "flow", "enforceQuota"}, }, @@ -19688,6 +19718,12 @@ func schema_kmodulesxyz_resource_metadata_apis_shared_ActionTemplateGroup(ref co Format: "", }, }, + "icon": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, "description": { SchemaProps: spec.SchemaProps{ Type: []string{"string"}, diff --git a/apis/meta/v1alpha1/openapi_generated.go b/apis/meta/v1alpha1/openapi_generated.go index 0f7c00473c..934ba3a6d5 100644 --- a/apis/meta/v1alpha1/openapi_generated.go +++ b/apis/meta/v1alpha1/openapi_generated.go @@ -23202,6 +23202,12 @@ func schema_resource_metadata_apis_meta_v1alpha1_ResourcePageLayout(ref common.R Format: "", }, }, + "icon": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, "requiredFeatureSets": { SchemaProps: spec.SchemaProps{ Type: []string{"object"}, @@ -23259,6 +23265,12 @@ func schema_resource_metadata_apis_meta_v1alpha1_ResourcePageOutline(ref common. Format: "", }, }, + "icon": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, "requiredFeatureSets": { SchemaProps: spec.SchemaProps{ Type: []string{"object"}, @@ -24162,6 +24174,12 @@ func schema_kmodulesxyz_resource_metadata_apis_shared_Action(ref common.Referenc Format: "", }, }, + "icon": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, "description": { SchemaProps: spec.SchemaProps{ Type: []string{"string"}, @@ -24228,6 +24246,12 @@ func schema_kmodulesxyz_resource_metadata_apis_shared_ActionGroup(ref common.Ref Format: "", }, }, + "icon": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, "description": { SchemaProps: spec.SchemaProps{ Type: []string{"string"}, @@ -24268,6 +24292,12 @@ func schema_kmodulesxyz_resource_metadata_apis_shared_ActionInfo(ref common.Refe Format: "", }, }, + "icon": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, "description": { SchemaProps: spec.SchemaProps{ Type: []string{"string"}, @@ -24292,6 +24322,12 @@ func schema_kmodulesxyz_resource_metadata_apis_shared_ActionTemplate(ref common. Format: "", }, }, + "icon": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, "description": { SchemaProps: spec.SchemaProps{ Type: []string{"string"}, @@ -24343,6 +24379,12 @@ func schema_kmodulesxyz_resource_metadata_apis_shared_ActionTemplate(ref common. Format: "", }, }, + "partOf": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, }, Required: []string{"operationId", "flow", "enforceQuota"}, }, @@ -24364,6 +24406,12 @@ func schema_kmodulesxyz_resource_metadata_apis_shared_ActionTemplateGroup(ref co Format: "", }, }, + "icon": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, "description": { SchemaProps: spec.SchemaProps{ Type: []string{"string"}, diff --git a/apis/meta/v1alpha1/resourcelayout_types.go b/apis/meta/v1alpha1/resourcelayout_types.go index 053a7aab6e..3fa6073b85 100644 --- a/apis/meta/v1alpha1/resourcelayout_types.go +++ b/apis/meta/v1alpha1/resourcelayout_types.go @@ -55,6 +55,7 @@ type ResourceLayoutSpec struct { type ResourcePageLayout struct { Name string `json:"name"` + Icon string `json:"icon,omitempty"` // +optional RequiredFeatureSets map[string]FeatureList `json:"requiredFeatureSets,omitempty"` Sections []SectionLayout `json:"sections,omitempty"` diff --git a/apis/meta/v1alpha1/resourceoutline_types.go b/apis/meta/v1alpha1/resourceoutline_types.go index 04a5b12251..b61297e270 100644 --- a/apis/meta/v1alpha1/resourceoutline_types.go +++ b/apis/meta/v1alpha1/resourceoutline_types.go @@ -56,6 +56,7 @@ type ResourceOutlineSpec struct { type ResourcePageOutline struct { Name string `json:"name"` + Icon string `json:"icon,omitempty"` // +optional RequiredFeatureSets map[string]FeatureList `json:"requiredFeatureSets,omitempty"` Sections []SectionOutline `json:"sections,omitempty"` diff --git a/apis/node/v1alpha1/openapi_generated.go b/apis/node/v1alpha1/openapi_generated.go index e7fd0e8289..f350454781 100644 --- a/apis/node/v1alpha1/openapi_generated.go +++ b/apis/node/v1alpha1/openapi_generated.go @@ -19450,6 +19450,12 @@ func schema_kmodulesxyz_resource_metadata_apis_shared_Action(ref common.Referenc Format: "", }, }, + "icon": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, "description": { SchemaProps: spec.SchemaProps{ Type: []string{"string"}, @@ -19516,6 +19522,12 @@ func schema_kmodulesxyz_resource_metadata_apis_shared_ActionGroup(ref common.Ref Format: "", }, }, + "icon": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, "description": { SchemaProps: spec.SchemaProps{ Type: []string{"string"}, @@ -19556,6 +19568,12 @@ func schema_kmodulesxyz_resource_metadata_apis_shared_ActionInfo(ref common.Refe Format: "", }, }, + "icon": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, "description": { SchemaProps: spec.SchemaProps{ Type: []string{"string"}, @@ -19580,6 +19598,12 @@ func schema_kmodulesxyz_resource_metadata_apis_shared_ActionTemplate(ref common. Format: "", }, }, + "icon": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, "description": { SchemaProps: spec.SchemaProps{ Type: []string{"string"}, @@ -19631,6 +19655,12 @@ func schema_kmodulesxyz_resource_metadata_apis_shared_ActionTemplate(ref common. Format: "", }, }, + "partOf": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, }, Required: []string{"operationId", "flow", "enforceQuota"}, }, @@ -19652,6 +19682,12 @@ func schema_kmodulesxyz_resource_metadata_apis_shared_ActionTemplateGroup(ref co Format: "", }, }, + "icon": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, "description": { SchemaProps: spec.SchemaProps{ Type: []string{"string"}, diff --git a/apis/shared/openapi_generated.go b/apis/shared/openapi_generated.go index 7ca8bc9b6f..4713ec2b01 100644 --- a/apis/shared/openapi_generated.go +++ b/apis/shared/openapi_generated.go @@ -66,6 +66,12 @@ func schema_kmodulesxyz_resource_metadata_apis_shared_Action(ref common.Referenc Format: "", }, }, + "icon": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, "description": { SchemaProps: spec.SchemaProps{ Type: []string{"string"}, @@ -132,6 +138,12 @@ func schema_kmodulesxyz_resource_metadata_apis_shared_ActionGroup(ref common.Ref Format: "", }, }, + "icon": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, "description": { SchemaProps: spec.SchemaProps{ Type: []string{"string"}, @@ -172,6 +184,12 @@ func schema_kmodulesxyz_resource_metadata_apis_shared_ActionInfo(ref common.Refe Format: "", }, }, + "icon": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, "description": { SchemaProps: spec.SchemaProps{ Type: []string{"string"}, @@ -196,6 +214,12 @@ func schema_kmodulesxyz_resource_metadata_apis_shared_ActionTemplate(ref common. Format: "", }, }, + "icon": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, "description": { SchemaProps: spec.SchemaProps{ Type: []string{"string"}, @@ -247,6 +271,12 @@ func schema_kmodulesxyz_resource_metadata_apis_shared_ActionTemplate(ref common. Format: "", }, }, + "partOf": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, }, Required: []string{"operationId", "flow", "enforceQuota"}, }, @@ -268,6 +298,12 @@ func schema_kmodulesxyz_resource_metadata_apis_shared_ActionTemplateGroup(ref co Format: "", }, }, + "icon": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, "description": { SchemaProps: spec.SchemaProps{ Type: []string{"string"}, diff --git a/apis/shared/types.go b/apis/shared/types.go index 2d91b13702..2f8f6e9a90 100644 --- a/apis/shared/types.go +++ b/apis/shared/types.go @@ -139,9 +139,33 @@ type ActionTemplate struct { DisabledTemplate string `json:"disabledTemplate,omitempty"` Editor *releasesapi.ChartSourceRef `json:"editor,omitempty"` EnforceQuota bool `json:"enforceQuota"` + PartOf string `json:"partOf,omitempty"` } type ActionInfo struct { Name string `json:"name,omitempty"` + Icon string `json:"icon,omitempty"` Description string `json:"description,omitempty"` } + +/* +overview -> hugeicons:book-open-01 +insights -> hugeicons:chart-line-data-01 +user -> hugeicons:user-03 +operations -> hugeicons:dashboard-circle-settings + overview-> hugeicons:book-open-02 + version update -> qlementine-icons:version-control-16 + restart -> hugeicons:redo + reconfigure -> hugeicons:settings-05 + vertical+compute -> hugeicons:vertical-resize + expand+storage -> hugeicons:arrow-expand + horizontal -> hugeicons:horizontal-resize + tls configure-> hugeicons:security-check + monitoring-> hugeicons:presentation-line-chart-01 + expose via gateway-> streamline-ultimate:server-share +backup-> carbon:data-backup + overview-> material-symbols-light:backup-table + configure backup -> material-symbols-light:backup-outline + instant backup-> carbon:ibm-cloud-backup-and-recovery + restore-> mdi:backup-restore +*/ diff --git a/apis/ui/v1alpha1/openapi_generated.go b/apis/ui/v1alpha1/openapi_generated.go index 22bb529c25..98408dc47e 100644 --- a/apis/ui/v1alpha1/openapi_generated.go +++ b/apis/ui/v1alpha1/openapi_generated.go @@ -386,8 +386,6 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "kmodules.xyz/resource-metadata/apis/shared.SourceLocator": schema_kmodulesxyz_resource_metadata_apis_shared_SourceLocator(ref), "kmodules.xyz/resource-metadata/apis/shared.UIParameterTemplate": schema_kmodulesxyz_resource_metadata_apis_shared_UIParameterTemplate(ref), "kmodules.xyz/resource-metadata/apis/shared.UIParameters": schema_kmodulesxyz_resource_metadata_apis_shared_UIParameters(ref), - "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.ActionTemplate": schema_resource_metadata_apis_ui_v1alpha1_ActionTemplate(ref), - "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.ActionTemplateGroup": schema_resource_metadata_apis_ui_v1alpha1_ActionTemplateGroup(ref), "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.ActionTemplateGroupFilter": schema_resource_metadata_apis_ui_v1alpha1_ActionTemplateGroupFilter(ref), "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.ChartInfo": schema_resource_metadata_apis_ui_v1alpha1_ChartInfo(ref), "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.ClusterProfile": schema_resource_metadata_apis_ui_v1alpha1_ClusterProfile(ref), @@ -19259,6 +19257,12 @@ func schema_kmodulesxyz_resource_metadata_apis_shared_Action(ref common.Referenc Format: "", }, }, + "icon": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, "description": { SchemaProps: spec.SchemaProps{ Type: []string{"string"}, @@ -19325,6 +19329,12 @@ func schema_kmodulesxyz_resource_metadata_apis_shared_ActionGroup(ref common.Ref Format: "", }, }, + "icon": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, "description": { SchemaProps: spec.SchemaProps{ Type: []string{"string"}, @@ -19365,6 +19375,12 @@ func schema_kmodulesxyz_resource_metadata_apis_shared_ActionInfo(ref common.Refe Format: "", }, }, + "icon": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, "description": { SchemaProps: spec.SchemaProps{ Type: []string{"string"}, @@ -19389,6 +19405,12 @@ func schema_kmodulesxyz_resource_metadata_apis_shared_ActionTemplate(ref common. Format: "", }, }, + "icon": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, "description": { SchemaProps: spec.SchemaProps{ Type: []string{"string"}, @@ -19440,6 +19462,12 @@ func schema_kmodulesxyz_resource_metadata_apis_shared_ActionTemplate(ref common. Format: "", }, }, + "partOf": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, }, Required: []string{"operationId", "flow", "enforceQuota"}, }, @@ -19461,6 +19489,12 @@ func schema_kmodulesxyz_resource_metadata_apis_shared_ActionTemplateGroup(ref co Format: "", }, }, + "icon": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, "description": { SchemaProps: spec.SchemaProps{ Type: []string{"string"}, @@ -20153,118 +20187,6 @@ func schema_kmodulesxyz_resource_metadata_apis_shared_UIParameters(ref common.Re } } -func schema_resource_metadata_apis_ui_v1alpha1_ActionTemplate(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "description": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "icons": { - SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("x-helm.dev/apimachinery/apis/shared.ImageSpec"), - }, - }, - }, - }, - }, - "operationId": { - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "flow": { - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "disabledTemplate": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "editor": { - SchemaProps: spec.SchemaProps{ - Ref: ref("x-helm.dev/apimachinery/apis/releases/v1alpha1.ChartSourceRef"), - }, - }, - "enforceQuota": { - SchemaProps: spec.SchemaProps{ - Default: false, - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - Required: []string{"operationId", "flow", "enforceQuota"}, - }, - }, - Dependencies: []string{ - "x-helm.dev/apimachinery/apis/releases/v1alpha1.ChartSourceRef", "x-helm.dev/apimachinery/apis/shared.ImageSpec"}, - } -} - -func schema_resource_metadata_apis_ui_v1alpha1_ActionTemplateGroup(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "description": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("kmodules.xyz/resource-metadata/apis/ui/v1alpha1.ActionTemplate"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.ActionTemplate"}, - } -} - func schema_resource_metadata_apis_ui_v1alpha1_ActionTemplateGroupFilter(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -21822,7 +21744,7 @@ func schema_resource_metadata_apis_ui_v1alpha1_UIParameters(ref common.Reference Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("kmodules.xyz/resource-metadata/apis/ui/v1alpha1.ActionTemplateGroup"), + Ref: ref("kmodules.xyz/resource-metadata/apis/shared.ActionTemplateGroup"), }, }, }, @@ -21833,7 +21755,7 @@ func schema_resource_metadata_apis_ui_v1alpha1_UIParameters(ref common.Reference }, }, Dependencies: []string{ - "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.ActionTemplateGroup", "x-helm.dev/apimachinery/apis/releases/v1alpha1.ChartSourceRef"}, + "kmodules.xyz/resource-metadata/apis/shared.ActionTemplateGroup", "x-helm.dev/apimachinery/apis/releases/v1alpha1.ChartSourceRef"}, } } diff --git a/apis/ui/v1alpha1/resourceeditor_types.go b/apis/ui/v1alpha1/resourceeditor_types.go index e1f711f7b4..e875bd81fb 100644 --- a/apis/ui/v1alpha1/resourceeditor_types.go +++ b/apis/ui/v1alpha1/resourceeditor_types.go @@ -67,23 +67,7 @@ type UIParameters struct { // +optional InstanceLabelPaths []string `json:"instanceLabelPaths,omitempty"` // +optional - Actions []*ActionTemplateGroup `json:"actions,omitempty"` -} - -type ActionTemplateGroup struct { - shared.ActionInfo `json:",inline,omitempty"` - Items []ActionTemplate `json:"items"` -} - -type ActionTemplate struct { - shared.ActionInfo `json:",inline,omitempty"` - // +optional - Icons []helmshared.ImageSpec `json:"icons,omitempty"` - OperationID string `json:"operationId"` - Flow string `json:"flow"` - DisabledTemplate string `json:"disabledTemplate,omitempty"` - Editor *releasesapi.ChartSourceRef `json:"editor,omitempty"` - EnforceQuota bool `json:"enforceQuota"` + Actions []*shared.ActionTemplateGroup `json:"actions,omitempty"` } type VariantRef struct { diff --git a/apis/ui/v1alpha1/zz_generated.deepcopy.go b/apis/ui/v1alpha1/zz_generated.deepcopy.go index 51c3472d39..d731e28685 100644 --- a/apis/ui/v1alpha1/zz_generated.deepcopy.go +++ b/apis/ui/v1alpha1/zz_generated.deepcopy.go @@ -22,66 +22,15 @@ limitations under the License. package v1alpha1 import ( - apisshared "kmodules.xyz/resource-metadata/apis/shared" + shared "kmodules.xyz/resource-metadata/apis/shared" v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" releasesv1alpha1 "x-helm.dev/apimachinery/apis/releases/v1alpha1" - shared "x-helm.dev/apimachinery/apis/shared" + apisshared "x-helm.dev/apimachinery/apis/shared" ) -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ActionTemplate) DeepCopyInto(out *ActionTemplate) { - *out = *in - out.ActionInfo = in.ActionInfo - if in.Icons != nil { - in, out := &in.Icons, &out.Icons - *out = make([]shared.ImageSpec, len(*in)) - copy(*out, *in) - } - if in.Editor != nil { - in, out := &in.Editor, &out.Editor - *out = new(releasesv1alpha1.ChartSourceRef) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ActionTemplate. -func (in *ActionTemplate) DeepCopy() *ActionTemplate { - if in == nil { - return nil - } - out := new(ActionTemplate) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ActionTemplateGroup) DeepCopyInto(out *ActionTemplateGroup) { - *out = *in - out.ActionInfo = in.ActionInfo - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ActionTemplate, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ActionTemplateGroup. -func (in *ActionTemplateGroup) DeepCopy() *ActionTemplateGroup { - if in == nil { - return nil - } - out := new(ActionTemplateGroup) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ActionTemplateGroupFilter) DeepCopyInto(out *ActionTemplateGroupFilter) { *out = *in @@ -254,7 +203,7 @@ func (in *Dashboard) DeepCopyInto(out *Dashboard) { *out = *in if in.Vars != nil { in, out := &in.Vars, &out.Vars - *out = make([]apisshared.DashboardVar, len(*in)) + *out = make([]shared.DashboardVar, len(*in)) copy(*out, *in) } if in.Panels != nil { @@ -264,7 +213,7 @@ func (in *Dashboard) DeepCopyInto(out *Dashboard) { } if in.If != nil { in, out := &in.If, &out.If - *out = new(apisshared.If) + *out = new(shared.If) (*in).DeepCopyInto(*out) } return @@ -451,7 +400,7 @@ func (in *FeatureSetSpec) DeepCopyInto(out *FeatureSetSpec) { *out = *in if in.Icons != nil { in, out := &in.Icons, &out.Icons - *out = make([]shared.ImageSpec, len(*in)) + *out = make([]apisshared.ImageSpec, len(*in)) copy(*out, *in) } if in.RequiredFeatures != nil { @@ -512,7 +461,7 @@ func (in *FeatureSpec) DeepCopyInto(out *FeatureSpec) { *out = *in if in.Icons != nil { in, out := &in.Icons, &out.Icons - *out = make([]shared.ImageSpec, len(*in)) + *out = make([]apisshared.ImageSpec, len(*in)) copy(*out, *in) } in.Requirements.DeepCopyInto(&out.Requirements) @@ -812,7 +761,7 @@ func (in *ResourceEditorSpec) DeepCopyInto(out *ResourceEditorSpec) { } if in.Icons != nil { in, out := &in.Icons, &out.Icons - *out = make([]shared.ImageSpec, len(*in)) + *out = make([]apisshared.ImageSpec, len(*in)) copy(*out, *in) } if in.Variants != nil { @@ -824,7 +773,7 @@ func (in *ResourceEditorSpec) DeepCopyInto(out *ResourceEditorSpec) { } if in.Installer != nil { in, out := &in.Installer, &out.Installer - *out = new(apisshared.DeploymentParameters) + *out = new(shared.DeploymentParameters) (*in).DeepCopyInto(*out) } return @@ -1004,11 +953,11 @@ func (in *UIParameters) DeepCopyInto(out *UIParameters) { } if in.Actions != nil { in, out := &in.Actions, &out.Actions - *out = make([]*ActionTemplateGroup, len(*in)) + *out = make([]*shared.ActionTemplateGroup, len(*in)) for i := range *in { if (*in)[i] != nil { in, out := &(*in)[i], &(*out)[i] - *out = new(ActionTemplateGroup) + *out = new(shared.ActionTemplateGroup) (*in).DeepCopyInto(*out) } } @@ -1052,7 +1001,7 @@ func (in *VariantRef) DeepCopyInto(out *VariantRef) { } if in.Icons != nil { in, out := &in.Icons, &out.Icons - *out = make([]shared.ImageSpec, len(*in)) + *out = make([]apisshared.ImageSpec, len(*in)) copy(*out, *in) } return diff --git a/crds/meta.k8s.appscode.com_resourceeditors.yaml b/crds/meta.k8s.appscode.com_resourceeditors.yaml index 0320735302..89d78723c9 100644 --- a/crds/meta.k8s.appscode.com_resourceeditors.yaml +++ b/crds/meta.k8s.appscode.com_resourceeditors.yaml @@ -139,6 +139,8 @@ spec: properties: description: type: string + icon: + type: string items: items: properties: @@ -184,6 +186,8 @@ spec: type: boolean flow: type: string + icon: + type: string icons: items: description: ImageSpec contains information about @@ -210,6 +214,8 @@ spec: type: string operationId: type: string + partOf: + type: string required: - enforceQuota - flow diff --git a/crds/meta.k8s.appscode.com_resourcelayouts.yaml b/crds/meta.k8s.appscode.com_resourcelayouts.yaml index f30538ce9e..93e48e331a 100644 --- a/crds/meta.k8s.appscode.com_resourcelayouts.yaml +++ b/crds/meta.k8s.appscode.com_resourcelayouts.yaml @@ -286,6 +286,8 @@ spec: pages: items: properties: + icon: + type: string name: type: string requiredFeatureSets: @@ -1344,6 +1346,8 @@ spec: properties: description: type: string + icon: + type: string items: items: properties: @@ -1389,6 +1393,8 @@ spec: type: boolean flow: type: string + icon: + type: string icons: items: description: ImageSpec contains information about @@ -1415,6 +1421,8 @@ spec: type: string operationId: type: string + partOf: + type: string required: - enforceQuota - flow diff --git a/crds/meta.k8s.appscode.com_resourceoutlines.yaml b/crds/meta.k8s.appscode.com_resourceoutlines.yaml index 5b0aad51d5..a64c233f8d 100644 --- a/crds/meta.k8s.appscode.com_resourceoutlines.yaml +++ b/crds/meta.k8s.appscode.com_resourceoutlines.yaml @@ -42,6 +42,8 @@ spec: properties: description: type: string + icon: + type: string items: items: properties: @@ -87,6 +89,8 @@ spec: type: boolean flow: type: string + icon: + type: string icons: items: description: ImageSpec contains information about an @@ -113,6 +117,8 @@ spec: type: string operationId: type: string + partOf: + type: string required: - enforceQuota - flow @@ -372,6 +378,8 @@ spec: pages: items: properties: + icon: + type: string name: type: string requiredFeatureSets: diff --git a/crds/ui.k8s.appscode.com_resourceeditors.yaml b/crds/ui.k8s.appscode.com_resourceeditors.yaml index 3e4964b098..da3db749d0 100644 --- a/crds/ui.k8s.appscode.com_resourceeditors.yaml +++ b/crds/ui.k8s.appscode.com_resourceeditors.yaml @@ -139,6 +139,8 @@ spec: properties: description: type: string + icon: + type: string items: items: properties: @@ -184,6 +186,8 @@ spec: type: boolean flow: type: string + icon: + type: string icons: items: description: ImageSpec contains information about @@ -210,6 +214,8 @@ spec: type: string operationId: type: string + partOf: + type: string required: - enforceQuota - flow diff --git a/hub/resourceeditors/kubedb.com/v1/mongodbs.yaml b/hub/resourceeditors/kubedb.com/v1/mongodbs.yaml index c8576cc946..54bb2b77e4 100644 --- a/hub/resourceeditors/kubedb.com/v1/mongodbs.yaml +++ b/hub/resourceeditors/kubedb.com/v1/mongodbs.yaml @@ -32,6 +32,7 @@ spec: version: v0.27.0 enforceQuota: false flow: standalone-edit + icon: material-symbols-light:backup-outline icons: - src: https://cdn.appscode.com/k8s/icons/action-icons/configure-backup.svg type: image/svg+xml @@ -46,6 +47,7 @@ spec: version: v0.27.0 enforceQuota: false flow: standalone-create + icon: carbon:ibm-cloud-backup-and-recovery icons: - src: https://cdn.appscode.com/k8s/icons/action-icons/instant-backup.svg type: image/svg+xml @@ -60,6 +62,7 @@ spec: version: v0.27.0 enforceQuota: false flow: standalone-create + icon: mdi:backup-restore icons: - src: https://cdn.appscode.com/k8s/icons/action-icons/restore.svg type: image/svg+xml @@ -76,6 +79,7 @@ spec: version: v0.27.0 enforceQuota: false flow: standalone-create + icon: qlementine-icons:version-control-16 icons: - src: https://cdn.appscode.com/k8s/icons/action-icons/version.svg type: image/svg+xml @@ -90,6 +94,7 @@ spec: version: v0.27.0 enforceQuota: false flow: standalone-create + icon: hugeicons:redo icons: - src: https://cdn.appscode.com/k8s/icons/action-icons/restart.svg type: image/svg+xml @@ -104,6 +109,7 @@ spec: version: v0.27.0 enforceQuota: false flow: standalone-create + icon: hugeicons:settings-05 icons: - src: https://cdn.appscode.com/k8s/icons/action-icons/reconfigure.svg type: image/svg+xml @@ -111,6 +117,16 @@ spec: operationId: create-opsrequest-reconfigure name: Operations - items: + - enforceQuota: false + flow: "" + icon: hugeicons:vertical-resize + name: Scale Vertically + operationId: "" + - enforceQuota: false + flow: "" + icon: hugeicons:arrow-expand + name: Scale Storage + operationId: "" - disabledTemplate: | {{ not (or (hasKey .spec "shardTopology") ( hasKey .spec "replicaSet"))}} editor: @@ -122,6 +138,7 @@ spec: version: v0.27.0 enforceQuota: true flow: standalone-create + icon: hugeicons:horizontal-resize icons: - src: https://cdn.appscode.com/k8s/icons/action-icons/horizontal_scale.svg type: image/svg+xml @@ -133,7 +150,7 @@ spec: apiGroup: source.toolkit.fluxcd.io kind: HelmRepository name: appscode-charts-oci - version: v0.27.0 + version: v0.24.0 enforceQuota: true flow: standalone-create icons: @@ -141,6 +158,7 @@ spec: type: image/svg+xml name: Vertical Scale operationId: create-opsrequest-verticalscaling + partOf: Scale Vertically - editor: name: opskubedbcom-mongodbopsrequest-editor sourceRef: @@ -155,6 +173,7 @@ spec: type: image/svg+xml name: Expand Volume operationId: create-opsrequest-volumeexpansion + partOf: Scale Storage name: Scaling - items: - editor: @@ -171,6 +190,7 @@ spec: type: image/svg+xml name: Compute operationId: edit-self-compute-autoscaler + partOf: Scale Vertically - editor: name: kubedbcom-mongodb-editor sourceRef: @@ -185,6 +205,7 @@ spec: type: image/svg+xml name: Storage operationId: edit-self-storage-autoscaler + partOf: Scale Storage name: Autoscaling - items: - editor: @@ -196,6 +217,7 @@ spec: version: v0.27.0 enforceQuota: false flow: standalone-create + icon: hugeicons:security-check icons: - src: https://cdn.appscode.com/k8s/icons/action-icons/configure.svg type: image/svg+xml @@ -210,6 +232,7 @@ spec: version: v0.27.0 enforceQuota: false flow: standalone-edit + icon: hugeicons:presentation-line-chart-01 icons: - src: https://cdn.appscode.com/k8s/icons/action-icons/monitor.svg type: image/svg+xml @@ -226,6 +249,7 @@ spec: version: v0.27.0 enforceQuota: false flow: standalone-edit + icon: streamline-ultimate:server-share icons: - src: https://cdn.appscode.com/k8s/icons/action-icons/configure.svg type: image/svg+xml diff --git a/hub/resourceoutlines/kubedb.com/v1/kubedb/mongodbs.yaml b/hub/resourceoutlines/kubedb.com/v1/kubedb/mongodbs.yaml index 35a2708766..d3c3868702 100644 --- a/hub/resourceoutlines/kubedb.com/v1/kubedb/mongodbs.yaml +++ b/hub/resourceoutlines/kubedb.com/v1/kubedb/mongodbs.yaml @@ -27,7 +27,8 @@ spec: view: name: core.k8s.appscode.com-v1alpha1-genericresources-kubedb pages: - - name: Overview + - icon: hugeicons:book-open-01 + name: Overview sections: - blocks: - actions: @@ -125,7 +126,8 @@ spec: opscenter-datastore: - kubedb - kubedb-opscenter - - name: Insights + - icon: hugeicons:chart-line-data-01 + name: Insights requiredFeatureSets: opscenter-datastore: - kubedb @@ -216,7 +218,8 @@ spec: opscenter-datastore: - kubedb - kubedb-opscenter - - name: Users + - icon: hugeicons:user-03 + name: Users sections: - blocks: - actions: @@ -322,7 +325,8 @@ spec: - kubevault view: name: engine.kubevault.com-v1alpha1-secretaccessrequests - - name: Operations + - icon: hugeicons:dashboard-circle-settings + name: Operations sections: - blocks: - actions: @@ -365,7 +369,8 @@ spec: sort: fieldName: Age order: Ascending - - name: Backup + - icon: carbon:data-backup + name: Backup requiredFeatureSets: opscenter-backup: - kubestash diff --git a/pkg/layouts/lib.go b/pkg/layouts/lib.go index 72dd1ba8bf..7bb7518fde 100644 --- a/pkg/layouts/lib.go +++ b/pkg/layouts/lib.go @@ -288,6 +288,7 @@ func GetResourceLayout(kc client.Client, outline *rsapi.ResourceOutline) (*rsapi } page := rsapi.ResourcePageLayout{ Name: pageOutline.Name, + Icon: pageOutline.Icon, RequiredFeatureSets: pageOutline.RequiredFeatureSets, Sections: make([]rsapi.SectionLayout, 0, len(pageOutline.Sections)), }