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
1=== modified file 'config.yaml'
2--- config.yaml 2013-10-09 08:56:20 +0000
3+++ config.yaml 2014-01-09 21:52:49 +0000
4@@ -168,16 +168,6 @@
5 allow us to improve our tool based on your experience.
6 type: string
7 default: UA-41463568-2
8- default-viewmode:
9- description: |
10- What the default viewmode for the charmbrowser should be. Possible options are:
11- - 'sidebar' (default): the charmwbrowser will appear as a sidebar. This
12- is also known as build mode.
13- - 'fullscreen': the charmbrowser will appear in full screen, hiding the
14- canvas. This is also known as browse mode.
15- - 'minimized': the charmbrowser will be minimized by default, and hidden.
16- type: string
17- default: sidebar
18 show-get-juju-button:
19 description: |
20 There are deployment modes for Juju GUI which are not intended as regular
21
22=== modified file 'config/config.js.template'
23--- config/config.js.template 2013-09-12 18:15:19 +0000
24+++ config/config.js.template 2014-01-09 21:52:49 +0000
25@@ -24,6 +24,5 @@
26 sandbox: {{sandbox}},
27 GA_key: {{ga_key}},
28 login_help: {{login_help}},
29- defaultViewmode: {{default_viewmode}},
30 showGetJujuButton: {{show_get_juju_button}}
31 };
32
33=== modified file 'hooks/backend.py'
34--- hooks/backend.py 2013-11-15 14:56:04 +0000
35+++ hooks/backend.py 2014-01-09 21:52:49 +0000
36@@ -152,7 +152,6 @@
37 config['read-only'], config['staging'], config['charmworld-url'],
38 build_dir, secure=config['secure'], sandbox=config['sandbox'],
39 ga_key=config['ga-key'],
40- default_viewmode=config['default-viewmode'],
41 show_get_juju_button=config['show-get-juju-button'],
42 password=config.get('password'))
43 # Expose the service.
44
45=== modified file 'hooks/utils.py'
46--- hooks/utils.py 2013-11-15 14:56:04 +0000
47+++ hooks/utils.py 2014-01-09 21:52:49 +0000
48@@ -410,8 +410,8 @@
49 def write_gui_config(
50 console_enabled, login_help, readonly, in_staging, charmworld_url,
51 build_dir, secure=True, sandbox=False,
52- default_viewmode='sidebar', show_get_juju_button=False,
53- config_js_path=None, ga_key='', password=None):
54+ show_get_juju_button=False, config_js_path=None, ga_key='',
55+ password=None):
56 """Generate the GUI configuration file."""
57 log('Generating the Juju GUI configuration file.')
58 is_legacy_juju = legacy_juju()
59@@ -439,7 +439,6 @@
60 'sandbox': json.dumps(sandbox),
61 'charmworld_url': json.dumps(charmworld_url),
62 'ga_key': json.dumps(ga_key),
63- 'default_viewmode': json.dumps(default_viewmode),
64 'show_get_juju_button': json.dumps(show_get_juju_button),
65 }
66 if config_js_path is None:
67
68=== modified file 'tests/test_backends.py'
69--- tests/test_backends.py 2013-11-15 14:56:04 +0000
70+++ tests/test_backends.py 2014-01-09 21:52:49 +0000
71@@ -204,7 +204,6 @@
72 'builtin-server-logging': 'info',
73 'charmworld-url': 'http://charmworld.example.com/',
74 'command-log-file': self.command_log_file,
75- 'default-viewmode': 'sidebar',
76 'ga-key': 'my-key',
77 'juju-api-branch': self.juju_api_branch,
78 'juju-gui-debug': False,
79@@ -275,7 +274,6 @@
80 config['read-only'], config['staging'], config['charmworld-url'],
81 mocks.compute_build_dir(), secure=config['secure'],
82 sandbox=config['sandbox'], ga_key=config['ga-key'],
83- default_viewmode=config['default-viewmode'],
84 show_get_juju_button=config['show-get-juju-button'], password=None)
85
86 def test_base_dir_created(self):
87
88=== modified file 'tests/test_utils.py'
89--- tests/test_utils.py 2013-11-15 14:56:04 +0000
90+++ tests/test_utils.py 2014-01-09 21:52:49 +0000
91@@ -1100,13 +1100,6 @@
92 self.assertIn('user: "admin"', js_conf)
93 self.assertIn('password: "admin"', js_conf)
94
95- def test_write_gui_config_fullscreen(self):
96- write_gui_config(
97- False, 'This is login help.', False, False, self.charmworld_url,
98- self.build_dir, sandbox=True, default_viewmode='fullscreen',
99- config_js_path='config')
100- self.assertIn('defaultViewmode: "fullscreen"', self.files['config'])
101-
102 def test_write_gui_config_with_button(self):
103 write_gui_config(
104 False, 'This is login help.', False, False, self.charmworld_url,

Subscribers

People subscribed via source and target branches

to all changes: