mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Linter fixes
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
parent
79c0da5dae
commit
52a1c6968f
@ -16,8 +16,8 @@ const deleteSubnamespaceInjectable = getInjectable({
|
|||||||
|
|
||||||
return async (namespace: string) => (
|
return async (namespace: string) => (
|
||||||
removeSubnamespace(namespace)
|
removeSubnamespace(namespace)
|
||||||
)
|
);
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export default deleteSubnamespaceInjectable;
|
export default deleteSubnamespaceInjectable;
|
||||||
|
|||||||
@ -88,4 +88,4 @@ export const NamespacesRoute = withInjectables<Dependencies>(NonInjectedNamespac
|
|||||||
namespaceStore: di.inject(namespaceStoreInjectable),
|
namespaceStore: di.inject(namespaceStoreInjectable),
|
||||||
openAddNamespaceDialog: di.inject(openAddNamepaceDialogInjectable),
|
openAddNamespaceDialog: di.inject(openAddNamepaceDialogInjectable),
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
|
|||||||
@ -28,7 +28,7 @@ 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),
|
||||||
deleteSubnamespace: di.inject(deleteSubnamespaceInjectable)
|
deleteSubnamespace: di.inject(deleteSubnamespaceInjectable),
|
||||||
}, api);
|
}, api);
|
||||||
},
|
},
|
||||||
injectionToken: kubeObjectStoreInjectionToken,
|
injectionToken: kubeObjectStoreInjectionToken,
|
||||||
|
|||||||
@ -21,7 +21,7 @@ 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[]>;
|
||||||
deleteSubnamespace: (name: string) => Promise<void>
|
deleteSubnamespace: (name: string) => Promise<void>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class NamespaceStore extends KubeObjectStore<Namespace, NamespaceApi> {
|
export class NamespaceStore extends KubeObjectStore<Namespace, NamespaceApi> {
|
||||||
@ -222,7 +222,7 @@ export class NamespaceStore extends KubeObjectStore<Namespace, NamespaceApi> {
|
|||||||
@action
|
@action
|
||||||
async remove(item: Namespace) {
|
async remove(item: Namespace) {
|
||||||
if (item.isSubnamespace()) {
|
if (item.isSubnamespace()) {
|
||||||
this.dependencies.deleteSubnamespace(item.getName())
|
this.dependencies.deleteSubnamespace(item.getName());
|
||||||
} else {
|
} else {
|
||||||
await super.remove(item);
|
await super.remove(item);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user