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
  • Loading branch information
jerolimov committed Nov 24, 2020
1 parent d8862a3 commit a963841
Show file tree
Hide file tree
Showing 4 changed files with 173 additions and 1 deletion.
43 changes: 43 additions & 0 deletions operator/v1/0000_70_console-operator.crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,49 @@ spec:
in page titles, logo alt text, and the about dialog instead
of the normal OpenShift product name.
type: string
developerCatalog:
description: console allow the cluster admin to configure the
shown categories.
type: object
properties:
categories:
description: categories which are shown the in the devconsole.
type: array
items:
type: object
properties:
id:
description: identifier used in the URL to enable deeplinking
in console
type: string
label:
description: category display label
type: string
subcategories:
description: a list of child categories
type: array
items:
type: object
properties:
id:
description: identifier used in the URL to enable
deeplinking in console
type: string
label:
description: category display label
type: string
tags:
description: the list of item tags this category
will match
type: array
items:
type: string
tags:
description: the list of item tags this category will
match
type: array
items:
type: string
documentationBaseURL:
description: documentationBaseURL links to external documentation
are shown in various sections of the web console. Providing
Expand Down
30 changes: 30 additions & 0 deletions operator/v1/types_console.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,36 @@ type ConsoleCustomization struct {
// SVG format preferred
// +optional
CustomLogoFile configv1.ConfigMapFileReference `json:"customLogoFile,omitempty"`
// developerCatalog allows to configure the shown developer catalog categories.
DeveloperCatalog DeveloperConsoleCatalogCustomization `json:"developerCatalog"`
}

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

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

// DeveloperConsoleCatalogCategory defines a top level category incl. label, filter tags
// and subcategories for the developer console catalog.
type DeveloperConsoleCatalogCategory struct {
// proper comment here
DeveloperConsoleCatalogCategoryMeta `json:",inline"`
// 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 a963841

Please sign in to comment.