couchdb-fauxton icon indicating copy to clipboard operation
couchdb-fauxton copied to clipboard

Enhancement: Apply filters on _all_dbs

Open fynnlyte opened this issue 6 years ago • 4 comments

When using superlogin or the couch_peruser - option, it is often necessary to investigate a small subset of a large set of databases. My scripts access _all_dbs and then filter by name or by specific documents or keys on documents that exist in many databases. In Fauxton, it's only possible to select one database by name or to browse all by page. It would be great if some of the following was possible in future releases:

  • Regular expression filtering on the database name

  • Filtering based on the existence of a document (by name/ regex on name) in each database

  • Filtering based on document keys (if the doc exists) in each database

The first point would already help a lot. And many thanks for your work on CouchDB/ Fauxton!

fynnlyte avatar May 29 '18 10:05 fynnlyte

I think the only viable propositions so far is:

  1. Allow prefix wilcards filtering (with startkey param) (We could also do suffix but meh?)

Other solutions won't scale altough they could be a nice addon.

popojargo avatar May 29 '18 12:05 popojargo

@Antonio-Maranhao We recently discussed about this feature and I would like to work on it. Do you have any idea how I could integrate the search feature into the actual select?

Here's some ideas:

  • Support wildcards (eg: database_prefix*)
  • Keyboard shortcuts. Let's say you enter client/, by pressing Enter, it opens the database "client/". Otherwise, if you press Ctrl+Enter, it list databases prefixed by client/.

popojargo avatar Oct 29 '18 11:10 popojargo

@popojargo Merging the two actions in the same component will likely make things a bit confusing for the user. What about we split it like in the screenshots below:

The search we have today is active by default: image

Clicking the filter icon would switches to a text input - hopefully with a nice animation to show/hide them 😉 - then you type the db prefix and press enter to filter the db list below image

Antonio-Maranhao avatar Oct 30 '18 15:10 Antonio-Maranhao

The "Database name" search box (to select a single database) can be replaced by a database search box (to filter databases). This is the google "standard". This feature would also solve the requirement described in https://github.com/apache/couchdb-fauxton/issues/869.

kripper avatar Aug 09 '20 17:08 kripper