diff --git a/caravel/assets/javascripts/explore.js b/caravel/assets/javascripts/explore.js index c1fda16560ff..4d8973aa2df6 100644 --- a/caravel/assets/javascripts/explore.js +++ b/caravel/assets/javascripts/explore.js @@ -8,6 +8,8 @@ var jQuery = window.jQuery = $; var px = require('./modules/caravel.js'); var showModal = require('./modules/utils.js').showModal; +var isQueryRunning = false; + require('jquery-ui'); $.widget.bridge('uitooltip', $.ui.tooltip); // Shutting down jq-ui tooltips require('bootstrap'); @@ -56,6 +58,10 @@ function prepForm() { } function query(force, pushState) { + if (isQueryRunning) { + return; + } + isQueryRunning = true; if (force === undefined) { force = false; } @@ -71,6 +77,7 @@ function query(force, pushState) { history.pushState({}, document.title, slice.querystring()); } slice.render(force); + isQueryRunning = false; } function initExploreView() { @@ -483,4 +490,9 @@ $(document).ready(function () { $('div.toggle').addClass('pull-right'); slice.bindResizeToWindowResize(); + document.addEventListener("keyup", function (k) { + if (k.key === 'q' || k.key === 'Q') { + query(true); + } + }); }); diff --git a/docs/faq.rst b/docs/faq.rst index efecfcee7248..817e021980ec 100644 --- a/docs/faq.rst +++ b/docs/faq.rst @@ -32,3 +32,9 @@ It can be gigantic! As mentioned above, the main criteria is whether your database can execute queries and return results in a time frame that is acceptable to your users. Many distributed databases out there can execute queries that scan through terabytes in an interactive fashion. + + +Is there shortcut for the Query button +-------------------------------------- + +Yes, `q` or `Q` will do it.