mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Clearn getPodsByOwnerId method
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
parent
e5b25f5f75
commit
209b67e1f1
@ -32,14 +32,8 @@ export class PodsStore extends KubeObjectStore<Pod> {
|
||||
}
|
||||
|
||||
getPodsByOwnerId(workloadId: string): Pod[] {
|
||||
if (!workloadId) return [];
|
||||
|
||||
return this.items.filter(pod => {
|
||||
const owners = pod.getOwnerRefs();
|
||||
|
||||
if (!owners.length) return;
|
||||
|
||||
return owners.find(owner => owner.uid === workloadId);
|
||||
return pod.getOwnerRefs().find(owner => owner.uid === workloadId);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user