Custom menu entries and page

Hello,
I am working on a plugin that will add a menu entry on the left menu and will display a page with custom functionalities. Can anyone share how to achieve this, and if you have any example templates and code, to share it?
I didn’t find any custom plugin examples related to the rendering of a new page and menu item.
Thanks in advance!

@Todor Take a look at the blog post I wrote about plugins and how to build them: Introduction to OpenSearch Dashboard Plugins · OpenSearch

You will have to do 2 things to get what you want:

  1. Create a new plugin to add the functionality that you want. i.e. the new page
  2. Register your plugin with the core application to let it know how to render your app. OpenSearch-Dashboards/plugin.ts at 2.6 · opensearch-project/OpenSearch-Dashboards · GitHub

Also look at the example plugins found in the repo for more insights on how to write a plugin. They are minimal examples that can get help you understand a lot of the fundamentals easily.

2 Likes

@ashwinpc Thank you! How can I then add these plugins to my docker project? I managed to run them only on the OpenSearchDashboards repo?

Thats actually a good question. Considering that there are a few ways you can setup the application to use docker, can you tell me a little more about your docker setup? how exactly are you running the project using docker?

1 Like

Yes. I am using a docker compose file, and I want to set up the yarn watcher with it, but it seems that with docker it runs in production mode, without the -dev in the yarn command. Could you give me a hint on how to run the image in development mode? I have created a volume for my custom plugin in the docker compose file, but nothing happens when I modify the plugin files.