mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Load releases for all namespaces at once
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
parent
d40bd0c7d0
commit
ca518c7f55
@ -78,9 +78,15 @@ export class ReleaseStore extends ItemStore<HelmRelease> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async loadItems(namespaces: string[]) {
|
async loadItems(namespaces: string[]) {
|
||||||
return Promise
|
const isLoadingAll = namespaceStore.allowedNamespaces.every(ns => namespaces.includes(ns));
|
||||||
.all(namespaces.map(namespace => helmReleasesApi.list(namespace)))
|
|
||||||
.then(items => items.flat());
|
if (isLoadingAll) {
|
||||||
|
return helmReleasesApi.list();
|
||||||
|
} else {
|
||||||
|
return Promise
|
||||||
|
.all(namespaces.map(namespace => helmReleasesApi.list(namespace)))
|
||||||
|
.then(items => items.flat());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async create(payload: IReleaseCreatePayload) {
|
async create(payload: IReleaseCreatePayload) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user