Skip to content

@k8slens/extensions / Exports / Renderer / Component

Namespace: Component#

Renderer.Component

Table of contents#

References#

Enumerations#

Classes#

Interfaces#

Type Aliases#

Variables#

Functions#

References#

CategoryColumnRegistration#

Re-exports CategoryColumnRegistration

Type Aliases#

AtLeastOneMetricTab#

Ƭ AtLeastOneMetricTab: [MetricsTab, ...MetricsTab[]]


DatasetTooltipLabel#

Ƭ DatasetTooltipLabel: (percent: string) => string | string

Type declaration#

▸ (percent): string | string

Parameters#
Name Type
percent string
Returns#

string | string


DrawerPosition#

Ƭ DrawerPosition: "top" | "left" | "right" | "bottom"


IconData#

Ƭ IconData: string | StrictReactNode | (opt: IconDataFnArg) => StrictReactNode

One of the following: - A material icon name - A react node - Or a function that produces a react node


InputProps#

Ƭ InputProps: Omit<InputElementProps, "onChange" | "onSubmit"> & { autoSelectOnFocus?: boolean ; blurOnEnter?: boolean ; className?: string ; contentRight?: string | StrictReactNode ; defaultValue?: string ; dirty?: boolean ; iconLeft?: IconData ; iconRight?: IconData ; maxRows?: number ; multiLine?: boolean ; showErrorsAsTooltip?: boolean | Omit<TooltipProps, "targetId"> ; showValidationLine?: boolean ; theme?: "round-black" | "round" ; trim?: boolean ; validators?: SingleOrMany<InputValidator> ; value?: string ; onChange?: (value: string, evt: ChangeEvent<InputElement>) => void ; onSubmit?: (value: string, evt: KeyboardEvent<InputElement>) => void }


InputValidation#

Ƭ InputValidation<IsAsync>: (value: string, props?: InputProps) => InputValidationResult<IsAsync>

Type parameters#

Name Type
IsAsync extends boolean

Type declaration#

▸ (value, props?): InputValidationResult<IsAsync>

Parameters#
Name Type
value string
props? InputProps
Returns#

InputValidationResult<IsAsync>


InputValidationResult#

Ƭ InputValidationResult<IsAsync>: IsAsync extends true ? Promise<void> : boolean

Type parameters#

Name Type
IsAsync extends boolean

InputValidator#

Ƭ InputValidator<IsAsync>: SyncInputValidator | AsyncInputValidator | IsAsync extends boolean ? LegacyInputValidator : never

Type parameters#

Name Type
IsAsync extends boolean = boolean

KubeItemListStore#

Ƭ KubeItemListStore<K>: ItemListStore<K, false> & SubscribableStore & { contextItems: K[] ; getByPath: (path: string) => K | undefined }

Type parameters#

Name Type
K extends KubeObject

LegacyAutoConvertedOptions#

Ƭ LegacyAutoConvertedOptions: string[]

Deprecated

This should not be used anymore, convert the options yourself.


MonacoCustomTheme#

Ƭ MonacoCustomTheme: "clouds-midnight"


MonacoEditorId#

Ƭ MonacoEditorId: string


MonacoTheme#

Ƭ MonacoTheme: "vs" | "vs-dark" | "hc-black" | MonacoCustomTheme


NamedSvg#

Ƭ NamedSvg: "configuration" | "crane" | "group" | "helm" | "install" | "kube" | "lens-logo" | "license" | "logo-lens" | "logout" | "nodes" | "push_off" | "push_pin" | "spinner" | "ssh" | "storage" | "terminal" | "user" | "users" | "wheel" | "workloads"


NamespaceSelectSort#

Ƭ NamespaceSelectSort: (left: string, right: string) => number

Type declaration#

▸ (left, right): number

Parameters#
Name Type
left string
right string
Returns#

number


NotificationId#

Ƭ NotificationId: string | number


NotificationMessage#

Ƭ NotificationMessage: string | React.ReactElement | React.ReactElement[] | JsonApiErrorParsed | Error


ShowNotification#

Ƭ ShowNotification: (message: NotificationMessage, opts?: CreateNotificationOptions) => Disposer

Type declaration#

▸ (message, opts?): Disposer

Parameters#
Name Type
message NotificationMessage
opts? CreateNotificationOptions
Returns#

Disposer


SyncValidationMessage#

Ƭ SyncValidationMessage: StrictReactNode | (value: string, props?: InputProps) => StrictReactNode


TableCellElem#

Ƭ TableCellElem: React.ReactElement<TableCellProps>


TableHeadElem#

Ƭ TableHeadElem: React.ReactElement<TableHeadProps>


TableOrderBy#

Ƭ TableOrderBy: "asc" | "desc"


TableRowElem#

Ƭ TableRowElem<Item>: React.ReactElement<TableRowProps<Item>>

Type parameters#

Name
Item

TableSortBy#

Ƭ TableSortBy: string


TableSortCallback#

Ƭ TableSortCallback<Item>: (data: Item) => undefined | string | number | (string | number)[]

Type parameters#

Name
Item

Type declaration#

▸ (data): undefined | string | number | (string | number)[]

Parameters#
Name Type
data Item
Returns#

undefined | string | number | (string | number)[]


TableSortCallbacks#

Ƭ TableSortCallbacks<Item>: Record<string, TableSortCallback<Item>>

Type parameters#

Name
Item

Variables#

CommandOverlay#

Const CommandOverlay: CommandOverlay


InputValidators#

Const InputValidators: Object

Type declaration#

Name Type
accountId Validators.SyncInputValidator
isEmail Validators.SyncInputValidator
isExtensionNameInstall Validators.SyncInputValidator
isExtensionNameInstallRegex { captures: (val: string) => undefined | { name: string ; version?: string } ; isMatch: (val: string) => boolean }
isExtensionNameInstallRegex.captures [object Object]
isExtensionNameInstallRegex.isMatch [object Object]
isNumber Validators.SyncInputValidator
isPath Validators.AsyncInputValidator
isRequired Validators.SyncInputValidator
isUrl Validators.SyncInputValidator
maxLength Validators.SyncInputValidator
minLength Validators.SyncInputValidator
systemName Validators.SyncInputValidator
unionInputValidators (baseValidator: Pick<SyncInputValidator, "message" | "condition">, ...validators: SyncInputValidator[]) => SyncInputValidator

Const MenuContext: React.Context<MenuContextValue | null>


Notifications#

Const Notifications: Object

Type declaration#

Name Type
checkedError ShowCheckedErrorNotification
error ShowNotification
info ShowNotification
ok ShowNotification
shortInfo ShowNotification

ResourceMetricsContext#

Const ResourceMetricsContext: React.Context<ResourceMetricsValue | null>


Tooltip#

Const Tooltip: React.ComponentClass<TooltipProps, any>


cpuOptions#

Const cpuOptions: ChartOptions


logTabStore#

Const logTabStore: LogTabStore & { createPodTab: ({ selectedPod, selectedContainer }: PodLogsTabData) => string ; createWorkloadTab: ({ workload }: WorkloadLogsTabData) => string | undefined ; renameTab: (tabId: string) => void ; tabs: undefined }


memoryOptions#

Const memoryOptions: ChartOptions


notificationsStore#

Const notificationsStore: NotificationsStore


podMetricTabs#

Const podMetricTabs: AtLeastOneMetricTab


resizingAnchorProps#

Const resizingAnchorProps: Record<DrawerPosition, [ResizeDirection, ResizeSide, ResizeGrowthDirection]>


terminalStore#

Const terminalStore: TerminalStore & { sendCommand: SendCommand }

Functions#

Badge#

Badge(props, context?): null | ReactElement<any, any>

Parameters#

Name Type
props PropsWithChildren<BadgeProps & TooltipDecoratorProps>
context? any

Returns#

null | ReactElement<any, any>


BarChart#

BarChart(props, context?): null | ReactElement<any, any>

Parameters#

Name Type
props PropsWithChildren<BarChartProps>
context? any

Returns#

null | ReactElement<any, any>


Button#

Button(props, context?): null | ReactElement<any, any>

Parameters#

Name Type
props PropsWithChildren<ButtonProps & TooltipDecoratorProps>
context? any

Returns#

null | ReactElement<any, any>


Checkbox#

Checkbox(«destructured»): React.JSX.Element

Parameters#

Name Type
«destructured» CheckboxProps

Returns#

React.JSX.Element


ConfirmDialog#

ConfirmDialog(props, context?): null | ReactElement<any, any>

Parameters#

Name Type
props PropsWithChildren<ConfirmDialogProps>
context? any

Returns#

null | ReactElement<any, any>


Dialog#

Dialog(props, context?): null | ReactElement<any, any>

Parameters#

Name Type
props PropsWithChildren<DialogProps>
context? any

Returns#

null | ReactElement<any, any>


Drawer#

Drawer(props, context?): null | ReactElement<any, any>

Parameters#

Name Type
props PropsWithChildren<DrawerProps>
context? any

Returns#

null | ReactElement<any, any>


DrawerItem#

DrawerItem(«destructured»): React.JSX.Element | null

Parameters#

Name Type
«destructured» DrawerItemProps

Returns#

React.JSX.Element | null


DrawerItemLabels#

DrawerItemLabels(props): React.JSX.Element | null

Parameters#

Name Type
props DrawerItemLabelsProps

Returns#

React.JSX.Element | null


DrawerTitle#

DrawerTitle(«destructured»): React.JSX.Element

Parameters#

Name Type
«destructured» DrawerTitleProps

Returns#

React.JSX.Element


FormSwitch#

FormSwitch(props): React.FunctionComponentElement<any>

Deprecated

Use instead from "../switch.tsx".

Parameters#

Name Type
props FormControlLabelProps & { children?: StrictReactNode }

Returns#

React.FunctionComponentElement<any>


Icon#

Icon(props, context?): null | ReactElement<any, any>

Parameters#

Name Type
props PropsWithChildren<IconProps & TooltipDecoratorProps>
context? any

Returns#

null | ReactElement<any, any>


KubeEventDetails#

KubeEventDetails(props, context?): null | ReactElement<any, any>

Parameters#

Name Type
props PropsWithChildren<KubeEventDetailsProps>
context? any

Returns#

null | ReactElement<any, any>


KubeObjectDetails#

KubeObjectDetails(props, context?): null | ReactElement<any, any>

Parameters#

Name Type
props Object
context? any

Returns#

null | ReactElement<any, any>


KubeObjectListLayout#

KubeObjectListLayout<K, A, D>(props): ReactElement<any, string | JSXElementConstructor<any>>

Type parameters#

Name Type
K extends KubeObject<KubeObjectMetadata<KubeObjectScope>, unknown, unknown, K>
A extends KubeApi<K, D, A>
D extends KubeJsonApiData<KubeObjectMetadata<KubeObjectScope>, unknown, unknown, D> = KubeJsonApiDataFor<K>

Parameters#

Name Type
props KubeObjectListLayoutProps<K, A, D>

Returns#

ReactElement<any, string | JSXElementConstructor<any>>


KubeObjectMenu#

KubeObjectMenu<T>(props): ReactElement<any, string | JSXElementConstructor<any>>

Type parameters#

Name Type
T extends KubeObject<KubeObjectMetadata<KubeObjectScope>, unknown, unknown, T>

Parameters#

Name Type
props KubeObjectMenuProps<T>

Returns#

ReactElement<any, string | JSXElementConstructor<any>>


KubeObjectMeta#

KubeObjectMeta(props, context?): null | ReactElement<any, any>

Parameters#

Name Type
props PropsWithChildren<KubeObjectMetaProps>
context? any

Returns#

null | ReactElement<any, any>


LineProgress#

LineProgress(props, context?): null | ReactElement<any, any>

Parameters#

Name Type
props PropsWithChildren<LineProgressProps & TooltipDecoratorProps>
context? any

Returns#

null | ReactElement<any, any>


MainLayout#

MainLayout(props, context?): null | ReactElement<any, any>

Parameters#

Name Type
props PropsWithChildren<MainLayoutProps>
context? any

Returns#

null | ReactElement<any, any>


Menu(props, context?): null | ReactElement<any, any>

Parameters#

Name Type
props PropsWithChildren<MenuProps>
context? any

Returns#

null | ReactElement<any, any>


MenuActions(props, context?): null | ReactElement<any, any>

Parameters#

Name Type
props PropsWithChildren<MenuActionsProps>
context? any

Returns#

null | ReactElement<any, any>


MonacoEditor#

MonacoEditor(props): null | ReactElement<any, string | JSXElementConstructor<any>>

NOTE: Exotic components are not callable.

Parameters#

Name Type
props MonacoEditorProps & RefAttributes<MonacoEditorRef>

Returns#

null | ReactElement<any, string | JSXElementConstructor<any>>


NamespaceSelect#

NamespaceSelect<IsMulti>(props): JSX.Element

Type parameters#

Name Type
IsMulti extends boolean = false

Parameters#

Name Type
props NamespaceSelectProps<IsMulti>

Returns#

JSX.Element


NamespaceSelectFilter#

NamespaceSelectFilter(props, context?): null | ReactElement<any, any>

Parameters#

Name Type
props PropsWithChildren<NamespaceSelectFilterProps>
context? any

Returns#

null | ReactElement<any, any>


PieChart#

PieChart(props, context?): null | ReactElement<any, any>

Parameters#

Name Type
props PropsWithChildren<PieChartProps>
context? any

Returns#

null | ReactElement<any, any>


PodCharts#

PodCharts(): null | Element

Returns#

null | Element


PodDetailsList#

PodDetailsList(props, context?): null | ReactElement<any, any>

Parameters#

Name Type
props PropsWithChildren<PodDetailsListProps>
context? any

Returns#

null | ReactElement<any, any>


Radio#

Radio<T>(«destructured»): React.JSX.Element

Type parameters#

Name
T

Parameters#

Name Type
«destructured» RadioProps<T>

Returns#

React.JSX.Element


RadioGroup#

RadioGroup<T>(«destructured»): React.JSX.Element

Type parameters#

Name
T

Parameters#

Name Type
«destructured» RadioGroupProps<T>

Returns#

React.JSX.Element


ResourceMetrics#

ResourceMetrics<Keys>(«destructured»): Element

Type parameters#

Name Type
Keys extends string

Parameters#

Name Type
«destructured» ResourceMetricsProps<Keys>

Returns#

Element


SearchInput#

SearchInput(props, context?): null | ReactElement<any, any>

Parameters#

Name Type
props PropsWithChildren<SearchInputProps>
context? any

Returns#

null | ReactElement<any, any>


Select#

Select<Value, Option, IsMulti, Group>(props): ReactElement<any, string | JSXElementConstructor<any>>

Type parameters#

Name Type
Value Value
Option extends SelectOption<Value, Option>
IsMulti extends boolean = false
Group extends GroupBase<Option, Group> = GroupBase<Option>

Parameters#

Name Type
props SelectProps<Value, Option, IsMulti, Group>

Returns#

ReactElement<any, string | JSXElementConstructor<any>>


StatusBrick#

StatusBrick(props, context?): null | ReactElement<any, any>

Parameters#

Name Type
props PropsWithChildren<StatusBrickProps & TooltipDecoratorProps>
context? any

Returns#

null | ReactElement<any, any>


SubMenu(props): React.JSX.Element

Parameters#

Name Type
props Partial<MenuProps>

Returns#

React.JSX.Element


Switch#

Switch(«destructured»): React.JSX.Element

Parameters#

Name Type
«destructured» SwitchProps

Returns#

React.JSX.Element


Switcher#

Switcher(«destructured»): React.JSX.Element

Deprecated

Use instead from "../switch.tsx".

Parameters#

Name Type
«destructured» SwitcherProps

Returns#

React.JSX.Element


TabLayout#

TabLayout(props, context?): null | ReactElement<any, any>

Parameters#

Name Type
props PropsWithChildren<TabLayoutProps>
context? any

Returns#

null | ReactElement<any, any>


Table#

Table<Item>(props): ReactElement<any, string | JSXElementConstructor<any>>

Type parameters#

Name
Item

Parameters#

Name Type
props TableProps<Item>

Returns#

ReactElement<any, string | JSXElementConstructor<any>>


asyncInputValidator#

asyncInputValidator(validator): AsyncInputValidator

A helper function to create an AsyncInputValidator

Parameters#

Name Type
validator AsyncInputValidator

Returns#

AsyncInputValidator


createTerminalTab#

createTerminalTab(tabParams?): Required<DockTabCreate>

Parameters#

Name Type
tabParams? DockTabCreateSpecific

Returns#

Required<DockTabCreate>


getDetailsUrl#

getDetailsUrl(selfLink, resetSelected?, mergeGlobals?): string

Deprecated

Use Renderer.Navigation.getDetailsUrl

Parameters#

Name Type
selfLink string
resetSelected? boolean
mergeGlobals? boolean

Returns#

string


inputValidator#

inputValidator(validator): SyncInputValidator

A helper function to create an SyncInputValidator

Parameters#

Name Type
validator SyncInputValidator

Returns#

SyncInputValidator


isAsyncValidator#

isAsyncValidator(validator): validator is AsyncInputValidator

Parameters#

Name Type
validator InputValidator<boolean>

Returns#

validator is AsyncInputValidator


isSvg#

isSvg(content): boolean

Parameters#

Name Type
content string

Returns#

boolean


onMultiSelectFor#

onMultiSelectFor<Value, Option, Group>(collection): SelectProps<Value, Option, true, Group>["onChange"]

Type parameters#

Name Type
Value Value
Option extends SelectOption<Value, Option>
Group extends GroupBase<Option, Group> = GroupBase<Option>

Parameters#

Name Type
collection Set<Value> | ObservableSet<Value>

Returns#

SelectProps<Value, Option, true, Group>["onChange"]


showDetails#

showDetails(selfLink, resetSelected?): void

Deprecated

Use Renderer.Navigation.showDetails

Parameters#

Name Type
selfLink undefined | string
resetSelected? boolean

Returns#

void


unionInputValidatorsAsync#

unionInputValidatorsAsync(baseValidator, ...validators): AsyncInputValidator

Create a new input validator from a list of syncronous or async input validators. Will match as valid if one of the input validators matches the input

Parameters#

Name Type
baseValidator Object
baseValidator.condition undefined | (props: InputProps) => any | (props: InputProps) => any | (props: InputProps) => any
baseValidator.message null | string | number | boolean | ReactPortal | ReactElement<any, string | JSXElementConstructor<any>> | StrictReactFragment | Iterable<StrictReactNode> | (value: string, props?: InputProps) => StrictReactNode
...validators InputValidator<boolean>[]

Returns#

AsyncInputValidator


withTooltip#

withTooltip<TargetProps>(Target): React.FunctionComponent<TargetProps & TooltipDecoratorProps>

Type parameters#

Name
TargetProps

Parameters#

Name Type
Target TargetProps extends Pick<TooltipDecoratorProps, "id" | "children"> ? FunctionComponent<TargetProps> : never

Returns#

React.FunctionComponent<TargetProps & TooltipDecoratorProps>