-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathrenderer.tsx
37 lines (33 loc) · 1.08 KB
/
renderer.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import { Renderer } from "@k8slens/extensions";
import React from "react";
import { CertificateDetails, CertificateDetailsProps } from "./src/components/certificate-details";
import { CertificatePage } from "./src/components/certificate-page";
import { Certificate} from "./src/certificate"
export function CertificateIcon(props: Renderer.Component.IconProps) {
return <Renderer.Component.Icon {...props} material="security" tooltip="Certificates"/>
}
export default class CrdSampleExtension extends Renderer.LensExtension {
clusterPages = [{
id: "certificates",
components: {
Page: () => <CertificatePage extension={this} />,
MenuIcon: CertificateIcon,
}
}]
clusterPageMenus = [
{
target: { pageId: "certificates" },
title: "Certificates",
components: {
Icon: CertificateIcon,
}
},
];
kubeObjectDetailItems = [{
kind: Certificate.kind,
apiVersions: ["cert-manager.io/v1alpha2", "cert-manager.io/v1"],
components: {
Details: (props: CertificateDetailsProps) => <CertificateDetails {...props} />
}
}]
}