mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
fix CRD views
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
444e161f54
commit
c3732197be
@ -57,9 +57,7 @@ export class CrdResources extends React.Component<Props> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@computed get store() {
|
@computed get store() {
|
||||||
if (!this.crd) return null;
|
return apiManager.getStore(this.crd?.getResourceApiBase());
|
||||||
|
|
||||||
return apiManager.getStore(this.crd.getResourceApiBase());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
|||||||
@ -30,9 +30,9 @@ import { KubeObject } from "../../../common/k8s-api/kube-object";
|
|||||||
|
|
||||||
function initStore(crd: CustomResourceDefinition) {
|
function initStore(crd: CustomResourceDefinition) {
|
||||||
const objectConstructor = class extends KubeObject {
|
const objectConstructor = class extends KubeObject {
|
||||||
readonly kind = crd.getResourceKind();
|
static readonly kind = crd.getResourceKind();
|
||||||
readonly namespaced = crd.isNamespaced();
|
static readonly namespaced = crd.isNamespaced();
|
||||||
readonly apiBase = crd.getResourceApiBase();
|
static readonly apiBase = crd.getResourceApiBase();
|
||||||
};
|
};
|
||||||
|
|
||||||
const api = apiManager.getApi(objectConstructor.apiBase)
|
const api = apiManager.getApi(objectConstructor.apiBase)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user