mirror of https://gitee.com/bigwinds/arangodb
issue #999: clear old result when submitting new query
This commit is contained in:
parent
4568c094c9
commit
794b909e8b
|
@ -557,7 +557,6 @@
|
||||||
var inputEditor = ace.edit("aqlEditor");
|
var inputEditor = ace.edit("aqlEditor");
|
||||||
var selectedText = inputEditor.session.getTextRange(inputEditor.getSelectionRange());
|
var selectedText = inputEditor.session.getTextRange(inputEditor.getSelectionRange());
|
||||||
|
|
||||||
|
|
||||||
var sizeBox = $('#querySize');
|
var sizeBox = $('#querySize');
|
||||||
var data = {
|
var data = {
|
||||||
query: selectedText || inputEditor.getValue(),
|
query: selectedText || inputEditor.getValue(),
|
||||||
|
@ -565,6 +564,9 @@
|
||||||
};
|
};
|
||||||
var outputEditor = ace.edit("queryOutput");
|
var outputEditor = ace.edit("queryOutput");
|
||||||
|
|
||||||
|
// clear result
|
||||||
|
outputEditor.setValue('');
|
||||||
|
|
||||||
window.progressView.show("Query is operating...");
|
window.progressView.show("Query is operating...");
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "POST",
|
type: "POST",
|
||||||
|
@ -583,7 +585,7 @@
|
||||||
try {
|
try {
|
||||||
var temp = JSON.parse(data.responseText);
|
var temp = JSON.parse(data.responseText);
|
||||||
outputEditor.setValue('[' + temp.errorNum + '] ' + temp.errorMessage);
|
outputEditor.setValue('[' + temp.errorNum + '] ' + temp.errorMessage);
|
||||||
arangoHelper.arangoError("Query error",temp.errorNum);
|
arangoHelper.arangoError("Query error", temp.errorNum);
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
outputEditor.setValue('ERROR');
|
outputEditor.setValue('ERROR');
|
||||||
|
|
Loading…
Reference in New Issue