mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Revert changes to KubeObjectStore
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
8460832d0f
commit
9ac6f5213b
@ -113,15 +113,15 @@ export abstract class KubeObjectStore<
|
||||
this.bindWatchEventsUpdater();
|
||||
}
|
||||
|
||||
// TODO: Circular dependency: KubeObjectStore -> ClusterFrameContext -> NamespaceStore -> KubeObjectStore
|
||||
@computed get contextItems(): K[] {
|
||||
if (!this.api.isNamespaced) {
|
||||
return this.items;
|
||||
}
|
||||
|
||||
const namespaces = this.dependencies.context.contextNamespaces;
|
||||
|
||||
return this.items
|
||||
.filter(item => namespaces.includes(item.getNs() as string));
|
||||
return this.items.filter(item => {
|
||||
const itemNamespace = item.getNs();
|
||||
|
||||
return !itemNamespace /* cluster-wide */ || namespaces.includes(itemNamespace);
|
||||
});
|
||||
}
|
||||
|
||||
getTotalCount(): number {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user