Bläddra i källkod

HUE-7743 [core] Rename the EMBEDDED_MODE setting to IS_EMBEDDED

Johan Ahlen 8 år sedan
förälder
incheckning
d3b3ecd

+ 1 - 1
desktop/conf.dist/hue.ini

@@ -36,7 +36,7 @@
 
   # Choose whether the Hue pages are embedded or not. This will improve the rendering of Hue when added inside a
   # container element.
-  ## embedded_mode=false
+  ## is_embedded=false
 
   # A comma-separated list of available Hue load balancers
   ## hue_load_balancer=

+ 1 - 1
desktop/conf/pseudo-distributed.ini.tmpl

@@ -40,7 +40,7 @@
 
   # Choose whether the Hue pages are embedded or not. This will improve the rendering of Hue when added inside a
   # container element.
-  ## embedded_mode=false
+  ## is_embedded=false
 
   # A comma-separated list of available Hue load balancers
   ## hue_load_balancer=

+ 2 - 2
desktop/core/src/desktop/conf.py

@@ -1348,8 +1348,8 @@ ENABLE_SQL_SYNTAX_CHECK = Config(
   help=_('Choose whether to enable SQL syntax check or not.')
 )
 
-EMBEDDED_MODE = Config(
-  key='embedded_mode',
+IS_EMBEDDED = Config(
+  key='is_embedded',
   default=False,
   type=coerce_bool,
   help=_('Choose whether Hue is embedded or not.')

+ 2 - 2
desktop/core/src/desktop/templates/global_js_constants.mako

@@ -18,7 +18,7 @@
   from django.utils.translation import ugettext as _
 
   from desktop import conf
-  from desktop.conf import EMBEDDED_MODE
+  from desktop.conf import IS_EMBEDDED
 
   from beeswax.conf import LIST_PARTITIONS_LIMIT
   from indexer.conf import ENABLE_NEW_INDEXER
@@ -45,7 +45,7 @@
 
   window.HAS_OPTIMIZER = '${ has_optimizer() }' === 'True';
 
-  window.HUE_CONTAINER = '${ EMBEDDED_MODE.get() }' === 'True' ? '.hue-embedded-container' : 'body';
+  window.HUE_CONTAINER = '${ IS_EMBEDDED.get() }' === 'True' ? '.hue-embedded-container' : 'body';
 
   window.HUE_I18n = {
     autocomplete: {

+ 4 - 4
desktop/core/src/desktop/templates/hue.mako

@@ -18,7 +18,7 @@
   from django.utils.translation import ugettext as _
 
   from desktop import conf
-  from desktop.conf import EMBEDDED_MODE
+  from desktop.conf import IS_EMBEDDED
   from desktop.views import _ko, commonshare, login_modal
   from desktop.lib.i18n import smart_unicode
   from desktop.models import PREFERENCE_IS_WELCOME_TOUR_SEEN
@@ -46,7 +46,7 @@
 
   <link href="${ static('desktop/css/roboto.css') }" rel="stylesheet">
   <link href="${ static('desktop/ext/css/font-awesome.min.css') }" rel="stylesheet">
-% if EMBEDDED_MODE.get():
+% if IS_EMBEDDED.get():
   <link href="${ static('desktop/css/hue-bootstrap-embedded.css') }" rel="stylesheet">
   <link href="${ static('desktop/css/hue-embedded.css') }" rel="stylesheet">
 % else:
@@ -73,7 +73,7 @@
 
 <body>
 
-% if EMBEDDED_MODE.get():
+% if IS_EMBEDDED.get():
 <div class="hue-embedded-container">
 % endif
 
@@ -1682,7 +1682,7 @@ ${ smart_unicode(login_modal(request).content) | n,unicode }
 
 ${ commonHeaderFooterComponents.footer(messages) }
 
-% if EMBEDDED_MODE.get():
+% if IS_EMBEDDED.get():
 </div>
 % endif