Disable query executing if its already in progress
This commit is contained in:
@@ -128,6 +128,16 @@
|
|||||||
border: none;
|
border: none;
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
background: #7eb54e;
|
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 {
|
#input .actions .btn:focus {
|
||||||
@@ -202,7 +212,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
#results td div {
|
#results td div {
|
||||||
max-width: 200px;
|
max-width: 350px;
|
||||||
max-height: 51px;
|
max-height: 51px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
|
|||||||
@@ -31,6 +31,7 @@
|
|||||||
<div id="custom_query"></div>
|
<div id="custom_query"></div>
|
||||||
<div class="actions">
|
<div class="actions">
|
||||||
<input type="button" id="run" value="Run Query" class="btn btn-sm btn-primary" />
|
<input type="button" id="run" value="Run Query" class="btn btn-sm btn-primary" />
|
||||||
|
<div id="query_progress">Please wait, query is executing...</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -143,8 +143,14 @@ function showTableStructure() {
|
|||||||
function runQuery() {
|
function runQuery() {
|
||||||
setCurrentTab("table_query");
|
setCurrentTab("table_query");
|
||||||
|
|
||||||
|
$("#run").attr("disabled", "disabled");
|
||||||
|
$("#query_progress").show();
|
||||||
|
|
||||||
executeQuery(editor.getValue(), function(data) {
|
executeQuery(editor.getValue(), function(data) {
|
||||||
buildTable(data);
|
buildTable(data);
|
||||||
|
|
||||||
|
$("#run").removeAttr("disabled");
|
||||||
|
$("#query_progress").hide();
|
||||||
$("#input").show();
|
$("#input").show();
|
||||||
$("#output").removeClass("full");
|
$("#output").removeClass("full");
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user