Merge lp://staging/~frankban/charms/precise/juju-gui/separate-staging-debug into lp://staging/~juju-gui/charms/precise/juju-gui/trunk

Proposed by Francesco Banconi
Status: Merged
Merged at revision: 106
Proposed branch: lp://staging/~frankban/charms/precise/juju-gui/separate-staging-debug
Merge into: lp://staging/~juju-gui/charms/precise/juju-gui/trunk
Diff against target: 113 lines (+18/-13)
5 files modified
config.yaml (+8/-3)
hooks/backend.py (+3/-3)
hooks/utils.py (+2/-2)
revision (+1/-1)
tests/test_utils.py (+4/-4)
To merge this branch: bzr merge lp://staging/~frankban/charms/precise/juju-gui/separate-staging-debug
Reviewer Review Type Date Requested Status
charmers Pending
Review via email: mp+185307@code.staging.launchpad.net

Description of the change

Create a new option for GUI debug mode.

Setting the juju-gui-debug option to true is
now possible to serve the GUI source files
individually (uncompressed). As a consequence,
setting staging to true no longer activates
debug mode as a side effect.

QA:
- deploy the GUI from this branch (make deploy);
- run `juju set juju-gui juju-gui-debug=true`,
  wait a minute and then verify the uncompressed
  files are served by Apache;
- run `juju set juju-gui builtin-server=true`,
  wait a minute and then verify the uncompressed
  files are correctly served by the Tornado server
  (tailf /var/log/upstart/guiserver.log can help).

https://codereview.appspot.com/13301047/

To post a comment you must log in.
Revision history for this message
Francesco Banconi (frankban) wrote :
Download full text (5.9 KiB)

Reviewers: mp+185307_code.launchpad.net,

Message:
Please take a look.

Description:
Create a new option for GUI debug mode.

Setting the juju-gui-debug option to true is
now possible to serve the GUI source files
individually (uncompressed). As a consequence,
setting staging to true no longer activates
debug mode as a side effect.

QA:
- deploy the GUI from this branch (make deploy);
- run `juju set juju-gui juju-gui-debug=true`,
   wait a minute and then verify the uncompressed
   files are served by Apache;
- run `juju set juju-gui builtin-server=true`,
   wait a minute and then verify the uncompressed
   files are correctly served by the Tornado server
   (tailf /var/log/upstart/guiserver.log can help).

https://code.launchpad.net/~frankban/charms/precise/juju-gui/separate-staging-debug/+merge/185307

(do not edit description out of merge proposal)

Please review this at https://codereview.appspot.com/13301047/

Affected files (+20, -13 lines):
   A [revision details]
   M config.yaml
   M hooks/backend.py
   M hooks/utils.py
   M revision
   M tests/test_utils.py

Index: [revision details]
=== added file '[revision details]'
--- [revision details] 2012-01-01 00:00:00 +0000
+++ [revision details] 2012-01-01 00:00:00 +0000
@@ -0,0 +1,2 @@
+Old revision:
<email address hidden>
+New revision:
<email address hidden>

Index: config.yaml
=== modified file 'config.yaml'
--- config.yaml 2013-08-26 12:18:19 +0000
+++ config.yaml 2013-09-12 14:29:45 +0000
@@ -32,6 +32,11 @@
          to pull a release from.
      type: string
      default: stable
+ juju-gui-debug:
+ description: |
+ Run Juju GUI in debug mode, serving the uncompressed GUI source
files.
+ type: boolean
+ default: false
    juju-api-branch:
      description: |
        The Juju API Bazaar branch (implementing the WebSocket server).
Since
@@ -42,9 +47,9 @@
    staging:
      description: |
        Connect the Juju GUI to the staging backend (i.e. a simulated Juju
- environment). Currently juju-core does not support the staging
- backend. For this reason, this option is ignored if the charm is
- deployed using juju-core.
+ environment). Currently juju-core does not support the staging
backend.
+ For this reason, an error is raised if this option is enabled in a
+ juju-core environment.
      type: boolean
      default: false
    staging-environment:

Index: revision
=== modified file 'revision'
--- revision 2013-09-04 09:05:19 +0000
+++ revision 2013-09-12 14:29:45 +0000
@@ -1,1 +1,1 @@
-82
+83

Index: hooks/backend.py
=== modified file 'hooks/backend.py'
--- hooks/backend.py 2013-09-03 08:24:30 +0000
+++ hooks/backend.py 2013-09-12 14:29:45 +0000
@@ -141,7 +141,7 @@
          charmhelpers.log('Starting Juju GUI.')
          config = backend.config
          build_dir = utils.compute_build_dir(
- config['staging'], config['serve-tests'])
+ config['juju-gui-debug'], config['serve-tests'])
          utils.write_gui_config(
              config['juju-gui-console-enabled'], config['login-help'],
              config['read-on...

Read more...

Revision history for this message
Richard Harding (rharding) wrote :

LGTM qa ok. Thanks so much for this!

https://codereview.appspot.com/13301047/

Revision history for this message
Francesco Banconi (frankban) wrote :

*** Submitted:

Create a new option for GUI debug mode.

Setting the juju-gui-debug option to true is
now possible to serve the GUI source files
individually (uncompressed). As a consequence,
setting staging to true no longer activates
debug mode as a side effect.

QA:
- deploy the GUI from this branch (make deploy);
- run `juju set juju-gui juju-gui-debug=true`,
   wait a minute and then verify the uncompressed
   files are served by Apache;
- run `juju set juju-gui builtin-server=true`,
   wait a minute and then verify the uncompressed
   files are correctly served by the Tornado server
   (tailf /var/log/upstart/guiserver.log can help).

R=rharding
CC=
https://codereview.appspot.com/13301047

https://codereview.appspot.com/13301047/

Revision history for this message
Francesco Banconi (frankban) wrote :

Hi Rick, thanks for the review!

https://codereview.appspot.com/13301047/

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches