Эх сурвалжийг харах

HUE-6338 [core] Rename all browsers in Hue 4 to have their simple names

Romain Rigaux 8 жил өмнө
parent
commit
1390563c96

+ 3 - 3
apps/metastore/src/metastore/templates/components.mako

@@ -18,7 +18,7 @@
   from django.utils.translation import ugettext as _
 %>
 
-<%def name="menubar()">
+<%def name="menubar(is_embeddable=False)">
   <div class="navbar hue-title-bar nokids">
       <div class="navbar-inner">
         <div class="container-fluid">
@@ -27,9 +27,9 @@
               <li class="app-header">
                 <a href="/${app_name}">
                   <img src="${ static('metastore/art/icon_metastore_48.png') }" class="app-icon" alt="${ _('Metastore icon') }" />
-                  ${ _('Metastore Manager') }
+                  ${ _('Table Browser') if is_embeddable else _('Metastore Manager') }
                 </a>
-              </li>              
+              </li>
             </ul>
           </div>
         </div>

+ 2 - 1
apps/metastore/src/metastore/templates/describe_partitions.mako

@@ -14,15 +14,16 @@
 ## See the License for the specific language governing permissions and
 ## limitations under the License.
 <%!
+  from django.utils.translation import ugettext as _
   from desktop import conf
   from desktop.views import commonheader, commonfooter
-  from django.utils.translation import ugettext as _
 %>
 
 <%namespace name="assist" file="/assist.mako" />
 <%namespace name="components" file="components.mako" />
 
 ${ commonheader(_('Table Partitions: %(tableName)s') % dict(tableName=table.name), app_name, user, request) | n,unicode }
+
 <span class="notebook">
 ${ components.menubar() }
 

+ 1 - 1
apps/metastore/src/metastore/templates/metastore.mako

@@ -71,7 +71,7 @@ ${ assist.assistPanel() }
 
 <span class="notebook">
 
-${ components.menubar() }
+${ components.menubar(is_embeddable) }
 
 <script src="${ static('metastore/js/metastore.ko.js') }"></script>
 <link rel="stylesheet" href="${ static('metastore/css/metastore.css') }" type="text/css">

+ 2 - 1
apps/security/src/security/templates/hdfs.mako

@@ -26,7 +26,8 @@ from django.utils.translation import ugettext as _
 %if not is_embeddable:
 ${ commonheader(_('Hadoop Security'), "security", user, request) | n,unicode }
 %endif
-${ layout.menubar(section='hdfs') }
+
+${ layout.menubar(section='hdfs', is_embeddable=is_embeddable) }
 
 <span id="securityHdfsComponents">
 

+ 2 - 1
apps/security/src/security/templates/hive.mako

@@ -26,7 +26,8 @@ from django.utils.translation import ugettext as _
 %if not is_embeddable:
 ${ commonheader(_('Hadoop Security'), "security", user, request) | n,unicode }
 %endif
-${ layout.menubar(section='hive1') }
+
+${ layout.menubar(section='hive1', is_embeddable=is_embeddable) }
 
 <span id="securityHiveComponents">
 

+ 2 - 2
apps/security/src/security/templates/layout.mako

@@ -45,7 +45,7 @@ def is_selected(section, matcher):
 </%def>
 
 
-<%def name="menubar(section='')">
+<%def name="menubar(section='', is_embeddable=False)">
   <link href="${ static('security/css/security.css') }" rel="stylesheet">
 
   <link rel="stylesheet" href="${ static('desktop/ext/select2/select2.css') }">
@@ -59,7 +59,7 @@ def is_selected(section, matcher):
               <li class="app-header">
                 <a href="/${app_name}">
                   <i class="fa fa-lock"></i>
-                  ${ _('Hadoop Security') }
+                  ${ _('Security Browser') if is_embeddable else _('Hadoop Security') }
                 </a>
               </li>
               % if HIVE_V1.get():

+ 2 - 1
apps/security/src/security/templates/sentry.mako

@@ -26,7 +26,8 @@ from django.utils.translation import ugettext as _
 %if not is_embeddable:
 ${ commonheader(_('Hadoop Security'), "security", user, request) | n,unicode }
 %endif
-${ layout.menubar(section=component) }
+
+${ layout.menubar(section=component, is_embeddable=is_embeddable) }
 
 <span id="securityComponents">
 

+ 1 - 1
desktop/libs/indexer/src/indexer/templates/collections.mako

@@ -73,7 +73,7 @@ ${ commonheader(_('Search Indexes'), "indexer", user, request, "90px") | n,unico
           <li class="app-header">
             <a href="#manage">
               <i class="fa fa-database app-icon"></i>
-              ${_('Indexes')}
+              ${ _('Index Browser') if is_embeddable else _('Indexes') }
             </a>
           </li>
         </ul>

+ 1 - 1
desktop/libs/indexer/src/indexer/templates/indexer.mako

@@ -116,7 +116,7 @@ ${ assist.assistPanel() }
         <ul class="nav">
           <li class="app-header">
             <a href="/indexer/indexer">
-              <i class="fa fa-database app-icon"></i> ${_('Indexes')}</a>
+              <i class="fa fa-database app-icon"></i> ${ _('Index Browser') if is_embeddable else _('Indexes') }</a>
             </a>
           </li>
         </ul>