mirror of https://gitee.com/bigwinds/arangodb
AQL Editor: Query only on selected text if a selection exists.
This commit is contained in:
parent
f28e829586
commit
fb0a309b3c
|
@ -456,12 +456,15 @@
|
||||||
this.customQueries = _.sortBy(this.customQueries, 'name');
|
this.customQueries = _.sortBy(this.customQueries, 'name');
|
||||||
},
|
},
|
||||||
submitQuery: function () {
|
submitQuery: function () {
|
||||||
this.switchTab("result-switch");
|
|
||||||
var self = this;
|
var self = this;
|
||||||
var sizeBox = $('#querySize');
|
|
||||||
var inputEditor = ace.edit("aqlEditor");
|
var inputEditor = ace.edit("aqlEditor");
|
||||||
|
var selectedText = inputEditor.session.getTextRange(inputEditor.getSelectionRange());
|
||||||
|
|
||||||
|
this.switchTab("result-switch");
|
||||||
|
|
||||||
|
var sizeBox = $('#querySize');
|
||||||
var data = {
|
var data = {
|
||||||
query: inputEditor.getValue(),
|
query: selectedText || inputEditor.getValue(),
|
||||||
batchSize: parseInt(sizeBox.val(), 10)
|
batchSize: parseInt(sizeBox.val(), 10)
|
||||||
};
|
};
|
||||||
var outputEditor = ace.edit("queryOutput");
|
var outputEditor = ace.edit("queryOutput");
|
||||||
|
|
Loading…
Reference in New Issue