apache / couchdb-fauxton

Fauxton is the new Web UI for CouchDB
https://github.com/apache/couchdb-fauxton
Apache License 2.0
378 stars 225 forks source link

Add extension point for database size #1317

Closed rhyshort closed 3 years ago

rhyshort commented 3 years ago

Overview

Add extension point for database size called DatabaseList:dbSizeReportFieldName, this enables consumers to override the displayed value to meet their deployment needs. For example, in the case of Cloudant's usage, the default sizes.active field is meaningless to their customers since they bill using the value from sizes.external, using the extension it is possible to customize the view to provide a better experiance.

The extension point DatabaseList:dbSizeReportFieldName only supports the single extentsion, and assumes the field name is in the sizes object returned from db_info.

Testing recommendations

Regular CI tests passing. It can be further tested by providing an extension to use one of the other fields in the sizes object from the {db}/ endpoint.

GitHub issue number

n/a

Related Pull Requests

n/a

Checklist