Hello,
I want to develop a plugin for Nexus repository manager. This plugin will display a “Download statistics” button on the UI.
Based on the user rights, it will create an Excel file (or/and others formats) with the usages and statistics of the differents repositories of the user.
Firstly, is it possible to develop a plugin/bundle wich add an action on the UI?
I’m new on Nexus development, I read the various documentations but do you have any examples and advices you can tell me on this?
Alternatively you could develop a UI plugin with React. This is a relatively new way to work on the frontend so we don’t have any public documentation yet. You can look at the nexus-coreui-plugin to see how we’re contributing React code to the frontend. In particular the index.js file adds new items to the left-hand navigation. nexus-public/index.js at master · sonatype/nexus-public · GitHub
Thank you ! I’m checking this. It’s gonna take me a while to figure out how this works.
Is there a way to launch nexus-public in debug mode ?
Actually I built it and run “nexus console” but if possible, I want to debug the code step by step.
For the Java code, usage of KARAF_DEBUG environement variable is not working for me.
I found a way by launching “nexus console debug” command to start Nexus.
I will see to use React for all UI interractions of my code.
Hello, I start to understand how the code works. But I’m not a Javascript expert and I need help on somes points :
You was talking about react code, I found it in “frontend” directories (coreui-plugin and ui-plugin). I can see the load of the descriptor at the start of Karaf. But I can’t find the code in .kar file or .jar file… I don’t know how it works.
I followed your instructions to add a new item on the left-hand navigation but nothing is displayed… I tried with both methods “React” and “ExtJs”. In the console of my browser I see the load of my PluginConfig and my controller. I think I missed something…
When I type the path to my feature in the URL (for now it’s “…#browse/report”), I’m bloked on a popup “You have requested an operation which requires validation of your credentials.” I can see the title of my page on the back.
It will help me a lot if you can give me somes explanations and advices. I try to develop with both “React” and “ExtJs” to understand all.
Thank you @mworthington for your reply !
I am listening if you see improvements to be made.
My problem right now is to build the plugin on a Continuous Integration platform.
Because of the dependency with UI components of nexus-ui-plugin, I can’t build the plugin separatly from nexus-public repository.
Salut @mat1e ,
Installing this plugin would bring some statistics about how many time a package has been downloaded ?
Is it compatible with docker, pypi and apt ?
Hi Alex,
Sorry for the delay. Yes you can get how many times a package is downloaded. The plugin is just extracting Nexus available values of all packages of a repository.
It is compatible with all Nexus repositories types.