Bläddra i källkod

[impala] Fix link to metastore browser table

Useradmin: add back create a group button
Desktop: clarify session cookie age description and default
Beeswax: fix data encoding by iperating on text only and not numbers
Romain Rigaux 11 år sedan
förälder
incheckning
0569298d1d

+ 1 - 1
apps/beeswax/src/beeswax/templates/execute.mako

@@ -1136,7 +1136,7 @@ $(document).ready(function () {
           _table.find("a:eq(0)").on("click", function () {
             var tableUrl = "/${ app_name }/api/table/" + viewModel.database() + "/" + _table.data("table");
             $("#navigatorQuicklook").find(".tableName").text(table);
-            $("#navigatorQuicklook").find(".tableLink").attr("href", tableUrl);
+            $("#navigatorQuicklook").find(".tableLink").attr("href", "/metastore/table/" + viewModel.database() + "/" + table);
             $("#navigatorQuicklook").find(".sample").empty("");
             $("#navigatorQuicklook").attr("style", "width: " + ($(window).width() - 120) + "px;margin-left:-" + (($(window).width() - 80) / 2) + "px!important;");
             $.ajax({

+ 2 - 2
apps/beeswax/src/beeswax/views.py

@@ -465,13 +465,13 @@ def view_results(request, id, first_row=0):
       for row in results.rows():
         escaped_row = []
         for field in row:
-          field = smart_unicode(field, errors='replace') # Prevent error when getting back non utf8 like charset=iso-8859-1
           if isinstance(field, (int, long, float, complex, bool)):
             escaped_field = field
           elif field is None:
             escaped_field = 'NULL'
           else:
-            escaped_field = escape(field)              
+            field = smart_unicode(field, errors='replace') # Prevent error when getting back non utf8 like charset=iso-8859-1
+            escaped_field = escape(field)
           escaped_row.append(escaped_field)
         data.append(escaped_row)
 

+ 2 - 2
apps/useradmin/src/useradmin/templates/list_groups.mako

@@ -42,9 +42,9 @@ ${layout.menubar(section='groups')}
       </%def>
       <%def name="creation()">
         %if user.is_superuser:
+          <a id="addGroupBtn" href="${url('useradmin.views.edit_group')}" class="btn"><i
+              class="fa fa-plus-circle"></i> ${_('Add group')}</a>
           % if is_ldap_setup:
-            <a id="addGroupBtn" href="${url('useradmin.views.edit_group')}" class="btn"><i
-                class="fa fa-plus-circle"></i> ${_('Add group')}</a>
             <a id="addLdapGroupBtn" href="${url('useradmin.views.add_ldap_groups')}" class="btn"><i
                 class="fa fa-refresh"></i> ${_('Add/Sync LDAP group')}</a>
           % endif

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

@@ -235,7 +235,8 @@
   # ------------------------------------------------------------------------
   [[session]]
     # The cookie containing the users' session ID will expire after this amount of time in seconds.
-    ## ttl=60*60*24*14
+    # Default is 2 weeks.
+    ## ttl=1209600
 
     # The cookie containing the users' session ID will be secure.
     # Should only be enabled with HTTPS.

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

@@ -240,7 +240,8 @@
   # ------------------------------------------------------------------------
   [[session]]
     # The cookie containing the users' session ID will expire after this amount of time in seconds.
-    ## ttl=60*60*24*14
+    # Default is 2 weeks.
+    ## ttl=1209600
 
     # The cookie containing the users' session ID will be secure.
     # Should only be enabled with HTTPS.