You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by Mike Tutkowski <mi...@solidfire.com> on 2014/08/09 08:02:05 UTC

Fast way to rebuild the GUI?

Hi,

When you change a JavaScript file for the GUI, is there a fast way to
update the management server with this file short of having to rebuild the
entire codebase?

Thanks!

-- 
*Mike Tutkowski*
*Senior CloudStack Developer, SolidFire Inc.*
e: mike.tutkowski@solidfire.com
o: 303.746.7302
Advancing the way the world uses the cloud
<http://solidfire.com/solution/overview/?video=play>*™*

Re: Fast way to rebuild the GUI?

Posted by Mike Tutkowski <mi...@solidfire.com>.
Thanks, everyone!

On Saturday, August 9, 2014, Rajani Karuturi <ra...@apache.org> wrote:

> Hi Mike,
>
> copying the changed files to generated-webapp and restarting jetty worked
> for me.
>
> In our jetty config, we set the scan interval to 0 and hence it never scans
> for files changes.
>
> Also, our jetty version is too old 6.1.26 while the latest is 9.2.*
>
> from the [docs]
>
> "As of Jetty 6.2.0pre0 a new feature to control webapp redeployment will be
> available. The configuration parameter is:
> <reload>[manual|automatic]</reload> When set to manual, no automatic
> scanning and redeployment of the webapp is done. Rather, the user can
> control when the webapp is reloaded by tapping the carriage return key. Set
> to automatic the scanning and automatic redeployment is performed at
> intervals controlled by the scanIntervalSeconds parameter. The choice of
> reloading paradigm can also be configured on the command line by use of the
> -Djetty.reload system parameter. For example: "mvn -Djetty.reload=manual
> jetty:run" would force manual reloading, regardless of what is configured
> in the project pom. Similarly: "mvn -Djetty.reload=automatic
> -Djetty.scanIntervalSeconds=10 jetty:run" will force automatic background
> reloading with a sweep every 10 seconds, regardless of the configuration in
> the project pom."
>
>
> [docs] http://docs.codehaus.org/display/JETTY/Maven+Jetty+Plugin
>
>
>
> On Sat, Aug 9, 2014 at 3:16 PM, Rohit Yadav <rohit.yadav@shapeblue.com
> <javascript:;>>
> wrote:
>
> > Hi Mike,
> >
> > On 09-Aug-2014, at 8:02 am, Mike Tutkowski <mike.tutkowski@solidfire.com
> <javascript:;>>
> > wrote:
> >
> > > Hi,
> > >
> > > When you change a JavaScript file for the GUI, is there a fast way to
> > > update the management server with this file short of having to rebuild
> > the
> > > entire codebase?
> >
> > Fastest way? How about edit in browser itself?
> >
> > Add stubs/new JS/CSS etc. files in the repo, do a clean install on the
> > client project, run mgmt server.
> >
> > Open up Chrome, open developer tools -> sources, make sure you’ve the
> > console open too.
> > Edit JS files, save it; it will say something on the console like
> > “Recompilation and update succeeded”.
> > For tinkering purposes, you can use inspect elements; add break points,
> do
> > resource/performance monitoring/benchmarking/optimizations etc.
> >
> > Now, iterate until you’ve a solution; copy stuff from the JS files
> > (Chrome) to the source files in the repository.
> > Hope this helps.
> >
> > Regards,
> > Rohit Yadav
> > Software Architect, ShapeBlue
> > M. +41 779015219 | rohit.yadav@shapeblue.com <javascript:;>
> > Blog: bhaisaab.org | Twitter: @_bhaisaab
> >
> >
> >
> > Find out more about ShapeBlue and our range of CloudStack related
> services
> >
> > IaaS Cloud Design & Build<
> > http://shapeblue.com/iaas-cloud-design-and-build//>
> > CSForge – rapid IaaS deployment framework<http://shapeblue.com/csforge/>
> > CloudStack Consulting<http://shapeblue.com/cloudstack-consultancy/>
> > CloudStack Infrastructure Support<
> > http://shapeblue.com/cloudstack-infrastructure-support/>
> > CloudStack Bootcamp Training Courses<
> > http://shapeblue.com/cloudstack-training/>
> >
> > This email and any attachments to it may be confidential and are intended
> > solely for the use of the individual to whom it is addressed. Any views
> or
> > opinions expressed are solely those of the author and do not necessarily
> > represent those of Shape Blue Ltd or related companies. If you are not
> the
> > intended recipient of this email, you must neither take any action based
> > upon its contents, nor copy or show it to anyone. Please contact the
> sender
> > if you believe you have received this email in error. Shape Blue Ltd is a
> > company incorporated in England & Wales. ShapeBlue Services India LLP is
> a
> > company incorporated in India and is operated under license from Shape
> Blue
> > Ltd. Shape Blue Brasil Consultoria Ltda is a company incorporated in
> Brasil
> > and is operated under license from Shape Blue Ltd. ShapeBlue SA Pty Ltd
> is
> > a company registered by The Republic of South Africa and is traded under
> > license from Shape Blue Ltd. ShapeBlue is a registered trademark.
> >
>
>
>
> --
> ~Rajani
>


-- 
*Mike Tutkowski*
*Senior CloudStack Developer, SolidFire Inc.*
e: mike.tutkowski@solidfire.com
o: 303.746.7302
Advancing the way the world uses the cloud
<http://solidfire.com/solution/overview/?video=play>*™*

Re: Fast way to rebuild the GUI?

Posted by Rajani Karuturi <ra...@apache.org>.
Hi Mike,

copying the changed files to generated-webapp and restarting jetty worked
for me.

In our jetty config, we set the scan interval to 0 and hence it never scans
for files changes.

Also, our jetty version is too old 6.1.26 while the latest is 9.2.*

from the [docs]

"As of Jetty 6.2.0pre0 a new feature to control webapp redeployment will be
available. The configuration parameter is:
<reload>[manual|automatic]</reload> When set to manual, no automatic
scanning and redeployment of the webapp is done. Rather, the user can
control when the webapp is reloaded by tapping the carriage return key. Set
to automatic the scanning and automatic redeployment is performed at
intervals controlled by the scanIntervalSeconds parameter. The choice of
reloading paradigm can also be configured on the command line by use of the
-Djetty.reload system parameter. For example: "mvn -Djetty.reload=manual
jetty:run" would force manual reloading, regardless of what is configured
in the project pom. Similarly: "mvn -Djetty.reload=automatic
-Djetty.scanIntervalSeconds=10 jetty:run" will force automatic background
reloading with a sweep every 10 seconds, regardless of the configuration in
the project pom."


[docs] http://docs.codehaus.org/display/JETTY/Maven+Jetty+Plugin



On Sat, Aug 9, 2014 at 3:16 PM, Rohit Yadav <ro...@shapeblue.com>
wrote:

> Hi Mike,
>
> On 09-Aug-2014, at 8:02 am, Mike Tutkowski <mi...@solidfire.com>
> wrote:
>
> > Hi,
> >
> > When you change a JavaScript file for the GUI, is there a fast way to
> > update the management server with this file short of having to rebuild
> the
> > entire codebase?
>
> Fastest way? How about edit in browser itself?
>
> Add stubs/new JS/CSS etc. files in the repo, do a clean install on the
> client project, run mgmt server.
>
> Open up Chrome, open developer tools -> sources, make sure you’ve the
> console open too.
> Edit JS files, save it; it will say something on the console like
> “Recompilation and update succeeded”.
> For tinkering purposes, you can use inspect elements; add break points, do
> resource/performance monitoring/benchmarking/optimizations etc.
>
> Now, iterate until you’ve a solution; copy stuff from the JS files
> (Chrome) to the source files in the repository.
> Hope this helps.
>
> Regards,
> Rohit Yadav
> Software Architect, ShapeBlue
> M. +41 779015219 | rohit.yadav@shapeblue.com
> Blog: bhaisaab.org | Twitter: @_bhaisaab
>
>
>
> Find out more about ShapeBlue and our range of CloudStack related services
>
> IaaS Cloud Design & Build<
> http://shapeblue.com/iaas-cloud-design-and-build//>
> CSForge – rapid IaaS deployment framework<http://shapeblue.com/csforge/>
> CloudStack Consulting<http://shapeblue.com/cloudstack-consultancy/>
> CloudStack Infrastructure Support<
> http://shapeblue.com/cloudstack-infrastructure-support/>
> CloudStack Bootcamp Training Courses<
> http://shapeblue.com/cloudstack-training/>
>
> This email and any attachments to it may be confidential and are intended
> solely for the use of the individual to whom it is addressed. Any views or
> opinions expressed are solely those of the author and do not necessarily
> represent those of Shape Blue Ltd or related companies. If you are not the
> intended recipient of this email, you must neither take any action based
> upon its contents, nor copy or show it to anyone. Please contact the sender
> if you believe you have received this email in error. Shape Blue Ltd is a
> company incorporated in England & Wales. ShapeBlue Services India LLP is a
> company incorporated in India and is operated under license from Shape Blue
> Ltd. Shape Blue Brasil Consultoria Ltda is a company incorporated in Brasil
> and is operated under license from Shape Blue Ltd. ShapeBlue SA Pty Ltd is
> a company registered by The Republic of South Africa and is traded under
> license from Shape Blue Ltd. ShapeBlue is a registered trademark.
>



-- 
~Rajani

Re: Fast way to rebuild the GUI?

Posted by Rohit Yadav <ro...@shapeblue.com>.
Hi Mike,

On 09-Aug-2014, at 8:02 am, Mike Tutkowski <mi...@solidfire.com> wrote:

> Hi,
>
> When you change a JavaScript file for the GUI, is there a fast way to
> update the management server with this file short of having to rebuild the
> entire codebase?

Fastest way? How about edit in browser itself?

Add stubs/new JS/CSS etc. files in the repo, do a clean install on the client project, run mgmt server.

Open up Chrome, open developer tools -> sources, make sure you’ve the console open too.
Edit JS files, save it; it will say something on the console like “Recompilation and update succeeded”.
For tinkering purposes, you can use inspect elements; add break points, do resource/performance monitoring/benchmarking/optimizations etc.

Now, iterate until you’ve a solution; copy stuff from the JS files (Chrome) to the source files in the repository.
Hope this helps.

Regards,
Rohit Yadav
Software Architect, ShapeBlue
M. +41 779015219 | rohit.yadav@shapeblue.com
Blog: bhaisaab.org | Twitter: @_bhaisaab



Find out more about ShapeBlue and our range of CloudStack related services

IaaS Cloud Design & Build<http://shapeblue.com/iaas-cloud-design-and-build//>
CSForge – rapid IaaS deployment framework<http://shapeblue.com/csforge/>
CloudStack Consulting<http://shapeblue.com/cloudstack-consultancy/>
CloudStack Infrastructure Support<http://shapeblue.com/cloudstack-infrastructure-support/>
CloudStack Bootcamp Training Courses<http://shapeblue.com/cloudstack-training/>

This email and any attachments to it may be confidential and are intended solely for the use of the individual to whom it is addressed. Any views or opinions expressed are solely those of the author and do not necessarily represent those of Shape Blue Ltd or related companies. If you are not the intended recipient of this email, you must neither take any action based upon its contents, nor copy or show it to anyone. Please contact the sender if you believe you have received this email in error. Shape Blue Ltd is a company incorporated in England & Wales. ShapeBlue Services India LLP is a company incorporated in India and is operated under license from Shape Blue Ltd. Shape Blue Brasil Consultoria Ltda is a company incorporated in Brasil and is operated under license from Shape Blue Ltd. ShapeBlue SA Pty Ltd is a company registered by The Republic of South Africa and is traded under license from Shape Blue Ltd. ShapeBlue is a registered trademark.

Re: Fast way to rebuild the GUI?

Posted by Punith S <pu...@cloudbyte.com>.
hi mike,

mvn -P developer -*pl* :cloud-client-ui -DskipTests=true

i guess running this command only builds  the cloud-client-ui package,
ie client/target/cloud-client-ui-4.4.0-SNAPSHOT.war
but it won't be extracted to client/target/cloud-client-ui-4.4.0-SNAPSHOT

hence the new changes will not be reflected.

for an easy workaround you can scp the changed js file form your workspace
to the script folder in the running cloudstack and on refreshing the
browser will reflect the changes.

thanks.


On Sat, Aug 9, 2014 at 11:58 AM, Mike Tutkowski <
mike.tutkowski@solidfire.com> wrote:

> I should clarify that that command runs successfully, but the GUI does not
> incorporate the new changes from running that command anymore.
>
>
> On Sat, Aug 9, 2014 at 12:12 AM, Mike Tutkowski <
> mike.tutkowski@solidfire.com> wrote:
>
> > I could be wrong, but I thought we compressed JS files now.
> >
> > This used to work:
> >
> > mvn -P developer -pl :cloud-client-ui -DskipTests=true
> >
> > Unfortunately it no longer does.
> >
> >
> > On Sat, Aug 9, 2014 at 12:08 AM, Punith S <pu...@cloudbyte.com>
> wrote:
> >
> >> hi mike,
> >>
> >> you can just replace the js file in
> >> cloudstack-management/webapps/client/scripts/ folder and reload the
> >> browser, js file will be reloaded in the cloudstack ui.
> >>
> >> thanks.
> >>
> >>
> >> On Sat, Aug 9, 2014 at 11:32 AM, Mike Tutkowski <
> >> mike.tutkowski@solidfire.com> wrote:
> >>
> >> > Hi,
> >> >
> >> > When you change a JavaScript file for the GUI, is there a fast way to
> >> > update the management server with this file short of having to rebuild
> >> the
> >> > entire codebase?
> >> >
> >> > Thanks!
> >> >
> >> > --
> >> > *Mike Tutkowski*
> >> > *Senior CloudStack Developer, SolidFire Inc.*
> >> > e: mike.tutkowski@solidfire.com
> >> > o: 303.746.7302
> >> > Advancing the way the world uses the cloud
> >> > <http://solidfire.com/solution/overview/?video=play>*™*
> >> >
> >>
> >>
> >>
> >> --
> >> regards,
> >>
> >> punith s
> >> cloudbyte.com
> >>
> >
> >
> >
> > --
> > *Mike Tutkowski*
> > *Senior CloudStack Developer, SolidFire Inc.*
> > e: mike.tutkowski@solidfire.com
> > o: 303.746.7302
> > Advancing the way the world uses the cloud
> > <http://solidfire.com/solution/overview/?video=play>*™*
> >
>
>
>
> --
> *Mike Tutkowski*
> *Senior CloudStack Developer, SolidFire Inc.*
> e: mike.tutkowski@solidfire.com
> o: 303.746.7302
> Advancing the way the world uses the cloud
> <http://solidfire.com/solution/overview/?video=play>*™*
>



-- 
regards,

punith s
cloudbyte.com

Re: Fast way to rebuild the GUI?

Posted by Mike Tutkowski <mi...@solidfire.com>.
I should clarify that that command runs successfully, but the GUI does not
incorporate the new changes from running that command anymore.


On Sat, Aug 9, 2014 at 12:12 AM, Mike Tutkowski <
mike.tutkowski@solidfire.com> wrote:

> I could be wrong, but I thought we compressed JS files now.
>
> This used to work:
>
> mvn -P developer -pl :cloud-client-ui -DskipTests=true
>
> Unfortunately it no longer does.
>
>
> On Sat, Aug 9, 2014 at 12:08 AM, Punith S <pu...@cloudbyte.com> wrote:
>
>> hi mike,
>>
>> you can just replace the js file in
>> cloudstack-management/webapps/client/scripts/ folder and reload the
>> browser, js file will be reloaded in the cloudstack ui.
>>
>> thanks.
>>
>>
>> On Sat, Aug 9, 2014 at 11:32 AM, Mike Tutkowski <
>> mike.tutkowski@solidfire.com> wrote:
>>
>> > Hi,
>> >
>> > When you change a JavaScript file for the GUI, is there a fast way to
>> > update the management server with this file short of having to rebuild
>> the
>> > entire codebase?
>> >
>> > Thanks!
>> >
>> > --
>> > *Mike Tutkowski*
>> > *Senior CloudStack Developer, SolidFire Inc.*
>> > e: mike.tutkowski@solidfire.com
>> > o: 303.746.7302
>> > Advancing the way the world uses the cloud
>> > <http://solidfire.com/solution/overview/?video=play>*™*
>> >
>>
>>
>>
>> --
>> regards,
>>
>> punith s
>> cloudbyte.com
>>
>
>
>
> --
> *Mike Tutkowski*
> *Senior CloudStack Developer, SolidFire Inc.*
> e: mike.tutkowski@solidfire.com
> o: 303.746.7302
> Advancing the way the world uses the cloud
> <http://solidfire.com/solution/overview/?video=play>*™*
>



-- 
*Mike Tutkowski*
*Senior CloudStack Developer, SolidFire Inc.*
e: mike.tutkowski@solidfire.com
o: 303.746.7302
Advancing the way the world uses the cloud
<http://solidfire.com/solution/overview/?video=play>*™*

Re: Fast way to rebuild the GUI?

Posted by Mike Tutkowski <mi...@solidfire.com>.
I could be wrong, but I thought we compressed JS files now.

This used to work:

mvn -P developer -pl :cloud-client-ui -DskipTests=true

Unfortunately it no longer does.


On Sat, Aug 9, 2014 at 12:08 AM, Punith S <pu...@cloudbyte.com> wrote:

> hi mike,
>
> you can just replace the js file in
> cloudstack-management/webapps/client/scripts/ folder and reload the
> browser, js file will be reloaded in the cloudstack ui.
>
> thanks.
>
>
> On Sat, Aug 9, 2014 at 11:32 AM, Mike Tutkowski <
> mike.tutkowski@solidfire.com> wrote:
>
> > Hi,
> >
> > When you change a JavaScript file for the GUI, is there a fast way to
> > update the management server with this file short of having to rebuild
> the
> > entire codebase?
> >
> > Thanks!
> >
> > --
> > *Mike Tutkowski*
> > *Senior CloudStack Developer, SolidFire Inc.*
> > e: mike.tutkowski@solidfire.com
> > o: 303.746.7302
> > Advancing the way the world uses the cloud
> > <http://solidfire.com/solution/overview/?video=play>*™*
> >
>
>
>
> --
> regards,
>
> punith s
> cloudbyte.com
>



-- 
*Mike Tutkowski*
*Senior CloudStack Developer, SolidFire Inc.*
e: mike.tutkowski@solidfire.com
o: 303.746.7302
Advancing the way the world uses the cloud
<http://solidfire.com/solution/overview/?video=play>*™*

Re: Fast way to rebuild the GUI?

Posted by Punith S <pu...@cloudbyte.com>.
hi mike,

you can just replace the js file in
cloudstack-management/webapps/client/scripts/ folder and reload the
browser, js file will be reloaded in the cloudstack ui.

thanks.


On Sat, Aug 9, 2014 at 11:32 AM, Mike Tutkowski <
mike.tutkowski@solidfire.com> wrote:

> Hi,
>
> When you change a JavaScript file for the GUI, is there a fast way to
> update the management server with this file short of having to rebuild the
> entire codebase?
>
> Thanks!
>
> --
> *Mike Tutkowski*
> *Senior CloudStack Developer, SolidFire Inc.*
> e: mike.tutkowski@solidfire.com
> o: 303.746.7302
> Advancing the way the world uses the cloud
> <http://solidfire.com/solution/overview/?video=play>*™*
>



-- 
regards,

punith s
cloudbyte.com