rack-insight 0.5.19 → 0.5.20
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +6 -0
- data/Gemfile.lock +1 -1
- data/lib/rack/insight/panel.rb +30 -8
- data/lib/rack/insight/version.rb +1 -1
- data/lib/rack/insight/views/headers_fragment.html.erb +2 -1
- metadata +1 -1
data/CHANGELOG
CHANGED
data/Gemfile.lock
CHANGED
data/lib/rack/insight/panel.rb
CHANGED
@@ -147,9 +147,9 @@ module Rack::Insight
|
|
147
147
|
end
|
148
148
|
end
|
149
149
|
|
150
|
-
|
151
|
-
|
152
|
-
|
150
|
+
def inspect
|
151
|
+
"#{self.underscored_name} Magic:#{self.bool_prop(:is_magic?)} Table:#{self.bool_prop(:has_table?)} Probe:#{self.bool_prop(:is_probing?)} Custom:#{self.bool_prop(:has_custom_probes?)}" rescue "XXX inspect failed"
|
152
|
+
end
|
153
153
|
|
154
154
|
def bool_prop(prop)
|
155
155
|
self.send(prop) ? 'Y' : 'N'
|
@@ -234,13 +234,21 @@ module Rack::Insight
|
|
234
234
|
heading
|
235
235
|
else
|
236
236
|
num = count(number)
|
237
|
-
if num
|
238
|
-
|
237
|
+
if num.kind_of?(Numeric)
|
238
|
+
if num == 0
|
239
|
+
heading
|
240
|
+
else
|
241
|
+
"#{self.camelized_name} (#{num})"
|
242
|
+
end
|
239
243
|
else
|
240
|
-
|
244
|
+
heading
|
241
245
|
end
|
242
246
|
end
|
243
|
-
|
247
|
+
rescue Object => ex
|
248
|
+
nom = self.name rescue "xxx"
|
249
|
+
"Err3: #{nom}
|
250
|
+
Panel: #{self.inspect}
|
251
|
+
#{([ex.class.name, ex.message] + ex.backtrace).join("<br/>")}"
|
244
252
|
end
|
245
253
|
|
246
254
|
def content_for_request(number)
|
@@ -260,16 +268,30 @@ module Rack::Insight
|
|
260
268
|
else
|
261
269
|
content
|
262
270
|
end
|
263
|
-
rescue
|
271
|
+
rescue Object => ex
|
272
|
+
nom = self.name rescue "xxx"
|
273
|
+
"Err4: #{nom}
|
274
|
+
Panel: #{self.inspect}
|
275
|
+
#{([ex.class.name, ex.message] + ex.backtrace).join("<br/>")}"
|
264
276
|
end
|
265
277
|
|
266
278
|
def heading
|
267
279
|
self.camelized_name
|
280
|
+
rescue Object => ex
|
281
|
+
nom = self.name rescue "xxx"
|
282
|
+
"Err1: #{nom}
|
283
|
+
Panel: #{self.inspect}
|
284
|
+
#{([ex.class.name, ex.message] + ex.backtrace).join("<br/>")}"
|
268
285
|
end
|
269
286
|
|
270
287
|
def content
|
271
288
|
logger.info("Rack::Insight is using default content for #{self.class}") if verbose(:med)
|
272
289
|
render_template 'no_content', :name => self.camelized_name
|
290
|
+
rescue Object => ex
|
291
|
+
nom = self.name rescue "xxx"
|
292
|
+
"Err2: #{nom}
|
293
|
+
Panel: #{self.inspect}
|
294
|
+
#{([ex.class.name, ex.message] + ex.backtrace).join("<br/>")}"
|
273
295
|
end
|
274
296
|
|
275
297
|
# Override in subclasses.
|
data/lib/rack/insight/version.rb
CHANGED
@@ -13,7 +13,8 @@
|
|
13
13
|
</a>
|
14
14
|
<% end %>
|
15
15
|
<% rescue Object => ex %>
|
16
|
-
|
16
|
+
Err5: <%= panel.name rescue "xxx" %>
|
17
|
+
<!-- Panel: <%= panel.inspect %> -->
|
17
18
|
<!-- <%= ([ex.class.name, ex.message] + ex.backtrace).join("\n") %> -->
|
18
19
|
<% end %>
|
19
20
|
</li>
|