mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
22 lines
678 B
TypeScript
22 lines
678 B
TypeScript
import { KubeObjectStore } from "../../kube-object.store";
|
|
import { autoBind } from "../../utils";
|
|
import { StorageClass, storageClassApi } from "../../api/endpoints/storage-class.api";
|
|
import { apiManager } from "../../api/api-manager";
|
|
import { volumesStore } from "../+storage-volumes/volumes.store";
|
|
|
|
export class StorageClassStore extends KubeObjectStore<StorageClass> {
|
|
api = storageClassApi;
|
|
|
|
constructor() {
|
|
super();
|
|
autoBind(this);
|
|
}
|
|
|
|
getPersistentVolumes(storageClass: StorageClass) {
|
|
return volumesStore.getByStorageClass(storageClass);
|
|
}
|
|
}
|
|
|
|
export const storageClassStore = new StorageClassStore();
|
|
apiManager.registerStore(storageClassStore);
|