Skip to content

@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#

CatalogCategory.constructor

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#

CatalogCategory.apiVersion


filters#

Protected Readonly filters: ObservableSet<AddMenuFilter>

Inherited from#

CatalogCategory.filters


kind#

Readonly kind: "CatalogCategory"

The kind of item you wish to declare.

Currently supported values:

  • "CatalogCategory"

Overrides#

CatalogCategory.kind


metadata#

metadata: Object

The data about the category itself

Type declaration#

Name Type
icon string
name string

Overrides#

CatalogCategory.metadata


spec#

spec: CatalogCategorySpec

The most important part of a category, as it is where entity versions are declared.

Overrides#

CatalogCategory.spec

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#

Disposer

A function to remove that filter

Inherited from#

CatalogCategory.addMenuFilter


filteredItems#

filteredItems(menuItems): CatalogEntityAddMenu[]

Filter menuItems according to the Category's set filters

Parameters#

Name Type Description
menuItems CatalogEntityAddMenu[] menu items to filter

Returns#

CatalogEntityAddMenu[]

filtered menu items

Inherited from#

CatalogCategory.filteredItems


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#

CatalogCategory.getBadge


getId#

getId(): string

Get the ID of this category

Returns#

string

Inherited from#

CatalogCategory.getId


getName#

getName(): string

Get the name of this category

Returns#

string

Inherited from#

CatalogCategory.getName


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

Inherited from#

CatalogCategory.parseId