Explorar el Código

HUE-1515 [hbase] Search Navbar no longer stickies in tableview

Added resetElements for table and query view
Fixed trackOnGA problem for disabled tracking
Enrico Berti hace 12 años
padre
commit
d123e0f
Se han modificado 2 ficheros con 6 adiciones y 7 borrados
  1. 2 0
      apps/hbase/static/js/app.js
  2. 4 7
      apps/hbase/static/js/utils.js

+ 2 - 0
apps/hbase/static/js/app.js

@@ -98,6 +98,7 @@ routie({
       logGA('query_table');
       app.station('table');
       Router.setTable(cluster, table);
+      resetElements();
       Views.render('dataview');
       app.views.tabledata._reloadcfs(function(){
         app.search.cur_input(query);
@@ -110,6 +111,7 @@ routie({
       logGA('view_table');
       Router.setTable(cluster, table);
       resetSearch();
+      resetElements();
       app.station('table');
       Views.render('dataview');
       routed = true;

+ 4 - 7
apps/hbase/static/js/utils.js

@@ -240,15 +240,12 @@ function prepForTransport(value) {
 };
 
 function logGA(postfix) {
-  function doLog() {
-    trackOnGA('hbase/' + postfix);
-  }
-  if(postfix == null)
+  if (postfix == null)
     postfix = "";
   if (typeof trackOnGA == 'function') {
-    doLog();
-  } else {
-    setTimeout(doLog, 10);
+    window.setTimeout(function () {
+      trackOnGA('hbase/' + postfix);
+    }, 10);
   }
 };