mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
* initial telemetry extension Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com> * Fix preferences saving and default value Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com> Co-authored-by: Lauri Nevala <lauri.nevala@gmail.com>
27 lines
733 B
TypeScript
27 lines
733 B
TypeScript
import { DynamicPageType, LensRendererExtension, PageRegistry } from "@lens/ui-extensions";
|
|
import { examplePage, ExtensionIcon } from "./page"
|
|
|
|
export default class ExampleExtension extends LensRendererExtension {
|
|
onActivate() {
|
|
console.log('EXAMPLE EXTENSION RENDERER: ACTIVATED', this.getMeta());
|
|
}
|
|
|
|
registerPages(registry: PageRegistry) {
|
|
this.disposers.push(
|
|
registry.add({
|
|
type: DynamicPageType.CLUSTER,
|
|
path: "/extension-example",
|
|
title: "Example Extension",
|
|
components: {
|
|
Page: examplePage(this),
|
|
MenuIcon: ExtensionIcon,
|
|
}
|
|
})
|
|
)
|
|
}
|
|
|
|
onDeactivate() {
|
|
console.log('EXAMPLE EXTENSION RENDERER: DEACTIVATED', this.getMeta());
|
|
}
|
|
}
|