ソースを参照

HUE-2472 [impala] Hide Show more results in certain cases

Useful for count operations or limited resultsets
Enrico Berti 11 年 前
コミット
41cd7ae677
1 ファイル変更8 行追加0 行削除
  1. 8 0
      apps/beeswax/src/beeswax/templates/execute.mako

+ 8 - 0
apps/beeswax/src/beeswax/templates/execute.mako

@@ -403,7 +403,9 @@ ${layout.menubar(section='query')}
                 </tr>
                 </thead>
               </table>
+              % if app_name == 'impala':
               <a class="pointer" data-bind="visible: $root.scrollNotWorking() && $root.hasMoreResults(), click: manualFetch" style="padding: 10px">${ _('Show more results...') }</a>
+              % endif
             </div>
 
             <div data-bind="css: {'hide': !$root.design.results.empty() || $root.design.results.expired()}" id="resultEmpty">
@@ -2021,6 +2023,12 @@ function addResults(viewModel, dataTable, startRow, nextRow) {
     firstFnDrawcallback = true;
   }
   dataTable.fnAddData(addRowNumberToResults(viewModel.design.results.rows.slice(startRow, nextRow), startRow));
+
+  % if app_name == 'impala':
+  if (startRow == 0 && viewModel.scrollNotWorking() && viewModel.hasMoreResults()){
+    manualFetch();
+  }
+  %endif
 }
 
 function resultsTable(e, data) {