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)
|
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 issue #1163: invalid fullCount value returned from AQL
|
||||||
|
|
||||||
* fixed range operator precedence
|
* fixed range operator precedence
|
||||||
|
@ -56,6 +62,8 @@ v2.3.2 (XXXX-XX-XX)
|
||||||
|
|
||||||
* fixed memleaks
|
* fixed memleaks
|
||||||
|
|
||||||
|
* added AQL optimizer rule for removing `INTO` from a `COLLECT` statement if not needed
|
||||||
|
|
||||||
* fixed issue #1131
|
* fixed issue #1131
|
||||||
|
|
||||||
This change provides the `KEEP` clause for `COLLECT ... INTO`. The `KEEP` clause
|
This change provides the `KEEP` clause for `COLLECT ... INTO`. The `KEEP` clause
|
||||||
|
|
|
@ -27,14 +27,11 @@
|
||||||
|
|
||||||
activeUser: 0,
|
activeUser: 0,
|
||||||
|
|
||||||
currentExtra: {},
|
|
||||||
|
|
||||||
parse: function(response) {
|
parse: function(response) {
|
||||||
var self = this, toReturn;
|
var self = this, toReturn;
|
||||||
|
|
||||||
_.each(response.result, function(val) {
|
_.each(response.result, function(val) {
|
||||||
if (val.user === self.activeUser) {
|
if (val.user === self.activeUser) {
|
||||||
self.currentExtra = val.extra;
|
|
||||||
try {
|
try {
|
||||||
if (val.extra.queries) {
|
if (val.extra.queries) {
|
||||||
toReturn = val.extra.queries;
|
toReturn = val.extra.queries;
|
||||||
|
@ -52,12 +49,8 @@
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
var queries = [],
|
var returnValue = false;
|
||||||
returnValue1 = false,
|
var queries = [];
|
||||||
returnValue2 = false,
|
|
||||||
returnValue3 = false,
|
|
||||||
extraBackup = null,
|
|
||||||
self = this;
|
|
||||||
|
|
||||||
this.each(function(query) {
|
this.each(function(query) {
|
||||||
queries.push({
|
queries.push({
|
||||||
|
@ -66,33 +59,12 @@
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
extraBackup = self.currentExtra;
|
// save current collection
|
||||||
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
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
cache: false,
|
cache: false,
|
||||||
type: "PATCH",
|
type: "PATCH",
|
||||||
async: false,
|
async: false,
|
||||||
url: "/_api/user/" + this.activeUser,
|
url: "/_api/user/" + encodeURIComponent(this.activeUser),
|
||||||
data: JSON.stringify({
|
data: JSON.stringify({
|
||||||
extra: {
|
extra: {
|
||||||
queries: queries
|
queries: queries
|
||||||
|
@ -101,20 +73,14 @@
|
||||||
contentType: "application/json",
|
contentType: "application/json",
|
||||||
processData: false,
|
processData: false,
|
||||||
success: function() {
|
success: function() {
|
||||||
returnValue2 = true;
|
returnValue = true;
|
||||||
},
|
},
|
||||||
error: function() {
|
error: function() {
|
||||||
returnValue2 = false;
|
returnValue = false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if (returnValue1 === true && returnValue2 === true) {
|
return returnValue;
|
||||||
returnValue3 = true;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
returnValue3 = false;
|
|
||||||
}
|
|
||||||
return returnValue3;
|
|
||||||
},
|
},
|
||||||
|
|
||||||
saveImportQueries: function(file, callback) {
|
saveImportQueries: function(file, callback) {
|
||||||
|
@ -128,7 +94,7 @@
|
||||||
cache: false,
|
cache: false,
|
||||||
type: "POST",
|
type: "POST",
|
||||||
async: false,
|
async: false,
|
||||||
url: "query/upload/" + this.activeUser,
|
url: "query/upload/" + encodeURIComponent(this.activeUser),
|
||||||
data: file,
|
data: file,
|
||||||
contentType: "application/json",
|
contentType: "application/json",
|
||||||
processData: false,
|
processData: false,
|
||||||
|
|
Loading…
Reference in New Issue