1
0
Fork 0

Merge branch 'devel' of https://github.com/arangodb/arangodb into spdvpk

This commit is contained in:
Jan Steemann 2016-02-17 12:14:31 +01:00
commit 3359e16262
4 changed files with 44 additions and 6 deletions

View File

@ -107,7 +107,6 @@
data: JSON.stringify(postParameter),
contentType: "application/json",
processData: false,
async: true,
success: function (data, textStatus, xhr) {
if (xhr.getResponseHeader('x-arango-async-id')) {
window.arangoHelper.addAardvarkJob({
@ -129,13 +128,28 @@
},
deleteIndex: function (id, callback) {
var self = this;
$.ajax({
cache: false,
type: 'DELETE',
url: "/_api/index/"+ this.get("name") +"/"+encodeURIComponent(id),
async: true,
success: function () {
callback(false);
headers: {
'x-arango-async': 'store'
},
success: function (data, textStatus, xhr) {
if (xhr.getResponseHeader('x-arango-async-id')) {
window.arangoHelper.addAardvarkJob({
id: xhr.getResponseHeader('x-arango-async-id'),
type: 'index',
collection: self.get("id")
});
callback(false, data);
}
else {
callback(true, data);
}
},
error: function (data) {
callback(true, data);

View File

@ -591,6 +591,15 @@
},
refreshCollectionsView: function() {
var self = this;
window.App.arangoCollectionsStore.fetch({
success: function () {
self.collectionsView.checkLockedCollections();
}
});
},
deleteIndex: function () {
var callback = function(error) {
if (error) {
@ -599,13 +608,21 @@
'<span class="deleteIndex icon_arangodb_roundminus"' +
' data-original-title="Delete index" title="Delete index"></span>'
);
this.model.set("locked", false);
this.refreshCollectionsView();
}
else {
else if (!error && error !== undefined) {
$("tr th:contains('"+ this.lastId+"')").parent().remove();
this.model.set("locked", false);
this.refreshCollectionsView();
}
}.bind(this);
this.model.set("locked", true);
this.model.deleteIndex(this.lastId, callback);
this.refreshCollectionsView();
$("tr th:contains('"+ this.lastId+"')").parent().children().last().html(
'<i class="fa fa-circle-o-notch fa-spin"></i>'
);

View File

@ -907,6 +907,8 @@
if (typeof callback === "function") {
callback();
}
$.noty.clearQueue();
$.noty.closeAll();
},
error: function (data) {
window.progressView.hide();
@ -1098,7 +1100,8 @@
if (xhr.getResponseHeader('x-arango-async-id')) {
self.queryCallbackFunction(xhr.getResponseHeader('x-arango-async-id'), callback);
}
$.noty.clearQueue();
$.noty.closeAll();
},
error: function (data) {
self.switchTab("result-switch");

View File

@ -47,6 +47,10 @@
margin-left: 10px;
}
.fa {
margin-left: 13px;
}
}
.contentIn {