Module: lib/util

    Table of contents

    Interfaces

    Variables

    CLUSTER_ACTION_GRACE_PERIOD

    Const CLUSTER_ACTION_GRACE_PERIOD: 5000= 5000

    Defined in: lib/util.ts:18

    Functions

    filterResource

    filterResource(item: KubeObjectInterface, filter: FilterState ): boolean

    Parameters:

    Name Type
    item KubeObjectInterface
    filter FilterState

    Returns: boolean

    Defined in: lib/util.ts:81


    getCluster

    getCluster(): string | null

    Returns: string | null

    Defined in: lib/util.ts:116


    getClusterPrefixedPath

    getClusterPrefixedPath(path?: string | null): string

    Parameters:

    Name Type
    path? string | null

    Returns: string

    Defined in: lib/util.ts:108


    getPercentStr

    getPercentStr(value: number, total: number): null | string

    Parameters:

    Name Type
    value number
    total number

    Returns: null | string

    Defined in: lib/util.ts:30


    getReadyReplicas

    getReadyReplicas(item: Workload): any

    Parameters:

    Name Type
    item Workload

    Returns: any

    Defined in: lib/util.ts:39


    getResourceMetrics

    getResourceMetrics(item: Node, metrics: KubeMetrics[], resourceType: cpu | memory): any[]

    Parameters:

    Name Type
    item Node
    metrics KubeMetrics[]
    resourceType cpu | memory

    Returns: any[]

    Defined in: lib/util.ts:57


    getResourceStr

    getResourceStr(value: number, resourceType: cpu | memory): string

    Parameters:

    Name Type
    value number
    resourceType cpu | memory

    Returns: string

    Defined in: lib/util.ts:47


    getTotalReplicas

    getTotalReplicas(item: Workload): any

    Parameters:

    Name Type
    item Workload

    Returns: any

    Defined in: lib/util.ts:43


    localeDate

    localeDate(date: DateParam): string

    Parameters:

    Name Type
    date DateParam

    Returns: string

    Defined in: lib/util.ts:26


    timeAgo

    timeAgo(date: DateParam): string

    Parameters:

    Name Type
    date DateParam

    Returns: string

    Defined in: lib/util.ts:22


    useErrorState

    useErrorState(dependentSetter?: (…args: any) => void): any[]

    Parameters:

    Name Type
    dependentSetter? (…args: any) => void

    Returns: any[]

    Defined in: lib/util.ts:128


    useFilterFunc

    useFilterFunc(): function

    Returns: (item: KubeObjectInterface) => boolean

    Defined in: lib/util.ts:103