Addon related variables to (next) sunstone

Hello Developers,

I am preparing our addon for the upcoming OpenNebula release 4.14 and have problems with the integration to the web gui (sunstone). For the current relase (4.12) the integration was just to add some lines to datastores-tab.js by applying a generated patch file.

In the master git branch I found that there are a lot of changes. The datastores-tab.js is split on two files:


Just for test I patched both files and rebuild the project to find that the changes are not applied.

I found that there is javascript file that is same as the one in the sources:


It looks like it is somehow compiled.

So I have some questions:

  1. How the main.js (and the corresponding is compiled/updated in the source?
  2. As our addon is external to the core project the only way to integrate is with a patch that should be placed on customer’s site. What is the proper way to add code/variables/whatever to the sunstone module in this case?

Without sunstone integration the only option for configuration is via command line programs(oneds) that is not so convenient for the customers.

Kind Regards,
Anton Todorov

Hi Anton,

For testing/developing you can enable de dev environment for sunstone:

  • Set :env to ‘dev’ in sunstone-server.conf
  • Link the sunstone public folder inside src to /usr/lib/one/sunstone/public

This way, you don’t have to compile de js files.

We are going to update the way js files are built for the final release and there will be an option in the scons script.

Hi Daniel,

Thank you for the reply.

I will check things with the dev environment enabled and prepare patches for them.

I’ll wait for the changes to appear in the master branch and will test again.

Can I assume that in the final release there will be a way to rebuild the js files at the customer site? Something like the source files packaged somewhere(like /usr/share/one…) so the integrations can patch them and rebuild the production js files.

Kind Regards,
Anton Todorov

Yes, the release tarball will include the non-minified files and you will be able to rebuild them