From 9ff9af6f11c7376545fb6b2d230248af5b44ad51 Mon Sep 17 00:00:00 2001 From: Dan Sosedoff Date: Mon, 13 Oct 2014 20:12:13 -0500 Subject: [PATCH] Disable query executing if its already in progress --- static/css/app.css | 12 +++++++++++- static/index.html | 1 + static/js/app.js | 6 ++++++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/static/css/app.css b/static/css/app.css index 2ea6111..9c94e0a 100644 --- a/static/css/app.css +++ b/static/css/app.css @@ -128,6 +128,16 @@ border: none; box-shadow: none; background: #7eb54e; + float: left; +} + +#input .actions #query_progress { + display: none; + float: left; + margin-left: 12px; + line-height: 30px; + height: 30px; + color: #aaa; } #input .actions .btn:focus { @@ -202,7 +212,7 @@ } #results td div { - max-width: 200px; + max-width: 350px; max-height: 51px; overflow: hidden; text-overflow: ellipsis; diff --git a/static/index.html b/static/index.html index 7e44c24..d600bcc 100644 --- a/static/index.html +++ b/static/index.html @@ -31,6 +31,7 @@
+
Please wait, query is executing...
diff --git a/static/js/app.js b/static/js/app.js index 33d5054..4149674 100644 --- a/static/js/app.js +++ b/static/js/app.js @@ -143,8 +143,14 @@ function showTableStructure() { function runQuery() { setCurrentTab("table_query"); + $("#run").attr("disabled", "disabled"); + $("#query_progress").show(); + executeQuery(editor.getValue(), function(data) { buildTable(data); + + $("#run").removeAttr("disabled"); + $("#query_progress").hide(); $("#input").show(); $("#output").removeClass("full"); });