You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ga...@apache.org on 2019/01/08 09:26:38 UTC
[couchdb-fauxton] branch master updated: Update check for
partitioned dbs (#1166)
This is an automated email from the ASF dual-hosted git repository.
garren pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/couchdb-fauxton.git
The following commit(s) were added to refs/heads/master by this push:
new 830d337 Update check for partitioned dbs (#1166)
830d337 is described below
commit 830d337cc3b4cc7983f2f7bd4a497bbb403f7221
Author: Antonio Maranhao <30...@users.noreply.github.com>
AuthorDate: Tue Jan 8 04:26:33 2019 -0500
Update check for partitioned dbs (#1166)
---
app/addons/databases/base.js | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/app/addons/databases/base.js b/app/addons/databases/base.js
index 9f711c8..31678eb 100644
--- a/app/addons/databases/base.js
+++ b/app/addons/databases/base.js
@@ -36,8 +36,14 @@ function partitionUrlComponent(partitionKey) {
function checkPartitionedDatabaseFeature () {
// Checks if the CouchDB server supports Partitioned Databases
return get(Helpers.getServerUrl("/")).then((couchdb) => {
- //TODO: needs to be updated with the correct feature name
- return couchdb.features && couchdb.features.includes('partitions');
+ if (couchdb.features && couchdb.features.includes('partitions')) {
+ return true;
+ }
+ // Check if it's enabled as an experimental feature
+ if (couchdb.feature_flags && couchdb.feature_flags.includes('partitions')) {
+ return true;
+ }
+ return false;
}).catch(() => {
return false;
});