-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extensions-api: initial hello-world example #817
Conversation
console.log('EXAMPLE EXTENSION: ACTIVATE', this.getMeta()) | ||
const { dynamicPages } = this.runtime; | ||
|
||
this.unRegisterPage = dynamicPages.register({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe the API should be something like:
this.registerPage({
type: DynamicPageType.CLUSTER,
path: "/extension-example",
// ...
})
and LensExtension would automatically do unregister etc housekeeping.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
import React from "react"; | ||
import path from "path"; | ||
|
||
let extension: ExampleExtension; // todo: provide instance from context |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couldn't this be achieved by a static method on ExampleExtension
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This solution was temporary
…n: menu icon + page Signed-off-by: Roman <ixrock@gmail.com>
Signed-off-by: Roman <ixrock@gmail.com>
Signed-off-by: Roman <ixrock@gmail.com>
Signed-off-by: Roman <ixrock@gmail.com>
Signed-off-by: Roman <ixrock@gmail.com>
…mo-only) Signed-off-by: Roman <ixrock@gmail.com>
40d3ad0
to
966aa38
Compare
Signed-off-by: Roman <ixrock@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a good start 👍 Let's improve API in follow-up PRs.
Tests are still failing... |
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
Adds new icon and page in cluster-view