1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00
lens/src/renderer/components/+config-maps/config-maps.store.ts
Sebastian Malton 1031d754f6 convert all KubeApis to injectable with legacy global backups
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2022-05-04 08:47:19 -04:00

22 lines
825 B
TypeScript

/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { KubeObjectStore } from "../../../common/k8s-api/kube-object.store";
import type { ConfigMap, ConfigMapApi, ConfigMapData } from "../../../common/k8s-api/endpoints/config-map.api";
import { configMapApi } from "../../../common/k8s-api/endpoints/config-map.api";
import { apiManager } from "../../../common/k8s-api/api-manager";
import { isClusterPageContext } from "../../utils";
export class ConfigMapStore extends KubeObjectStore<ConfigMap, ConfigMapApi, ConfigMapData> {
}
export const configMapStore = isClusterPageContext()
? new ConfigMapStore(configMapApi)
: undefined as never;
if (isClusterPageContext()) {
apiManager.registerStore(configMapStore);
}