rails_panel
rails_panel copied to clipboard
support for mongodb / (mongoid, moped)
hi, is it possible to have an output of mongodb calls via mongoid / moped?
i got the moped logs into the console via Moped.logger.level = Logger::DEBUG
and they look like this:
MOPED: 127.0.0.1:27017 QUERY database=qn_dev_master collection=users selector={"_id"=>"50ead4f5930e9beb36000001"} flags=[:slave_ok] limit=0 skip=0 batch_size=nil fields=nil (28.0032ms)
MOPED: 127.0.0.1:27017 QUERY database=qn_dev_master collection=wow_characters selector={"user_id"=>"50ead4f5930e9beb36000001"} flags=[:slave_ok] limit=0 skip=0 batch_size=nil fields=nil (20.0021ms)
MOPED: 127.0.0.1:27017 COMMAND database=qn_dev_master command={:count=>"roles", :query=>{"$and"=>[{"_id"=>{"$in"=>["50ead4f5930e9beb36000002"]}}], "$or"=>[{"name"=>"admin", "resource_type"=>nil, "resource_id"=>nil}]}} (22.0022ms)
thanks, SeriousM
Edit: Thanks to @cvalka4 for the pledge of 150$
+1
+1
+1
:+1: +1
:+1:
For this to work, Moped needs to use ActiveSupport::Notifications
instead of direct Rails.logger
calls, which it currently doesn't.
+1
+1
I've openend an issue in moped for this (https://github.com/mongoid/moped/issues/145) :+1:
:+1:
:+1:
+1
+1
Would love for rails_panel to support MongoDB through Mongoid.
@dejan do you think you could make available the instructions for modifying Mopped locally so we can use it with the rails_panel until the change is part of the official Mopped gem?
This has been implemented in moped's master branch and it is being implemented in mongoid
Hi, i would like to ask if you still plan to implement this support because the requirements are fulfilled by mongoid and moped since two months now. please implement it, that would be awesome!! Thanks
Yes, it's on the roadmap.
+1
I just pledged 150$ for this issue. https://www.catincan.com/bounty/support-mongodb-mongoid-moped-issue-26-dejan-railspanel-github
:+1:
Any news?
+1 Any news?
ping :question:
+1
would still be interested
+1
Anyone still wants to Rails Panel to support Mongoid? I've been playing with a workaround and would be awesome if some one could take a look in the code and beautify a little bit so we can merge in the main branch :)
I created this PR to re-start this conversation https://github.com/dejan/rails_panel/pull/185