diff --git a/CHANGELOG b/CHANGELOG index cc0f51ad1d..acaaea2c69 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,6 +2,9 @@ v3.3.3 (XXXX-XX-XX) ------------------- ----- +* Fixed internal issue #1683: fixes an UI issue where a collection name gets wrongly cached + within the documents overview of a collection. + * Fixed an issue with the index estimates in RocksDB in the case a transaction is aborted. Former the index estimates were modified if the transaction commited or not. Now they will only be modified if the transaction commited successfully. diff --git a/js/apps/system/_admin/aardvark/APP/frontend/js/arango/arango.js b/js/apps/system/_admin/aardvark/APP/frontend/js/arango/arango.js index a3f6841ad0..edf47d32f5 100644 --- a/js/apps/system/_admin/aardvark/APP/frontend/js/arango/arango.js +++ b/js/apps/system/_admin/aardvark/APP/frontend/js/arango/arango.js @@ -843,15 +843,19 @@ } else { this.CollectionTypes[identifier] = data.type; if (this.CollectionTypes[identifier] === 3) { - toRun(false, 'edge'); + toRun(false, 'edge', data); } else { - toRun(false, 'document'); + toRun(false, 'document', data); } } }.bind(this); this.arangoDocumentStore.getCollectionInfo(identifier, callback, toRun); } else { - toRun(false, this.CollectionTypes[identifier]); + if (this.CollectionTypes[identifier] === 3) { + toRun(false, 'edge'); + } else { + toRun(false, 'document'); + } } }, diff --git a/js/apps/system/_admin/aardvark/APP/frontend/js/views/documentsView.js b/js/apps/system/_admin/aardvark/APP/frontend/js/views/documentsView.js index fac010cc5a..9b7a306efa 100644 --- a/js/apps/system/_admin/aardvark/APP/frontend/js/views/documentsView.js +++ b/js/apps/system/_admin/aardvark/APP/frontend/js/views/documentsView.js @@ -71,11 +71,16 @@ this.collection.setPage(page); this.page = page; - var callback = function (error, type) { + var callback = function (error, type, responseData) { if (error) { self.renderNotFound(this.collection.collectionID); } else { this.type = type; + if (responseData) { + this.collectionName = responseData.name; + } else { + this.collectionName = colid; + } this.collection.getDocuments(this.getDocsCallback.bind(this)); this.collectionModel = this.collectionsStore.get(colid); @@ -962,6 +967,8 @@ }, render: function () { + this.collectionName = window.location.hash.split('/')[1]; + $(this.el).html(this.template.render({})); if (this.type === 2) { this.type = 'document'; @@ -975,22 +982,11 @@ this.collection.collectionID ); - this.collectionName = window.location.hash.split('/')[1]; - this.checkCollectionState(); // set last active collection name this.lastCollectionName = this.collectionName; - /* - if (this.collectionContext.prev === null) { - $('#collectionPrev').parent().addClass('disabledPag') - } - if (this.collectionContext.next === null) { - $('#collectionNext').parent().addClass('disabledPag') - } - */ - this.uploadSetup(); arangoHelper.fixTooltips(['.icon_arangodb', '.arangoicon', 'top', '[data-toggle=tooltip]', '.upload-info']);