Merge lp:~benji/charms/precise/juju-gui/remove-default-view-mode-config into lp:~juju-gui/charms/precise/juju-gui/trunk

Proposed by Benji York
Status: Merged
Merged at revision: 147
Proposed branch: lp:~benji/charms/precise/juju-gui/remove-default-view-mode-config
Merge into: lp:~juju-gui/charms/precise/juju-gui/trunk
Diff against target: 104 lines (+2/-24)
6 files modified
config.yaml (+0/-10)
config/config.js.template (+0/-1)
hooks/backend.py (+0/-1)
hooks/utils.py (+2/-3)
tests/test_backends.py (+0/-2)
tests/test_utils.py (+0/-7)
To merge this branch: bzr merge lp:~benji/charms/precise/juju-gui/remove-default-view-mode-config
Reviewer Review Type Date Requested Status
charmers Pending
Review via email: mp+201111@code.launchpad.net

Description of the change

remove defaultViewMode config variable

https://codereview.appspot.com/50180043/

To post a comment you must log in.
Revision history for this message
Benji York (benji) wrote :
Download full text (5.4 KiB)

Reviewers: mp+201111_code.launchpad.net,

Message:
Please take a look.

Description:
remove defaultViewMode config variable

https://code.launchpad.net/~benji/charms/precise/juju-gui/remove-default-view-mode-config/+merge/201111

(do not edit description out of merge proposal)

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

Affected files (+4, -24 lines):
   A [revision details]
   M config.yaml
   M config/config.js.template
   M hooks/backend.py
   M hooks/utils.py
   M tests/test_backends.py
   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-10-09 08:56:20 +0000
+++ config.yaml 2014-01-09 21:48:27 +0000
@@ -168,16 +168,6 @@
        allow us to improve our tool based on your experience.
      type: string
      default: UA-41463568-2
- default-viewmode:
- description: |
- What the default viewmode for the charmbrowser should be. Possible
options are:
- - 'sidebar' (default): the charmwbrowser will appear as a sidebar.
This
- is also known as build mode.
- - 'fullscreen': the charmbrowser will appear in full screen, hiding
the
- canvas. This is also known as browse mode.
- - 'minimized': the charmbrowser will be minimized by default, and
hidden.
- type: string
- default: sidebar
    show-get-juju-button:
      description: |
        There are deployment modes for Juju GUI which are not intended as
regular

Index: config/config.js.template
=== modified file 'config/config.js.template'
--- config/config.js.template 2013-09-12 18:15:19 +0000
+++ config/config.js.template 2014-01-09 21:48:27 +0000
@@ -24,6 +24,5 @@
    sandbox: {{sandbox}},
    GA_key: {{ga_key}},
    login_help: {{login_help}},
- defaultViewmode: {{default_viewmode}},
    showGetJujuButton: {{show_get_juju_button}}
  };

Index: hooks/backend.py
=== modified file 'hooks/backend.py'
--- hooks/backend.py 2013-11-15 14:56:04 +0000
+++ hooks/backend.py 2014-01-09 21:48:27 +0000
@@ -152,7 +152,6 @@
              config['read-only'], config['staging'],
config['charmworld-url'],
              build_dir, secure=config['secure'], sandbox=config['sandbox'],
              ga_key=config['ga-key'],
- default_viewmode=config['default-viewmode'],
              show_get_juju_button=config['show-get-juju-button'],
              password=config.get('password'))
          # Expose the service.

Index: hooks/utils.py
=== modified file 'hooks/utils.py'
--- hooks/utils.py 2013-11-15 14:56:04 +0000
+++ hooks/utils.py 2014-01-09 21:48:27 +0000
@@ -410,8 +410,8 @@
  def write_gui_config(
          console_enabled, login_help, readonly, in_staging, charmworld_url,
          build_dir, secure=True, sandbox=False,
- default_viewmode='sidebar', show_get_juju_button=False,
- config_js_path=None, ga_key='', password=None):
+ show_get_juju_button=...

Read more...

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

*** Submitted:

remove defaultViewMode config variable

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

https://codereview.appspot.com/50180043/

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'config.yaml'
--- config.yaml 2013-10-09 08:56:20 +0000
+++ config.yaml 2014-01-09 21:52:49 +0000
@@ -168,16 +168,6 @@
168 allow us to improve our tool based on your experience.168 allow us to improve our tool based on your experience.
169 type: string169 type: string
170 default: UA-41463568-2170 default: UA-41463568-2
171 default-viewmode:
172 description: |
173 What the default viewmode for the charmbrowser should be. Possible options are:
174 - 'sidebar' (default): the charmwbrowser will appear as a sidebar. This
175 is also known as build mode.
176 - 'fullscreen': the charmbrowser will appear in full screen, hiding the
177 canvas. This is also known as browse mode.
178 - 'minimized': the charmbrowser will be minimized by default, and hidden.
179 type: string
180 default: sidebar
181 show-get-juju-button:171 show-get-juju-button:
182 description: |172 description: |
183 There are deployment modes for Juju GUI which are not intended as regular173 There are deployment modes for Juju GUI which are not intended as regular
184174
=== modified file 'config/config.js.template'
--- config/config.js.template 2013-09-12 18:15:19 +0000
+++ config/config.js.template 2014-01-09 21:52:49 +0000
@@ -24,6 +24,5 @@
24 sandbox: {{sandbox}},24 sandbox: {{sandbox}},
25 GA_key: {{ga_key}},25 GA_key: {{ga_key}},
26 login_help: {{login_help}},26 login_help: {{login_help}},
27 defaultViewmode: {{default_viewmode}},
28 showGetJujuButton: {{show_get_juju_button}}27 showGetJujuButton: {{show_get_juju_button}}
29};28};
3029
=== modified file 'hooks/backend.py'
--- hooks/backend.py 2013-11-15 14:56:04 +0000
+++ hooks/backend.py 2014-01-09 21:52:49 +0000
@@ -152,7 +152,6 @@
152 config['read-only'], config['staging'], config['charmworld-url'],152 config['read-only'], config['staging'], config['charmworld-url'],
153 build_dir, secure=config['secure'], sandbox=config['sandbox'],153 build_dir, secure=config['secure'], sandbox=config['sandbox'],
154 ga_key=config['ga-key'],154 ga_key=config['ga-key'],
155 default_viewmode=config['default-viewmode'],
156 show_get_juju_button=config['show-get-juju-button'],155 show_get_juju_button=config['show-get-juju-button'],
157 password=config.get('password'))156 password=config.get('password'))
158 # Expose the service.157 # Expose the service.
159158
=== modified file 'hooks/utils.py'
--- hooks/utils.py 2013-11-15 14:56:04 +0000
+++ hooks/utils.py 2014-01-09 21:52:49 +0000
@@ -410,8 +410,8 @@
410def write_gui_config(410def write_gui_config(
411 console_enabled, login_help, readonly, in_staging, charmworld_url,411 console_enabled, login_help, readonly, in_staging, charmworld_url,
412 build_dir, secure=True, sandbox=False,412 build_dir, secure=True, sandbox=False,
413 default_viewmode='sidebar', show_get_juju_button=False,413 show_get_juju_button=False, config_js_path=None, ga_key='',
414 config_js_path=None, ga_key='', password=None):414 password=None):
415 """Generate the GUI configuration file."""415 """Generate the GUI configuration file."""
416 log('Generating the Juju GUI configuration file.')416 log('Generating the Juju GUI configuration file.')
417 is_legacy_juju = legacy_juju()417 is_legacy_juju = legacy_juju()
@@ -439,7 +439,6 @@
439 'sandbox': json.dumps(sandbox),439 'sandbox': json.dumps(sandbox),
440 'charmworld_url': json.dumps(charmworld_url),440 'charmworld_url': json.dumps(charmworld_url),
441 'ga_key': json.dumps(ga_key),441 'ga_key': json.dumps(ga_key),
442 'default_viewmode': json.dumps(default_viewmode),
443 'show_get_juju_button': json.dumps(show_get_juju_button),442 'show_get_juju_button': json.dumps(show_get_juju_button),
444 }443 }
445 if config_js_path is None:444 if config_js_path is None:
446445
=== modified file 'tests/test_backends.py'
--- tests/test_backends.py 2013-11-15 14:56:04 +0000
+++ tests/test_backends.py 2014-01-09 21:52:49 +0000
@@ -204,7 +204,6 @@
204 'builtin-server-logging': 'info',204 'builtin-server-logging': 'info',
205 'charmworld-url': 'http://charmworld.example.com/',205 'charmworld-url': 'http://charmworld.example.com/',
206 'command-log-file': self.command_log_file,206 'command-log-file': self.command_log_file,
207 'default-viewmode': 'sidebar',
208 'ga-key': 'my-key',207 'ga-key': 'my-key',
209 'juju-api-branch': self.juju_api_branch,208 'juju-api-branch': self.juju_api_branch,
210 'juju-gui-debug': False,209 'juju-gui-debug': False,
@@ -275,7 +274,6 @@
275 config['read-only'], config['staging'], config['charmworld-url'],274 config['read-only'], config['staging'], config['charmworld-url'],
276 mocks.compute_build_dir(), secure=config['secure'],275 mocks.compute_build_dir(), secure=config['secure'],
277 sandbox=config['sandbox'], ga_key=config['ga-key'],276 sandbox=config['sandbox'], ga_key=config['ga-key'],
278 default_viewmode=config['default-viewmode'],
279 show_get_juju_button=config['show-get-juju-button'], password=None)277 show_get_juju_button=config['show-get-juju-button'], password=None)
280278
281 def test_base_dir_created(self):279 def test_base_dir_created(self):
282280
=== modified file 'tests/test_utils.py'
--- tests/test_utils.py 2013-11-15 14:56:04 +0000
+++ tests/test_utils.py 2014-01-09 21:52:49 +0000
@@ -1100,13 +1100,6 @@
1100 self.assertIn('user: "admin"', js_conf)1100 self.assertIn('user: "admin"', js_conf)
1101 self.assertIn('password: "admin"', js_conf)1101 self.assertIn('password: "admin"', js_conf)
11021102
1103 def test_write_gui_config_fullscreen(self):
1104 write_gui_config(
1105 False, 'This is login help.', False, False, self.charmworld_url,
1106 self.build_dir, sandbox=True, default_viewmode='fullscreen',
1107 config_js_path='config')
1108 self.assertIn('defaultViewmode: "fullscreen"', self.files['config'])
1109
1110 def test_write_gui_config_with_button(self):1103 def test_write_gui_config_with_button(self):
1111 write_gui_config(1104 write_gui_config(
1112 False, 'This is login help.', False, False, self.charmworld_url,1105 False, 'This is login help.', False, False, self.charmworld_url,

Subscribers

People subscribed via source and target branches

to all changes: