mirror of https://gitee.com/bigwinds/arangodb
better handling database creation [ci skip]
This commit is contained in:
parent
bdf3539ced
commit
a43ae187d0
|
@ -185,15 +185,10 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
this.collection.create(options, {
|
this.collection.create(options, {
|
||||||
wait: false,
|
|
||||||
error: function(data, err) {
|
error: function(data, err) {
|
||||||
console.log("ERROR");
|
|
||||||
self.handleError(err.status, err.statusText, dbname);
|
self.handleError(err.status, err.statusText, dbname);
|
||||||
},
|
},
|
||||||
success: function() {
|
success: function(data) {
|
||||||
|
|
||||||
//TODO
|
|
||||||
// add root user to newly created database
|
|
||||||
|
|
||||||
if (userName !== 'root') {
|
if (userName !== 'root') {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
|
@ -214,12 +209,15 @@
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
self.updateDatabases();
|
if (window.location.hash === '#databases') {
|
||||||
arangoHelper.arangoNotification("Database created.");
|
self.updateDatabases();
|
||||||
window.modalView.hide();
|
}
|
||||||
window.App.naviView.dbSelectionView.render($("#dbSelect"));
|
arangoHelper.arangoNotification("Database " + data.get("name") + " created.");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
arangoHelper.arangoNotification("Database creation in progress.");
|
||||||
|
window.modalView.hide();
|
||||||
},
|
},
|
||||||
|
|
||||||
submitDeleteDatabase: function(dbname) {
|
submitDeleteDatabase: function(dbname) {
|
||||||
|
|
Loading…
Reference in New Issue