Skip to content

Commit

Permalink
Add option to define (and customize) console catalog categories
Browse files Browse the repository at this point in the history
Add option to define (and customize) console catalog categories
  • Loading branch information
jerolimov committed Dec 1, 2020
1 parent 8494fe8 commit 3a98fd1
Show file tree
Hide file tree
Showing 4 changed files with 182 additions and 1 deletion.
50 changes: 50 additions & 0 deletions operator/v1/0000_70_console-operator.crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,56 @@ spec:
in page titles, logo alt text, and the about dialog instead
of the normal OpenShift product name.
type: string
developerCatalog:
description: developerCatalog allows to configure the shown developer
catalog categories.
type: object
properties:
categories:
description: categories which are shown the in the devconsole.
type: array
items:
description: DeveloperConsoleCatalogCategory defines a top
level category incl. label, filter tags and subcategories
for the developer console catalog.
type: object
properties:
id:
description: ID is an identifier used in the URL to
enable deep linking in console.
type: string
label:
description: label defines a category display label.
type: string
subcategories:
description: subcategories defines a list of child categories.
type: array
items:
description: DeveloperConsoleCatalogCategoryMeta defines
a category incl. label and filter tags for the developer
console catalog.
type: object
properties:
id:
description: ID is an identifier used in the URL
to enable deep linking in console.
type: string
label:
description: label defines a category display
label.
type: string
tags:
description: tags in a list of strings that will
match the category.
type: array
items:
type: string
tags:
description: tags in a list of strings that will match
the category.
type: array
items:
type: string
documentationBaseURL:
description: documentationBaseURL links to external documentation
are shown in various sections of the web console. Providing
Expand Down
32 changes: 32 additions & 0 deletions operator/v1/types_console.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,38 @@ type ConsoleCustomization struct {
// SVG format preferred
// +optional
CustomLogoFile configv1.ConfigMapFileReference `json:"customLogoFile,omitempty"`
// developerCatalog allows to configure the shown developer catalog categories.
// +optional
DeveloperCatalog DeveloperConsoleCatalogCustomization `json:"developerCatalog,omitempty"`
}

// DeveloperConsoleCatalogCustomization allow the cluster admin to configure developer catalog.
type DeveloperConsoleCatalogCustomization struct {
// categories which are shown the in the devconsole.
// +optional
Categories []DeveloperConsoleCatalogCategory `json:"categories,omitempty"`
}

// DeveloperConsoleCatalogCategoryMeta defines a category incl. label and filter tags
// for the developer console catalog.
type DeveloperConsoleCatalogCategoryMeta struct {
// ID is an identifier used in the URL to enable deep linking in console.
ID string `json:"id"`
// label defines a category display label.
Label string `json:"label"`
// tags in a list of strings that will match the category.
// +optional
Tags []string `json:"tags,omitempty"`
}

// DeveloperConsoleCatalogCategory defines a top level category incl. label, filter tags
// and subcategories for the developer console catalog.
type DeveloperConsoleCatalogCategory struct {
// defines top level category ID, label and filter tags.
DeveloperConsoleCatalogCategoryMeta `json:",inline"`
// subcategories defines a list of child categories.
// +optional
Subcategories []DeveloperConsoleCatalogCategoryMeta `json:"subcategories,omitempty"`
}

// Brand is a specific supported brand within the console.
Expand Down
71 changes: 70 additions & 1 deletion operator/v1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 30 additions & 0 deletions operator/v1/zz_generated.swagger_doc_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3a98fd1

Please sign in to comment.