peek-moped 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/README.md +2 -0
- data/app/views/peek/views/_moped.html.erb +9 -3
- data/lib/peek/views/moped.rb +22 -4
- data/lib/peek-moped/version.rb +1 -1
- data/screenshot.png +0 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 16afba790704ccf8ea686a6bda3730ab0f46cc28
|
4
|
+
data.tar.gz: 3d23cd27ebfc284231d4d3c6484b4826fb2e2fba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f184e562257ca7782c9beca93d32cbe49f7dfacee9b81e57f0483ca89e5b86a3025fa4bfb567ecfe2d9afad6a53594566aa5bb04024841f7c48d799379f8892
|
7
|
+
data.tar.gz: 66018e2664b1e0e9fa5a5bad36789d42778c36fa2a13c34d0d4d6dfbba14d634a5936a89f4343c8642fac25b7071d4cdcde80f16cbbf9077f791b8d2dca9a556
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -21,7 +21,7 @@
|
|
21
21
|
font-weight: bold;
|
22
22
|
}
|
23
23
|
.peek-moped-query-details, .peek-moped-query-stack {
|
24
|
-
|
24
|
+
display: none;
|
25
25
|
}
|
26
26
|
.peek-moped-query-opened {
|
27
27
|
background-color: #FFFFE0;
|
@@ -40,6 +40,10 @@
|
|
40
40
|
position:absolute;
|
41
41
|
background-color: #ffffff;
|
42
42
|
}
|
43
|
+
.peek-moped-system-db {
|
44
|
+
font-style: italic;
|
45
|
+
color: darkred;
|
46
|
+
}
|
43
47
|
</style>
|
44
48
|
<div id="moped_queries_log">
|
45
49
|
<table cellpadding="3" id="peek-moped-table">
|
@@ -55,9 +59,11 @@
|
|
55
59
|
<% code_desc = view.op_code_info cmd.op_code %>
|
56
60
|
<span class="peek-moped-code" title="<%= code_desc[1] %>"><%= code_desc[0] %></span>
|
57
61
|
<a href="#" onclick="$(this).closest('div').toggleClass('peek-moped-query-opened'); return false;">
|
58
|
-
<%= view.cmd_collection_name cmd %>
|
62
|
+
<%= raw view.cmd_collection_name cmd %>
|
59
63
|
</a>
|
60
|
-
<div class="peek-moped-query-details"><%=
|
64
|
+
<div class="peek-moped-query-details"><%=
|
65
|
+
cmd.to_yaml.gsub(/\!ruby\/object\:Moped\:\:BSON\:\:ObjectId\s*raw_data:.*\n\s*([^\n]*)/) {|capture| "ObjectId(\"#{$1.unpack("m")[0].unpack("H*")[0].force_encoding(Moped::BSON::UTF8_ENCODING)}\")"}
|
66
|
+
%></div>
|
61
67
|
<div class="peek-moped-query-stack"><b>APP STACK:</b><%= "\n#{row[3].join("\n")}" %></div>
|
62
68
|
</div>
|
63
69
|
<% end %>
|
data/lib/peek/views/moped.rb
CHANGED
@@ -55,17 +55,35 @@ module Peek
|
|
55
55
|
end
|
56
56
|
|
57
57
|
def cmd_collection_name cmd
|
58
|
+
if %w(admin config local).include? cmd.database
|
59
|
+
name = "<span class=\"peek-moped-system-db\">#{cmd.database}</span>."
|
60
|
+
else
|
61
|
+
name = ''
|
62
|
+
end
|
63
|
+
|
58
64
|
if cmd.collection == '$cmd'
|
59
65
|
if cmd.selector.has_key? :getlasterror
|
60
|
-
'getLastError()'
|
66
|
+
name << 'getLastError()'
|
61
67
|
elsif cmd.selector.has_key? :count
|
62
|
-
"#{cmd.selector[:count]}.count()"
|
68
|
+
name << "#{cmd.selector[:count]}.count()"
|
69
|
+
elsif cmd.selector.has_key? :aggregate
|
70
|
+
name << "#{cmd.selector[:aggregate]}.aggregate(#{cmd.selector[:pipeline].map{|p| p.keys}.flatten.join(', ')})"
|
71
|
+
elsif cmd.selector.has_key? :mapreduce
|
72
|
+
name << "#{cmd.selector[:mapreduce]}.mapReduce(#{cmd.selector[:out].to_s})"
|
73
|
+
elsif cmd.selector.has_key? :findAndModify
|
74
|
+
name << "#{cmd.selector[:findAndModify]}.findAndModify()"
|
75
|
+
elsif cmd.selector.has_key? :geoNear
|
76
|
+
name << "#{cmd.selector[:geoNear]}.geoNear()"
|
77
|
+
elsif cmd.selector.has_key? :ismaster
|
78
|
+
name << "isMaster()"
|
63
79
|
else
|
64
|
-
'$cmd'
|
80
|
+
name << '$cmd'
|
65
81
|
end
|
66
82
|
else
|
67
|
-
cmd.collection
|
83
|
+
name << cmd.collection
|
68
84
|
end
|
85
|
+
|
86
|
+
name
|
69
87
|
end
|
70
88
|
|
71
89
|
def formatted_duration
|
data/lib/peek-moped/version.rb
CHANGED
data/screenshot.png
ADDED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: peek-moped
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pavel Chertorogov
|
@@ -72,6 +72,7 @@ files:
|
|
72
72
|
- lib/peek-moped/version.rb
|
73
73
|
- lib/peek/views/moped.rb
|
74
74
|
- peek-moped.gemspec
|
75
|
+
- screenshot.png
|
75
76
|
homepage: https://github.com/nodkz/peek-moped
|
76
77
|
licenses: []
|
77
78
|
metadata: {}
|