Class: PodsStore#
Hierarchy#
↳ PodsStore
Index#
Constructors#
Properties#
- api
- bufferSize
- contextReady
- eventsBuffer
- failedLoading
- isLoaded
- isLoading
- items
- kubeMetrics
- limit
- metrics
- selectedItemsIds
- defaultContext
Accessors#
Methods#
- [Symbol.iterator]
- bindWatchEventsUpdater
- create
- createItem
- defaultSorting
- filterItemsOnLoad
- getAllByNs
- getById
- getByLabel
- getByName
- getByPath
- getIndexById
- getItems
- getPodKubeMetrics
- getPodsByNode
- getPodsByOwner
- getPodsByOwnerId
- getStatuses
- getSubscribeApis
- getTotalCount
- isSelected
- isSelectedAll
- load
- loadAll
- loadContainerMetrics
- loadFromPath
- loadItem
- loadItems
- loadKubeMetrics
- loadMetrics
- mergeItems
- reloadAll
- remove
- removeItem
- removeSelectedItems
- reset
- resetOnError
- resetSelection
- select
- sortItems
- subscribe
- toggleSelection
- toggleSelectionAll
- unselect
- update
- updateFromEventsBuffer
- updateItem
Constructors#
constructor#
+ new PodsStore(): PodsStore
Inherited from KubeObjectStore.constructor
Defined in src/renderer/kube-object.store.ts:26
Returns: PodsStore
Properties#
api#
• api: PodsApi‹› = podsApi
Overrides KubeObjectStore.api
Defined in src/renderer/components/+workloads-pods/pods.store.ts:11
bufferSize#
• bufferSize: number = 50000
Inherited from KubeObjectStore.bufferSize
Defined in src/renderer/kube-object.store.ts:23
contextReady#
• contextReady: Promise‹void› & object = when(() => Boolean(this.context))
Inherited from KubeObjectStore.contextReady
Defined in src/renderer/kube-object.store.ts:26
Protected
eventsBuffer#
• eventsBuffer: IObservableArray‹IKubeWatchEvent‹KubeJsonApiData›› = observable.array
Inherited from KubeObjectStore.eventsBuffer
Defined in src/renderer/kube-object.store.ts:263
failedLoading#
• failedLoading: boolean = false
Inherited from KubeObjectStore.failedLoading
Defined in src/renderer/item.store.ts:16
isLoaded#
• isLoaded: boolean = false
Inherited from KubeObjectStore.isLoaded
Defined in src/renderer/item.store.ts:18
isLoading#
• isLoading: boolean = false
Inherited from KubeObjectStore.isLoading
Defined in src/renderer/item.store.ts:17
items#
• items: IObservableArray‹T› = observable.array
Inherited from KubeObjectStore.items
Defined in src/renderer/item.store.ts:19
kubeMetrics#
• kubeMetrics: IObservableArray‹PodMetrics‹›› = observable.array
Defined in src/renderer/components/+workloads-pods/pods.store.ts:14
Optional
limit#
• limit? : number
Inherited from KubeObjectStore.limit
Defined in src/renderer/kube-object.store.ts:22
metrics#
• metrics: IPodMetrics = null
Defined in src/renderer/components/+workloads-pods/pods.store.ts:13
selectedItemsIds#
• selectedItemsIds: ObservableMap‹string, boolean› = observable.map
Inherited from KubeObjectStore.selectedItemsIds
Defined in src/renderer/item.store.ts:20
Static
defaultContext#
▪ defaultContext: ClusterContext
Inherited from KubeObjectStore.defaultContext
Defined in src/renderer/kube-object.store.ts:19
Accessors#
context#
• get context(): ClusterContext
Inherited from KubeObjectStore.context
Defined in src/renderer/kube-object.store.ts:33
Returns: ClusterContext
contextItems#
• get contextItems(): Pod[]
Inherited from KubeObjectStore.contextItems
Defined in src/renderer/kube-object.store.ts:37
Returns: Pod[]
query#
• get query(): IKubeApiQueryParams
Inherited from KubeObjectStore.query
Defined in src/renderer/kube-object.store.ts:51
Returns: IKubeApiQueryParams
selectedItems#
• get selectedItems(): Pod[]
Inherited from KubeObjectStore.selectedItems
Defined in src/renderer/item.store.ts:22
Returns: Pod[]
Methods#
[Symbol.iterator]#
▸ [Symbol.iterator](): Generator‹T, void, undefined›
Inherited from KubeObjectStore.[Symbol.iterator]
Defined in src/renderer/item.store.ts:187
Returns: Generator‹T, void, undefined›
Protected
bindWatchEventsUpdater#
▸ bindWatchEventsUpdater(delay
: number): void
Inherited from KubeObjectStore.bindWatchEventsUpdater
Defined in src/renderer/kube-object.store.ts:265
Parameters:
Name | Type | Default |
---|---|---|
delay |
number | 1000 |
Returns: void
create#
▸ create(params
: object, data?
: Partial‹Pod›): Promise‹Pod›
Inherited from KubeObjectStore.create
Defined in src/renderer/kube-object.store.ts:234
Parameters:
▪ params: object
Name | Type |
---|---|
name |
string |
namespace? |
string |
▪Optional
data: Partial‹Pod›
Returns: Promise‹Pod›
Protected
createItem#
▸ createItem(params
: object, data?
: Partial‹Pod›): Promise‹Pod›
Inherited from KubeObjectStore.createItem
Overrides void
Defined in src/renderer/kube-object.store.ts:230
Parameters:
▪ params: object
Name | Type |
---|---|
name |
string |
namespace? |
string |
▪Optional
data: Partial‹Pod›
Returns: Promise‹Pod›
Protected
defaultSorting#
▸ defaultSorting(item
: Pod): string
Inherited from KubeObjectStore.defaultSorting
Defined in src/renderer/item.store.ts:14
Parameters:
Name | Type |
---|---|
item |
Pod |
Returns: string
Protected
filterItemsOnLoad#
▸ filterItemsOnLoad(items
: Pod[]): T[]
Inherited from KubeObjectStore.filterItemsOnLoad
Defined in src/renderer/kube-object.store.ts:132
Parameters:
Name | Type |
---|---|
items |
Pod[] |
Returns: T[]
getAllByNs#
▸ getAllByNs(namespace
: string | string[], strict
: boolean): Pod[]
Inherited from KubeObjectStore.getAllByNs
Defined in src/renderer/kube-object.store.ts:63
Parameters:
Name | Type | Default |
---|---|---|
namespace |
string | string[] | - |
strict |
boolean | false |
Returns: Pod[]
getById#
▸ getById(id
: string): T
Inherited from KubeObjectStore.getById
Defined in src/renderer/kube-object.store.ts:73
Parameters:
Name | Type |
---|---|
id |
string |
Returns: T
getByLabel#
▸ getByLabel(labels
: string[] | object): Pod[]
Inherited from KubeObjectStore.getByLabel
Defined in src/renderer/kube-object.store.ts:89
Parameters:
Name | Type |
---|---|
labels |
string[] | object |
Returns: Pod[]
getByName#
▸ getByName(name
: string, namespace?
: string): Pod
Inherited from KubeObjectStore.getByName
Overrides void
Defined in src/renderer/kube-object.store.ts:77
Parameters:
Name | Type |
---|---|
name |
string |
namespace? |
string |
Returns: Pod
getByPath#
▸ getByPath(path
: string): Pod
Inherited from KubeObjectStore.getByPath
Defined in src/renderer/kube-object.store.ts:85
Parameters:
Name | Type |
---|---|
path |
string |
Returns: Pod
getIndexById#
▸ getIndexById(id
: string): number
Inherited from KubeObjectStore.getIndexById
Defined in src/renderer/item.store.ts:39
Parameters:
Name | Type |
---|---|
id |
string |
Returns: number
getItems#
▸ getItems(): Pod[]
Inherited from KubeObjectStore.getItems
Defined in src/renderer/item.store.ts:26
Returns: Pod[]
getPodKubeMetrics#
▸ getPodKubeMetrics(pod
: Pod): object
Defined in src/renderer/components/+workloads-pods/pods.store.ts:63
Parameters:
Name | Type |
---|---|
pod |
Pod |
Returns: object
-
cpu: number = 0
-
memory: number = 0
getPodsByNode#
▸ getPodsByNode(node
: string): Pod‹›[]
Defined in src/renderer/components/+workloads-pods/pods.store.ts:53
Parameters:
Name | Type |
---|---|
node |
string |
Returns: Pod‹›[]
getPodsByOwner#
▸ getPodsByOwner(workload
: WorkloadKubeObject): Pod[]
Defined in src/renderer/components/+workloads-pods/pods.store.ts:35
Parameters:
Name | Type |
---|---|
workload |
WorkloadKubeObject |
Returns: Pod[]
getPodsByOwnerId#
▸ getPodsByOwnerId(workloadId
: string): Pod[]
Defined in src/renderer/components/+workloads-pods/pods.store.ts:47
Parameters:
Name | Type |
---|---|
workloadId |
string |
Returns: Pod[]
getStatuses#
▸ getStatuses(pods
: Pod[]): Dictionary‹number›
Overrides KubeObjectStore.getStatuses
Defined in src/renderer/components/+workloads-pods/pods.store.ts:59
Parameters:
Name | Type |
---|---|
pods |
Pod[] |
Returns: Dictionary‹number›
getSubscribeApis#
▸ getSubscribeApis(): KubeApi[]
Inherited from KubeObjectStore.getSubscribeApis
Defined in src/renderer/kube-object.store.ts:271
Returns: KubeApi[]
getTotalCount#
▸ getTotalCount(): number
Inherited from KubeObjectStore.getTotalCount
Overrides void
Defined in src/renderer/kube-object.store.ts:47
Returns: number
isSelected#
▸ isSelected(item
: Pod): boolean
Inherited from KubeObjectStore.isSelected
Defined in src/renderer/item.store.ts:126
Parameters:
Name | Type |
---|---|
item |
Pod |
Returns: boolean
isSelectedAll#
▸ isSelectedAll(visibleItems
: Pod[]): boolean
Inherited from KubeObjectStore.isSelectedAll
Defined in src/renderer/item.store.ts:160
Parameters:
Name | Type | Default |
---|---|---|
visibleItems |
Pod[] | this.items |
Returns: boolean
load#
▸ load(params
: object): Promise‹Pod›
Inherited from KubeObjectStore.load
Defined in src/renderer/kube-object.store.ts:209
Parameters:
▪ params: object
Name | Type |
---|---|
name |
string |
namespace? |
string |
Returns: Promise‹Pod›
loadAll#
▸ loadAll(options
: object): Promise‹void | Pod[]›
Inherited from KubeObjectStore.loadAll
Overrides void
Defined in src/renderer/kube-object.store.ts:137
Parameters:
▪Default value
options: object= {}
Name | Type |
---|---|
merge? |
boolean |
namespaces? |
string[] |
Returns: Promise‹void | Pod[]›
loadContainerMetrics#
▸ loadContainerMetrics(pod
: Pod): Promise‹IPodMetrics‹IMetrics››
Defined in src/renderer/components/+workloads-pods/pods.store.ts:21
Parameters:
Name | Type |
---|---|
pod |
Pod |
Returns: Promise‹IPodMetrics‹IMetrics››
loadFromPath#
▸ loadFromPath(resourcePath
: string): Promise‹T›
Inherited from KubeObjectStore.loadFromPath
Defined in src/renderer/kube-object.store.ts:224
Parameters:
Name | Type |
---|---|
resourcePath |
string |
Returns: Promise‹T›
Protected
loadItem#
▸ loadItem(params
: object): Promise‹Pod›
Inherited from KubeObjectStore.loadItem
Overrides void
Defined in src/renderer/kube-object.store.ts:204
Parameters:
▪ params: object
Name | Type |
---|---|
name |
string |
namespace? |
string |
Returns: Promise‹Pod›
Protected
loadItems#
▸ loadItems(__namedParameters
: object): Promise‹Pod[]›
Inherited from KubeObjectStore.loadItems
Overrides void
Defined in src/renderer/kube-object.store.ts:106
Parameters:
▪ __namedParameters: object
Name | Type |
---|---|
api |
KubeApi‹any› |
namespaces |
string[] |
Returns: Promise‹Pod[]›
loadKubeMetrics#
▸ loadKubeMetrics(namespace?
: string): Promise‹void›
Defined in src/renderer/components/+workloads-pods/pods.store.ts:25
Parameters:
Name | Type |
---|---|
namespace? |
string |
Returns: Promise‹void›
loadMetrics#
▸ loadMetrics(pod
: Pod): Promise‹void›
Defined in src/renderer/components/+workloads-pods/pods.store.ts:17
Parameters:
Name | Type |
---|---|
pod |
Pod |
Returns: Promise‹void›
Protected
mergeItems#
▸ mergeItems(partialItems
: Pod[], __namedParameters
: object): Pod[]
Inherited from KubeObjectStore.mergeItems
Defined in src/renderer/kube-object.store.ts:180
Parameters:
▪ partialItems: Pod[]
▪Default value
__namedParameters: object= {}
Name | Type | Default |
---|---|---|
filter |
boolean | true |
replace |
boolean | false |
sort |
boolean | true |
updateStore |
boolean | true |
Returns: Pod[]
reloadAll#
▸ reloadAll(opts
: object): Promise‹void | T[]›
Inherited from KubeObjectStore.reloadAll
Defined in src/renderer/kube-object.store.ts:169
Parameters:
▪Default value
opts: object= {}
Name | Type |
---|---|
force? |
boolean |
merge? |
boolean |
namespaces? |
string[] |
Returns: Promise‹void | T[]›
remove#
▸ remove(item
: Pod): Promise‹void›
Inherited from KubeObjectStore.remove
Defined in src/renderer/kube-object.store.ts:252
Parameters:
Name | Type |
---|---|
item |
Pod |
Returns: Promise‹void›
Protected
removeItem#
▸ removeItem(item
: Pod, request
: function): Promise‹void›
Inherited from KubeObjectStore.removeItem
Defined in src/renderer/item.store.ts:120
Parameters:
▪ item: Pod
▪ request: function
▸ (): Promise‹any›
Returns: Promise‹void›
removeSelectedItems#
▸ removeSelectedItems(): Promise‹void[]›
Inherited from KubeObjectStore.removeSelectedItems
Overrides void
Defined in src/renderer/kube-object.store.ts:258
Returns: Promise‹void[]›
reset#
▸ reset(): void
Overrides KubeObjectStore.reset
Defined in src/renderer/components/+workloads-pods/pods.store.ts:92
Returns: void
Protected
resetOnError#
▸ resetOnError(error
: any): void
Inherited from KubeObjectStore.resetOnError
Defined in src/renderer/kube-object.store.ts:200
Parameters:
Name | Type |
---|---|
error |
any |
Returns: void
resetSelection#
▸ resetSelection(): void
Inherited from KubeObjectStore.resetSelection
Defined in src/renderer/item.store.ts:167
Returns: void
select#
▸ select(item
: Pod): void
Inherited from KubeObjectStore.select
Defined in src/renderer/item.store.ts:131
Parameters:
Name | Type |
---|---|
item |
Pod |
Returns: void
Protected
sortItems#
▸ sortItems(items
: Pod[], sorting?
: function[], order?
: "asc" | "desc"): Pod[]
Inherited from KubeObjectStore.sortItems
Defined in src/renderer/item.store.ts:44
Parameters:
Name | Type | Default |
---|---|---|
items |
Pod[] | this.items |
sorting? |
function[] | - |
order? |
"asc" | "desc" | - |
Returns: Pod[]
subscribe#
▸ subscribe(apis
: KubeApi‹any›[]): (Anonymous function)
Inherited from KubeObjectStore.subscribe
Overrides void
Defined in src/renderer/kube-object.store.ts:275
Parameters:
Name | Type | Default |
---|---|---|
apis |
KubeApi‹any›[] | this.getSubscribeApis() |
Returns: (Anonymous function)
toggleSelection#
▸ toggleSelection(item
: Pod): void
Inherited from KubeObjectStore.toggleSelection
Defined in src/renderer/item.store.ts:141
Parameters:
Name | Type |
---|---|
item |
Pod |
Returns: void
toggleSelectionAll#
▸ toggleSelectionAll(visibleItems
: Pod[]): void
Inherited from KubeObjectStore.toggleSelectionAll
Defined in src/renderer/item.store.ts:150
Parameters:
Name | Type | Default |
---|---|---|
visibleItems |
Pod[] | this.items |
Returns: void
unselect#
▸ unselect(item
: Pod): void
Inherited from KubeObjectStore.unselect
Defined in src/renderer/item.store.ts:136
Parameters:
Name | Type |
---|---|
item |
Pod |
Returns: void
update#
▸ update(item
: Pod, data
: Partial‹Pod›): Promise‹Pod›
Inherited from KubeObjectStore.update
Defined in src/renderer/kube-object.store.ts:243
Parameters:
Name | Type |
---|---|
item |
Pod |
data |
Partial‹Pod› |
Returns: Promise‹Pod›
Protected
updateFromEventsBuffer#
▸ updateFromEventsBuffer(): void
Inherited from KubeObjectStore.updateFromEventsBuffer
Defined in src/renderer/kube-object.store.ts:353
Returns: void
Protected
updateItem#
▸ updateItem(item
: Pod, request
: function): Promise‹T›
Inherited from KubeObjectStore.updateItem
Defined in src/renderer/item.store.ts:110
Parameters:
▪ item: Pod
▪ request: function
▸ (): Promise‹Pod›
Returns: Promise‹T›