@k8slens/extensions / Exports / Common / Catalog / KubernetesClusterCategory
Class: KubernetesClusterCategory#
Common.Catalog.KubernetesClusterCategory
Hierarchy#
↳ KubernetesClusterCategory
Table of contents#
Constructors#
Properties#
Methods#
Constructors#
constructor#
• new KubernetesClusterCategory()
Inherited from#
Properties#
apiVersion#
• Readonly apiVersion: "catalog.k8slens.dev/v1alpha1"
The version of category that you are wanting to declare.
Currently supported values:
- "catalog.k8slens.dev/v1alpha1"
Overrides#
filters#
• Protected Readonly filters: ObservableSet<AddMenuFilter>
Inherited from#
kind#
• Readonly kind: "CatalogCategory"
The kind of item you wish to declare.
Currently supported values:
- "CatalogCategory"
Overrides#
metadata#
• metadata: Object
The data about the category itself
Type declaration#
| Name | Type | 
|---|---|
| icon | string | 
| name | string | 
Overrides#
spec#
• spec: CatalogCategorySpec
The most important part of a category, as it is where entity versions are declared.
Overrides#
Methods#
addMenuFilter#
▸ addMenuFilter(fn): Disposer
Add a filter for menu items of catalogAddMenu
Parameters#
| Name | Type | Description | 
|---|---|---|
| fn | AddMenuFilter | The function that should return a truthy value if that menu item should be displayed | 
Returns#
A function to remove that filter
Inherited from#
filteredItems#
▸ filteredItems(menuItems): CatalogEntityAddMenu[]
Filter menuItems according to the Category's set filters
Parameters#
| Name | Type | Description | 
|---|---|---|
| menuItems | CatalogEntityAddMenu[] | menu items to filter | 
Returns#
filtered menu items
Inherited from#
getBadge#
▸ getBadge(): StrictReactNode
Get the badge of this category. Defaults to no badge. The badge is displayed next to the Category name in the Catalog Category menu
Returns#
StrictReactNode
Inherited from#
getId#
▸ getId(): string
Get the ID of this category
Returns#
string
Inherited from#
getName#
▸ getName(): string
Get the name of this category
Returns#
string
Inherited from#
parseId#
▸ Static parseId(id): Object
Parse a category ID into parts.
Parameters#
| Name | Type | Description | 
|---|---|---|
| id | string | The id of a category is parse | 
Returns#
Object
The group and kind parts of the ID
| Name | Type | 
|---|---|
| group? | string | 
| kind? | string |