yellow team mailing list archive
-
yellow team
-
Mailing list archive
-
Message #01780
Disable console (issue 6856112)
Reviewers: mp+136985_code.launchpad.net,
Message:
Please take a look.
Description:
Disable console
Adds a configuration variable for whether or not the javascript console
object should be enabled or disabled. Defaults to disabled.
https://code.launchpad.net/~makyo/charms/precise/juju-gui/juju-gui/+merge/136985
(do not edit description out of merge proposal)
Please review this at https://codereview.appspot.com/6856112/
Affected files:
A [revision details]
M config.yaml
M config/config.js.template
M hooks/start
M revision
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:
francesco.banconi@xxxxxxxxxxxxx-20121128143722-6hib1ivrb075w8u3
+New revision: matthew.scott@xxxxxxxxxxxxx-20121129004218-19irnbn8k0arm5i9
Index: config.yaml
=== modified file 'config.yaml'
--- config.yaml 2012-11-20 12:15:10 +0000
+++ config.yaml 2012-11-29 00:36:08 +0000
@@ -9,3 +9,8 @@
The Juju Bazaar branch containing the improv script.
type: string
default: lp:~hazmat/juju/rapi-rollup
+ juju-gui-console-enabled:
+ description:
+ Whether or not the browser's console should be enabled.
+ type: string
+ default: 'false'
Index: revision
=== modified file 'revision'
--- revision 2012-11-20 13:55:02 +0000
+++ revision 2012-11-29 00:36:08 +0000
@@ -1,1 +1,1 @@
-10
+11
Index: config/config.js.template
=== modified file 'config/config.js.template'
--- config/config.js.template 2012-11-19 17:48:13 +0000
+++ config/config.js.template 2012-11-29 00:36:08 +0000
@@ -1,5 +1,5 @@
var juju_config = {
- consoleEnabled: true,
+ consoleEnabled: %(console_enabled)s,
serverRouting: false,
html5: true,
container: '#main',
Index: hooks/start
=== modified file 'hooks/start'
--- hooks/start 2012-11-27 15:52:05 +0000
+++ hooks/start 2012-11-29 00:36:08 +0000
@@ -4,6 +4,7 @@
import sys
from charmhelpers import (
+ get_config,
log,
log_entry,
log_exit,
@@ -40,8 +41,13 @@
'juju-gui.conf.template', {'juju_gui_dir': JUJU_GUI_DIR},
'/etc/init/juju-gui.conf')
log('Generating the Juju-GUI configuration file.')
+ config = get_config()
render_to_file(
- 'config.js.template', {'ws_url': ws_url},
+ 'config.js.template',
+ {
+ 'ws_url': ws_url,
+ 'console_enabled': config['juju-gui-console-enabled']
+ },
os.path.join(JUJU_GUI_DIR, 'app', 'config.js'))
log('Starting Juju-GUI.')
with su('root'):
--
https://code.launchpad.net/~makyo/charms/precise/juju-gui/juju-gui/+merge/136985
Your team Juju GUI Hackers is requested to review the proposed merge of lp:~makyo/charms/precise/juju-gui/juju-gui into lp:~juju-gui/charms/precise/juju-gui/trunk.
References