-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathrenderer.tsx
33 lines (30 loc) · 1020 Bytes
/
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
import { Renderer } from "@k8slens/extensions";
import { CarbonetesDetails, CarbonetesDetailsProps } from "./src/details/carbonetes-details"
import { CarbonetesStore } from "./src/preferences/carbonetes-preference-store";
import { CarbonetesPreferenceHint, CarbonetesPreferenceInput } from "./src/preferences/carbonetes-preferences";
import React from "react";
const { LensExtension } = Renderer;
export default class ExampleExtension extends LensExtension {
appPreferences = [
{
title: "Carbonetes",
components: {
Hint: () => <CarbonetesPreferenceHint/>,
Input: () => <CarbonetesPreferenceInput/>
}
}
];
kubeObjectDetailItems = [
{
kind: "Deployment",
apiVersions: ["apps/v1"],
components: {
Details: (props: CarbonetesDetailsProps) => <CarbonetesDetails deployment={props}/>
}
}
]
async onActivate() {
console.log("Carbonetes extension activated");
await CarbonetesStore.createInstance().loadExtension(this);
}
}