mirror of https://gitee.com/bigwinds/arangodb
issue #1173: AQL Editor "Save current query" resets user password
Conflicts: CHANGELOG
This commit is contained in:
parent
a4dcf1b9d3
commit
a86cf09f7f
|
@ -39,6 +39,12 @@ v2.4.0 (XXXX-XX-XX)
|
|||
v2.3.2 (XXXX-XX-XX)
|
||||
-------------------
|
||||
|
||||
* fixed issue #1173: AQL Editor "Save current query" resets user password
|
||||
|
||||
* fixed missing makeDirectory when fetching a Foxx application from a zip file
|
||||
|
||||
* put in warning about default changed: fixed issue #1134: Change the default endpoint to localhost
|
||||
|
||||
* fixed issue #1163: invalid fullCount value returned from AQL
|
||||
|
||||
* fixed range operator precedence
|
||||
|
@ -56,6 +62,8 @@ v2.3.2 (XXXX-XX-XX)
|
|||
|
||||
* fixed memleaks
|
||||
|
||||
* added AQL optimizer rule for removing `INTO` from a `COLLECT` statement if not needed
|
||||
|
||||
* fixed issue #1131
|
||||
|
||||
This change provides the `KEEP` clause for `COLLECT ... INTO`. The `KEEP` clause
|
||||
|
|
|
@ -27,14 +27,11 @@
|
|||
|
||||
activeUser: 0,
|
||||
|
||||
currentExtra: {},
|
||||
|
||||
parse: function(response) {
|
||||
var self = this, toReturn;
|
||||
|
||||
_.each(response.result, function(val) {
|
||||
if (val.user === self.activeUser) {
|
||||
self.currentExtra = val.extra;
|
||||
try {
|
||||
if (val.extra.queries) {
|
||||
toReturn = val.extra.queries;
|
||||
|
@ -52,12 +49,8 @@
|
|||
return false;
|
||||
}
|
||||
|
||||
var queries = [],
|
||||
returnValue1 = false,
|
||||
returnValue2 = false,
|
||||
returnValue3 = false,
|
||||
extraBackup = null,
|
||||
self = this;
|
||||
var returnValue = false;
|
||||
var queries = [];
|
||||
|
||||
this.each(function(query) {
|
||||
queries.push({
|
||||
|
@ -66,33 +59,12 @@
|
|||
});
|
||||
});
|
||||
|
||||
extraBackup = self.currentExtra;
|
||||
extraBackup.queries = [];
|
||||
|
||||
$.ajax({
|
||||
cache: false,
|
||||
type: "PUT",
|
||||
async: false,
|
||||
url: "/_api/user/" + this.activeUser,
|
||||
data: JSON.stringify({
|
||||
extra: extraBackup
|
||||
}),
|
||||
contentType: "application/json",
|
||||
processData: false,
|
||||
success: function() {
|
||||
returnValue1 = true;
|
||||
},
|
||||
error: function() {
|
||||
returnValue1 = false;
|
||||
}
|
||||
});
|
||||
|
||||
//save current collection
|
||||
// save current collection
|
||||
$.ajax({
|
||||
cache: false,
|
||||
type: "PATCH",
|
||||
async: false,
|
||||
url: "/_api/user/" + this.activeUser,
|
||||
url: "/_api/user/" + encodeURIComponent(this.activeUser),
|
||||
data: JSON.stringify({
|
||||
extra: {
|
||||
queries: queries
|
||||
|
@ -101,20 +73,14 @@
|
|||
contentType: "application/json",
|
||||
processData: false,
|
||||
success: function() {
|
||||
returnValue2 = true;
|
||||
returnValue = true;
|
||||
},
|
||||
error: function() {
|
||||
returnValue2 = false;
|
||||
returnValue = false;
|
||||
}
|
||||
});
|
||||
|
||||
if (returnValue1 === true && returnValue2 === true) {
|
||||
returnValue3 = true;
|
||||
}
|
||||
else {
|
||||
returnValue3 = false;
|
||||
}
|
||||
return returnValue3;
|
||||
return returnValue;
|
||||
},
|
||||
|
||||
saveImportQueries: function(file, callback) {
|
||||
|
@ -128,7 +94,7 @@
|
|||
cache: false,
|
||||
type: "POST",
|
||||
async: false,
|
||||
url: "query/upload/" + this.activeUser,
|
||||
url: "query/upload/" + encodeURIComponent(this.activeUser),
|
||||
data: file,
|
||||
contentType: "application/json",
|
||||
processData: false,
|
||||
|
|
Loading…
Reference in New Issue