Hi,
You can find the scripts at the location
"client/target/generated-webapp/scripts/". Make changes to
cloudstack.js
here.
*Note: *First remove the corresponding gz file(in your case
cloudstack.js.gz) otherwise the changes won't reflect.
*The changes in generated-webapps are not saved and tracked in git. So
make
sure to copy your changes to actual scripts (in ui/scripts) before
finally
rebuilding the project. *The changes made this way are directly
reflected
by refreshing the page.
PS: Not sure if its the correct way to develop but it works :). Once
again,
make sure to copy your changes back to correct scripts before building
the
project.
Regards,
Kshitij
On Mon, Nov 9, 2015 at 12:34 PM, Wei ZHOU <ustcweiz...@gmail.com>
wrote:
I guess you worked on old version before.
in 4.6, something changed. you might compress cloudStack.js to get
cloudStack.js.gz as well.
2015-11-08 15:05 GMT+01:00 Илья Толстихин <inosi...@gmail.com>:
Hi all,
Could please help with the process of UI customization:
I have CloudStack 4.6.0 built from the source.
I want to add a custom button to the WebUI menu.
In file ui/scripts/cloudStack.js I added my button into sections array
*sections: {*
* /***
* * Dashboard*
* */*
* dashboard: {},*
* instances: {},*
* affinityGroups: {},*
* storage: {},*
* network: {},*
* templates: {},*
* events: {},*
* projects: {},*
* accounts: {},*
* domains: {}, //domain-admin and root-admin only*
* regions: {}, //root-admin only*
* system: {}, //root-admin only*
* 'global-settings': {}, //root-admin only*
* configuration: {}, //root-admin only*
* plugins: {},*
* test: {*
* title: 'TestSection',*
* id: 'TestSection',*
* show: function(args){*
* var div = document.createElement('div');*
* div.innerHTML = "<h1>Test section</h1>";*
* return div;*
* }*
* }*
* }*
and in sectionPreFilter array
*sectionPreFilter: function(args) {*
* var sections = [];*
* if (isAdmin()) {*
* sections = ["dashboard", "instances", "storage",
"network", "templates", "accounts", "domains", "events", "system",
"global-settings", "configuration", "projects", "regions",
"affinityGroups", "test"];*
After building the project, the button was added to the menu, but when
I
edit cloudStack.js and restart jetty UI doesn't change, any changes are
applied only after the full project rebuild with command mvn
-Pdeveloper,systemvm -DskipTests clean install.
Jetty version 6.1.26
How to apply changes without rebuilding project?
And is it possible to apply it without restart Jetty?