Explorar o código

[security] Scroll to right path on Hive HDFS link

Enrico Berti %!s(int64=11) %!d(string=hai) anos
pai
achega
d156958

+ 11 - 9
apps/about/src/about/templates/admin_wizard.mako

@@ -288,15 +288,17 @@ ${ header.menubar() }
 
 $(document).ready(function(){
 
-  $.get("${ url('desktop.views.check_config') }", function(response) {
-    $("#check-config-section .spinner").css({
-      'position': 'absolute',
-      'top': '-100px'
-    });
-    $("#check-config-section .info").html(response);
-    $("#check-config-section .info").removeClass('hide');
-  })
-  .fail(function() { $(document).trigger('error', '${ _("Check config failed: ")}'); });
+  window.setTimeout(function(){
+    $.get("${ url('desktop.views.check_config') }", function(response) {
+      $("#check-config-section .spinner").css({
+        'position': 'absolute',
+        'top': '-100px'
+      });
+      $("#check-config-section .info").html(response);
+      $("#check-config-section .info").removeClass('hide');
+    })
+    .fail(function() { $(document).trigger('error', '${ _("Check config failed: ")}'); });
+  }, 100);
 
   $("[rel='popover']").popover();
 

+ 7 - 5
apps/security/src/security/templates/hdfs.mako

@@ -325,11 +325,13 @@ ${ tree.import_templates(itemClick='$root.assist.setPath', iconClick='$root.assi
       if (_path[_path.length-1] == "/"){
         _path = _path.substr(0, _path.length - 1);
       }
-      if ($("a.anchor[href^='"+_path+"']").length > 0){
-        $("#expandableTree").animate({
-          scrollTop: ($("a.anchor[href^='"+_path+"']:first").position().top + $("#expandableTree").scrollTop() - $("#expandableTree").position().top - 4)+"px"
-        });
-      }
+      window.setTimeout(function(){
+        if ($("a.anchor[href^='"+_path+"']").length > 0){
+          $("#expandableTree").animate({
+            scrollTop: ($("a.anchor[href^='"+_path+"']:first").position().top + $("#expandableTree").scrollTop() - $("#expandableTree").position().top - 4)+"px"
+          }, 200);
+        }
+      }, 200)
     });
 
     $(document).on("updated.acls", function() {