Module: lib/util

    Interfaces

    Variables

    CLUSTER_ACTION_GRACE_PERIOD

    Const CLUSTER_ACTION_GRACE_PERIOD: 5000

    Defined in

    lib/util.ts:17

    Functions

    filterResource

    filterResource(item, filter): boolean

    Parameters

    Name Type
    item KubeObjectInterface
    filter FilterState

    Returns

    boolean

    Defined in

    lib/util.ts:84


    getCluster

    getCluster(): string | null

    Returns

    string | null

    Defined in

    lib/util.ts:119


    getClusterPrefixedPath

    getClusterPrefixedPath(path?): string

    Parameters

    Name Type
    path? string | null

    Returns

    string

    Defined in

    lib/util.ts:111


    getPercentStr

    getPercentStr(value, total): null | string

    Parameters

    Name Type
    value number
    total number

    Returns

    null | string

    Defined in

    lib/util.ts:33


    getReadyReplicas

    getReadyReplicas(item): any

    Parameters

    Name Type
    item Workload

    Returns

    any

    Defined in

    lib/util.ts:42


    getResourceMetrics

    getResourceMetrics(item, metrics, resourceType): any[]

    Parameters

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

    Returns

    any[]

    Defined in

    lib/util.ts:60


    getResourceStr

    getResourceStr(value, resourceType): string

    Parameters

    Name Type
    value number
    resourceType "cpu" | "memory"

    Returns

    string

    Defined in

    lib/util.ts:50


    getTotalReplicas

    getTotalReplicas(item): any

    Parameters

    Name Type
    item Workload

    Returns

    any

    Defined in

    lib/util.ts:46


    localeDate

    localeDate(date): string

    Parameters

    Name Type
    date DateParam

    Returns

    string

    Defined in

    lib/util.ts:25


    timeAgo

    timeAgo(date): string

    Parameters

    Name Type
    date DateParam

    Returns

    string

    Defined in

    lib/util.ts:21


    useErrorState

    useErrorState(dependentSetter?): any[]

    Parameters

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

    Returns

    any[]

    Defined in

    lib/util.ts:131


    useFilterFunc

    useFilterFunc(): (item: KubeObjectInterface) => boolean

    Returns

    fn

    ▸ (item): boolean

    Parameters
    Name Type
    item KubeObjectInterface
    Returns

    boolean

    Defined in

    lib/util.ts:106