mirror of https://gitee.com/bigwinds/arangodb
Merge branch 'devel' of github.com:arangodb/arangodb into devel
This commit is contained in:
commit
da03ae693e
|
@ -1,4 +1,5 @@
|
|||
<script id="indicesView.ejs" type="text/template">
|
||||
<% if (typeof supported !== 'undefined') { %>
|
||||
<div class="contentIn" id="indexHeaderContent">
|
||||
<div id="indexEditView">
|
||||
<table id="collectionEditIndexTable" class="edit-index-table arango-table">
|
||||
|
@ -244,4 +245,5 @@
|
|||
<div class="modal-footer" style="border: none"></div>
|
||||
</div>
|
||||
</div>
|
||||
<% } %>
|
||||
</script>
|
||||
|
|
|
@ -313,10 +313,27 @@
|
|||
|
||||
createCollection: function (e) {
|
||||
e.preventDefault();
|
||||
this.createNewCollectionModal();
|
||||
var self = this;
|
||||
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
cache: false,
|
||||
url: arangoHelper.databaseUrl('/_api/engine'),
|
||||
contentType: 'application/json',
|
||||
processData: false,
|
||||
success: function (data) {
|
||||
self.engine = data;
|
||||
console.log(self.engine);
|
||||
self.createNewCollectionModal(data);
|
||||
},
|
||||
error: function () {
|
||||
arangoHelper.arangoError('Engine', 'Could not fetch ArangoDB Engine details.');
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
submitCreateCollection: function () {
|
||||
var self = this;
|
||||
var callbackCoord = function (error, isCoordinator) {
|
||||
if (error) {
|
||||
arangoHelper.arangoError('DB', 'Could not check coordinator state');
|
||||
|
@ -383,16 +400,19 @@
|
|||
window.modalView.hide();
|
||||
}.bind(this);
|
||||
|
||||
this.collection.newCollection({
|
||||
var tmpObj = {
|
||||
collName: collName,
|
||||
wfs: wfs,
|
||||
isSystem: isSystem,
|
||||
journalSize: collSize,
|
||||
replicationFactor: replicationFactor,
|
||||
collType: collType,
|
||||
shards: shards,
|
||||
shardBy: shardBy
|
||||
}, callback);
|
||||
};
|
||||
if (self.engine.name !== 'rocksdb') {
|
||||
tmpObj.journalSize = collSize;
|
||||
}
|
||||
this.collection.newCollection(tmpObj, callback);
|
||||
}
|
||||
}.bind(this);
|
||||
|
||||
|
@ -400,6 +420,7 @@
|
|||
},
|
||||
|
||||
createNewCollectionModal: function () {
|
||||
var self = this;
|
||||
var callbackCoord2 = function (error, isCoordinator) {
|
||||
if (error) {
|
||||
arangoHelper.arangoError('DB', 'Could not check coordinator state');
|
||||
|
@ -474,6 +495,7 @@
|
|||
this.submitCreateCollection.bind(this)
|
||||
)
|
||||
);
|
||||
if (self.engine.name !== 'rocksdb') {
|
||||
advancedTableContent.push(
|
||||
window.modalView.createTextEntry(
|
||||
'new-collection-size',
|
||||
|
@ -490,6 +512,7 @@
|
|||
]
|
||||
)
|
||||
);
|
||||
}
|
||||
if (window.App.isCluster) {
|
||||
advancedTableContent.push(
|
||||
window.modalView.createTextEntry(
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
}
|
||||
} else {
|
||||
if (availableDbs) {
|
||||
if (availableDbs.indexOf(db) > -1) {
|
||||
if (availableDbs.indexOf(rule) > -1) {
|
||||
$('#loginDatabase').append(
|
||||
'<option>' + rule + '</option>'
|
||||
);
|
||||
|
@ -87,7 +87,6 @@
|
|||
successFunc(availableDbs);
|
||||
});
|
||||
} catch (ignore) {
|
||||
console.log(ignore);
|
||||
successFunc();
|
||||
}
|
||||
}).error(function () {
|
||||
|
|
|
@ -281,6 +281,7 @@
|
|||
if (error) {
|
||||
arangoHelper.arangoError('Collection', 'Could not fetch properties');
|
||||
} else {
|
||||
if (data.journalSize) {
|
||||
var journalSize = data.journalSize / (1024 * 1024);
|
||||
var indexBuckets = data.indexBuckets;
|
||||
var wfs = data.waitForSync;
|
||||
|
@ -301,7 +302,9 @@
|
|||
]
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
if (indexBuckets) {
|
||||
tableContent.push(
|
||||
window.modalView.createTextEntry(
|
||||
'change-index-buckets',
|
||||
|
@ -318,6 +321,7 @@
|
|||
]
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
// prevent "unexpected sync method error"
|
||||
tableContent.push(
|
||||
|
|
Loading…
Reference in New Issue