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

Remove delete subnamespace depenency from store

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev 2023-03-02 14:42:03 +03:00
parent a61d475bbc
commit 7fd7fd66f7
2 changed files with 0 additions and 9 deletions

View File

@ -12,7 +12,6 @@ import storesAndApisCanBeCreatedInjectable from "../../stores-apis-can-be-create
import clusterFrameContextForClusterScopedResourcesInjectable from "../../cluster-frame-context/for-cluster-scoped-resources.injectable"; import clusterFrameContextForClusterScopedResourcesInjectable from "../../cluster-frame-context/for-cluster-scoped-resources.injectable";
import clusterConfiguredAccessibleNamespacesInjectable from "../../cluster/accessible-namespaces.injectable"; import clusterConfiguredAccessibleNamespacesInjectable from "../../cluster/accessible-namespaces.injectable";
import loggerInjectable from "../../../common/logger.injectable"; import loggerInjectable from "../../../common/logger.injectable";
import removeSubnamespaceInjectable from "./remove-subnamespace.injectable";
const namespaceStoreInjectable = getInjectable({ const namespaceStoreInjectable = getInjectable({
id: "namespace-store", id: "namespace-store",
@ -28,7 +27,6 @@ const namespaceStoreInjectable = getInjectable({
storage: createStorage<string[] | undefined>("selected_namespaces", undefined), storage: createStorage<string[] | undefined>("selected_namespaces", undefined),
clusterConfiguredAccessibleNamespaces: di.inject(clusterConfiguredAccessibleNamespacesInjectable), clusterConfiguredAccessibleNamespaces: di.inject(clusterConfiguredAccessibleNamespacesInjectable),
logger: di.inject(loggerInjectable), logger: di.inject(loggerInjectable),
removeSubnamespace: di.inject(removeSubnamespaceInjectable),
}, api); }, api);
}, },
injectionToken: kubeObjectStoreInjectionToken, injectionToken: kubeObjectStoreInjectionToken,

View File

@ -21,7 +21,6 @@ export interface NamespaceTree {
interface Dependencies extends KubeObjectStoreDependencies { interface Dependencies extends KubeObjectStoreDependencies {
readonly storage: StorageLayer<string[] | undefined>; readonly storage: StorageLayer<string[] | undefined>;
readonly clusterConfiguredAccessibleNamespaces: IComputedValue<string[]>; readonly clusterConfiguredAccessibleNamespaces: IComputedValue<string[]>;
readonly removeSubnamespace: (name: string) => Promise<void>;
} }
export class NamespaceStore extends KubeObjectStore<Namespace, NamespaceApi> { export class NamespaceStore extends KubeObjectStore<Namespace, NamespaceApi> {
@ -221,12 +220,6 @@ export class NamespaceStore extends KubeObjectStore<Namespace, NamespaceApi> {
@action @action
async remove(item: Namespace) { async remove(item: Namespace) {
if (item.isSubnamespace()) {
await this.dependencies.removeSubnamespace(item.getName());
return;
}
await super.remove(item); await super.remove(item);
this.clearSelected(item.getName()); this.clearSelected(item.getName());
} }