1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Add deprecation messages

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton 2023-03-06 14:44:29 -05:00
parent 320f0fc6f1
commit 08c1cd39c9

View File

@ -60,15 +60,16 @@ export class NamespaceStore extends KubeObjectStore<Namespace, NamespaceApi> {
return this.dependencies.storage.get() ?? [];
}
/**
* @deprecated This doesn't contain the namespaces from cluster settings or from cluster context
*/
@computed get allowedNamespaces(): string[] {
return Array.from(new Set([
...this.dependencies.context.allNamespaces, // allowed namespaces from cluster (main)
...this.items.map(item => item.getName()), // loaded namespaces from k8s api
].flat()));
return this.items.map(item => item.getName());
}
/**
* The list of selected namespace names (for filtering)
* @deprecated This doesn't contain the namespaces from cluster settings or from cluster context
*/
@computed get contextNamespaces() {
if (!this.selectedNamespaces.length) {
@ -80,6 +81,7 @@ export class NamespaceStore extends KubeObjectStore<Namespace, NamespaceApi> {
/**
* The set of select namespace names (for filtering)
* @deprecated This doesn't contain the namespaces from cluster settings or from cluster context
*/
@computed get selectedNames(): Set<string> {
return new Set(this.contextNamespaces);