:wave: I've set up some custom resources and want ...
# extensions
b
👋 I've set up some custom resources and want to built UI extensions for them. The only docs I can find about this are: https://extensions.rancher.io/extensions/next/api/components/resources. I've set up my development environment and got some stuff working. Im now stuck and not really sure how to continue. I've got my routing setup working (I think), but im lost on how to implement a vue component to create custom a list/edit/view. Is there some documentation on how to set this up or some examples of anyone creating entire custom UI's for resources? Right now, I'm reading all the dashboard source code (because https://github.com/rancher/ui-plugin-examples are too simple for my usecase I think), but all the sourcecode is a lot to grasp 😅... Anyone that might be able to set me on the right track?
b
Hi @bland-translator-58922 The best page to follow should be https://extensions.rancher.io/extensions/next/api/nav/resource-page basically, if you want a resource page (list, detail, edit) you register it via
configureType
.
virtualType
is for non-resource pages (it can be anything you want). For more information about the side menu entries for these pages: https://extensions.rancher.io/extensions/next/api/nav/side-menu As for routing, your extension usually only falls in one of two categories:
top-level-product
or a
cluster-level-product
https://extensions.rancher.io/extensions/next/usecases/overview You can check the basic examples on the link above. Careful that the routing needs to follow some specific rules. So better to have pretty clear what type of extension you are developing and follow the basic routing examples we offer on the documentation. For a
top-level-product
you can follow Elemental as an example: https://github.com/rancher/elemental-ui For a
cluster-level-product
you can follow Kubewarden as an example: https://github.com/rancher/kubewarden-ui
There’s more official extensions: https://github.com/rancher/ui-plugin-charts/blob/main/manifest.json Or even partners extensions and community: https://extensions.rancher.io/extensions/next/catalog
b
Awesome! I'll take a look at the kubewarden. I have the cluster level products and some virtualTypes with iframes and some k8s proxies running. But was really struggling with custom resource pages. I'll take a look a kubewarden, seems like a nice setup. Thanks!
🫡 1