neumino / chateau

Another (awesome) data explorer for RethinkDB
207 stars 38 forks source link

ability to filter or search #51

Open devmondo opened 9 years ago

devmondo commented 9 years ago

awesome work man, could we have a way to search or filter data ?

ghost commented 9 years ago

+1

rnenjoy commented 7 years ago

+1

dsernst commented 7 years ago

Yes, this seems pretty straightforward:

Yeah?

mspanish commented 7 years ago

+1

mspanish commented 7 years ago

@neumino sorry you mentioned on twitter to do a pull request to solve this but I thought a pull request was to submit code, not to download a branch - any possibility that you could post the code here for a quick filter/search?

mspanish commented 7 years ago

I added a route to get data for just 1 keyword (in my db, the keyword is the primary id) - but I'm a bit confounded as to how to get the table to show just that data. The route is pulling up the data fine, I get the result in the front end and all looks good - but I don't see an easy way to display the record.

My route:

exports.getKeyword = function (req, res) { var primaryKey = req.body.primary; var db = req.body.db; var table = req.body.table; r.db(db).table(table).get(primaryKey).run( connection, {timeFormat: 'raw'}, function(error, result) { if (error) handleError(error); res.json({ error: error, result: result }); }) }

mspanish commented 7 years ago

ah I prepended an input field on top of the app, which calls this route with the keyword